From 620f449d14c3e9361ff08c2c5db52b38a25fd927 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Wed, 21 Jun 2023 18:00:36 +0800 Subject: [PATCH] 优化 --- packageA/pages/goodsInfo/goodsInfo.js | 24 ++++++++++++++++++++---- packageA/pages/goodsInfo/goodsInfo.wxss | 2 +- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 24 +++++++++++++++++++----- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss | 7 ++++--- packageC/pages/presell/goodsInfo/goodsInfo.js | 24 +++++++++++++++++++----- packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js | 23 +++++++++++++++++++---- packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js | 24 +++++++++++++++++++----- pages/giftpack/buygiftpack/giftpackbuy.js | 25 ++++++++++++++++++++----- pages/giftpack/giftpacklist/giftpacklist.js | 24 +++++++++++++++++++----- pages/goods/goodsInfo/goodsInfo.js | 24 +++++++++++++++++++----- 10 files changed, 159 insertions(+), 42 deletions(-) diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index 5f59b67..abda8c7 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -1799,8 +1799,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -1824,9 +1830,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -2652,6 +2664,9 @@ Page({ // 选择门店 choice_store: function(ee) { + this.setData({ + keyword:'' + }) var th = this; var ind=ee.currentTarget.dataset.ind; var bconfig = th.data.bconfig; @@ -2796,6 +2811,7 @@ Page({ sort_store: 0, choice_sort_store: 1, sec_sto: item, + sec_i:index, sec_pick_index: 0 }); }, diff --git a/packageA/pages/goodsInfo/goodsInfo.wxss b/packageA/pages/goodsInfo/goodsInfo.wxss index 30cece2..875222b 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxss +++ b/packageA/pages/goodsInfo/goodsInfo.wxss @@ -2503,7 +2503,7 @@ bottom: 0; } .store-list{ width: 95%; - height: 72%; + height: 60%; overflow-y: scroll; margin: auto; } diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 2e3306d..68c1ef2 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -3333,8 +3333,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -3358,9 +3364,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -5875,7 +5887,9 @@ Page({ // 选择门店 choice_store: function (ee) { - + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss index 0b47843..e3b5a30 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss @@ -2500,10 +2500,10 @@ bottom: 0; } .store-list{ width: 95%; - min-height: 300rpx; + min-height: 610rpx; overflow-y: scroll; margin: auto; - max-height: 610rpx; + max-height: 700rpx; } .store-list .store_choose{ width: 100%; @@ -2573,7 +2573,8 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - max-height: 700rpx; + /* max-height: 700rpx; */ + min-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index a9f2b3c..8821c64 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -2065,8 +2065,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -2090,9 +2096,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -3819,7 +3831,9 @@ Page({ }, // 选择门店 choice_store: function (ee) { - + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js index 9a10848..cfbbaa9 100644 --- a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js @@ -236,8 +236,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -261,9 +267,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -514,6 +526,9 @@ Page({ }, // 选择门店 choice_store: function (ee) { + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js index 6b65103..a7b1865 100644 --- a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js @@ -1014,8 +1014,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -1039,9 +1045,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -1104,7 +1116,9 @@ Page({ }, // 选择门店 choice_store: function (ee) { - + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index fa6341c..c594cf0 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -62,7 +62,7 @@ Page({ is_gps: 1, open_ind_store: 0, //哪里打开的门店列表的控制属性 default_store: {}, //创建添加默认门店地址的对象 - + old_all_sto:null, store:0, openSpecModal:0, @@ -223,8 +223,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -248,9 +254,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -485,6 +497,9 @@ Page({ }, // 选择门店 choice_store: function (ee) { + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index eb1a5f7..7f34720 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -238,8 +238,14 @@ Page({ }else{ //分类下搜索 let sec_i=this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto= this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text='sec_sto.s_arr' if (keyword) { @@ -263,9 +269,15 @@ Page({ }) } }else{ - this.setData({ - [text]:all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -779,7 +791,9 @@ Page({ }, // 选择门店 choice_store: function (ee) { - + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index cdf5517..ca3ff1b 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -3742,8 +3742,14 @@ Page({ } else { //分类下搜索 let sec_i = this.data.sec_i let all_sto = this.data.all_sto + let old_all_sto = this.data.old_all_sto + if (!old_all_sto) { + this.setData({ + old_all_sto:JSON.parse(JSON.stringify(all_sto)) + }) + } let sec_sto = this.data.sec_sto - let sec_arr = sec_sto.s_arr + let sec_arr = this.data.old_all_sto[sec_i].s_arr let keyword = this.data.keyword let text = 'sec_sto.s_arr' if (keyword) { @@ -3767,9 +3773,15 @@ Page({ }) } } else { - this.setData({ - [text]: all_sto[sec_i].s_arr - }) + if(this.data.old_all_sto){ + this.setData({ + [text]: this.data.old_all_sto[sec_i].s_arr + }) + }else{ + this.setData({ + [text]: all_sto[sec_i].s_arr + }) + } } @@ -6852,7 +6864,9 @@ Page({ var th = this; var ind = ee.currentTarget.dataset.ind; var bconfig = th.data.bconfig; - + this.setData({ + keyword:'' + }) //--先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { -- libgit2 0.21.4