浏览代码

清除启动参数

xiaohaizhao 1 年之前
父节点
当前提交
73e122d44d
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      pages/index/index.vue

+ 4 - 5
pages/index/index.vue

@@ -72,7 +72,6 @@ export default {
 					break;
 			}
 		}
-
 	},
 	onShow() {
 		this.isInitializeLogin(render.bind(this))
@@ -131,8 +130,8 @@ export default {
 									content: s.msg == '成功' ? '绑定成功' : s.msg,
 									showCancel: false,
 									success: function () {
-										that.$Login.wechatLogin().then(() => uni.reLaunch({
-											url: '/pages/index/index'
+										if (s.msg == '成功') that.$Login.wechatLogin().then(() => uni.reLaunch({
+											url: '/pages/index/index?q=""'
 										}))
 									}
 								});
@@ -162,8 +161,8 @@ export default {
 							content: s.msg == '成功' ? '绑定成功' : s.msg,
 							showCancel: false,
 							success: function () {
-								that.$Login.wechatLogin().then(() => uni.reLaunch({
-									url: '/pages/index/index'
+								if (s.msg == '成功') that.$Login.wechatLogin().then(() => uni.reLaunch({
+									url: '/pages/index/index?q=""'
 								}))
 							}
 						});