|
|
@ -1,40 +1,54 @@ |
|
|
<template> |
|
|
<template> |
|
|
<!-- 商家入驻 --> |
|
|
<!-- 商家入驻 --> |
|
|
<view class="page1"> |
|
|
<view class="page1"> |
|
|
<view class="content" style="border-top: 1px solid #eee;"> |
|
|
<view class="register-hero"> |
|
|
<view class="value"> |
|
|
<view class="hero-title">商家入驻</view> |
|
|
<view class="name"> |
|
|
<view class="hero-subtitle">完善资料后提交审核,开启校园经营</view> |
|
|
店铺名称 |
|
|
</view> |
|
|
</view> |
|
|
<view class="form-wrap"> |
|
|
<view class="text"> |
|
|
<view class="content"> |
|
|
<input type="text" v-model="formData.shopName" placeholder="输入店铺名称" /> |
|
|
<view class="value"> |
|
|
</view> |
|
|
<view class="name"> |
|
|
</view> |
|
|
店铺名称 |
|
|
<view class="value"> |
|
|
</view> |
|
|
<view class="name"> |
|
|
<view class="text"> |
|
|
学生商家 |
|
|
<input type="text" v-model="formData.shopName" placeholder="输入店铺名称" /> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="text" style="text-align: right;"> |
|
|
<view class="value"> |
|
|
<label class="radio" style="padding-right: 20rpx;" @tap="clickRadio(1)"> |
|
|
<view class="name"> |
|
|
<radio :checked="formData.isStudent == 1" /><text>是</text> |
|
|
商家类型 |
|
|
</label> |
|
|
</view> |
|
|
<label class="radio" @tap="clickRadio(0)"> |
|
|
<view class="text"> |
|
|
<radio :checked="formData.isStudent == 0" /><text>否</text> |
|
|
<uni-data-select class="uni-data-select" :localdata="merchantTypeList" v-model="formData.merchantType" |
|
|
</label> |
|
|
:clear="false" placeholder="请选择商家类型"></uni-data-select> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"> |
|
|
<view class="value" style="height: 200rpx;"> |
|
|
<view class="name"> |
|
|
<view class="name" style="flex: 1;line-height: 200rpx;"> |
|
|
学生商家 |
|
|
门头图 |
|
|
</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> |
|
|
<view class="text" style="width: 180rpx;padding-top: 10rpx;" @tap="pictureAdd('mentou')"> |
|
|
<view class="value" style="height: 200rpx;"> |
|
|
<view class="upload-img" v-if="formData.shopIcon ==''" style="background: rgba(247, 248, 248, 0.6);text-align: center;line-height: 180rpx;"> |
|
|
<view class="name" style="flex: 1;line-height: 200rpx;"> |
|
|
<uni-icons type="camera" size="28" color="#777"></uni-icons> |
|
|
门头图 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="text" style="width: 180rpx;padding-top: 10rpx;" @tap="pictureAdd('mentou')"> |
|
|
|
|
|
<view class="upload-img" v-if="formData.shopIcon ==''" style="background: rgba(247, 248, 248, 0.6);text-align: center;line-height: 180rpx;"> |
|
|
|
|
|
<uni-icons type="camera" size="28" color="#777"></uni-icons> |
|
|
|
|
|
</view> |
|
|
|
|
|
<img :src="formData.shopIcon" v-if="formData.shopIcon !=''" alt="" class="upload-img"> |
|
|
</view> |
|
|
</view> |
|
|
<img :src="formData.shopIcon" v-if="formData.shopIcon !=''" alt="" class="upload-img"> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<view class="name"> |
|
|
<view class="name"> |
|
|
@ -58,8 +72,12 @@ |
|
|
所属区域 |
|
|
所属区域 |
|
|
</view> |
|
|
</view> |
|
|
<view class="text" style="text-align: right;"> |
|
|
<view class="text" style="text-align: right;"> |
|
|
<uni-data-select class="uni-data-select" :localdata="addressList" v-model="formData.regionId" |
|
|
<picker :range="addressList" range-key="text" @change="regionChange"> |
|
|
placeholder="请选择所属区域" @change="regionChange"></uni-data-select> |
|
|
<view class="picker-text" :class="{ placeholder: !formData.region }"> |
|
|
|
|
|
{{ formData.region || '请选择所属区域' }} |
|
|
|
|
|
<uni-icons type="bottom" size="14" color="#999"></uni-icons> |
|
|
|
|
|
</view> |
|
|
|
|
|
</picker> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -84,9 +102,9 @@ |
|
|
<view class="name" style="flex: 1;"> |
|
|
<view class="name" style="flex: 1;"> |
|
|
验证码 |
|
|
验证码 |
|
|
</view> |
|
|
</view> |
|
|
<view class="text" style="display: flex;width: 340rpx;"> |
|
|
<view class="text code-row"> |
|
|
<input type="number" v-model="formData.code" placeholder="请输入验证码" style="width: 200rpx;text-align: center;" /> |
|
|
<input type="number" v-model="formData.code" placeholder="请输入验证码" /> |
|
|
<view class="code-btn" style="font-size: 24rpx;" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'"> |
|
|
<view class="code-btn" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'"> |
|
|
{{ choose ? clock + '重新获取' : '获取验证码' }} |
|
|
{{ choose ? clock + '重新获取' : '获取验证码' }} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -177,6 +195,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<button @tap.stop="submit()">保存</button> |
|
|
<button @tap.stop="submit()">保存</button> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<common-loading /> |
|
|
<common-loading /> |
|
|
</view> |
|
|
</view> |
|
|
@ -191,6 +210,13 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
addressList:[], |
|
|
addressList:[], |
|
|
|
|
|
merchantTypeList: [{ |
|
|
|
|
|
value: 1, |
|
|
|
|
|
text: '外卖商家' |
|
|
|
|
|
}, { |
|
|
|
|
|
value: 2, |
|
|
|
|
|
text: '团购商家' |
|
|
|
|
|
}], |
|
|
formData: { |
|
|
formData: { |
|
|
regionId:'', |
|
|
regionId:'', |
|
|
region:'', |
|
|
region:'', |
|
|
@ -211,6 +237,7 @@ |
|
|
qita:[], |
|
|
qita:[], |
|
|
shopImages:'', |
|
|
shopImages:'', |
|
|
id:'', |
|
|
id:'', |
|
|
|
|
|
merchantType:1, //1外卖商家 2团购商家 |
|
|
isStudent:0, //1学生商家 0不是学生 |
|
|
isStudent:0, //1学生商家 0不是学生 |
|
|
unionid:'' |
|
|
unionid:'' |
|
|
}, |
|
|
}, |
|
|
@ -350,25 +377,25 @@ |
|
|
let that = this; |
|
|
let that = this; |
|
|
this.tui.request('/app/shopArea/getByParentId/0', 'get', {}, false, false, true).then((res) => { |
|
|
this.tui.request('/app/shopArea/getByParentId/0', 'get', {}, false, false, true).then((res) => { |
|
|
if (res.code !== 200) return |
|
|
if (res.code !== 200) return |
|
|
that.addressList = res.result.map(item => { |
|
|
that.addressList = (Array.isArray(res.result) ? res.result : []).map(item => { |
|
|
return { |
|
|
return { |
|
|
value: item.id, |
|
|
value: item.id, |
|
|
text: item.title |
|
|
text: item.title || item.name || item.regionName || item.areaName || '未命名区域' |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
console.log(that.addressList) |
|
|
console.log(that.addressList) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
regionChange(e){ |
|
|
regionChange(e){ |
|
|
for (let i = 0; i < this.addressList.length; i++) { |
|
|
const index = e.detail.value |
|
|
if (this.addressList[i].value == e) { |
|
|
const region = this.addressList[index] |
|
|
this.formData.regionId = e; |
|
|
if (region) { |
|
|
this.formData.region = this.addressList[i].text |
|
|
this.formData.regionId = region.value; |
|
|
} |
|
|
this.formData.region = region.text |
|
|
} |
|
|
} |
|
|
console.log(this.region) |
|
|
|
|
|
}, |
|
|
}, |
|
|
sendLoginSms(){ // 获取验证码 |
|
|
sendLoginSms(){ // 获取验证码 |
|
|
|
|
|
if (this.choose) return |
|
|
this.isChoose = false |
|
|
this.isChoose = false |
|
|
if(reg(this.formData.mobile,this.clock) && this.isChoose == false){ |
|
|
if(reg(this.formData.mobile,this.clock) && this.isChoose == false){ |
|
|
this.choose = true |
|
|
this.choose = true |
|
|
@ -441,43 +468,108 @@ |
|
|
page,.page1{ |
|
|
page,.page1{ |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
min-height: 100%; |
|
|
background: rgba(247, 248, 248, 0.6); |
|
|
background: #F5F8F5; |
|
|
|
|
|
color: #00231C; |
|
|
overflow: scroll; |
|
|
overflow: scroll; |
|
|
} |
|
|
} |
|
|
|
|
|
.register-hero{ |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 280rpx; |
|
|
|
|
|
padding: 88rpx 34rpx 0; |
|
|
|
|
|
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; |
|
|
|
|
|
background-size: cover; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
} |
|
|
|
|
|
.hero-title{ |
|
|
|
|
|
font-size: 44rpx; |
|
|
|
|
|
line-height: 64rpx; |
|
|
|
|
|
font-weight: 700; |
|
|
|
|
|
} |
|
|
|
|
|
.hero-subtitle{ |
|
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
font-size: 26rpx; |
|
|
|
|
|
color: rgba(0, 35, 28, 0.68); |
|
|
|
|
|
} |
|
|
|
|
|
.form-wrap{ |
|
|
|
|
|
width: 94%; |
|
|
|
|
|
margin: -42rpx auto 0; |
|
|
|
|
|
padding-bottom: 24rpx; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
z-index: 2; |
|
|
|
|
|
} |
|
|
.content{ |
|
|
.content{ |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: auto; |
|
|
height: auto; |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
margin-bottom: 20rpx; |
|
|
margin-bottom: 22rpx; |
|
|
|
|
|
border-radius: 18rpx; |
|
|
|
|
|
box-shadow: 0 8rpx 24rpx rgba(0, 35, 28, 0.06); |
|
|
|
|
|
overflow: hidden; |
|
|
} |
|
|
} |
|
|
.value{ |
|
|
.value{ |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 80rpx; |
|
|
min-height: 92rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
line-height: 80rpx; |
|
|
align-items: center; |
|
|
border-top: 1px solid #eee; |
|
|
line-height: 92rpx; |
|
|
padding: 0 20rpx; |
|
|
border-top: 1px solid #eef2ef; |
|
|
|
|
|
padding: 0 24rpx; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
} |
|
|
|
|
|
.value:first-child{ |
|
|
|
|
|
border-top: none; |
|
|
} |
|
|
} |
|
|
.name{ |
|
|
.name{ |
|
|
width: 20%; |
|
|
width: 180rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
color: #00231C; |
|
|
} |
|
|
} |
|
|
.text{ |
|
|
.text{ |
|
|
width: 80%; |
|
|
flex: 1; |
|
|
|
|
|
min-width: 0; |
|
|
} |
|
|
} |
|
|
.text input{ |
|
|
.text input{ |
|
|
height: 80rpx; |
|
|
height: 92rpx; |
|
|
line-height: 80rpx; |
|
|
line-height: 92rpx; |
|
|
text-align: right; |
|
|
text-align: right; |
|
|
|
|
|
font-size: 28rpx; |
|
|
} |
|
|
} |
|
|
.text textarea{ |
|
|
.text textarea{ |
|
|
|
|
|
width: 100%; |
|
|
height: 120rpx; |
|
|
height: 120rpx; |
|
|
line-height: 40rpx; |
|
|
line-height: 40rpx; |
|
|
padding-top:20rpx; |
|
|
padding-top:20rpx; |
|
|
|
|
|
text-align: right; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.picker-text{ |
|
|
|
|
|
min-height: 92rpx; |
|
|
|
|
|
line-height: 92rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
|
|
|
.picker-text.placeholder{ |
|
|
|
|
|
color: #6a6a6a; |
|
|
|
|
|
} |
|
|
|
|
|
.code-row{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
width: 360rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.code-row input{ |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
min-width: 0; |
|
|
|
|
|
height: 92rpx; |
|
|
|
|
|
line-height: 92rpx; |
|
|
|
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
.upload-img { |
|
|
.upload-img { |
|
|
width: 180rpx; |
|
|
width: 180rpx; |
|
|
height: 180rpx; |
|
|
height: 180rpx; |
|
|
|
|
|
border-radius: 16rpx; |
|
|
} |
|
|
} |
|
|
.red-dot{ |
|
|
.red-dot{ |
|
|
width: 40rpx; |
|
|
width: 40rpx; |
|
|
@ -496,28 +588,29 @@ |
|
|
height: 90rpx; |
|
|
height: 90rpx; |
|
|
line-height: 90rpx; |
|
|
line-height: 90rpx; |
|
|
font-size: 36rpx; |
|
|
font-size: 36rpx; |
|
|
color: #fff; |
|
|
color: #00231C; |
|
|
background: #5fd9ee; |
|
|
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); |
|
|
border-radius: 20rpx; |
|
|
border-radius: 20rpx; |
|
|
margin: 40rpx auto; |
|
|
margin: 40rpx auto; |
|
|
|
|
|
font-weight: 700; |
|
|
|
|
|
box-shadow: 0 10rpx 24rpx rgba(0, 35, 28, 0.12); |
|
|
} |
|
|
} |
|
|
.hasChosen{ |
|
|
.hasChosen{ |
|
|
height: 74rpx; |
|
|
color: #A6FFEA; |
|
|
line-height: 74rpx; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
border: none; |
|
|
border: none; |
|
|
background: #5fd9ee; |
|
|
background: #00231C; |
|
|
} |
|
|
} |
|
|
.code-btn{ |
|
|
.code-btn{ |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
background: #00BFFF; |
|
|
background: #00231C; |
|
|
color: #fff; |
|
|
color: #A6FFEA; |
|
|
height: 60rpx; |
|
|
height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
border-radius: 20rpx; |
|
|
border-radius: 20rpx; |
|
|
padding: 0 10rpx; |
|
|
flex: 0 0 170rpx; |
|
|
margin-top: 10rpx; |
|
|
width: 170rpx; |
|
|
width: 140rpx; |
|
|
text-align: center; |
|
|
|
|
|
white-space: nowrap; |
|
|
} |
|
|
} |
|
|
.uni-select{ |
|
|
.uni-select{ |
|
|
border: none !important; |
|
|
border: none !important; |
|
|
@ -526,4 +619,13 @@ |
|
|
.uni-stat__select { |
|
|
.uni-stat__select { |
|
|
height: 100% !important; |
|
|
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; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |