2025-08-16 14:39:34 +08:00
|
|
|
|
<template>
|
2025-08-16 15:36:15 +08:00
|
|
|
|
<view class="agents-page">
|
2025-08-16 14:39:34 +08:00
|
|
|
|
<!-- 头部区域 -->
|
2025-08-16 15:28:26 +08:00
|
|
|
|
<custom-nav-bar3 title=""></custom-nav-bar3>
|
2025-08-16 14:39:34 +08:00
|
|
|
|
<view class="header">
|
2025-08-16 15:01:04 +08:00
|
|
|
|
<image :src="commonEnum.AGENT" class="agent-background" mode="aspectFill"></image>
|
2025-08-16 14:39:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 主要内容区域 -->
|
|
|
|
|
|
<view class="main-content">
|
2025-08-16 15:36:15 +08:00
|
|
|
|
<!-- 表单区域 -->
|
|
|
|
|
|
<view class="form-section">
|
|
|
|
|
|
<!-- 姓名输入 -->
|
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
|
<view class="form-label">请填写您的姓名</view>
|
|
|
|
|
|
<input
|
|
|
|
|
|
v-model="formData.name"
|
|
|
|
|
|
class="form-input"
|
|
|
|
|
|
maxlength="20"
|
|
|
|
|
|
placeholder="请输入您的姓名"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 联系方式输入 -->
|
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
|
<view class="form-label">请填写您的联系方式</view>
|
|
|
|
|
|
<input
|
|
|
|
|
|
v-model="formData.phone"
|
|
|
|
|
|
class="form-input"
|
|
|
|
|
|
maxlength="11"
|
|
|
|
|
|
placeholder="请输入您的联系方式"
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 身份证号码输入 -->
|
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
|
<view class="form-label">请输入您的身份证号码</view>
|
|
|
|
|
|
<input
|
|
|
|
|
|
v-model="formData.idCard"
|
|
|
|
|
|
class="form-input"
|
|
|
|
|
|
maxlength="18"
|
|
|
|
|
|
placeholder="请输入您的身份证号码"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 服务区域选择 -->
|
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
|
<view class="form-label">请选择您的服务区域</view>
|
|
|
|
|
|
<view class="form-selector" @click="selectServiceArea">
|
|
|
|
|
|
<text class="selector-text">{{ formData.serviceArea || '请选择服务区域' }}</text>
|
|
|
|
|
|
<text class="arrow-icon">></text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 详细地址输入 -->
|
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
|
<view class="form-label">请输入您的详细地址</view>
|
|
|
|
|
|
<input
|
|
|
|
|
|
v-model="formData.detailAddress"
|
|
|
|
|
|
class="form-input"
|
|
|
|
|
|
maxlength="100"
|
|
|
|
|
|
placeholder="请输入您的详细地址"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 协议同意 -->
|
|
|
|
|
|
<view class="agreement-section">
|
|
|
|
|
|
<view class="agreement-item" @click="toggleAgreement">
|
|
|
|
|
|
<view :class="{ checked: formData.agreed }" class="checkbox">
|
|
|
|
|
|
<text v-if="formData.agreed" class="checkmark">✓</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<text class="agreement-text">
|
|
|
|
|
|
我已阅读并同意
|
|
|
|
|
|
<text class="agreement-link" @click.stop="showAgreement">《代理商协议》</text>
|
|
|
|
|
|
</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 提交按钮 -->
|
|
|
|
|
|
<view class="submit-section">
|
|
|
|
|
|
<button :disabled="!canSubmit" class="submit-btn" @click="submitApplication">
|
|
|
|
|
|
申请成为代理商
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-08-16 14:39:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import commonEnum from '../../enum/commonEnum'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
name: 'AgentsPage',
|
2025-08-16 14:39:34 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
commonEnum() {
|
|
|
|
|
|
return commonEnum
|
|
|
|
|
|
},
|
2025-08-16 15:36:15 +08:00
|
|
|
|
canSubmit() {
|
|
|
|
|
|
return (
|
|
|
|
|
|
this.formData.name &&
|
|
|
|
|
|
this.formData.phone &&
|
|
|
|
|
|
this.formData.idCard &&
|
|
|
|
|
|
this.formData.serviceArea &&
|
|
|
|
|
|
this.formData.detailAddress &&
|
|
|
|
|
|
this.formData.agreed
|
|
|
|
|
|
)
|
|
|
|
|
|
},
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 页面加载时的逻辑
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
formData: {
|
|
|
|
|
|
name: '张珊珊',
|
|
|
|
|
|
phone: '',
|
2025-08-16 15:36:15 +08:00
|
|
|
|
idCard: '',
|
|
|
|
|
|
serviceArea: '福建省宁德市福鼎市',
|
|
|
|
|
|
detailAddress: '太姥山镇秦屿大道2号',
|
|
|
|
|
|
agreed: true,
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 选择服务区域
|
|
|
|
|
|
selectServiceArea() {
|
|
|
|
|
|
uni.showActionSheet({
|
|
|
|
|
|
itemList: [
|
|
|
|
|
|
'福建省宁德市福鼎市',
|
|
|
|
|
|
'福建省宁德市霞浦县',
|
|
|
|
|
|
'福建省宁德市古田县',
|
|
|
|
|
|
'福建省宁德市屏南县',
|
|
|
|
|
|
],
|
2025-08-16 14:39:34 +08:00
|
|
|
|
success: res => {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
const areas = [
|
|
|
|
|
|
'福建省宁德市福鼎市',
|
|
|
|
|
|
'福建省宁德市霞浦县',
|
|
|
|
|
|
'福建省宁德市古田县',
|
|
|
|
|
|
'福建省宁德市屏南县',
|
|
|
|
|
|
]
|
|
|
|
|
|
this.formData.serviceArea = areas[res.tapIndex]
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
})
|
2025-08-16 15:36:15 +08:00
|
|
|
|
},
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 切换协议同意状态
|
|
|
|
|
|
toggleAgreement() {
|
|
|
|
|
|
this.formData.agreed = !this.formData.agreed
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 显示代理商协议
|
|
|
|
|
|
showAgreement() {
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
title: '代理商协议',
|
|
|
|
|
|
content: '这里是代理商协议的详细内容...',
|
|
|
|
|
|
showCancel: false,
|
|
|
|
|
|
confirmText: '我知道了',
|
2025-08-16 14:39:34 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 提交申请
|
|
|
|
|
|
submitApplication() {
|
|
|
|
|
|
if (!this.canSubmit) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '请完善所有必填信息',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
})
|
2025-08-16 14:39:34 +08:00
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
title: '提交中...',
|
2025-08-16 14:39:34 +08:00
|
|
|
|
})
|
2025-08-16 15:36:15 +08:00
|
|
|
|
|
|
|
|
|
|
// 模拟提交
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
title: '提交成功',
|
|
|
|
|
|
content: '您的代理商申请已提交,我们将在3个工作日内审核并联系您。',
|
|
|
|
|
|
showCancel: false,
|
|
|
|
|
|
confirmText: '确定',
|
|
|
|
|
|
success: () => {
|
|
|
|
|
|
// 重置表单
|
|
|
|
|
|
this.resetForm()
|
|
|
|
|
|
},
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 2000)
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
2025-08-16 15:36:15 +08:00
|
|
|
|
|
|
|
|
|
|
// 重置表单
|
|
|
|
|
|
resetForm() {
|
|
|
|
|
|
this.formData = {
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
phone: '',
|
|
|
|
|
|
idCard: '',
|
|
|
|
|
|
serviceArea: '',
|
|
|
|
|
|
detailAddress: '',
|
|
|
|
|
|
agreed: false,
|
|
|
|
|
|
}
|
2025-08-16 14:39:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.agents-page {
|
2025-08-16 14:39:34 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
background: #f3f5f6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 头部区域
|
|
|
|
|
|
.header {
|
2025-08-16 15:01:04 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
background: #fedfcd;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:01:04 +08:00
|
|
|
|
.agent-background {
|
2025-08-16 14:39:34 +08:00
|
|
|
|
position: relative;
|
2025-08-16 15:01:04 +08:00
|
|
|
|
width: 750rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 主要内容区域
|
|
|
|
|
|
.main-content {
|
2025-08-16 15:01:04 +08:00
|
|
|
|
position: relative;
|
2025-08-16 15:28:26 +08:00
|
|
|
|
top: -34rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border-radius: 40rpx 40rpx 0 0;
|
|
|
|
|
|
margin: 0 30rpx;
|
|
|
|
|
|
padding: 40rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 表单区域
|
|
|
|
|
|
.form-section {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.form-title {
|
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
margin-bottom: 60rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-item {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
margin-bottom: 40rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.form-label {
|
2025-08-16 14:39:34 +08:00
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #333;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
font-weight: 500;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.form-input {
|
|
|
|
|
|
width: 100%;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
height: 80rpx;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border: 2rpx solid #e8e8e8;
|
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
|
padding: 0 24rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
font-size: 28rpx;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
color: #333;
|
|
|
|
|
|
box-sizing: border-box;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
|
|
|
|
|
&:focus {
|
2025-08-16 15:36:15 +08:00
|
|
|
|
border-color: #ff6b6b;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
&::placeholder {
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.form-selector {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border: 2rpx solid #e8e8e8;
|
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
|
padding: 0 24rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
box-sizing: border-box;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.selector-text {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.arrow-icon {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
|
}
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 协议区域
|
|
|
|
|
|
.agreement-section {
|
|
|
|
|
|
margin-bottom: 60rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.agreement-item {
|
2025-08-16 14:39:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.checkbox {
|
|
|
|
|
|
width: 32rpx;
|
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
|
border: 2rpx solid #ff6b6b;
|
|
|
|
|
|
border-radius: 6rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
margin-right: 20rpx;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
background: #ffffff;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
&.checked {
|
|
|
|
|
|
background: #f15a04;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.checkmark {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
font-weight: bold;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.agreement-text {
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
flex: 1;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
.agreement-link {
|
|
|
|
|
|
color: #f15a04;
|
|
|
|
|
|
text-decoration: underline;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
// 提交区域
|
|
|
|
|
|
.submit-section {
|
|
|
|
|
|
.submit-btn {
|
2025-08-16 14:39:34 +08:00
|
|
|
|
width: 100%;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
height: 88rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
background: #f15a04;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
color: #ffffff;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
border: none;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
border-radius: 12rpx;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
font-weight: bold;
|
2025-08-16 15:36:15 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
&:disabled {
|
|
|
|
|
|
background: #cccccc;
|
|
|
|
|
|
color: #999999;
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-16 15:36:15 +08:00
|
|
|
|
&:active {
|
|
|
|
|
|
transform: scale(0.98);
|
2025-08-16 14:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|