From 8fdfdcf04e5a7bc12bdaea8876c07659ae8446b0 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Wed, 28 Jun 2023 17:20:08 +0800 Subject: [PATCH] 优化 --- packageA/pages/goodsInfo/goodsInfo.js | 25 +++++++++++++++++++++---- packageA/pages/goodsInfo/goodsInfo.wxss | 2 +- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 25 ++++++++++++++++++++----- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss | 7 ++++--- packageC/pages/presell/cart/cart.js | 2 +- packageC/pages/presell/goodsInfo/goodsInfo.js | 25 ++++++++++++++++++++----- packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js | 24 ++++++++++++++++++++---- packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js | 24 +++++++++++++++++++----- pages/giftpack/buygiftpack/giftpackbuy.js | 24 ++++++++++++++++++++---- pages/giftpack/giftpacklist/giftpacklist.js | 24 +++++++++++++++++++----- pages/goods/goodsInfo/goodsInfo.js | 24 +++++++++++++++++++----- 11 files changed, 164 insertions(+), 42 deletions(-) diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index 5f59b67..f103d09 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -1799,8 +1799,15 @@ 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 +1831,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 +2665,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 +2812,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..7c06ec7 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -3333,8 +3333,15 @@ 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 +3365,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 +5888,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..42afbcc 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: 700rpx; overflow-y: scroll; margin: auto; - max-height: 610rpx; + max-height: 700rpx; } .store-list .store_choose{ width: 100%; @@ -2573,11 +2573,12 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - max-height: 700rpx; + max-height: 790rpx; overflow: hidden; overflow-y: scroll; width: 95%; margin: auto; + min-height: 790rpx; } .sort_store_list .sort-store-frame{ width: 100%; diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 6fe172f..5d377e2 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -119,7 +119,7 @@ Page({ order_prom_amount:0, paying:0, - same_ok:1 //同城配送按钮控制 + same_ok:1, //同城配送按钮控制 bconfig: null, showFold:true, }, diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index a9f2b3c..a9cb01f 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -2065,8 +2065,15 @@ 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 +2097,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 +3832,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 b7e5532..6166b81 100644 --- a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js @@ -236,8 +236,15 @@ 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 +268,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 +527,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..7f18159 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..62099a0 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -63,6 +63,7 @@ Page({ open_ind_store: 0, //哪里打开的门店列表的控制属性 default_store: {}, //创建添加默认门店地址的对象 + old_all_sto:null, store:0, openSpecModal:0, @@ -223,8 +224,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 +255,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 +498,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..b9e6a75 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 36e6add..28db40a 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -3832,8 +3832,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) { @@ -3857,9 +3863,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 + }) + } } @@ -6933,7 +6945,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