取消注册时选择注册类型
This commit is contained in:
parent
95719e57d9
commit
85ffec1293
|
@ -89,10 +89,6 @@ const apis = {
|
||||||
showLoading: true,
|
showLoading: true,
|
||||||
auth: true,
|
auth: true,
|
||||||
}
|
}
|
||||||
},
|
|
||||||
registerType: {
|
|
||||||
url: "/wxapp/index/registertype",
|
|
||||||
showLoading: true,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
service: {
|
service: {
|
||||||
|
|
|
@ -128,28 +128,6 @@ export default {
|
||||||
}).catch(e => { });
|
}).catch(e => { });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 获取注册类型
|
|
||||||
*/
|
|
||||||
getRegisterType() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
prototype.$request({
|
|
||||||
api: "user.registerType",
|
|
||||||
}).then(response => {
|
|
||||||
if (response.code == 1) {
|
|
||||||
let list = [];
|
|
||||||
response.data.forEach(item => {
|
|
||||||
list.push({
|
|
||||||
id: item.id,
|
|
||||||
name: item.name,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return resolve(list);
|
|
||||||
}
|
|
||||||
return reject(response.msg);
|
|
||||||
}).catch(e => { });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 用户注册
|
* 用户注册
|
||||||
*/
|
*/
|
||||||
|
@ -171,7 +149,6 @@ export default {
|
||||||
password: user.password,
|
password: user.password,
|
||||||
openid: user.openId,
|
openid: user.openId,
|
||||||
verification_code: verificationCode,
|
verification_code: verificationCode,
|
||||||
register_type: user.registerType,
|
|
||||||
types: 2,
|
types: 2,
|
||||||
}
|
}
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
|
|
@ -81,15 +81,6 @@
|
||||||
placeholder-class="placeholder-style-3"
|
placeholder-class="placeholder-style-3"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="input-item">
|
|
||||||
<picker mode="selector" :range="registerType" range-key="name" @change="changeRegisterType">
|
|
||||||
<view class="picker-view register-type">
|
|
||||||
<text class="name" :class="{ active: currentRegisterType.name != '' }">
|
|
||||||
{{ currentRegisterType.name ? currentRegisterType.name : "请选择注册类型" }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
|
||||||
<view class="helper">
|
<view class="helper">
|
||||||
<app-agreement v-model="isAgree" />
|
<app-agreement v-model="isAgree" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -126,11 +117,6 @@ export default {
|
||||||
mobile: "",
|
mobile: "",
|
||||||
password: "",
|
password: "",
|
||||||
verificationCode: "",
|
verificationCode: "",
|
||||||
registerType: [],
|
|
||||||
currentRegisterType: {
|
|
||||||
id: 0,
|
|
||||||
name: "",
|
|
||||||
},
|
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -143,11 +129,7 @@ export default {
|
||||||
openId: (state) => state.user.openId,
|
openId: (state) => state.user.openId,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {},
|
||||||
this.$models.user.getRegisterType().then((list) => {
|
|
||||||
this.registerType = list;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onShow() {},
|
onShow() {},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
onReachBottom() {},
|
onReachBottom() {},
|
||||||
|
@ -155,13 +137,6 @@ export default {
|
||||||
onShareTimeline() {},
|
onShareTimeline() {},
|
||||||
onShareAppMessage() {},
|
onShareAppMessage() {},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* 修改注册类型
|
|
||||||
*/
|
|
||||||
changeRegisterType(e) {
|
|
||||||
let currentRegisterType = this.registerType[e.detail.value];
|
|
||||||
this.currentRegisterType = currentRegisterType;
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 忘记密码
|
* 忘记密码
|
||||||
*/
|
*/
|
||||||
|
@ -256,17 +231,12 @@ export default {
|
||||||
this.$utils.toast("请先阅读并同意《服务协议》《隐私政策》");
|
this.$utils.toast("请先阅读并同意《服务协议》《隐私政策》");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.currentRegisterType.id) {
|
|
||||||
this.$utils.toast("请选择注册类型");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$models.user
|
this.$models.user
|
||||||
.register(
|
.register(
|
||||||
{
|
{
|
||||||
mobile: this.mobile,
|
mobile: this.mobile,
|
||||||
password: this.password,
|
password: this.password,
|
||||||
openId: this.openId,
|
openId: this.openId,
|
||||||
registerType: this.currentRegisterType.id,
|
|
||||||
},
|
},
|
||||||
this.verificationCode
|
this.verificationCode
|
||||||
)
|
)
|
||||||
|
@ -381,14 +351,4 @@ export default {
|
||||||
margin: 160rpx auto 160rpx auto;
|
margin: 160rpx auto 160rpx auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.picker-view.register-type {
|
|
||||||
font-size: 32rpx;
|
|
||||||
padding: 30rpx 0;
|
|
||||||
.name {
|
|
||||||
color: #c9c9c9;
|
|
||||||
}
|
|
||||||
.name.active {
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue