jwyu 3 年 前
コミット
b6f12f4b37
2 ファイル変更9 行追加2 行削除
  1. 8 1
      pages/login.vue
  2. 1 1
      utils/request.js

+ 8 - 1
pages/login.vue

@@ -33,6 +33,7 @@
                 :border="false"
                 title-width="60px"
                 type="number"
+                maxlength='4'
                 center
                 @change="inputChange('verifyCode', $event)"
             >
@@ -57,6 +58,7 @@
                 title-width="60px"
                 center
                 type="number"
+                maxlength='4'
                 @change="inputChange('verifyCode',$event)"
             >   
                 <text slot="button" class="sendcode-btn" type="primary" v-if="!isSendVerifyCode" @click="handleSendVerifyCode('email')">发送验证码</text>
@@ -111,6 +113,9 @@ export default {
             countDownTime: 60 * 1000,//倒计时60秒
         };
     },
+    onShow(){
+        uni.hideHomeButton()
+    },
     methods: {
 
         handleChange(){
@@ -201,7 +206,9 @@ export default {
 
             const res = await apiUserLogin(params)
             if (res.code === 200) {
-                uni.navigateBack()
+                uni.switchTab({
+                    url: '/pages/activity/activity'
+                })
                 this.$store.dispatch('getUserInfo')
                 this.$store.dispatch('getTabBar')
             }

+ 1 - 1
utils/request.js

@@ -57,7 +57,7 @@ const refreshToken=async (url,params,method,resolve)=>{
 		const wechatLoginRes=await wechatLogin()
 		console.log(wechatLoginRes);
 		if(!wechatLoginRes.is_bind){
-			uni.navigateTo({
+			uni.reLaunch({
 				url:'/pages/login'
 			})
 			return