用户端修改

This commit is contained in:
linfeng 2022-12-06 14:16:34 +08:00
parent 7f504f0729
commit 57fbd87967
3 changed files with 5 additions and 20 deletions

View File

@ -60,12 +60,9 @@
} else { } else {
if (this.$refs.uCode.canGetCode) { if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({ uni.showLoading({
title: '正在获取验证码' title: '正在获取验证码'
}) })
this.$H.post("user/sendSmsCode", { this.$H.post("user/sendSmsCode", {
mobile: this.form.mobile mobile: this.form.mobile
}).then(res => { }).then(res => {
@ -73,7 +70,6 @@
uni.hideLoading(); uni.hideLoading();
this.$refs.uCode.start(); this.$refs.uCode.start();
this.$u.toast(res.msg); this.$u.toast(res.msg);
} }
}) })
} else { } else {

View File

@ -40,12 +40,9 @@
title: '正在登陆' title: '正在登陆'
}); });
var that = this; var that = this;
// let userInfo = await this.getUserProfile();
let code = await this.getLoginCode(); let code = await this.getLoginCode();
that.$H.post('user/miniWxlogin', { that.$H.post('user/miniWxlogin', {
code: code, code: code
// username: userInfo.nickName,
// avatar: userInfo.avatarUrl,
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
@ -79,17 +76,7 @@
}); });
}); });
}, },
// getUserProfile() {
// return new Promise((resolve, reject) => {
// wx.getUserProfile({
// lang: 'zh_CN',
// desc: '',
// success: res => {
// resolve(res.userInfo);
// }
// });
// });
// }
} }
} }

View File

@ -50,7 +50,9 @@
}; };
}, },
onLoad(options) { onLoad(options) {
if(!uni.getStorageSync("hasLogin")){
this.$u.toast('请先登录哦');
}
}, },
methods: { methods: {
chooseClass() { chooseClass() {