Commit cab0ba5bf8342246cc49e8d50da853c1dee9d584
解决冲突
Showing
25 changed files
with
970 additions
and
12 deletions
packageA/pages/goodsInfo/goodsInfo.js
| @@ -11,7 +11,7 @@ var t = require("../../../utils/util.js"), | @@ -11,7 +11,7 @@ var t = require("../../../utils/util.js"), | ||
| 11 | 11 | ||
| 12 | let self = null; | 12 | let self = null; |
| 13 | 13 | ||
| 14 | -//评价加载更多 | 14 | +//评价加载更多 |
| 15 | var more = function(e) { | 15 | var more = function(e) { |
| 16 | return e && e.__esModule ? e : { | 16 | return e && e.__esModule ? e : { |
| 17 | default: e | 17 | default: e |
| @@ -212,7 +212,9 @@ Page({ | @@ -212,7 +212,9 @@ Page({ | ||
| 212 | 212 | ||
| 213 | hiddenCS: true, //控制客服操作菜单显示和控制 | 213 | hiddenCS: true, //控制客服操作菜单显示和控制 |
| 214 | 214 | ||
| 215 | - openSpecModal_flash_normal: 0, | 215 | + openSpecModal_flash_normal: 0, |
| 216 | + keyword:'', //门店搜索 | ||
| 217 | + sec_i:-1,//选中分类门店 下标 | ||
| 216 | }, | 218 | }, |
| 217 | 219 | ||
| 218 | //------初始化加载---------- | 220 | //------初始化加载---------- |
| @@ -1743,6 +1745,93 @@ Page({ | @@ -1743,6 +1745,93 @@ Page({ | ||
| 1743 | }) | 1745 | }) |
| 1744 | }, 200) | 1746 | }, 200) |
| 1745 | }, | 1747 | }, |
| 1748 | + //获取搜索门店输入的值 | ||
| 1749 | + input_store: function(e) { | ||
| 1750 | + this.setData({ | ||
| 1751 | + keyword: e.detail.value | ||
| 1752 | + }) | ||
| 1753 | + }, | ||
| 1754 | + //搜索门店 | ||
| 1755 | + searchfn(){ | ||
| 1756 | + let choice_sort_store = this.data.choice_sort_store | ||
| 1757 | + if (choice_sort_store==0) { //全局搜索 | ||
| 1758 | + let all_pick_list = this.data.all_pick_list | ||
| 1759 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 1760 | + let keyword = this.data.keyword | ||
| 1761 | + if (keyword) { | ||
| 1762 | + let arr=all_pick_list.filter( item =>{ | ||
| 1763 | + let i = item.pickup_name.indexOf(keyword) | ||
| 1764 | + if (i > -1) { | ||
| 1765 | + return true | ||
| 1766 | + }else{ | ||
| 1767 | + return false | ||
| 1768 | + } | ||
| 1769 | + }) | ||
| 1770 | + if (arr && arr.length>0) { | ||
| 1771 | + if(this.data.is_show_sto_cat==1){ | ||
| 1772 | + this.setData({ | ||
| 1773 | + def_pickpu_list:arr | ||
| 1774 | + }) | ||
| 1775 | + }else{ | ||
| 1776 | + this.setData({ | ||
| 1777 | + only_pk:arr | ||
| 1778 | + }) | ||
| 1779 | + } | ||
| 1780 | + }else{ | ||
| 1781 | + wx.showToast({ | ||
| 1782 | + title: '没有搜索到门店', | ||
| 1783 | + icon: 'none', | ||
| 1784 | + duration: 2000 | ||
| 1785 | + }) | ||
| 1786 | + } | ||
| 1787 | + }else{ | ||
| 1788 | + if (this.data.is_show_sto_cat==1) { | ||
| 1789 | + this.setData({ | ||
| 1790 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 1791 | + }) | ||
| 1792 | + }else{ | ||
| 1793 | + this.setData({ | ||
| 1794 | + only_pk:all_pick_list | ||
| 1795 | + }) | ||
| 1796 | + } | ||
| 1797 | + | ||
| 1798 | + } | ||
| 1799 | + }else{ //分类下搜索 | ||
| 1800 | + let sec_i=this.data.sec_i | ||
| 1801 | + let all_sto = this.data.all_sto | ||
| 1802 | + let sec_sto= this.data.sec_sto | ||
| 1803 | + let sec_arr = sec_sto.s_arr | ||
| 1804 | + let keyword = this.data.keyword | ||
| 1805 | + let text='sec_sto.s_arr' | ||
| 1806 | + if (keyword) { | ||
| 1807 | + let arr=sec_arr.filter( item =>{ | ||
| 1808 | + let i = item.pickup_name.indexOf(keyword) | ||
| 1809 | + if (i > -1) { | ||
| 1810 | + return true | ||
| 1811 | + }else{ | ||
| 1812 | + return false | ||
| 1813 | + } | ||
| 1814 | + }) | ||
| 1815 | + if (arr && arr.length>0) { | ||
| 1816 | + this.setData({ | ||
| 1817 | + [text]:arr | ||
| 1818 | + }) | ||
| 1819 | + }else{ | ||
| 1820 | + wx.showToast({ | ||
| 1821 | + title: '没有搜索到门店', | ||
| 1822 | + icon: 'none', | ||
| 1823 | + duration: 2000 | ||
| 1824 | + }) | ||
| 1825 | + } | ||
| 1826 | + }else{ | ||
| 1827 | + this.setData({ | ||
| 1828 | + [text]:all_sto[sec_i].s_arr | ||
| 1829 | + }) | ||
| 1830 | + } | ||
| 1831 | + | ||
| 1832 | + | ||
| 1833 | + } | ||
| 1834 | + }, | ||
| 1746 | 1835 | ||
| 1747 | 1836 | ||
| 1748 | //------------处理门店--------------- | 1837 | //------------处理门店--------------- |
packageA/pages/goodsInfo/goodsInfo.wxml
| @@ -806,6 +806,12 @@ | @@ -806,6 +806,12 @@ | ||
| 806 | </view> | 806 | </view> |
| 807 | </view> | 807 | </view> |
| 808 | </view> | 808 | </view> |
| 809 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
| 810 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 811 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 812 | + <view class="fs28">搜索</view> | ||
| 813 | + </view> | ||
| 814 | + </view> | ||
| 809 | <!-- 门店列表,最外层的门店列表,一开始 --> | 815 | <!-- 门店列表,最外层的门店列表,一开始 --> |
| 810 | <view class="store-list"> | 816 | <view class="store-list"> |
| 811 | <!--如果还没有点击更多门店的时候 --> | 817 | <!--如果还没有点击更多门店的时候 --> |
packageA/pages/goodsInfo/goodsInfo.wxss
| @@ -2968,5 +2968,28 @@ button.custom-service::after{ | @@ -2968,5 +2968,28 @@ button.custom-service::after{ | ||
| 2968 | left: -1000px; | 2968 | left: -1000px; |
| 2969 | top: -1000px; | 2969 | top: -1000px; |
| 2970 | } | 2970 | } |
| 2971 | - | 2971 | + |
| 2972 | +.searchbar { | ||
| 2973 | + height: 95rpx; | ||
| 2974 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 2975 | +} | ||
| 2976 | +.storeListpadd { | ||
| 2977 | + padding: 0rpx 31rpx; | ||
| 2978 | +} | ||
| 2979 | +.search { | ||
| 2980 | + width: 125rpx; | ||
| 2981 | + height: 45rpx; | ||
| 2982 | + line-height: 45rpx; | ||
| 2983 | + background-color: rgb(219, 27, 52); | ||
| 2984 | + border-radius: 30rpx; | ||
| 2985 | + color: rgb(255, 255, 255); | ||
| 2986 | +} | ||
| 2987 | +.inputstore { | ||
| 2988 | + width: 510rpx; | ||
| 2989 | + height: 43rpx; | ||
| 2990 | + line-height: 43rpx; | ||
| 2991 | + border-radius: 30rpx; | ||
| 2992 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 2993 | + padding-left: 30rpx; | ||
| 2994 | +} | ||
| 2972 | 2995 |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| @@ -285,6 +285,8 @@ Page({ | @@ -285,6 +285,8 @@ Page({ | ||
| 285 | 285 | ||
| 286 | hiddenCS: true, | 286 | hiddenCS: true, |
| 287 | is_get_guide:0, | 287 | is_get_guide:0, |
| 288 | + keyword:'', //门店搜索 | ||
| 289 | + sec_i:-1,//选中分类门店 下标 | ||
| 288 | }, | 290 | }, |
| 289 | 291 | ||
| 290 | //------初始化加载---------- | 292 | //------初始化加载---------- |
| @@ -3277,7 +3279,93 @@ Page({ | @@ -3277,7 +3279,93 @@ Page({ | ||
| 3277 | }, 200) | 3279 | }, 200) |
| 3278 | 3280 | ||
| 3279 | }, | 3281 | }, |
| 3282 | + //获取搜索门店输入的值 | ||
| 3283 | + input_store: function(e) { | ||
| 3284 | + this.setData({ | ||
| 3285 | + keyword: e.detail.value | ||
| 3286 | + }) | ||
| 3287 | + }, | ||
| 3288 | + //搜索门店 | ||
| 3289 | + searchfn(){ | ||
| 3290 | + let choice_sort_store = this.data.choice_sort_store | ||
| 3291 | + if (choice_sort_store==0) { //全局搜索 | ||
| 3292 | + let all_pick_list = this.data.all_pick_list | ||
| 3293 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 3294 | + let keyword = this.data.keyword | ||
| 3295 | + if (keyword) { | ||
| 3296 | + let arr=all_pick_list.filter( item =>{ | ||
| 3297 | + let i = item.pickup_name.indexOf(keyword) | ||
| 3298 | + if (i > -1) { | ||
| 3299 | + return true | ||
| 3300 | + }else{ | ||
| 3301 | + return false | ||
| 3302 | + } | ||
| 3303 | + }) | ||
| 3304 | + if (arr && arr.length>0) { | ||
| 3305 | + if(this.data.is_show_sto_cat==1){ | ||
| 3306 | + this.setData({ | ||
| 3307 | + def_pickpu_list:arr | ||
| 3308 | + }) | ||
| 3309 | + }else{ | ||
| 3310 | + this.setData({ | ||
| 3311 | + only_pk:arr | ||
| 3312 | + }) | ||
| 3313 | + } | ||
| 3314 | + }else{ | ||
| 3315 | + wx.showToast({ | ||
| 3316 | + title: '没有搜索到门店', | ||
| 3317 | + icon: 'none', | ||
| 3318 | + duration: 2000 | ||
| 3319 | + }) | ||
| 3320 | + } | ||
| 3321 | + }else{ | ||
| 3322 | + if (this.data.is_show_sto_cat==1) { | ||
| 3323 | + this.setData({ | ||
| 3324 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 3325 | + }) | ||
| 3326 | + }else{ | ||
| 3327 | + this.setData({ | ||
| 3328 | + only_pk:all_pick_list | ||
| 3329 | + }) | ||
| 3330 | + } | ||
| 3280 | 3331 | ||
| 3332 | + } | ||
| 3333 | + }else{ //分类下搜索 | ||
| 3334 | + let sec_i=this.data.sec_i | ||
| 3335 | + let all_sto = this.data.all_sto | ||
| 3336 | + let sec_sto= this.data.sec_sto | ||
| 3337 | + let sec_arr = sec_sto.s_arr | ||
| 3338 | + let keyword = this.data.keyword | ||
| 3339 | + let text='sec_sto.s_arr' | ||
| 3340 | + if (keyword) { | ||
| 3341 | + let arr=sec_arr.filter( item =>{ | ||
| 3342 | + let i = item.pickup_name.indexOf(keyword) | ||
| 3343 | + if (i > -1) { | ||
| 3344 | + return true | ||
| 3345 | + }else{ | ||
| 3346 | + return false | ||
| 3347 | + } | ||
| 3348 | + }) | ||
| 3349 | + if (arr && arr.length>0) { | ||
| 3350 | + this.setData({ | ||
| 3351 | + [text]:arr | ||
| 3352 | + }) | ||
| 3353 | + }else{ | ||
| 3354 | + wx.showToast({ | ||
| 3355 | + title: '没有搜索到门店', | ||
| 3356 | + icon: 'none', | ||
| 3357 | + duration: 2000 | ||
| 3358 | + }) | ||
| 3359 | + } | ||
| 3360 | + }else{ | ||
| 3361 | + this.setData({ | ||
| 3362 | + [text]:all_sto[sec_i].s_arr | ||
| 3363 | + }) | ||
| 3364 | + } | ||
| 3365 | + | ||
| 3366 | + | ||
| 3367 | + } | ||
| 3368 | + }, | ||
| 3281 | 3369 | ||
| 3282 | //------------处理门店--------------- | 3370 | //------------处理门店--------------- |
| 3283 | deal_pickup(e) { | 3371 | deal_pickup(e) { |
| @@ -5948,6 +6036,7 @@ Page({ | @@ -5948,6 +6036,7 @@ Page({ | ||
| 5948 | sort_store: 0, | 6036 | sort_store: 0, |
| 5949 | choice_sort_store: 1, | 6037 | choice_sort_store: 1, |
| 5950 | sec_sto: item, | 6038 | sec_sto: item, |
| 6039 | + sec_i:index, | ||
| 5951 | sec_pick_index: 0 | 6040 | sec_pick_index: 0 |
| 5952 | }); | 6041 | }); |
| 5953 | }, | 6042 | }, |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| @@ -1345,6 +1345,12 @@ | @@ -1345,6 +1345,12 @@ | ||
| 1345 | </view> | 1345 | </view> |
| 1346 | </view> | 1346 | </view> |
| 1347 | </view> | 1347 | </view> |
| 1348 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
| 1349 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 1350 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 1351 | + <view class="fs28">搜索</view> | ||
| 1352 | + </view> | ||
| 1353 | + </view> | ||
| 1348 | <!-- 门店列表,最外层的门店列表,一开始 --> | 1354 | <!-- 门店列表,最外层的门店列表,一开始 --> |
| 1349 | <view class="store-list"> | 1355 | <view class="store-list"> |
| 1350 | <!-- 如果还没有点击更多门店的时候 --> | 1356 | <!-- 如果还没有点击更多门店的时候 --> |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
| @@ -3116,3 +3116,26 @@ button.custom-service::after{ | @@ -3116,3 +3116,26 @@ button.custom-service::after{ | ||
| 3116 | overflow-y: auto; | 3116 | overflow-y: auto; |
| 3117 | } | 3117 | } |
| 3118 | 3118 | ||
| 3119 | + .searchbar { | ||
| 3120 | + height: 95rpx; | ||
| 3121 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 3122 | +} | ||
| 3123 | +.storeListpadd { | ||
| 3124 | + padding: 0rpx 31rpx; | ||
| 3125 | +} | ||
| 3126 | +.search { | ||
| 3127 | + width: 125rpx; | ||
| 3128 | + height: 45rpx; | ||
| 3129 | + line-height: 45rpx; | ||
| 3130 | + background-color: rgb(219, 27, 52); | ||
| 3131 | + border-radius: 30rpx; | ||
| 3132 | + color: rgb(255, 255, 255); | ||
| 3133 | +} | ||
| 3134 | +.inputstore { | ||
| 3135 | + width: 510rpx; | ||
| 3136 | + height: 43rpx; | ||
| 3137 | + line-height: 43rpx; | ||
| 3138 | + border-radius: 30rpx; | ||
| 3139 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 3140 | + padding-left: 30rpx; | ||
| 3141 | +} |
packageC/pages/presell/goodsInfo/goodsInfo.js
| @@ -257,6 +257,8 @@ Page({ | @@ -257,6 +257,8 @@ Page({ | ||
| 257 | hiddenCS: true, | 257 | hiddenCS: true, |
| 258 | 258 | ||
| 259 | is_retail_price: 0, | 259 | is_retail_price: 0, |
| 260 | + keyword:'', //门店搜索 | ||
| 261 | + sec_i:-1,//选中分类门店 下标 | ||
| 260 | }, | 262 | }, |
| 261 | 263 | ||
| 262 | //------初始化加载---------- | 264 | //------初始化加载---------- |
| @@ -2009,7 +2011,93 @@ Page({ | @@ -2009,7 +2011,93 @@ Page({ | ||
| 2009 | }, 200) | 2011 | }, 200) |
| 2010 | 2012 | ||
| 2011 | }, | 2013 | }, |
| 2014 | + //获取搜索门店输入的值 | ||
| 2015 | + input_store: function(e) { | ||
| 2016 | + this.setData({ | ||
| 2017 | + keyword: e.detail.value | ||
| 2018 | + }) | ||
| 2019 | + }, | ||
| 2020 | + //搜索门店 | ||
| 2021 | + searchfn(){ | ||
| 2022 | + let choice_sort_store = this.data.choice_sort_store | ||
| 2023 | + if (choice_sort_store==0) { //全局搜索 | ||
| 2024 | + let all_pick_list = this.data.all_pick_list | ||
| 2025 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 2026 | + let keyword = this.data.keyword | ||
| 2027 | + if (keyword) { | ||
| 2028 | + let arr=all_pick_list.filter( item =>{ | ||
| 2029 | + let i = item.pickup_name.indexOf(keyword) | ||
| 2030 | + if (i > -1) { | ||
| 2031 | + return true | ||
| 2032 | + }else{ | ||
| 2033 | + return false | ||
| 2034 | + } | ||
| 2035 | + }) | ||
| 2036 | + if (arr && arr.length>0) { | ||
| 2037 | + if(this.data.is_show_sto_cat==1){ | ||
| 2038 | + this.setData({ | ||
| 2039 | + def_pickpu_list:arr | ||
| 2040 | + }) | ||
| 2041 | + }else{ | ||
| 2042 | + this.setData({ | ||
| 2043 | + only_pk:arr | ||
| 2044 | + }) | ||
| 2045 | + } | ||
| 2046 | + }else{ | ||
| 2047 | + wx.showToast({ | ||
| 2048 | + title: '没有搜索到门店', | ||
| 2049 | + icon: 'none', | ||
| 2050 | + duration: 2000 | ||
| 2051 | + }) | ||
| 2052 | + } | ||
| 2053 | + }else{ | ||
| 2054 | + if (this.data.is_show_sto_cat==1) { | ||
| 2055 | + this.setData({ | ||
| 2056 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 2057 | + }) | ||
| 2058 | + }else{ | ||
| 2059 | + this.setData({ | ||
| 2060 | + only_pk:all_pick_list | ||
| 2061 | + }) | ||
| 2062 | + } | ||
| 2063 | + | ||
| 2064 | + } | ||
| 2065 | + }else{ //分类下搜索 | ||
| 2066 | + let sec_i=this.data.sec_i | ||
| 2067 | + let all_sto = this.data.all_sto | ||
| 2068 | + let sec_sto= this.data.sec_sto | ||
| 2069 | + let sec_arr = sec_sto.s_arr | ||
| 2070 | + let keyword = this.data.keyword | ||
| 2071 | + let text='sec_sto.s_arr' | ||
| 2072 | + if (keyword) { | ||
| 2073 | + let arr=sec_arr.filter( item =>{ | ||
| 2074 | + let i = item.pickup_name.indexOf(keyword) | ||
| 2075 | + if (i > -1) { | ||
| 2076 | + return true | ||
| 2077 | + }else{ | ||
| 2078 | + return false | ||
| 2079 | + } | ||
| 2080 | + }) | ||
| 2081 | + if (arr && arr.length>0) { | ||
| 2082 | + this.setData({ | ||
| 2083 | + [text]:arr | ||
| 2084 | + }) | ||
| 2085 | + }else{ | ||
| 2086 | + wx.showToast({ | ||
| 2087 | + title: '没有搜索到门店', | ||
| 2088 | + icon: 'none', | ||
| 2089 | + duration: 2000 | ||
| 2090 | + }) | ||
| 2091 | + } | ||
| 2092 | + }else{ | ||
| 2093 | + this.setData({ | ||
| 2094 | + [text]:all_sto[sec_i].s_arr | ||
| 2095 | + }) | ||
| 2096 | + } | ||
| 2097 | + | ||
| 2012 | 2098 | ||
| 2099 | + } | ||
| 2100 | + }, | ||
| 2013 | 2101 | ||
| 2014 | //------------处理门店--------------- | 2102 | //------------处理门店--------------- |
| 2015 | deal_pickup(e) { | 2103 | deal_pickup(e) { |
| @@ -3886,6 +3974,7 @@ Page({ | @@ -3886,6 +3974,7 @@ Page({ | ||
| 3886 | sort_store: 0, | 3974 | sort_store: 0, |
| 3887 | choice_sort_store: 1, | 3975 | choice_sort_store: 1, |
| 3888 | sec_sto: item, | 3976 | sec_sto: item, |
| 3977 | + sec_i:index, | ||
| 3889 | sec_pick_index: 0 | 3978 | sec_pick_index: 0 |
| 3890 | }); | 3979 | }); |
| 3891 | }, | 3980 | }, |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
| @@ -831,6 +831,12 @@ | @@ -831,6 +831,12 @@ | ||
| 831 | </view> | 831 | </view> |
| 832 | </view> | 832 | </view> |
| 833 | </view> | 833 | </view> |
| 834 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
| 835 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 836 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 837 | + <view class="fs28">搜索</view> | ||
| 838 | + </view> | ||
| 839 | + </view> | ||
| 834 | <!-- 门店列表,最外层的门店列表,一开始 --> | 840 | <!-- 门店列表,最外层的门店列表,一开始 --> |
| 835 | <view class="store-list"> | 841 | <view class="store-list"> |
| 836 | <!-- 如果还没有点击更多门店的时候 --> | 842 | <!-- 如果还没有点击更多门店的时候 --> |
packageC/pages/presell/goodsInfo/goodsInfo.wxss
| @@ -2993,4 +2993,27 @@ button.custom-service::after{ | @@ -2993,4 +2993,27 @@ button.custom-service::after{ | ||
| 2993 | top: -1000px; | 2993 | top: -1000px; |
| 2994 | } | 2994 | } |
| 2995 | 2995 | ||
| 2996 | +.searchbar { | ||
| 2997 | + height: 95rpx; | ||
| 2998 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 2999 | +} | ||
| 3000 | +.storeListpadd { | ||
| 3001 | + padding: 0rpx 31rpx; | ||
| 3002 | +} | ||
| 3003 | +.search { | ||
| 3004 | + width: 125rpx; | ||
| 3005 | + height: 45rpx; | ||
| 3006 | + line-height: 45rpx; | ||
| 3007 | + background-color: rgb(219, 27, 52); | ||
| 3008 | + border-radius: 30rpx; | ||
| 3009 | + color: rgb(255, 255, 255); | ||
| 3010 | +} | ||
| 3011 | +.inputstore { | ||
| 3012 | + width: 510rpx; | ||
| 3013 | + height: 43rpx; | ||
| 3014 | + line-height: 43rpx; | ||
| 3015 | + border-radius: 30rpx; | ||
| 3016 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 3017 | + padding-left: 30rpx; | ||
| 3018 | +} | ||
| 2996 | 3019 |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
| @@ -67,6 +67,8 @@ Page({ | @@ -67,6 +67,8 @@ Page({ | ||
| 67 | openSpecModal:0, | 67 | openSpecModal:0, |
| 68 | 68 | ||
| 69 | is_get_guide:0, | 69 | is_get_guide:0, |
| 70 | + keyword:'', //门店搜索 | ||
| 71 | + sec_i:-1,//选中分类门店 下标 | ||
| 70 | 72 | ||
| 71 | }, | 73 | }, |
| 72 | onLoad: function (options) { | 74 | onLoad: function (options) { |
| @@ -180,7 +182,93 @@ Page({ | @@ -180,7 +182,93 @@ Page({ | ||
| 180 | }) | 182 | }) |
| 181 | },1000) | 183 | },1000) |
| 182 | }, | 184 | }, |
| 185 | + //获取搜索门店输入的值 | ||
| 186 | + input_store: function(e) { | ||
| 187 | + this.setData({ | ||
| 188 | + keyword: e.detail.value | ||
| 189 | + }) | ||
| 190 | + }, | ||
| 191 | + //搜索门店 | ||
| 192 | + searchfn(){ | ||
| 193 | + let choice_sort_store = this.data.choice_sort_store | ||
| 194 | + if (choice_sort_store==0) { //全局搜索 | ||
| 195 | + let all_pick_list = this.data.all_pick_list | ||
| 196 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 197 | + let keyword = this.data.keyword | ||
| 198 | + if (keyword) { | ||
| 199 | + let arr=all_pick_list.filter( item =>{ | ||
| 200 | + let i = item.pickup_name.indexOf(keyword) | ||
| 201 | + if (i > -1) { | ||
| 202 | + return true | ||
| 203 | + }else{ | ||
| 204 | + return false | ||
| 205 | + } | ||
| 206 | + }) | ||
| 207 | + if (arr && arr.length>0) { | ||
| 208 | + if(this.data.is_show_sto_cat==1){ | ||
| 209 | + this.setData({ | ||
| 210 | + def_pickpu_list:arr | ||
| 211 | + }) | ||
| 212 | + }else{ | ||
| 213 | + this.setData({ | ||
| 214 | + only_pk:arr | ||
| 215 | + }) | ||
| 216 | + } | ||
| 217 | + }else{ | ||
| 218 | + wx.showToast({ | ||
| 219 | + title: '没有搜索到门店', | ||
| 220 | + icon: 'none', | ||
| 221 | + duration: 2000 | ||
| 222 | + }) | ||
| 223 | + } | ||
| 224 | + }else{ | ||
| 225 | + if (this.data.is_show_sto_cat==1) { | ||
| 226 | + this.setData({ | ||
| 227 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 228 | + }) | ||
| 229 | + }else{ | ||
| 230 | + this.setData({ | ||
| 231 | + only_pk:all_pick_list | ||
| 232 | + }) | ||
| 233 | + } | ||
| 183 | 234 | ||
| 235 | + } | ||
| 236 | + }else{ //分类下搜索 | ||
| 237 | + let sec_i=this.data.sec_i | ||
| 238 | + let all_sto = this.data.all_sto | ||
| 239 | + let sec_sto= this.data.sec_sto | ||
| 240 | + let sec_arr = sec_sto.s_arr | ||
| 241 | + let keyword = this.data.keyword | ||
| 242 | + let text='sec_sto.s_arr' | ||
| 243 | + if (keyword) { | ||
| 244 | + let arr=sec_arr.filter( item =>{ | ||
| 245 | + let i = item.pickup_name.indexOf(keyword) | ||
| 246 | + if (i > -1) { | ||
| 247 | + return true | ||
| 248 | + }else{ | ||
| 249 | + return false | ||
| 250 | + } | ||
| 251 | + }) | ||
| 252 | + if (arr && arr.length>0) { | ||
| 253 | + this.setData({ | ||
| 254 | + [text]:arr | ||
| 255 | + }) | ||
| 256 | + }else{ | ||
| 257 | + wx.showToast({ | ||
| 258 | + title: '没有搜索到门店', | ||
| 259 | + icon: 'none', | ||
| 260 | + duration: 2000 | ||
| 261 | + }) | ||
| 262 | + } | ||
| 263 | + }else{ | ||
| 264 | + this.setData({ | ||
| 265 | + [text]:all_sto[sec_i].s_arr | ||
| 266 | + }) | ||
| 267 | + } | ||
| 268 | + | ||
| 269 | + | ||
| 270 | + } | ||
| 271 | + }, | ||
| 184 | //购买礼包 | 272 | //购买礼包 |
| 185 | GetBuyPrice: function (e) { | 273 | GetBuyPrice: function (e) { |
| 186 | 274 | ||
| @@ -579,6 +667,7 @@ Page({ | @@ -579,6 +667,7 @@ Page({ | ||
| 579 | region_name: region_name, | 667 | region_name: region_name, |
| 580 | sort_store: 0, | 668 | sort_store: 0, |
| 581 | choice_sort_store: 1, | 669 | choice_sort_store: 1, |
| 670 | + sec_i:index, | ||
| 582 | sec_sto: item, | 671 | sec_sto: item, |
| 583 | sec_pick_index: 0 | 672 | sec_pick_index: 0 |
| 584 | }); | 673 | }); |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
| 1 | +<wxs module="filter" src="../../../../../utils/filter.wxs"></wxs> | ||
| 1 | <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;"> | 2 | <view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;"> |
| 2 | <block wx:if="{{ad_data}}"> | 3 | <block wx:if="{{ad_data}}"> |
| 3 | <view class="top_img"> | 4 | <view class="top_img"> |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss
| @@ -230,4 +230,27 @@ page { | @@ -230,4 +230,27 @@ page { | ||
| 230 | 230 | ||
| 231 | .After_all .end { | 231 | .After_all .end { |
| 232 | margin: 0rpx 15rpx; | 232 | margin: 0rpx 15rpx; |
| 233 | +} | ||
| 234 | +.searchbar { | ||
| 235 | + height: 95rpx; | ||
| 236 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 237 | +} | ||
| 238 | +.storeListpadd { | ||
| 239 | + padding: 0rpx 31rpx; | ||
| 240 | +} | ||
| 241 | +.search { | ||
| 242 | + width: 125rpx; | ||
| 243 | + height: 45rpx; | ||
| 244 | + line-height: 45rpx; | ||
| 245 | + background-color: rgb(219, 27, 52); | ||
| 246 | + border-radius: 30rpx; | ||
| 247 | + color: rgb(255, 255, 255); | ||
| 248 | +} | ||
| 249 | +.inputstore { | ||
| 250 | + width: 510rpx; | ||
| 251 | + height: 43rpx; | ||
| 252 | + line-height: 43rpx; | ||
| 253 | + border-radius: 30rpx; | ||
| 254 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 255 | + padding-left: 30rpx; | ||
| 233 | } | 256 | } |
| 234 | \ No newline at end of file | 257 | \ No newline at end of file |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
| @@ -79,14 +79,27 @@ Page({ | @@ -79,14 +79,27 @@ Page({ | ||
| 79 | screenWidth: 0, | 79 | screenWidth: 0, |
| 80 | monthgiftbag:{}, | 80 | monthgiftbag:{}, |
| 81 | scene:"", | 81 | scene:"", |
| 82 | + keyword:'', //门店搜索 | ||
| 83 | + sec_i:-1,//选中分类门店 下标 | ||
| 82 | }, | 84 | }, |
| 83 | onLoad: function (options) { | 85 | onLoad: function (options) { |
| 84 | 86 | ||
| 85 | var th = this; | 87 | var th = this; |
| 86 | console.log('分享参数---'); | 88 | console.log('分享参数---'); |
| 87 | console.log(options); | 89 | console.log(options); |
| 90 | + if (options.lbId && !options.id) { | ||
| 91 | + options.id=options.lbId | ||
| 92 | + // options.lbId=options.id | ||
| 93 | + } | ||
| 94 | + if (options.id) { | ||
| 95 | + options.lbId=options.id | ||
| 96 | + // options.lbId=options.id | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + | ||
| 88 | this.setData({ | 100 | this.setData({ |
| 89 | params: options, | 101 | params: options, |
| 102 | + getGiftID:options.id | ||
| 90 | }) | 103 | }) |
| 91 | 104 | ||
| 92 | getApp().getConfig(function (e) { | 105 | getApp().getConfig(function (e) { |
| @@ -253,6 +266,10 @@ Page({ | @@ -253,6 +266,10 @@ Page({ | ||
| 253 | }, | 266 | }, |
| 254 | getList: function (e) { | 267 | getList: function (e) { |
| 255 | var th = this; | 268 | var th = this; |
| 269 | + if (!d.user_id) { | ||
| 270 | + th.getList2() | ||
| 271 | + return | ||
| 272 | + } | ||
| 256 | getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', { | 273 | getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', { |
| 257 | isShowLoading: true, | 274 | isShowLoading: true, |
| 258 | data: { | 275 | data: { |
| @@ -404,6 +421,7 @@ Page({ | @@ -404,6 +421,7 @@ Page({ | ||
| 404 | getApp().goto('/packageE/pages/togoin/togoin'); | 421 | getApp().goto('/packageE/pages/togoin/togoin'); |
| 405 | return false; | 422 | return false; |
| 406 | } | 423 | } |
| 424 | + | ||
| 407 | if (th.data.params && th.data.params.is_act) { | 425 | if (th.data.params && th.data.params.is_act) { |
| 408 | this.getListInfo() | 426 | this.getListInfo() |
| 409 | }else{ | 427 | }else{ |
| @@ -879,7 +897,9 @@ Page({ | @@ -879,7 +897,9 @@ Page({ | ||
| 879 | if (pagePath.indexOf('/') != 0) { | 897 | if (pagePath.indexOf('/') != 0) { |
| 880 | pagePath = '/' + pagePath; | 898 | pagePath = '/' + pagePath; |
| 881 | } | 899 | } |
| 882 | - pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID; | 900 | + pagePath += "?isBuy=1" + "&id=" + this.data.options.id + "&first_leader=" + this.data.getUserID; |
| 901 | + console.log('分享路径'); | ||
| 902 | + console.log(pagePath); | ||
| 883 | // if (this.data.isBuy == 0) { | 903 | // if (this.data.isBuy == 0) { |
| 884 | // pagePath += "&orderSn=" + this.data.orderSn; | 904 | // pagePath += "&orderSn=" + this.data.orderSn; |
| 885 | // } else { | 905 | // } else { |
| @@ -940,7 +960,93 @@ Page({ | @@ -940,7 +960,93 @@ Page({ | ||
| 940 | 960 | ||
| 941 | 961 | ||
| 942 | }, | 962 | }, |
| 963 | + //获取搜索门店输入的值 | ||
| 964 | + input_store: function(e) { | ||
| 965 | + this.setData({ | ||
| 966 | + keyword: e.detail.value | ||
| 967 | + }) | ||
| 968 | + }, | ||
| 969 | + //搜索门店 | ||
| 970 | + searchfn(){ | ||
| 971 | + let choice_sort_store = this.data.choice_sort_store | ||
| 972 | + if (choice_sort_store==0) { //全局搜索 | ||
| 973 | + let all_pick_list = this.data.all_pick_list | ||
| 974 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 975 | + let keyword = this.data.keyword | ||
| 976 | + if (keyword) { | ||
| 977 | + let arr=all_pick_list.filter( item =>{ | ||
| 978 | + let i = item.pickup_name.indexOf(keyword) | ||
| 979 | + if (i > -1) { | ||
| 980 | + return true | ||
| 981 | + }else{ | ||
| 982 | + return false | ||
| 983 | + } | ||
| 984 | + }) | ||
| 985 | + if (arr && arr.length>0) { | ||
| 986 | + if(this.data.is_show_sto_cat==1){ | ||
| 987 | + this.setData({ | ||
| 988 | + def_pickpu_list:arr | ||
| 989 | + }) | ||
| 990 | + }else{ | ||
| 991 | + this.setData({ | ||
| 992 | + only_pk:arr | ||
| 993 | + }) | ||
| 994 | + } | ||
| 995 | + }else{ | ||
| 996 | + wx.showToast({ | ||
| 997 | + title: '没有搜索到门店', | ||
| 998 | + icon: 'none', | ||
| 999 | + duration: 2000 | ||
| 1000 | + }) | ||
| 1001 | + } | ||
| 1002 | + }else{ | ||
| 1003 | + if (this.data.is_show_sto_cat==1) { | ||
| 1004 | + this.setData({ | ||
| 1005 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 1006 | + }) | ||
| 1007 | + }else{ | ||
| 1008 | + this.setData({ | ||
| 1009 | + only_pk:all_pick_list | ||
| 1010 | + }) | ||
| 1011 | + } | ||
| 1012 | + | ||
| 1013 | + } | ||
| 1014 | + }else{ //分类下搜索 | ||
| 1015 | + let sec_i=this.data.sec_i | ||
| 1016 | + let all_sto = this.data.all_sto | ||
| 1017 | + let sec_sto= this.data.sec_sto | ||
| 1018 | + let sec_arr = sec_sto.s_arr | ||
| 1019 | + let keyword = this.data.keyword | ||
| 1020 | + let text='sec_sto.s_arr' | ||
| 1021 | + if (keyword) { | ||
| 1022 | + let arr=sec_arr.filter( item =>{ | ||
| 1023 | + let i = item.pickup_name.indexOf(keyword) | ||
| 1024 | + if (i > -1) { | ||
| 1025 | + return true | ||
| 1026 | + }else{ | ||
| 1027 | + return false | ||
| 1028 | + } | ||
| 1029 | + }) | ||
| 1030 | + if (arr && arr.length>0) { | ||
| 1031 | + this.setData({ | ||
| 1032 | + [text]:arr | ||
| 1033 | + }) | ||
| 1034 | + }else{ | ||
| 1035 | + wx.showToast({ | ||
| 1036 | + title: '没有搜索到门店', | ||
| 1037 | + icon: 'none', | ||
| 1038 | + duration: 2000 | ||
| 1039 | + }) | ||
| 1040 | + } | ||
| 1041 | + }else{ | ||
| 1042 | + this.setData({ | ||
| 1043 | + [text]:all_sto[sec_i].s_arr | ||
| 1044 | + }) | ||
| 1045 | + } | ||
| 1046 | + | ||
| 943 | 1047 | ||
| 1048 | + } | ||
| 1049 | + }, | ||
| 944 | 1050 | ||
| 945 | getGift(){ | 1051 | getGift(){ |
| 946 | var that=this; | 1052 | var that=this; |
| @@ -1149,6 +1255,7 @@ Page({ | @@ -1149,6 +1255,7 @@ Page({ | ||
| 1149 | region_name: region_name, | 1255 | region_name: region_name, |
| 1150 | sort_store: 0, | 1256 | sort_store: 0, |
| 1151 | choice_sort_store: 1, | 1257 | choice_sort_store: 1, |
| 1258 | + sec_i:index, | ||
| 1152 | sec_sto: item, | 1259 | sec_sto: item, |
| 1153 | sec_pick_index: 0 | 1260 | sec_pick_index: 0 |
| 1154 | }); | 1261 | }); |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
| 1 | +<wxs module="filter" src="../../../../../utils/filter.wxs"></wxs> | ||
| 1 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> | 2 | <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> |
| 2 | <view class="box_top data-v-3a5b7e36"> | 3 | <view class="box_top data-v-3a5b7e36"> |
| 3 | <image src="{{iurl}}{{monthgiftbag.cover_img}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> | 4 | <image src="{{iurl}}{{monthgiftbag.cover_img}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image> |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss
| @@ -250,4 +250,27 @@ page.data-v-3a5b7e36 { | @@ -250,4 +250,27 @@ page.data-v-3a5b7e36 { | ||
| 250 | .xc-share-frame { | 250 | .xc-share-frame { |
| 251 | position: absolute; right:0; top: -10rpx; | 251 | position: absolute; right:0; top: -10rpx; |
| 252 | } | 252 | } |
| 253 | +.searchbar { | ||
| 254 | + height: 95rpx; | ||
| 255 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 256 | +} | ||
| 257 | +.storeListpadd { | ||
| 258 | + padding: 0rpx 31rpx; | ||
| 259 | +} | ||
| 260 | +.search { | ||
| 261 | + width: 125rpx; | ||
| 262 | + height: 45rpx; | ||
| 263 | + line-height: 45rpx; | ||
| 264 | + background-color: rgb(219, 27, 52); | ||
| 265 | + border-radius: 30rpx; | ||
| 266 | + color: rgb(255, 255, 255); | ||
| 267 | +} | ||
| 268 | +.inputstore { | ||
| 269 | + width: 510rpx; | ||
| 270 | + height: 43rpx; | ||
| 271 | + line-height: 43rpx; | ||
| 272 | + border-radius: 30rpx; | ||
| 273 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 274 | + padding-left: 30rpx; | ||
| 275 | +} | ||
| 253 | 276 |
packageE/pages/user/monthgiftbag/public/buy_com.wxml
| @@ -15,6 +15,12 @@ | @@ -15,6 +15,12 @@ | ||
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| 18 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
| 19 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 20 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 21 | + <view class="fs28">搜索</view> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 18 | <!-- 门店列表,最外层的门店列表,一开始 --> | 24 | <!-- 门店列表,最外层的门店列表,一开始 --> |
| 19 | <view class="store-list"> | 25 | <view class="store-list"> |
| 20 | <!-- 如果还没有点击更多门店的时候 --> | 26 | <!-- 如果还没有点击更多门店的时候 --> |
| @@ -37,7 +43,7 @@ | @@ -37,7 +43,7 @@ | ||
| 37 | </view> | 43 | </view> |
| 38 | <view> | 44 | <view> |
| 39 | <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | 45 | <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> |
| 40 | - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} | 46 | + 距离:{{item.distance >1000 ? filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} |
| 41 | </view> | 47 | </view> |
| 42 | </view> | 48 | </view> |
| 43 | </view> | 49 | </view> |
pages/giftpack/buygiftpack/giftpackbuy.js
| @@ -67,6 +67,8 @@ Page({ | @@ -67,6 +67,8 @@ Page({ | ||
| 67 | openSpecModal:0, | 67 | openSpecModal:0, |
| 68 | 68 | ||
| 69 | is_get_guide:0, | 69 | is_get_guide:0, |
| 70 | + keyword:'', //门店搜索 | ||
| 71 | + sec_i:-1,//选中分类门店 下标 | ||
| 70 | 72 | ||
| 71 | }, | 73 | }, |
| 72 | onLoad: function (options) { | 74 | onLoad: function (options) { |
| @@ -167,7 +169,93 @@ Page({ | @@ -167,7 +169,93 @@ Page({ | ||
| 167 | },2000) | 169 | },2000) |
| 168 | 170 | ||
| 169 | }, | 171 | }, |
| 172 | + //获取搜索门店输入的值 | ||
| 173 | + input_store: function(e) { | ||
| 174 | + this.setData({ | ||
| 175 | + keyword: e.detail.value | ||
| 176 | + }) | ||
| 177 | + }, | ||
| 178 | + //搜索门店 | ||
| 179 | + searchfn(){ | ||
| 180 | + let choice_sort_store = this.data.choice_sort_store | ||
| 181 | + if (choice_sort_store==0) { //全局搜索 | ||
| 182 | + let all_pick_list = this.data.all_pick_list | ||
| 183 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 184 | + let keyword = this.data.keyword | ||
| 185 | + if (keyword) { | ||
| 186 | + let arr=all_pick_list.filter( item =>{ | ||
| 187 | + let i = item.pickup_name.indexOf(keyword) | ||
| 188 | + if (i > -1) { | ||
| 189 | + return true | ||
| 190 | + }else{ | ||
| 191 | + return false | ||
| 192 | + } | ||
| 193 | + }) | ||
| 194 | + if (arr && arr.length>0) { | ||
| 195 | + if(this.data.is_show_sto_cat==1){ | ||
| 196 | + this.setData({ | ||
| 197 | + def_pickpu_list:arr | ||
| 198 | + }) | ||
| 199 | + }else{ | ||
| 200 | + this.setData({ | ||
| 201 | + only_pk:arr | ||
| 202 | + }) | ||
| 203 | + } | ||
| 204 | + }else{ | ||
| 205 | + wx.showToast({ | ||
| 206 | + title: '没有搜索到门店', | ||
| 207 | + icon: 'none', | ||
| 208 | + duration: 2000 | ||
| 209 | + }) | ||
| 210 | + } | ||
| 211 | + }else{ | ||
| 212 | + if (this.data.is_show_sto_cat==1) { | ||
| 213 | + this.setData({ | ||
| 214 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 215 | + }) | ||
| 216 | + }else{ | ||
| 217 | + this.setData({ | ||
| 218 | + only_pk:all_pick_list | ||
| 219 | + }) | ||
| 220 | + } | ||
| 170 | 221 | ||
| 222 | + } | ||
| 223 | + }else{ //分类下搜索 | ||
| 224 | + let sec_i=this.data.sec_i | ||
| 225 | + let all_sto = this.data.all_sto | ||
| 226 | + let sec_sto= this.data.sec_sto | ||
| 227 | + let sec_arr = sec_sto.s_arr | ||
| 228 | + let keyword = this.data.keyword | ||
| 229 | + let text='sec_sto.s_arr' | ||
| 230 | + if (keyword) { | ||
| 231 | + let arr=sec_arr.filter( item =>{ | ||
| 232 | + let i = item.pickup_name.indexOf(keyword) | ||
| 233 | + if (i > -1) { | ||
| 234 | + return true | ||
| 235 | + }else{ | ||
| 236 | + return false | ||
| 237 | + } | ||
| 238 | + }) | ||
| 239 | + if (arr && arr.length>0) { | ||
| 240 | + this.setData({ | ||
| 241 | + [text]:arr | ||
| 242 | + }) | ||
| 243 | + }else{ | ||
| 244 | + wx.showToast({ | ||
| 245 | + title: '没有搜索到门店', | ||
| 246 | + icon: 'none', | ||
| 247 | + duration: 2000 | ||
| 248 | + }) | ||
| 249 | + } | ||
| 250 | + }else{ | ||
| 251 | + this.setData({ | ||
| 252 | + [text]:all_sto[sec_i].s_arr | ||
| 253 | + }) | ||
| 254 | + } | ||
| 255 | + | ||
| 256 | + | ||
| 257 | + } | ||
| 258 | + }, | ||
| 171 | //购买礼包 | 259 | //购买礼包 |
| 172 | GetBuyPrice: function (e) { | 260 | GetBuyPrice: function (e) { |
| 173 | 261 | ||
| @@ -551,6 +639,7 @@ Page({ | @@ -551,6 +639,7 @@ Page({ | ||
| 551 | sort_store: 0, | 639 | sort_store: 0, |
| 552 | choice_sort_store: 1, | 640 | choice_sort_store: 1, |
| 553 | sec_sto: item, | 641 | sec_sto: item, |
| 642 | + sec_i:index, | ||
| 554 | sec_pick_index: 0 | 643 | sec_pick_index: 0 |
| 555 | }); | 644 | }); |
| 556 | }, | 645 | }, |
pages/giftpack/buygiftpack/giftpackbuy.wxss
| @@ -230,4 +230,28 @@ page { | @@ -230,4 +230,28 @@ page { | ||
| 230 | 230 | ||
| 231 | .After_all .end { | 231 | .After_all .end { |
| 232 | margin: 0rpx 15rpx; | 232 | margin: 0rpx 15rpx; |
| 233 | +} | ||
| 234 | + | ||
| 235 | +.searchbar { | ||
| 236 | + height: 95rpx; | ||
| 237 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 238 | +} | ||
| 239 | +.storeListpadd { | ||
| 240 | + padding: 0rpx 31rpx; | ||
| 241 | +} | ||
| 242 | +.search { | ||
| 243 | + width: 125rpx; | ||
| 244 | + height: 45rpx; | ||
| 245 | + line-height: 45rpx; | ||
| 246 | + background-color: rgb(219, 27, 52); | ||
| 247 | + border-radius: 30rpx; | ||
| 248 | + color: rgb(255, 255, 255); | ||
| 249 | +} | ||
| 250 | +.inputstore { | ||
| 251 | + width: 510rpx; | ||
| 252 | + height: 43rpx; | ||
| 253 | + line-height: 43rpx; | ||
| 254 | + border-radius: 30rpx; | ||
| 255 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 256 | + padding-left: 30rpx; | ||
| 233 | } | 257 | } |
| 234 | \ No newline at end of file | 258 | \ No newline at end of file |
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -5,7 +5,7 @@ var e = getApp(), | @@ -5,7 +5,7 @@ var e = getApp(), | ||
| 5 | d = e.globalData; | 5 | d = e.globalData; |
| 6 | var ut = require("../../../utils/util.js"); | 6 | var ut = require("../../../utils/util.js"); |
| 7 | var com = require("../public/buy_com.js"); | 7 | var com = require("../public/buy_com.js"); |
| 8 | - | 8 | + |
| 9 | Page({ | 9 | Page({ |
| 10 | data: { | 10 | data: { |
| 11 | url: a.url, //接口网址 | 11 | url: a.url, //接口网址 |
| @@ -76,8 +76,9 @@ Page({ | @@ -76,8 +76,9 @@ Page({ | ||
| 76 | 76 | ||
| 77 | screenWidth: 0, | 77 | screenWidth: 0, |
| 78 | submit:0, | 78 | submit:0, |
| 79 | - | ||
| 80 | - is_detail:1 //是详情页面的购买 | 79 | + is_detail:1, //是详情页面的购买 |
| 80 | + keyword:'', //门店搜索 | ||
| 81 | + sec_i:-1,//选中分类门店 下标 | ||
| 81 | }, | 82 | }, |
| 82 | onLoad: function (options) { | 83 | onLoad: function (options) { |
| 83 | 84 | ||
| @@ -183,6 +184,93 @@ Page({ | @@ -183,6 +184,93 @@ Page({ | ||
| 183 | }) | 184 | }) |
| 184 | this.setData({ submit:0}) | 185 | this.setData({ submit:0}) |
| 185 | }, | 186 | }, |
| 187 | + //获取搜索门店输入的值 | ||
| 188 | + input_store: function(e) { | ||
| 189 | + this.setData({ | ||
| 190 | + keyword: e.detail.value | ||
| 191 | + }) | ||
| 192 | + }, | ||
| 193 | + //搜索门店 | ||
| 194 | + searchfn(){ | ||
| 195 | + let choice_sort_store = this.data.choice_sort_store | ||
| 196 | + if (choice_sort_store==0) { //全局搜索 | ||
| 197 | + let all_pick_list = this.data.all_pick_list | ||
| 198 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 199 | + let keyword = this.data.keyword | ||
| 200 | + if (keyword) { | ||
| 201 | + let arr=all_pick_list.filter( item =>{ | ||
| 202 | + let i = item.pickup_name.indexOf(keyword) | ||
| 203 | + if (i > -1) { | ||
| 204 | + return true | ||
| 205 | + }else{ | ||
| 206 | + return false | ||
| 207 | + } | ||
| 208 | + }) | ||
| 209 | + if (arr && arr.length>0) { | ||
| 210 | + if(this.data.is_show_sto_cat==1){ | ||
| 211 | + this.setData({ | ||
| 212 | + def_pickpu_list:arr | ||
| 213 | + }) | ||
| 214 | + }else{ | ||
| 215 | + this.setData({ | ||
| 216 | + only_pk:arr | ||
| 217 | + }) | ||
| 218 | + } | ||
| 219 | + }else{ | ||
| 220 | + wx.showToast({ | ||
| 221 | + title: '没有搜索到门店', | ||
| 222 | + icon: 'none', | ||
| 223 | + duration: 2000 | ||
| 224 | + }) | ||
| 225 | + } | ||
| 226 | + }else{ | ||
| 227 | + if (this.data.is_show_sto_cat==1) { | ||
| 228 | + this.setData({ | ||
| 229 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 230 | + }) | ||
| 231 | + }else{ | ||
| 232 | + this.setData({ | ||
| 233 | + only_pk:all_pick_list | ||
| 234 | + }) | ||
| 235 | + } | ||
| 236 | + | ||
| 237 | + } | ||
| 238 | + }else{ //分类下搜索 | ||
| 239 | + let sec_i=this.data.sec_i | ||
| 240 | + let all_sto = this.data.all_sto | ||
| 241 | + let sec_sto= this.data.sec_sto | ||
| 242 | + let sec_arr = sec_sto.s_arr | ||
| 243 | + let keyword = this.data.keyword | ||
| 244 | + let text='sec_sto.s_arr' | ||
| 245 | + if (keyword) { | ||
| 246 | + let arr=sec_arr.filter( item =>{ | ||
| 247 | + let i = item.pickup_name.indexOf(keyword) | ||
| 248 | + if (i > -1) { | ||
| 249 | + return true | ||
| 250 | + }else{ | ||
| 251 | + return false | ||
| 252 | + } | ||
| 253 | + }) | ||
| 254 | + if (arr && arr.length>0) { | ||
| 255 | + this.setData({ | ||
| 256 | + [text]:arr | ||
| 257 | + }) | ||
| 258 | + }else{ | ||
| 259 | + wx.showToast({ | ||
| 260 | + title: '没有搜索到门店', | ||
| 261 | + icon: 'none', | ||
| 262 | + duration: 2000 | ||
| 263 | + }) | ||
| 264 | + } | ||
| 265 | + }else{ | ||
| 266 | + this.setData({ | ||
| 267 | + [text]:all_sto[sec_i].s_arr | ||
| 268 | + }) | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + | ||
| 272 | + } | ||
| 273 | + }, | ||
| 186 | GetBuyPrice: function (e) { | 274 | GetBuyPrice: function (e) { |
| 187 | var that = this.data; | 275 | var that = this.data; |
| 188 | var th = this; | 276 | var th = this; |
| @@ -842,6 +930,7 @@ Page({ | @@ -842,6 +930,7 @@ Page({ | ||
| 842 | region_name: region_name, | 930 | region_name: region_name, |
| 843 | sort_store: 0, | 931 | sort_store: 0, |
| 844 | choice_sort_store: 1, | 932 | choice_sort_store: 1, |
| 933 | + sec_i:index, | ||
| 845 | sec_sto: item, | 934 | sec_sto: item, |
| 846 | sec_pick_index: 0 | 935 | sec_pick_index: 0 |
| 847 | }); | 936 | }); |
pages/giftpack/giftpacklist/giftpacklist.wxml
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | <view class="top_title data-v-3a5b7e36"> | 12 | <view class="top_title data-v-3a5b7e36"> |
| 13 | <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text> | 13 | <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text> |
| 14 | 14 | ||
| 15 | - <!-- 这个是分享按钮 --> | 15 | + <!-- 这个是分享按钮 --> |
| 16 | <view wx:if="{{c_state<2 && isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | 16 | <view wx:if="{{c_state<2 && isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> |
| 17 | <view class="iconfont icon-share fs40" ></view> | 17 | <view class="iconfont icon-share fs40" ></view> |
| 18 | <view class="fs22 c-7b">分享</view> | 18 | <view class="fs22 c-7b">分享</view> |
pages/giftpack/giftpacklist/giftpacklist.wxss
| @@ -250,4 +250,26 @@ page.data-v-3a5b7e36 { | @@ -250,4 +250,26 @@ page.data-v-3a5b7e36 { | ||
| 250 | .xc-share-frame { | 250 | .xc-share-frame { |
| 251 | position: absolute; right:0; top: -10rpx; | 251 | position: absolute; right:0; top: -10rpx; |
| 252 | } | 252 | } |
| 253 | - | 253 | +.searchbar { |
| 254 | + height: 95rpx; | ||
| 255 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 256 | +} | ||
| 257 | +.storeListpadd { | ||
| 258 | + padding: 0rpx 31rpx; | ||
| 259 | +} | ||
| 260 | +.search { | ||
| 261 | + width: 125rpx; | ||
| 262 | + height: 45rpx; | ||
| 263 | + line-height: 45rpx; | ||
| 264 | + background-color: rgb(219, 27, 52); | ||
| 265 | + border-radius: 30rpx; | ||
| 266 | + color: rgb(255, 255, 255); | ||
| 267 | +} | ||
| 268 | +.inputstore { | ||
| 269 | + width: 510rpx; | ||
| 270 | + height: 43rpx; | ||
| 271 | + line-height: 43rpx; | ||
| 272 | + border-radius: 30rpx; | ||
| 273 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 274 | + padding-left: 30rpx; | ||
| 275 | +} |
pages/giftpack/public/buy_com.wxml
| @@ -15,7 +15,13 @@ | @@ -15,7 +15,13 @@ | ||
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| 18 | - <!-- 门店列表,最外层的门店列表,一开始 --> | 18 | + <view class="searchbar flex-vertical-between storeListpadd"> |
| 19 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 20 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 21 | + <view class="fs28">搜索</view> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 24 | + <!-- 门店列表,最外层的门店列表,一开始 --> | ||
| 19 | <view class="store-list"> | 25 | <view class="store-list"> |
| 20 | <!-- 如果还没有点击更多门店的时候 --> | 26 | <!-- 如果还没有点击更多门店的时候 --> |
| 21 | <block wx:if="{{choice_sort_store==0}}"> | 27 | <block wx:if="{{choice_sort_store==0}}"> |
pages/goods/goodsInfo/goodsInfo.js
| @@ -268,6 +268,8 @@ Page({ | @@ -268,6 +268,8 @@ Page({ | ||
| 268 | base_nor_prom_id:0, | 268 | base_nor_prom_id:0, |
| 269 | base_nor_goods_id:0, | 269 | base_nor_goods_id:0, |
| 270 | user_pre_buynum:0, //用户优惠促销参与次数 | 270 | user_pre_buynum:0, //用户优惠促销参与次数 |
| 271 | + keyword:'', //门店搜索 | ||
| 272 | + sec_i:-1,//选中分类门店 下标 | ||
| 271 | }, | 273 | }, |
| 272 | 274 | ||
| 273 | //------初始化加载---------- | 275 | //------初始化加载---------- |
| @@ -3644,6 +3646,7 @@ Page({ | @@ -3644,6 +3646,7 @@ Page({ | ||
| 3644 | 3646 | ||
| 3645 | }, | 3647 | }, |
| 3646 | 3648 | ||
| 3649 | + | ||
| 3647 | 3650 | ||
| 3648 | //---------拿出门店分类和门店------------ | 3651 | //---------拿出门店分类和门店------------ |
| 3649 | get_sto(e) { | 3652 | get_sto(e) { |
| @@ -3693,6 +3696,8 @@ Page({ | @@ -3693,6 +3696,8 @@ Page({ | ||
| 3693 | clearInterval(timer_get); | 3696 | clearInterval(timer_get); |
| 3694 | 3697 | ||
| 3695 | 3698 | ||
| 3699 | + | ||
| 3700 | + | ||
| 3696 | //如果会员是有默认的门店话 | 3701 | //如果会员是有默认的门店话 |
| 3697 | if (!th.data.def_pick_store && th.data.fir_def_store && Object.keys(th.data.fir_def_store).length > 0) { | 3702 | if (!th.data.def_pick_store && th.data.fir_def_store && Object.keys(th.data.fir_def_store).length > 0) { |
| 3698 | th.setData({ | 3703 | th.setData({ |
| @@ -3765,12 +3770,100 @@ Page({ | @@ -3765,12 +3770,100 @@ Page({ | ||
| 3765 | th.deal_pickup(e); //--普通门店排版-- | 3770 | th.deal_pickup(e); //--普通门店排版-- |
| 3766 | }, 800) | 3771 | }, 800) |
| 3767 | } | 3772 | } |
| 3773 | + }else{ | ||
| 3774 | + wx.hideLoading(); | ||
| 3768 | } | 3775 | } |
| 3769 | }) | 3776 | }) |
| 3770 | }, 200) | 3777 | }, 200) |
| 3771 | 3778 | ||
| 3772 | }, | 3779 | }, |
| 3780 | + //获取搜索门店输入的值 | ||
| 3781 | + input_store: function(e) { | ||
| 3782 | + this.setData({ | ||
| 3783 | + keyword: e.detail.value | ||
| 3784 | + }) | ||
| 3785 | + }, | ||
| 3786 | + //搜索门店 | ||
| 3787 | + searchfn(){ | ||
| 3788 | + let choice_sort_store = this.data.choice_sort_store | ||
| 3789 | + if (choice_sort_store==0) { //全局搜索 | ||
| 3790 | + let all_pick_list = this.data.all_pick_list | ||
| 3791 | + let def_pickpu_list = this.data.def_pickpu_list | ||
| 3792 | + let keyword = this.data.keyword | ||
| 3793 | + if (keyword) { | ||
| 3794 | + let arr=all_pick_list.filter( item =>{ | ||
| 3795 | + let i = item.pickup_name.indexOf(keyword) | ||
| 3796 | + if (i > -1) { | ||
| 3797 | + return true | ||
| 3798 | + }else{ | ||
| 3799 | + return false | ||
| 3800 | + } | ||
| 3801 | + }) | ||
| 3802 | + if (arr && arr.length>0) { | ||
| 3803 | + if(this.data.is_show_sto_cat==1){ | ||
| 3804 | + this.setData({ | ||
| 3805 | + def_pickpu_list:arr | ||
| 3806 | + }) | ||
| 3807 | + }else{ | ||
| 3808 | + this.setData({ | ||
| 3809 | + only_pk:arr | ||
| 3810 | + }) | ||
| 3811 | + } | ||
| 3812 | + }else{ | ||
| 3813 | + wx.showToast({ | ||
| 3814 | + title: '没有搜索到门店', | ||
| 3815 | + icon: 'none', | ||
| 3816 | + duration: 2000 | ||
| 3817 | + }) | ||
| 3818 | + } | ||
| 3819 | + }else{ | ||
| 3820 | + if (this.data.is_show_sto_cat==1) { | ||
| 3821 | + this.setData({ | ||
| 3822 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
| 3823 | + }) | ||
| 3824 | + }else{ | ||
| 3825 | + this.setData({ | ||
| 3826 | + only_pk:all_pick_list | ||
| 3827 | + }) | ||
| 3828 | + } | ||
| 3829 | + | ||
| 3830 | + } | ||
| 3831 | + }else{ //分类下搜索 | ||
| 3832 | + let sec_i=this.data.sec_i | ||
| 3833 | + let all_sto = this.data.all_sto | ||
| 3834 | + let sec_sto= this.data.sec_sto | ||
| 3835 | + let sec_arr = sec_sto.s_arr | ||
| 3836 | + let keyword = this.data.keyword | ||
| 3837 | + let text='sec_sto.s_arr' | ||
| 3838 | + if (keyword) { | ||
| 3839 | + let arr=sec_arr.filter( item =>{ | ||
| 3840 | + let i = item.pickup_name.indexOf(keyword) | ||
| 3841 | + if (i > -1) { | ||
| 3842 | + return true | ||
| 3843 | + }else{ | ||
| 3844 | + return false | ||
| 3845 | + } | ||
| 3846 | + }) | ||
| 3847 | + if (arr && arr.length>0) { | ||
| 3848 | + this.setData({ | ||
| 3849 | + [text]:arr | ||
| 3850 | + }) | ||
| 3851 | + }else{ | ||
| 3852 | + wx.showToast({ | ||
| 3853 | + title: '没有搜索到门店', | ||
| 3854 | + icon: 'none', | ||
| 3855 | + duration: 2000 | ||
| 3856 | + }) | ||
| 3857 | + } | ||
| 3858 | + }else{ | ||
| 3859 | + this.setData({ | ||
| 3860 | + [text]:all_sto[sec_i].s_arr | ||
| 3861 | + }) | ||
| 3862 | + } | ||
| 3863 | + | ||
| 3773 | 3864 | ||
| 3865 | + } | ||
| 3866 | + }, | ||
| 3774 | 3867 | ||
| 3775 | //------------处理门店--------------- | 3868 | //------------处理门店--------------- |
| 3776 | deal_pickup(e) { | 3869 | deal_pickup(e) { |
| @@ -7014,6 +7107,7 @@ Page({ | @@ -7014,6 +7107,7 @@ Page({ | ||
| 7014 | sort_store: 0, | 7107 | sort_store: 0, |
| 7015 | choice_sort_store: 1, | 7108 | choice_sort_store: 1, |
| 7016 | sec_sto: item, | 7109 | sec_sto: item, |
| 7110 | + sec_i:index, | ||
| 7017 | sec_pick_index: 0 | 7111 | sec_pick_index: 0 |
| 7018 | }); | 7112 | }); |
| 7019 | }, | 7113 | }, |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -1606,6 +1606,12 @@ | @@ -1606,6 +1606,12 @@ | ||
| 1606 | </view> | 1606 | </view> |
| 1607 | </view> | 1607 | </view> |
| 1608 | </view> | 1608 | </view> |
| 1609 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
| 1610 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
| 1611 | + <view class="search flex-center" bindtap="searchfn"> | ||
| 1612 | + <view class="fs28">搜索</view> | ||
| 1613 | + </view> | ||
| 1614 | + </view> | ||
| 1609 | <!-- 门店列表,最外层的门店列表,一开始 --> | 1615 | <!-- 门店列表,最外层的门店列表,一开始 --> |
| 1610 | <view class="store-list"> | 1616 | <view class="store-list"> |
| 1611 | <!-- 如果还没有点击更多门店的时候 --> | 1617 | <!-- 如果还没有点击更多门店的时候 --> |
pages/goods/goodsInfo/goodsInfo.wxss
| @@ -3383,7 +3383,7 @@ margin: auto; */ | @@ -3383,7 +3383,7 @@ margin: auto; */ | ||
| 3383 | height: 120rpx; | 3383 | height: 120rpx; |
| 3384 | line-height: 125rpx; | 3384 | line-height: 125rpx; |
| 3385 | border-bottom: 1rpx solid #eee; | 3385 | border-bottom: 1rpx solid #eee; |
| 3386 | - | 3386 | + padding: 10rpx 0; |
| 3387 | } | 3387 | } |
| 3388 | 3388 | ||
| 3389 | .store-list .store_choose .store { | 3389 | .store-list .store_choose .store { |
| @@ -4018,3 +4018,27 @@ button.custom-service::after { | @@ -4018,3 +4018,27 @@ button.custom-service::after { | ||
| 4018 | left: -1000px; | 4018 | left: -1000px; |
| 4019 | top: -1000px; | 4019 | top: -1000px; |
| 4020 | } | 4020 | } |
| 4021 | + | ||
| 4022 | +.searchbar { | ||
| 4023 | + height: 95rpx; | ||
| 4024 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
| 4025 | +} | ||
| 4026 | +.storeListpadd { | ||
| 4027 | + padding: 0rpx 31rpx; | ||
| 4028 | +} | ||
| 4029 | +.search { | ||
| 4030 | + width: 125rpx; | ||
| 4031 | + height: 45rpx; | ||
| 4032 | + line-height: 45rpx; | ||
| 4033 | + background-color: rgb(219, 27, 52); | ||
| 4034 | + border-radius: 30rpx; | ||
| 4035 | + color: rgb(255, 255, 255); | ||
| 4036 | +} | ||
| 4037 | +.inputstore { | ||
| 4038 | + width: 510rpx; | ||
| 4039 | + height: 43rpx; | ||
| 4040 | + line-height: 43rpx; | ||
| 4041 | + border-radius: 30rpx; | ||
| 4042 | + border: 2rpx solid rgb(238, 238, 238); | ||
| 4043 | + padding-left: 30rpx; | ||
| 4044 | +} | ||
| 4021 | \ No newline at end of file | 4045 | \ No newline at end of file |