Commit 4e69ec3b by 李伟康

commit 提交

1 parent 79b70628
...@@ -38,7 +38,7 @@ module.exports = { ...@@ -38,7 +38,7 @@ module.exports = {
return http.fetch('dj.api.smartcarlife.workWechat.selectAccountLogin', data) return http.fetch('dj.api.smartcarlife.workWechat.selectAccountLogin', data)
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI(data) { getYqMerchantSceneConfigAPI (data) {
data.projectName = 'boutique' data.projectName = 'boutique'
return http.post({ return http.post({
method: 'dj.api.smartcarlife.select.openScene.info', method: 'dj.api.smartcarlife.select.openScene.info',
......
...@@ -72,6 +72,12 @@ export default { ...@@ -72,6 +72,12 @@ export default {
}; };
}, },
onLoad (options) { onLoad (options) {
let userInfo = uni.$storage.get('userInfo')
uni.$api.userApi.getListSelectAccount().then(res => {
if (res.code == 0 && userInfo) uni.reLaunch({
url: '/pages/home/home'
})
})
}, },
methods: { methods: {
/**获取验证码 */ /**获取验证码 */
...@@ -80,7 +86,7 @@ export default { ...@@ -80,7 +86,7 @@ export default {
try { try {
if (!mobile) throw '请输入手机号'; if (!mobile) throw '请输入手机号';
if (!phoneRex.test(mobile)) throw '请输入正确的手机号'; if (!phoneRex.test(mobile)) throw '请输入正确的手机号';
if (count) throw '验证码发送过于频繁,请稍后在试'; if (count) throw '验证码发送过于频繁,请稍后再试';
this.countDown(60); this.countDown(60);
uni.showLoading(); uni.showLoading();
const { code, message } = await uni.$api.userApi.getSmsCode({ mobile }); const { code, message } = await uni.$api.userApi.getSmsCode({ mobile });
...@@ -155,7 +161,7 @@ export default { ...@@ -155,7 +161,7 @@ export default {
url: '/pages/common/accountItems' url: '/pages/common/accountItems'
}) })
}, },
}, },
}; };
</script> </script>
......
...@@ -122,6 +122,8 @@ export default { ...@@ -122,6 +122,8 @@ export default {
}, },
// 退出 // 退出
logout() { logout() {
uni.$storage.rm('userInfo')
uni.$storage.rm('sessionId')
this.stopAudio(); this.stopAudio();
uni.reLaunch({ uni.reLaunch({
url: "/pages/common/login", url: "/pages/common/login",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!