Commit 05271e03 by 杨北旺

优化

1 parent 4b8a930a
......@@ -99,8 +99,9 @@ Page({
onShow() {
if (this.data.codeId) this.checkMovecode(this.data.codeId)
async onShow() {
const res = await wx.p.router.intercept()
if (!res&&this.data.codeId) this.checkMovecode(this.data.codeId)
},
onShareAppMessage() {
......
......@@ -129,10 +129,6 @@ Page({
// 获取门店列表
async getMerchantList() {
const HAVE_ENTER = wx.p.storage.get('first_enter_miniprograme')
if (HAVE_ENTER && !this.fresh) {
this.defaultMerchant = wx.p.storage.get('first_enter_merchantId')
}
// 获取mock配置门店
const MOCKDATA = wx.p.storage.get("mock_data");
let MerchantList = MERCHANT_STATIC_LIST[env]
......@@ -142,6 +138,16 @@ Page({
MerchantList = [...MerchantList, ...ADD_MERCHANT_LIST]
}
}
const HAVE_ENTER = wx.p.storage.get('first_enter_miniprograme')
// 获取扫码链接带入的门店
if (HAVE_ENTER && !this.fresh) {
const merchant = wx.p.storage.get('first_enter_merchantId')
const ISNEWMERCHANT = MerchantList.includes(merchant)
if(!ISNEWMERCHANT){
MerchantList.push(merchant)
}
}
let storeList = [], index = 0
storeList = await this.getMerchantListData(MerchantList) || []
storeList.forEach((ele, i) => {
......
......@@ -26,7 +26,7 @@ export const STORAGE_OBJECTkEY = {
// 设置默认门店信息
export const MERCHANT_STATIC_LIST = {
'develop': [44211227, 44209845],
'test': [44212577, 44210895, 44212578, 44210956],
'test': [44212577, 44212578, 44210956],
'beta': [44211427, 44211428],
'production': [44209566, 44209565],
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!