Commit 8fdfdcf04e5a7bc12bdaea8876c07659ae8446b0

Authored by 前端开发-罗建龙
1 parent fcb93326

优化

packageA/pages/goodsInfo/goodsInfo.js
@@ -1799,8 +1799,15 @@ Page({ @@ -1799,8 +1799,15 @@ Page({
1799 }else{ //分类下搜索 1799 }else{ //分类下搜索
1800 let sec_i=this.data.sec_i 1800 let sec_i=this.data.sec_i
1801 let all_sto = this.data.all_sto 1801 let all_sto = this.data.all_sto
  1802 + let old_all_sto = this.data.old_all_sto
  1803 + if (!old_all_sto) {
  1804 + this.setData({
  1805 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  1806 + })
  1807 + }
1802 let sec_sto= this.data.sec_sto 1808 let sec_sto= this.data.sec_sto
1803 - let sec_arr = sec_sto.s_arr 1809 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  1810 +
1804 let keyword = this.data.keyword 1811 let keyword = this.data.keyword
1805 let text='sec_sto.s_arr' 1812 let text='sec_sto.s_arr'
1806 if (keyword) { 1813 if (keyword) {
@@ -1824,9 +1831,15 @@ Page({ @@ -1824,9 +1831,15 @@ Page({
1824 }) 1831 })
1825 } 1832 }
1826 }else{ 1833 }else{
1827 - this.setData({  
1828 - [text]:all_sto[sec_i].s_arr  
1829 - }) 1834 + if(this.data.old_all_sto){
  1835 + this.setData({
  1836 + [text]: this.data.old_all_sto[sec_i].s_arr
  1837 + })
  1838 + }else{
  1839 + this.setData({
  1840 + [text]: all_sto[sec_i].s_arr
  1841 + })
  1842 + }
1830 } 1843 }
1831 1844
1832 1845
@@ -2652,6 +2665,9 @@ Page({ @@ -2652,6 +2665,9 @@ Page({
2652 2665
2653 // 选择门店 2666 // 选择门店
2654 choice_store: function(ee) { 2667 choice_store: function(ee) {
  2668 + this.setData({
  2669 + keyword:''
  2670 + })
2655 var th = this; 2671 var th = this;
2656 var ind=ee.currentTarget.dataset.ind; 2672 var ind=ee.currentTarget.dataset.ind;
2657 var bconfig = th.data.bconfig; 2673 var bconfig = th.data.bconfig;
@@ -2796,6 +2812,7 @@ Page({ @@ -2796,6 +2812,7 @@ Page({
2796 sort_store: 0, 2812 sort_store: 0,
2797 choice_sort_store: 1, 2813 choice_sort_store: 1,
2798 sec_sto: item, 2814 sec_sto: item,
  2815 + sec_i:index,
2799 sec_pick_index: 0 2816 sec_pick_index: 0
2800 }); 2817 });
2801 }, 2818 },
packageA/pages/goodsInfo/goodsInfo.wxss
@@ -2503,7 +2503,7 @@ bottom: 0; @@ -2503,7 +2503,7 @@ bottom: 0;
2503 } 2503 }
2504 .store-list{ 2504 .store-list{
2505 width: 95%; 2505 width: 95%;
2506 - height: 72%; 2506 + height: 60%;
2507 overflow-y: scroll; 2507 overflow-y: scroll;
2508 margin: auto; 2508 margin: auto;
2509 } 2509 }
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -3333,8 +3333,15 @@ Page({ @@ -3333,8 +3333,15 @@ Page({
3333 }else{ //分类下搜索 3333 }else{ //分类下搜索
3334 let sec_i=this.data.sec_i 3334 let sec_i=this.data.sec_i
3335 let all_sto = this.data.all_sto 3335 let all_sto = this.data.all_sto
  3336 + let old_all_sto = this.data.old_all_sto
  3337 + if (!old_all_sto) {
  3338 + this.setData({
  3339 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  3340 + })
  3341 + }
3336 let sec_sto= this.data.sec_sto 3342 let sec_sto= this.data.sec_sto
3337 - let sec_arr = sec_sto.s_arr 3343 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  3344 +
3338 let keyword = this.data.keyword 3345 let keyword = this.data.keyword
3339 let text='sec_sto.s_arr' 3346 let text='sec_sto.s_arr'
3340 if (keyword) { 3347 if (keyword) {
@@ -3358,9 +3365,15 @@ Page({ @@ -3358,9 +3365,15 @@ Page({
3358 }) 3365 })
3359 } 3366 }
3360 }else{ 3367 }else{
3361 - this.setData({  
3362 - [text]:all_sto[sec_i].s_arr  
3363 - }) 3368 + if(this.data.old_all_sto){
  3369 + this.setData({
  3370 + [text]: this.data.old_all_sto[sec_i].s_arr
  3371 + })
  3372 + }else{
  3373 + this.setData({
  3374 + [text]: all_sto[sec_i].s_arr
  3375 + })
  3376 + }
3364 } 3377 }
3365 3378
3366 3379
@@ -5875,7 +5888,9 @@ Page({ @@ -5875,7 +5888,9 @@ Page({
5875 5888
5876 // 选择门店 5889 // 选择门店
5877 choice_store: function (ee) { 5890 choice_store: function (ee) {
5878 - 5891 + this.setData({
  5892 + keyword:''
  5893 + })
5879 //--先判断会员状态-- 5894 //--先判断会员状态--
5880 var user_info = getApp().globalData.userInfo; 5895 var user_info = getApp().globalData.userInfo;
5881 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 5896 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -2500,10 +2500,10 @@ bottom: 0; @@ -2500,10 +2500,10 @@ bottom: 0;
2500 } 2500 }
2501 .store-list{ 2501 .store-list{
2502 width: 95%; 2502 width: 95%;
2503 - min-height: 300rpx; 2503 + min-height: 700rpx;
2504 overflow-y: scroll; 2504 overflow-y: scroll;
2505 margin: auto; 2505 margin: auto;
2506 - max-height: 610rpx; 2506 + max-height: 700rpx;
2507 } 2507 }
2508 .store-list .store_choose{ 2508 .store-list .store_choose{
2509 width: 100%; 2509 width: 100%;
@@ -2573,11 +2573,12 @@ line-height: 38rpx; @@ -2573,11 +2573,12 @@ line-height: 38rpx;
2573 } 2573 }
2574 /* 门店分类列表 */ 2574 /* 门店分类列表 */
2575 .sort_store_list{ 2575 .sort_store_list{
2576 - max-height: 700rpx; 2576 + max-height: 790rpx;
2577 overflow: hidden; 2577 overflow: hidden;
2578 overflow-y: scroll; 2578 overflow-y: scroll;
2579 width: 95%; 2579 width: 95%;
2580 margin: auto; 2580 margin: auto;
  2581 + min-height: 790rpx;
2581 } 2582 }
2582 .sort_store_list .sort-store-frame{ 2583 .sort_store_list .sort-store-frame{
2583 width: 100%; 2584 width: 100%;
packageC/pages/presell/cart/cart.js
@@ -119,7 +119,7 @@ Page({ @@ -119,7 +119,7 @@ Page({
119 order_prom_amount:0, 119 order_prom_amount:0,
120 paying:0, 120 paying:0,
121 121
122 - same_ok:1 //同城配送按钮控制 122 + same_ok:1, //同城配送按钮控制
123 bconfig: null, 123 bconfig: null,
124 showFold:true, 124 showFold:true,
125 }, 125 },
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -2065,8 +2065,15 @@ Page({ @@ -2065,8 +2065,15 @@ Page({
2065 }else{ //分类下搜索 2065 }else{ //分类下搜索
2066 let sec_i=this.data.sec_i 2066 let sec_i=this.data.sec_i
2067 let all_sto = this.data.all_sto 2067 let all_sto = this.data.all_sto
  2068 + let old_all_sto = this.data.old_all_sto
  2069 + if (!old_all_sto) {
  2070 + this.setData({
  2071 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  2072 + })
  2073 + }
2068 let sec_sto= this.data.sec_sto 2074 let sec_sto= this.data.sec_sto
2069 - let sec_arr = sec_sto.s_arr 2075 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  2076 +
2070 let keyword = this.data.keyword 2077 let keyword = this.data.keyword
2071 let text='sec_sto.s_arr' 2078 let text='sec_sto.s_arr'
2072 if (keyword) { 2079 if (keyword) {
@@ -2090,9 +2097,15 @@ Page({ @@ -2090,9 +2097,15 @@ Page({
2090 }) 2097 })
2091 } 2098 }
2092 }else{ 2099 }else{
2093 - this.setData({  
2094 - [text]:all_sto[sec_i].s_arr  
2095 - }) 2100 + if(this.data.old_all_sto){
  2101 + this.setData({
  2102 + [text]: this.data.old_all_sto[sec_i].s_arr
  2103 + })
  2104 + }else{
  2105 + this.setData({
  2106 + [text]: all_sto[sec_i].s_arr
  2107 + })
  2108 + }
2096 } 2109 }
2097 2110
2098 2111
@@ -3819,7 +3832,9 @@ Page({ @@ -3819,7 +3832,9 @@ Page({
3819 }, 3832 },
3820 // 选择门店 3833 // 选择门店
3821 choice_store: function (ee) { 3834 choice_store: function (ee) {
3822 - 3835 + this.setData({
  3836 + keyword:''
  3837 + })
3823 //--先判断会员状态-- 3838 //--先判断会员状态--
3824 var user_info = getApp().globalData.userInfo; 3839 var user_info = getApp().globalData.userInfo;
3825 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 3840 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
@@ -236,8 +236,15 @@ Page({ @@ -236,8 +236,15 @@ Page({
236 }else{ //分类下搜索 236 }else{ //分类下搜索
237 let sec_i=this.data.sec_i 237 let sec_i=this.data.sec_i
238 let all_sto = this.data.all_sto 238 let all_sto = this.data.all_sto
  239 + let old_all_sto = this.data.old_all_sto
  240 + if (!old_all_sto) {
  241 + this.setData({
  242 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  243 + })
  244 + }
239 let sec_sto= this.data.sec_sto 245 let sec_sto= this.data.sec_sto
240 - let sec_arr = sec_sto.s_arr 246 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  247 +
241 let keyword = this.data.keyword 248 let keyword = this.data.keyword
242 let text='sec_sto.s_arr' 249 let text='sec_sto.s_arr'
243 if (keyword) { 250 if (keyword) {
@@ -261,9 +268,15 @@ Page({ @@ -261,9 +268,15 @@ Page({
261 }) 268 })
262 } 269 }
263 }else{ 270 }else{
264 - this.setData({  
265 - [text]:all_sto[sec_i].s_arr  
266 - }) 271 + if(this.data.old_all_sto){
  272 + this.setData({
  273 + [text]: this.data.old_all_sto[sec_i].s_arr
  274 + })
  275 + }else{
  276 + this.setData({
  277 + [text]: all_sto[sec_i].s_arr
  278 + })
  279 + }
267 } 280 }
268 281
269 282
@@ -514,6 +527,9 @@ Page({ @@ -514,6 +527,9 @@ Page({
514 }, 527 },
515 // 选择门店 528 // 选择门店
516 choice_store: function (ee) { 529 choice_store: function (ee) {
  530 + this.setData({
  531 + keyword:''
  532 + })
517 //--先判断会员状态-- 533 //--先判断会员状态--
518 var user_info = getApp().globalData.userInfo; 534 var user_info = getApp().globalData.userInfo;
519 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 535 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -1014,8 +1014,14 @@ Page({ @@ -1014,8 +1014,14 @@ Page({
1014 }else{ //分类下搜索 1014 }else{ //分类下搜索
1015 let sec_i=this.data.sec_i 1015 let sec_i=this.data.sec_i
1016 let all_sto = this.data.all_sto 1016 let all_sto = this.data.all_sto
  1017 + let old_all_sto = this.data.old_all_sto
  1018 + if (!old_all_sto) {
  1019 + this.setData({
  1020 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  1021 + })
  1022 + }
1017 let sec_sto= this.data.sec_sto 1023 let sec_sto= this.data.sec_sto
1018 - let sec_arr = sec_sto.s_arr 1024 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
1019 let keyword = this.data.keyword 1025 let keyword = this.data.keyword
1020 let text='sec_sto.s_arr' 1026 let text='sec_sto.s_arr'
1021 if (keyword) { 1027 if (keyword) {
@@ -1039,9 +1045,15 @@ Page({ @@ -1039,9 +1045,15 @@ Page({
1039 }) 1045 })
1040 } 1046 }
1041 }else{ 1047 }else{
1042 - this.setData({  
1043 - [text]:all_sto[sec_i].s_arr  
1044 - }) 1048 + if(this.data.old_all_sto){
  1049 + this.setData({
  1050 + [text]: this.data.old_all_sto[sec_i].s_arr
  1051 + })
  1052 + }else{
  1053 + this.setData({
  1054 + [text]: all_sto[sec_i].s_arr
  1055 + })
  1056 + }
1045 } 1057 }
1046 1058
1047 1059
@@ -1104,7 +1116,9 @@ Page({ @@ -1104,7 +1116,9 @@ Page({
1104 }, 1116 },
1105 // 选择门店 1117 // 选择门店
1106 choice_store: function (ee) { 1118 choice_store: function (ee) {
1107 - 1119 + this.setData({
  1120 + keyword:''
  1121 + })
1108 //--先判断会员状态-- 1122 //--先判断会员状态--
1109 var user_info = getApp().globalData.userInfo; 1123 var user_info = getApp().globalData.userInfo;
1110 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 1124 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -63,6 +63,7 @@ Page({ @@ -63,6 +63,7 @@ Page({
63 open_ind_store: 0, //哪里打开的门店列表的控制属性 63 open_ind_store: 0, //哪里打开的门店列表的控制属性
64 default_store: {}, //创建添加默认门店地址的对象 64 default_store: {}, //创建添加默认门店地址的对象
65 65
  66 + old_all_sto:null,
66 store:0, 67 store:0,
67 openSpecModal:0, 68 openSpecModal:0,
68 69
@@ -223,8 +224,14 @@ Page({ @@ -223,8 +224,14 @@ Page({
223 }else{ //分类下搜索 224 }else{ //分类下搜索
224 let sec_i=this.data.sec_i 225 let sec_i=this.data.sec_i
225 let all_sto = this.data.all_sto 226 let all_sto = this.data.all_sto
  227 + let old_all_sto = this.data.old_all_sto
  228 + if (!old_all_sto) {
  229 + this.setData({
  230 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  231 + })
  232 + }
226 let sec_sto= this.data.sec_sto 233 let sec_sto= this.data.sec_sto
227 - let sec_arr = sec_sto.s_arr 234 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
228 let keyword = this.data.keyword 235 let keyword = this.data.keyword
229 let text='sec_sto.s_arr' 236 let text='sec_sto.s_arr'
230 if (keyword) { 237 if (keyword) {
@@ -248,9 +255,15 @@ Page({ @@ -248,9 +255,15 @@ Page({
248 }) 255 })
249 } 256 }
250 }else{ 257 }else{
251 - this.setData({  
252 - [text]:all_sto[sec_i].s_arr  
253 - }) 258 + if(this.data.old_all_sto){
  259 + this.setData({
  260 + [text]: this.data.old_all_sto[sec_i].s_arr
  261 + })
  262 + }else{
  263 + this.setData({
  264 + [text]: all_sto[sec_i].s_arr
  265 + })
  266 + }
254 } 267 }
255 268
256 269
@@ -485,6 +498,9 @@ Page({ @@ -485,6 +498,9 @@ Page({
485 }, 498 },
486 // 选择门店 499 // 选择门店
487 choice_store: function (ee) { 500 choice_store: function (ee) {
  501 + this.setData({
  502 + keyword:''
  503 + })
488 //--先判断会员状态-- 504 //--先判断会员状态--
489 var user_info = getApp().globalData.userInfo; 505 var user_info = getApp().globalData.userInfo;
490 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 506 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
pages/giftpack/giftpacklist/giftpacklist.js
@@ -238,8 +238,14 @@ Page({ @@ -238,8 +238,14 @@ Page({
238 }else{ //分类下搜索 238 }else{ //分类下搜索
239 let sec_i=this.data.sec_i 239 let sec_i=this.data.sec_i
240 let all_sto = this.data.all_sto 240 let all_sto = this.data.all_sto
  241 + let old_all_sto = this.data.old_all_sto
  242 + if (!old_all_sto) {
  243 + this.setData({
  244 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  245 + })
  246 + }
241 let sec_sto= this.data.sec_sto 247 let sec_sto= this.data.sec_sto
242 - let sec_arr = sec_sto.s_arr 248 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
243 let keyword = this.data.keyword 249 let keyword = this.data.keyword
244 let text='sec_sto.s_arr' 250 let text='sec_sto.s_arr'
245 if (keyword) { 251 if (keyword) {
@@ -263,9 +269,15 @@ Page({ @@ -263,9 +269,15 @@ Page({
263 }) 269 })
264 } 270 }
265 }else{ 271 }else{
266 - this.setData({  
267 - [text]:all_sto[sec_i].s_arr  
268 - }) 272 + if(this.data.old_all_sto){
  273 + this.setData({
  274 + [text]: this.data.old_all_sto[sec_i].s_arr
  275 + })
  276 + }else{
  277 + this.setData({
  278 + [text]: all_sto[sec_i].s_arr
  279 + })
  280 + }
269 } 281 }
270 282
271 283
@@ -779,7 +791,9 @@ Page({ @@ -779,7 +791,9 @@ Page({
779 }, 791 },
780 // 选择门店 792 // 选择门店
781 choice_store: function (ee) { 793 choice_store: function (ee) {
782 - 794 + this.setData({
  795 + keyword:''
  796 + })
783 //--先判断会员状态-- 797 //--先判断会员状态--
784 var user_info = getApp().globalData.userInfo; 798 var user_info = getApp().globalData.userInfo;
785 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 799 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
pages/goods/goodsInfo/goodsInfo.js
@@ -3832,8 +3832,14 @@ Page({ @@ -3832,8 +3832,14 @@ Page({
3832 }else{ //分类下搜索 3832 }else{ //分类下搜索
3833 let sec_i=this.data.sec_i 3833 let sec_i=this.data.sec_i
3834 let all_sto = this.data.all_sto 3834 let all_sto = this.data.all_sto
  3835 + let old_all_sto = this.data.old_all_sto
  3836 + if (!old_all_sto) {
  3837 + this.setData({
  3838 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  3839 + })
  3840 + }
3835 let sec_sto= this.data.sec_sto 3841 let sec_sto= this.data.sec_sto
3836 - let sec_arr = sec_sto.s_arr 3842 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
3837 let keyword = this.data.keyword 3843 let keyword = this.data.keyword
3838 let text='sec_sto.s_arr' 3844 let text='sec_sto.s_arr'
3839 if (keyword) { 3845 if (keyword) {
@@ -3857,9 +3863,15 @@ Page({ @@ -3857,9 +3863,15 @@ Page({
3857 }) 3863 })
3858 } 3864 }
3859 }else{ 3865 }else{
3860 - this.setData({  
3861 - [text]:all_sto[sec_i].s_arr  
3862 - }) 3866 + if(this.data.old_all_sto){
  3867 + this.setData({
  3868 + [text]: this.data.old_all_sto[sec_i].s_arr
  3869 + })
  3870 + }else{
  3871 + this.setData({
  3872 + [text]: all_sto[sec_i].s_arr
  3873 + })
  3874 + }
3863 } 3875 }
3864 3876
3865 3877
@@ -6933,7 +6945,9 @@ Page({ @@ -6933,7 +6945,9 @@ Page({
6933 var th = this; 6945 var th = this;
6934 var ind = ee.currentTarget.dataset.ind; 6946 var ind = ee.currentTarget.dataset.ind;
6935 var bconfig = th.data.bconfig; 6947 var bconfig = th.data.bconfig;
6936 - 6948 + this.setData({
  6949 + keyword:''
  6950 + })
6937 //--先判断会员状态-- 6951 //--先判断会员状态--
6938 var user_info = getApp().globalData.userInfo; 6952 var user_info = getApp().globalData.userInfo;
6939 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 6953 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {