tmp: 部分代码与UnishopV5结合,但是代码有严重缺陷
This commit is contained in:
@@ -184,22 +184,20 @@ export default {
|
||||
this.memberInfoformData.nickName = this.memberInfo.nickname; //昵称
|
||||
this.memberInfoformData.realName = this.memberInfo.realname ? this.memberInfo.realname : '请输入真实姓名'; //真实姓名
|
||||
this.memberInfoformData.sex = this.memberInfo.sex == 0 ? '未知' : this.memberInfo.sex == 1 ? '男' : '女'; //性别
|
||||
this.memberInfoformData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'YYYY-MM-DD') : '请选择生日'; //生日
|
||||
this.memberInfoformData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'Y-m-d') : '请选择生日'; //生日
|
||||
this.memberInfoformData.mobile = this.memberInfo.mobile; //手机号
|
||||
|
||||
this.formData.username = this.memberInfo.username; //用户名
|
||||
this.formData.nickName = this.memberInfo.nickname; //昵称
|
||||
this.formData.realName = this.memberInfo.realname; //真实姓名
|
||||
this.formData.sex = this.memberInfo.sex; //性别
|
||||
this.formData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'YYYY-MM-DD') : ''; //生日
|
||||
this.formData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'Y-m-d') : ''; //生日
|
||||
this.formData.provinceId = this.memberInfo.province_id;
|
||||
this.formData.cityId = this.memberInfo.city_id;
|
||||
this.formData.districtId = this.memberInfo.district_id;
|
||||
this.formData.fullAddress = this.memberInfo.full_address;
|
||||
this.formData.address = this.memberInfo.address;
|
||||
if (this.memberInfo.full_address) this.defaultRegions = [this.memberInfo
|
||||
.province_id, this.memberInfo.city_id, this.memberInfo.district_id
|
||||
];
|
||||
if (this.memberInfo.full_address) this.defaultRegions = [this.memberInfo.province_id, this.memberInfo.city_id, this.memberInfo.district_id];
|
||||
},
|
||||
// 切换编辑项
|
||||
modifyInfo(action) {
|
||||
@@ -239,35 +237,6 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
cancellation() {
|
||||
uni.showModal({
|
||||
title: '风险提示',
|
||||
content: '确定要注销当前账号吗?',
|
||||
confirmColor: '#000000',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/apply',
|
||||
success: rres => {
|
||||
let cancellation_condition = rres.data.is_audit;
|
||||
if (rres.code >= 0) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$store.dispatch('emptyCart');
|
||||
uni.removeStorageSync('authInfo');
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: rres.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getCancelStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/info',
|
||||
@@ -288,7 +257,7 @@ export default {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/member/assets', {
|
||||
this.$util.redirectTo('/pages_tool/member/cancellation', {
|
||||
back: '/pages_tool/member/info'
|
||||
});
|
||||
}
|
||||
@@ -327,8 +296,7 @@ export default {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$store.dispatch('emptyCart');
|
||||
uni.removeStorageSync('authInfo');
|
||||
// uni.removeStorageSync('authInfo');
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
@@ -616,30 +584,25 @@ export default {
|
||||
name: 'currentPassword',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("pleaseInputOldPassword")
|
||||
},
|
||||
{
|
||||
name: 'newPassword',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("pleaseInputNewPassword")
|
||||
}
|
||||
];
|
||||
}, {
|
||||
name: 'newPassword',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("pleaseInputNewPassword")
|
||||
}];
|
||||
} else {
|
||||
var rule = [{
|
||||
name: 'mobileVercode',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("confirmCodeInput")
|
||||
},
|
||||
{
|
||||
name: 'mobileDynacode',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("animateCodeInput")
|
||||
},
|
||||
{
|
||||
name: 'newPassword',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("pleaseInputNewPassword")
|
||||
}
|
||||
];
|
||||
}, {
|
||||
name: 'mobileDynacode',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("animateCodeInput")
|
||||
}, {
|
||||
name: 'newPassword',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang("pleaseInputNewPassword")
|
||||
}];
|
||||
}
|
||||
|
||||
let regConfig = this.registerConfig;
|
||||
@@ -725,7 +688,7 @@ export default {
|
||||
|
||||
// ------------------------修改手机号------------------------------
|
||||
// 验证手机号
|
||||
vertifyMobile() {
|
||||
verifyMobile() {
|
||||
var rule = [{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
@@ -746,7 +709,7 @@ export default {
|
||||
},
|
||||
// 检测手机号是否存在
|
||||
async checkMobile() {
|
||||
if (!this.vertifyMobile()) return;
|
||||
if (!this.verifyMobile()) return;
|
||||
let res = await this.$api.sendRequest({
|
||||
url: '/api/member/checkmobile',
|
||||
data: {
|
||||
@@ -764,7 +727,7 @@ export default {
|
||||
},
|
||||
|
||||
// 发送短信动态码
|
||||
async bindMoblieCode() {
|
||||
async bindMobileCode() {
|
||||
if (this.seconds != 120) return;
|
||||
var rule = [{
|
||||
name: 'mobile',
|
||||
|
||||
Reference in New Issue
Block a user