|
@@ -15,7 +15,7 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">邮箱:</view>
|
|
<view class="label">邮箱:</view>
|
|
- <input class="row-input" type="text" v-model="registerEmail" @blur="registerEmailInput" placeholder="请输入您的常用邮箱" maxlength="30"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -23,8 +23,8 @@
|
|
<view class="label">邮箱验证码:</view>
|
|
<view class="label">邮箱验证码:</view>
|
|
<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="4"/>
|
|
<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="4"/>
|
|
</view>
|
|
</view>
|
|
- <view class="register-from btn" :class="[isEmialDisabled === true ? 'disabled' : 'none']">
|
|
|
|
- <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isEmialDisabled">{{codeText}}</button>
|
|
|
|
|
|
+ <view class="register-from btn" :class="[isEmialDisabled ? 'disabled' : '']" @click.stop="getEmailCodeFn">
|
|
|
|
+ <button class="row-input" type="button" :disabled="isEmialDisabled">{{ emailCodeText }}</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -65,13 +65,13 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from imgcode">
|
|
<view class="register-from imgcode">
|
|
<view class="label">图形验证码:</view>
|
|
<view class="label">图形验证码:</view>
|
|
- <input class="row-input" type="text" v-model="imageCode" @blur="checkImgCode" placeholder="请输入图形验证码" maxlength="6"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="imageCode" placeholder="请输入图形验证码" maxlength="6"/>
|
|
</view>
|
|
</view>
|
|
<view class="register-from img-btn">
|
|
<view class="register-from img-btn">
|
|
<view class="vscodeimg">
|
|
<view class="vscodeimg">
|
|
- <image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2158189919,2752757953&fm=26&gp=0.jpg" mode=""></image>
|
|
|
|
|
|
+ <image :src="imageCodeUrl" mode=""></image>
|
|
</view>
|
|
</view>
|
|
- <view class="vscod-refresh">
|
|
|
|
|
|
+ <view class="vscod-refresh" @click.stop="refreshVscode">
|
|
<text class="iconfont icon-shuaxin"></text>
|
|
<text class="iconfont icon-shuaxin"></text>
|
|
<text class="ref-text">刷新</text>
|
|
<text class="ref-text">刷新</text>
|
|
</view>
|
|
</view>
|
|
@@ -82,8 +82,8 @@
|
|
<view class="label">短信验证码:</view>
|
|
<view class="label">短信验证码:</view>
|
|
<input class="row-input" type="text" v-model="mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
|
|
<input class="row-input" type="text" v-model="mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
|
|
</view>
|
|
</view>
|
|
- <view class="register-from btn" :class="[isMobileDisabled === true ? 'disabled' : 'none']">
|
|
|
|
- <button class="row-input" type="button" @click.stop="getMobileCode" :disabled="isMobileDisabled">获取验证码</button>
|
|
|
|
|
|
+ <view class="register-from btn" :class="[isMobileDisabled ? 'disabled' : '']" @click.stop="getMobileCodeFn">
|
|
|
|
+ <button class="row-input" type="button" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -98,7 +98,7 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">机构简称:</view>
|
|
<view class="label">机构简称:</view>
|
|
- <input class="row-input" type="text" v-model="clubContact" placeholder="请输入您的机构简称" maxlength="16"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="16"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -126,7 +126,7 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">营业执照编号:</view>
|
|
<view class="label">营业执照编号:</view>
|
|
- <input class="row-input" type="text" v-model="clubContact" placeholder="请填写社会统一信用代码" maxlength="16"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="16"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -179,7 +179,7 @@
|
|
<view class="register-row clearfix" v-show="isDepartment">
|
|
<view class="register-row clearfix" v-show="isDepartment">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">科室:</view>
|
|
<view class="label">科室:</view>
|
|
- <input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
|
|
|
|
|
|
+ <input class="row-input keshi" type="text" v-model="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix" v-if="isOrganizationType == 1">
|
|
<view class="register-row clearfix" v-if="isOrganizationType == 1">
|
|
@@ -215,7 +215,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="register-from group btn" v-show="isShowAustomItem">
|
|
<view class="register-from group btn" v-show="isShowAustomItem">
|
|
<view class="content-class btn">
|
|
<view class="content-class btn">
|
|
- <input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
|
|
|
|
|
|
+ <input class="row-input none" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
|
|
<button type="default"
|
|
<button type="default"
|
|
class="confirm-btn"
|
|
class="confirm-btn"
|
|
:class="[isDisabled === true ? 'disabled' : 'none']"
|
|
:class="[isDisabled === true ? 'disabled' : 'none']"
|
|
@@ -244,7 +244,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="register-from group btn" v-show="isShowAustomItem">
|
|
<view class="register-from group btn" v-show="isShowAustomItem">
|
|
<view class="content-class btn">
|
|
<view class="content-class btn">
|
|
- <input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
|
|
|
|
|
|
+ <input class="row-input none" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
|
|
<button type="default"
|
|
<button type="default"
|
|
class="confirm-btn"
|
|
class="confirm-btn"
|
|
:class="[isDisabled === true ? 'disabled' : 'none']"
|
|
:class="[isDisabled === true ? 'disabled' : 'none']"
|
|
@@ -286,15 +286,8 @@
|
|
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
|
|
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
|
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
|
import authorize from '@/common/config/authorize.js'
|
|
import authorize from '@/common/config/authorize.js'
|
|
- import URLCONFIG from '@/common/config/config.js'
|
|
|
|
- import { organizationRegister } from "@/api/use.js"
|
|
|
|
- import {
|
|
|
|
- queryEmailCode,
|
|
|
|
- queryMobileCode,
|
|
|
|
- ueryVerificationCode,
|
|
|
|
- checkVerificationCode,
|
|
|
|
- queryVerificationCode
|
|
|
|
- } from "@/api/utils.js"
|
|
|
|
|
|
+ import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
|
|
|
|
+ import { getImageCode, getEmailCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
|
|
var self;
|
|
var self;
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
@@ -303,27 +296,38 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return{
|
|
return{
|
|
- registerEmail:'', //注册邮箱
|
|
|
|
- regEmailCode:'', //邮箱验证码
|
|
|
|
- isEmialDisabled: true, //验证码按钮控制
|
|
|
|
- isMobileDisabled: true, //手机验证码按钮控制
|
|
|
|
|
|
+ tabCurrentIndex:1,
|
|
|
|
+ isPreviewImage:false, //预览图片开关
|
|
|
|
+ isEmialDisabled: false, //验证码按钮控制
|
|
|
|
+ isMobileDisabled: false, //手机验证码按钮控制
|
|
count: '', //倒计时
|
|
count: '', //倒计时
|
|
- codeText: '获取验证码',
|
|
|
|
|
|
+ emailCodeText: '获取验证码',
|
|
|
|
+ mobileCodeText: '获取验证码',
|
|
codeTime: null,
|
|
codeTime: null,
|
|
|
|
+ registerEmail:'', //注册邮箱
|
|
|
|
+ regEmailCode:'', //邮箱验证码
|
|
password:'', //密码
|
|
password:'', //密码
|
|
passwordCheck:'', //校验密码
|
|
passwordCheck:'', //校验密码
|
|
clubName:'', //机构名称
|
|
clubName:'', //机构名称
|
|
|
|
+ abbreviation:'', //机构简称
|
|
clubContact:'', //联系人
|
|
clubContact:'', //联系人
|
|
registerMobile:'', //联系人手机号
|
|
registerMobile:'', //联系人手机号
|
|
mobileCode:'', //手机验证码
|
|
mobileCode:'', //手机验证码
|
|
imageCode:'', //图形验证码
|
|
imageCode:'', //图形验证码
|
|
|
|
+ imageCodeUrl:'', //图形验证码图片
|
|
|
|
+ imageCodetoken:'', //图形验证校验
|
|
|
|
+ socialCreditCode:'', //统一社会信用代码
|
|
|
|
+ isAgreed:0, //是否勾选协议
|
|
isDisabled:true,
|
|
isDisabled:true,
|
|
- tabCurrentIndex:1,
|
|
|
|
isShowInput:false,
|
|
isShowInput:false,
|
|
- isCheck:false, //是否全选
|
|
|
|
- uploadBusinessImage:'',
|
|
|
|
- uploadMentuzImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
|
|
|
|
- uploadMedicalImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
|
|
|
|
|
|
+ isCheck:false, //是否全选
|
|
|
|
+ uploadBusinessImage:'',//营业执照图片
|
|
|
|
+ uploadMentuzImage:'', //门头照图片
|
|
|
|
+ uploadMedicalImage:'', //资质照图片
|
|
|
|
+ department:'', //科室
|
|
|
|
+ isDepartment:false, //是否显示科室
|
|
|
|
+ secondClubType:'', //机构类型二级分类
|
|
|
|
+ mainpro:'', //主营内容
|
|
isOrganizationType:0,
|
|
isOrganizationType:0,
|
|
organizationTypeList:[
|
|
organizationTypeList:[
|
|
{name:'请选择机构类型',value:0},
|
|
{name:'请选择机构类型',value:0},
|
|
@@ -345,18 +349,14 @@
|
|
typtIndex:0,
|
|
typtIndex:0,
|
|
organizationType:0,
|
|
organizationType:0,
|
|
current:0,
|
|
current:0,
|
|
- isDepartment:false, //是否显示科室
|
|
|
|
isShowAustomItem:false, //是否显示其他添加
|
|
isShowAustomItem:false, //是否显示其他添加
|
|
- customItemValue:'', //自定义项目
|
|
|
|
|
|
+ customItemValue:'', //自定义项目
|
|
addressData:{
|
|
addressData:{
|
|
- addressID:'',
|
|
|
|
address:'请选择机构所在地区',
|
|
address:'请选择机构所在地区',
|
|
- userID: '', //用户id ,只在新增收货地址时传
|
|
|
|
- shouHuoRen: '', //收货人
|
|
|
|
- mobile:'', //收货人手机
|
|
|
|
townID:'', //区ID
|
|
townID:'', //区ID
|
|
|
|
+ cityID:'', //区ID
|
|
|
|
+ provinceID:'', //区ID
|
|
addressDetail: '', //地址
|
|
addressDetail: '', //地址
|
|
- defaultFlag:0, //是否默认收货地址(0 不是默认,1 默认)
|
|
|
|
},
|
|
},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -372,141 +372,130 @@
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
registerStepsfirst(){
|
|
registerStepsfirst(){
|
|
- if( this.registerEmail == ''){
|
|
|
|
- this.$util.msg('请输入邮箱地址',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.isEmail(this.registerEmail)){
|
|
|
|
- this.$util.msg('请输入正确的邮箱地址',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( this.regEmailCode == ''){
|
|
|
|
- this.$util.msg('请输入邮箱验证码',2000);
|
|
|
|
- return
|
|
|
|
|
|
+ let params ={
|
|
|
|
+ email:this.registerEmail,
|
|
|
|
+ mailboxCode:this.regEmailCode,
|
|
|
|
+ password:this.password,
|
|
|
|
+ passWordConfirm:this.passwordCheck,
|
|
|
|
+ whichStep:1,
|
|
}
|
|
}
|
|
- if(!this.$reg.isEmailCode(this.regEmailCode)){
|
|
|
|
- this.$util.msg('请输入正确验证码',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( this.password == ''){
|
|
|
|
- this.$util.msg('请输入密码',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.checkPwd(this.password)){
|
|
|
|
- this.$util.msg('密码必须为8-16位字母数字的组合',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( this.passwordCheck != this.password){
|
|
|
|
- this.$util.msg('两次输入的密码不一致',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- this.tabCurrentIndex = 2
|
|
|
|
- this.getVerificationCode()
|
|
|
|
|
|
+ organizationVerifyRegisterFirst(params).then(res =>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.tabCurrentIndex = 2
|
|
|
|
+ this.getVerificationCode()
|
|
|
|
+ }).catch(res =>{
|
|
|
|
+ this.$util.msg(res.msg,2000);
|
|
|
|
+ })
|
|
},
|
|
},
|
|
registerStepsTwo(){
|
|
registerStepsTwo(){
|
|
- if( this.clubName == ''){
|
|
|
|
- this.$util.msg('请输入机构名称',2000);
|
|
|
|
- return
|
|
|
|
|
|
+ let params ={
|
|
|
|
+ name:this.clubName,
|
|
|
|
+ linkMan:this.clubContact,
|
|
|
|
+ bindMobile:this.registerMobile,
|
|
|
|
+ activationCode:this.mobileCode,
|
|
|
|
+ whichStep:2,
|
|
}
|
|
}
|
|
- if( this.clubContact == ''){
|
|
|
|
- this.$util.msg('请输入联系人名称',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( this.registerMobile == ''){
|
|
|
|
- this.$util.msg('请输入手机号',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.isMobile(this.registerMobile)){
|
|
|
|
- this.$util.msg('手机格式不正确',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( this.mobileCode == ''){
|
|
|
|
- this.$util.msg('请输入手机验证码',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.isMobileCode(this.mobileCode)){
|
|
|
|
- this.$util.msg('请输入正确验证码',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- this.tabCurrentIndex = 3
|
|
|
|
- },
|
|
|
|
- registerStepsSub(){
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- getVerificationCode(){
|
|
|
|
- this.$api.get(queryVerificationCode,{}, res => {
|
|
|
|
|
|
+ organizationVerifyRegisterTwo(params).then(res =>{
|
|
console.log(res)
|
|
console.log(res)
|
|
|
|
+ this.tabCurrentIndex = 3
|
|
|
|
+ }).catch(res =>{
|
|
|
|
+ this.$util.msg(res.msg,2000);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getEmailCode(){
|
|
|
|
- if(!this.$reg.isEmail(this.registerEmail)){
|
|
|
|
- this.$util.msg('请输入正确的邮箱地址',3000);
|
|
|
|
- console.log(this.$reg.isEmail(this.registerEmail))
|
|
|
|
- return
|
|
|
|
|
|
+ registerStepsSub(){
|
|
|
|
+ let params ={
|
|
|
|
+ email:this.registerEmail,
|
|
|
|
+ mailboxCode:this.regEmailCode,
|
|
|
|
+ password:this.password,
|
|
|
|
+ passWordConfirm:this.passwordCheck,
|
|
|
|
+ name:this.clubName,
|
|
|
|
+ linkMan:this.clubContact,
|
|
|
|
+ bindMobile:this.registerMobile,
|
|
|
|
+ activationCode:this.mobileCode,
|
|
|
|
+ sname:this.abbreviation,
|
|
|
|
+ provinceID:this.addressData.provinceID,
|
|
|
|
+ cityID:this.addressData.cityID,
|
|
|
|
+ townID:this.addressData.townID,
|
|
|
|
+ address:this.addressData.addressDetail,
|
|
|
|
+ socialCreditCode:this.socialCreditCode,
|
|
|
|
+ businessLicenseImage:this.uploadBusinessImage,
|
|
|
|
+ headpic:this.uploadMentuzImage,
|
|
|
|
+ firstClubType:this.isOrganizationType, //机构类型分类 医美:1和生美:2
|
|
|
|
+ secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
|
|
|
|
+ department:this.department, //科室
|
|
|
|
+ medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
|
|
|
|
+ isAgreed:this.isAgreed, //是否勾选协议
|
|
|
|
+ mainpro:this.mainpro,
|
|
|
|
+ whichStep:3
|
|
}
|
|
}
|
|
- this.$api.get(queryEmailCode,{email:this.registerEmail,status:2}, res => {
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+ organizationRegister(params).then(res =>{
|
|
|
|
+ this.$util.msg('您的机构账号已提交审核',2000);
|
|
|
|
+ this.$api.switchTabTo('/pages/tabBar/home/home')
|
|
|
|
+ }).catch(res =>{
|
|
|
|
+ this.$util.msg(res.msg,2000);
|
|
})
|
|
})
|
|
- const TIME_COUNT = 120;
|
|
|
|
- if (!this.codeTime) {
|
|
|
|
- this.count = TIME_COUNT;
|
|
|
|
- this.isEmialDisabled = false;
|
|
|
|
- this.codeTime = setInterval(() => {
|
|
|
|
- if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
- this.count--
|
|
|
|
- this.codeText = this.count +'s'
|
|
|
|
- } else {
|
|
|
|
- this.isEmialDisabled = true;
|
|
|
|
- clearInterval(this.codeTime)
|
|
|
|
- this.codeTime = null
|
|
|
|
- this.codeText = '获取验证码'
|
|
|
|
- }
|
|
|
|
- },1000)
|
|
|
|
- }
|
|
|
|
- this.isEmialDisabled = true;
|
|
|
|
},
|
|
},
|
|
- getMobileCode(){
|
|
|
|
- if(!this.$reg.isMobile(this.registerMobile)){
|
|
|
|
- this.$util.msg('请输入正确的手机号',3000);
|
|
|
|
- return
|
|
|
|
|
|
+ getEmailCodeFn(){
|
|
|
|
+ getEmailCode({email:this.registerEmail,status:2}).then(res =>{
|
|
|
|
+ this.$util.msg('验证邮件已发送至邮箱,请登录邮箱查收',2000);
|
|
|
|
+ const TIME_COUNT = 60;
|
|
|
|
+ if (!this.codeTime) {
|
|
|
|
+ this.count = TIME_COUNT;
|
|
|
|
+ this.isEmialDisabled = true;
|
|
|
|
+ this.codeTime = setInterval(() => {
|
|
|
|
+ if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
+ this.count--
|
|
|
|
+ this.emailCodeText = this.count +'s重新发送'
|
|
|
|
+ } else {
|
|
|
|
+ this.isEmialDisabled = false;
|
|
|
|
+ clearInterval(this.codeTime)
|
|
|
|
+ this.codeTime = null
|
|
|
|
+ this.emailCodeText = '获取验证码'
|
|
|
|
+ }
|
|
|
|
+ },1000)
|
|
|
|
+ }
|
|
|
|
+ }).catch( res =>{
|
|
|
|
+ this.$util.msg(res.msg,2000);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getMobileCodeFn(){
|
|
|
|
+ let params = {
|
|
|
|
+ mobile:this.registerMobile,
|
|
|
|
+ activateCodeType:2,
|
|
|
|
+ platformType:2,
|
|
|
|
+ imgCode:this.imageCode,
|
|
|
|
+ token:this.imageCodetoken,
|
|
}
|
|
}
|
|
- this.$api.get(queryMobileCode,{email:this.registerEmail,status:2}, res => {
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+ getMobileCode(params).then(res =>{
|
|
|
|
+ this.$util.msg('验证短信已发送',2000);
|
|
|
|
+ const TIME_COUNT = 60;
|
|
|
|
+ if (!this.codeTime) {
|
|
|
|
+ this.count = TIME_COUNT;
|
|
|
|
+ this.isMobileDisabled = true;
|
|
|
|
+ this.codeTime = setInterval(() => {
|
|
|
|
+ if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
+ this.count--
|
|
|
|
+ this.mobileCodeText = this.count +'s重新发送'
|
|
|
|
+ } else {
|
|
|
|
+ this.isMobileDisabled = false;
|
|
|
|
+ clearInterval(this.codeTime)
|
|
|
|
+ this.codeTime = null
|
|
|
|
+ this.mobileCodeText = '获取验证码'
|
|
|
|
+ }
|
|
|
|
+ },1000)
|
|
|
|
+ }
|
|
|
|
+ }).catch( res =>{
|
|
|
|
+ this.$util.msg(res.msg,2000);
|
|
})
|
|
})
|
|
- const TIME_COUNT = 120;
|
|
|
|
- if (!this.codeTime) {
|
|
|
|
- this.count = TIME_COUNT;
|
|
|
|
- this.isMobileDisabled = false;
|
|
|
|
- this.codeTime = setInterval(() => {
|
|
|
|
- if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
- this.count--
|
|
|
|
- this.codeText = this.count +'s'
|
|
|
|
- } else {
|
|
|
|
- this.isMobileDisabled = true;
|
|
|
|
- clearInterval(this.codeTime)
|
|
|
|
- this.codeTime = null
|
|
|
|
- this.codeText = '获取验证码'
|
|
|
|
- }
|
|
|
|
- },1000)
|
|
|
|
- }
|
|
|
|
- this.isMobileDisabled = true;
|
|
|
|
},
|
|
},
|
|
- checkImgCode(e){
|
|
|
|
- this.$api.get(checkVerificationCode,{imagecode:imageCode}, res => {
|
|
|
|
- console.log(res)
|
|
|
|
- this.isMobileDisabled = false
|
|
|
|
|
|
+ getVerificationCode(){//图形验证
|
|
|
|
+ getImageCode().then(res => {
|
|
|
|
+ this.imageCodeUrl = res.data.baseImage
|
|
|
|
+ this.imageCodetoken = res.data.token
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- registerEmailInput(e){
|
|
|
|
- console.log(this.$reg.isEmail(e.detail.value))
|
|
|
|
- this.registerEmail = e.detail.value;
|
|
|
|
- if(!this.$reg.isEmail(this.registerEmail)){
|
|
|
|
- this.$util.msg('请输入正确的邮箱地址',2000);
|
|
|
|
- this.isEmialDisabled = true
|
|
|
|
- return
|
|
|
|
- }else{
|
|
|
|
- this.isEmialDisabled = false
|
|
|
|
- }
|
|
|
|
|
|
+ refreshVscode(){//刷新图形吗
|
|
|
|
+ this.getVerificationCode()
|
|
},
|
|
},
|
|
// 三级联动选择
|
|
// 三级联动选择
|
|
showMulLinkageThreePicker() {
|
|
showMulLinkageThreePicker() {
|
|
@@ -514,168 +503,104 @@
|
|
this.$refs.mpvueCityPicker.show()
|
|
this.$refs.mpvueCityPicker.show()
|
|
},
|
|
},
|
|
onConfirm(e) {
|
|
onConfirm(e) {
|
|
- // console.log('地址',e);
|
|
|
|
|
|
+ console.log('地址',e);
|
|
this.addressData.address = e.name;
|
|
this.addressData.address = e.name;
|
|
- this.addressData.townID = e.cityCode;
|
|
|
|
|
|
+ this.addressData.townID = e.townCode;
|
|
|
|
+ this.addressData.cityID = e.cityCode;
|
|
|
|
+ this.addressData.provinceID = e.provinceCode;
|
|
},
|
|
},
|
|
|
|
+ onTextareaInput(e){
|
|
|
|
+ this.addressData.addressDetail = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ chooseBusinessImage() {//营业执照图片上传
|
|
|
|
+ uploadFileImage().then(res =>{
|
|
|
|
+ this.uploadBusinessImage = JSON.parse(res.data).data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ chooseMentuzImage() {//门头照图片上传
|
|
|
|
+ uploadFileImage().then(res =>{
|
|
|
|
+ this.uploadMentuzImage = JSON.parse(res.data).data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ chooseMedicalImage() {//资质照图片上传
|
|
|
|
+ uploadFileImage().then(res =>{
|
|
|
|
+ this.uploadMedicalImage = JSON.parse(res.data).data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ viewBusinessImage(e) {
|
|
|
|
+ this.myPreviewImageFn(this.uploadBusinessImage)
|
|
|
|
+ },
|
|
|
|
+ viewMentuzImage(e) {
|
|
|
|
+ this.myPreviewImageFn(this.uploadMentuzImage)
|
|
|
|
+ },
|
|
|
|
+ viewMedicalImage(e) {
|
|
|
|
+ this.myPreviewImageFn(this.uploadMedicalImage)
|
|
|
|
+ },
|
|
|
|
+ myPreviewImageFn(url){
|
|
|
|
+ this.isPreviewImage = true
|
|
|
|
+ let mentuzArray = []
|
|
|
|
+ mentuzArray.push(url)
|
|
|
|
+ uni.previewImage({
|
|
|
|
+ urls: mentuzArray,
|
|
|
|
+ current: 0
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ delBusinessImage(){
|
|
|
|
+ this.uploadBusinessImage = ''
|
|
|
|
+ },
|
|
|
|
+ delMentuzImage(){
|
|
|
|
+ this.uploadMentuzImage = ''
|
|
|
|
+ },
|
|
|
|
+ delMedicalImage(){
|
|
|
|
+ this.uploadMedicalImage = ''
|
|
|
|
+ },
|
|
bindPickerChange(e) {
|
|
bindPickerChange(e) {
|
|
- console.log('picker发送选择改变,携带值为:' + e.target)
|
|
|
|
|
|
+ console.log('picker携带值为:' + e.target.value)
|
|
this.typtIndex = e.target.value
|
|
this.typtIndex = e.target.value
|
|
this.isOrganizationType = e.target.value
|
|
this.isOrganizationType = e.target.value
|
|
},
|
|
},
|
|
radioChange(e) {
|
|
radioChange(e) {
|
|
- let _value = e.target.value
|
|
|
|
- if( _value == '2' || _value == '3'){
|
|
|
|
|
|
+ this.secondClubType = e.target.value;
|
|
|
|
+ if( this.secondClubType == '2' || this.secondClubType == '3'){
|
|
this.isDepartment = true
|
|
this.isDepartment = true
|
|
}else{
|
|
}else{
|
|
this.isDepartment = false
|
|
this.isDepartment = false
|
|
}
|
|
}
|
|
for (let i = 0; i < this.beautyList.length; i++) {
|
|
for (let i = 0; i < this.beautyList.length; i++) {
|
|
- if (this.beautyList[i].value === _value) {
|
|
|
|
|
|
+ if (this.beautyList[i].value === this.secondClubType) {
|
|
this.current = i;
|
|
this.current = i;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
chooseMaleLike(e){
|
|
chooseMaleLike(e){
|
|
- let items = this.mentuzCampList
|
|
|
|
- let values = e.detail.value
|
|
|
|
- for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
|
|
- const item = items[i]
|
|
|
|
- if(values.indexOf(item.value) >= 0){
|
|
|
|
- this.$set(item,'checked',true)
|
|
|
|
- }else{
|
|
|
|
- this.$set(item,'checked',false)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.mainpro = this.checkLikes(e,this.mentuzCampList)
|
|
|
|
+ console.log(this.mainpro)
|
|
},
|
|
},
|
|
chooseMaleLikes(e){
|
|
chooseMaleLikes(e){
|
|
- let items = this.medicaCampList
|
|
|
|
|
|
+ this.mainpro = this.checkLikes(e,this.medicaCampList)
|
|
|
|
+ console.log(this.mainpro)
|
|
|
|
+ },
|
|
|
|
+ checkLikes(e,list){
|
|
|
|
+ let items = list
|
|
let values = e.detail.value
|
|
let values = e.detail.value
|
|
- for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
|
|
|
|
+ let arr = []
|
|
|
|
+ for (let i = 0, lenI = items.length; i < lenI; ++i) {
|
|
const item = items[i]
|
|
const item = items[i]
|
|
if(values.indexOf(item.value) >= 0){
|
|
if(values.indexOf(item.value) >= 0){
|
|
this.$set(item,'checked',true)
|
|
this.$set(item,'checked',true)
|
|
|
|
+ arr.push(item.name)
|
|
}else{
|
|
}else{
|
|
this.$set(item,'checked',false)
|
|
this.$set(item,'checked',false)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- },
|
|
|
|
- onTextareaInput(e){
|
|
|
|
- this.addressData.addressDetail = e.detail.value;
|
|
|
|
- // console.log(this.addressData.addressDetail)
|
|
|
|
- },
|
|
|
|
- chooseBusinessImage() {
|
|
|
|
- let self = this;
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认1
|
|
|
|
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- const tempFilePaths = res.tempFilePaths;
|
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
|
- url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
|
|
|
|
- filePath: tempFilePaths[0],
|
|
|
|
- name: 'file',
|
|
|
|
- formData: {
|
|
|
|
- 'user': 'test'
|
|
|
|
- },
|
|
|
|
- success: function (data) {
|
|
|
|
- console.log(data.data);
|
|
|
|
- self.uploadBusinessImage = res.tempFilePaths
|
|
|
|
- },
|
|
|
|
- error : function(e){
|
|
|
|
- console.log(e);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- chooseMentuzImage() {
|
|
|
|
- let self = this;
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认1
|
|
|
|
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- const tempFilePaths = res.tempFilePaths;
|
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
|
- url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
|
|
|
|
- filePath: tempFilePaths[0],
|
|
|
|
- name: 'file',
|
|
|
|
- formData: {
|
|
|
|
- 'user': 'test'
|
|
|
|
- },
|
|
|
|
- success: function (res) {
|
|
|
|
- console.log(res.data);
|
|
|
|
- self.uploadMentuzImage = res.data
|
|
|
|
- },
|
|
|
|
- error : function(e){
|
|
|
|
- console.log(e);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- chooseMedicalImage() {
|
|
|
|
- let self = this;
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认1
|
|
|
|
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- const tempFilePaths = res.tempFilePaths;
|
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
|
- url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
|
|
|
|
- filePath: tempFilePaths[0],
|
|
|
|
- name: 'file',
|
|
|
|
- formData: {
|
|
|
|
- 'user': 'test'
|
|
|
|
- },
|
|
|
|
- success: function (res) {
|
|
|
|
- console.log(res.data);
|
|
|
|
- self.uploadMedicalImage = res.data
|
|
|
|
- },
|
|
|
|
- error : function(e){
|
|
|
|
- console.log(e);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- viewMentuzImage(e) {
|
|
|
|
- let self = this
|
|
|
|
- uni.previewImage({
|
|
|
|
- urls: self.uploadMentuzImage,
|
|
|
|
- current: e.currentTarget.dataset.url
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- viewBusinessImage(e) {
|
|
|
|
- let self = this
|
|
|
|
- uni.previewImage({
|
|
|
|
- urls: self.uploadBusinessImage,
|
|
|
|
- current: e.currentTarget.dataset.url
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- viewMedicalImage(e) {
|
|
|
|
- let self = this
|
|
|
|
- uni.previewImage({
|
|
|
|
- urls: self.uploadMedicalImage,
|
|
|
|
- current: e.currentTarget.dataset.url
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- delBusinessImage(){
|
|
|
|
- this.uploadBusinessImage = ''
|
|
|
|
- },
|
|
|
|
- delMentuzImage(){
|
|
|
|
- this.uploadMentuzImage = ''
|
|
|
|
- },
|
|
|
|
- delMedicalImage(){
|
|
|
|
- this.uploadMedicalImage = ''
|
|
|
|
|
|
+ return arr.toString()
|
|
},
|
|
},
|
|
agreeCheck() {
|
|
agreeCheck() {
|
|
this.isCheck = !this.isCheck
|
|
this.isCheck = !this.isCheck
|
|
|
|
+ if(this.isCheck){
|
|
|
|
+ this.isAgreed = 1
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onBlurInput(e){//
|
|
onBlurInput(e){//
|
|
if(e.detail.value ===''){
|
|
if(e.detail.value ===''){
|
|
@@ -684,7 +609,6 @@
|
|
this.isDisabled = false
|
|
this.isDisabled = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
showAustomItem() {
|
|
showAustomItem() {
|
|
this.isShowAustomItem = !this.isShowAustomItem
|
|
this.isShowAustomItem = !this.isShowAustomItem
|
|
},
|
|
},
|
|
@@ -701,6 +625,12 @@
|
|
console.log(index)
|
|
console.log(index)
|
|
this.tabCurrentIndex = index;
|
|
this.tabCurrentIndex = index;
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ onShow() {
|
|
|
|
+ if(this.isPreviewImage){
|
|
|
|
+ this.isPreviewImage = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -860,21 +790,21 @@
|
|
&.btn{
|
|
&.btn{
|
|
width: 176rpx;
|
|
width: 176rpx;
|
|
float: left;
|
|
float: left;
|
|
|
|
+ background: $btn-confirm;
|
|
.row-input{
|
|
.row-input{
|
|
width: 176rpx;
|
|
width: 176rpx;
|
|
padding: 0;
|
|
padding: 0;
|
|
- background: #F7F7F7;
|
|
|
|
- text-align: center;
|
|
|
|
- }
|
|
|
|
- &.none{
|
|
|
|
|
|
+ color: #FFFFFF;
|
|
background: $btn-confirm;
|
|
background: $btn-confirm;
|
|
- .row-input{
|
|
|
|
- color: #FFFFFF;
|
|
|
|
- background: $btn-confirm;
|
|
|
|
|
|
+ text-align: center;
|
|
|
|
+ &.none{
|
|
|
|
+ background: #F7F7F7;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&.disabled{
|
|
&.disabled{
|
|
|
|
+ background: #F7F7F7;
|
|
.row-input{
|
|
.row-input{
|
|
|
|
+ background: #F7F7F7;
|
|
color: #999999;
|
|
color: #999999;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -906,6 +836,7 @@
|
|
}
|
|
}
|
|
.row-radio{
|
|
.row-radio{
|
|
float: left;
|
|
float: left;
|
|
|
|
+ transform: scale(0.8);
|
|
}
|
|
}
|
|
.row-text{
|
|
.row-text{
|
|
width: 100rpx;
|
|
width: 100rpx;
|