You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1498 lines
39 KiB

<template>
<!-- 商家入驻 -->
<view class="page1">
<view class="fixed-head">
<view class="nav" :style="{'height': navHeight + 'px'}">
<view class="back-btn" :style="{'top': navContentTop + 'px','width': navContentHeight + 'px','height': navContentHeight + 'px','line-height': navContentHeight + 'px'}" @tap="back">
<uni-icons type="left" size="26"></uni-icons>
</view>
<view class="nav-title" :style="{'top': navContentTop + 'px','height': navContentHeight + 'px','line-height': navContentHeight + 'px'}">商家注册</view>
</view>
</view>
<view class="nav-holder" :style="{'height': navHeight + 'px'}"></view>
<view class="register-hero">
<view class="hero-title">商家入驻</view>
<view class="hero-subtitle">完善资料后提交审核开启校园经营</view>
</view>
<view class="form-wrap">
<view class="content">
<view class="value">
<view class="name">
店铺名称
</view>
<view class="text">
<input type="text" v-model="formData.shopName" placeholder="输入店铺名称" />
</view>
</view>
<view class="value">
<view class="name">
商家类型
</view>
<view class="text">
<uni-data-select class="uni-data-select" :localdata="merchantTypeList" v-model="formData.merchantType"
:clear="false" placeholder="请选择商家类型"></uni-data-select>
</view>
</view>
<view class="value">
<view class="name">
学生商家
</view>
<view class="text" style="text-align: right;">
<label class="radio" style="padding-right: 20rpx;" @tap="clickRadio(1)">
<radio :checked="formData.isStudent == 1" /><text>是</text>
</label>
<label class="radio" @tap="clickRadio(0)">
<radio :checked="formData.isStudent == 0" /><text>否</text>
</label>
</view>
</view>
<view class="value image-row">
<view class="name image-name">
门头图
</view>
<view class="text single-upload">
<view class="image-card" @tap="pictureAdd('mentou')">
<view class="upload-img" v-if="formData.shopIcon ==''">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<img :src="formData.shopIcon" v-if="formData.shopIcon !=''" alt="" class="upload-img">
<view class="delete-img" v-if="formData.shopIcon !=''" @tap.stop="deleteImage('mentou')">×</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="value">
<view class="name">
店铺坐标
</view>
<view class="text" @tap.stop="openPicker" style="text-align: right;">
<uni-icons type="location" color="#00BFFF" size="12"></uni-icons>
<text style="color:#00BFFF;">点击选择地址</text>
</view>
</view>
<view class="value" style="height:120rpx;">
<view class="name">
店铺地址
</view>
<view class="text" style="height:120rpx;line-height: 60rpx;">
<textarea name="" id="" v-model="formData.shopAddress" cols="30" rows="10"></textarea>
</view>
</view>
<view class="value">
<view class="name">
所属校区
</view>
<view class="text campus-field" @tap.stop="checkArea">
<view class="campus-switch campus-switch--form" :class="{ placeholder: !formData.region }">
<text class="campus-switch-name">{{ formData.region || '选择校区' }}</text>
<text class="campus-switch-action">切换</text>
</view>
</view>
</view>
</view>
<view class="content">
<view class="value">
<view class="name">
联系人
</view>
<view class="text">
<input type="text" v-model="formData.nickname" placeholder="输入联系人" />
</view>
</view>
<view class="value">
<view class="name">
联系电话
</view>
<view class="text">
<input type="text" v-model="formData.mobile" placeholder="输入联系电话" />
</view>
</view>
<view class="value">
<view class="name" style="flex: 1;">
验证码
</view>
<view class="text code-row">
<input type="number" v-model="formData.code" placeholder="请输入验证码" />
<view class="code-btn" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'">
{{ choose ? clock + '重新获取' : '获取验证码' }}
</view>
</view>
</view>
</view>
<view class="content">
<view class="value id-card-row image-row">
<view class="name image-name">
法人身份证正反面
</view>
<view class="text id-card-upload">
<view class="image-card" @tap="pictureAdd('zheng')">
<view class="upload-img" v-if="formData.zhengzhao ==''">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<img :src="formData.zhengzhao" v-if="formData.zhengzhao !=''" alt="" class="upload-img">
<view class="delete-img" v-if="formData.zhengzhao !=''" @tap.stop="deleteImage('zheng')">×</view>
</view>
<view class="image-card" @tap="pictureAdd('fan')">
<view class="upload-img" v-if="formData.fanzhao ==''">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<img :src="formData.fanzhao" v-if="formData.fanzhao !=''" alt="" class="upload-img">
<view class="delete-img" v-if="formData.fanzhao !=''" @tap.stop="deleteImage('fan')">×</view>
</view>
</view>
</view>
<view class="value">
<view class="name">
法人姓名
</view>
<view class="text">
<input type="text" v-model="formData.shopLename" placeholder="输入法人姓名" />
</view>
</view>
<view class="value">
<view class="name">
法人身份证
</view>
<view class="text">
<input type="text" v-model="formData.shopLecard" placeholder="输入法人身份证" />
</view>
</view>
</view>
<view class="content">
<view class="value image-row">
<view class="name image-name">
营业执照
</view>
<view class="text single-upload">
<view class="image-card" @tap="pictureAdd('yingye')">
<view class="upload-img" v-if="formData.yingyezhizhao ==''">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<img :src="formData.yingyezhizhao" v-if="formData.yingyezhizhao !=''" alt="" class="upload-img">
<view class="delete-img" v-if="formData.yingyezhizhao !=''" @tap.stop="deleteImage('yingye')">×</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="value image-row">
<view class="name image-name">
其他补充证照
</view>
<view class="text supplement-upload">
<scroll-view class="supplement-scroll" :scroll-x="true">
<view class="supplement-list">
<view class="image-card supplement-card" v-if="formData.qita.length < 9" @tap="pictureAdd('qita')">
<view class="upload-img">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
</view>
<view class="image-card supplement-card" v-for="(item, index) in formData.qita" :key="index" @tap="pictureAdd('qita', index)">
<img :src="item" alt="" class="upload-img">
<view class="delete-img" @tap.stop="deleteImage('qita', index)">×</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
<view class="content">
<view class="value">
<view class="name">
支付宝账户
</view>
<view class="text">
<input type="text" v-model="formData.aliAccount" placeholder="邮箱/手机号" />
</view>
</view>
<view class="value">
<view class="name">
收款人姓名
</view>
<view class="text">
<input type="text" v-model="formData.aliName" placeholder="支付宝账号实名认证的姓名" />
</view>
</view>
</view>
<view class="content" v-if="formData.merchantType == 1">
<view class="section-title">商家自配送</view>
<view class="value">
<view class="name">支持自配送</view>
<view class="text" style="text-align: right;">
<label class="radio" style="padding-right: 20rpx;" @tap="setSelfDelivery(1)">
<radio :checked="formData.supportShopDelivery == 1" /><text>是</text>
</label>
<label class="radio" @tap="setSelfDelivery(0)">
<radio :checked="formData.supportShopDelivery == 0" /><text>否</text>
</label>
</view>
</view>
<block v-if="formData.supportShopDelivery == 1">
<view class="value">
<view class="name">配送费</view>
<view class="text">
<input type="digit" v-model="formData.orderBkge" placeholder="默认0,最多1位小数" @blur="formatOrderBkge" />
</view>
</view>
<view class="value">
<view class="name">送达位置</view>
<view class="text" style="text-align: right;">
<picker :range="deliveryLocationList" range-key="text" @change="deliveryLocationChange">
<view class="picker-text" :class="{ placeholder: !formData.shopDeliveryLocation }">
{{deliveryLocationText || '请选择送达位置'}}
<uni-icons type="bottom" size="14" color="#999"></uni-icons>
</view>
</picker>
</view>
</view>
<view class="value">
<view class="name">配送时长</view>
<view class="text">
<input type="number" v-model="formData.shopDeliveryDuration" placeholder="请输入分钟数" />
</view>
</view>
<view class="value">
<view class="name">配送员账号</view>
<view class="text worker-query">
<input type="number" v-model="workerMobile" placeholder="输入配送员手机号" />
<view class="query-btn" @tap="findWorker">查询</view>
</view>
</view>
<view class="value" v-if="formData.workerId">
<view class="name">已绑定</view>
<view class="text" style="text-align: right;">
{{formData.workerName}} {{formData.workerPhone}}
</view>
</view>
</block>
</view>
<view class="content" v-if="formData.merchantType == 1">
<view class="section-title">中转配送</view>
<view class="value">
<view class="name">支持中转配送</view>
<view class="text" style="text-align: right;">
<label class="radio" style="padding-right: 20rpx;" @tap="setTransferDelivery(1)">
<radio :checked="formData.supportTransferDelivery == 1" /><text>是</text>
</label>
<label class="radio" @tap="setTransferDelivery(0)">
<radio :checked="formData.supportTransferDelivery == 0" /><text>否</text>
</label>
</view>
</view>
<block v-if="formData.supportTransferDelivery == 1">
<view class="value">
<view class="name">中转时长</view>
<view class="text">
<input type="number" v-model="formData.transferDeliveryDuration" placeholder="请输入分钟数" />
</view>
</view>
<view class="value">
<view class="name">中转地点</view>
<view class="text" style="text-align: right;">
<picker :range="transferAddressList" range-key="text" @change="transferAddressChange"
:disabled="!formData.regionId">
<view class="picker-text" :class="{ placeholder: !formData.transferAddressName }">
{{ formData.transferAddressName || (formData.regionId ? '请选择中转地点' : '请先选择所属区域') }}
<uni-icons type="bottom" size="14" color="#999"></uni-icons>
</view>
</picker>
</view>
</view>
</block>
</view>
<button @tap.stop="submit()">保存</button>
</view>
<uni-popup ref="areaPopup" class="home-popup-layer" :is-mask-click="areaPopupCanClose" background-color="transparent">
<view class="campus-area-popup">
<view class="area-popup-glow area-popup-glow-a"></view>
<view class="area-popup-glow area-popup-glow-b"></view>
<view class="campus-area-header">
<view class="campus-area-kicker">选择商家经营校区</view>
<view class="campus-area-title">你在哪个校区开店?</view>
<view class="campus-area-subtitle">默认选中当前缓存校区,也可以搜索后切换。</view>
</view>
<view class="campus-area-search">
<text class="area-search-icon">⌕</text>
<input v-model="areaKeyword" confirm-type="search" placeholder="搜索学校 / 校区 / 区域"
placeholder-class="area-search-placeholder" />
</view>
<scroll-view scroll-y class="campus-area-list">
<view class="campus-area-item" :class="{ active: isCurrentRegion(item) }"
v-for="(item,index) in filteredAreaList" :key="index" @tap="onClickArea(item)">
<view class="area-item-main">
<view class="area-item-dot"></view>
<text>{{item.title}}</text>
</view>
<view class="area-item-action">{{isCurrentRegion(item) ? '已选' : '选择'}}</view>
</view>
<view class="campus-area-empty" v-if="filteredAreaList.length === 0">
<view class="area-empty-title">没找到这个校区</view>
<view class="area-empty-desc">换个关键词试试比如学校简称或区域名</view>
</view>
</scroll-view>
</view>
</uni-popup>
<common-loading />
</view>
</template>
<script>
import {
getArea
} from '@/utils/global.js'
import { reg } from '@/utils/global.js'
export default {
data() {
return {
addressList:[],
transferAddressList:[],
merchantTypeList: [{
value: 1,
text: '外卖商家'
}, {
value: 2,
text: '团购商家'
}],
deliveryLocationList: [{
value: 1,
text: '送到宿舍'
}, {
value: 2,
text: '送到楼下'
}],
areaKeyword:'',
areaPopupCanClose:false,
workerMobile:'',
formData: {
regionId:'',
region:'',
shopIcon:'',
shopAddress: '',
shopName:'',
aliAccount:'',
aliName:'',
nickname:'',
mobile:uni.getStorageSync('mobile')?uni.getStorageSync('mobile'):'',
code:'',
password:'123456',
zhengzhao:'',
yingyezhizhao:'',
fanzhao:'',
shopLename:'',
shopLecard:'',
qita:[],
shopImages:'',
id:'',
merchantType:1, //1外卖商家 2团购商家
isStudent:0, //1学生商家 0不是学生
unionid:'',
supportShopDelivery:0,
orderBkge:0,
shopDeliveryLocation:'',
shopDeliveryDuration:'',
workerId:'',
workerName:'',
workerPhone:'',
supportTransferDelivery:0,
transferDeliveryDuration:'',
transferAddressId:'',
transferAddressName:''
},
choose:false,
isChoose:false,
clock: 60 ,// 倒计时
navHeight: 88,
navContentTop: 44,
navContentHeight: 32
};
},
computed:{
filteredAreaList() {
const keyword = this.areaKeyword.trim().toLowerCase()
if (!keyword) return this.addressList
return this.addressList.filter((item) => {
const source = [
item.title,
item.text,
item.name,
item.regionName,
item.areaName,
item.shortName
].filter(Boolean).join(' ').toLowerCase()
return source.indexOf(keyword) > -1
})
},
deliveryLocationText(){
let item = this.deliveryLocationList.find(item => item.value == this.formData.shopDeliveryLocation)
return item ? item.text : ''
}
},
onLoad(option) {
this.initNavMetrics()
this.initCachedRegion()
},
onShow(){
this.initNavMetrics()
this.initCachedRegion()
this.getRegionList()
this.formData.mobile = uni.getStorageSync('mobile')?uni.getStorageSync('mobile'):''
},
methods: {
initNavMetrics() {
const rect = uni.getMenuButtonBoundingClientRect ? uni.getMenuButtonBoundingClientRect() : {}
const top = rect && rect.top ? rect.top : 44
const height = rect && rect.height ? rect.height : 32
this.navContentTop = top
this.navContentHeight = height
this.navHeight = top + height + 10
},
back() {
uni.navigateBack()
},
openPicker() {
let that = this;
uni.chooseLocation({
latitude:'38.335974',
longitude:'116.805783',
success: function(res) {
if (res.name != '') {
let aaa = getArea(res.address)
that.formData.shopAddress = aaa.province + aaa.city + aaa.country + aaa.address + res.name
} else {
that.tui.toast("微信地址选择器调用失败,请重新选择!")
}
},
fail: function(res) {
}
});
},
pictureAdd(type, index) {
let that = this
let count = type == 'qita' ? 9 - this.formData.qita.length : 1
if(type == 'qita' && index !== undefined) {
count = 1
}
if(type == 'qita' && count <= 0) {
this.tui.toast('最多上传9张补充证照')
return
}
uni.chooseMedia({
count: count,
mediaType: ['image'],
sourceType: ['camera', 'album'],
success(res) {
uni.showLoading({
title: '加载中...',
mask: true
})
for (let i = 0; i < res.tempFiles.length; i++) {
that.upLoadFile(res.tempFiles[i].tempFilePath,type,index)
}
}
})
},
async upLoadFile(path,type,index) {
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
url: that.tui.interfaceUrl() + '/upload/file',
filePath: path,
name: 'file',
header: {
"content-type": "multipart/form-data",
'accessToken': hiver_token
},
formData: {},
success: (uploadFileRes) => {
let pathData = JSON.parse(uploadFileRes.data)
if(type == 'zheng'){
that.formData.zhengzhao = pathData.result
}else if(type == 'fan'){
that.formData.fanzhao = pathData.result
}else if(type == 'yingye'){
that.formData.yingyezhizhao = pathData.result
}else if(type == 'mentou'){
that.formData.shopIcon = pathData.result
}else if(index !== undefined){
that.formData.qita.splice(index, 1, pathData.result)
}else{
that.formData.qita.push(pathData.result)
}
that.$forceUpdate()
},
fail: (err) => {
uni.hideLoading();
uni.showToast({
title: JSON.stringify(err),
icon: 'none'
})
}
});
await setTimeout(res => {
uni.hideLoading();
}, 1000)
},
deleteImage(type,index) {
if(type == 'zheng'){
this.formData.zhengzhao = ''
}else if(type == 'fan'){
this.formData.fanzhao = ''
}else if(type == 'yingye'){
this.formData.yingyezhizhao = ''
}else if(type == 'mentou'){
this.formData.shopIcon = ''
}else if(index !== undefined){
this.formData.qita.splice(index, 1)
}
this.$forceUpdate()
},
// 触发提交表单
submit() {
let that = this;
let url = ''
this.normalizeSelfDelivery()
this.normalizeTransferDelivery()
let verify = this.verifyField()
if(verify != true){
uni.showToast({
title: verify + '不能为空',
icon: 'none'
})
return
}
if (that.formData.id) {
url = '/app/shop/updateShopIconAndRemark'
} else {
url = '/auth/shopRegister'
}
this.formData.unionid = uni.getStorageSync('unionid')
this.formData.shopImages = this.formData.zhengzhao + '@@' + this.formData.fanzhao + '@@' + this.formData.yingyezhizhao + '@@' + JSON.stringify(this.formData.qita)
that.tui.request(url, "post", this.formData, false, true).then((res1) => {
if (res1.code == 200) {
uni.setStorageSync('schoolShop',res1.result)
uni.showModal({
title: '提示',
content: '提交成功,请等待管理员审核',
success: function (res) {
uni.navigateBack()
}
});
} else {
uni.showToast({
title: res1.message,
icon: 'none'
})
}
})
},
clickRadio(type){
this.formData.isStudent = type
},
setSelfDelivery(type){
this.formData.supportShopDelivery = type
if(type != 1){
this.formData.orderBkge = 0
this.formData.shopDeliveryLocation = ''
this.formData.shopDeliveryDuration = ''
this.formData.workerId = ''
this.formData.workerName = ''
this.formData.workerPhone = ''
this.workerMobile = ''
}
},
setTransferDelivery(type){
this.formData.supportTransferDelivery = type
if(type != 1){
this.formData.transferDeliveryDuration = ''
this.formData.transferAddressId = ''
this.formData.transferAddressName = ''
}else if(!this.formData.regionId){
this.tui.toast('请先选择所属区域')
}else if(this.transferAddressList.length == 0){
this.getTransferAddressList(this.formData.regionId)
}
},
transferAddressChange(e){
const item = this.transferAddressList[e.detail.value]
if(item){
this.formData.transferAddressId = item.value
this.formData.transferAddressName = item.text
}
},
formatOrderBkge(){
let value = parseFloat(this.formData.orderBkge || 0)
if(isNaN(value) || value < 0) value = 0
this.formData.orderBkge = Number(value.toFixed(1))
},
deliveryLocationChange(e){
const item = this.deliveryLocationList[e.detail.value]
if(item){
this.formData.shopDeliveryLocation = item.value
}
},
findWorker(){
if(!this.workerMobile){
this.tui.toast('请输入配送员手机号')
return
}
this.tui.request('/app/shop/findWorkerByMobile', 'GET', {
mobile: this.workerMobile
}, false, true).then((res) => {
if(res.code == 200){
this.formData.workerId = res.result.workerId
this.formData.workerName = res.result.workerName
this.formData.workerPhone = res.result.workerPhone || res.result.mobile
this.tui.toast('绑定成功')
}else{
this.tui.toast(res.message)
}
})
},
normalizeSelfDelivery(){
if(this.formData.merchantType != 1 || this.formData.supportShopDelivery != 1){
this.setSelfDelivery(0)
return
}
this.formatOrderBkge()
},
normalizeTransferDelivery(){
if(this.formData.merchantType != 1 || this.formData.supportTransferDelivery != 1){
this.setTransferDelivery(0)
return
}
this.formData.transferDeliveryDuration = parseInt(this.formData.transferDeliveryDuration || 0)
},
normalizeRegionItem(item) {
item = item || {}
const regionId = item.id || item.value
const regionTitle = item.title || item.text || item.name || item.regionName || item.areaName || '未命名区域'
return Object.assign({}, item, {
id: regionId,
value: regionId,
title: regionTitle,
text: regionTitle
})
},
initCachedRegion() {
const areaStorage = uni.getStorageSync('area')
if (!areaStorage) return
try {
let area = JSON.parse(areaStorage)
this.applyRegion(this.normalizeRegionItem(area), false)
} catch (e) {}
},
applyRegion(region, clearTransfer = true) {
if (!region) return
const normalizedRegion = this.normalizeRegionItem(region)
if (!normalizedRegion.id) return
const isSameRegion = this.formData.regionId == normalizedRegion.id
this.formData.regionId = normalizedRegion.id
this.formData.region = normalizedRegion.title
this.areaPopupCanClose = true
if (!isSameRegion && clearTransfer) {
this.formData.transferAddressId = ''
this.formData.transferAddressName = ''
}
if (!isSameRegion || this.transferAddressList.length == 0) {
this.getTransferAddressList(normalizedRegion.id)
}
},
isCurrentRegion(item) {
return item && this.formData.regionId && this.formData.regionId == (item.id || item.value)
},
onClickArea(item) {
const region = this.normalizeRegionItem(item)
this.applyRegion(region)
uni.setStorageSync('area', JSON.stringify(region))
this.areaKeyword = ''
this.$refs.areaPopup.close()
this.tui.toast('切换成功')
},
checkArea() {
this.tui.request('/app/shopArea/getByParentId/0', 'get', {}, false, false, true).then((res) => {
if (res.code == 200) {
this.addressList = (Array.isArray(res.result) ? res.result : []).map(item => this.normalizeRegionItem(item))
this.areaKeyword = ''
this.areaPopupCanClose = !!this.formData.regionId
this.$refs.areaPopup.open()
} else {
this.tui.toast(res.message)
}
})
},
//获取区域
getRegionList() {
let that = this;
this.tui.request('/app/shopArea/getByParentId/0', 'get', {}, false, false, true).then((res) => {
if (res.code !== 200) return
that.addressList = (Array.isArray(res.result) ? res.result : []).map(item => that.normalizeRegionItem(item))
if (!that.formData.regionId) that.initCachedRegion()
})
},
regionChange(e){
const index = e.detail.value
const region = this.addressList[index]
if (region) {
this.applyRegion(region)
}
},
getTransferAddressList(regionId) {
if (!regionId) {
this.transferAddressList = []
return
}
this.tui.request('/app/shopArea/getByParentId/' + regionId, 'GET', {}, false, false, true).then((res) => {
if (res.code !== 200) return
this.transferAddressList = (Array.isArray(res.result) ? res.result : []).map(item => {
return {
value: item.id,
text: item.title || item.name || item.regionName || item.areaName || '未命名地址'
}
})
})
},
sendLoginSms(){ // 获取验证码
if (this.choose) return
this.isChoose = false
if(reg(this.formData.mobile,this.clock) && this.isChoose == false){
this.choose = true
this.setTime()
this.tui.request("/common/captcha/sendRegistSms/"+this.formData.mobile, "GET", {
}).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "发送成功",
icon: 'success'
})
}else{
this.tui.toast(res.message)
}
}).catch((res) => {
this.tui.toast(res)
})
}else if(reg(this.formData.mobile,this.clock) && this.isChoose == true){
}
},
setTime(){// 倒计时函数
if(this.clock == 0){
this.clock = 60
this.choose = false
return
}else{
this.clock--
if(this.clock < 10){this.clock = '0'+this.clock}
}
setTimeout(() => { this.setTime() },1000)
},
verifyField(){
let msg = ''
let data = this.formData
if(data.shopAddress == ''){
msg = '地址'
}else if(data.shopName == ''){
msg = '店铺名'
}else if(data.aliAccount == ''){
msg = '支付宝账号'
}else if(data.aliName == ''){
msg = '收款人姓名'
}else if(data.nickname == ''){
msg = '联系人'
}else if(data.mobile == ''){
msg = '联系电话'
}else if(data.code == ''){
msg = '验证码'
}else if(data.zhengzhao == ''){
msg = '法人身份证正面'
}else if(data.yingyezhizhao == ''){
msg = '营业执照'
}else if(data.fanzhao == ''){
msg = '法人身份证反面'
}else if(data.shopLename == ''){
msg = '法人姓名'
}else if(data.shopLecard == ''){
msg = '法人身份证'
}else if(data.merchantType == 1 && data.supportShopDelivery == 1 && !data.shopDeliveryLocation){
msg = '送达位置'
}else if(data.merchantType == 1 && data.supportShopDelivery == 1 && !data.shopDeliveryDuration){
msg = '配送时长'
}else if(data.merchantType == 1 && data.supportShopDelivery == 1 && !data.workerId){
msg = '自配送配送员'
}else if(data.merchantType == 1 && data.supportTransferDelivery == 1 && !data.transferDeliveryDuration){
msg = '中转配送时长'
}else if(data.merchantType == 1 && data.supportTransferDelivery == 1 && !data.transferAddressId){
msg = '中转地点'
}
return msg == ""?true:msg
}
}
}
</script>
<style>
page,
.page1 {
width: 100%;
min-height: 100%;
font-size: 24rpx;
color: #12342d;
background:
radial-gradient(circle at 92% 120rpx, rgba(166, 255, 234, 0.45) 0, rgba(166, 255, 234, 0) 240rpx),
linear-gradient(180deg, #f3fff6 0%, #f5f8f5 36%, #eef4f1 100%);
overflow: scroll;
}
.fixed-head {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
background: rgba(255, 255, 255, 0.92);
backdrop-filter: blur(18rpx);
box-shadow: 0 8rpx 26rpx rgba(0, 35, 28, 0.06);
}
.nav {
position: relative;
width: 100%;
}
.back-btn {
position: absolute;
left: 24rpx;
text-align: center;
border-radius: 999rpx;
background: rgba(246, 250, 248, 0.9);
box-shadow: 0 6rpx 18rpx rgba(0, 35, 28, 0.08);
}
.nav-title {
position: absolute;
left: 160rpx;
right: 160rpx;
text-align: center;
font-size: 32rpx;
font-weight: 800;
color: #102f28;
}
.nav-holder {
width: 100%;
}
.register-hero {
position: relative;
width: 100%;
height: 300rpx;
padding: 68rpx 42rpx 0;
box-sizing: border-box;
overflow: hidden;
background:
linear-gradient(135deg, rgba(227, 255, 150, 0.95) 0%, rgba(166, 255, 234, 0.86) 58%, rgba(255, 255, 255, 0.72) 100%),
url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') center/cover no-repeat;
}
.register-hero::after {
content: "";
position: absolute;
right: -34rpx;
top: -44rpx;
width: 290rpx;
height: 290rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.32);
}
.hero-title {
position: relative;
z-index: 1;
font-size: 46rpx;
line-height: 64rpx;
font-weight: 900;
letter-spacing: 2rpx;
color: #07362d;
}
.hero-subtitle {
position: relative;
z-index: 1;
margin-top: 12rpx;
font-size: 26rpx;
font-weight: 600;
color: rgba(0, 35, 28, 0.62);
}
.form-wrap {
position: relative;
z-index: 2;
width: 92%;
margin: -64rpx auto 0;
padding-bottom: 40rpx;
}
.content {
width: 100%;
height: auto;
margin-bottom: 24rpx;
overflow: hidden;
border: 1rpx solid rgba(255, 255, 255, 0.86);
border-radius: 28rpx;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 16rpx 36rpx rgba(0, 35, 28, 0.08);
}
.section-title {
height: 92rpx;
line-height: 92rpx;
padding: 0 28rpx;
border-bottom: 1rpx solid #edf3f0;
font-size: 30rpx;
font-weight: 900;
color: #102f28;
}
.value {
width: 100%;
min-height: 96rpx;
display: flex;
align-items: center;
line-height: 96rpx;
border-top: 1rpx solid #edf3f0;
padding: 0 28rpx;
box-sizing: border-box;
}
.value:first-child {
border-top: none;
}
.name {
width: 200rpx;
font-size: 28rpx;
font-weight: 800;
color: #153c34;
}
.text {
flex: 1;
min-width: 0;
color: #263f39;
font-size: 28rpx;
}
.text input {
height: 96rpx;
line-height: 96rpx;
text-align: right;
font-size: 28rpx;
color: #263f39;
}
.text textarea {
width: 100%;
height: 120rpx;
line-height: 42rpx;
padding-top: 20rpx;
text-align: right;
font-size: 28rpx;
color: #263f39;
}
.picker-text {
min-height: 96rpx;
line-height: 96rpx;
font-size: 28rpx;
color: #263f39;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.picker-text.placeholder {
color: #9aa7a3;
}
.home-popup-layer {
z-index: 1200 !important;
}
.campus-field {
display: flex;
align-items: center;
justify-content: flex-end;
line-height: normal;
}
.campus-switch {
position: relative;
z-index: 1;
height: 56rpx;
max-width: 100%;
padding: 0 16rpx 0 22rpx;
box-sizing: border-box;
display: inline-flex;
align-items: center;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.76);
border: 1rpx solid rgba(255, 255, 255, 0.88);
box-shadow: 0 8rpx 22rpx rgba(18, 52, 46, 0.09);
backdrop-filter: saturate(160%) blur(14rpx);
}
.campus-switch--form::after {
content: '';
position: absolute;
left: 18rpx;
right: 18rpx;
bottom: 8rpx;
height: 10rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, rgba(44, 232, 158, 0), rgba(44, 232, 158, 0.46), rgba(44, 232, 158, 0));
box-shadow: 0 0 16rpx rgba(44, 232, 158, 0.36);
}
.campus-switch-name {
position: relative;
z-index: 1;
max-width: 300rpx;
color: #004638;
font-size: 28rpx;
font-weight: 900;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-shadow: 0 0 10rpx rgba(31, 214, 151, 0.26);
}
.campus-switch.placeholder .campus-switch-name {
color: #9aa7a3;
text-shadow: none;
}
.campus-switch-action {
position: relative;
z-index: 1;
flex-shrink: 0;
margin-left: 14rpx;
color: rgba(7, 61, 51, 0.54);
font-size: 22rpx;
font-weight: 800;
}
.campus-area-popup {
position: relative;
box-sizing: border-box;
width: 650rpx;
min-height: 620rpx;
max-height: 78vh;
overflow: hidden;
padding: 38rpx 30rpx 30rpx;
border: 1rpx solid rgba(255, 255, 255, 0.78);
border-radius: 42rpx;
background:
radial-gradient(circle at 16% 8%, rgba(227, 255, 150, 0.34), rgba(227, 255, 150, 0) 220rpx),
radial-gradient(circle at 92% 18%, rgba(166, 255, 234, 0.44), rgba(166, 255, 234, 0) 260rpx),
rgba(255, 255, 255, 0.92);
box-shadow: 0 30rpx 86rpx rgba(7, 61, 51, 0.18);
backdrop-filter: blur(24rpx);
}
.area-popup-glow {
position: absolute;
border-radius: 999rpx;
pointer-events: none;
}
.area-popup-glow-a {
top: -82rpx;
right: -68rpx;
width: 230rpx;
height: 230rpx;
background: rgba(166, 255, 234, 0.46);
filter: blur(10rpx);
}
.area-popup-glow-b {
left: -56rpx;
bottom: 82rpx;
width: 180rpx;
height: 180rpx;
background: rgba(227, 255, 150, 0.34);
filter: blur(14rpx);
}
.campus-area-header {
position: relative;
z-index: 1;
text-align: center;
}
.campus-area-kicker {
display: inline-flex;
align-items: center;
justify-content: center;
height: 44rpx;
padding: 0 22rpx;
border: 1rpx solid rgba(255, 255, 255, 0.82);
border-radius: 999rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 0.72), rgba(166, 255, 234, 0.72));
box-shadow: 0 10rpx 26rpx rgba(13, 114, 82, 0.1);
color: #073d33;
font-size: 22rpx;
font-weight: 700;
}
.campus-area-title {
margin-top: 22rpx;
color: #073d33;
font-size: 38rpx;
font-weight: 900;
line-height: 1.25;
}
.campus-area-subtitle {
width: 500rpx;
margin: 12rpx auto 0;
color: rgba(7, 61, 51, 0.52);
font-size: 23rpx;
line-height: 1.5;
}
.campus-area-search {
position: relative;
z-index: 1;
display: flex;
align-items: center;
height: 82rpx;
margin-top: 30rpx;
padding: 0 26rpx;
border: 1rpx solid rgba(7, 61, 51, 0.06);
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.72);
box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.92), 0 14rpx 34rpx rgba(7, 61, 51, 0.08);
}
.area-search-icon {
margin-right: 14rpx;
color: rgba(7, 61, 51, 0.5);
font-size: 34rpx;
font-weight: 700;
}
.campus-area-search input {
flex: 1;
height: 82rpx;
color: #073d33;
font-size: 27rpx;
text-align: left;
}
.area-search-placeholder {
color: rgba(7, 61, 51, 0.34);
}
.campus-area-list {
position: relative;
z-index: 1;
height: 360rpx;
max-height: 610rpx;
margin-top: 24rpx;
}
.campus-area-item {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 92rpx;
margin-bottom: 16rpx;
padding: 0 18rpx 0 24rpx;
border: 1rpx solid rgba(255, 255, 255, 0.78);
border-radius: 28rpx;
background: rgba(255, 255, 255, 0.66);
box-shadow: 0 12rpx 30rpx rgba(7, 61, 51, 0.07);
color: #073d33;
}
.campus-area-item.active {
border-color: rgba(166, 255, 234, 0.9);
background: linear-gradient(135deg, rgba(227, 255, 150, 0.58), rgba(166, 255, 234, 0.48));
}
.campus-area-item:active {
transform: scale(0.985);
opacity: 0.9;
}
.area-item-main {
display: flex;
align-items: center;
min-width: 0;
font-size: 28rpx;
font-weight: 800;
}
.area-item-main text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.area-item-dot {
flex-shrink: 0;
width: 16rpx;
height: 16rpx;
margin-right: 16rpx;
border-radius: 50%;
background: linear-gradient(135deg, #e3ff96, #a6ffea);
box-shadow: 0 0 18rpx rgba(13, 114, 82, 0.22);
}
.area-item-action {
flex-shrink: 0;
height: 50rpx;
margin-left: 18rpx;
padding: 0 22rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 0.95), rgba(166, 255, 234, 0.95));
box-shadow: 0 10rpx 24rpx rgba(13, 114, 82, 0.14), 0 0 22rpx rgba(166, 255, 234, 0.42);
color: #073d33;
font-size: 22rpx;
font-weight: 900;
line-height: 50rpx;
}
.campus-area-item.active .area-item-action {
background: #073d33;
color: #a6ffea;
}
.campus-area-empty {
padding: 70rpx 0 56rpx;
text-align: center;
}
.area-empty-title {
color: #073d33;
font-size: 28rpx;
font-weight: 800;
}
.area-empty-desc {
margin-top: 12rpx;
color: rgba(7, 61, 51, 0.45);
font-size: 23rpx;
}
.code-row,
.worker-query {
display: flex;
align-items: center;
justify-content: flex-end;
}
.code-row {
width: 380rpx;
}
.worker-query input,
.code-row input {
flex: 1;
min-width: 0;
}
.code-row input {
height: 96rpx;
line-height: 96rpx;
text-align: center;
}
.query-btn {
height: 58rpx;
line-height: 58rpx;
margin-left: 16rpx;
padding: 0 24rpx;
border-radius: 999rpx;
background: #0b9b73;
color: #fff;
font-size: 24rpx;
font-weight: 800;
box-shadow: 0 8rpx 16rpx rgba(11, 155, 115, 0.18);
}
.upload-img {
width: 180rpx;
height: 180rpx;
border-radius: 24rpx;
background: #f6faf8 !important;
border: 1rpx dashed rgba(11, 155, 115, 0.26);
box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.8);
object-fit: cover;
line-height: 180rpx;
text-align: center;
}
.image-row {
height: 220rpx;
align-items: center;
}
.image-name {
width: 240rpx;
flex: 0 0 240rpx;
line-height: 42rpx;
white-space: nowrap;
}
.single-upload {
flex: 0 0 180rpx;
display: flex;
justify-content: flex-end;
}
.image-card {
position: relative;
width: 180rpx;
height: 180rpx;
flex: 0 0 auto;
}
.delete-img {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 42rpx;
height: 42rpx;
line-height: 38rpx;
text-align: center;
border: 4rpx solid #fff;
border-radius: 50%;
background: #ff5b5b;
color: #fff;
font-size: 28rpx;
font-weight: 900;
box-sizing: border-box;
box-shadow: 0 6rpx 14rpx rgba(255, 91, 91, 0.3);
}
.id-card-upload {
flex: 0 0 340rpx;
display: flex;
justify-content: flex-end;
}
.id-card-upload .image-card {
width: 160rpx;
height: 160rpx;
}
.id-card-upload .image-card + .image-card {
margin-left: 20rpx;
}
.id-card-upload .upload-img {
width: 160rpx;
height: 160rpx;
line-height: 160rpx !important;
}
.supplement-upload {
min-width: 0;
}
.supplement-scroll {
width: 100%;
white-space: nowrap;
}
.supplement-list {
display: inline-flex;
align-items: center;
padding: 10rpx 0;
}
.supplement-card {
margin-left: 20rpx;
}
.supplement-card:first-child {
margin-left: 0;
}
button {
width: 100%;
height: 96rpx;
line-height: 96rpx;
margin: 44rpx auto 12rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, #e3ff96 0%, #a6ffea 100%);
color: #00231c;
font-size: 34rpx;
font-weight: 900;
box-shadow: 0 18rpx 36rpx rgba(0, 35, 28, 0.14);
}
button::after {
border: none;
}
.hasChosen {
color: #a6ffea;
border: none;
background: #00231c;
}
.code-btn {
flex: 0 0 150rpx;
width: 150rpx;
height: 54rpx;
line-height: 54rpx;
border-radius: 999rpx;
background: #00231c;
color: #a6ffea;
font-size: 20rpx;
font-weight: 800;
text-align: center;
white-space: nowrap;
}
.radio {
color: #263f39;
font-size: 26rpx;
font-weight: 700;
}
.uni-select {
border: none !important;
padding: 0 !important;
background: transparent !important;
}
.uni-stat__select {
height: 100% !important;
}
.uni-data-select {
text-align: right;
}
.uni-data-select .uni-select {
justify-content: flex-end;
}
.uni-data-select .uni-select__input-text {
text-align: right;
color: #263f39;
font-size: 28rpx;
}
</style>