From 0716135a1e553aff387fe830a1d460971767377f Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 9 Mar 2023 13:41:37 +0800 Subject: [PATCH] upload --- index/index.js | 14 +++++++++++--- project.config.json | 9 +++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/index/index.js b/index/index.js index 6e0a1d7..cc17b50 100644 --- a/index/index.js +++ b/index/index.js @@ -154,7 +154,10 @@ Page({ tt.setStorageSync('mallTenantId', res.data[0].tenantId) tt.setStorageSync('mallIndex', 0) } - this.getLocation() + const locationSwitch = tt.getStorageSync('locationSwitch'); + if (!locationSwitch) { + this.getLocation() + } }).catch(err => { console.log(err, 'err'); }) @@ -573,9 +576,14 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onLoad: function (options) { + console.log(options, 'options'); let that = this; let optionss; + const locationSwitch = options.type || '' + tt.setStorageSync('locationSwitch', locationSwitch); + + let openId = tt.getStorageSync('openId') if (tt.getStorageSync('options')) { optionss = JSON.parse(tt.getStorageSync('options')); @@ -670,7 +678,7 @@ Page({ that.bindPickerChange('', index, item.tenantId) tt.setStorageSync('locationFlag', false); } else { - that.bindPickerChange('', ttt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) + that.bindPickerChange('', tt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) } return true @@ -705,7 +713,7 @@ Page({ that.bindPickerChange('', obj.index, obj.tenantId) tt.setStorageSync('locationFlag', false); } else { - that.bindPickerChange('', ttt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) + that.bindPickerChange('', tt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) } }, complete: finish => { diff --git a/project.config.json b/project.config.json index 5be4479..ebe55c3 100644 --- a/project.config.json +++ b/project.config.json @@ -45,6 +45,15 @@ "scene": "990001", "launchFrom": "scan", "location": "qr_code" + }, + { + "id": 1678330099779, + "name": " index/index(noLocation)", + "pathName": "index/index", + "query": "type=in", + "scene": "990001", + "launchFrom": "scan", + "location": "qr_code" } ] }