Basil пре 2 година
родитељ
комит
c371e5c12f

+ 30 - 20
src/apis/common.ts

@@ -85,28 +85,38 @@ export function closeAccount(phone: string) {
85 85
 }
86 86
 
87 87
 export function getLocal() {
88
-    uni.showModal({
89
-        title: '提示',
90
-        content: '为了您更好的体验,请同意授权位置',
91
-        success: (res) => {
92
-            if (res.confirm) {
93
-                uni.getLocation({
94
-                    type: 'wgs84',
95
-                    success(res) {
96
-                        console.log(res)
97
-                        uni.setStorageSync(USER_LATITUDE, res.latitude)
98
-                        uni.setStorageSync(USER_LONGITUDE, res.longitude)
99
-                        // getRegeo(res.latitude, res.longitude);
100
-                    }
101
-                })
102
-                // amap.getWxLocation(async (loc) => {
103
-                    // 获取地址描述数据
104
-                    // const regeoRes = await amap.getRegeo({location: loc});
105
-                    // console.log(regeoRes.data.regeocode.addressComponent)
106
-                // })
107
-            }
88
+    uni.getLocation({
89
+        type: 'wgs84',
90
+        success(res) {
91
+            console.log(res)
92
+            uni.setStorageSync(USER_LATITUDE, res.latitude)
93
+            uni.setStorageSync(USER_LONGITUDE, res.longitude)
94
+            // getRegeo(res.latitude, res.longitude);
108 95
         }
109 96
     })
97
+
98
+    // uni.showModal({
99
+    //     title: '提示',
100
+    //     content: '为了您更好的体验,请同意授权位置',
101
+    //     success: (res) => {
102
+    //         if (res.confirm) {
103
+    //             uni.getLocation({
104
+    //                 type: 'wgs84',
105
+    //                 success(res) {
106
+    //                     console.log(res)
107
+    //                     uni.setStorageSync(USER_LATITUDE, res.latitude)
108
+    //                     uni.setStorageSync(USER_LONGITUDE, res.longitude)
109
+    //                     // getRegeo(res.latitude, res.longitude);
110
+    //                 }
111
+    //             })
112
+    //             // amap.getWxLocation(async (loc) => {
113
+    //                 // 获取地址描述数据
114
+    //                 // const regeoRes = await amap.getRegeo({location: loc});
115
+    //                 // console.log(regeoRes.data.regeocode.addressComponent)
116
+    //             // })
117
+    //         }
118
+    //     }
119
+    // })
110 120
 }
111 121
 
112 122
 export async function getRegeo(latitude: number, longitude: number) {

+ 3 - 2
src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue

@@ -108,9 +108,10 @@ function confirmHandler() {
108 108
     if (res) {
109 109
       signInScore.value = res.score
110 110
       signInSuccess.value = true
111
+      uni.$emit('NEW_SIGN_IN_SUCCESS')
111 112
     }
112 113
   })
113
-  emit(CONFIRM_EVENT)
114
+  // emit(CONFIRM_EVENT)
114 115
 }
115 116
 
116 117
 function handleSignInSucceedClose() {
@@ -157,7 +158,7 @@ function handleSignInSucceedClose() {
157 158
     </div>
158 159
     <div
159 160
         @click.stop="closeHandler"
160
-        class="relative bottom-40 flex justify-center items-center"
161
+        class="relative bottom-30 flex justify-center items-center"
161 162
     >
162 163
       <image :src="signInCloseImage" class="h-8 w-8"></image>
163 164
     </div>

+ 1 - 1
src/components/CXBSkuPopup/CXBSkuPopup.vue

@@ -101,7 +101,7 @@ function handleCountChange(value) {
101 101
       v-model:show="showValue"
102 102
       @close="onCancel"
103 103
       position="bottom"
104
-      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe h-[60%] max-h-[80%]"
104
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe h-min-[60%] max-h-[80%]"
105 105
 
106 106
   >
107 107
     <div class="flex flex-col justify-between h-full">

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
src/pages.json


+ 1 - 1
src/pages/article/detail.vue

@@ -32,7 +32,7 @@ onLoad((option: any) => {
32 32
       <div class="font-bold">
33 33
         {{article.title}}
34 34
       </div>
35
-      <div class="text-xs py-4">
35
+      <div class=" py-4">
36 36
         <mpHtml :content="article.content.content"></mpHtml>
37 37
       </div>
38 38
 

+ 1 - 1
src/pages/help-center/index.vue

@@ -20,7 +20,7 @@ function handleShowArticleList(category: ArticleCategoryModel) {
20 20
 <template>
21 21
   <div>
22 22
     <div class="my-3 bg-white p-3">
23
-      <div class="text-xs font-bold">自助服务</div>
23
+      <div class=" font-bold">自助服务</div>
24 24
       <div class="flex justify-around py-2">
25 25
         <div v-for="(item, index) in list" :key="index"
26 26
              @tap="handleShowArticleList(item)"

+ 1 - 1
src/pages/home/index.vue

@@ -60,7 +60,7 @@ onLoad(() => {
60 60
     // 2 检查用户签到信息
61 61
     getNewSignInInfo().then(res => {
62 62
       const {today, day} = res
63
-      state.signToday = today
63
+      state.signToday = day
64 64
       if (today === 0) {
65 65
         state.isShowSignIn = true
66 66
       }

+ 22 - 3
src/pages/immediate-withdrawal/index.vue

@@ -21,7 +21,9 @@ const yanglaojin = ref<UserYanglaoJinModel>()
21 21
 
22 22
 const widthdrawalConfig = ref({})
23 23
 
24
-const cashWithdrawalAmount = ref(0)
24
+const cashWithdrawalAmount = ref()
25
+
26
+const isDisabled = ref(true)
25 27
 // userSpreadInfo.value.brokerage_price
26 28
 onLoad(async () => {
27 29
   await userStore.getUserInfo()
@@ -36,6 +38,7 @@ onLoad(async () => {
36 38
 
37 39
 watch(() => cashWithdrawalAmount.value, (val) => {
38 40
   if (val && isNumber(Number.parseFloat(val))) {
41
+    isDisabled.value = false
39 42
     getWithdrawalService({
40 43
       money: val
41 44
     }).then(res => {
@@ -44,6 +47,7 @@ watch(() => cashWithdrawalAmount.value, (val) => {
44 47
       console.log(res)
45 48
     })
46 49
   } else {
50
+    isDisabled.value = true
47 51
     withdrawalCal.value = {}
48 52
   }
49 53
 })
@@ -62,6 +66,9 @@ function handleInputAll() {
62 66
  * 立即提现
63 67
  */
64 68
 function handleImmediateWithdrawal() {
69
+  if (isDisabled.value) {
70
+    return
71
+  }
65 72
   console.log(yanglaojin.value)
66 73
   // 1 判断是否需要实名
67 74
   if (!yanglaojin.value?.is_certification == 1) {
@@ -71,22 +78,34 @@ function handleImmediateWithdrawal() {
71 78
   }
72 79
 
73 80
   if (widthdrawalConfig.value.withdrawal_status == '0') {
81
+    isDisabled.value = true
74 82
     return uni.showToast({
75 83
       title: '提现功能关闭',
76 84
       icon: 'none'
77 85
     })
78 86
   }
79 87
   if (widthdrawalConfig.value.withdrawal_wchat == '0') {
88
+    isDisabled.value = true
89
+
80 90
     return uni.showToast({
81 91
       title: '微信提现功能关闭',
82 92
       icon: 'none'
83 93
     })
84 94
   }
95
+  if (cashWithdrawalAmount.value > userSpreadInfo.value?.brokerage_price ) {
96
+    isDisabled.value = true
97
+    return uni.showToast({
98
+      title: '输入金额超过可提现余额',
99
+      icon: 'none'
100
+    })
101
+  }
85 102
 
86 103
   if (userSpreadInfo.value?.brokerage_price) {
87 104
     if (userSpreadInfo.value?.brokerage_price < widthdrawalConfig.value.withdrawal_money) {
105
+      isDisabled.value = true
88 106
       return uni.showToast({
89
-        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现'
107
+        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现',
108
+        icon: 'none'
90 109
       })
91 110
     }
92 111
   } else {
@@ -95,7 +114,6 @@ function handleImmediateWithdrawal() {
95 114
 
96 115
 
97 116
 
98
-
99 117
   getApplicationWithdrawal({ extract_price: cashWithdrawalAmount.value, extract_type: 1}).then(res => {
100 118
     // uni.showToast({
101 119
     //   title: res,
@@ -188,6 +206,7 @@ function handleShowAgreement(type) {
188 206
     <div class="flex flex-col">
189 207
       <div class=" flex rounded-full bg-red-300">
190 208
         <nut-button type="primary" block
209
+                    :disabled="isDisabled"
191 210
              @tap="handleImmediateWithdrawal"
192 211
         >
193 212
           立即提现

+ 26 - 3
src/pages/my-integral/index.vue

@@ -22,12 +22,12 @@ onShow(() => {
22 22
   } else {
23 23
   }
24 24
 })
25
-
26
-if (userStore.userInfo) {
25
+function loadSignInInfo() {
27 26
   // 2 检查用户签到信息
28 27
   getNewSignInInfo().then(res => {
28
+    console.log(res)
29 29
     const {today, day} = res
30
-    state.signToday = today
30
+    state.signToday = day
31 31
     if (today === 0) {
32 32
       state.isShowSignIn = true
33 33
     }
@@ -38,6 +38,29 @@ if (userStore.userInfo) {
38 38
     console.error(error + '->GetNewsSignInInfo')
39 39
   })
40 40
 }
41
+onLoad(() => {
42
+  uni.$on('NEW_SIGN_IN_SUCCESS', loadSignInInfo)
43
+
44
+})
45
+if (userStore.userInfo) {
46
+  loadSignInInfo()
47
+  // // 2 检查用户签到信息
48
+  // getNewSignInInfo().then(res => {
49
+  //   console.log(res)
50
+  //   const {today, day} = res
51
+  //   state.signToday = day
52
+  //   if (today === 0) {
53
+  //     state.isShowSignIn = true
54
+  //   }
55
+  //   // // if (today === 0) {
56
+  //   //   2.1 弹出签到窗口
57
+  //   // }
58
+  // }).catch(error => {
59
+  //   console.error(error + '->GetNewsSignInInfo')
60
+  // })
61
+}
62
+
63
+
41 64
 
42 65
 function handleSign() {
43 66
   console.log(state.signToday)

+ 1 - 3
src/pages/my-integral/user-invation.vue

@@ -119,8 +119,7 @@ function shareImage() {
119 119
 }
120 120
 </script>
121 121
 <template>
122
-  <CXBBasePage>
123
-    <div class="relative top-0 left-0 min-h-screen h-full w-full bg-[#FFCB75] z-0 ">
122
+    <div class="relative top-0 left-0 min-h-screen h-full w-screen bg-[#FFCB75] z-0 ">
124 123
       <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
125 124
       <image
126 125
           @click="handleShowAgreement(17)"
@@ -251,7 +250,6 @@ function shareImage() {
251 250
 
252 251
     </div>
253 252
 
254
-  </CXBBasePage>
255 253
 </template>
256 254
 
257 255
 <style>

+ 2 - 0
src/pages/order-confirm/index.vue

@@ -153,6 +153,8 @@ function payment(createOrderData: CreateOrderRequest) {
153 153
 
154 154
   orderCreate(createOrderData).then(res => {
155 155
     if (res) {
156
+      console.log('order_create')
157
+      console.log(res)
156 158
       uni.hideLoading()
157 159
       uni.navigateTo({
158 160
         // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`

Разлика између датотеке није приказан због своје велике величине
+ 5 - 5
src/pages/order/comment.vue


+ 5 - 0
src/pages/order/components/Order4List.vue

@@ -93,6 +93,11 @@ onMounted(() => {
93 93
   })
94 94
 })
95 95
 onUnmounted(() => {
96
+  uni.$on('orderComment', () => {
97
+    // loadAllOrderList()
98
+    // state.tabvalue = 4
99
+    loadList('reload')
100
+  })
96 101
   uni.$off('onTab4ReachBottom');
97 102
   uni.$off('onTab4PullDownRefresh');
98 103
 })

+ 1 - 1
src/pages/order/components/OrderItem.vue

@@ -93,7 +93,7 @@ function handleCancelOrder() {
93 93
 function handlePayment() {
94 94
   const { orderItem } = props
95 95
   uni.navigateTo({
96
-    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.order_id}&OrderList=${JSON.stringify(orderItem)}`
96
+    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.group_order_id}`
97 97
     // url: `/pages/payment/index`
98 98
   })
99 99
 }

+ 1 - 1
src/pages/order/components/OrderObligationItem.vue

@@ -93,7 +93,7 @@ function handleCancelOrder() {
93 93
 function handlePayment() {
94 94
   const { orderItem } = props
95 95
   uni.navigateTo({
96
-    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.order_id}&OrderList=${JSON.stringify(orderItem)}`
96
+    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.group_order_id}&OrderList=${JSON.stringify(orderItem)}`
97 97
     // url: `/pages/payment/index`
98 98
   })
99 99
 }

+ 1 - 1
src/pages/order/components/RefundOrderItem.vue

@@ -92,7 +92,7 @@ function handleCancelOrder() {
92 92
 function handlePayment() {
93 93
   const { orderItem } = props
94 94
   uni.navigateTo({
95
-    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.order_id}&OrderList=${JSON.stringify(orderItem)}`
95
+    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.group_order_id}&OrderList=${JSON.stringify(orderItem)}`
96 96
     // url: `/pages/payment/index`
97 97
   })
98 98
 }

+ 5 - 0
src/pages/order/index.vue

@@ -94,6 +94,11 @@ uni.$on('orderTakeFromList', () => {
94 94
   state.tabvalue = 3
95 95
 })
96 96
 
97
+uni.$on('orderComment', () => {
98
+  // loadAllOrderList()
99
+  state.tabvalue = 4
100
+})
101
+
97 102
 onReachBottom(() => {
98 103
   // handleScrollToLower()
99 104
   if (state.tabvalue == 0) {

+ 3 - 2
src/pages/order/logistics.vue

@@ -10,6 +10,7 @@ import {
10 10
 } from "~/apis/model/product.model";
11 11
 import {DcProductModel} from "~/apis/model/dacang.model";
12 12
 import {getLogistics} from "~/apis/order.api";
13
+import {encodePhone} from "../../utils";
13 14
 
14 15
 const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
15 16
 
@@ -165,7 +166,7 @@ function handleClipboard() {
165 166
 
166 167
         <div class="flex items-center gap-2 ">
167 168
           <div class="rounded-full w-4 h-4 bg-gray-400 text-white flex flex-col justify-center items-center">收</div>
168
-          <div class="text-gray-400">{{ state.orderDetail.user_address + ' ' + state.orderDetail.real_name + ' ' + state.orderDetail.user_phone}}</div>
169
+          <div class="text-gray-400">{{ state.orderDetail.user_address + ' ' + state.orderDetail.real_name + ' ' + encodePhone(state.orderDetail.user_phone)}}</div>
169 170
         </div>
170 171
 
171 172
         <!-- 物流动态 -->
@@ -221,7 +222,7 @@ function handleClipboard() {
221 222
 </template>
222 223
 <route lang="yaml" >
223 224
 style:
224
-navigationBarTitleText: 已发货
225
+  navigationBarTitleText: 已发货
225 226
 </route>
226 227
 
227 228
 <style lang="scss">

+ 1 - 1
src/pages/order/obligation-detail.vue

@@ -51,7 +51,7 @@ function handlePayment() {
51 51
   // const { orderItem } = detail.value
52 52
   // console.log(orderItem)
53 53
   uni.navigateTo({
54
-    url: '/pages/payment/index?' + `pay_price=${ detail.value.total_price}&order_id=${ detail.value.group_order_id}&OrderList=${JSON.stringify( detail.value.orderList)}`
54
+    url: '/pages/payment/index?' + `pay_price=${ detail.value.pay_price}&order_id=${ detail.value.group_order_id}&OrderList=${JSON.stringify( detail.value.orderList)}`
55 55
     // url: `/pages/payment/index`
56 56
   })
57 57
 }

+ 3 - 0
src/pages/revenue-sharing/index.vue

@@ -76,6 +76,9 @@ onLoad((option: any) => {
76 76
 // }
77 77
 
78 78
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
79
+  if (action === 'reload') {
80
+    state.currentPage = 1
81
+  }
79 82
   getRevenueSharing({
80 83
     page: state.currentPage,
81 84
     limit: state.pageSize,

+ 5 - 0
src/pages/search/index.vue

@@ -183,6 +183,11 @@ function loadProductList(action: 'page' | 'reload', callback?: (items) => void)
183 183
         // state.totalPage = Math.ceil()
184 184
         // res[0].
185 185
         // console.log(res)
186
+      }).catch(error => {
187
+        uni.showToast({
188
+          title: error,
189
+          icon: "none"
190
+        })
186 191
       })
187 192
       break;
188 193
     }

+ 14 - 2
src/pages/search/search-dacang.vue

@@ -318,6 +318,17 @@ async function handleRemoveAllKeyword() {
318 318
   await uni.setStorageSync('HISTORY_KEYWORDS', [])
319 319
 }
320 320
 
321
+async function handleHistoryKeywordSearch(keywordItem) {
322
+  // keywordItem.keyword
323
+  // if (keywordItem.keyword) {
324
+    searchValue.value = keywordItem
325
+    // state.historyKeyWords.push(searchValue.value)
326
+    // state.historyKeyWords = uniq(state.historyKeyWords)
327
+    // await uni.setStorageSync('HISTORY_KEYWORDS', state.historyKeyWords)
328
+    loadProductList('reload')
329
+    isSearchMode.value = true
330
+  // }
331
+}
321 332
 async function handleKeywordSearch(keywordItem) {
322 333
   // keywordItem.keyword
323 334
   if (keywordItem.keyword) {
@@ -329,7 +340,6 @@ async function handleKeywordSearch(keywordItem) {
329 340
     isSearchMode.value = true
330 341
   }
331 342
 }
332
-
333 343
 function handleShowMerchant(merchant) {
334 344
   console.log(merchant)
335 345
   uni.navigateTo({
@@ -379,7 +389,9 @@ function handleShowMerchant(merchant) {
379 389
                class="flex justify-center items-center border border-solid border-gray-200 text-[12px] rounded-full min-w-6 text-center  max-w-fit px-2 py-1 bg-white"
380 390
                :class="state.isDel ? 'gap-2': ''"
381 391
           >
382
-            <div class="flex-1">
392
+            <div class="flex-1"
393
+                 @click="handleHistoryKeywordSearch(tagItem)"
394
+            >
383 395
               {{ tagItem }}
384 396
             </div>
385 397
             <div class="flex" v-if="state.isDel" @click="handleRemoveKeyword(tagItem)">

+ 113 - 52
src/pages/store/home/index.vue

@@ -28,7 +28,10 @@ const state = reactive({
28 28
 
29 29
   status: 'noMore',
30 30
   triggered: false,
31
+
32
+  params: {},
31 33
   priceType: NaN,
34
+  is_best: NaN,
32 35
   sales: NaN,
33 36
   is_new: NaN,
34 37
   type: NaN,
@@ -71,28 +74,89 @@ onLoad((options: any) => {
71 74
 //     mer_id: id.value
72 75
 //   })
73 76
 // }
77
+// private void requestGoodsList() {
78
+//   Map<String, Object> map = new HashMap<>();
79
+//   map.put("pageNum", mPage);
80
+//   map.put("pageSize", "60");
81
+//   map.put("mer_id", merId);
82
+//   //推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7
83
+//   if (requestType == 1) {
84
+//     map.put("is_best", 0);
85
+//   } else if (requestType == 2) {
86
+//     map.put("sales", 0);
87
+//   } else if (requestType == 3) {
88
+//     map.put("is_new", 0);
89
+//   } else if (requestType == 4) {
90
+//     map.put("priceType", 1);
91
+//   } else if (requestType == 5) {
92
+//     map.put("priceType", 0);
93
+//   } else if (requestType == 6) {
94
+//     map.put("type", 1);
95
+//   } else if (requestType == 7) {
96
+//     map.put("type", 5);
97
+//   }
98
+//   shopViewModel.getSearchProductList(map);
99
+// }
100
+//
101
+
74 102
 function handleProductTypeChange(typeValue) {
75
-  if (typeValue === 3) {
76
-    state.priceType = NaN
77
-    state.sales = NaN
78
-    state.is_new = 0
103
+  if (typeValue == 1) {
104
+    state.params = {
105
+      is_best: 0
106
+    }
79 107
   }
80
-  else if (typeValue === 2) {
81
-    state.priceType = NaN
82
-    state.is_new = NaN
83
-    state.sales = 0
84
-  } else {
85
-    state.type = typeValue
108
+  if (typeValue == 2) {
109
+    state.params = {
110
+      sales: 0
111
+    }
112
+  }
113
+  if (typeValue == 3) {
114
+    state.params = {
115
+      is_new: 0
116
+    }
117
+  }
118
+  // if (typeValue == 4) {
119
+  //   state.params = {
120
+  //     priceType: 1
121
+  //   }
122
+  // }
123
+  if (typeValue == 6) {
124
+    state.params = {
125
+      type: 1
126
+    }
127
+  }
128
+  if (typeValue == 7) {
129
+    state.params = {
130
+      type: 5
131
+    }
86 132
   }
133
+  // if (typeValue === 3) {
134
+  //   state.priceType = NaN
135
+  //   state.sales = NaN
136
+  //   state.is_new = 0
137
+  // }
138
+  // else if (typeValue === 2) {
139
+  //   state.priceType = NaN
140
+  //   state.is_new = NaN
141
+  //   state.sales = 0
142
+  // } else {
143
+  //   state.type = typeValue
144
+  //   state.priceType = NaN
145
+  //   state.is_new = NaN
146
+  //   state.sales = NaN
147
+  // }
87 148
   loadList('reload')
88 149
 }
89 150
 function handleOrderChange(priceType) {
90 151
   console.log(priceType)
91 152
   state.priceType = priceType
92 153
 
154
+  state.params = {
155
+    priceType,
156
+  }
93 157
   // reset
94
-  state.sales = NaN
95
-  state.is_new =NaN
158
+  // state.sales = NaN
159
+  // state.is_new =NaN
96 160
 
97 161
   loadList('reload')
98 162
 }
@@ -102,53 +166,50 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
102 166
     // mer_keyword: '',
103 167
     pageNum: state.currentPage,
104 168
     pageSize: state.pageSize,
105
-    // mer_id?: string
106
-    // mer_keyword?: string
107
-    // pageNum: number
108
-    // pageSize: number
109
-    // order: ORDER
110
-    //请求类别,推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7;
111
-    // is_best?: number
112
-    // sales?: number
113
-    // is_new?: number
114
-    // priceType?: number
115
-    // type?: number
116
-    // category_id?: string
117
-  }
118
-  if (state.type) {
119
-    params.type = state.type
120
-  }
121
-  if (state.sales === 0) {
122
-    params.sales = state.sales
123
-  }
124
-  // console.log(state.is_new)
125
-  if (state.is_new === 0) {
126
-    params.is_new = state.is_new
127
-  }
128
-  if (state.priceType === 1 || state.priceType === 0) {
129
-    params.priceType = state.priceType
130 169
   }
170
+  // if (state.type) {
171
+  //   params.type = state.type
172
+  // }
173
+  // if (state.sales === 0) {
174
+  //   params.sales = state.sales
175
+  // }
176
+  // // console.log(state.is_new)
177
+  // if (state.is_new === 0) {
178
+  //   params.is_new = state.is_new
179
+  // }
180
+  // if (state.priceType === 1 || state.priceType === 0) {
181
+  //   params.priceType = state.priceType
182
+  // }
131 183
   if (action === 'reload') {
132 184
     params.pageNum = 1
133 185
   }
134 186
   searchProductList({
135
-    ...params
187
+    ...params,
188
+    ...state.params
136 189
   }).then(res => {
137
-    state.triggered = false
138
-    if (action === 'page') {
139
-      productList.value = productList.value.contact(res.pageInfo.list)
140
-    }
141
-    if (action === 'reload') {
142
-      productList.value = res.pageInfo.list
143
-    }
144
-    console.log(res.pageInfo)
145
-    state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
146
-    state.status = 'more'
147
-
148
-
149
-    if (callback) {
150
-      callback(res.pageInfo.list)
190
+    console.log(res)
191
+    if (res && res.pageInfo) {
192
+      state.triggered = false
193
+      if (action === 'page') {
194
+        productList.value = productList.value.contact(res.pageInfo.list)
195
+      }
196
+      if (action === 'reload') {
197
+        productList.value = res.pageInfo.list
198
+      }
199
+      console.log(res.pageInfo)
200
+      state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
201
+      state.status = 'more'
202
+
203
+
204
+      if (callback) {
205
+        callback(res.pageInfo.list)
206
+      }
151 207
     }
208
+  }).catch(error => {
209
+    uni.showToast({
210
+      title: error,
211
+      icon: "none"
212
+    })
152 213
   })
153 214
 }
154 215
 const navList = [{

+ 5 - 6
src/pages/store/nearby/index.vue

@@ -179,13 +179,13 @@ function handleScrollToLower() {
179 179
     </template>
180 180
   </nut-searchbar>
181 181
 
182
-  <div class="flex">
182
+  <div class="flex ">
183 183
     <!-- 左侧 一级分类 -->
184
-    <div>
184
+    <div class="w-1/4">
185 185
       <scroll-view
186 186
           :scroll-y="true"
187 187
           :style="{ height: `${state.scrollHeight}px` }"
188
-          class="w-25 h-full bg-[#f8f8f8]"
188
+          class="w-full h-full bg-[#f8f8f8]"
189 189
       >
190 190
         <div
191 191
             @tap="loadAll()"
@@ -215,8 +215,8 @@ function handleScrollToLower() {
215 215
     </div>
216 216
 
217 217
 
218
-    <div class="w-full">
219
-      <div class="fixed z-3 flex flex-col justify-center h-10">
218
+    <div class="w-3/4">
219
+      <div class="fixed z-3 flex flex-col justify-center h-10 pl-3">
220 220
         <nut-menu>
221 221
           <nut-menu-item v-model="state.menuDefaultValue"
222 222
                          :options="state.options"
@@ -288,7 +288,6 @@ style:
288 288
 
289 289
 <style lang="scss">
290 290
 page {
291
-
292 291
   --nut-menu-item-font-size: 14px;
293 292
   --nut-menu-bar-line-height: 24px;
294 293
   --nut-menu-bar-box-shadow: none;