|
|
@@ -27,14 +27,14 @@ |
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
<!-- <view class="forget-section"> --> |
|
|
|
<!-- <view><label @click="register('resetpwd')">忘记密码</label> --> |
|
|
|
<!-- - <label @click="register('register')">立马注册</label></view> --> |
|
|
|
<!-- </view> --> |
|
|
|
<!-- <view><label @click="register('resetpwd')">忘记密码</label> --> |
|
|
|
<!-- - <label @click="register('register')">立马注册</label></view> --> |
|
|
|
<!-- </view> --> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
@@ -51,7 +51,6 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations(['login']), |
|
|
@@ -72,9 +71,16 @@ |
|
|
|
this.$store.commit('login', data) |
|
|
|
|
|
|
|
this.logining = true; |
|
|
|
|
|
|
|
setTimeout(function() { |
|
|
|
uni.navigateBack(); |
|
|
|
let pages = getCurrentPages(); //当前页 |
|
|
|
if(pages.length==1&&pages[0].route=='pages/public/login'){ |
|
|
|
console.log(pages[0].route) |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/index/index' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
uni.navigateBack(); |
|
|
|
} |
|
|
|
}, 2000) |
|
|
|
|
|
|
|
} else { |
|
|
@@ -99,7 +105,14 @@ |
|
|
|
this.$store.commit('login', data); |
|
|
|
this.$api.msg('登录成功'); |
|
|
|
setTimeout(function() { |
|
|
|
uni.navigateBack(); |
|
|
|
let pages = getCurrentPages(); //当前页 |
|
|
|
if(pages.length==1&&pages[0].route=='pages/public/login'){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: `pages/index/index` |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
uni.navigateBack(); |
|
|
|
} |
|
|
|
}, 2000); |
|
|
|
} |
|
|
|
} |
|
|
|