Browse Source

fix 加价分享 bug 修复

ylong 6 months ago
parent
commit
ec817390d7
6 changed files with 8 additions and 3 deletions
  1. 2 1
      App.vue
  2. 6 2
      pages/home/index.vue
  3. BIN
      static/nodata/content.png
  4. BIN
      static/nodata/network.png
  5. BIN
      static/nodata/order.png
  6. BIN
      static/nodata/result.png

+ 2 - 1
App.vue

@@ -71,6 +71,7 @@ export default {
 	},
 	methods: {
 		slientLogin(params = {}) {
+			let that = this;
 			uni.login({
 				success(res) {
 					//plat	integer($int32)平台 1-微信 2-支付宝
@@ -85,7 +86,7 @@ export default {
 						.then((response) => {
 							if (response.code == 200) {
 								eventBus.emit('loginSuccess', { response: response.data, params: data })
-								this.globalData.isColdLaunch = false;
+								that.globalData.isColdLaunch = false;
 								uni.setStorageSync("loginSuccess", response.data);
 								uni.setStorageSync("token", response.data.token);
 								console.log("登录成功返回参数", response.data, data);

+ 6 - 2
pages/home/index.vue

@@ -271,13 +271,17 @@ export default {
                 this.screenHeight = res.windowHeight;
             },
         });
-
+    },
+    onShow() {
+        console.log(app.globalData.isColdLaunch, "onShow");
+        if (!app.globalData.isColdLaunch) return
         eventBus.on("loginSuccess", (data) => {
             console.log(data, "登录成功loginSuccess");
             this.loginSuccess(data);
             app.globalData.isColdLaunch = false;
-        });
+        });;
     },
+
     //针对多次扫码的热启动场景,需要判断是否是冷启动
     onLoad(options) {
         console.log(options, app.globalData.isColdLaunch, "onLoad");

BIN
static/nodata/content.png


BIN
static/nodata/network.png


BIN
static/nodata/order.png


BIN
static/nodata/result.png