Basil 2 anos atrás
pai
commit
c371e5c12f

+ 30 - 20
src/apis/common.ts

@@ -85,28 +85,38 @@ export function closeAccount(phone: string) {
85
 }
85
 }
86
 
86
 
87
 export function getLocal() {
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
 export async function getRegeo(latitude: number, longitude: number) {
122
 export async function getRegeo(latitude: number, longitude: number) {

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

@@ -108,9 +108,10 @@ function confirmHandler() {
108
     if (res) {
108
     if (res) {
109
       signInScore.value = res.score
109
       signInScore.value = res.score
110
       signInSuccess.value = true
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
 function handleSignInSucceedClose() {
117
 function handleSignInSucceedClose() {
@@ -157,7 +158,7 @@ function handleSignInSucceedClose() {
157
     </div>
158
     </div>
158
     <div
159
     <div
159
         @click.stop="closeHandler"
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
       <image :src="signInCloseImage" class="h-8 w-8"></image>
163
       <image :src="signInCloseImage" class="h-8 w-8"></image>
163
     </div>
164
     </div>

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

@@ -101,7 +101,7 @@ function handleCountChange(value) {
101
       v-model:show="showValue"
101
       v-model:show="showValue"
102
       @close="onCancel"
102
       @close="onCancel"
103
       position="bottom"
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
     <div class="flex flex-col justify-between h-full">
107
     <div class="flex flex-col justify-between h-full">

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
src/pages.json


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

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

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

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

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

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

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

@@ -22,12 +22,12 @@ onShow(() => {
22
   } else {
22
   } else {
23
   }
23
   }
24
 })
24
 })
25
-
26
-if (userStore.userInfo) {
25
+function loadSignInInfo() {
27
   // 2 检查用户签到信息
26
   // 2 检查用户签到信息
28
   getNewSignInInfo().then(res => {
27
   getNewSignInInfo().then(res => {
28
+    console.log(res)
29
     const {today, day} = res
29
     const {today, day} = res
30
-    state.signToday = today
30
+    state.signToday = day
31
     if (today === 0) {
31
     if (today === 0) {
32
       state.isShowSignIn = true
32
       state.isShowSignIn = true
33
     }
33
     }
@@ -38,6 +38,29 @@ if (userStore.userInfo) {
38
     console.error(error + '->GetNewsSignInInfo')
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
 function handleSign() {
65
 function handleSign() {
43
   console.log(state.signToday)
66
   console.log(state.signToday)

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

@@ -119,8 +119,7 @@ function shareImage() {
119
 }
119
 }
120
 </script>
120
 </script>
121
 <template>
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
       <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
123
       <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
125
       <image
124
       <image
126
           @click="handleShowAgreement(17)"
125
           @click="handleShowAgreement(17)"
@@ -251,7 +250,6 @@ function shareImage() {
251
 
250
 
252
     </div>
251
     </div>
253
 
252
 
254
-  </CXBBasePage>
255
 </template>
253
 </template>
256
 
254
 
257
 <style>
255
 <style>

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

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

Diferenças do arquivo suprimidas por serem muito extensas
+ 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
 onUnmounted(() => {
95
 onUnmounted(() => {
96
+  uni.$on('orderComment', () => {
97
+    // loadAllOrderList()
98
+    // state.tabvalue = 4
99
+    loadList('reload')
100
+  })
96
   uni.$off('onTab4ReachBottom');
101
   uni.$off('onTab4ReachBottom');
97
   uni.$off('onTab4PullDownRefresh');
102
   uni.$off('onTab4PullDownRefresh');
98
 })
103
 })

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

@@ -93,7 +93,7 @@ function handleCancelOrder() {
93
 function handlePayment() {
93
 function handlePayment() {
94
   const { orderItem } = props
94
   const { orderItem } = props
95
   uni.navigateTo({
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
     // url: `/pages/payment/index`
97
     // url: `/pages/payment/index`
98
   })
98
   })
99
 }
99
 }

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

@@ -93,7 +93,7 @@ function handleCancelOrder() {
93
 function handlePayment() {
93
 function handlePayment() {
94
   const { orderItem } = props
94
   const { orderItem } = props
95
   uni.navigateTo({
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
     // url: `/pages/payment/index`
97
     // url: `/pages/payment/index`
98
   })
98
   })
99
 }
99
 }

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

@@ -92,7 +92,7 @@ function handleCancelOrder() {
92
 function handlePayment() {
92
 function handlePayment() {
93
   const { orderItem } = props
93
   const { orderItem } = props
94
   uni.navigateTo({
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
     // url: `/pages/payment/index`
96
     // url: `/pages/payment/index`
97
   })
97
   })
98
 }
98
 }

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

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

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

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

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

@@ -51,7 +51,7 @@ function handlePayment() {
51
   // const { orderItem } = detail.value
51
   // const { orderItem } = detail.value
52
   // console.log(orderItem)
52
   // console.log(orderItem)
53
   uni.navigateTo({
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
     // url: `/pages/payment/index`
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
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
78
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
79
+  if (action === 'reload') {
80
+    state.currentPage = 1
81
+  }
79
   getRevenueSharing({
82
   getRevenueSharing({
80
     page: state.currentPage,
83
     page: state.currentPage,
81
     limit: state.pageSize,
84
     limit: state.pageSize,

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

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

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

@@ -318,6 +318,17 @@ async function handleRemoveAllKeyword() {
318
   await uni.setStorageSync('HISTORY_KEYWORDS', [])
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
 async function handleKeywordSearch(keywordItem) {
332
 async function handleKeywordSearch(keywordItem) {
322
   // keywordItem.keyword
333
   // keywordItem.keyword
323
   if (keywordItem.keyword) {
334
   if (keywordItem.keyword) {
@@ -329,7 +340,6 @@ async function handleKeywordSearch(keywordItem) {
329
     isSearchMode.value = true
340
     isSearchMode.value = true
330
   }
341
   }
331
 }
342
 }
332
-
333
 function handleShowMerchant(merchant) {
343
 function handleShowMerchant(merchant) {
334
   console.log(merchant)
344
   console.log(merchant)
335
   uni.navigateTo({
345
   uni.navigateTo({
@@ -379,7 +389,9 @@ function handleShowMerchant(merchant) {
379
                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"
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
                :class="state.isDel ? 'gap-2': ''"
390
                :class="state.isDel ? 'gap-2': ''"
381
           >
391
           >
382
-            <div class="flex-1">
392
+            <div class="flex-1"
393
+                 @click="handleHistoryKeywordSearch(tagItem)"
394
+            >
383
               {{ tagItem }}
395
               {{ tagItem }}
384
             </div>
396
             </div>
385
             <div class="flex" v-if="state.isDel" @click="handleRemoveKeyword(tagItem)">
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
   status: 'noMore',
29
   status: 'noMore',
30
   triggered: false,
30
   triggered: false,
31
+
32
+  params: {},
31
   priceType: NaN,
33
   priceType: NaN,
34
+  is_best: NaN,
32
   sales: NaN,
35
   sales: NaN,
33
   is_new: NaN,
36
   is_new: NaN,
34
   type: NaN,
37
   type: NaN,
@@ -71,28 +74,89 @@ onLoad((options: any) => {
71
 //     mer_id: id.value
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
 function handleProductTypeChange(typeValue) {
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
   loadList('reload')
148
   loadList('reload')
88
 }
149
 }
89
 function handleOrderChange(priceType) {
150
 function handleOrderChange(priceType) {
90
   console.log(priceType)
151
   console.log(priceType)
91
   state.priceType = priceType
152
   state.priceType = priceType
92
 
153
 
154
+  state.params = {
155
+    priceType,
156
+  }
93
   // reset
157
   // reset
94
-  state.sales = NaN
95
-  state.is_new =NaN
158
+  // state.sales = NaN
159
+  // state.is_new =NaN
96
 
160
 
97
   loadList('reload')
161
   loadList('reload')
98
 }
162
 }
@@ -102,53 +166,50 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
102
     // mer_keyword: '',
166
     // mer_keyword: '',
103
     pageNum: state.currentPage,
167
     pageNum: state.currentPage,
104
     pageSize: state.pageSize,
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
   if (action === 'reload') {
183
   if (action === 'reload') {
132
     params.pageNum = 1
184
     params.pageNum = 1
133
   }
185
   }
134
   searchProductList({
186
   searchProductList({
135
-    ...params
187
+    ...params,
188
+    ...state.params
136
   }).then(res => {
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
 const navList = [{
215
 const navList = [{

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

@@ -179,13 +179,13 @@ function handleScrollToLower() {
179
     </template>
179
     </template>
180
   </nut-searchbar>
180
   </nut-searchbar>
181
 
181
 
182
-  <div class="flex">
182
+  <div class="flex ">
183
     <!-- 左侧 一级分类 -->
183
     <!-- 左侧 一级分类 -->
184
-    <div>
184
+    <div class="w-1/4">
185
       <scroll-view
185
       <scroll-view
186
           :scroll-y="true"
186
           :scroll-y="true"
187
           :style="{ height: `${state.scrollHeight}px` }"
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
         <div
190
         <div
191
             @tap="loadAll()"
191
             @tap="loadAll()"
@@ -215,8 +215,8 @@ function handleScrollToLower() {
215
     </div>
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
         <nut-menu>
220
         <nut-menu>
221
           <nut-menu-item v-model="state.menuDefaultValue"
221
           <nut-menu-item v-model="state.menuDefaultValue"
222
                          :options="state.options"
222
                          :options="state.options"
@@ -288,7 +288,6 @@ style:
288
 
288
 
289
 <style lang="scss">
289
 <style lang="scss">
290
 page {
290
 page {
291
-
292
   --nut-menu-item-font-size: 14px;
291
   --nut-menu-item-font-size: 14px;
293
   --nut-menu-bar-line-height: 24px;
292
   --nut-menu-bar-line-height: 24px;
294
   --nut-menu-bar-box-shadow: none;
293
   --nut-menu-bar-box-shadow: none;