dxz1228 2 vuotta sitten
vanhempi
commit
b0137657ce
54 muutettua tiedostoa jossa 3447 lisäystä ja 1076 poistoa
  1. 0 1
      components.d.ts
  2. 75 11
      src/apis/order.api.ts
  3. 26 2
      src/apis/user.ts
  4. 1 1
      src/components/CXBEmpty/CXBEmpty.vue
  5. 7 7
      src/components/CXBSkuPopup/CXBSkuPopup.vue
  6. 2 2
      src/components/ProductCard/ProductCard.vue
  7. 1 1
      src/pages.json
  8. 1 1
      src/pages/annuity/index.vue
  9. 2 1
      src/pages/home/components/announcement.vue
  10. 3 2
      src/pages/home/components/banner.vue
  11. 1 1
      src/pages/home/components/header.vue
  12. 2 2
      src/pages/home/components/navs.vue
  13. 341 70
      src/pages/home/index.vue
  14. 31 4
      src/pages/message/index.vue
  15. 36 47
      src/pages/miaosha/index.vue
  16. 1 1
      src/pages/my-profile/index.vue
  17. 215 178
      src/pages/my-rules/index.vue
  18. 1 1
      src/pages/order-confirm/index.vue
  19. 16 9
      src/pages/order/components/AllItemList.vue
  20. 8 0
      src/pages/order/components/ObligationOrderList.vue
  21. 117 22
      src/pages/order/components/OrderItem.vue
  22. 58 50
      src/pages/order/components/OrderObligationItem.vue
  23. 34 35
      src/pages/order/components/RefundOrderItem.vue
  24. 172 27
      src/pages/order/detail.vue
  25. 2 6
      src/pages/order/index.vue
  26. 110 53
      src/pages/order/logistics.vue
  27. 4 1
      src/pages/order/obligation-detail.vue
  28. 92 19
      src/pages/order_addcart/index.vue
  29. 2 0
      src/pages/payment/index.vue
  30. 1 1
      src/pages/product/integral.vue
  31. 269 128
      src/pages/red-integral/index.vue
  32. 1 1
      src/pages/refund/components/RefundReasonPopup.vue
  33. 672 123
      src/pages/refund/detail.vue
  34. 158 108
      src/pages/refund/drawback.vue
  35. 2 2
      src/pages/refund/index.vue
  36. 14 17
      src/pages/refund/option.vue
  37. 103 0
      src/pages/refund/scancode/kdlist.vue
  38. 280 0
      src/pages/refund/scancode/scancode.vue
  39. 305 0
      src/pages/refund/scancode/xsjllist.vue
  40. 4 1
      src/pages/search/index.vue
  41. 30 5
      src/pages/search/search-dacang.vue
  42. 5 5
      src/pages/store/home/components/MerchantHeader.vue
  43. 30 22
      src/pages/store/home/components/MerchantProductCard.vue
  44. 171 77
      src/pages/store/product/detail.vue
  45. 39 31
      src/pages/user/index.vue
  46. BIN
      src/static/icon/ckgd.png
  47. BIN
      src/static/icon/title_1.png
  48. BIN
      src/static/icon/复制.png
  49. BIN
      src/static/icon/展开.png
  50. BIN
      src/static/icon/快递.png
  51. BIN
      src/static/icon/扫码.png
  52. BIN
      src/static/icon/收起.png
  53. BIN
      src/static/icon/联系商家.png
  54. 2 0
      src/stores/userStore.ts

+ 0 - 1
components.d.ts

@@ -69,7 +69,6 @@ declare module '@vue/runtime-core' {
69
     NutStep: typeof import('nutui-uniapp/components/step/step.vue')['default']
69
     NutStep: typeof import('nutui-uniapp/components/step/step.vue')['default']
70
     NutSteps: typeof import('nutui-uniapp/components/steps/steps.vue')['default']
70
     NutSteps: typeof import('nutui-uniapp/components/steps/steps.vue')['default']
71
     NutSwitch: typeof import('nutui-uniapp/components/switch/switch.vue')['default']
71
     NutSwitch: typeof import('nutui-uniapp/components/switch/switch.vue')['default']
72
-    NutTable: typeof import('nutui-uniapp/components/table/table.vue')['default']
73
     NutTabPane: typeof import('nutui-uniapp/components/tabpane/tabpane.vue')['default']
72
     NutTabPane: typeof import('nutui-uniapp/components/tabpane/tabpane.vue')['default']
74
     NutTabs: typeof import('nutui-uniapp/components/tabs/tabs.vue')['default']
73
     NutTabs: typeof import('nutui-uniapp/components/tabs/tabs.vue')['default']
75
     NutUploader: typeof import('nutui-uniapp/components/uploader/uploader.vue')['default']
74
     NutUploader: typeof import('nutui-uniapp/components/uploader/uploader.vue')['default']

+ 75 - 11
src/apis/order.api.ts

@@ -1,13 +1,13 @@
1
-import {defHttp, detailHttp, skuhttp} from "~/utils/http"
1
+import { defHttp, detailHttp, skuhttp } from "~/utils/http"
2
 
2
 
3
 import type {
3
 import type {
4
     IntegralOrderCreateModel, OrderCheckModel, OrderCreateModel,
4
     IntegralOrderCreateModel, OrderCheckModel, OrderCreateModel,
5
     OrderCreateShoppingModel, ProductSkuModel, OrderListDataModel, OrderListObligationResult, OrderListResult, OrderQuantityModel, ProductSkustatusModel
5
     OrderCreateShoppingModel, ProductSkuModel, OrderListDataModel, OrderListObligationResult, OrderListResult, OrderQuantityModel, ProductSkustatusModel
6
 } from "~/apis/model/order.model"
6
 } from "~/apis/model/order.model"
7
-import type {ThirdOrderResult} from "~/apis/model/third-order.model";
8
-import type {CommentProductRequest} from "~/apis/model/comment-product";
9
-import type {AfterSalesOrderResult} from "~/apis/model/after-sales-order.model";
10
-import type {RefundApplyRequest} from "~/apis/model/refund.model";
7
+import type { ThirdOrderResult } from "~/apis/model/third-order.model";
8
+import type { CommentProductRequest } from "~/apis/model/comment-product";
9
+import type { AfterSalesOrderResult } from "~/apis/model/after-sales-order.model";
10
+import type { RefundApplyRequest } from "~/apis/model/refund.model";
11
 
11
 
12
 export interface CartIdRequest {
12
 export interface CartIdRequest {
13
     cart_id: Array<string>
13
     cart_id: Array<string>
@@ -59,6 +59,14 @@ enum API {
59
     REFUND_APPLY = '/api/refund/apply',
59
     REFUND_APPLY = '/api/refund/apply',
60
     // 退款订单详情
60
     // 退款订单详情
61
     REFUND_DETAIL = '/api/refund/detail',
61
     REFUND_DETAIL = '/api/refund/detail',
62
+    //快递列表
63
+    REFUND_KDLIST = '/api/common/express',
64
+    //退货订单
65
+    REFUND_OUTDL = '/api/refund/back_goods',
66
+    //退换货物流信息
67
+    REFUND_WLLIST = '/api/refund/express',
68
+    //协商记录
69
+    REFUND_XSLIST = '/api/refund/consult_list',
62
     // 售后-订单列表
70
     // 售后-订单列表
63
     REFUND_LIST = '/api/refund/list',
71
     REFUND_LIST = '/api/refund/list',
64
     // 三方订单
72
     // 三方订单
@@ -94,6 +102,62 @@ export function getRefundDetail(id: string) {
94
     })
102
     })
95
 }
103
 }
96
 
104
 
105
+
106
+/**
107
+ * 快递列表/api/common/express
108
+ * @param params 
109
+ * 
110
+ * @returns 
111
+ */
112
+
113
+
114
+export function getRefundKdlist() {
115
+    return defHttp.get({
116
+        url: API.REFUND_KDLIST,
117
+    })
118
+}
119
+/**
120
+ * 提交退货订单
121
+ * @param params 
122
+ * 
123
+ * @returns 
124
+ */
125
+
126
+
127
+export function getRefundOutDl(id: any, data: any) {
128
+    return defHttp.post({
129
+        url: API.REFUND_OUTDL + `/${id}`,
130
+        data: { ...data }
131
+    })
132
+}
133
+/**
134
+ * 获取退换货物流信息
135
+ * @param params 
136
+ * 
137
+ * @returns 
138
+ */
139
+
140
+
141
+export function getRefundWlList(id: any) {
142
+    return defHttp.get({
143
+        url: API.REFUND_WLLIST + `/${id}`
144
+    })
145
+}
146
+/**
147
+ * 获取协商记录
148
+ * @param params 
149
+ * 
150
+ * @returns 
151
+ */
152
+
153
+
154
+export function getRefundXSlist(id: any) {
155
+    return defHttp.post({
156
+        url: API.REFUND_XSLIST + `/${id}`
157
+    })
158
+}
159
+
160
+
97
 /**
161
 /**
98
  * 售后-订单列表
162
  * 售后-订单列表
99
  */
163
  */
@@ -150,7 +214,7 @@ export function totalOrderNumber(): Promise<OrderQuantityModel> {
150
  * 三方订单
214
  * 三方订单
151
  * @param params
215
  * @param params
152
  */
216
  */
153
-export function getThirdOrder(params: { type: string, page: number, limit: 20 | number}): Promise<ThirdOrderResult> {
217
+export function getThirdOrder(params: { type: string, page: number, limit: 20 | number }): Promise<ThirdOrderResult> {
154
     return defHttp.get({
218
     return defHttp.get({
155
         url: API.USER_THIRD_ORDER,
219
         url: API.USER_THIRD_ORDER,
156
         data: {
220
         data: {
@@ -211,12 +275,12 @@ export function createShopping(params: {
211
 /**
275
 /**
212
  * 改变购物车商品sku
276
  * 改变购物车商品sku
213
  */
277
  */
214
-export function changeProdoctSku(cart_id:string,unique:string): Promise<ProductSkustatusModel> {
215
-    console.log(unique,'order的api接收的unique')
216
-    console.log(cart_id,'order的api接收的unique')
278
+export function changeProdoctSku(cart_id: string, unique: string): Promise<ProductSkustatusModel> {
279
+    console.log(unique, 'order的api接收的unique')
280
+    console.log(cart_id, 'order的api接收的unique')
217
     return skuhttp.post({
281
     return skuhttp.post({
218
-        url:API.CHANGE_PRODUCT_SKU + `/${cart_id}?`,
219
-        data:{
282
+        url: API.CHANGE_PRODUCT_SKU + `/${cart_id}?`,
283
+        data: {
220
             unique
284
             unique
221
         }
285
         }
222
     })
286
     })

+ 26 - 2
src/apis/user.ts

@@ -1,4 +1,4 @@
1
-import { defHttp } from '~/utils/http'
1
+import { defHttp, detailHttp } from '~/utils/http'
2
 import type { UserUnionParams, UserUnionResult } from "~/apis/model/userUnionModel";
2
 import type { UserUnionParams, UserUnionResult } from "~/apis/model/userUnionModel";
3
 import Cache from '~/utils/cache'
3
 import Cache from '~/utils/cache'
4
 import { EXPIRES_TIME, LOGIN_STATUS, OPEN_ID, STATE_R_KEY, USER_INFO } from "~/constants";
4
 import { EXPIRES_TIME, LOGIN_STATUS, OPEN_ID, STATE_R_KEY, USER_INFO } from "~/constants";
@@ -106,7 +106,9 @@ enum API {
106
 
106
 
107
     // 红积分列表
107
     // 红积分列表
108
     USER_RED_LOG = '/api/user/red_log',
108
     USER_RED_LOG = '/api/user/red_log',
109
-
109
+    //https://test.bjtdba.com/api/user/red_log?page=1&limit=20 红积分明细 
110
+    //https://test.bjtdba.com/api/user/bill?page=1&limit=20&is_red=true 红积分奖金明细
111
+    USER_BILL_LOG = '/api/user/bill',
110
     // 获取规则信息
112
     // 获取规则信息
111
     GET_RULES = '/api/notice/detail',
113
     GET_RULES = '/api/notice/detail',
112
 
114
 
@@ -142,6 +144,7 @@ enum API {
142
     USER_CART_LIST = `/api/user/cart/lst`,
144
     USER_CART_LIST = `/api/user/cart/lst`,
143
     // 购物车删除
145
     // 购物车删除
144
     USER_CART_DELETE = `/api/user/cart/delete`,
146
     USER_CART_DELETE = `/api/user/cart/delete`,
147
+    USER_CART_REMOVE = `/api/user/relation/batch/create_remove_cart`,
145
     // 购物车数量
148
     // 购物车数量
146
     USER_CART_COUNT = `/api/user/cart/count`,
149
     USER_CART_COUNT = `/api/user/cart/count`,
147
 
150
 
@@ -297,6 +300,18 @@ export function getRedIntegralList(params: { page: number, limit: number }) {
297
         }
300
         }
298
     })
301
     })
299
 }
302
 }
303
+/**
304
+ * 获取会员奖金列表
305
+ * @param params
306
+ */
307
+export function getBillIntegralList(params: any) {
308
+    return defHttp.get({
309
+        url: API.USER_BILL_LOG,
310
+        data: {
311
+            ...params
312
+        }
313
+    })
314
+}
300
 
315
 
301
 /* 关注/收藏
316
 /* 关注/收藏
302
  */
317
  */
@@ -449,6 +464,15 @@ export function deleteCartItem(cart_id: any[]) {
449
         }
464
         }
450
     })
465
     })
451
 }
466
 }
467
+//移入收藏  USER_CART_REMOVE = `/api/user/relation/batch/create_remove_cart`,
468
+export function removeCartItem(type_id: any[]) {
469
+    return detailHttp.post({
470
+        url: API.USER_CART_REMOVE,
471
+        data: {
472
+            type_id
473
+        }
474
+    })
475
+}
452
 // 删除评论
476
 // 删除评论
453
 export function removeReply(reply_id: string) {
477
 export function removeReply(reply_id: string) {
454
     return defHttp.post({
478
     return defHttp.post({

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

@@ -14,7 +14,7 @@ const props = defineProps({
14
   },
14
   },
15
   text: {
15
   text: {
16
     type: String,
16
     type: String,
17
-    default: '暂无数据'
17
+    default: '暂无相关数据'
18
   }
18
   }
19
 })
19
 })
20
 
20
 

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

@@ -121,7 +121,7 @@ function handleCountChange(value) {
121
 
121
 
122
 <template>
122
 <template>
123
   <FPopup v-model:show="showValue" @close="onCancel" position="bottom"
123
   <FPopup v-model:show="showValue" @close="onCancel" position="bottom"
124
-    exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe min-h-[70%] max-h-[80%] h-full">
124
+    exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe min-h-[55%] max-h-[70%] h-full">
125
     <div class="flex flex-col justify-between h-full">
125
     <div class="flex flex-col justify-between h-full">
126
       <div class="flex-1">
126
       <div class="flex-1">
127
         <div class="p-3 flex flex-col gap-3">
127
         <div class="p-3 flex flex-col gap-3">
@@ -142,10 +142,10 @@ function handleCountChange(value) {
142
                   剩余库存{{ currentSku.stock }}
142
                   剩余库存{{ currentSku.stock }}
143
                 </div>
143
                 </div>
144
                 <div class="flex items-end gap-2" v-if="detail.mer_id === '148'">
144
                 <div class="flex items-end gap-2" v-if="detail.mer_id === '148'">
145
-                  {{ (currentSku.price * 30).toFixed(2) }} 积分
145
+                  {{ (currentSku.price * 30) }} 积分
146
                 </div>
146
                 </div>
147
                 <div class="flex items-end gap-2" v-else>
147
                 <div class="flex items-end gap-2" v-else>
148
-                  <FPrice :price="currentSku.price" />
148
+                  <FPrice :price="detail.seckill_s==0? currentSku.price:currentSku.dacang" />
149
                   <FPrice v-if="currentSku.ot_price" :price="currentSku.ot_price"
149
                   <FPrice v-if="currentSku.ot_price" :price="currentSku.ot_price"
150
                     :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through />
150
                     :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through />
151
                 </div>
151
                 </div>
@@ -186,7 +186,7 @@ function handleCountChange(value) {
186
         </div>
186
         </div>
187
       </div>
187
       </div>
188
 
188
 
189
-      <div class="px-3 pb-10" v-if="isTo == 1">
189
+      <div class="px-3 pb-12" v-if="isTo == 1">
190
         <FButton @click="handleAddCart" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
190
         <FButton @click="handleAddCart" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
191
           确定
191
           确定
192
         </FButton>
192
         </FButton>
@@ -210,13 +210,13 @@ function handleCountChange(value) {
210
         </FButton>
210
         </FButton>
211
 
211
 
212
       </div>
212
       </div>
213
-      <div class="flex box_1 flex-row justify-between text-sm text-white gap-3 " v-if="isTo == 2">
213
+      <div class="px-4 flex box_1 flex-row justify-between text-sm text-white gap-3 " v-if="isTo == 2">
214
         <button @click="handleJiaCart" size="small"
214
         <button @click="handleJiaCart" size="small"
215
-          class="bg-[#FFA319] rounded-full w-60 flex justify-center items-center h-9 clor">
215
+          class="bg-[#FFA319] rounded-full w-50 flex justify-center items-center h-9 clor">
216
           加入购物车
216
           加入购物车
217
         </button>
217
         </button>
218
         <button @click="handleBuyNow" size="small"
218
         <button @click="handleBuyNow" size="small"
219
-          class="bg-[#F94032] rounded-full w-60 flex justify-center items-center h-9 clor ">
219
+          class="bg-[#F94032] rounded-full w-50 flex justify-center items-center h-9 clor ">
220
           立即购买
220
           立即购买
221
         </button>
221
         </button>
222
 
222
 

+ 2 - 2
src/components/ProductCard/ProductCard.vue

@@ -36,8 +36,8 @@ function handleClick() {
36
       @tap.stop="handleClick"
36
       @tap.stop="handleClick"
37
       class="bg-white rounded-lg"
37
       class="bg-white rounded-lg"
38
   >
38
   >
39
-    <image :src="item.image" mode="widthFix" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 5"></image>
40
-    <image :src="item.thumb" mode="widthFix" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 6"></image>
39
+    <image :src="item.image" style="width: 341rpx; height: 341rpx;" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 5"></image>
40
+    <image :src="item.thumb" style="width: 341rpx; height: 341rpx;"   :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 6"></image>
41
 
41
 
42
     <div class="text-sm p-2 flex flex-col gap-1">
42
     <div class="text-sm p-2 flex flex-col gap-1">
43
       <div v-if="item.type == 5" class="line-clamp-2">
43
       <div v-if="item.type == 5" class="line-clamp-2">

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/pages.json


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

@@ -185,7 +185,7 @@ const ImgType = computed(() => {
185
         <div class="flex items-center w-full gap-2">
185
         <div class="flex items-center w-full gap-2">
186
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
186
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
187
             class="w-9 h-9 rounded-full" />
187
             class="w-9 h-9 rounded-full" />
188
-          <image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix" class="w-9 h-9 rounded-full" />
188
+          <image v-else src="https://app.bjtdba.com/uploads/logo.jpg" style="width:74rpx; height:74rpx;"  class=" rounded-full" />
189
           <div>
189
           <div>
190
             {{ userStore.userInfo.nickname }}
190
             {{ userStore.userInfo.nickname }}
191
           </div>
191
           </div>

+ 2 - 1
src/pages/home/components/announcement.vue

@@ -15,7 +15,8 @@ function go(item) {
15
   const data = findLast(props.list, (val: any) => {
15
   const data = findLast(props.list, (val: any) => {
16
     return item === val.title
16
     return item === val.title
17
   })
17
   })
18
-
18
+  console.log(data);
19
+  
19
   uni.navigateTo({
20
   uni.navigateTo({
20
     url: `/pages/announcement/index?data=${encodeBase64(data)}`
21
     url: `/pages/announcement/index?data=${encodeBase64(data)}`
21
   })
22
   })

+ 3 - 2
src/pages/home/components/banner.vue

@@ -1,5 +1,5 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {CDN_URL} from "~/config/app";
2
+import {CDM_URL, CDN_URL} from "~/config/app";
3
 const userStore = useUserStore()
3
 const userStore = useUserStore()
4
 
4
 
5
 function handleGuestMemberNew() {
5
 function handleGuestMemberNew() {
@@ -14,7 +14,8 @@ function handleGuestMemberNew() {
14
     })
14
     })
15
   }
15
   }
16
 }
16
 }
17
-const image = CDN_URL + '/static/assets/chuxubao_huiyuan_220818.png'
17
+//https://cdn.bjtdba.com/vod/image/2023-12-08/20231208174609605.png
18
+const image = CDM_URL + '/image/2023-12-08/20231208174609605.png'
18
 </script>
19
 </script>
19
 <template>
20
 <template>
20
   <div class="px-3">
21
   <div class="px-3">

+ 1 - 1
src/pages/home/components/header.vue

@@ -77,7 +77,7 @@ function handleClickser() {
77
     <div class="flex">
77
     <div class="flex">
78
       <div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
78
       <div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
79
         <image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
79
         <image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
80
-          mode="widthFix" class="w-9 h-9 rounded-full" />
80
+          style="width:74rpx; height:74rpx;" class="rounded-full" />
81
         <image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix" class="w-9 h-9 rounded-full" />
81
         <image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix" class="w-9 h-9 rounded-full" />
82
         <div class="flex flex-col ">
82
         <div class="flex flex-col ">
83
           <div class="text-sm" v-if="userStore.userInfo && userStore.userInfo.nickname">{{ userStore.userInfo.nickname ?
83
           <div class="text-sm" v-if="userStore.userInfo && userStore.userInfo.nickname">{{ userStore.userInfo.nickname ?

+ 2 - 2
src/pages/home/components/navs.vue

@@ -75,7 +75,7 @@ const navList = ref([{
75
 
75
 
76
 onBeforeMount(() => {
76
 onBeforeMount(() => {
77
   getHomeQuickLink().then(res => {
77
   getHomeQuickLink().then(res => {
78
-    console.log('res>>>>>', res);
78
+    // console.log('res>>>>>', res);
79
 
79
 
80
     if (res) {
80
     if (res) {
81
       navList.value[12] = res[0]
81
       navList.value[12] = res[0]
@@ -109,7 +109,7 @@ function handleItemClick(item: any) {
109
     // 秒杀
109
     // 秒杀
110
     case 'miaosha': {
110
     case 'miaosha': {
111
       uni.navigateTo({
111
       uni.navigateTo({
112
-        url: '/pages/miaosha/index'
112
+        url: '/pages/miaosha/index?type_show=1'
113
       })
113
       })
114
       break;
114
       break;
115
     }
115
     }

+ 341 - 70
src/pages/home/index.vue

@@ -1,34 +1,60 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {getNewSignInInfo, getUserInfo, getYanglaojinStatistics} from "~/apis/user";
3
-import {getProduct} from "~/apis/home";
2
+import { getNewSignInInfo, getUserInfo, getYanglaojinStatistics } from "~/apis/user";
3
+import { getProduct } from "~/apis/home";
4
 
4
 
5
 import Navs from "~/pages/home/components/navs.vue";
5
 import Navs from "~/pages/home/components/navs.vue";
6
 import Announcement from "~/pages/home/components/announcement.vue";
6
 import Announcement from "~/pages/home/components/announcement.vue";
7
 import Banner from "~/pages/home/components/banner.vue";
7
 import Banner from "~/pages/home/components/banner.vue";
8
 import Header from "~/pages/home/components/header.vue";
8
 import Header from "~/pages/home/components/header.vue";
9
 import ProductList from "~/pages/home/components/product-list.vue";
9
 import ProductList from "~/pages/home/components/product-list.vue";
10
-import {getHomeBanner, getHomeQuickLink, getLocal, getNoticeList, getProductShare} from "~/apis/common";
11
-import {useUserStore} from "~/stores/userStore";
10
+import { getHomeBanner, getHomeQuickLink, getLocal, getNoticeList, getProductShare } from "~/apis/common";
11
+import { useUserStore } from "~/stores/userStore";
12
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
12
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
13
 import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
13
 import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
14
-import {CDN_URL} from "~/config/app";
14
+import { CDM_URL, CDN_URL } from "~/config/app";
15
 import CXBPrivacyPopup from "~/components/CXBPrivacyPopup/CXBPrivacyPopup.vue";
15
 import CXBPrivacyPopup from "~/components/CXBPrivacyPopup/CXBPrivacyPopup.vue";
16
-import {getShareId} from "~/apis/product";
16
+import { getShareId } from "~/apis/product";
17
 // import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
17
 // import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
18
 // import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
18
 // import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
19
 import Cache from "~/utils/cache";
19
 import Cache from "~/utils/cache";
20
 
20
 
21
 import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
21
 import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
22
+import { getDcSeckill } from "~/apis/dacang";
22
 const userStore = useUserStore()
23
 const userStore = useUserStore()
23
 const usePageStore = usePageStoreWidthOut()
24
 const usePageStore = usePageStoreWidthOut()
24
 usePageStore.setPageConfig({
25
 usePageStore.setPageConfig({
25
   currentPage: {
26
   currentPage: {
26
     type: 'tab',
27
     type: 'tab',
27
-    url:  '/pages/home/index'
28
+    url: '/pages/home/index'
28
   }
29
   }
29
 })
30
 })
30
 
31
 
32
+// 限时秒杀  https://cdn.bjtdba.com/vod/image/2023-12-08/20231208174028968.png
33
+// 秒杀背景  https://cdn.bjtdba.com/vod/image/2023-12-08/20231208174007505.png
34
+// 秒杀价格  https://cdn.bjtdba.com/vod/image/2023-12-08/20231208173948533.png
31
 
35
 
36
+
37
+const msbkImg = CDM_URL + '/image/2023-12-08/20231208174007505.png'
38
+const xsmsImg = CDM_URL + '/image/2023-12-08/20231208174028968.png'
39
+const mspcImg = CDM_URL + '/image/2023-12-08/20231208173948533.png'
40
+
41
+
42
+
43
+const msData = reactive({
44
+  currentPage: 1,
45
+  pageSize: 10,
46
+  list: [],
47
+  duration: 60 * 60 * 1000, //秒杀活动时长
48
+})
49
+
50
+const remainingTime: any = ref({
51
+  hours: "00",
52
+  minutes: "00",
53
+  seconds: "00"
54
+})
55
+const msProductList = ref([])
56
+const msSeckillDate = ref('')
57
+const msStatus = ref('')
32
 // const list = ref([])
58
 // const list = ref([])
33
 const state = reactive({
59
 const state = reactive({
34
   shareId: '',
60
   shareId: '',
@@ -61,7 +87,7 @@ onShow(() => {
61
   usePageStore.setPageConfig({
87
   usePageStore.setPageConfig({
62
     currentPage: {
88
     currentPage: {
63
       type: 'tab',
89
       type: 'tab',
64
-      url:  '/pages/home/index'
90
+      url: '/pages/home/index'
65
     }
91
     }
66
   })
92
   })
67
   if (!userStore.uid) {
93
   if (!userStore.uid) {
@@ -74,6 +100,8 @@ onShow(() => {
74
     getYanglaojinStatistics().then(res => {
100
     getYanglaojinStatistics().then(res => {
75
       state.all_yanglao = res.all_yanglao
101
       state.all_yanglao = res.all_yanglao
76
     })
102
     })
103
+    //加载秒杀数据
104
+    loadList('reload')
77
   }
105
   }
78
 
106
 
79
 
107
 
@@ -81,22 +109,22 @@ onShow(() => {
81
 
109
 
82
 function checkSignIn() {
110
 function checkSignIn() {
83
   // if (userStore.uid && state.isEject === 1) {
111
   // if (userStore.uid && state.isEject === 1) {
84
-    // 2 检查用户签到信息
85
-    getNewSignInInfo().then(res => {
86
-      // console.log(res)
87
-      const {today, day} = res
88
-      state.signToday = today
89
-      if (today === 0) {
90
-        state.isShowSignIn = true
91
-      }
92
-      state.day = day
112
+  // 2 检查用户签到信息
113
+  getNewSignInInfo().then(res => {
114
+    // console.log(res)
115
+    const { today, day } = res
116
+    state.signToday = today
117
+    if (today === 0) {
118
+      state.isShowSignIn = true
119
+    }
120
+    state.day = day
93
 
121
 
94
-      // // if (today === 0) {
95
-      //   2.1 弹出签到窗口
96
-      // }
97
-    }).catch(error => {
98
-      console.error(error + '->GetNewsSignInInfo')
99
-    })
122
+    // // if (today === 0) {
123
+    //   2.1 弹出签到窗口
124
+    // }
125
+  }).catch(error => {
126
+    console.error(error + '->GetNewsSignInInfo')
127
+  })
100
   // }
128
   // }
101
 }
129
 }
102
 onLoad((option) => {
130
 onLoad((option) => {
@@ -112,14 +140,10 @@ onLoad((option) => {
112
   // 加载地址数据
140
   // 加载地址数据
113
   // orderStore.getCurrentAddress()
141
   // orderStore.getCurrentAddress()
114
   // 1加载首页数据
142
   // 1加载首页数据
115
-  getHomeQuickLink().then(res => {})
116
-
117
-  getNoticeList().then(res => {
118
-    state.announcementList = res.list
119
-  })
143
+  getHomeQuickLink().then(res => { })
120
   state.page = 1
144
   state.page = 1
121
   loadProductList()
145
   loadProductList()
122
-
146
+  loadList('reload')
123
   getProductShare().then(res => {
147
   getProductShare().then(res => {
124
     if (res) {
148
     if (res) {
125
       userStore.setShareId(res.share_id)
149
       userStore.setShareId(res.share_id)
@@ -153,9 +177,91 @@ onShareTimeline(() => {
153
 })
177
 })
154
 
178
 
155
 
179
 
156
-// onShow(() => {
157
-//
158
-// })
180
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
181
+  if (action === 'reload') {
182
+    msData.currentPage = 1
183
+  }
184
+  const params = {
185
+    page: msData.currentPage,
186
+    limit: msData.pageSize
187
+  }
188
+
189
+  getDcSeckill({
190
+    ...params
191
+  }).then(res => {
192
+    // console.log('秒杀', res);
193
+    // status 1 开始抢 2 即将开始 3 已结束
194
+    let status2FilterList = res.filter((val) => {
195
+      return val.status == 2
196
+    })
197
+    let status1FilterList = res.filter((val) => {
198
+      return val.status == 1
199
+    })
200
+    // console.log('秒杀', ...res);
201
+    if (status2FilterList.length > 0) {
202
+      msData.list.push(...status2FilterList)
203
+    }
204
+    if (status1FilterList.length > 0) {
205
+      msData.list.unshift(...status1FilterList)
206
+    }
207
+    if (msData.list.length > 0) {
208
+      msProductList.value = msData.list[0].product_data
209
+      msSeckillDate.value = msData.list[0].seckill_date.slice(0, 5);
210
+      msStatus.value=msData.list[0].status
211
+      // console.log(11221111, msProductList.value);
212
+      // console.log(11221111, msSeckillDate.value);
213
+    }
214
+  })
215
+}
216
+
217
+//计算秒杀
218
+function getCountdown() {
219
+  const now = new Date();
220
+  const startDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), parseHours(msSeckillDate.value), 0, 0);
221
+  const endDate = new Date(startDate.getTime() + 60 * 60 * 1000); // 结束时间为开始时间的一小时后
222
+
223
+  if (now < endDate) {
224
+    let milliseconds = endDate - now;
225
+
226
+    const hours = Math.floor(milliseconds / (1000 * 60 * 60));
227
+    const minutes = Math.floor((milliseconds % (1000 * 60 * 60)) / (1000 * 60));
228
+    const seconds = Math.floor((milliseconds % (1000 * 60)) / 1000);
229
+
230
+    // 更新数据
231
+    remainingTime.value = {
232
+      hours: hours < 10 ? '0' + hours : hours,
233
+      minutes: minutes < 10 ? '0' + minutes : minutes,
234
+      seconds: seconds < 10 ? '0' + seconds : seconds
235
+    }
236
+  }
237
+}
238
+
239
+function parseHours(time: any) {
240
+  const [hours, minutes] = time.split(":");
241
+  return parseInt(hours);
242
+}
243
+
244
+// 每秒更新剩余时间
245
+const timer = setInterval(() => {
246
+  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0 && remainingTime.seconds <= 0) {
247
+    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
248
+    clearInterval(timer);
249
+    //加载秒杀数据
250
+    console.log('自动关闭');
251
+    loadList('reload')
252
+    
253
+  }
254
+  getCountdown()
255
+}, 1000);
256
+
257
+onUnload(() => {
258
+  clearInterval(timer);
259
+  console.log('卸载关闭');
260
+})
261
+
262
+
263
+
264
+
159
 watch(() => state.isShowSignIn, (val) => {
265
 watch(() => state.isShowSignIn, (val) => {
160
   val ? uni.hideTabBar() : uni.showTabBar()
266
   val ? uni.hideTabBar() : uni.showTabBar()
161
 })
267
 })
@@ -165,7 +271,7 @@ onPageScroll((page) => {
165
   // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
271
   // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
166
   Scroll_X.value = Number(page.scrollTop.toFixed())
272
   Scroll_X.value = Number(page.scrollTop.toFixed())
167
   // page.scrollTop
273
   // page.scrollTop
168
-  if (page.scrollTop >= 76 ) {
274
+  if (page.scrollTop >= 76) {
169
     headerClass.value = 'bg-white !text-gray-900'
275
     headerClass.value = 'bg-white !text-gray-900'
170
   } else {
276
   } else {
171
     headerClass.value = ''
277
     headerClass.value = ''
@@ -175,6 +281,7 @@ onPageScroll((page) => {
175
 onPullDownRefresh(() => {
281
 onPullDownRefresh(() => {
176
   state.page = 1
282
   state.page = 1
177
   loadProductList()
283
   loadProductList()
284
+  loadList('reload')
178
 })
285
 })
179
 
286
 
180
 onReachBottom(() => {
287
 onReachBottom(() => {
@@ -206,18 +313,18 @@ function loadProductList() {
206
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
313
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
207
 
314
 
208
 function handleBannerClick(item) {
315
 function handleBannerClick(item) {
209
-  if(item.url == 'rich') {
316
+  if (item.url == 'rich') {
210
     uni.navigateTo({
317
     uni.navigateTo({
211
       url: '/pages/vip/index?type=user'
318
       url: '/pages/vip/index?type=user'
212
     })
319
     })
213
   }
320
   }
214
 }
321
 }
215
 
322
 
216
-function getIsShow(){
323
+function getIsShow() {
217
   //首先获取是否执行过
324
   //首先获取是否执行过
218
   uni.getStorage({
325
   uni.getStorage({
219
     key: 'today',
326
     key: 'today',
220
-    success: function(res) {
327
+    success: function (res) {
221
       // console.log(res.data)
328
       // console.log(res.data)
222
       // console.log('----')
329
       // console.log('----')
223
       //成功的话 说明之前执行过,再判断时间是否是当天
330
       //成功的话 说明之前执行过,再判断时间是否是当天
@@ -229,7 +336,7 @@ function getIsShow(){
229
         uni.setStorageSync("today", new Date().toLocaleDateString()); //把新得日期更新到本地
336
         uni.setStorageSync("today", new Date().toLocaleDateString()); //把新得日期更新到本地
230
       }
337
       }
231
     },
338
     },
232
-    fail: function(res) {
339
+    fail: function (res) {
233
       // console.log(res + 'FAIL...')
340
       // console.log(res + 'FAIL...')
234
       //没有执行过的话 先存一下当前的执行时间
341
       //没有执行过的话 先存一下当前的执行时间
235
       // console.log(res);
342
       // console.log(res);
@@ -244,65 +351,229 @@ function getIsShow(){
244
 
351
 
245
 }
352
 }
246
 
353
 
354
+function Tomsindex() {
355
+  uni.navigateTo({
356
+    url: '/pages/miaosha/index?type_show=2'
357
+  })
358
+}
247
 
359
 
360
+//秒杀跳转详情页
361
+function handleToDeatil(product_id:any){
362
+  uni.navigateTo({
363
+    url: `/pages/store/product/detail?id=${product_id}`
364
+  })
365
+}
248
 
366
 
249
 </script>
367
 </script>
250
 <template>
368
 <template>
251
   <div class="h-screen ">
369
   <div class="h-screen ">
252
     <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
370
     <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
253
-    <Header :yanglaojin="state.all_yanglao"
254
-            :exClass="headerClass"
255
-    />
371
+    <Header :yanglaojin="state.all_yanglao" :exClass="headerClass" />
256
     <div class="flex flex-col gap-3 ">
372
     <div class="flex flex-col gap-3 ">
257
-<!--      <image-->
258
-<!--          @click="handleBannerClick"-->
259
-<!--          :src="homeBanner"-->
260
-<!--             mode="widthFix" class="h-60 w-full "-->
261
-<!--      ></image>-->
373
+      <!--      <image-->
374
+      <!--          @click="handleBannerClick"-->
375
+      <!--          :src="homeBanner"-->
376
+      <!--             mode="widthFix" class="h-60 w-full "-->
377
+      <!--      ></image>-->
262
 
378
 
263
       <div class="w-screen h-65">
379
       <div class="w-screen h-65">
264
-        <swiper
265
-            v-if="state.banners"
266
-            :indicator-dots="state.indicatorDots"
267
-            indicator-active-color="#e93323"
268
-            :autoplay="state.autoplay"
269
-            :circular="state.circular"
270
-            :interval="state.interval"
271
-            :duration="state.duration"
272
-            class="w-full h-full"
273
-        >
380
+        <swiper v-if="state.banners" :indicator-dots="state.indicatorDots" indicator-active-color="#e93323"
381
+          :autoplay="state.autoplay" :circular="state.circular" :interval="state.interval" :duration="state.duration"
382
+          class="w-full h-full">
274
           <swiper-item v-for="(item, index) in state.banners" :key="index">
383
           <swiper-item v-for="(item, index) in state.banners" :key="index">
275
-            <image :src="item.pic" @tap="handleBannerClick(item)" class="!w-full !h-full" mode="aspectFill"/>
384
+            <image :src="item.pic" @tap="handleBannerClick(item)" class="!w-full !h-full" mode="aspectFill" />
276
           </swiper-item>
385
           </swiper-item>
277
         </swiper>
386
         </swiper>
278
       </div>
387
       </div>
388
+      <Navs />
389
+      <div class="px-3 relative " style="width: 700rpx; height: 458rpx;" v-if="msProductList.length > 0">
390
+        <!-- 秒杀大图 -->
391
+        <image lazy-load style="width: 100%;height: 100%; " :src="msbkImg"></image>
392
+        <!-- 限时秒杀 -->
393
+        <image lazy-load class="xsmsimg" style="width: 185rpx;height: 41rpx; " :src="xsmsImg"></image>
394
+        <!-- scroll 秒杀list -->
395
+        <scroll-view class="scroll-view_H" :scroll-x="true">
396
+          <div v-for="(item, index) in msProductList" :key="index" style="background-color: #FFFFFF; position: relative; "
397
+            class="scroll-view-item_H">
398
+            <!-- img  -->
399
+            <div @click="handleToDeatil(item.product_id)"  >
400
+              <div class="scroll-view-item_O">
401
+                <div style="width: 202rpx; height: 202rpx; margin-bottom: 23rpx; border-radius: 16rpx; ">
402
+                  <image :src="item.image" style="border-radius: 16rpx; width: 100%; height: 100%; "></image>
403
+                </div>
404
+                <div class="px-1">
405
+                  <div class="text_image_d mt-1 ">
406
+                    {{ item.store_name }}
407
+                  </div>
408
+                  <div
409
+                    class="mt-1 border border-solid border-1 border-red rounded flex  items-center text-[#FE0032] w-fit">
410
+                    <image src="https://cdn.bjtdba.com/vod/image/2023-12-11/20231211115513936.png" mode="widthFix"
411
+                      style="width: 46rpx; height: 28rpx;"></image>
412
+                    <div class="ylj_d flex items-center jusitify-center">
413
+                      <div>
414
+                        养老金 ¥{{ item.yanglao }}
415
+                      </div>
416
+                    </div>
417
+                  </div>
418
+                </div>
419
+
420
+              </div>
421
+              <!-- 价格 -->
422
+              <div class="jg_img" :style="{ background: 'url(' + mspcImg + ')', backgroundSize: 'cover' }">
423
+                <div class="jg_price">¥{{ item.seckill_price }}</div>
424
+              </div>
425
+            </div>
426
+
427
+          </div>
428
+
429
+        </scroll-view>
430
+        <!-- 倒计时 -->
431
+        <div class="ms_time" v-if="msStatus=='1'" >
432
+          <span class="ms_span">{{ remainingTime.hours }}</span> :
433
+          <span class="ms_span">{{ remainingTime.minutes }}</span> :
434
+          <span class="ms_span">{{ remainingTime.seconds }}</span>
435
+        </div>
436
+        <div class="ckgdtext" @click="Tomsindex">
437
+          查看更多
438
+          <span>
439
+            <image style="width: 10rpx; height: 17rpx; " src="../../static/icon/ckgd.png"></image>
440
+          </span>
441
+        </div>
279
 
442
 
280
-      <Navs/>
281
 
443
 
282
-      <Announcement :list="state.announcementList"/>
283
-<!--      {{userStore.userInfo}}-->
284
 
444
 
285
-      <Banner/>
445
+      </div>
446
+      <!-- <Announcement :list="state.announcementList" /> -->
447
+      <!--      {{userStore.userInfo}}-->
448
+
449
+      <Banner />
286
 
450
 
287
-      <ProductList :list="state.productList"/>
451
+      <ProductList :list="state.productList" />
288
     </div>
452
     </div>
289
 
453
 
290
   </div>
454
   </div>
291
-  <CXBDialogSIgnIn
292
-      :show="state.isShowSignIn"
293
-      :today="state.signToday"
294
-      :day="state.day"
295
-
296
-      @confirm="state.isShowSignIn = false"
297
-      @close="state.isShowSignIn = false"
298
-  />
455
+  <CXBDialogSIgnIn :show="state.isShowSignIn" :today="state.signToday" :day="state.day"
456
+    @confirm="state.isShowSignIn = false" @close="state.isShowSignIn = false" />
299
 
457
 
300
   <CXBPrivacyPopup />
458
   <CXBPrivacyPopup />
301
 </template>
459
 </template>
302
-<style>
460
+<style  >
303
 page {
461
 page {
304
   background-color: #f8f8f8;
462
   background-color: #f8f8f8;
305
 }
463
 }
464
+
465
+.xsmsimg {
466
+  position: absolute;
467
+  top: 27rpx;
468
+  left: 56rpx;
469
+  z-index: 2;
470
+}
471
+
472
+
473
+
474
+.scroll-view_H {
475
+  white-space: nowrap;
476
+  width: 700rpx;
477
+  overflow: hidden;
478
+  position: absolute;
479
+  top: 96rpx;
480
+  left: 24rpx;
481
+  z-index: 1;
482
+}
483
+
484
+
485
+.ckgdtext {
486
+  position: absolute;
487
+  top: 28rpx;
488
+  left: 588rpx;
489
+  color: #FFFFFF;
490
+  height: 40rpx;
491
+  font-size: 22rpx;
492
+  font-family: PingFangSC, PingFang SC;
493
+  font-weight: 400;
494
+  line-height: 40rpx
495
+}
496
+
497
+.jg_img {
498
+  position: absolute;
499
+  bottom: 0;
500
+  left: 50%;
501
+  margin-left: -65rpx;
502
+  z-index: 2;
503
+  width: 129rpx;
504
+  height: 38rpx;
505
+}
506
+
507
+.jg_price {
508
+  height: 38rpx;
509
+  line-height: 38rpx;
510
+  margin-left: 42rpx;
511
+  font-size: 26rpx;
512
+  font-family: PingFangSC, PingFang SC;
513
+  font-weight: 500;
514
+  color: #FFFFFF;
515
+}
516
+
517
+.scroll-view-item_H {
518
+  margin-top: 5rpx;
519
+  display: inline-block;
520
+  font-size: 36rpx;
521
+  width: 202rpx;
522
+  height: 342rpx;
523
+  margin-left: 24rpx;
524
+}
525
+
526
+.ms_time {
527
+  position: absolute;
528
+  top: 20rpx;
529
+  left: 260rpx
530
+}
531
+
532
+.ms_span {
533
+  display: inline-block;
534
+  height: 36rpx;
535
+  width: 36rpx;
536
+  text-align: center;
537
+  border-radius: 8rpx;
538
+  font-size: 20rpx;
539
+  line-height: 36rpx;
540
+  background: #333333;
541
+  color: white
542
+}
543
+
544
+.text_image_d {
545
+  height: 33rpx;
546
+  font-size: 24rpx;
547
+  font-family: PingFangSC, PingFang SC;
548
+  font-weight: 400;
549
+  color: #333333;
550
+  line-height: 33rpx;
551
+  white-space: nowrap;
552
+  /* 防止文本换行 */
553
+  overflow: hidden;
554
+  /* 隐藏超出的部分 */
555
+  text-overflow: ellipsis;
556
+  /* 显示省略号 */
557
+}
558
+
559
+.ylj_d {
560
+  height: 25rpx;
561
+  font-size: 18rpx;
562
+  font-family: PingFangSC, PingFang SC;
563
+  font-weight: 400;
564
+  color: #FE0032;
565
+  line-height: 25rpx;
566
+  padding-left: 6rpx;
567
+  padding-right: 6rpx;
568
+}
569
+
570
+.scroll-view-item_O {
571
+  height: 323rpx;
572
+  width: 100%;
573
+  border: 1rpx soild;
574
+  border-radius: 16rpx;
575
+  box-shadow: 2rpx 2rpx 12rpx 2rpx #FFC8CE;
576
+}
306
 </style>
577
 </style>
307
 <route lang="yaml"   type="home">
578
 <route lang="yaml"   type="home">
308
 style:
579
 style:

+ 31 - 4
src/pages/message/index.vue

@@ -1,12 +1,30 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {CDN_URL} from "~/config/app";
2
+import { findLast } from "lodash-es";
3
+import { getNoticeList } from "~/apis/common";
4
+import { encodeBase64 } from "~/utils/http/helper";
3
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
+const announcementList = ref()
7
+onLoad(async (options) => {
8
+  let res = await getNoticeList()
9
+  console.log(res);
10
+  announcementList.value = res.list
11
+})
12
+
13
+function go(item: any) {
14
+  uni.navigateTo({
15
+    url: `/pages/announcement/index?data=${encodeBase64(item)}`
16
+  })
17
+}
4
 
18
 
5
-const icon = CDN_URL + '/static/assets/search_zanwuxiangguan_220617.png'
6
 </script>
19
 </script>
7
 <template>
20
 <template>
8
-  <div class="h-screen w-screen flex flex-col justify-center items-center">
9
-    <CXBEmpty type="message"/>
21
+  <div class="px-3" v-if="announcementList != undefined">
22
+    <div v-for="(item, index) in announcementList" :key="index">
23
+      <div @click="go(item)" class="py-2 text_gg " style="border-bottom: 1rpx solid #c0c4cc;">{{ item.title }}</div>
24
+    </div>
25
+  </div>
26
+  <div v-else class="h-screen w-screen flex flex-col justify-center items-center">
27
+    <CXBEmpty type="message" />
10
   </div>
28
   </div>
11
 </template>
29
 </template>
12
 
30
 
@@ -14,3 +32,12 @@ const icon = CDN_URL + '/static/assets/search_zanwuxiangguan_220617.png'
14
 style:
32
 style:
15
   navigationBarTitleText: 消息
33
   navigationBarTitleText: 消息
16
 </route>
34
 </route>
35
+<style scoped>
36
+.text_gg {
37
+  height: 42rpx;
38
+  font-size: 30rpx;
39
+  font-family: PingFangSC, PingFang SC;
40
+  font-weight: 400;
41
+  color: #333333;
42
+}
43
+</style>

+ 36 - 47
src/pages/miaosha/index.vue

@@ -1,13 +1,13 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {getDcSeckill} from "~/apis/dacang";
3
-import {DcSeckillModel} from "~/apis/model/dacang.model";
2
+import { getDcSeckill } from "~/apis/dacang";
3
+import { DcSeckillModel } from "~/apis/model/dacang.model";
4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9
-import {CDN_URL} from "~/config/app";
10
-import {filter, orderBy} from "lodash-es";
9
+import { CDN_URL } from "~/config/app";
10
+import { filter, orderBy } from "lodash-es";
11
 const currentSeckillDate = ref()
11
 const currentSeckillDate = ref()
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
@@ -26,7 +26,20 @@ const state = reactive({
26
 })
26
 })
27
 
27
 
28
 onLoad((options) => {
28
 onLoad((options) => {
29
-  loadList('reload')
29
+  if (options.type_show == 1) {
30
+    if (!userStore.uid) {
31
+      userStore.setRedirectPage(`/pages/miaosha/index`, 'page')
32
+      return uni.redirectTo({
33
+        url: '/pages/user/login/index?key=4'
34
+      })
35
+
36
+    }
37
+    loadList('reload')
38
+  } else {
39
+    loadList('reload')
40
+  }
41
+
42
+
30
 })
43
 })
31
 
44
 
32
 
45
 
@@ -41,10 +54,10 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
41
 
54
 
42
   getDcSeckill({
55
   getDcSeckill({
43
     ...params
56
     ...params
44
-  }).then( res => {
57
+  }).then(res => {
45
     if (action === 'reload') {
58
     if (action === 'reload') {
46
       if (res && res.length > 0) {
59
       if (res && res.length > 0) {
47
-        console.log('秒杀>>>',res)
60
+        console.log('秒杀>>>', res)
48
         const resList = res
61
         const resList = res
49
         // const status3List = orderBy(list.value, (val) => {
62
         // const status3List = orderBy(list.value, (val) => {
50
         //   return val.status == 3
63
         //   return val.status == 3
@@ -102,38 +115,21 @@ function handleItemClick(seckillItem) {
102
 </script>
115
 </script>
103
 <template>
116
 <template>
104
   <CXBBasePage>
117
   <CXBBasePage>
105
-    <div
106
-        v-if="state.list && state.list.length > 0"
107
-
108
-    >
109
-      <scroll-view
110
-          class=" whitespace-nowrap  w-screen  text-sm py-3"
111
-          :scroll-with-animation="true"
112
-          :scroll-x="true"
113
-          :show-scrollbar="false"
114
-      >
115
-        <div
116
-            @tap="handleSeckillDateClick(item)"
117
-            v-for="(item, index) in state.list"
118
-            :key="index"
119
-            class="flex inline-flex items-center justify-center relative pl-5"
120
-            :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
121
-        >
122
-          {{item.seckill_date}}
118
+    <div v-if="state.list && state.list.length > 0">
119
+      <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
120
+        :show-scrollbar="false">
121
+        <div @tap="handleSeckillDateClick(item)" v-for="(item, index) in state.list" :key="index"
122
+          class="flex inline-flex items-center justify-center relative pl-5"
123
+          :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''">
124
+          {{ item.seckill_date }}
123
         </div>
125
         </div>
124
         <!--      </div>-->
126
         <!--      </div>-->
125
       </scroll-view>
127
       </scroll-view>
126
       <div class="p-3 pb-safe">
128
       <div class="p-3 pb-safe">
127
         <div class="flex flex-col gap-3">
129
         <div class="flex flex-col gap-3">
128
-          <div
129
-              @tap="handleItemClick(seckillItem)"
130
-              v-for="(seckillItem, itemIndex) in currentProductList"
131
-              :key="itemIndex"
132
-              class="bg-white rounded p-3"
133
-          >
134
-            <div
135
-                class="bg-white flex gap-3"
136
-            >
130
+          <div @tap="handleItemClick(seckillItem)" v-for="(seckillItem, itemIndex) in currentProductList" :key="itemIndex"
131
+            class="bg-white rounded p-3">
132
+            <div class="bg-white flex gap-3">
137
               <div>
133
               <div>
138
                 <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
134
                 <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
139
               </div>
135
               </div>
@@ -143,20 +139,14 @@ function handleItemClick(seckillItem) {
143
                   {{ seckillItem.store_name }}
139
                   {{ seckillItem.store_name }}
144
                 </div>
140
                 </div>
145
                 <div class="text-gray text-xs">
141
                 <div class="text-gray text-xs">
146
-                  即将恢复原价¥{{ seckillItem.ot_price}}
142
+                  即将恢复原价¥{{ seckillItem.ot_price }}
147
                 </div>
143
                 </div>
148
                 <CXBYaojinTag :amount="Number.parseFloat(seckillItem.yanglao)" />
144
                 <CXBYaojinTag :amount="Number.parseFloat(seckillItem.yanglao)" />
149
                 <div class="flex items-center justify-between">
145
                 <div class="flex items-center justify-between">
150
-                  <FPrice :price="seckillItem.seckill_price"/>
151
-                  <image
152
-                      v-if="seckillItem.status == 1"
153
-                      :src="status1Icon" mode="widthFix" class="w-16 h-7" ></image>
154
-                  <image
155
-                      v-if="seckillItem.status == 2"
156
-                      :src="status2Icon" mode="widthFix" class="w-16 h-7" ></image>
157
-                  <image
158
-                      v-if="seckillItem.status == 3"
159
-                      :src="status3Icon" mode="widthFix" class="w-16 h-7" ></image>
146
+                  <FPrice :price="seckillItem.seckill_price" />
147
+                  <image v-if="seckillItem.status == 1" :src="status1Icon" mode="widthFix" class="w-16 h-7"></image>
148
+                  <image v-if="seckillItem.status == 2" :src="status2Icon" mode="widthFix" class="w-16 h-7"></image>
149
+                  <image v-if="seckillItem.status == 3" :src="status3Icon" mode="widthFix" class="w-16 h-7"></image>
160
                 </div>
150
                 </div>
161
               </div>
151
               </div>
162
 
152
 
@@ -166,10 +156,9 @@ function handleItemClick(seckillItem) {
166
         </div>
156
         </div>
167
       </div>
157
       </div>
168
     </div>
158
     </div>
169
-    <CXBEmpty v-else/>
159
+    <CXBEmpty v-else />
170
 
160
 
171
   </CXBBasePage>
161
   </CXBBasePage>
172
-
173
 </template>
162
 </template>
174
 <route lang="yaml">
163
 <route lang="yaml">
175
 style:
164
 style:

+ 1 - 1
src/pages/my-profile/index.vue

@@ -131,7 +131,7 @@ function handleSubmit() {
131
       <div class="">头像</div>
131
       <div class="">头像</div>
132
       <div class="flex items-center">
132
       <div class="flex items-center">
133
         <button class="btn-normal" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
133
         <button class="btn-normal" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
134
-          <image :src="formData.avatar ? formData.avatar : 'https://app.bjtdba.com/mp/zjx_image/logo.png'" mode="widthFix" class="w-9 h-9 rounded-full" />
134
+          <image :src="formData.avatar ? formData.avatar : 'https://app.bjtdba.com/mp/zjx_image/logo.png'" class=" rounded-full"  style="width:74rpx; height:74rpx;"/>
135
         </button>
135
         </button>
136
         <div
136
         <div
137
             class="f-text-color-2 i-tabler-chevron-right transform transition-300"
137
             class="f-text-color-2 i-tabler-chevron-right transform transition-300"

+ 215 - 178
src/pages/my-rules/index.vue

@@ -4,6 +4,7 @@ import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
4
 
4
 
5
 import { encodePhone } from "../../utils";
5
 import { encodePhone } from "../../utils";
6
 import { getAgentInfo, getRules, getUserInfo } from "~/apis/user";
6
 import { getAgentInfo, getRules, getUserInfo } from "~/apis/user";
7
+import { CDM_URL } from '~/config/app';
7
 
8
 
8
 const userStore = useUserStore()
9
 const userStore = useUserStore()
9
 const ruleDetail = ref<{
10
 const ruleDetail = ref<{
@@ -15,123 +16,29 @@ const ruleDetail = ref<{
15
   status: string
16
   status: string
16
   title: string
17
   title: string
17
 }>()
18
 }>()
19
+const nextRuleDetail = ref<{
20
+  admin_id: string
21
+  content: string
22
+  create_time: string
23
+  is_del: string
24
+  notice_id: string
25
+  status: string
26
+  title: string
27
+}>()
18
 
28
 
19
-const currentType = ref<any>([])
20
-
21
-const showUpgradeInfo = ref(false)
22
-
23
-// const userType = computed(() => {
24
-//   const userRichType = userStore.userInfo?.user_rich_type
25
-//   // console.log(userStore.userInfo)
26
-//   const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
27
-//   // 创始人
28
-//   if (userRichType == 3) {
29
-//     if (bangfu) {
30
-//       return ['创始人', bangfu]
31
-//     }
32
-//     return ['创始人']
33
-//     // return [].push()
34
-//   }
35
-//   // 普通用户
36
-//   if (userRichType == 0) {
37
-//     if (bangfu) {
38
-//       return ['用户', bangfu]
39
-//     }
40
-//     return ['用户']
41
-//   }
42
-//   // 会员
43
-//   if (userRichType == 1) {
44
-//     if (bangfu) {
45
-//       return ['会员', bangfu]
46
-//     }
47
-//     return ['会员']
29
+const backImg = CDM_URL + '/image/2023-12-13/20231213140615288.png'
30
+const vipicon = CDM_URL + '/image/2023-12-13/20231213140633462.png '
31
+// https://cdn.bjtdba.com/vod/image/2023-12-13/20231213140615288.png  卡片
32
+// https://cdn.bjtdba.com/vod/image/2023-12-13/20231213140633462.png  卡片
33
+const showUpgradeInfo = ref(true)
48
 
34
 
49
-//   }
50
-//   if (userRichType == 3) {
51
-//     if (bangfu) {
52
-//       return ['创始人', bangfu]
53
-//     }
54
-//     return ['创始人']
55
-//   }
56
-//   // 合伙人
57
-//   if (userRichType == 4) {
58
-//     // return '高级会员'
59
-//     if (bangfu) {
60
-//       return ['VIP', bangfu]
61
-//     }
62
-//     return ['VIP']
63
-//   }
64
-//   if (userRichType == 5) {
65
-//     if (bangfu) {
66
-//       return ['初始级合伙人', bangfu]
67
-//     }
68
-//     return ['初始级合伙人']
69
-//   }
70
-//   if (userRichType == 6) {
71
-//     if (bangfu) {
72
-//       return ['中级合伙人', bangfu]
73
-//     }
74
-//     return ['中级合伙人']
75
-//   }
76
-//   if (userRichType == 7) {
77
-//     if (bangfu) {
78
-//       return ['高级合伙人', bangfu]
79
-//     }
80
-//     return ['高级合伙人']
81
-//   }
82
-//   if (!userRichType) {
83
-//     if (bangfu) {
84
-//       return ['用户', bangfu]
85
-//     }
86
-//     return ['用户']
87
-//   }
88
-// })
89
-// /*
90
-// const userType = computed(() => {
91
-//   const userRichType = userStore.userInfo?.user_rich_type
92
 
35
 
93
-//   // 创始人
94
-//   if (userRichType == 3) {
95
-//     return '创始人'
96
-//   }
97
-//   // 普通用户
98
-//   if (userRichType == 0) {
99
-//     return '用户'
100
-//   }
101
-//   // 会员
102
-//   if (userRichType == 1) {
103
-//     return '会员'
104
-//   }
105
-//   if (userRichType == 3) {
106
-//     return '创始人'
107
-//   }
108
-//   // 合伙人
109
-//   if (userRichType == 4) {
110
-//     // return '合伙人(VIP)'
111
-//     return 'VIP'
112
-//   }
113
-//   if (userRichType == 5) {
114
-//     return '初始级合伙人'
115
-//   }
116
-//   if (userRichType == 6) {
117
-//     return '中级合伙人'
118
-//   }
119
-//   if (userRichType == 7) {
120
-//     return '高级合伙人'
121
-//   }
122
-//   if (!userRichType) {
123
-//     return '用户'
124
-//   }
125
-// })
126
-// */
127
-
128
-//0:普通用户 1:会员  3:创始人 4:高级会员  8合伙人 9联合创始人
129
 const userType = computed(() => {
36
 const userType = computed(() => {
130
   const userRichType = userStore.userInfo?.user_rich_type
37
   const userRichType = userStore.userInfo?.user_rich_type
131
   // console.log('我是大哥',userStore.userInfo)
38
   // console.log('我是大哥',userStore.userInfo)
132
   const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
39
   const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
133
   // console.log('我是帮扶',bangfu);
40
   // console.log('我是帮扶',bangfu);
134
-  
41
+
135
   // 普通用户
42
   // 普通用户
136
   if (userRichType == 0) {
43
   if (userRichType == 0) {
137
     // if (bangfu) {
44
     // if (bangfu) {
@@ -147,7 +54,7 @@ const userType = computed(() => {
147
     return ['../../static/img-hy/会员.png']
54
     return ['../../static/img-hy/会员.png']
148
 
55
 
149
   }
56
   }
150
-    // 创始人
57
+  // 创始人
151
   if (userRichType == 3) {
58
   if (userRichType == 3) {
152
     // if (bangfu) {
59
     // if (bangfu) {
153
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
60
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
@@ -181,6 +88,7 @@ const userType = computed(() => {
181
     return ['']
88
     return ['']
182
   }
89
   }
183
 })
90
 })
91
+
184
 //0:普通用户 1:股东
92
 //0:普通用户 1:股东
185
 // const AlholderType = computed(() => {
93
 // const AlholderType = computed(() => {
186
 //   const stockholder = userStore.userInfo?.stockholder
94
 //   const stockholder = userStore.userInfo?.stockholder
@@ -193,7 +101,7 @@ const userType = computed(() => {
193
 //   if (stockholder == 1) {
101
 //   if (stockholder == 1) {
194
 //     return ['../../static/img-hy/股东.png']
102
 //     return ['../../static/img-hy/股东.png']
195
 //   }
103
 //   }
196
-  
104
+
197
 // })
105
 // })
198
 // '':普通用户 district-区/县代 city-市代',
106
 // '':普通用户 district-区/县代 city-市代',
199
 // const areaType = computed(() => {
107
 // const areaType = computed(() => {
@@ -211,10 +119,11 @@ const userType = computed(() => {
211
 //   if(!areamanage){
119
 //   if(!areamanage){
212
 //     return['']
120
 //     return['']
213
 //   }
121
 //   }
214
-  
122
+
215
 // })
123
 // })
216
 
124
 
217
 
125
 
126
+const showValue = ref(false)  //标识展示下一等级
218
 
127
 
219
 onLoad(async () => {
128
 onLoad(async () => {
220
 
129
 
@@ -252,9 +161,10 @@ function handleShowAnnuityDetail() {
252
 const ruleId = computed(() => {
161
 const ruleId = computed(() => {
253
   const userRichType = userStore.userInfo?.user_rich_type
162
   const userRichType = userStore.userInfo?.user_rich_type
254
 
163
 
255
-  console.log('我是》》》',userRichType)
164
+  console.log('我是》》》', userRichType)
256
   // 创始人
165
   // 创始人
257
   if (userRichType == 3) {
166
   if (userRichType == 3) {
167
+    showUpgradeInfo.value = false
258
     return 21
168
     return 21
259
   }
169
   }
260
   // 用户
170
   // 用户
@@ -262,7 +172,7 @@ const ruleId = computed(() => {
262
     return 18
172
     return 18
263
   }
173
   }
264
   // 会员
174
   // 会员
265
-  if (userRichType ==1) {
175
+  if (userRichType == 1) {
266
     return 19
176
     return 19
267
   }
177
   }
268
   // 高级会员
178
   // 高级会员
@@ -270,14 +180,16 @@ const ruleId = computed(() => {
270
     return 20
180
     return 20
271
   }
181
   }
272
   // 合伙人
182
   // 合伙人
273
-  if (userRichType == 8 ) {
183
+  if (userRichType == 8) {
184
+    showUpgradeInfo.value = false
274
     return 24
185
     return 24
275
   }
186
   }
276
   //联合创始人
187
   //联合创始人
277
-  if (userRichType == 9 ) {
188
+  if (userRichType == 9) {
189
+    showUpgradeInfo.value = false
278
     return 22
190
     return 22
279
   }
191
   }
280
-  
192
+
281
 })
193
 })
282
 const agentInfo = ref({})
194
 const agentInfo = ref({})
283
 
195
 
@@ -286,8 +198,8 @@ onShow(() => {
286
   if (ruleId.value) {
198
   if (ruleId.value) {
287
     // console.log(ruleId.value)
199
     // console.log(ruleId.value)
288
     getRules(ruleId.value).then(res => {
200
     getRules(ruleId.value).then(res => {
289
-      console.log(1111111222,res);
290
-      
201
+      console.log(1111111222, res);
202
+
291
       ruleDetail.value = res
203
       ruleDetail.value = res
292
     }).catch(error => {
204
     }).catch(error => {
293
       uni.showToast({
205
       uni.showToast({
@@ -303,71 +215,77 @@ onShow(() => {
303
 })
215
 })
304
 
216
 
305
 function handleUserUpgrade() {
217
 function handleUserUpgrade() {
306
-  console.log('ruleid',ruleId.value);
307
-  
218
+  showValue.value = true
219
+  console.log('ruleid', ruleId.value);
220
+
308
   if (ruleId.value < 20) {
221
   if (ruleId.value < 20) {
309
     const id = ruleId.value + 1
222
     const id = ruleId.value + 1
310
     getRules(id).then(res => {
223
     getRules(id).then(res => {
311
-      console.log('woshi111',res);
312
-      
313
-      ruleDetail.value = res
314
-      showUpgradeInfo.value = true
224
+      console.log('woshi111', res);
225
+
226
+      nextRuleDetail.value = res
315
     })
227
     })
316
-  }else if(ruleId.value = 20){
228
+  } else if (ruleId.value = 20) {
317
     const id = ruleId.value + 4
229
     const id = ruleId.value + 4
318
     getRules(id).then(res => {
230
     getRules(id).then(res => {
319
-      console.log('我是合伙人',res);
320
-      
321
-      ruleDetail.value = res
322
-      showUpgradeInfo.value = true
231
+      console.log('我是合伙人', res);
232
+
233
+      nextRuleDetail.value = res
323
     })
234
     })
324
   }
235
   }
325
 }
236
 }
326
 
237
 
327
 function handleToVipPage() {
238
 function handleToVipPage() {
328
   uni.navigateTo({
239
   uni.navigateTo({
329
-    url: '/pages/vip/index'
240
+    url: '/pages/vip/index?type=user'
330
   })
241
   })
331
 }
242
 }
243
+
244
+
245
+//弹框展示
246
+function openPopup() {
247
+  showValue.value = true
248
+}
249
+//关闭弹框
250
+const onCancel = () => {
251
+  // show.value = false
252
+  showValue.value = false
253
+}
254
+
255
+
332
 </script>
256
 </script>
333
 <template>
257
 <template>
334
   <div>
258
   <div>
335
-    <div class="bg-[#FD1642] h-25 w-full absolute top-0 left-0"></div>
336
-    <div class="flex flex-col gap-4 relative px-3 pb-safe">
337
-      <div class="pt-5 ">
338
-        <div class="flex gap-2 mb-2 text-white mb-6">
339
-          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
340
-            class="w-9 h-9 rounded-full"></image>
259
+
260
+    <div class="flex flex-col gap-4 relative  pb-safe">
261
+      <div class="">
262
+        <!-- 头像 -->
263
+        <div class="flex gap-2 mb-2 px-3 mb-6">
264
+          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" 
265
+            class=" rounded-full" style="width: 102rpx; height: 102rpx;"></image>
341
 
266
 
342
           <div class="flex">
267
           <div class="flex">
343
-            <div class="flex flex-col">
268
+            <div class="flex flex-col justify-between ">
344
               <div class="text-sm">
269
               <div class="text-sm">
345
-                <div class="text-sm" v-if="userStore.userInfo">
270
+                <div class="text_sm" v-if="userStore.userInfo">
346
                   {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
271
                   {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
347
                 </div>
272
                 </div>
348
               </div>
273
               </div>
349
-              <div class="text-xs" v-if="userStore.userInfo && userStore.userInfo.phone">
274
+              <div class="text_xs" v-if="userStore.userInfo && userStore.userInfo.phone">
350
                 {{ encodePhone(userStore.userInfo.phone) }}
275
                 {{ encodePhone(userStore.userInfo.phone) }}
351
               </div>
276
               </div>
352
             </div>
277
             </div>
353
-            <div class="flex gap-1 items-center px-1">
354
-              <div class="flex rounded-full  text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
355
-                <image class="vip_img" :src="userType" v-if="userType"></image>
356
-                <!-- <image class="vip_img" :src="AlholderType" v-if="AlholderType
357
-                  "></image>
358
-                <image class="vip_img" :src="areaType" v-if="areaType"></image> -->
359
-              </div>
278
+            <div class="flex gap-1  px-1">
279
+              <image class="vip_img" :src="userType" v-if="userType"></image>
360
             </div>
280
             </div>
361
-            <!--            <div-->
362
-            <!--                class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">-->
363
-            <!--              {{ userType }}-->
364
-            <!--            </div>-->
365
           </div>
281
           </div>
366
 
282
 
367
 
283
 
368
         </div>
284
         </div>
369
-        <div class="bg-white rounded flex flex-col gap-6 py-4 text-xl">
370
-          <div v-if="userStore.userInfo" class="flex flex-wrap">
285
+        <!-- 权益图 -->
286
+        <div style="width: 750rpx; height: 366rpx;" class="rounded flex flex-col gap-6  text-xl"
287
+          :style="{ background: 'url(' + backImg + ')', backgroundSize: 'cover' }">
288
+          <!-- <div v-if="userStore.userInfo" class="flex flex-wrap">
371
             <div @tap="handleShowAnnuityDetail" class="w-1/3 flex flex-col justify-center items-center">
289
             <div @tap="handleShowAnnuityDetail" class="w-1/3 flex flex-col justify-center items-center">
372
               <div>{{ userStore.yanglao.all_yanglao }}</div>
290
               <div>{{ userStore.yanglao.all_yanglao }}</div>
373
               <div class="text-xs">养老金</div>
291
               <div class="text-xs">养老金</div>
@@ -390,36 +308,78 @@ function handleToVipPage() {
390
               <div>{{ userStore.userInfo.team_number }}</div>
308
               <div>{{ userStore.userInfo.team_number }}</div>
391
               <div class="text-xs">团队人数</div>
309
               <div class="text-xs">团队人数</div>
392
             </div>
310
             </div>
311
+          </div> -->
312
+          <div v-if="userStore.userInfo" class="flex " style="padding-top: 60rpx; color: #ffffff; ">
313
+            <div @tap="handleShowAnnuityDetail" class="w-1/2 flex flex-col justify-center" style="padding-left: 68rpx;">
314
+              <div class="text-xs">养老金</div>
315
+              <div>{{ userStore.yanglao.all_yanglao }}</div>
316
+            </div>
317
+            <div @tap="handleShowMyInvitation" class="w-1/2  flex flex-col justify-center " style="padding-left: 48rpx;">
318
+              <div class="text-xs">我的佣金</div>
319
+              <div>{{ agentInfo.brokerage_price }}</div>
320
+            </div>
321
+          </div>
322
+          <div v-if="userStore.userInfo" class="flex" style="padding-top: 30rpx; color: #ffffff; ">
323
+            <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center " style="padding-left: 68rpx;">
324
+              <div class="text-xs">我的积分</div>
325
+              <div>{{ userStore.userInfo.score }}</div>
326
+            </div>
327
+            <div class="icon_d"></div>
328
+            <div @click="handleToRedIntegral" class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;">
329
+              <div class="text-xs">红积分提现</div>
330
+              <div>{{ userStore.userInfo.member_brokerage_price }}</div>
331
+            </div>
332
+            <div class="icon_d"></div>
333
+            <div class="w-1/3 flex flex-col  justify-center" style="padding-left: 48rpx;">
334
+              <div class="text-xs">团队人数</div>
335
+              <div>{{ userStore.userInfo.team_number }}</div>
336
+            </div>
393
           </div>
337
           </div>
394
-
395
         </div>
338
         </div>
396
 
339
 
397
       </div>
340
       </div>
398
-
399
-      <div v-if="ruleDetail && ruleDetail.content && !showUpgradeInfo" class="p-3 bg-white text-sm text-gray-500">
400
-        <mpHtml :content="ruleDetail.content"></mpHtml>
401
-      </div>
402
-      <div v-else class="p-3 bg-white text-sm text-gray-500">
403
-        <mpHtml :content="ruleDetail.content" v-if="ruleDetail && ruleDetail.content"></mpHtml>
404
-
405
-        <div class="flex justify-center items-center">
406
-          <nut-button @click="handleToVipPage" type="primary" size="small">立即开通</nut-button>
407
-
341
+      <div class="px-4 p_abls " style="border-radius: 16rpx; background: #f8f3f3;">
342
+        <div v-if="ruleDetail && ruleDetail.content" class="p-3 bg-white text-sm text-gray-500" style="border-radius: 16rpx;" >
343
+          <mpHtml :content="ruleDetail.content"></mpHtml>
344
+        </div>
345
+        <div class="text_more px-3 bg-white text-sm flex flex-col" style="margin-top: 26rpx; padding-top: 40rpx;"
346
+          v-if="showUpgradeInfo == true">
347
+          <div class="font-jlqy " style="margin-bottom: 30rpx;">更多奖励权益</div>
348
+          <div class="flex justify-between">
349
+            <div class="flex">
350
+              <div style="width: 78rpx; height: 78rpx;">
351
+                <image style="width: 100%;height: 100%;" :src="vipicon"></image>
352
+              </div>
353
+              <div>
354
+                <div class="viplevel">会员权益升级</div>
355
+                <div class="viplevels">享受福利翻倍</div>
356
+              </div>
357
+            </div>
358
+            <div @click="handleUserUpgrade" class="rewards">
359
+              了解更多
360
+            </div>
361
+          </div>
408
         </div>
362
         </div>
409
       </div>
363
       </div>
364
+      <FPopup v-if="nextRuleDetail && nextRuleDetail.content" v-model:show="showValue" @close="onCancel" position="bottom"
365
+        exClass="rounded-rt-xl rounded-lt-xl  min-h-[55%] max-h-[70%] h-full">
366
+        <div class="flex flex-col flex-1 justify-between px-3 h-full ">
367
+          <div>
368
+            <div class="pt-2 pr-1 flex justify-end flex-1">
369
+              <div @click="onCancel">✕</div>
370
+            </div>
371
+            <div class="mt-6" v-html="nextRuleDetail.content"></div>
372
+          </div>
410
 
373
 
374
+          <div class="px-3 pb-10">
375
+            <FButton @click="handleToVipPage" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
376
+              立即升级
377
+            </FButton>
411
 
378
 
412
-
413
-      <div class="p-3 bg-white text-sm flex flex-col" v-if="!showUpgradeInfo">
414
-        <div class="font-bold">还有更多奖励权益</div>
415
-        <div class="flex justify-end">
416
-
417
-          <div @click="handleUserUpgrade"
418
-            class="text-[12px] border border-solid border-1px rounded px-1 border-gray text-gray-600">了解更多奖励</div>
379
+          </div>
419
         </div>
380
         </div>
420
-      </div>
421
-
422
 
381
 
382
+      </FPopup>
423
 
383
 
424
     </div>
384
     </div>
425
   </div>
385
   </div>
@@ -427,10 +387,9 @@ function handleToVipPage() {
427
 
387
 
428
 <route lang="yaml">
388
 <route lang="yaml">
429
 style:
389
 style:
430
-  navigationBarBackgroundColor: "#FD1642"
390
+  navigationBarBackgroundColor: "#f8f3f3"
431
   navigationBarTitleText: 储蓄保
391
   navigationBarTitleText: 储蓄保
432
-  enablePullDownRefresh: true
433
-  navigationBarTextStyle: "white"
392
+  enablePullDownRefresh: false
434
 
393
 
435
 </route>
394
 </route>
436
 
395
 
@@ -439,9 +398,87 @@ page {
439
   background: #f5f5f5;
398
   background: #f5f5f5;
440
 }
399
 }
441
 
400
 
401
+.text_sm {
402
+  height: 45rpx;
403
+  font-size: 32rpx;
404
+  font-family: PingFangSC, PingFang SC;
405
+  font-weight: 500;
406
+  color: #333333;
407
+  line-height: 45rpx
408
+}
409
+
410
+.text_xs {
411
+  height: 33rpx;
412
+  font-size: 24rpx;
413
+  font-family: PingFangSC, PingFang SC;
414
+  font-weight: 400;
415
+  color: #333333;
416
+  line-height: 33rpx;
417
+}
418
+
419
+.p_abls {
420
+  position: absolute;
421
+  top: 468rpx;
422
+}
423
+
442
 .vip_img {
424
 .vip_img {
443
-  width: 48px;
444
-  height: 24px;
425
+  width: 124rpx;
426
+  height: 56rpx;
445
   margin-left: 2px;
427
   margin-left: 2px;
446
 }
428
 }
429
+
430
+.icon_d {
431
+  width: 1rpx;
432
+  height: 40rpx;
433
+  background: rgba(255, 255, 255, 0.4);
434
+  ;
435
+}
436
+
437
+
438
+.text_more {
439
+  height: 202rpx;
440
+  background: #FFFFFF;
441
+  box-shadow: 0rpx 7rpx 33rpx 0rpx rgba(229, 183, 183, 0.34);
442
+  border-radius: 16rpx;
443
+}
444
+
445
+.font-jlqy {
446
+  height: 30rpx;
447
+  font-size: 30rpx;
448
+  font-family: PingFangSC, PingFang SC;
449
+  font-weight: 700;
450
+  color: #333333;
451
+  line-height: 30rpx;
452
+}
453
+
454
+.viplevel {
455
+  height: 30rpx;
456
+  font-size: 30rpx;
457
+  font-family: PingFangSC, PingFang SC;
458
+  font-weight: 400;
459
+  color: #333333;
460
+  line-height: 30rpx;
461
+}
462
+
463
+.viplevels {
464
+  height: 30rpx;
465
+  font-size: 25rpx;
466
+  font-family: PingFangSC, PingFang SC;
467
+  font-weight: 400;
468
+  color: #666666;
469
+  line-height: 30rpx;
470
+}
471
+
472
+.rewards {
473
+  width: 148rpx;
474
+  height: 58rpx;
475
+  border-radius: 30rpx;
476
+  border: 1rpx solid #FE0032;
477
+  color: #FE0032;
478
+  line-height: 58rpx;
479
+  font-size: 26rpx;
480
+  font-family: PingFangSC, PingFang SC;
481
+  font-weight: 400;
482
+  text-align: center;
483
+}
447
 </style>
484
 </style>

+ 1 - 1
src/pages/order-confirm/index.vue

@@ -90,7 +90,7 @@ onLoad(async (options) => {
90
     cart_id: data.cartId.split(','),
90
     cart_id: data.cartId.split(','),
91
     address_id: data.addressId
91
     address_id: data.addressId
92
   }).then(res => {
92
   }).then(res => {
93
-    console.log(res)
93
+    console.log(15999999,res)
94
     data.is_dacang_vip_product = res.is_dacang_vip_product
94
     data.is_dacang_vip_product = res.is_dacang_vip_product
95
     data.cartOrder = res.order
95
     data.cartOrder = res.order
96
     data.totalPrice = res.order_price
96
     data.totalPrice = res.order_price

+ 16 - 9
src/pages/order/components/AllItemList.vue

@@ -1,5 +1,5 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {getAllOrder} from "~/apis/order.api";
2
+import { getAllOrder } from "~/apis/order.api";
3
 import OrderItem from "~/pages/order/components/OrderItem.vue";
3
 import OrderItem from "~/pages/order/components/OrderItem.vue";
4
 import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
4
 import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
@@ -34,7 +34,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
34
     page: state.currentPage,
34
     page: state.currentPage,
35
     limit: state.pageSize
35
     limit: state.pageSize
36
   }).then(res => {
36
   }).then(res => {
37
-    console.log('>>>>>',res)
37
+    console.log('>>>>>', res)
38
     if (action === 'page') {
38
     if (action === 'page') {
39
       state.list = state.list.concat(res.list)
39
       state.list = state.list.concat(res.list)
40
     }
40
     }
@@ -82,6 +82,9 @@ function handleScrollToLower() {
82
 //   })
82
 //   })
83
 // })
83
 // })
84
 onMounted(() => {
84
 onMounted(() => {
85
+  uni.showLoading({
86
+    title: '加载中'
87
+  });
85
   loadList('reload')
88
   loadList('reload')
86
   uni.$on('orderCancelFromList', () => {
89
   uni.$on('orderCancelFromList', () => {
87
     // loadAllOrderList()
90
     // loadAllOrderList()
@@ -101,6 +104,13 @@ onMounted(() => {
101
       }, 300)
104
       }, 300)
102
     })
105
     })
103
   })
106
   })
107
+  uni.$on('AllreloadList', () => {
108
+    console.log('收到事件 reloadList');
109
+    // 在这里可以执行你的逻辑,比如调用 loadList 函数
110
+    // 请注意,这里的 this 指向当前页面实例
111
+    loadList('reload');
112
+  });
113
+  uni.hideLoading()
104
 })
114
 })
105
 
115
 
106
 onUnmounted(() => {
116
 onUnmounted(() => {
@@ -116,11 +126,10 @@ onUnmounted(() => {
116
   <div class="p-3 flex flex-col">
126
   <div class="p-3 flex flex-col">
117
     <div v-if="state.list.length > 0" class="flex flex-col gap-3">
127
     <div v-if="state.list.length > 0" class="flex flex-col gap-3">
118
       <div v-for="(orderItem, index) in state.list" :key="index">
128
       <div v-for="(orderItem, index) in state.list" :key="index">
119
-        <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
120
-        <OtherOrderItem :item="orderItem" v-else/>
129
+        <OrderItem :order-item="orderItem" v-if="orderItem.source == 7" />
130
+        <OtherOrderItem :item="orderItem" v-else />
121
       </div>
131
       </div>
122
-      <div class=" flex justify-center items-center text-[12px] text-gray-500"
123
-           v-if="state.list && state.list.length > 0">
132
+      <div class=" flex justify-center items-center text-[12px] text-gray-500" v-if="state.list && state.list.length > 0">
124
         <div v-if="state.status === 'loading'">
133
         <div v-if="state.status === 'loading'">
125
           加载中...
134
           加载中...
126
         </div>
135
         </div>
@@ -130,10 +139,8 @@ onUnmounted(() => {
130
       </div>
139
       </div>
131
     </div>
140
     </div>
132
     <div v-else class="flex flex-col  justify-center items-center w-full">
141
     <div v-else class="flex flex-col  justify-center items-center w-full">
133
-      <CXBEmpty/>
142
+      <CXBEmpty />
134
 
143
 
135
     </div>
144
     </div>
136
   </div>
145
   </div>
137
-
138
-
139
 </template>
146
 </template>

+ 8 - 0
src/pages/order/components/ObligationOrderList.vue

@@ -35,6 +35,8 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
35
     page: state.currentPage,
35
     page: state.currentPage,
36
     limit: state.pageSize
36
     limit: state.pageSize
37
   }).then(res => {
37
   }).then(res => {
38
+    console.log('>>>>>>111',res);
39
+    
38
     if (action === 'page') {
40
     if (action === 'page') {
39
       state.list = state.list.concat(res.list)
41
       state.list = state.list.concat(res.list)
40
     }
42
     }
@@ -80,6 +82,12 @@ onMounted(() => {
80
       }, 300)
82
       }, 300)
81
     })
83
     })
82
   })
84
   })
85
+  uni.$on('dfkreloadList', () => {
86
+      console.log('收到事件 reloadList');
87
+      // 在这里可以执行你的逻辑,比如调用 loadList 函数
88
+      // 请注意,这里的 this 指向当前页面实例
89
+      loadList('reload');
90
+    });
83
 })
91
 })
84
 
92
 
85
 onUnmounted(() => {
93
 onUnmounted(() => {

+ 117 - 22
src/pages/order/components/OrderItem.vue

@@ -11,7 +11,7 @@ import {
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
12
 } from "~/apis/model/product.model";
12
 } from "~/apis/model/product.model";
13
 import { DcProductModel } from "~/apis/model/dacang.model";
13
 import { DcProductModel } from "~/apis/model/dacang.model";
14
-import { error } from "console";
14
+import { error, log } from "console";
15
 const props = defineProps({
15
 const props = defineProps({
16
   orderItem: {
16
   orderItem: {
17
     type: Object,
17
     type: Object,
@@ -58,19 +58,19 @@ function getStatusText(orderItem: OrderListModel) {
58
     return '待收货'
58
     return '待收货'
59
   }
59
   }
60
   if (orderItem.status == 2) {
60
   if (orderItem.status == 2) {
61
-    return '已完成, 待评价'
61
+    return '待评价'
62
   }
62
   }
63
   if (orderItem.status == 3) {
63
   if (orderItem.status == 3) {
64
     return '已完成'
64
     return '已完成'
65
   }
65
   }
66
   if (orderItem.status == -1) {
66
   if (orderItem.status == -1) {
67
-    return '已退款'
67
+    return '已完成'
68
   }
68
   }
69
   if (orderItem.status == 4) {
69
   if (orderItem.status == 4) {
70
-    return '已申请退款'
70
+    return '售后中'
71
   }
71
   }
72
   if (orderItem.status === 5) {
72
   if (orderItem.status === 5) {
73
-    return '已取消订单'
73
+    return '已取消'
74
   }
74
   }
75
   if (orderItem.status === '5') {
75
   if (orderItem.status === '5') {
76
     return '待付款'
76
     return '待付款'
@@ -130,8 +130,16 @@ function handlePayment() {
130
 function handleShowOrderDetail(order) {
130
 function handleShowOrderDetail(order) {
131
   console.log(order)
131
   console.log(order)
132
   uni.navigateTo({
132
   uni.navigateTo({
133
-    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}&type=${order.status}`
133
+    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
134
   })
134
   })
135
+  // if (order.status === '5') {
136
+  //   uni.navigateTo({
137
+  //     url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(order)}&type=1`
138
+  //   })
139
+  // } else {
140
+
141
+  // }
142
+
135
 }
143
 }
136
 
144
 
137
 function handleRemindTheDelivery() {
145
 function handleRemindTheDelivery() {
@@ -199,7 +207,7 @@ function handleProductItemClick(
199
 
207
 
200
 
208
 
201
 function handeRefund(orderItem) {
209
 function handeRefund(orderItem) {
202
-  console.log('申请售后', orderItem);
210
+  console.log('售后详情', orderItem);
203
 
211
 
204
   uni.navigateTo({
212
   uni.navigateTo({
205
     // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
213
     // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
@@ -207,11 +215,67 @@ function handeRefund(orderItem) {
207
   })
215
   })
208
 }
216
 }
209
 
217
 
218
+function handeDetail(orderItem: any) {
219
+  uni.navigateTo({
220
+    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
221
+  })
222
+}
210
 function handleShowObligationOrderDetail(orderItem) {
223
 function handleShowObligationOrderDetail(orderItem) {
224
+  console.log("hhhhhhhh", orderItem)
211
   uni.navigateTo({
225
   uni.navigateTo({
212
     url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}`
226
     url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}`
213
   })
227
   })
214
 }
228
 }
229
+
230
+const remainingTime: any = ref({
231
+  hours: "00",
232
+  minutes: "00",
233
+  seconds: "00"
234
+})
235
+//计算取消时间
236
+function updateRemainingTime(detail: any) {
237
+  const currentTime = new Date().getTime();
238
+  const endTime = new Date(detail.close_time).getTime();
239
+  const timeDifference = endTime - currentTime;
240
+
241
+  // 计算剩余时间
242
+  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
243
+  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
244
+  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
245
+
246
+  // 更新数据
247
+  remainingTime.value = {
248
+    hours: hours < 10 ? '0' + hours : hours,
249
+    minutes: minutes < 10 ? '0' + minutes : minutes,
250
+    seconds: seconds < 10 ? '0' + seconds : seconds
251
+  }
252
+}
253
+
254
+
255
+// 每秒更新剩余时间
256
+const timer = setInterval(() => {
257
+  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
258
+    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
259
+    clearInterval(timer);
260
+    //重新刷新页面
261
+    uni.$emit('AllreloadList')
262
+    console.log('自动关闭');
263
+  }
264
+  updateRemainingTime(props.orderItem)
265
+}, 1000);
266
+
267
+onUnload(() => {
268
+  clearInterval(timer);
269
+  console.log('卸载关闭');
270
+})
271
+
272
+function handleShowDetail(orderItem: any) {
273
+  console.log(orderItem)
274
+  uni.navigateTo({
275
+    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
276
+  })
277
+}
278
+
215
 </script>
279
 </script>
216
 
280
 
217
 <template>
281
 <template>
@@ -254,7 +318,9 @@ function handleShowObligationOrderDetail(orderItem) {
254
               </div>
318
               </div>
255
 
319
 
256
               <div class="flex flex-col justify-center items-center">
320
               <div class="flex flex-col justify-center items-center">
257
-                <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
321
+                <!-- <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice> -->
322
+                <div class="font-bold text-[12px] !text-[#000]"> ¥{{
323
+                  parseInt(parseFloat(orderProduct.product_price)) }}</div>
258
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
324
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
259
               </div>
325
               </div>
260
 
326
 
@@ -270,14 +336,14 @@ function handleShowObligationOrderDetail(orderItem) {
270
               <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
336
               <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
271
                 <div class="text-black">提醒发货</div>
337
                 <div class="text-black">提醒发货</div>
272
               </nut-button>
338
               </nut-button>
273
-              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
339
+              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">售后详情</nut-button>
274
             </div>
340
             </div>
275
 
341
 
276
 
342
 
277
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 1">
343
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 1">
278
               <nut-button size="small" plain type="default"
344
               <nut-button size="small" plain type="default"
279
                 @tap.stop="handleShowLogistics(orderProduct)">查看物流</nut-button>
345
                 @tap.stop="handleShowLogistics(orderProduct)">查看物流</nut-button>
280
-              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
346
+              <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderProduct)">售后详情</nut-button>
281
 
347
 
282
               <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderProduct)">确认收货</nut-button>
348
               <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderProduct)">确认收货</nut-button>
283
 
349
 
@@ -299,8 +365,8 @@ function handleShowObligationOrderDetail(orderItem) {
299
           class="flex flex-col gap-3">
365
           class="flex flex-col gap-3">
300
           <div class="flex py-2 gap-3">
366
           <div class="flex py-2 gap-3">
301
             <div class="flex-1 flex gap-2">
367
             <div class="flex-1 flex gap-2">
302
-              <div class="flex w-20">
303
-                <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
368
+              <div class="flex w-20 h-20">
369
+                <image :src="orderProduct.cart_info.product.image" class="w-20 h-20"></image>
304
 
370
 
305
               </div>
371
               </div>
306
               <div class="flex flex-col">
372
               <div class="flex flex-col">
@@ -315,22 +381,34 @@ function handleShowObligationOrderDetail(orderItem) {
315
 
381
 
316
             <div class="flex flex-col justify-center items-center">
382
             <div class="flex flex-col justify-center items-center">
317
               <!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
383
               <!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
318
-              <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
384
+              <div class="font-bold text-[12px] !text-[#000]"> ¥{{
385
+                parseFloat(orderProduct.product_price).toFixed(2).replace(/\.?0+$/, '') }}</div>
319
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
386
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
320
             </div>
387
             </div>
321
 
388
 
322
           </div>
389
           </div>
323
 
390
 
324
         </div>
391
         </div>
325
-
326
-        <div class="flex justify-end gap-2" v-if="orderItem.status === '5'">
327
-          <!-- <div class="title-line">09:02:00后订单将关闭</div> -->
392
+        <!-- 待支付 -->
393
+        <div class="flex flex-1 justify-between" v-if="orderItem.status === '5'">
394
+          <div class="title-line"><span style="color: #FE0032;">{{ remainingTime.hours }}:{{ remainingTime.minutes }}:{{
395
+            remainingTime.seconds }}</span> 后订单将关闭
396
+          </div>
397
+          <div class="flex justify-end gap-2" style="margin-top: 4rpx;">
398
+            <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
399
+              <div class="text-black">取消订单</div>
400
+            </nut-button>
401
+            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
402
+          </div>
403
+        </div>
404
+        <!-- <div class="flex justify-end gap-2" v-if="orderItem.status === '5'">
405
+          <div class="title-line"><span>09:02:00</span>后订单将关闭</div>
328
           <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
406
           <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
329
             <div class="text-black">取消订单</div>
407
             <div class="text-black">取消订单</div>
330
           </nut-button>
408
           </nut-button>
331
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
409
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
332
 
410
 
333
-        </div>
411
+        </div> -->
334
         <div class="flex justify-end gap-2" v-if="orderItem.status === 5">
412
         <div class="flex justify-end gap-2" v-if="orderItem.status === 5">
335
 
413
 
336
 
414
 
@@ -339,22 +417,37 @@ function handleShowObligationOrderDetail(orderItem) {
339
           <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
417
           <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
340
             <div class="text-black">提醒发货</div>
418
             <div class="text-black">提醒发货</div>
341
           </nut-button>
419
           </nut-button>
342
-          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
420
+          <div v-if="orderItem.refund_order_id">
421
+            <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderItem)">售后详情</nut-button>
422
+          </div>
423
+          <div v-else>
424
+            <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
425
+          </div>
426
+
343
         </div>
427
         </div>
344
 
428
 
345
         <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
429
         <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
346
           <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
430
           <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
347
-          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
431
+          <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderItem)">售后详情</nut-button>
348
 
432
 
349
           <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
433
           <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
350
 
434
 
351
         </div>
435
         </div>
352
 
436
 
353
         <div class="flex justify-end gap-2" v-if="orderItem.status == 2">
437
         <div class="flex justify-end gap-2" v-if="orderItem.status == 2">
438
+          <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
354
           <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
439
           <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
355
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
440
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
356
 
441
 
357
         </div>
442
         </div>
443
+        <div class="flex justify-end gap-2" v-if="orderItem.status == 4">
444
+          <nut-button size="small" plain type="default" @tap.stop="handleShowDetail(orderItem)">售后详情</nut-button>
445
+
446
+        </div>
447
+        <div class="flex justify-end gap-2" v-if="orderItem.status == 3">
448
+          <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
449
+          <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
450
+        </div>
358
       </div>
451
       </div>
359
     </div>
452
     </div>
360
 
453
 
@@ -362,10 +455,12 @@ function handleShowObligationOrderDetail(orderItem) {
362
 </template>
455
 </template>
363
 <style  scoped>
456
 <style  scoped>
364
 .title-line {
457
 .title-line {
365
-  font-size: 24rpx;
366
-  /* 字体大小 */
367
   color: #333;
458
   color: #333;
368
   line-height: 56rpx;
459
   line-height: 56rpx;
369
-  margin-right: 80rpx;
460
+  width: 262rpx;
461
+  height: 56rpx;
462
+  font-size: 25rpx;
463
+  font-family: PingFangSC, PingFang SC;
464
+  font-weight: 400;
370
 }
465
 }
371
 </style> 
466
 </style> 

+ 58 - 50
src/pages/order/components/OrderObligationItem.vue

@@ -55,7 +55,7 @@ function getStatusText(orderItem: OrderListModel) {
55
     return '待收货'
55
     return '待收货'
56
   }
56
   }
57
   if (orderItem.status == 2) {
57
   if (orderItem.status == 2) {
58
-    return '已完成, 待评价'
58
+    return '待评价'
59
   }
59
   }
60
   if (orderItem.status == 3) {
60
   if (orderItem.status == 3) {
61
     return '已完成'
61
     return '已完成'
@@ -208,45 +208,46 @@ function handleShowObligationOrderDetail(orderItem) {
208
 
208
 
209
 
209
 
210
 
210
 
211
-// const remainingTime: any = ref({
212
-//   hours: 0,
213
-//   minutes: 0,
214
-//   seconds: 0
215
-// })
216
-// //计算取消时间
217
-// function updateRemainingTime(detail: any) {
218
-//   const currentTime = new Date().getTime();
219
-//   const endTime = new Date(detail.close_time).getTime();
220
-//   const timeDifference = endTime - currentTime;
221
-
222
-//   // 计算剩余时间
223
-//   const hours = Math.floor(timeDifference / (1000 * 60 * 60));
224
-//   const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
225
-//   const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
226
-
227
-//   // 更新数据
228
-//   remainingTime.value = {
229
-//     hours: hours < 10 ? '0' + hours : hours,
230
-//     minutes: minutes < 10 ? '0' + minutes : minutes,
231
-//     seconds: seconds < 10 ? '0' + seconds : seconds
232
-//   }
233
-// }
211
+const remainingTime: any = ref({
212
+  hours: "00",
213
+  minutes: "00",
214
+  seconds: "00"
215
+})
216
+//计算取消时间
217
+function updateRemainingTime(detail: any) {
218
+  const currentTime = new Date().getTime();
219
+  const endTime = new Date(detail.close_time).getTime();
220
+  const timeDifference = endTime - currentTime;
221
+
222
+  // 计算剩余时间
223
+  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
224
+  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
225
+  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
226
+
227
+  // 更新数据
228
+  remainingTime.value = {
229
+    hours: hours < 10 ? '0' + hours : hours,
230
+    minutes: minutes < 10 ? '0' + minutes : minutes,
231
+    seconds: seconds < 10 ? '0' + seconds : seconds
232
+  }
233
+}
234
 
234
 
235
 
235
 
236
-// // 每秒更新剩余时间
237
-// const timer = setInterval(() => {
238
-//   if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
239
-//     // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
240
-//     clearInterval(timer);
241
-//     console.log('自动关闭');
242
-//   }
243
-//   updateRemainingTime(props.orderItem)
244
-// }, 1000);
236
+// 每秒更新剩余时间
237
+const timer = setInterval(() => {
238
+  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
239
+    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
240
+    clearInterval(timer);
241
+    uni.$emit('dfkreloadList')
242
+    console.log('自动关闭');
243
+  }
244
+  updateRemainingTime(props.orderItem)
245
+}, 1000);
245
 
246
 
246
-// onUnload(() => {
247
-//   clearInterval(timer);
248
-//   console.log('卸载关闭');
249
-// })
247
+onUnload(() => {
248
+  clearInterval(timer);
249
+  console.log('卸载关闭');
250
+})
250
 
251
 
251
 
252
 
252
 
253
 
@@ -278,7 +279,7 @@ function handleShowObligationOrderDetail(orderItem) {
278
               <div class="flex-1 flex gap-2">
279
               <div class="flex-1 flex gap-2">
279
                 <div class="flex w-20 h-20">
280
                 <div class="flex w-20 h-20">
280
 
281
 
281
-                  <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
282
+                  <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" ></image>
282
                 </div>
283
                 </div>
283
                 <div class="flex flex-col">
284
                 <div class="flex flex-col">
284
                   <div class="line-clamp-2 text-[12px]">
285
                   <div class="line-clamp-2 text-[12px]">
@@ -291,7 +292,9 @@ function handleShowObligationOrderDetail(orderItem) {
291
               </div>
292
               </div>
292
 
293
 
293
               <div class="flex flex-col justify-center items-center">
294
               <div class="flex flex-col justify-center items-center">
294
-                <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
295
+                <!-- <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice> -->
296
+                <div class="font-bold text-[12px] !text-[#000]"> ¥{{
297
+                  parseFloat(orderProduct.product_price).toFixed(2).replace(/\.?0+$/, '') }}</div>
295
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
298
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
296
               </div>
299
               </div>
297
 
300
 
@@ -299,16 +302,19 @@ function handleShowObligationOrderDetail(orderItem) {
299
 
302
 
300
           </div>
303
           </div>
301
         </div>
304
         </div>
302
-        <div class="flex justify-end gap-2">
303
-          <!-- <div class="title-line">{{ remainingTime.hours }}:{{ remainingTime.minutes }}:{{ remainingTime.seconds }}后订单将关闭
304
-          </div> -->
305
-          <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
306
-            <div class="text-black">取消订单</div>
307
-          </nut-button>
308
-          <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
309
-
305
+        <div class="flex flex-1 justify-between">
306
+          <div v-if="props.orderItem" class="title-line"><span style="color: #FE0032;">{{ remainingTime.hours }}:{{
307
+            remainingTime.minutes }}:{{ remainingTime.seconds }}</span> 后订单将关闭
308
+          </div>
309
+          <div class="flex justify-end gap-2" style="margin-top: 4rpx;">
310
+            <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
311
+              <div class="text-black">取消订单</div>
312
+            </nut-button>
313
+            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
314
+          </div>
310
         </div>
315
         </div>
311
 
316
 
317
+
312
       </div>
318
       </div>
313
     </div>
319
     </div>
314
 
320
 
@@ -317,10 +323,12 @@ function handleShowObligationOrderDetail(orderItem) {
317
 
323
 
318
 <style scoped>
324
 <style scoped>
319
 .title-line {
325
 .title-line {
320
-  font-size: 24rpx;
321
-  /* 字体大小 */
322
   color: #333;
326
   color: #333;
323
   line-height: 56rpx;
327
   line-height: 56rpx;
324
-  margin-right: 80rpx;
328
+  width: 262rpx;
329
+  height: 56rpx;
330
+  font-size: 25rpx;
331
+  font-family: PingFangSC, PingFang SC;
332
+  font-weight: 400;
325
 }
333
 }
326
 </style>
334
 </style>

+ 34 - 35
src/pages/order/components/RefundOrderItem.vue

@@ -1,16 +1,16 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import FPrice from "~/components/FPrice/FPrice.vue";
2
 import FPrice from "~/components/FPrice/FPrice.vue";
3
-import {OrderListModel} from "~/apis/model/order.model";
4
-import {cancelOrder, takeOrder} from "~/apis/order.api";
5
-import {encodeBase64} from "~/utils/http/helper";
6
-import {deleteAddress} from "~/apis/user";
3
+import { OrderListModel } from "~/apis/model/order.model";
4
+import { cancelOrder, takeOrder } from "~/apis/order.api";
5
+import { encodeBase64 } from "~/utils/http/helper";
6
+import { deleteAddress } from "~/apis/user";
7
 import {
7
 import {
8
   DyProductModel,
8
   DyProductModel,
9
   JdProductModel,
9
   JdProductModel,
10
   SuNingProductModel,
10
   SuNingProductModel,
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
12
 } from "~/apis/model/product.model";
12
 } from "~/apis/model/product.model";
13
-import {DcProductModel} from "~/apis/model/dacang.model";
13
+import { DcProductModel } from "~/apis/model/dacang.model";
14
 const props = defineProps({
14
 const props = defineProps({
15
   orderItem: {
15
   orderItem: {
16
     type: Object,
16
     type: Object,
@@ -42,10 +42,15 @@ function getStatusText(orderItem) {
42
   // }
42
   // }
43
   // switch (orderItem.status) {
43
   // switch (orderItem.status) {
44
   // }
44
   // }
45
-  if (orderItem.status == -1) {
46
-    // return '审核未通过'
45
+  if (orderItem.status == -1 && orderItem.refund_type == 2) {
46
+    // return '退款失败'
47
+    return '审核未通过'
48
+  }
49
+  if (orderItem.status == -1 && orderItem.refund_type == 1) {
47
     return '退款失败'
50
     return '退款失败'
51
+
48
   }
52
   }
53
+
49
   if (orderItem.status == 0) {
54
   if (orderItem.status == 0) {
50
     // return '待审核'
55
     // return '待审核'
51
     return '审核中'
56
     return '审核中'
@@ -152,7 +157,7 @@ function handleComment(orderItem) {
152
 }
157
 }
153
 
158
 
154
 function handleProductItemClick(
159
 function handleProductItemClick(
155
-    item
160
+  item
156
 ) {
161
 ) {
157
   // function navigateToDetail(params) {
162
   // function navigateToDetail(params) {
158
   //   let otherDetailUrl = `/pages/store/product/other`
163
   //   let otherDetailUrl = `/pages/store/product/other`
@@ -178,9 +183,7 @@ function handleShowDetail(orderItem) {
178
 
183
 
179
 <template>
184
 <template>
180
   <div class="mb-3 bg-white rounded p-3" v-if="orderItem">
185
   <div class="mb-3 bg-white rounded p-3" v-if="orderItem">
181
-    <div
182
-        @click.stop="handleHeaderClick"
183
-        class="flex items-center justify-between f-hairline-bottom pb-3">
186
+    <div @click.stop="handleHeaderClick" class="flex items-center justify-between f-hairline-bottom pb-3">
184
       <div class="flex-1 flex items-center font-bold gap-2 text-sm justify-between ">
187
       <div class="flex-1 flex items-center font-bold gap-2 text-sm justify-between ">
185
         <div class="flex-1 flex items-center gap-2 w-full">
188
         <div class="flex-1 flex items-center gap-2 w-full">
186
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
189
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
@@ -189,12 +192,10 @@ function handleShowDetail(orderItem) {
189
           </div>
192
           </div>
190
         </div>
193
         </div>
191
 
194
 
192
-          <div class="f-text-color-2 i-tabler-chevron-right"></div>
195
+        <div class="f-text-color-2 i-tabler-chevron-right"></div>
193
 
196
 
194
       </div>
197
       </div>
195
-      <div class=" text-xs flex w-15 justify-end  'text-primary'"
196
-           
197
-      >
198
+      <div class=" text-xs flex w-15 justify-end  'text-primary'">
198
         {{ getStatusText(orderItem) }}
199
         {{ getStatusText(orderItem) }}
199
       </div>
200
       </div>
200
     </div>
201
     </div>
@@ -202,29 +203,29 @@ function handleShowDetail(orderItem) {
202
 
203
 
203
 
204
 
204
     <div @tap.stop="handleShowDetail(orderItem)">
205
     <div @tap.stop="handleShowDetail(orderItem)">
205
-        <div v-for="(orderProduct, orderProductIndex) in orderItem.refundProduct" :key="orderProductIndex">
206
-          <div class="flex py-2 gap-3">
207
-            <div class="flex-1 flex gap-2">
208
-              <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
209
-              <div class="flex flex-col flex-1">
210
-                <div class="line-clamp-2 text-[12px]">
211
-                  {{ orderProduct.product.cart_info.product.store_name }}
212
-                </div>
213
-                <div class="text-gray-500 text-[10px]">
214
-                  {{ orderProduct.product.cart_info.productAttr.sku }}
215
-                </div>
206
+      <div v-for="(orderProduct, orderProductIndex) in orderItem.refundProduct" :key="orderProductIndex">
207
+        <div class="flex py-2 gap-3">
208
+          <div class="flex-1 flex gap-2">
209
+            <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
210
+            <div class="flex flex-col flex-1">
211
+              <div class="line-clamp-2 text-[12px]">
212
+                {{ orderProduct.product.cart_info.product.store_name }}
213
+              </div>
214
+              <div class="text-gray-500 text-[10px]">
215
+                {{ orderProduct.product.cart_info.productAttr.sku }}
216
               </div>
216
               </div>
217
-                <div class="justify-end flex">
218
-                  <div class="flex flex-col ">
219
-                    <div class="text-[12px] font-bold">
220
-                      <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black"/>
221
-                    </div>
222
-                    <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
223
-                  </div>
217
+            </div>
218
+            <div class="justify-end flex">
219
+              <div class="flex flex-col ">
220
+                <div class="text-[12px] font-bold">
221
+                  <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black" />
224
                 </div>
222
                 </div>
223
+                <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
224
+              </div>
225
             </div>
225
             </div>
226
           </div>
226
           </div>
227
         </div>
227
         </div>
228
+      </div>
228
       <div class="flex justify-end">
229
       <div class="flex justify-end">
229
         <nut-button size="small" plain type="primary" @tap.stop="handleShowDetail(orderItem)">查看详情</nut-button>
230
         <nut-button size="small" plain type="primary" @tap.stop="handleShowDetail(orderItem)">查看详情</nut-button>
230
 
231
 
@@ -233,6 +234,4 @@ function handleShowDetail(orderItem) {
233
     </div>
234
     </div>
234
 
235
 
235
   </div>
236
   </div>
236
-
237
-
238
 </template>
237
 </template>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 172 - 27
src/pages/order/detail.vue


+ 2 - 6
src/pages/order/index.vue

@@ -272,12 +272,8 @@ style:
272
 </route>
272
 </route>
273
 
273
 
274
 <style lang="scss">
274
 <style lang="scss">
275
-//.nut-tab-pane {
276
-//  background: #f5f5f5 !important;
277
-//}
278
-//.nut-tabs {
279
-//  background: white;
280
-//}
275
+
276
+
281
 .nut-tabs__titles {
277
 .nut-tabs__titles {
282
   background: white !important;
278
   background: white !important;
283
 }
279
 }

+ 110 - 53
src/pages/order/logistics.vue

@@ -1,6 +1,6 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {CDN_URL} from "~/config/app";
3
-import {getRecommendList} from "~/apis/merchant";
2
+import { CDN_URL } from "~/config/app";
3
+import { getRecommendList } from "~/apis/merchant";
4
 import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
4
 import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
5
 import {
5
 import {
6
   DyProductModel,
6
   DyProductModel,
@@ -8,12 +8,12 @@ import {
8
   SuNingProductModel,
8
   SuNingProductModel,
9
   TaobaoProductThirdPartyWaresModel, VipProductModel
9
   TaobaoProductThirdPartyWaresModel, VipProductModel
10
 } from "~/apis/model/product.model";
10
 } from "~/apis/model/product.model";
11
-import {DcProductModel} from "~/apis/model/dacang.model";
12
-import {getLogistics} from "~/apis/order.api";
13
-import {encodePhone} from "../../utils";
11
+import { DcProductModel } from "~/apis/model/dacang.model";
12
+import { getLogistics } from "~/apis/order.api";
13
+import { encodePhone } from "../../utils";
14
 
14
 
15
 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'
16
-
16
+const takeshow = ref(false)
17
 const state = reactive({
17
 const state = reactive({
18
   currentPage: 1,
18
   currentPage: 1,
19
   pageSize: 10,
19
   pageSize: 10,
@@ -30,20 +30,20 @@ onLoad((options) => {
30
     icon: 'none'
30
     icon: 'none'
31
   })
31
   })
32
   if (options && options.id) {
32
   if (options && options.id) {
33
-  getLogistics(options.id).then(res => {
34
-  // getLogistics(4127).then(res => {
35
-    console.log(res)
36
-    if (res && res.order) {
37
-      state.orderDetail = res.order
38
-    }
39
-    if (res && res.express) {
40
-      state.express = res.express
41
-    }
33
+    getLogistics(options.id).then(res => {
34
+      // getLogistics(4127).then(res => {
35
+      console.log(res)
36
+      if (res && res.order) {
37
+        state.orderDetail = res.order
38
+      }
39
+      if (res && res.express) {
40
+        state.express = res.express
41
+      }
42
 
42
 
43
-    uni.hideLoading()
44
-  })
43
+      uni.hideLoading()
44
+    })
45
 
45
 
46
-}
46
+  }
47
   // }
47
   // }
48
 })
48
 })
49
 onShow(() => {
49
 onShow(() => {
@@ -79,13 +79,13 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
79
 }
79
 }
80
 
80
 
81
 function handleProductItemClick(
81
 function handleProductItemClick(
82
-    item:
83
-        JdProductModel
84
-        & DcProductModel
85
-        & DyProductModel
86
-        & SuNingProductModel
87
-        & TaobaoProductThirdPartyWaresModel
88
-        & VipProductModel
82
+  item:
83
+    JdProductModel
84
+    & DcProductModel
85
+    & DyProductModel
86
+    & SuNingProductModel
87
+    & TaobaoProductThirdPartyWaresModel
88
+    & VipProductModel
89
 ) {
89
 ) {
90
   // function navigateToDetail(params) {
90
   // function navigateToDetail(params) {
91
   //   let otherDetailUrl = `/pages/store/product/other`
91
   //   let otherDetailUrl = `/pages/store/product/other`
@@ -135,34 +135,49 @@ function handleMakePhoneCall() {
135
     phoneNumber: state.orderDetail.user_phone
135
     phoneNumber: state.orderDetail.user_phone
136
   })
136
   })
137
 }
137
 }
138
+
139
+const statusimg = computed(() => {
140
+  if (takeshow.value == false) {
141
+    return '../../static/icon/展开.png'
142
+  } else {
143
+    return '../../static/icon/收起.png'
144
+  }
145
+})
146
+const statustext = computed(() => {
147
+  if (takeshow.value == false) {
148
+    return '展开'
149
+  } else {
150
+    return '收起'
151
+  }
152
+})
153
+function transformStatus() {
154
+  takeshow.value = !takeshow.value
155
+  if (takeshow.value == false) {
156
+    uni.pageScrollTo({
157
+      scrollTop: 0,
158
+    });
159
+  }
160
+}
138
 </script>
161
 </script>
139
 
162
 
140
 <template>
163
 <template>
141
-
142
-
143
   <div>
164
   <div>
144
 
165
 
145
-    <div
146
-        v-if="state.orderDetail"
147
-        class="flex flex-col text-[12px] p-3 ">
166
+    <div v-if="state.orderDetail" class="flex flex-col text-[12px] p-3 ">
148
       <div class=" rounded-lg bg-white p-3 flex flex-col gap-4">
167
       <div class=" rounded-lg bg-white p-3 flex flex-col gap-4">
149
         <div>
168
         <div>
150
-          <div class="text-gray-400">物流公司:{{ state.orderDetail.delivery_name }}</div>
151
           <div class="flex justify-between items-center ">
169
           <div class="flex justify-between items-center ">
152
-            <div class="flex">
153
-              快递单号:{{ state.orderDetail.delivery_id }}
170
+            <div class="flex" style="line-height: 38rpx;">
171
+              <image style="width: 38rpx;height: 38rpx; margin-right: 17rpx;" src="../../static/icon/快递.png"></image>
172
+              {{ state.orderDetail.delivery_name }} {{ state.orderDetail.delivery_id }}
154
             </div>
173
             </div>
155
             <div class="flex gap-2 items-center">
174
             <div class="flex gap-2 items-center">
156
-              <div
157
-                  @click="handleClipboard"
158
-                  class="flex items-center border border-solid border-gray-200 text-[12px] rounded min-w-6 text-center  max-w-fit px-2 bg-white"
159
-              >
175
+              <div @click="handleClipboard"
176
+                class="flex items-center border border-solid border-gray-200 text-[12px] rounded min-w-6 text-center  max-w-fit px-2 bg-white">
160
                 复制
177
                 复制
161
               </div>
178
               </div>
162
-              <div
163
-                  @tap="handleMakePhoneCall"
164
-                  class="flex items-center border border-solid border-gray-200 text-[12px] rounded min-w-6 text-center  max-w-fit px-2 bg-white"
165
-              >
179
+              <div @tap="handleMakePhoneCall"
180
+                class="flex items-center border border-solid border-gray-200 text-[12px] rounded min-w-6 text-center  max-w-fit px-2 bg-white">
166
                 电话
181
                 电话
167
               </div>
182
               </div>
168
               <!--          <nut-button size="mini" type="default">复制</nut-button>-->
183
               <!--          <nut-button size="mini" type="default">复制</nut-button>-->
@@ -173,11 +188,43 @@ function handleMakePhoneCall() {
173
 
188
 
174
         <div class="flex items-center gap-2 ">
189
         <div class="flex items-center gap-2 ">
175
           <div class="rounded-full w-4 h-4 bg-gray-400 text-white flex flex-col justify-center items-center">收</div>
190
           <div class="rounded-full w-4 h-4 bg-gray-400 text-white flex flex-col justify-center items-center">收</div>
176
-          <div class="text-gray-400">{{ state.orderDetail.user_address + ' ' + state.orderDetail.real_name + ' ' + encodePhone(state.orderDetail.user_phone)}}</div>
191
+          <div class="text-gray-400">{{ state.orderDetail.user_address + ' ' + state.orderDetail.real_name + ' ' +
192
+            encodePhone(state.orderDetail.user_phone) }}</div>
177
         </div>
193
         </div>
178
 
194
 
179
         <!-- 物流动态 -->
195
         <!-- 物流动态 -->
180
-        <div class="logis-detail" v-if="state.express && state.express.length > 0">
196
+        <div class="text_div mb-2 w-full " style="color: #333333;" v-if="state.express.length > 0">
197
+          <nut-steps v-if="takeshow == true" :current="1" progress-dot direction="vertical">
198
+            <nut-step v-for="(item, index) in state.express" :key="index" style="width: 578rpx;" :title="item?.status"
199
+              :content="item.time">
200
+              <template #title>
201
+                <div :style="{ color: index === 0 ? '#333' : '#999' }" class="mt-2 custom-title">{{ item?.status }}
202
+                </div>
203
+              </template>
204
+              <template #content>
205
+                <div class="custom-content">{{ item.time }}</div>
206
+              </template>
207
+            </nut-step>
208
+          </nut-steps>
209
+          <nut-steps v-if="takeshow == false" :current="1" progress-dot direction="vertical">
210
+            <nut-step style="width: 578rpx;" :title="state.express[0].status" :content="state.express[0].time">
211
+              <template #title>
212
+                <div :style="{ color: '#333' }" class="mt-2 custom-title">{{ state.express[0].status }}</div>
213
+              </template>
214
+              <template #content>
215
+                <div class="custom-content">{{ state.express[0].time }}</div>
216
+              </template>
217
+            </nut-step>
218
+          </nut-steps>
219
+        </div>
220
+        <div class="flex w-full" @click="transformStatus"
221
+          style="height:36rpx;  justify-content: center; align-items: center; ">
222
+          <div class="text_dew">{{ statustext }}</div>
223
+          <div style="width: 36rpx; height: 36rpx; ">
224
+            <image style="width: 36rpx; height: 36rpx;" :src="statusimg"></image>
225
+          </div>
226
+        </div>
227
+        <!-- <div class="logis-detail" v-if="state.express && state.express.length > 0">
181
           <div class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in state.express" :key="index">
228
           <div class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in state.express" :key="index">
182
             <div class="logis-item-content">
229
             <div class="logis-item-content">
183
               <div class="logis-item-content__describe">
230
               <div class="logis-item-content__describe">
@@ -188,7 +235,7 @@ function handleMakePhoneCall() {
188
               </div>
235
               </div>
189
             </div>
236
             </div>
190
           </div>
237
           </div>
191
-        </div>
238
+        </div> -->
192
       </div>
239
       </div>
193
     </div>
240
     </div>
194
     <!-- 商品推荐 -->
241
     <!-- 商品推荐 -->
@@ -202,17 +249,13 @@ function handleMakePhoneCall() {
202
       </div>
249
       </div>
203
       <div class="pb-3 px-3 pb-safe" v-if="state.list">
250
       <div class="pb-3 px-3 pb-safe" v-if="state.list">
204
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
251
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
205
-          <div v-for="(item, index) in state.list"
206
-               :key="index"
207
-               @click="handleProductItemClick(item)"
208
-          >
209
-            <MerchantProductCard :item="item"/>
252
+          <div v-for="(item, index) in state.list" :key="index" @click="handleProductItemClick(item)">
253
+            <MerchantProductCard :item="item" />
210
 
254
 
211
           </div>
255
           </div>
212
         </grid-view>
256
         </grid-view>
213
 
257
 
214
-        <div class=" flex justify-center items-center text-[12px] text-gray-500"
215
-        >
258
+        <div class=" flex justify-center items-center text-[12px] text-gray-500">
216
           <div v-if="state.status === 'loading'">
259
           <div v-if="state.status === 'loading'">
217
             加载中...
260
             加载中...
218
           </div>
261
           </div>
@@ -225,17 +268,17 @@ function handleMakePhoneCall() {
225
     </div>
268
     </div>
226
 
269
 
227
   </div>
270
   </div>
228
-
229
 </template>
271
 </template>
230
 <route lang="yaml" >
272
 <route lang="yaml" >
231
 style:
273
 style:
232
-  navigationBarTitleText: 已发货
274
+  navigationBarTitleText: 物流信息
233
 </route>
275
 </route>
234
 
276
 
235
 <style lang="scss">
277
 <style lang="scss">
236
 page {
278
 page {
237
   background: #f8f8f8;
279
   background: #f8f8f8;
238
 }
280
 }
281
+
239
 .nut-tab-pane {
282
 .nut-tab-pane {
240
   background: #f5f5f5 !important;
283
   background: #f5f5f5 !important;
241
 }
284
 }
@@ -300,4 +343,18 @@ page {
300
   }
343
   }
301
 }
344
 }
302
 
345
 
346
+.text_div {
347
+  font-size: 26rpx;
348
+  color: #666;
349
+}
350
+.custom-title {
351
+  // 设置 title 的宽度样式
352
+  text-align: left;
353
+  width: 578rpx; // 你可以根据需要设置宽度值
354
+}
355
+
356
+.custom-content {
357
+  width: 578rpx; // 你可以根据需要设置宽度值
358
+  font-size: 26rpx;
359
+}
303
 </style>
360
 </style>

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

@@ -88,6 +88,8 @@ onUnload(() => {
88
   clearInterval(timer);
88
   clearInterval(timer);
89
   console.log('卸载关闭');
89
   console.log('卸载关闭');
90
 })
90
 })
91
+
92
+
91
 function handlePayment() {
93
 function handlePayment() {
92
   // const {detail: orderItem} = props
94
   // const {detail: orderItem} = props
93
   // const { orderItem } = detail.value
95
   // const { orderItem } = detail.value
@@ -257,7 +259,8 @@ function handleProductItemClick(
257
 
259
 
258
             <div class="flex flex-col justify-center items-center">
260
             <div class="flex flex-col justify-center items-center">
259
               <!--                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
261
               <!--                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
260
-              <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
262
+              <div class="font-bold text-[12px] !text-[#000]"> ¥{{
263
+                parseFloat(orderProduct.product_price).toFixed(2).replace(/\.?0+$/, '') }}</div>
261
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
264
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
262
             </div>
265
             </div>
263
 
266
 

+ 92 - 19
src/pages/order_addcart/index.vue

@@ -1,7 +1,7 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
 import { getRecommendList, getProductDetail } from "~/apis/merchant";
2
 import { getRecommendList, getProductDetail } from "~/apis/merchant";
3
 import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
3
 import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
4
-import { deleteCartItem, getCartCount, getCartList, xcxBanding } from "~/apis/user";
4
+import { deleteCartItem, getCartCount, getCartList, removeCartItem, xcxBanding } from "~/apis/user";
5
 import type { ShoppingResult } from "~/apis/model/shopping.model";
5
 import type { ShoppingResult } from "~/apis/model/shopping.model";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
@@ -16,7 +16,7 @@ import { DcProductModel } from "~/apis/model/dacang.model";
16
 import { createShopping, changeProdoctSku } from "~/apis/order.api";
16
 import { createShopping, changeProdoctSku } from "~/apis/order.api";
17
 import { encodeBase64 } from "~/utils/http/helper";
17
 import { encodeBase64 } from "~/utils/http/helper";
18
 import { CDN_URL } from "~/config/app";
18
 import { CDN_URL } from "~/config/app";
19
-import { uniq } from "lodash-es";
19
+import { uniq, values } from "lodash-es";
20
 import { cartChange } from "~/apis/order.api";
20
 import { cartChange } from "~/apis/order.api";
21
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
21
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
22
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
22
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
@@ -24,7 +24,7 @@ const gouwucheImage = CDN_URL + '/static/assets/gouwuche.png'
24
 const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
24
 const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
25
 const pageStore = usePageStoreWidthOut()
25
 const pageStore = usePageStoreWidthOut()
26
 const userStore = useUserStore()
26
 const userStore = useUserStore()
27
-
27
+const u_id = ref('')
28
 const state = reactive({
28
 const state = reactive({
29
   recommendList: [],
29
   recommendList: [],
30
   currentPage: 1,
30
   currentPage: 1,
@@ -34,9 +34,10 @@ const state = reactive({
34
 
34
 
35
 
35
 
36
   totalCartCount: 0,
36
   totalCartCount: 0,
37
-  totalPrice: '',
37
+  totalPrice: 0,
38
+  totalNum: 0,
38
   selectAllIndeterminate: false,
39
   selectAllIndeterminate: false,
39
-
40
+  product_id:[],
40
   cart_id: [],
41
   cart_id: [],
41
   changeSkuCart_id: '0',
42
   changeSkuCart_id: '0',
42
   isManage: true,
43
   isManage: true,
@@ -117,6 +118,8 @@ function handleCountChange(val) {
117
   // console.log(val)
118
   // console.log(val)
118
   // detail.value.
119
   // detail.value.
119
   // if (val > 0) {
120
   // if (val > 0) {
121
+  console.log(val);
122
+
120
   state.cartNum = val
123
   state.cartNum = val
121
   // }
124
   // }
122
 }
125
 }
@@ -135,28 +138,40 @@ onLoad((options) => {
135
       url: '/pages/user/login/index'
138
       url: '/pages/user/login/index'
136
     })
139
     })
137
   }
140
   }
141
+
138
   uni.$on('cart-reload', () => {
142
   uni.$on('cart-reload', () => {
139
     // console.log('新商品添加...')
143
     // console.log('新商品添加...')
140
     state.recommendList = []
144
     state.recommendList = []
141
     state.cart_id = []
145
     state.cart_id = []
142
     loadCartList()
146
     loadCartList()
143
   })
147
   })
144
-
148
+  u_id.value = userStore.uid
145
   state.cart_id = []
149
   state.cart_id = []
146
   loadCartList()
150
   loadCartList()
147
 })
151
 })
148
 onShow(() => {
152
 onShow(() => {
149
-  // pageStore.setPageConfig({
150
-  //   orderBack: {
151
-  //     type: 'tab',
152
-  //     url:  '/pages/order_addcart/index'
153
-  //   }
154
-  // })
153
+
154
+  if (!userStore.uid) {
155
+    pageStore.setPageConfig({
156
+      orderBack: {
157
+        type: 'tab',
158
+        url: '/pages/order_addcart/index'
159
+      }
160
+    })
161
+    return uni.redirectTo({
162
+      url: '/pages/user/login/index'
163
+    })
164
+  }
155
   if (!state.isManage) {
165
   if (!state.isManage) {
156
     state.isManage = true
166
     state.isManage = true
157
   }
167
   }
168
+
169
+  if (u_id.value != userStore.uid) {
170
+    u_id.value = userStore.uid
171
+    loadCartList()
172
+
173
+  }
158
   loadCartCount()
174
   loadCartCount()
159
-  loadCartList()
160
   loadList('reload')
175
   loadList('reload')
161
 })
176
 })
162
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
177
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
@@ -369,7 +384,7 @@ function cartAllCheck(type: 'single' | 'all') {
369
   })
384
   })
370
 
385
 
371
   isAllSelect.value = allArr.length === shopping.value?.list.length
386
   isAllSelect.value = allArr.length === shopping.value?.list.length
372
-  // state.totalCartCount = totalNum
387
+  state.totalNum = totalNum
373
   state.totalPrice = totalMoney
388
   state.totalPrice = totalMoney
374
 }
389
 }
375
 
390
 
@@ -395,6 +410,8 @@ function reTotal() {
395
   // state.totalCartCount = totalNum
410
   // state.totalCartCount = totalNum
396
   loadCartCount()
411
   loadCartCount()
397
   state.totalPrice = totalMoney
412
   state.totalPrice = totalMoney
413
+  state.totalNum = totalNum
414
+
398
 }
415
 }
399
 function handleSelectAll(checked: boolean) {
416
 function handleSelectAll(checked: boolean) {
400
 
417
 
@@ -428,6 +445,9 @@ function loadCartCount() {
428
 function handleManageCart() {
445
 function handleManageCart() {
429
   state.isManage = !state.isManage
446
   state.isManage = !state.isManage
430
 }
447
 }
448
+// function handleromoveCollect() {
449
+//   state.isManage = !state.isManage
450
+// }
431
 
451
 
432
 function handleSubmit() {
452
 function handleSubmit() {
433
   // console.log(state.isManage)
453
   // console.log(state.isManage)
@@ -439,6 +459,12 @@ function handleSubmit() {
439
 
459
 
440
     // console.log(state.cart_id)
460
     // console.log(state.cart_id)
441
     if (state.cart_id && state.cart_id.length > 0) {
461
     if (state.cart_id && state.cart_id.length > 0) {
462
+      pageStore.setPageConfig({
463
+        orderBack: {
464
+          type: 'tab',
465
+          url: '/pages/order_addcart/index'
466
+        }
467
+      })
442
       uni.navigateTo({
468
       uni.navigateTo({
443
         url: `/pages/order-confirm/index?cartId=${state.cart_id.join(',')}`
469
         url: `/pages/order-confirm/index?cartId=${state.cart_id.join(',')}`
444
       })
470
       })
@@ -491,6 +517,51 @@ function handleDelete() {
491
     })
517
     })
492
   }
518
   }
493
 }
519
 }
520
+//收藏功能
521
+function handleromoveCollect() {
522
+  // const cart_id = <any>[]
523
+  shopping.value?.list.forEach(shopItem => {
524
+    shopItem.list.forEach(goodItem => {
525
+      if (goodItem.check) {
526
+        state.product_id.push(goodItem.product_id)
527
+      }
528
+    })
529
+  })
530
+  state.product_id = uniq(state.product_id)
531
+
532
+  // console.log(cart_id)
533
+  if (state.cart_id.length === 0) {
534
+    return uni.showToast({
535
+      title: '请选择产品',
536
+      icon: "none"
537
+    })
538
+  } else {
539
+    uni.showModal({
540
+      title: '温馨提示',
541
+      content: '确认将宝贝移入收藏吗?',
542
+      success: (res) => {
543
+        if (res.confirm) {
544
+          console.log(state.product_id);
545
+          removeCartItem(state.product_id).then(res=>{
546
+            console.log(res);
547
+            uni.showToast({
548
+              title: '收藏成功'
549
+            })
550
+            state.isManage = true
551
+            state.product_id = []
552
+            state.totalPrice = ''
553
+            loadCartList()
554
+          }).catch(error=>{
555
+            console.log('error>>>',error);
556
+            
557
+          })
558
+
559
+        } else if (res.cancel) {
560
+        }
561
+      }
562
+    })
563
+  }
564
+}
494
 
565
 
495
 
566
 
496
 function handleProductItemClick(
567
 function handleProductItemClick(
@@ -649,7 +720,7 @@ onUnload(() => {
649
               </div>
720
               </div>
650
               <div class="flex  justify-between ">
721
               <div class="flex  justify-between ">
651
                 <!-- <FPrice :price="goodItem.productAttr.price" ex-class="font-bold text-dark" /> -->
722
                 <!-- <FPrice :price="goodItem.productAttr.price" ex-class="font-bold text-dark" /> -->
652
-                <div class="font-bold text-dark" >¥{{ goodItem.productAttr.price }}</div>
723
+                <div class="font-bold text-dark">¥{{ goodItem.productAttr.price }}</div>
653
                 <nut-input-number v-model="goodItem.cart_num" @change="(num) => handleNumberChange(num, goodItem)" />
724
                 <nut-input-number v-model="goodItem.cart_num" @change="(num) => handleNumberChange(num, goodItem)" />
654
               </div>
725
               </div>
655
             </div>
726
             </div>
@@ -695,15 +766,17 @@ onUnload(() => {
695
       <div class="flex justify-center items-center gap-2 pl-3" @tap.stop="handleSelectAll">
766
       <div class="flex justify-center items-center gap-2 pl-3" @tap.stop="handleSelectAll">
696
         <nut-checkbox v-model="isAllSelect" label="全选" class="!text-primary">全选
767
         <nut-checkbox v-model="isAllSelect" label="全选" class="!text-primary">全选
697
         </nut-checkbox>
768
         </nut-checkbox>
698
-        <div class="text-xs text-gray">共 {{ state.totalCartCount }} 件</div>
769
+        <!-- <div class="text-xs text-gray">共 {{ state.totalCartCount }} 件</div> -->
699
       </div>
770
       </div>
700
 
771
 
701
       <div class="flex justify-center items-center gap-2 pr-3">
772
       <div class="flex justify-center items-center gap-2 pr-3">
702
         <div class="flex text-[12px]" v-if="state.isManage">
773
         <div class="flex text-[12px]" v-if="state.isManage">
703
-          合计:
704
-          <FPrice :price="state.totalPrice"></FPrice>
705
-          <!--          {{totalCartInfo.totalPrice}}-->
774
+          <span v-if="state.totalNum != 0 &&state.isManage">已选{{ state.totalNum }}件,</span>合计:<FPrice :price="state.totalPrice"></FPrice>
706
         </div>
775
         </div>
776
+        <FButton v-if="!state.isManage" @click="handleromoveCollect" size="small"
777
+          :exClass="['rounded-full', '!text-[14px]', 'text-black', 'bg-write', 'w-full']">
778
+          移入收藏
779
+        </FButton>
707
         <FButton @click="handleSubmit" size="small"
780
         <FButton @click="handleSubmit" size="small"
708
           :exClass="['rounded-full', '!text-[14px]', 'text-white', 'bg-primary', 'w-full']">
781
           :exClass="['rounded-full', '!text-[14px]', 'text-white', 'bg-primary', 'w-full']">
709
           {{ state.isManage ? '去结算' : '删除' }}
782
           {{ state.isManage ? '去结算' : '删除' }}

+ 2 - 0
src/pages/payment/index.vue

@@ -140,6 +140,8 @@ function onClickLeft() {
140
         // if (usePageStore.orderBack) {
140
         // if (usePageStore.orderBack) {
141
         //   url += `&from=${usePageStore.orderBack}`
141
         //   url += `&from=${usePageStore.orderBack}`
142
         // }
142
         // }
143
+        console.log(state.tabIndex);
144
+        
143
         if (state.tabIndex) {
145
         if (state.tabIndex) {
144
           pageStore.setPageConfig({
146
           pageStore.setPageConfig({
145
             orderBack: {
147
             orderBack: {

+ 1 - 1
src/pages/product/integral.vue

@@ -111,7 +111,7 @@ function handleItemClick(item) {
111
                     {{ item.store_name }}
111
                     {{ item.store_name }}
112
                   </div>
112
                   </div>
113
                   <div class="text-[#fe0032] flex items-end gap-2">
113
                   <div class="text-[#fe0032] flex items-end gap-2">
114
-                    <div class="text-[20px]">{{ Number(item.price * 30).toFixed(2) }}</div>
114
+                    <div class="text-[20px]">{{ Number(item.price * 30)}}</div>
115
                     <div class="text-xs">积分</div>
115
                     <div class="text-xs">积分</div>
116
                   </div>
116
                   </div>
117
                 </div>
117
                 </div>

+ 269 - 128
src/pages/red-integral/index.vue

@@ -1,138 +1,55 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {useUserStore} from "~/stores/userStore";
3
-import {encodePhone} from "../../utils";
2
+import { useUserStore } from "~/stores/userStore";
3
+import { CDM_URL,CDN_URL } from "~/config/app";
4
+import { encodePhone } from "../../utils";
4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
-import {getRedIntegralList} from "~/apis/user";
6
+import { getRedIntegralList, getBillIntegralList } from "~/apis/user";
6
 import dayjs from "dayjs";
7
 import dayjs from "dayjs";
7
-
8
+//https://cdn.bjtdba.com/vod/image/2023-12-11/20231211164924523.png
9
+//https://cdn.bjtdba.com/chuxubao/static/assets/search_zanwuxiangguan_220617.png
8
 const userStore = useUserStore();
10
 const userStore = useUserStore();
9
 const data = ref([])
11
 const data = ref([])
10
-
12
+//css颜色
13
+const activeTab = ref('bonus')
14
+const hjfImg = CDM_URL + '/image/2023-12-11/20231211164924523.png'
15
+const undataImg = CDN_URL + '/static/assets/search_zanwuxiangguan_220617.png'
11
 onLoad((options) => {
16
 onLoad((options) => {
12
   userStore.getUserInfo()
17
   userStore.getUserInfo()
13
-  getRedIntegralList({page: 1, limit: 20}).then(res => {
18
+  let params = {
19
+    page: 1,
20
+    limit: 20,
21
+    is_red: true
22
+  }
23
+  getBillIntegralList(params).then(res => {
14
     console.log(res)
24
     console.log(res)
15
-    if (res && res.length > 0) {
16
-      for (let item of res) {
17
-        // data.value = res
18
-        console.log(item.red)
19
-        data.value.push({
20
-          red: item.red,
21
-          mark: item.mark,
22
-          time: dayjs.unix(item.time).format('YYYY-MM-DD')
23
-        })
24
-      }
25
-    }
25
+    data.value = res.list
26
   })
26
   })
27
 })
27
 })
28
-// const userType = computed(() => {
29
-//   const userRichType = userStore.userInfo.user_rich_type
30
-//   // 创始人
31
-//   if (userRichType === 3) {
32
-//     return '创始人'
33
-//   }
34
-//   // 普通用户
35
-//   if (userRichType === 0) {
36
-//     return '用户'
37
-//   }
38
-//   // 会员
39
-//   if (userRichType === 1) {
40
-//     return '会员'
41
-//   }
42
-//   // 合伙人
43
-//   if (userRichType === 2) {
44
-//     return '合伙人'
45
-//   }
46
-//   if (!userRichType) {
47
-//     return '用户'
48
-//   }
49
-//
50
-//
51
-// })
52
-const userType = computed(() => {
53
-  const userRichType = userStore.userInfo?.user_rich_type
54
-  console.log(userStore.userInfo)
55
-  const bangfu = userStore.userInfo.is_bangfu ? '帮扶中心 ' : ''
56
-  // 创始人
57
-  if (userRichType == 3) {
58
-    if (bangfu) {
59
-      return ['创始人', bangfu]
60
-    }
61
-    return ['创始人']
62
-    // return [].push()
63
-  }
64
-  // 普通用户
65
-  if (userRichType == 0) {
66
-    if (bangfu) {
67
-      return ['用户', bangfu]
68
-    }
69
-    return ['用户']
70
-  }
71
-  // 会员
72
-  if (userRichType == 1) {
73
-    if (bangfu) {
74
-      return ['会员', bangfu]
75
-    }
76
-    return ['会员']
77
 
28
 
78
-  }
79
-  if (userRichType == 3) {
80
-    if (bangfu) {
81
-      return ['创始人', bangfu]
82
-    }
83
-    return ['创始人']
84
-  }
85
-  // 合伙人
86
-  if (userRichType == 4) {
87
-    // return '高级会员'
88
-    if (bangfu) {
89
-      return ['VIP', bangfu]
90
-    }
91
-    return ['VIP']
92
-  }
93
-  if (userRichType == 5) {
94
-    if (bangfu) {
95
-      return ['初始级合伙人', bangfu]
29
+function changeTab(tab: any) {
30
+  activeTab.value = tab;
31
+  data.value = []
32
+  if (activeTab.value == 'bonus') {
33
+    let params = {
34
+      page: 1,
35
+      limit: 20,
36
+      is_red: true
96
     }
37
     }
97
-    return ['初始级合伙人']
38
+    getBillIntegralList(params).then(res => {
39
+      console.log(res)
40
+      data.value = res.list
41
+    })
42
+  } else if (activeTab.value == 'points') {
43
+    getRedIntegralList({ page: 1, limit: 20 }).then(res => {
44
+      console.log(res)
45
+      data.value = res
46
+    })
98
   }
47
   }
99
-  if (userRichType == 6) {
100
-    if (bangfu) {
101
-      return ['中级合伙人', bangfu]
102
-    }
103
-    return ['中级合伙人']
104
-  }
105
-  if (userRichType == 7) {
106
-    if (bangfu) {
107
-      return ['高级合伙人', bangfu]
108
-    }
109
-    return ['高级合伙人']
110
-  }
111
-  if (!userRichType) {
112
-    if (bangfu) {
113
-      return ['用户', bangfu]
114
-    }
115
-    return ['用户']
116
-  }
117
-})
118
-
119
-const state = reactive({
120
-  striped: false,
121
-  columns: [{
122
-    title: '消耗积分数',
123
-    key: 'red'
124
-  }, {
125
-    title: '说明',
126
-    key: 'mark'
127
-  }, {
128
-    title: '时间',
129
-    key: 'time'
130
-  }]
131
-})
48
+}
132
 
49
 
133
 function handleToVipPage() {
50
 function handleToVipPage() {
134
   uni.navigateTo({
51
   uni.navigateTo({
135
-    url: '/pages/vip/index'
52
+    url: '/pages/vip/index?type=user'
136
   })
53
   })
137
 }
54
 }
138
 
55
 
@@ -144,7 +61,7 @@ function handleImmediateWithdrawal() {
144
 </script>
61
 </script>
145
 
62
 
146
 <template>
63
 <template>
147
-  <CXBBasePage>
64
+  <!-- <CXBBasePage>
148
     <div class="bg-[#FD1642] h-25 w-full absolute top-0 left-0"></div>
65
     <div class="bg-[#FD1642] h-25 w-full absolute top-0 left-0"></div>
149
 
66
 
150
     <div class="flex flex-col gap-4 relative px-3">
67
     <div class="flex flex-col gap-4 relative px-3">
@@ -166,9 +83,6 @@ function handleImmediateWithdrawal() {
166
                   <div class="text-sm" v-if="userStore.userInfo">
83
                   <div class="text-sm" v-if="userStore.userInfo">
167
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
84
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
168
                   </div>
85
                   </div>
169
-<!--                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-fit h-5 justify-center items-center px-2">-->
170
-<!--                    {{userType}}-->
171
-<!--                  </div>-->
172
                   <div class="flex gap-1 items-center px-1">
86
                   <div class="flex gap-1 items-center px-1">
173
                     <div
87
                     <div
174
                         v-for="(item, index) in userType"
88
                         v-for="(item, index) in userType"
@@ -221,17 +135,244 @@ function handleImmediateWithdrawal() {
221
       </div>
135
       </div>
222
 
136
 
223
     </div>
137
     </div>
224
-    </CXBBasePage>
138
+    </CXBBasePage> -->
139
+
140
+  <div class="card_d" :style="{ background: 'url(' + hjfImg + ')', backgroundSize: 'cover' }">
141
+    <div class="flex p_gps flex-col justify-center ">
142
+      <div class="text_jjye">奖金余额</div>
143
+      <div class="jj_num">{{ userStore.userInfo.member_brokerage_price }}</div>
144
+    </div>
145
+    <div @click="handleImmediateWithdrawal" class="flex p_tx justify-center">
146
+      <div class="text_tx">提现</div>
147
+    </div>
148
+    <div class="flex p_hjf flex-col justify-center ">
149
+      <div class="text_hjf">红积分</div>
150
+      <div class="hjf_num">{{ userStore.userInfo.red }}</div>
151
+    </div>
152
+    <div @click="handleToVipPage" class="flex p_add justify-center">
153
+      <div class="text_add">复购增加红积分</div>
154
+    </div>
155
+  </div>
156
+  <div class="px-3">
157
+
158
+    <div>
159
+      <div class="flex justify-around  flex-1  items-center" style="padding-top: 10rpx; padding-bottom: 10rpx">
160
+        <div class="text_jl" :class="{ 'selected': activeTab === 'bonus' }" @click="changeTab('bonus')">会员奖金记录</div>
161
+        <div class="text_jl" :class="{ 'selected': activeTab === 'points' }" @click="changeTab('points')">红积分记录</div>
162
+      </div>
163
+      <!-- 会员奖金记录 -->
164
+      <div class="px-4" style="border-radius: 16rpx; background-color: #ffffff;"
165
+        v-if="activeTab === 'bonus' && data.length > 0">
166
+        <div class="flex justify-between flex-1 py-4 " style=" border-bottom: 1rpx solid #f0f0f0;"
167
+          v-for="(item, index) in data" :key="index">
168
+          <div>
169
+            <div class="text_mark" style="margin-bottom: 12rpx;">{{ item.mark }}</div>
170
+            <div class="text_c_time">{{ item.create_time }}</div>
171
+          </div>
172
+          <div class="text_price" :class="{ 'add_price': item.pm == '1' }">
173
+            {{ item.pm == 1 ? '+' : '-' }}{{ item.number }}
174
+          </div>
175
+        </div>
176
+      </div>
177
+      <div v-if="activeTab === 'bonus' && data.length <= 0" class=" flex flex-1 justify-center items-center ">
178
+        <div>
179
+          <div style="width: 206rpx; height:206rpx; margin-top: 206rpx;  margin-bottom: 60rpx;">
180
+            <image :src="undataImg" style="width: 100%; height: 100%;"></image>
181
+          </div>
182
+          <div class="none_data">暂无相关数据</div>
183
+        </div>
184
+
185
+
186
+      </div>
187
+
188
+      <!-- 红积分记录 -->
189
+      <div class="px-4" style="border-radius: 16rpx; background-color: #ffffff;"
190
+        v-if="activeTab === 'points' && data.length > 0">
191
+
192
+        <div class="flex justify-between flex-1 py-4 " style=" border-bottom: 1rpx solid #f0f0f0;"
193
+          v-for="(item, index) in data" :key="index">
194
+          <div>
195
+            <div class="text_mark" style="margin-bottom: 12rpx;">{{ item.mark }}</div>
196
+            <div class="text_c_time">{{ item.create_time }}</div>
197
+          </div>
198
+          <div class="text_price" :class="{ 'add_price': item.pm == '1' }">
199
+            {{ item.pm == 1 ? '+' : '-' }}{{ item.red }}
200
+          </div>
201
+        </div>
202
+      </div>
203
+      <div v-if="activeTab === 'points' && data.length <= 0" class=" flex flex-1 justify-center items-center ">
204
+        <div>
205
+          <div style="width: 206rpx; height:206rpx; margin-top: 206rpx;  margin-bottom: 60rpx;">
206
+            <image :src="undataImg" style="width: 100%; height: 100%;"></image>
207
+          </div>
208
+          <div class="none_data">暂无相关数据</div>
209
+        </div>
210
+      </div>
211
+    </div>
212
+  </div>
225
 </template>
213
 </template>
226
 <route lang="yaml">
214
 <route lang="yaml">
227
 style:
215
 style:
228
-  navigationBarTitleText: ""
216
+  navigationBarTitleText: 红积分提现
229
   enablePullDownRefresh: false
217
   enablePullDownRefresh: false
230
-  navigationBarBackgroundColor: "#fe0032"
231
-  navigationBarTextStyle: "white"
232
 </route>
218
 </route>
233
 <style>
219
 <style>
234
 page {
220
 page {
235
-  --nut-table-border-color: none
221
+  background-color: #f8f8f8;
222
+}
223
+
224
+.card_d {
225
+  width: 750rpx;
226
+  height: 366rpx;
227
+}
228
+
229
+.p_gps {
230
+  position: absolute;
231
+  top: 66rpx;
232
+  left: 68rpx;
233
+}
234
+
235
+.p_hjf {
236
+  position: absolute;
237
+  top: 214rpx;
238
+  left: 68rpx;
239
+}
240
+
241
+.text_jjye {
242
+  height: 26rpx;
243
+  font-size: 26rpx;
244
+  font-family: PingFangSC, PingFang SC;
245
+  font-weight: 400;
246
+  color: #FFFFFF;
247
+  line-height: 26rpx;
248
+}
249
+
250
+.text_hjf {
251
+  width: 78rpx;
252
+  height: 26rpx;
253
+  font-size: 26rpx;
254
+  font-family: PingFangSC, PingFang SC;
255
+  font-weight: 400;
256
+  color: #FFFFFF;
257
+  line-height: 26rpx;
258
+}
259
+
260
+.jj_num {
261
+  height: 75rpx;
262
+  font-size: 54rpx;
263
+  font-family: PingFangSC, PingFang SC;
264
+  font-weight: 500;
265
+  color: #FFFFFF;
266
+  line-height: 75rpx;
267
+}
268
+
269
+.hjf_num {
270
+  width: 89rpx;
271
+  height: 42rpx;
272
+  font-size: 30rpx;
273
+  font-family: PingFangSC, PingFang SC;
274
+  font-weight: 500;
275
+  color: #FFFFFF;
276
+  line-height: 42rpx;
277
+}
278
+
279
+
280
+.p_tx {
281
+  position: absolute;
282
+  top: 88rpx;
283
+  right: 80rpx;
284
+  width: 141rpx;
285
+  height: 63rpx;
286
+  background: linear-gradient(90deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.29) 100%);
287
+  border-radius: 32rpx;
288
+  text-align: center;
289
+}
290
+
291
+.p_add {
292
+  position: absolute;
293
+  top: 225rpx;
294
+  right: 66rpx;
295
+  width: 210rpx;
296
+  height: 47rpx;
297
+  background: linear-gradient(90deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.29) 100%);
298
+  border-radius: 24rpx;
299
+  text-align: center;
300
+}
301
+
302
+.text_tx {
303
+  height: 63rpx;
304
+  font-size: 28rpx;
305
+  font-family: PingFangSC, PingFang SC;
306
+  font-weight: 500;
307
+  color: #FFFFFF;
308
+  line-height: 63rpx;
309
+}
310
+
311
+.text_add {
312
+  width: 168rpx;
313
+  height: 47rpx;
314
+  font-size: 24rpx;
315
+  font-family: PingFangSC, PingFang SC;
316
+  font-weight: 400;
317
+  color: #FFFFFF;
318
+  line-height: 47rpx;
319
+}
320
+
321
+
322
+.text_jl {
323
+  text-align: center;
324
+  height: 50rpx;
325
+  font-size: 30rpx;
326
+  font-family: PingFangSC, PingFang SC;
327
+  font-weight: 500;
328
+  color: #333333;
329
+  line-height: 50rpx;
330
+}
331
+
332
+.selected {
333
+  color: #FE0032;
334
+  border-bottom: 6rpx solid #FE0032;
335
+  ;
336
+}
337
+
338
+.text_mark {
339
+  height: 30rpx;
340
+  font-size: 30rpx;
341
+  font-family: PingFangSC, PingFang SC;
342
+  font-weight: 400;
343
+  color: #333333;
344
+  line-height: 30rpx;
345
+}
346
+
347
+.text_c_time {
348
+  height: 26rpx;
349
+  font-size: 26rpx;
350
+  font-family: PingFangSC, PingFang SC;
351
+  font-weight: 400;
352
+  color: #999999;
353
+  line-height: 26rpx
354
+}
355
+
356
+.text_price {
357
+  height: 30rpx;
358
+  font-size: 30rpx;
359
+  font-family: PingFangSC, PingFang SC;
360
+  font-weight: 400;
361
+  color: #333333;
362
+  line-height: 30rpx;
363
+}
364
+
365
+.add_price {
366
+  color: #FE0032;
367
+}
368
+
369
+.none_data {
370
+  height: 30rpx;
371
+  font-size: 30rpx;
372
+  font-family: PingFangSC, PingFang SC;
373
+  font-weight: 400;
374
+  color: #999999;
375
+  line-height: 30rpx;
376
+  text-align: center;
236
 }
377
 }
237
 </style>
378
 </style>

+ 1 - 1
src/pages/refund/components/RefundReasonPopup.vue

@@ -82,7 +82,7 @@ function handleFinished() {
82
   >
82
   >
83
     <div class="flex flex-col  h-full relative">
83
     <div class="flex flex-col  h-full relative">
84
       <div class="flex p-3 f-hairline-bottom">
84
       <div class="flex p-3 f-hairline-bottom">
85
-        <div class="w-full text-center font-bold">货物状态</div>
85
+        <div class="w-full text-center font-bold">退款原因</div>
86
         <div class="absolute right-3"
86
         <div class="absolute right-3"
87
              @tap.stop="handleClose"
87
              @tap.stop="handleClose"
88
         >
88
         >

+ 672 - 123
src/pages/refund/detail.vue

@@ -1,64 +1,200 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {CDN_URL} from "~/config/app";
3
-import {getRefundDetail} from "~/apis/order.api";
2
+import { CDN_URL } from "~/config/app";
3
+import { getRefundDetail, getRefundWlList } from "~/apis/order.api";
4
 import FPrice from "~/components/FPrice/FPrice.vue";
4
 import FPrice from "~/components/FPrice/FPrice.vue";
5
 
5
 
6
-// const bgImg = CDN_URL + '/static/assets/shouhoudingdanbeijing.png'
7
-const getStatusText = computed(() => {
8
-  // 商家已处理
9
-  // 退款成功, 系统已退款
10
-  const status = state.detail.status
11
-  // const status = -1
12
-  if (status == 0) {
13
-    return ['提交退款申请', '提交退款申请成功,等待处理']
14
-  }
15
-  if (status == -1) {
16
-    return ['退款失败', '请联系商家']
17
-  }
18
-  // 待退货
19
-  if (status == 1) {
20
-    return ['商家处理中', '72小时内商家未处理将自动退款']
21
-  }
22
-  // 待收货
23
-  if (status == 2) {
24
-    return ['商家处理中', '72小时内商家未处理将自动退款']
25
-  }
26
-  // 已退款
27
-  if (status == 3) {
28
-    return ['退款成功', '系统已退款']
29
-
30
-  }
31
-})
32
 const state = reactive({
6
 const state = reactive({
7
+  refund_id: '',
33
   currentStep: 1,
8
   currentStep: 1,
34
   currentStepTitle: '退款申请',
9
   currentStepTitle: '退款申请',
35
-  detail: null
10
+  detail: {}
36
 })
11
 })
12
+// const bgImg = CDN_URL + '/static/assets/shouhoudingdanbeijing.png'
13
+
14
+const isshow = ref(false)
15
+const takeshow = ref(false)
16
+const wldata = ref([])
17
+
37
 // const detail = ref({})
18
 // const detail = ref({})
38
 onLoad((options) => {
19
 onLoad((options) => {
39
-  getRefundDetail(options.id).then(res => {
40
-  // getRefundDetail(657).then(res => {
20
+  if (options && options.id) {
21
+    // refundDetail(options.id)
22
+    // refundWlList(options.id)
23
+    state.refund_id = options.id
24
+  }
25
+})
26
+
27
+function refundDetail(id: any) {
28
+  getRefundDetail(id).then(res => {
29
+    // getRefundDetail(657).then(res => {
41
     console.log(res)
30
     console.log(res)
42
     state.detail = res
31
     state.detail = res
43
     // res.status = -1
32
     // res.status = -1
44
-    if (res.status == 0) {
45
-      state.currentStep = 1
46
-    }
47
-    if (res.status == 1 || res.status == 2) {
48
-      state.currentStep = 2
33
+    //三步骤
34
+    if (res.refund_type == 1) {
35
+      if (res.status == 0) {
36
+        state.currentStep = 1
37
+      }
38
+      if (res.status == 1) {
39
+        state.currentStep = 2
40
+      }
41
+      if (res.status == 3) {
42
+        state.currentStep = 3
43
+      }
49
     }
44
     }
50
-    if (res.status == 3) {
51
-      state.currentStep = 3
45
+    if (res.refund_type == 2) {
46
+      if (res.status == 0) {
47
+        state.currentStep = 1
48
+      }
49
+      if (res.status == 1) {
50
+        state.currentStep = 2
51
+      }
52
+      if (res.status == 2) {
53
+        state.currentStep = 3
54
+      }
55
+      if (res.status == 3) {
56
+        state.currentStep = 4
57
+      }
52
     }
58
     }
53
-    if (res.status == -1) {
54
-      state.currentStep = 2
59
+
60
+
61
+  })
62
+}
63
+function refundWlList(id: any) {
64
+  getRefundWlList(id).then((res) => {
65
+    // getRefundDetail(657).then(res => {
66
+    console.log(res)
67
+    if (res.length > 0) {
68
+      wldata.value = res
69
+    } else {
70
+      wldata.value = [{
71
+        status: '运输中',
72
+        time: state.detail.create_time
73
+      }]
55
     }
74
     }
75
+
76
+
56
   })
77
   })
78
+}
79
+onShow(() => {
80
+  if (state.refund_id) {
81
+    refundDetail(state.refund_id)
82
+    refundWlList(state.refund_id)
83
+
84
+  }
85
+})
86
+const getStatusshow = computed(() => {
87
+  // 商家已处理
88
+  // 退款成功, 系统已退款
89
+  if (state.detail.refund_status) {
90
+    const status = state.detail.refund_status
91
+    // const status = -1
92
+    //待审核
93
+    if (status != 2 || status != 1 || status != 0) {
94
+      return false
95
+    } else {
96
+      return true
97
+    }
98
+  }
99
+
100
+})
101
+
102
+const getshowKd = computed(() => {
103
+  if (state.detail.refund_type == 2) {
104
+    if (state.detail.refund_status) {
105
+      const status = state.detail.refund_status
106
+      // const status = -1
107
+      //待审核
108
+      if (status == 3 || status == 5 || status == 2) {
109
+        return true
110
+      } else {
111
+        return false
112
+      }
113
+    }
114
+  } else if (state.detail.refund_type == 1) {
115
+    return false
116
+  }
117
+
118
+
119
+})
120
+
121
+const getStatusText = computed(() => {
122
+  // 商家已处理
123
+  // 退款成功, 系统已退款
124
+  if (state.detail.refund_status) {
125
+    const status = state.detail.refund_status
126
+    // const status = -1
127
+    //待审核
128
+    if (status == 0) {
129
+      return ['审核中', '售后申请已提交,请耐心等待']
130
+    }
131
+
132
+    // 待退货
133
+    if (status == 1) {
134
+      return ['待退货', '72小时内未寄回,将自动取消申请']
135
+    }
136
+    // 待收货
137
+    if (status == 2) {
138
+      return ['退货中', '商品已寄出,请等待商家处理']
139
+    }
140
+    // 已退款
141
+    if (status == 3 || status == 5) {
142
+      return ['退款成功', '退货服务已完成,如有疑问请联系商家']
143
+
144
+    }
145
+    // 超时
146
+    if (status == 6) {
147
+      return ['超时未发货,申请已取消', '因您超时未发货,申请已自动取消,若有问题请联系商家']
148
+
149
+    }
150
+    //退款失败
151
+    if (status == -1 && state.detail.refund_type == 1) {
152
+      return ['退款失败', '退款失败,请联系商家', '查看失败原因']
153
+    }
154
+    // 审核未通过
155
+    if (status == -1 && state.detail.refund_type == 2) {
156
+      return ['审核未通过', '您的售后申请未通过,若有问题请联系商家', '查看原因']
157
+
158
+    }
159
+  }
160
+
57
 })
161
 })
58
 
162
 
59
 function handleClipboard() {
163
 function handleClipboard() {
60
   uni.setClipboardData({
164
   uni.setClipboardData({
61
-    data: state.detail.refund_order_sn,
165
+    data: state.detail.order.order_sn,
166
+    success(res) {
167
+      // wx.getClipboardData({
168
+      //   success (res) {
169
+      //     console.log(res.data) // data
170
+      //   }
171
+      // })
172
+    }
173
+  })
174
+}
175
+//收件人信息复制
176
+function handleCopy1() {
177
+  let copyData = state.detail.mer_delivery_user + ' ' + state.detail.phone + ' ' + state.detail.mer_delivery_address
178
+  console.log(copyData);
179
+
180
+  uni.setClipboardData({
181
+    data: copyData,
182
+    success(res) {
183
+      // wx.getClipboardData({
184
+      //   success (res) {
185
+      //     console.log(res.data) // data
186
+      //   }
187
+      // })
188
+    }
189
+  })
190
+}
191
+//退货快递信息复制
192
+function handleCopy2() {
193
+  let copyData = state.detail.delivery_id
194
+  console.log(copyData);
195
+
196
+  uni.setClipboardData({
197
+    data: copyData,
62
     success(res) {
198
     success(res) {
63
       // wx.getClipboardData({
199
       // wx.getClipboardData({
64
       //   success (res) {
200
       //   success (res) {
@@ -74,134 +210,419 @@ function handleHeaderClick() {
74
     url: `/pages/store/home/index?id=${state.detail.merchant.mer_id}`
210
     url: `/pages/store/home/index?id=${state.detail.merchant.mer_id}`
75
   })
211
   })
76
 }
212
 }
213
+
214
+
215
+function handleTosCancode() {
216
+  uni.navigateTo({
217
+    url: `/pages/refund/scancode/scancode?refund_order_id=${state.detail.refund_order_id}&&phone=${state.detail.phone}`
218
+  })
219
+}
220
+function handleTophone() {
221
+
222
+  if (state.detail.order.douhuomall == 1) {
223
+    uni.openCustomerServiceChat({
224
+      extInfo: {
225
+        url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db'
226
+      },
227
+      corpId: 'wwaeb55681929a37ae',
228
+      success: (res => {
229
+        console.log(res)
230
+      }),
231
+      fail: (res => {
232
+        console.log(res)
233
+      })
234
+    })
235
+  } else {
236
+    const phone = state.detail.merchant.service_phone
237
+    uni.makePhoneCall({
238
+      phoneNumber: phone, // 替换成实际的电话号码
239
+      success: function () {
240
+        console.log('拨打电话成功');
241
+      },
242
+      fail: function (err) {
243
+        console.log('拨打电话失败', err);
244
+      },
245
+    });
246
+
247
+  }
248
+}
249
+
250
+function toShowValue() {
251
+  isshow.value = true
252
+}
253
+function onCancel() {
254
+  isshow.value = false
255
+}
256
+
257
+function transformStatus() {
258
+  takeshow.value = !takeshow.value
259
+  if (takeshow.value == false) {
260
+    uni.pageScrollTo({
261
+      scrollTop: 0,
262
+    });
263
+  }
264
+}
265
+
266
+
267
+//去协商记录
268
+function toXSlist() {
269
+  uni.navigateTo({
270
+    url: `/pages/refund/scancode/xsjllist?refund_order_id=${state.detail.refund_order_id}`
271
+  })
272
+}
273
+
274
+const statusimg = computed(() => {
275
+  if (takeshow.value == false) {
276
+    return '../../static/icon/展开.png'
277
+  } else {
278
+    return '../../static/icon/收起.png'
279
+  }
280
+})
281
+const statustext = computed(() => {
282
+  if (takeshow.value == false) {
283
+    return '展开'
284
+  } else {
285
+    return '收起'
286
+  }
287
+})
77
 </script>
288
 </script>
78
 <template>
289
 <template>
290
+  <div v-if="getStatusText != undefined">
291
+    <div class="px-3 pt-3 relative h-full"
292
+      v-if="state.detail.refund_status == -1 || state.detail.refund_status == 4 || state.detail.refund_status == 6">
293
+      <div class="bg-white  rounded-lg p-3 flex justify-center items-center ">
294
+        <div class="w-full">
295
+          <div class="items-center">
296
+            <div class="flex items-center font-bold gap-2 text-sm mb-3 w-full">
297
+              <div class="flex-1 flex items-center gap-2 ">
298
+                <div class="line-clamp-1 text_font ">
299
+                  {{ getStatusText[0] }}
300
+                </div>
301
+              </div>
302
+              <div v-if="state.detail.refund_status != 6" class="line_hei " @click="toShowValue">
303
+                <span class="text_lok">{{ getStatusText[2] }}</span>
304
+                <span class="f-text-color-2 i-tabler-chevron-right"></span>
305
+              </div>
79
 
306
 
80
-    <div class=" ">
81
-      <div class="top-bg relative">
82
-        <div class="text-white p-3">
83
-          <div class="text-md">{{ getStatusText[0]}}</div>
84
-          <div class="text-[12px] text-gray-50">{{ getStatusText[1]}}</div>
307
+            </div>
308
+            <div class="text_dis">
309
+              {{ getStatusText[1] }}
310
+            </div>
311
+          </div>
85
         </div>
312
         </div>
313
+      </div>
314
+    </div>
315
+    <div class="top-bg relative" v-else>
316
+      <div class="text-white p-3">
317
+        <div class="text-md">{{ getStatusText[0] }}</div>
318
+        <div class="text-[12px] text-gray-50">{{ getStatusText[1] }}</div>
319
+      </div>
320
+      <div class="p-3">
321
+        <div class="bg-white rounded-lg h-18 flex justify-center items-center w-full ">
322
+          <div class="w-full">
323
+            <nut-steps :current="state.currentStep" progress-dot v-if="state.detail.refund_type == 2">
324
+              <nut-step title="退款申请">
325
+
326
+                <template #title>退款申请</template>
327
+              </nut-step>
328
+              <nut-step title="商家处理">
329
+
330
+                <template #title>商家处理</template>
331
+              </nut-step>
332
+              <nut-step title="商品寄回">
333
+
334
+                <template #title>商品寄回</template>
335
+              </nut-step>
336
+              <nut-step title="退款成功">
86
 
337
 
87
-        <div class="p-3">
88
-          <div class="bg-white rounded-lg h-18 flex justify-center items-center w-full ">
89
-            <div class="w-full">
90
-              <nut-steps :current="state.currentStep" progress-dot  v-if="state.detail.status == -1">
91
-                <nut-step title="退款申请"></nut-step>
92
-                <nut-step title="商家处理"></nut-step>
93
-                <nut-step title="退款失败"></nut-step>
338
+                <template #title>退款成功</template>
339
+              </nut-step>
340
+            </nut-steps>
341
+            <nut-steps :current="state.currentStep" progress-dot v-if="state.detail.refund_type == 1">
342
+              <nut-step title="售后申请">
343
+
344
+                <template #title>售后申请</template>
345
+              </nut-step>
346
+              <nut-step title="商家处理">
347
+                <template #title>商家处理</template>
348
+              </nut-step>
349
+              <nut-step title="退款成功">
350
+
351
+                <template #title>退款成功</template>
352
+              </nut-step>
353
+            </nut-steps>
354
+          </div>
355
+
356
+        </div>
357
+      </div>
358
+    </div>
359
+
360
+    <!-- 退款商品详情 -->
361
+    <div class="p-3 relative h-full" style="padding-bottom:160rpx;">
362
+      <!-- 物流信息 -->
363
+      <div class="bg-white mb-3 rounded-lg p-3 flex justify-center items-center " v-if="getshowKd">
364
+        <div class="w-full">
365
+          <div class="items-center mb-3">
366
+            <div class="flex items-center  gap-2 text-sm w-full">
367
+              <div class="flex-1 flex justify-between items-center gap-2 ">
368
+                <div class="text_box">
369
+                  快递公司
370
+                </div>
371
+                <div class="text_box">
372
+                  {{ state.detail.delivery_type }}
373
+                </div>
374
+              </div>
375
+            </div>
376
+          </div>
377
+          <div class="">
378
+            <div class="justify-between flex-1 flex items-center gap-2 ">
379
+              <div class="text_box">
380
+                快递单号
381
+              </div>
382
+              <div style="color: #999999; font-size: 28rpx; display: flex; " @click="handleCopy2">
383
+                <div>{{ state.detail.delivery_id }}</div>
384
+                <div style="font-size: 26rpx; margin-left: 26rpx; ">复制</div>
385
+              </div>
386
+            </div>
387
+            <div class="justify-between mt-2 flex-1 flex items-center gap-2 ">
388
+              <div style="24rpx" class="rounded-full w-4 h-4 bg-gray-400 text-white flex flex-col justify-center items-center">收</div>
389
+              <div class="text_div flex-1 ">
390
+                {{ state.detail.mer_delivery_address + ' ' + state.detail.mer_delivery_user + ' ' + state.detail.phone }}
391
+              </div>
392
+            </div>
393
+            <div class="text_div mb-2 w-full " style="color: #333333;" v-if="wldata.length > 0">
394
+              <nut-steps v-if="takeshow == true" :current="1" progress-dot direction="vertical">
395
+                <nut-step v-for="(item, index) in wldata" :key="index" style="width: 578rpx;" :title="item?.status"
396
+                  :content="item.time">
397
+                  <template #title>
398
+                    <div :style="{ color: index === 0 ? '#333' : '#999' }" class="mt-2 custom-title">{{ item?.status }}
399
+                    </div>
400
+                  </template>
401
+                  <template #content>
402
+                    <div class="custom-content">{{ item.time }}</div>
403
+                  </template>
404
+                </nut-step>
94
               </nut-steps>
405
               </nut-steps>
95
-              <nut-steps :current="state.currentStep" progress-dot  v-else>
96
-                <nut-step title="退款申请"></nut-step>
97
-                <nut-step title="商家处理"></nut-step>
98
-                <nut-step title="退款成功"></nut-step>
406
+              <nut-steps v-if="takeshow == false" :current="1" progress-dot direction="vertical">
407
+                <nut-step style="width: 578rpx;" :title="wldata[0].status" :content="wldata[0].time">
408
+                  <template #title>
409
+                    <div :style="{ color: '#333' }" class="mt-2 custom-title">{{ wldata[0].status }}</div>
410
+                  </template>
411
+                  <template #content>
412
+                    <div class="custom-content">{{ wldata[0].time }}</div>
413
+                  </template>
414
+                </nut-step>
99
               </nut-steps>
415
               </nut-steps>
100
             </div>
416
             </div>
417
+            <div class="flex w-full" @click="transformStatus"
418
+              style="height:36rpx;  justify-content: center; align-items: center; ">
419
+              <div class="text_dew">{{ statustext }}</div>
420
+              <div style="width: 36rpx; height: 36rpx; ">
421
+                <image style="width: 36rpx; height: 36rpx;" :src="statusimg"></image>
422
+              </div>
423
+            </div>
424
+          </div>
425
+        </div>
426
+      </div>
427
+      <!-- 商家收件信息 -->
428
+      <div class="bg-white mb-3 rounded-lg p-3 flex justify-center items-center " v-if="state.detail.refund_status == 1">
429
+        <div class="w-full">
430
+          <div class="items-center mb-3 pb-3 f-hairline-bottom">
431
+            <div class="flex items-center font-bold gap-2 text-sm w-full">
432
+              <div class="flex-1 flex items-center gap-2 ">
433
+                <div class="text_div">
434
+                  请填写快递单号,请勿邮寄到付
435
+                </div>
436
+              </div>
437
+            </div>
438
+          </div>
439
+          <div class="">
440
+            <div class="justify-between flex-1 flex items-center gap-2 ">
441
+              <div class="line-clamp-1 font-bold text-sm">
442
+                商家收件信息
443
+              </div>
444
+              <div style="color: #333; font-size: 26rpx; display: flex; " @click="handleCopy1">
445
+                <div class="copy_img">
446
+                  <image src="../../static/icon/复制.png"></image>
447
+                </div>
448
+                <div>复制</div>
449
+              </div>
450
+            </div>
451
+            <div class="justify-between mt-2 flex-1 flex items-center gap-2 ">
452
+              <div class="text_div">{{ state.detail.mer_delivery_user }}</div>
453
+              <div class="text_div">{{ state.detail.phone }}</div>
454
+            </div>
455
+            <div class="text_div my-2 ">
456
+              {{ state.detail.mer_delivery_address }}
457
+            </div>
458
+          </div>
459
+        </div>
460
+      </div>
461
+      <!-- 退货需知  -->
462
+      <div class="bg-white mb-3 rounded-lg p-3 flex justify-center items-center " v-if="getStatusshow">
463
+        <div class="w-full">
464
+          <div class="items-center">
465
+            <div class="flex items-center font-bold gap-2 text-sm w-full">
466
+              <div class="flex-1 flex items-center gap-2 ">
467
+                <div class="line-clamp-1">
468
+                  退货需知
469
+                </div>
470
+              </div>
471
+            </div>
472
+            <div class="text_div">
473
+              请确保商品不影响二次销售 (质量问题除外)
474
+            </div>
475
+          </div>
476
+        </div>
101
 
477
 
478
+
479
+      </div>
480
+
481
+      <!-- 协商记录 -->
482
+      <div @click="toXSlist" class="bg-white mb-3 rounded-lg p-3 flex justify-center items-center ">
483
+        <div class="w-full">
484
+          <div class="flex items-center  ">
485
+            <div class="flex items-center font-bold gap-2 text-sm w-full">
486
+              <div class="flex-1 flex items-center gap-2 ">
487
+                <div class="line-clamp-1">
488
+                  协商记录
489
+                </div>
490
+              </div>
491
+              <div class="f-text-color-2 i-tabler-chevron-right"></div>
492
+            </div>
102
           </div>
493
           </div>
103
         </div>
494
         </div>
104
       </div>
495
       </div>
105
 
496
 
106
-      <!-- 退款商品详情 -->
107
-      <div class="p-3 relative h-full">
108
-        <div class="bg-white rounded-lg p-3 flex justify-center items-center ">
109
-          <div class="w-full">
110
-            <div
111
-                @click.stop="handleHeaderClick"
112
-                class="flex items-center f-hairline-bottom pb-3 px-3">
113
-              <div class="flex items-center font-bold gap-2 text-sm w-full">
114
-                <div class="flex-1 flex items-center gap-2 ">
115
-                  <image :src="state.detail.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
116
-                  <div class="line-clamp-1">
117
-                    {{ state.detail.merchant.mer_name }}
118
-                  </div>
497
+      <div class="bg-white rounded-lg p-3 flex justify-center items-center ">
498
+        <div class="w-full">
499
+          <div class="flex items-center f-hairline-bottom  pb-3 px-3">
500
+            <div class="flex items-center font-bold gap-2 text-sm w-full">
501
+              <div class="flex-1 flex items-center gap-2 ">
502
+                <image :src="state.detail.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
503
+                <div class="line-clamp-1">
504
+                  {{ state.detail.merchant.mer_name }}
119
                 </div>
505
                 </div>
506
+              </div>
120
 
507
 
121
-                <div class="f-text-color-2 i-tabler-chevron-right"></div>
508
+              <!-- <div class="f-text-color-2 i-tabler-chevron-right"></div> -->
122
 
509
 
123
-              </div>
124
             </div>
510
             </div>
511
+          </div>
125
 
512
 
126
-            <div>
127
-              <div v-for="(orderProduct, orderProductIndex) in state.detail.refundProduct" :key="orderProductIndex">
128
-                <div class="flex py-2 gap-3 f-hairline-bottom pb-3">
129
-                  <div class="flex-1 flex gap-2">
130
-                    <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
131
-                    <div class="flex flex-col flex-1">
132
-                      <div class="line-clamp-2 text-[12px]">
133
-                        {{ orderProduct.product.cart_info.product.store_name }}
134
-                      </div>
135
-                      <div class="text-gray-500 text-[10px]">
136
-                        {{ orderProduct.product.cart_info.productAttr.sku }}
137
-                      </div>
513
+          <div>
514
+            <div v-for="(orderProduct, orderProductIndex) in state.detail.refundProduct" :key="orderProductIndex">
515
+              <div class="flex py-2 gap-3 f-hairline-bottom pb-3">
516
+                <div class="flex-1 flex gap-2">
517
+                  <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
518
+                  <div class="flex flex-col flex-1">
519
+                    <div class="line-clamp-2 text-[12px]">
520
+                      {{ orderProduct.product.cart_info.product.store_name }}
138
                     </div>
521
                     </div>
139
-                    <div class="justify-end flex">
140
-                      <div class="flex flex-col ">
141
-                        <div class="text-[12px] font-bold">
142
-                          <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black"/>
143
-                        </div>
144
-                        <div class="text-gray-500 text-[11px] text-right">共{{ orderProduct.product.product_num }}件</div>
522
+                    <div class="text-gray-500 text-[10px]">
523
+                      {{ orderProduct.product.cart_info.productAttr.sku }}
524
+                    </div>
525
+                  </div>
526
+                  <div class="justify-end flex">
527
+                    <div class="flex flex-col ">
528
+                      <div class="text-[12px] font-bold">
529
+                        <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black" />
145
                       </div>
530
                       </div>
531
+                      <div class="text-gray-500 text-[11px] text-right">共{{ orderProduct.product.product_num }}件</div>
146
                     </div>
532
                     </div>
147
                   </div>
533
                   </div>
148
                 </div>
534
                 </div>
149
               </div>
535
               </div>
150
             </div>
536
             </div>
537
+          </div>
151
 
538
 
152
-            <div class="pt-3 flex flex-col justify-end text-[14px]">
539
+          <div class="pt-3 flex flex-col justify-end text-[14px]">
153
 
540
 
154
-              <div class="f-hairline-bottom py-3 flex flex-col gap-3">
155
-                <div class="flex justify-between">
156
-                  <div>退款总额</div>
157
-                  <div>
158
-                    <FPrice :price="state.detail.refund_price" :ex-class="['text-gray-400']"></FPrice>
159
-                  </div>
160
-                </div>
161
-                <div class="flex justify-between">
162
-                  <div>申请件数</div>
163
-                  <div class="text-gray-400">{{ state.detail.refund_num }}</div>
164
-                </div>
165
-                <div class="flex justify-between">
166
-                  <div>收货状态</div>
167
-                  <div class="text-gray-400">{{ state.detail.take_status }}</div>
541
+            <div class="f-hairline-bottom py-3 flex flex-col gap-3">
542
+              <div class="flex justify-between">
543
+                <div>退款金额</div>
544
+                <div>
545
+                  <FPrice :price="state.detail.refund_price" :ex-class="['text-gray-400']"></FPrice>
168
                 </div>
546
                 </div>
169
               </div>
547
               </div>
548
+              <!-- <div class="flex justify-between">
549
+                <div>申请件数</div>
550
+                <div class="text-gray-400">{{ state.detail.refund_num }}</div>
551
+              </div> -->
552
+              <div class="flex justify-between">
553
+                <div>退货原因</div>
554
+                <div class="text-gray-400">{{ state.detail.refund_message }}</div>
555
+              </div>
556
+            </div>
170
 
557
 
171
-              <div class="py-3 flex flex-col gap-3">
172
-                <div class="flex justify-between">
173
-                  <div>订单编号</div>
174
-                  <div class="flex gap-2">
175
-                    <div class="text-gray-400">{{ state.detail.refund_order_sn }}</div>
176
-                   <div @click="handleClipboard">复制</div>
177
-                  </div>
178
-                </div>
179
-                <div class="flex justify-between">
180
-                  <div>申请时间</div>
181
-                  <div class="text-gray-400">{{ state.detail.create_time }}</div>
182
-                </div>
183
-                <div class="flex justify-between">
184
-                  <div>备注说明</div>
185
-                  <div class="text-gray-400">{{ state.detail.mark ? state.detail.mark : '暂无说明' }}</div>
558
+            <div class="py-3 flex flex-col gap-3">
559
+              <div class="flex justify-between">
560
+                <div>订单编号</div>
561
+                <div class="flex gap-2">
562
+                  <div class="text-gray-400">{{ state.detail.order.order_sn }}</div>
563
+                  <div @click="handleClipboard">复制</div>
186
                 </div>
564
                 </div>
187
-
188
               </div>
565
               </div>
566
+              <div class="flex justify-between">
567
+                <div>申请时间</div>
568
+                <div class="text-gray-400">{{ state.detail.create_time }}</div>
569
+              </div>
570
+              <!-- <div class="flex justify-between">
571
+                <div>备注说明</div>
572
+                <div class="text-gray-400">{{ state.detail.mark ? state.detail.mark : '暂无说明' }}</div>
573
+              </div> -->
189
 
574
 
190
             </div>
575
             </div>
191
 
576
 
192
           </div>
577
           </div>
193
 
578
 
194
-
195
         </div>
579
         </div>
196
 
580
 
581
+
197
       </div>
582
       </div>
583
+    </div>
584
+    <!-- 查看失效原因 -->
585
+    <FPopup v-model:show="isshow" position="bottom"
586
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe min-h-[70%] max-h-[80%] h-full">
587
+      <div class="section_1">
588
+        <div class="flex_mar">
589
+          <div class="text_span1">{{ getStatusText[0] }}原因</div>
590
+        </div>
591
+      </div>
592
+      <div class="img_box" @click="onCancel">
593
+        <image class="label_img" src="../../static/icon/close.png" />
594
+      </div>
595
+      <div class="text1_2 px-4 ">
596
+        {{ state.detail.fail_message }}
597
+      </div>
598
+    </FPopup>
599
+  </div>
600
+  <!-- 待退货,跳转退货快递单号页面 -->
601
+  <div class="flexd_div  " v-if="state.detail.refund_status == 1">
602
+    <div class="flexd_box">
603
+      <button @click="handleTosCancode" style="width: 686rpx;
604
+height: 82rpx;font-size: 30rpx; " class="['!bg-primary', 'rounded-full', 'text-white']">
605
+        我已退回,填写快递单号
606
+      </button>
607
+    </div>
198
 
608
 
609
+  </div>
610
+  <!-- 待退货,跳转退货快递单号页面 -->
611
+  <div class="flexd_div  " v-if="state.detail.refund_status == -1 && state.detail.refund_type == 1">
612
+    <div class="flexd_box">
613
+      <button @click="handleTophone" style="width: 686rpx;
614
+height: 82rpx;font-size: 30rpx; " class="['!bg-primary', 'rounded-full', 'text-white']">
615
+        <image style="width: 30rpx; height: 30rpx; vertical-align: middle;" src="../../static/icon/联系商家.png"></image>
616
+        <span style="vertical-align: middle; margin-left: 8rpx; ">联系商家</span>
617
+      </button>
199
     </div>
618
     </div>
619
+
620
+  </div>
200
 </template>
621
 </template>
201
 
622
 
202
 <route lang="yaml">
623
 <route lang="yaml">
203
 style:
624
 style:
204
-  navigationBarTitleText: 售后订单
625
+  navigationBarTitleText: 售后详情                                                                                                                         
205
 </route>
626
 </route>
206
 
627
 
207
 <style lang="scss">
628
 <style lang="scss">
@@ -217,9 +638,137 @@ page {
217
   --nut-steps-base-title-font-size: 12px;
638
   --nut-steps-base-title-font-size: 12px;
218
   background: #f8f8f8;
639
   background: #f8f8f8;
219
 }
640
 }
641
+
220
 .nut-step-title {
642
 .nut-step-title {
221
   min-width: 100rpx;
643
   min-width: 100rpx;
222
   width: 100rpx;
644
   width: 100rpx;
223
   text-align: center;
645
   text-align: center;
224
 }
646
 }
647
+
648
+.text_font {
649
+  font-size: 36rpx;
650
+  color: #333333;
651
+}
652
+
653
+.text_div {
654
+  font-size: 26rpx;
655
+  color: #666;
656
+}
657
+
658
+.text_box {
659
+  font-size: 28rpx;
660
+  color: #333333;
661
+}
662
+
663
+.text_dis {
664
+  font-size: 28rpx;
665
+  color: #666;
666
+}
667
+
668
+.text_dew {
669
+  width: 48rpx;
670
+  height: 36rpx;
671
+  font-size: 24rpx;
672
+  font-family: PingFangSC, PingFang SC;
673
+  font-weight: 400;
674
+  color: #666666;
675
+  line-height: 36rpx;
676
+}
677
+
678
+.text_lok {
679
+  font-size: 26rpx;
680
+  color: #FE0032;
681
+  height: 1.2em;
682
+}
683
+
684
+.line_hei {
685
+  height: 1.2em;
686
+}
687
+
688
+.section_1 {
689
+  margin: 40rpx 0;
690
+  display: flex;
691
+  flex-direction: column;
692
+  justify-content: center;
693
+  /* 垂直居中 */
694
+  align-items: center;
695
+  /* 水平居中 */
696
+}
697
+
698
+.flex_mar {
699
+  display: flex;
700
+}
701
+
702
+.text_span1 {
703
+  font-size: 36rpx;
704
+  color: #333333;
705
+}
706
+
707
+.img_box {
708
+  position: fixed;
709
+  top: 40rpx;
710
+  left: 682rpx;
711
+  width: 36rpx;
712
+  height: 36rpx;
713
+  line-height: 48rpx;
714
+}
715
+
716
+.label_img {
717
+  width: 100%;
718
+  height: 100%;
719
+  margin-top: 6rpx;
720
+}
721
+
722
+
723
+
724
+.text1_2 {
725
+  font-size: 30rpx;
726
+}
727
+
728
+.copy_img {
729
+  margin-top: 5rpx;
730
+  margin-right: 6rpx;
731
+  width: 24rpx;
732
+  height: 24rpx;
733
+}
734
+
735
+.copy_img image {
736
+  width: 100%;
737
+  height: 100%;
738
+}
739
+
740
+.flexd_div {
741
+  border-top: 2rpx solid rgba(170, 171, 172, 0.5);
742
+  bottom: 0;
743
+  left: 0;
744
+  width: 100%;
745
+  height: 161rpx;
746
+  position: fixed;
747
+  background: #FFFFFF;
748
+  justify-content: center;
749
+}
750
+
751
+.flexd_box {
752
+
753
+  width: 686rpx;
754
+  margin-top: 12rpx;
755
+  margin-left: 32rpx;
756
+}
757
+
758
+.custom-title {
759
+  // 设置 title 的宽度样式
760
+  text-align: left;
761
+  width: 578rpx; // 你可以根据需要设置宽度值
762
+}
763
+
764
+.custom-content {
765
+  width: 578rpx; // 你可以根据需要设置宽度值
766
+  font-size: 24rpx;
767
+}
768
+
769
+
770
+.custom-icon-color .nut-step-icon {
771
+  background-color: white;
772
+  /* 将小圆点的背景颜色设置为白色 */
773
+}
225
 </style>
774
 </style>

+ 158 - 108
src/pages/refund/drawback.vue

@@ -1,10 +1,13 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import FPrice from "~/components/FPrice/FPrice.vue";
2
 import FPrice from "~/components/FPrice/FPrice.vue";
3
-import {UPLOAD_URL} from "~/utils/http";
3
+import closeIcon from "~/static/icon/close.png";
4
+import radioOffIcon from "~/static/icon/radio-off.png";
5
+import radioOnIcon from "~/static/icon/radio-on.png";
6
+import { UPLOAD_URL } from "~/utils/http";
4
 import GoodStatusPopup from "~/pages/refund/components/GoodStatusPopup.vue";
7
 import GoodStatusPopup from "~/pages/refund/components/GoodStatusPopup.vue";
5
 import RefundReasonPopup from "~/pages/refund/components/RefundReasonPopup.vue";
8
 import RefundReasonPopup from "~/pages/refund/components/RefundReasonPopup.vue";
6
-import {getToken} from "~/utils/auth";
7
-import {refundApply, takeOrder} from "~/apis/order.api";
9
+import { getToken } from "~/utils/auth";
10
+import { refundApply, takeOrder } from "~/apis/order.api";
8
 const headers = {
11
 const headers = {
9
   "Content-Type": "multipart/form-data",
12
   "Content-Type": "multipart/form-data",
10
   'X-Token': 'Bearer ' + getToken()
13
   'X-Token': 'Bearer ' + getToken()
@@ -33,14 +36,16 @@ const formData = reactive({
33
   refund_message: '',
36
   refund_message: '',
34
   // 退款金额
37
   // 退款金额
35
   refund_price: '',
38
   refund_price: '',
39
+  pay_price: '',
36
   type: '',
40
   type: '',
37
   // 1退款, 2退款退货
41
   // 1退款, 2退款退货
38
   refund_type: '',
42
   refund_type: '',
39
   // 收货状态
43
   // 收货状态
40
-  goods: ''
44
+  goods: '',
45
+  delivery_type: ''
41
 })
46
 })
42
 const defaultFileList = ref([])
47
 const defaultFileList = ref([])
43
-
48
+const radioValue = ref('')
44
 const radioVal = ref(false)
49
 const radioVal = ref(false)
45
 function handleUploadSuccess({ data, option, fileItem }) {
50
 function handleUploadSuccess({ data, option, fileItem }) {
46
   // console.log(data.data.path)
51
   // console.log(data.data.path)
@@ -61,17 +66,23 @@ onLoad(async (options) => {
61
     state.from = options.from
66
     state.from = options.from
62
   }
67
   }
63
   await userStore.getUserInfo()
68
   await userStore.getUserInfo()
69
+  if (options.refund_type == '2') {
70
+    formData.goods = '已收到货'
71
+  }
64
   formData.refund_type = options.refund_type
72
   formData.refund_type = options.refund_type
65
   formData.ids = options.ids
73
   formData.ids = options.ids
66
   formData.refund_price = options.total_price
74
   formData.refund_price = options.total_price
75
+  formData.pay_price = options.pay_price
67
   formData.num = options.total_num
76
   formData.num = options.total_num
68
   formData.phone = userStore.userInfo.phone
77
   formData.phone = userStore.userInfo.phone
69
   formData.type = options.type || 1
78
   formData.type = options.type || 1
70
-
79
+  formData.delivery_type = options.delivery_type
71
   state.orderId = options.orderId
80
   state.orderId = options.orderId
81
+
82
+  console.log('>>>>>>>>', formData);
72
 })
83
 })
73
 function handleSubmit() {
84
 function handleSubmit() {
74
-  if(!formData.goods) {
85
+  if (!formData.goods) {
75
     return uni.showToast({
86
     return uni.showToast({
76
       title: '请选择收货状态',
87
       title: '请选择收货状态',
77
       icon: "none"
88
       icon: "none"
@@ -90,38 +101,38 @@ function handleSubmit() {
90
       if (res.confirm) {
101
       if (res.confirm) {
91
         refundApply(state.orderId.toString(), formData).then(res => {
102
         refundApply(state.orderId.toString(), formData).then(res => {
92
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
103
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
93
-          console.log('申请退款成功',res);
94
-          
95
-          if(res.status===200){
96
-             uni.showToast({
97
-            title: '申请退款成功',
98
-            icon: 'none'
99
-          })
100
-          setTimeout(() => {
101
-            uni.navigateTo({
102
-              url: `/pages/refund/index?from=${state.from}`
104
+          console.log('申请退款成功', res);
105
+
106
+          if (res.status === 200) {
107
+            uni.showToast({
108
+              title: '申请退款成功',
109
+              icon: 'none'
103
             })
110
             })
104
-          }, 300)
105
-          }else{
111
+            setTimeout(() => {
112
+              uni.navigateTo({
113
+                url: `/pages/refund/index?from=${state.from}`
114
+              })
115
+            }, 300)
116
+          } else {
106
             uni.showToast({
117
             uni.showToast({
107
-            title: res.message,
108
-            icon: 'none'
109
-          })
110
-          setTimeout(() => {
111
-            uni.navigateTo({
112
-              url: `/pages/refund/index?from=${state.from}`
118
+              title: res.message,
119
+              icon: 'none'
113
             })
120
             })
114
-          }, 300)
121
+            setTimeout(() => {
122
+              uni.navigateTo({
123
+                url: `/pages/refund/index?from=${state.from}`
124
+              })
125
+            }, 300)
115
           }
126
           }
116
-         
127
+
117
         })
128
         })
118
 
129
 
119
       }
130
       }
120
     },
131
     },
121
     fail: function (error) {
132
     fail: function (error) {
122
-    // 模态框显示失败,可能是因为参数不合法等原因
123
-    console.log('模态框显示失败', error);
124
-  }
133
+      // 模态框显示失败,可能是因为参数不合法等原因
134
+      console.log('模态框显示失败', error);
135
+    }
125
   })
136
   })
126
   // if (state.orderId) {
137
   // if (state.orderId) {
127
   // }
138
   // }
@@ -129,8 +140,13 @@ function handleSubmit() {
129
   console.log(formData)
140
   console.log(formData)
130
 }
141
 }
131
 
142
 
132
-function handleChooseGoodStatus () {
133
-  state.showGoodStatusPopup = true
143
+function handleChooseGoodStatus() {
144
+  if (formData.refund_type == '1') {
145
+    state.showGoodStatusPopup = true
146
+    console.log(111);
147
+  } else {
148
+    return
149
+  }
134
 }
150
 }
135
 
151
 
136
 function getGoodsStatus(radioVal) {
152
 function getGoodsStatus(radioVal) {
@@ -174,110 +190,144 @@ function onRefundReasonConfirm(val) {
174
   formData.refund_message = getRefundMessage(val)
190
   formData.refund_message = getRefundMessage(val)
175
   console.log(formData.refund_message)
191
   console.log(formData.refund_message)
176
 }
192
 }
193
+const allowPopup = ref(true)
194
+function handleTextareaInput(event) {
195
+  // 在输入时禁止调起其他组件
196
+  console.log('Textarea input:', event.target.value);
197
+  state.showReasonPopup = false
198
+  allowPopup.value = false;
199
+}
200
+function handleshowReasonPopup() {
201
+  state.showReasonPopup = true
202
+}
203
+
204
+
205
+
177
 
206
 
178
 
207
 
179
 </script>
208
 </script>
180
 <template>
209
 <template>
181
-<div>
182
-  <nut-cell-group>
183
-    <nut-cell :desc="formData.goods == '' ? '请选择' : `${formData.goods}`" is-link @click="handleChooseGoodStatus">
184
-      <template #title>
185
-        <div class="flex font-bold gap-1 items-center">
186
-          <div>收货状态</div>
187
-          <div class="text-primary">*</div>
188
-        </div>
189
-      </template>
190
-    </nut-cell>
191
-    <nut-cell :desc="formData.refund_message == '' ? '请选择' : `${formData.refund_message}`" is-link @click="state.showReasonPopup = true">
192
-      <template #title>
193
-        <div class="flex font-bold gap-1 items-center">
194
-          <div>退款原因</div>
195
-          <div class="text-primary">*</div>
196
-        </div>
197
-      </template>
198
-    </nut-cell>
199
-    <nut-cell >
200
-      <div class="flex flex-col">
201
-        <div class="flex font-bold gap-1 items-center">
202
-          <div>退款金额</div>
203
-          <div class="text-primary">*</div>
204
-        </div>
205
-        <FPrice :price="formData.refund_price" :ex-class="['font-bold text-xl']"></FPrice>
206
-        <div class="text-gray-500 text-[12px]">
207
-          不可修改,最多¥{{ formData.refund_price }},含发货邮费¥{{state.total_price}}
210
+  <div>
211
+    <nut-cell-group>
212
+      <nut-cell>
213
+        <template #title>
214
+          <div class="flex_div">
215
+            <div class="flex font-bold gap-1 items-center">
216
+              <div>申请类型</div>
217
+              <div class="text-primary">*</div>
218
+            </div>
219
+            <div style="color: #cccccc;">{{ formData.refund_type == '1' ? '我要退款(无需退货)' : '我要退货退款' }}</div>
220
+          </div>
221
+        </template>
222
+      </nut-cell>
223
+
224
+      <nut-cell :desc="formData.goods == '' ? '请选择' : `${formData.goods}`" :is-link="formData.refund_type == '1' ? true : false"
225
+        @click="handleChooseGoodStatus">
226
+        <template #title>
227
+          <div class="flex font-bold gap-1 items-center">
228
+            <div>收货状态</div>
229
+            <div class="text-primary">*</div>
230
+          </div>
231
+        </template>
232
+      </nut-cell>
233
+
234
+      <nut-cell :desc="formData.refund_message == '' ? '请选择' : `${formData.refund_message}`" is-link
235
+        @click.stop="handleshowReasonPopup">
236
+        <template #title>
237
+          <div class="flex font-bold gap-1 items-center">
238
+            <div>退款原因</div>
239
+            <div class="text-primary">*</div>
240
+          </div>
241
+        </template>
242
+      </nut-cell>
243
+      <nut-cell>
244
+        <div class="flex flex-col">
245
+          <div class="flex flex-1 justify-between ">
246
+            <div class="flex font-bold  gap-1 items-center">
247
+              <div>退款金额</div>
248
+              <div class="text-primary">*</div>
249
+            </div>
250
+            <div class="['font-bold text-xl']" style="color: rgb(253, 33, 76);">
251
+              ¥ {{ parseFloat(formData.delivery_type !== 'null' ? formData.refund_price :
252
+                formData.pay_price).toFixed(2).replace(/\.?0+$/, '') }}
253
+            </div>
254
+          </div>
255
+
256
+          <div class="text-gray-500 text-[12px]">
257
+            <div>退款金额说明</div>
258
+            <div>1.未发货的订单发起退款,退款金额=支付金额</div>
259
+            <div>2.已发货的订单发起退款,根据收货地址不同,可能会产生不同金额的快递拦截费,以实际情况未准;</div>
260
+            <div>退款金额=支付金额-快递拦截费或运费</div>
261
+          </div>
208
         </div>
262
         </div>
209
-      </div>
210
 
263
 
211
-    </nut-cell>
212
-  </nut-cell-group>
264
+      </nut-cell>
265
+    </nut-cell-group>
213
 
266
 
214
-  <div class="bg-white p-3">
215
-    <div class="text-sm">
216
-      补充描述和凭证
217
-    </div>
218
-    <div class="flex flex-col my-2 gap-2 bg-gray-100">
219
-        <textarea placeholder="补充描述,有助于商家更好的处理售后问题"
220
-                  class="p-2 text-xs rounded-lg"
221
-                  v-model="formData.mark"
222
-        />
223
-      <div class="flex p-2 text-gray">
224
-        <div class="flex flex-col justify-center items-center text-xs gap-2">
225
-          <nut-uploader :url="UPLOAD_URL"
226
-                        :headers="headers"
227
-                        :name="'field'"
228
-                        :timeout="1000*50"
229
-                        :data="{ filename: 'field'}"
230
-                        v-model:file-list="defaultFileList" maximum="3"
231
-                        @success="handleUploadSuccess"
232
-          >
233
-          </nut-uploader>
267
+    <div class="bg-white p-3">
268
+      <div class="text-sm">
269
+        补充描述和凭证
270
+      </div>
271
+      <div class="flex flex-col my-2 gap-2 bg-gray-100">
272
+        <textarea @input="handleTextareaInput" placeholder="您填写的信息越详细,问题越可有效解决哦~" class="p-2 text-xs rounded-lg"
273
+          v-model="formData.mark"></textarea>
274
+        <div class="flex p-2 text-gray">
275
+          <div class="flex flex-col justify-center items-center text-xs gap-2">
276
+            <nut-uploader :url="UPLOAD_URL" :headers="headers" :name="'field'" :timeout="1000 * 50"
277
+              :data="{ filename: 'field' }" v-model:file-list="defaultFileList" maximum="3"
278
+              @success="handleUploadSuccess">
279
+            </nut-uploader>
280
+          </div>
234
         </div>
281
         </div>
282
+
235
       </div>
283
       </div>
236
 
284
 
237
     </div>
285
     </div>
286
+    <div class="fixed bottom-0 pb-safe w-full">
287
+      <div class="px-3 ">
288
+        <nut-button @click="handleSubmit" type="primary" block>提交
289
+        </nut-button>
290
+
291
+        <!--      <FButton-->
292
+        <!--          @click="handleSubmit"-->
293
+        <!--          :exClass="['!bg-primary', 'rounded-full', 'text-white']"-->
294
+        <!--          block-->
295
+        <!--      >-->
296
+        <!--        提交-->
297
+        <!--      </FButton>-->
298
+        <!--        <div class="text-center text-white bg-red rounded-full text-sm p-2">-->
299
+        <!--        </div>-->
300
+      </div>
238
 
301
 
239
-  </div>
240
-  <div class="fixed bottom-0 pb-safe w-full">
241
-    <div class="px-3 ">
242
-      <nut-button
243
-          @click="handleSubmit"
244
-          type="primary" block>提交
245
-      </nut-button>
246
-
247
-<!--      <FButton-->
248
-<!--          @click="handleSubmit"-->
249
-<!--          :exClass="['!bg-primary', 'rounded-full', 'text-white']"-->
250
-<!--          block-->
251
-<!--      >-->
252
-<!--        提交-->
253
-<!--      </FButton>-->
254
-      <!--        <div class="text-center text-white bg-red rounded-full text-sm p-2">-->
255
-      <!--        </div>-->
256
     </div>
302
     </div>
257
 
303
 
304
+    <GoodStatusPopup v-model:show="state.showGoodStatusPopup" @confirm="onGoodStatusConfirm" />
305
+    <RefundReasonPopup v-model:show="state.showReasonPopup" @confirm="onRefundReasonConfirm" />
306
+    
258
   </div>
307
   </div>
259
-
260
-  <GoodStatusPopup v-model:show="state.showGoodStatusPopup"
261
-                   @confirm="onGoodStatusConfirm"
262
-  />
263
-  <RefundReasonPopup v-model:show="state.showReasonPopup"
264
-                     @confirm="onRefundReasonConfirm"
265
-  />
266
-</div>
267
 </template>
308
 </template>
268
 
309
 
269
 <route lang="yaml">
310
 <route lang="yaml">
270
 style:
311
 style:
271
-  navigationBarTitleText: 售后订单
312
+  navigationBarTitleText: 申请退款
272
 </route>
313
 </route>
273
 
314
 
274
 <style lang="scss">
315
 <style lang="scss">
275
 page {
316
 page {
276
   background: #f8f8f8;
317
   background: #f8f8f8;
277
 }
318
 }
319
+
278
 .nut-radio-group {
320
 .nut-radio-group {
279
   width: 100%;
321
   width: 100%;
280
 }
322
 }
323
+
324
+.flex_div {
325
+  display: flex;
326
+  justify-content: space-between;
327
+  align-items: center;
328
+
329
+}
330
+
281
 //.nut-radio {
331
 //.nut-radio {
282
 //  display: flex !important;
332
 //  display: flex !important;
283
 //  width: 100%;
333
 //  width: 100%;

+ 2 - 2
src/pages/refund/index.vue

@@ -109,8 +109,8 @@ function onClickLeft() {
109
   <div class="fixed top-18 bg-white w-screen z-2">
109
   <div class="fixed top-18 bg-white w-screen z-2">
110
     <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
110
     <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
111
       <nut-tab-pane title="全部"></nut-tab-pane>
111
       <nut-tab-pane title="全部"></nut-tab-pane>
112
-      <nut-tab-pane title="退款中"></nut-tab-pane>
113
-      <nut-tab-pane title="退款完成"></nut-tab-pane>
112
+      <nut-tab-pane title="处理中"></nut-tab-pane>
113
+      <nut-tab-pane title="已完成"></nut-tab-pane>
114
     </nut-tabs>
114
     </nut-tabs>
115
   </div>
115
   </div>
116
   <div v-if="state.list.length > 0" class="mt-30 flex flex-col p-3">
116
   <div v-if="state.list.length > 0" class="mt-30 flex flex-col p-3">

+ 14 - 17
src/pages/refund/option.vue

@@ -1,6 +1,6 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {CDN_URL} from "~/config/app";
3
-import {decodeBase64} from "~/utils/http/helper";
2
+import { CDN_URL } from "~/config/app";
3
+import { decodeBase64 } from "~/utils/http/helper";
4
 import FPrice from "~/components/FPrice/FPrice.vue";
4
 import FPrice from "~/components/FPrice/FPrice.vue";
5
 
5
 
6
 const woyaotuikuanIcon = CDN_URL + '/static/assets/woyaotuikuan.png'
6
 const woyaotuikuanIcon = CDN_URL + '/static/assets/woyaotuikuan.png'
@@ -19,14 +19,14 @@ onLoad((options) => {
19
   state.detail = JSON.parse(decodeBase64(options.detail))
19
   state.detail = JSON.parse(decodeBase64(options.detail))
20
   // state.detail = JSON.parse(decodeBase64(base64Detail))
20
   // state.detail = JSON.parse(decodeBase64(base64Detail))
21
   console.log(state.detail)
21
   console.log(state.detail)
22
-  {{state.detail.orderProduct}}
22
+  { { state.detail.orderProduct } }
23
 })
23
 })
24
 //1:退款 2:退款退货
24
 //1:退款 2:退款退货
25
 
25
 
26
 const getProductIds = computed(() => {
26
 const getProductIds = computed(() => {
27
   const ids = []
27
   const ids = []
28
   if (state.detail && state.detail.orderProduct) {
28
   if (state.detail && state.detail.orderProduct) {
29
-    for(let item of state.detail.orderProduct) {
29
+    for (let item of state.detail.orderProduct) {
30
       ids.push(item.order_product_id)
30
       ids.push(item.order_product_id)
31
     }
31
     }
32
   }
32
   }
@@ -36,7 +36,7 @@ const getProductIds = computed(() => {
36
 function handleChooseType(refund_type) {
36
 function handleChooseType(refund_type) {
37
   // console.log(getProductIds.value)
37
   // console.log(getProductIds.value)
38
   uni.navigateTo({
38
   uni.navigateTo({
39
-    url: `/pages/refund/drawback?orderId=${state.detail.order_id}&refund_type=${refund_type}&ids=${getProductIds.value.toString()}&total_price=${state.detail.total_price}&total_postage=${state.detail.total_postage}&total_num=${state.detail.total_num}&type=${getProductIds.value.length > 1 ? 2 : 1}&from=${state.from}`
39
+    url: `/pages/refund/drawback?orderId=${state.detail.order_id}&refund_type=${refund_type}&ids=${getProductIds.value.toString()}&total_price=${state.detail.total_price}&total_postage=${state.detail.total_postage}&total_num=${state.detail.total_num}&type=${getProductIds.value.length > 1 ? 2 : 1}&from=${state.from}&&pay_price=${state.detail.pay_price}&&delivery_type=${state.detail.delivery_type}`
40
   })
40
   })
41
 }
41
 }
42
 </script>
42
 </script>
@@ -45,13 +45,12 @@ function handleChooseType(refund_type) {
45
     <div class="p-3 flex flex-col gap-3">
45
     <div class="p-3 flex flex-col gap-3">
46
       <div class="bg-white rounded-lg flex p-3 flex flex-col" v-if="state.detail && state.detail.orderProduct">
46
       <div class="bg-white rounded-lg flex p-3 flex flex-col" v-if="state.detail && state.detail.orderProduct">
47
         <div class="font-bold">退款商品</div>
47
         <div class="font-bold">退款商品</div>
48
-        <div v-for="(orderProduct, orderProductIndex) in state.detail.orderProduct"
49
-             :key="orderProductIndex">
48
+        <div v-for="(orderProduct, orderProductIndex) in state.detail.orderProduct" :key="orderProductIndex">
50
           <div class="flex py-2 gap-3">
49
           <div class="flex py-2 gap-3">
51
             <div class="flex-1 flex gap-2">
50
             <div class="flex-1 flex gap-2">
52
-<!--              <div class="flex">-->
53
-                <image :src="orderProduct.cart_info.product.image" class="w-20 h-20 rounded" mode="widthFix"></image>
54
-<!--              </div>-->
51
+              <!--              <div class="flex">-->
52
+              <image :src="orderProduct.cart_info.product.image" class="w-20 h-20 rounded" mode="widthFix"></image>
53
+              <!--              </div>-->
55
 
54
 
56
               <div class="flex flex-col flex-1">
55
               <div class="flex flex-col flex-1">
57
                 <div class="line-clamp-2 text-[14px]">
56
                 <div class="line-clamp-2 text-[14px]">
@@ -64,7 +63,9 @@ function handleChooseType(refund_type) {
64
             </div>
63
             </div>
65
 
64
 
66
             <div class="flex flex-col justify-center items-center">
65
             <div class="flex flex-col justify-center items-center">
67
-              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[14px] !text-[#000]"></FPrice>
66
+              <!-- <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[14px] !text-[#000]"></FPrice> -->
67
+              <div class="font-bold text-[14px] !text-[#000]">¥{{
68
+                parseFloat(orderProduct.product_price).toFixed(2).replace(/\.?0+$/, '') }}</div>
68
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
69
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
69
             </div>
70
             </div>
70
 
71
 
@@ -75,9 +76,7 @@ function handleChooseType(refund_type) {
75
       <div class="bg-white rounded-lg flex flex-col text-[14px] p-3">
76
       <div class="bg-white rounded-lg flex flex-col text-[14px] p-3">
76
         <div class="font-bold py-3">选择服务类型</div>
77
         <div class="font-bold py-3">选择服务类型</div>
77
         <div class="flex flex-col gap-3">
78
         <div class="flex flex-col gap-3">
78
-          <div
79
-              @click="handleChooseType(1)"
80
-              class="flex items-center gap-3">
79
+          <div @click="handleChooseType(1)" class="flex items-center gap-3">
81
             <image :src="woyaotuikuanIcon" mode="widthFix" class="w-5 h-5"></image>
80
             <image :src="woyaotuikuanIcon" mode="widthFix" class="w-5 h-5"></image>
82
             <div>
81
             <div>
83
               <div class="font-bold">我要退款(无需退货)</div>
82
               <div class="font-bold">我要退款(无需退货)</div>
@@ -85,9 +84,7 @@ function handleChooseType(refund_type) {
85
             </div>
84
             </div>
86
           </div>
85
           </div>
87
 
86
 
88
-          <div
89
-              @click="handleChooseType(2)"
90
-              class="flex items-center gap-3">
87
+          <div @click="handleChooseType(2)" class="flex items-center gap-3">
91
             <image :src="woyaotuihuotuikuanIcon" mode="widthFix" class="w-5 h-5"></image>
88
             <image :src="woyaotuihuotuikuanIcon" mode="widthFix" class="w-5 h-5"></image>
92
             <div>
89
             <div>
93
               <div class="font-bold">我要退货退款</div>
90
               <div class="font-bold">我要退货退款</div>

+ 103 - 0
src/pages/refund/scancode/kdlist.vue

@@ -0,0 +1,103 @@
1
+<template>
2
+	<div class="pt-3">
3
+		<div v-for="(item, index) in kdlist" :key="index">
4
+			<div @click="handleToscan(item.value)"
5
+				class="bg-white  rounded-lg p-3 flex justify-center f-hairline-bottom items-center ">
6
+				<div class="w-full">
7
+					<div class="flex items-center  ">
8
+						<div class="flex items-center font-bold gap-2 text-sm w-full">
9
+							<div class="flex-1 flex items-center gap-2 ">
10
+								<div class="line-clamp-1">
11
+									{{ item.label }}
12
+								</div>
13
+							</div>
14
+						</div>
15
+					</div>
16
+				</div>
17
+			</div>
18
+		</div>
19
+	</div>
20
+</template>
21
+
22
+<script setup lang="ts">
23
+import { getRefundKdlist } from "~/apis/order.api";
24
+const emit = defineEmits()
25
+//快递列表
26
+const kdlist = ref([])
27
+const state = reactive({
28
+	orderId: '',
29
+	refund_order_id: '',
30
+
31
+})
32
+
33
+onLoad((options) => {
34
+	//id
35
+	if (options && options.refund_order_id !== '') {
36
+		state.refund_order_id = options.refund_order_id
37
+	}
38
+	getRefundKdlist().then((res) => {
39
+		console.log(res);
40
+		kdlist.value = res
41
+	})
42
+})
43
+
44
+function handleToscan(value: any) {
45
+
46
+
47
+	// 通过 $emit 发送自定义事件,并传递数据
48
+	// 注意:在 Vue 3 中,通过 $emit 传递事件需要使用 `emit` 函数
49
+	if (value) {
50
+        if (value == "31") {
51
+            value = '中国邮政'
52
+        }
53
+        if (value == "188") {
54
+            value = '顺丰速运'
55
+        }
56
+        if (value == "221") {
57
+            value = '天天快递'
58
+        }
59
+        if (value == "243") {
60
+            value = '圆通快递'
61
+        }
62
+        if (value == "252") {
63
+            value = '中通快递'
64
+        }
65
+        if (value == "254") {
66
+            value = 'EMS'
67
+        }
68
+        if (value == "266") {
69
+            value = '申通快递'
70
+        }
71
+        if (value == "286") {
72
+            value = '韵达快运'
73
+        }
74
+        if (value == "290") {
75
+            value = '快捷速递'
76
+        }
77
+        if (value == "428") {
78
+            value = '重磅快递'
79
+        }
80
+        if (value == "429") {
81
+            value = '众邦快递'
82
+        }
83
+    }
84
+	uni.$emit('send-data-to-b', value);
85
+	uni.navigateBack({
86
+		delta: 1 // 返回上一层页面
87
+	})
88
+
89
+}
90
+
91
+
92
+</script>
93
+
94
+<style>
95
+page {
96
+
97
+	background: #F8F8F8;
98
+}
99
+</style>
100
+<route lang="yaml">
101
+style:
102
+  navigationBarTitleText: 快递公司
103
+</route>

+ 280 - 0
src/pages/refund/scancode/scancode.vue

@@ -0,0 +1,280 @@
1
+<script setup lang="ts">
2
+// import FPrice from "~/components/FPrice/FPrice.vue";
3
+import { UPLOAD_URL } from "~/utils/http";
4
+// import GoodStatusPopup from "~/pages/refund/components/GoodStatusPopup.vue";
5
+// import RefundReasonPopup from "~/pages/refund/components/RefundReasonPopup.vue";
6
+import { getToken } from "~/utils/auth";
7
+import { getRefundOutDl } from "~/apis/order.api";
8
+const headers = {
9
+    "Content-Type": "multipart/form-data",
10
+    'X-Token': 'Bearer ' + getToken()
11
+}
12
+const state = reactive({
13
+    showGoodStatusPopup: false,
14
+    showReasonPopup: false,
15
+    // detail: {}
16
+    total_price: '0.00',
17
+    orderId: '',
18
+    refund_order_id: '',
19
+
20
+})
21
+const userStore = useUserStore()
22
+
23
+let formData = reactive({
24
+
25
+    delivery_type: '',  //快递名称
26
+    // 申请说明
27
+    delivery_id: '', //快递单号
28
+    delivery_mark: '', //快递备注
29
+    // 联系电话
30
+    delivery_phone: '',
31
+    // 图片
32
+    delivery_pics: [], //图片
33
+})
34
+const defaultFileList = ref([])
35
+
36
+const radioVal = ref(false)
37
+function handleUploadSuccess({ data, option, fileItem }) {
38
+    // console.log(data)
39
+
40
+    if (data && data.data) {
41
+        const resData = JSON.parse(data.data).data
42
+        const path = resData.path
43
+        formData.delivery_pics.push(path)
44
+    }
45
+    console.log(formData.delivery_pics);
46
+
47
+    // if (data && data.path) {
48
+    //   formData.pics.push(data.path)
49
+    // }
50
+    //
51
+    // console.log(fileItem)
52
+}
53
+onLoad(async (options) => {
54
+    await userStore.getUserInfo()
55
+    //手机号
56
+     if (options && options.phone !== '') {
57
+        formData.delivery_phone = options.phone
58
+    }
59
+    console.log(formData.delivery_phone);
60
+    //refund_order_id
61
+   
62
+    //refund_order_id
63
+    if (options && options.refund_order_id !== '') {
64
+        state.refund_order_id = options.refund_order_id
65
+    }
66
+    console.log(state.refund_order_id);
67
+    //delivery_type
68
+
69
+})
70
+onShow((options) => {
71
+    uni.$on('send-data-to-b', handleReceivedData)
72
+})
73
+//提交
74
+function handleSubmit() {
75
+    console.log(formData)
76
+    if (!formData.delivery_id) {
77
+        return uni.showToast({
78
+            title: '快递单号不能为空',
79
+            icon: "none"
80
+        })
81
+    }
82
+    if (!formData.delivery_type) {
83
+        return uni.showToast({
84
+            title: '请选择物流公司',
85
+            icon: "none"
86
+        })
87
+    }
88
+    getRefundOutDl(state.refund_order_id,formData).then((res) => {
89
+        uni.showToast({
90
+            title: '提交成功',
91
+            icon: "none"
92
+        })
93
+
94
+    }).catch((error)=>{
95
+        uni.showToast({
96
+            title: error,
97
+            icon: "none"
98
+        })
99
+    })
100
+    uni.navigateBack({
101
+		delta: 1 // 返回上一层页面
102
+	})
103
+
104
+}
105
+
106
+
107
+
108
+// 定义处理接收到数据的方法
109
+const handleReceivedData = (value: any) => {
110
+    // 处理接收到的数据
111
+    formData.delivery_type = value;
112
+};
113
+
114
+
115
+function handleTokdList() {
116
+
117
+    uni.navigateTo({
118
+        url: `/pages/refund/scancode/kdlist?refund_order_id=${state.refund_order_id}`
119
+    })
120
+}
121
+//扫描二维码
122
+function showScancode() {
123
+
124
+    // 调起条码扫描
125
+    uni.scanCode({
126
+        scanType: ['barCode'],
127
+        success: function (res) {
128
+            console.log('res:' + res);
129
+            console.log('条码类型:' + res.scanType);
130
+            console.log('条码内容:' + res.result);
131
+            formData.delivery_id = res.result
132
+        }
133
+    });
134
+}
135
+
136
+</script>
137
+<template>
138
+    <div class="px-3">
139
+        <div style="border-radius: 16rpx;">
140
+            <nut-cell-group>
141
+                <nut-cell>
142
+                    <template #title>
143
+                        <div class="flex_div">
144
+                            <div class="flex font-bold gap-1 items-center">
145
+                                <div style="font-size: 30rpx; color: #333333;">填写物流信息</div>
146
+                            </div>
147
+                        </div>
148
+                    </template>
149
+                </nut-cell>
150
+                <nut-cell>
151
+                    <template #title>
152
+                        <div style="line-height: 42rpx;" class="flex font-bold gap-1 justify-between">
153
+                            <div class="font-bold">物流单号</div>
154
+
155
+                            <input class="flex-1" type="number" v-model="formData.delivery_id" placeholder="点击填写或扫码退货快递单号">
156
+
157
+                            <div @click="showScancode" style="width: 42rpx; height: 42rpx;">
158
+                                <image class="image_sm" src="../../../static/icon/扫码.png"></image>
159
+                            </div>
160
+                        </div>
161
+                    </template>
162
+                </nut-cell>
163
+                <nut-cell>
164
+                    <template #title>
165
+                        <div class="flex font-bold gap-1 justify-between">
166
+                            <div>物流公司</div>
167
+
168
+                            <div @click="handleTokdList()" class="flex-1"
169
+                                :class="formData.delivery_type == '' ? 'col_9' : 'col_3'">
170
+                                {{ formData.delivery_type == '' ? '请选择物流公司' : formData.delivery_type }}
171
+                            </div>
172
+                            <div class="f-text-color-2 i-tabler-chevron-right"></div>
173
+
174
+
175
+                        </div>
176
+
177
+                    </template>
178
+                </nut-cell>
179
+
180
+            </nut-cell-group>
181
+        </div>
182
+        <!-- 退货留言 -->
183
+        <div class="bg-white p-3 mb-3" style="border-radius: 16rpx;">
184
+            <div class="text-sm">
185
+                退货留言
186
+            </div>
187
+            <div class="flex flex-col my-2 gap-2 bg-gray-50">
188
+                <textarea :maxlength="200" style="height: 150rpx;" placeholder="请详细填写您的退货留言" class="p-2 text-xs rounded-lg"
189
+                    v-model="formData.delivery_mark" />
190
+            </div>
191
+
192
+        </div>
193
+        <!-- 上传凭证 -->
194
+        <div class="bg-white p-3" style="border-radius: 16rpx;">
195
+            <div class="text-sm">
196
+                上传凭证
197
+            </div>
198
+            <div class="flex p-2 text-gray">
199
+                <div class="flex flex-col justify-center items-center text-xs gap-2">
200
+                    <nut-uploader :url="UPLOAD_URL" :headers="headers" :name="'field'" :timeout="1000 * 50"
201
+                        :data="{ filename: 'field' }" v-model:file-list="defaultFileList" maximum="3"
202
+                        @success="handleUploadSuccess">
203
+                    </nut-uploader>
204
+                </div>
205
+            </div>
206
+
207
+        </div>
208
+
209
+
210
+        <!-- <div class="fixed bottom-0 pb-safe w-full">
211
+            <div class="">
212
+                <nut-button @click="handleSubmit" type="primary" block>提交
213
+                </nut-button>
214
+            </div>
215
+        </div> -->
216
+        <div class="flexd_div f-hairline-top ">
217
+            <div class="flexd_box">
218
+                <button style="font-size: 30rpx; width: 686rpx;height: 82rpx;" @click="handleSubmit"
219
+                    class="['!bg-primary',  'rounded-full', 'text-white']">
220
+                    提交
221
+                </button>
222
+            </div>
223
+
224
+        </div>
225
+
226
+    </div>
227
+</template>
228
+
229
+<route lang="yaml">
230
+style:
231
+  navigationBarTitleText: 填写退货快递单号
232
+</route>
233
+
234
+<style >
235
+page {
236
+    background: #f8f8f8;
237
+}
238
+
239
+.nut-radio-group {
240
+    width: 100%;
241
+}
242
+
243
+.flex_div {
244
+    display: flex;
245
+    justify-content: space-between;
246
+    align-items: center;
247
+
248
+}
249
+
250
+.image_sm {
251
+    width: 100%;
252
+    height: 100%;
253
+}
254
+
255
+.col_3 {
256
+    color: #333333
257
+}
258
+
259
+.col_9 {
260
+    color: #999999
261
+}
262
+
263
+
264
+.flexd_div {
265
+    bottom: 0;
266
+    left: 0;
267
+    width: 100%;
268
+    height: 161rpx;
269
+    position: fixed;
270
+    background: #FFFFFF;
271
+    z-index: 999;
272
+    justify-content: center;
273
+}
274
+
275
+.flexd_box {
276
+    width: 686rpx;
277
+    margin-top: 12rpx;
278
+    margin-left: 32rpx;
279
+}
280
+</style>

+ 305 - 0
src/pages/refund/scancode/xsjllist.vue

@@ -0,0 +1,305 @@
1
+<template>
2
+	<div class="px-3 pt-3 pb-10 relative h-full" v-if="state.length > 0">
3
+		<!-- 申请已取消-->
4
+		<div v-for="(item, index) in state" :key="index">
5
+			<div class="bg-white  mb-3 rounded-lg p-3 flex justify-center items-center" v-if="item.type == 6 ">
6
+				<div class="w-full">
7
+					<div class="items-center">
8
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
9
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
10
+							<div class="flex-1 flex items-center gap-2 ">
11
+								<div class="line-clamp-1" style="font-size: 30rpx;" >
12
+									{{ item.title }}
13
+								</div>
14
+							</div>
15
+							<div>
16
+								<span class="text_lok">{{ item.time }}</span>
17
+							</div>
18
+
19
+						</div>
20
+						<div class="text_dis mt-3 ">
21
+							<div>{{ item.fail_message }}</div>
22
+						</div>
23
+					</div>
24
+				</div>
25
+			</div>
26
+		</div>
27
+		<!-- 商户拒绝仅退款-->
28
+		<div v-for="(item, index) in state" :key="index">
29
+			<div class="bg-white  mb-3 rounded-lg p-3 flex justify-center items-center" v-if="item.type==2">
30
+				<div class="w-full">
31
+					<div class="items-center">
32
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
33
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
34
+							<div class="flex-1 flex items-center gap-2 ">
35
+								<div class="line-clamp-1" style="font-size: 30rpx;" >
36
+									{{ item.title }}
37
+								</div>
38
+							</div>
39
+							<div>
40
+								<span class="text_lok">{{ item.time }}</span>
41
+							</div>
42
+
43
+						</div>
44
+						<div class="text_dis mt-3 ">
45
+							<div>拒绝原因:{{ item.fail_message }}</div>
46
+						</div>
47
+					</div>
48
+				</div>
49
+			</div>
50
+		</div>
51
+		<!-- 退款成功 5 -->
52
+		<div v-for="(item, index) in state" :key="index">
53
+			<div class="bg-white  mb-3 rounded-lg p-3 flex justify-center items-center " v-if="item.type == 5">
54
+				<div class="w-full">
55
+					<div class="items-center">
56
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
57
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
58
+							<div class="flex-1 flex items-center gap-2 ">
59
+								<div class="line-clamp-1"   style="font-size: 30rpx;">
60
+									{{ item.title }}
61
+								</div>
62
+							</div>
63
+							<div>
64
+								<span class="text_lok">{{ item.time }}</span>
65
+							</div>
66
+
67
+						</div>
68
+						<div class="text_dis mt-3 ">
69
+							<div>退款金额:¥{{ item.refund_price }}</div>
70
+						</div>
71
+					</div>
72
+				</div>
73
+			</div>
74
+		</div>
75
+
76
+		<!-- 买家寄出商品 4 -->
77
+		<div v-for="(item, index) in state" :key="index">
78
+			<div class="bg-white  mb-3 rounded-lg p-3 flex justify-center items-center "
79
+				v-if="item.type == 4 && item.refund_type == 2">
80
+				<div class="w-full">
81
+					<div class="items-center">
82
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
83
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
84
+							<div class="flex-1 flex items-center gap-2 ">
85
+								<div class=" line-clamp-1"   style="font-size: 30rpx;">
86
+									{{ item.title }}
87
+								</div>
88
+							</div>
89
+							<div>
90
+								<span class="text_lok">{{ item.time }}</span>
91
+							</div>
92
+
93
+						</div>
94
+						<div class="text_dis mt-3 ">
95
+							<div>商家收件信息:{{ item.delivery_type }}</div>
96
+						</div>
97
+						<div class="text_dis mt-3 flex ">
98
+							<div>快递单号:</div>
99
+							<div style="color: #333; font-size: 26rpx; display: flex; ">
100
+								<div style="border-right: 1rpx solid #D8D8D8; padding-right: 12rpx; margin-right: 13rpx;">
101
+									{{ item.delivery_id }}
102
+								</div>
103
+								<div @click="handleCopy1(item)">复制</div>
104
+							</div>
105
+						</div>
106
+					</div>
107
+				</div>
108
+			</div>
109
+		</div>
110
+
111
+		<!-- 商家同意退货 3 -->
112
+		<div v-for="(item, index) in state" :key="index">
113
+			<div class="bg-white  mb-3 rounded-lg p-3 flex justify-center items-center "
114
+				v-if="item.type == 3 && item.refund_type == 2">
115
+				<div class="w-full">
116
+					<div class="items-center">
117
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
118
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
119
+							<div class="flex-1 flex items-center gap-2 ">
120
+								<div class="line-clamp-1 "   style="font-size: 30rpx;">
121
+									{{ item.title }}
122
+								</div>
123
+							</div>
124
+							<div>
125
+								<span class="text_lok">{{ item.time }}</span>
126
+							</div>
127
+
128
+						</div>
129
+						<div class="text_dis mt-3 flex">
130
+							<div>商家收件信息</div>
131
+							<div style=" margin-left: 12rpx; color: #333; font-size: 26rpx; display: flex; "
132
+								@click="handleCopy2(item)">
133
+								<div class="copy_img">
134
+									<image src="../../static/icon/复制.png"></image>
135
+								</div>
136
+								<div>复制</div>
137
+							</div>
138
+						</div>
139
+						<div class="text_dis mt-3 ">
140
+							{{ item.mer_delivery_user }} {{ item.mer_delivery_phone }}
141
+						</div>
142
+						<div class="text_dis mt-3 ">
143
+							{{ item.mer_delivery_address }}
144
+						</div>
145
+
146
+					</div>
147
+				</div>
148
+			</div>
149
+		</div>
150
+
151
+		<!-- 用户申请退款退货 1-->
152
+		<div v-for="(item, index) in state" :key="index">
153
+			<div class="bg-white mb-3 rounded-lg p-3 flex justify-center items-center " v-if="item.type == 1" >
154
+				<div class="w-full">
155
+					<div class="items-center">
156
+						<div style="border-bottom: 1rpx solid #e6e6e6;"
157
+							class=" items-center font-bold gap-2 text-sm pb-3 w-full">
158
+							<div class="flex-1 flex items-center gap-2 ">
159
+								<div class="line-clamp-1 "   style="font-size: 30rpx;">
160
+									{{ item.title }}
161
+								</div>
162
+							</div>
163
+							<div>
164
+								<span class="text_lok">{{ item.time }}</span>
165
+							</div>
166
+
167
+						</div>
168
+						<div class="text_dis mt-3 ">
169
+							退款金额:¥{{ item.refund_price }}
170
+						</div>
171
+						<div class="text_dis mt-3 ">
172
+							退款原因:{{ item.refund_message }}
173
+						</div>
174
+						<div class="text_dis mt-3 ">
175
+							联系方式:{{ item.refund_phone }}
176
+						</div>
177
+						<div class="text_dis mt-3 ">
178
+							问题描述:{{ item.refund_mark }}
179
+						</div>
180
+						<div class="flex mt-3" v-if="item.refund_pics.length>0" >
181
+							<div class="text_image mr-2 "  v-for="(i,k) in item.refund_pics" :key="k"  >
182
+								<image lazy-load style="width: 100%; height: 100%; "  :src="i" ></image>
183
+							</div>
184
+						</div>
185
+					</div>
186
+				</div>
187
+			</div>
188
+		</div>
189
+
190
+	</div>
191
+</template>
192
+
193
+<script lang="ts" setup >
194
+import { getRefundXSlist } from "~/apis/order.api";
195
+
196
+onLoad((options) => {
197
+	if (options && options.refund_order_id) {
198
+		getRefundXSlist(options.refund_order_id).then(res => {
199
+			console.log(res);
200
+			if (res.length > 0) {
201
+				state.value = res
202
+			} else {
203
+
204
+			}
205
+		})
206
+	}
207
+})
208
+
209
+//存储
210
+
211
+const state = ref([])
212
+
213
+//复制商家收件信息
214
+function handleCopy2(item:any) {
215
+	let copyData = item.mer_delivery_user + ' ' + item.mer_delivery_phone + ' ' + item.mer_delivery_address
216
+
217
+	console.log(copyData);
218
+
219
+	uni.setClipboardData({
220
+		data: copyData,
221
+		success(res) {
222
+			// wx.getClipboardData({
223
+			//   success (res) {
224
+			//     console.log(res.data) // data
225
+			//   }
226
+			// })
227
+		}
228
+	})
229
+}
230
+
231
+//复制快递单号00
232
+function handleCopy1(item:any) {
233
+	let copyData = item.delivery_id
234
+	console.log(copyData);
235
+
236
+	uni.setClipboardData({
237
+		data: copyData,
238
+		success(res) {
239
+			// wx.getClipboardData({
240
+			//   success (res) {
241
+			//     console.log(res.data) // data
242
+			//   }
243
+			// })
244
+		}
245
+	})
246
+}
247
+
248
+
249
+</script>
250
+
251
+<style>
252
+page {
253
+	background: #f8f8f8;
254
+}
255
+
256
+.text_font {
257
+	height: 42rpx;
258
+	font-size: 30rpx;
259
+	font-family: PingFangSC, PingFang SC;
260
+	font-weight: 500;
261
+	color: #333333;
262
+	line-height: 42rpx;
263
+}
264
+
265
+.text_lok {
266
+	height: 28rpx;
267
+	font-size: 24rpx;
268
+	font-family: PingFangSC, PingFang SC;
269
+	font-weight: 400;
270
+	color: #999999;
271
+	line-height: 28rpx;
272
+}
273
+
274
+.text_dis {
275
+	font-size: 28rpx;
276
+	font-family: PingFangSC, PingFang SC;
277
+	font-weight: 400;
278
+	color: #333333;
279
+	line-height: 40rpx;
280
+	word-wrap: break-word;
281
+}
282
+
283
+
284
+.copy_img {
285
+	margin-top: 5rpx;
286
+	margin-right: 6rpx;
287
+	width: 24rpx;
288
+	height: 24rpx;
289
+}
290
+
291
+.copy_img image {
292
+	width: 100%;
293
+	height: 100%;
294
+}
295
+
296
+.text_image{
297
+	width:80rpx ;
298
+	height:80rpx ;
299
+}
300
+
301
+</style>
302
+<route lang="yaml">
303
+style:
304
+  navigationBarTitleText: 协商记录
305
+</route>

+ 4 - 1
src/pages/search/index.vue

@@ -383,7 +383,10 @@ function handleProductItemClick(
383
         & TaobaoProductThirdPartyWaresModel
383
         & TaobaoProductThirdPartyWaresModel
384
         & VipProductModel
384
         & VipProductModel
385
 ) {
385
 ) {
386
+// console.log(5);
387
+// console.log("5");
386
 
388
 
389
+// console.log(item);
387
 
390
 
388
   function navigateToDetail(params) {
391
   function navigateToDetail(params) {
389
     let otherDetailUrl = `/pages/store/product/other`
392
     let otherDetailUrl = `/pages/store/product/other`
@@ -392,7 +395,7 @@ function handleProductItemClick(
392
     })
395
     })
393
   }
396
   }
394
   // 大仓
397
   // 大仓
395
-  if (state.currentTab === PLATFORM_NAME.DC && item.type === '5') {
398
+  if (state.currentTab === PLATFORM_NAME.DC && item.type === 5) {
396
     uni.navigateTo({
399
     uni.navigateTo({
397
       url: `/pages/store/product/detail?id=${item.product_id}`
400
       url: `/pages/store/product/detail?id=${item.product_id}`
398
     })
401
     })

+ 30 - 5
src/pages/search/search-dacang.vue

@@ -13,7 +13,7 @@ import {remove, uniq} from "lodash-es";
13
 const deleteIcon = CDN_URL + '/static/assets/search_del_220616.png'
13
 const deleteIcon = CDN_URL + '/static/assets/search_del_220616.png'
14
 const upDefaultImg = CDN_URL + '/static/assets/tuijian_shangla.png'
14
 const upDefaultImg = CDN_URL + '/static/assets/tuijian_shangla.png'
15
 const downDefaultImg = CDN_URL + '/static/assets/tuijian_xiala.png'
15
 const downDefaultImg = CDN_URL + '/static/assets/tuijian_xiala.png'
16
-
16
+const undataImg = CDN_URL + '/static/assets/search_zanwuxiangguan_220617.png'
17
 const downRedImg = CDN_URL + '/static/assets/tuijian_xiala_red.png'
17
 const downRedImg = CDN_URL + '/static/assets/tuijian_xiala_red.png'
18
 const upRedImg = CDN_URL + '/static/assets/search_red_shangla_220617.png'
18
 const upRedImg = CDN_URL + '/static/assets/search_red_shangla_220617.png'
19
 const searchValue = ref()
19
 const searchValue = ref()
@@ -535,8 +535,15 @@ function handleShowMerchant(merchant) {
535
             </div>
535
             </div>
536
           </div>
536
           </div>
537
         </div>
537
         </div>
538
-        <CXBEmpty v-else/>
539
-
538
+        <!-- <CXBEmpty v-else/> -->
539
+        <div v-else class=" flex flex-1 justify-center items-center ">
540
+        <div>
541
+          <div style="width: 206rpx; height:206rpx; margin-top: 206rpx;  margin-bottom: 60rpx;">
542
+            <image :src="undataImg" style="width: 100%; height: 100%;"></image>
543
+          </div>
544
+          <div class="none_data">没有搜索到相关内容</div>
545
+        </div>
546
+        </div>
540
       </div>
547
       </div>
541
       <!-- 店铺列表 -->
548
       <!-- 店铺列表 -->
542
       <div class="mt-40 pb-10" v-if="state.tabvalue == 1">
549
       <div class="mt-40 pb-10" v-if="state.tabvalue == 1">
@@ -577,8 +584,15 @@ function handleShowMerchant(merchant) {
577
             </div>
584
             </div>
578
           </div>
585
           </div>
579
         </div>
586
         </div>
580
-        <CXBEmpty v-else/>
581
-
587
+        <!-- <CXBEmpty v-else/> -->
588
+        <div v-else class=" flex flex-1 justify-center items-center ">
589
+        <div>
590
+          <div style="width: 206rpx; height:206rpx; margin-top: 206rpx;  margin-bottom: 60rpx;">
591
+            <image :src="undataImg" style="width: 100%; height: 100%;"></image>
592
+          </div>
593
+          <div class="none_data">没有搜索到相关内容</div>
594
+        </div>
595
+        </div>
582
 
596
 
583
       </div>
597
       </div>
584
 
598
 
@@ -603,6 +617,17 @@ page {
603
   --nut-menu-item-active-text-color: #FE0032;
617
   --nut-menu-item-active-text-color: #FE0032;
604
   --nut-white: #fff;
618
   --nut-white: #fff;
605
 }
619
 }
620
+
621
+
622
+.none_data {
623
+  height: 30rpx;
624
+  font-size: 24rpx;
625
+  font-family: PingFangSC, PingFang SC;
626
+  font-weight: 400;
627
+  color: #999999;
628
+  line-height: 30rpx;
629
+  text-align: center;
630
+}
606
 </style>
631
 </style>
607
 
632
 
608
 <route lang="yaml">
633
 <route lang="yaml">

+ 5 - 5
src/pages/store/home/components/MerchantHeader.vue

@@ -127,14 +127,14 @@ if (props.model && props.model.care) {
127
 }
127
 }
128
 
128
 
129
 const state = reactive({
129
 const state = reactive({
130
-  options: [{
130
+  options: [ {
131
     text: '推荐',
131
     text: '推荐',
132
-    value: 1
133
-  }, {
134
-    text: '大仓商品',
132
+    value: 1,
133
+  },{
134
+    text: '大仓',
135
     value: 7,
135
     value: 7,
136
   }, {
136
   }, {
137
-    text: '平台商品',
137
+    text: '平台',
138
     value: 6,
138
     value: 6,
139
   }],
139
   }],
140
   menuDefaultValue: 1,
140
   menuDefaultValue: 1,

+ 30 - 22
src/pages/store/home/components/MerchantProductCard.vue

@@ -1,14 +1,14 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import type {PropType} from "vue";
3
-import {useCustomClassProp, useCustomStyleProp} from "~/composables";
2
+import type { PropType } from "vue";
3
+import { useCustomClassProp, useCustomStyleProp } from "~/composables";
4
 import {
4
 import {
5
   DyProductModel, IProductDetail,
5
   DyProductModel, IProductDetail,
6
   JdProductModel,
6
   JdProductModel,
7
   SuNingProductModel,
7
   SuNingProductModel,
8
   TaobaoProductThirdPartyWaresModel, VipProductModel
8
   TaobaoProductThirdPartyWaresModel, VipProductModel
9
 } from "~/apis/model/product.model";
9
 } from "~/apis/model/product.model";
10
-import {DcProductModel} from "~/apis/model/dacang.model";
11
-import {encodeBase64} from "~/utils/http/helper";
10
+import { DcProductModel } from "~/apis/model/dacang.model";
11
+import { encodeBase64 } from "~/utils/http/helper";
12
 
12
 
13
 interface ProductDetail {
13
 interface ProductDetail {
14
   mer_id: '',
14
   mer_id: '',
@@ -46,32 +46,30 @@ const is148Merchant = computed(() => {
46
 </script>
46
 </script>
47
 
47
 
48
 <template>
48
 <template>
49
-  <div class="bg-white rounded-lg text-dark"
50
-       :class="[ props.exClass]"
51
-       :style="[ props.exStyle]"
52
-  >
49
+  <div class="bg-white rounded-lg text-dark" :class="[props.exClass]" :style="[props.exStyle]">
53
 
50
 
54
-    <image :src="item.image" mode="widthFix" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" ></image>
51
+    <image :src="item.image" style="width: 320rpx;height: 320rpx;" :fade-in="true"></image>
55
 
52
 
56
     <div class="text-sm p-2 flex flex-col gap-1">
53
     <div class="text-sm p-2 flex flex-col gap-1">
57
-      <div class="line-clamp-2">
58
-        {{item.store_name}}
54
+      <div class=" text_unshow">
55
+        {{ item.store_name }}
59
       </div>
56
       </div>
60
-      <div v-if="item.type!=15" >
61
-        <div v-if="!is148Merchant" class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
62
-        <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
63
-               mode="widthFix" class="!w-8.5"></image>
64
-        <div class="px-2 flex items-center jusitify-center text-xs"  >
65
-          <div>
66
-            养老金 ¥{{item.yanglao || item.yanglao_price}}
57
+      <div v-if="item.type != 15">
58
+        <div v-if="!is148Merchant"
59
+          class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
60
+          <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png" mode="widthFix" class="!w-8.5">
61
+          </image>
62
+          <div class="px-2 flex items-center jusitify-center text-xs">
63
+            <div>
64
+              养老金 ¥{{ item.yanglao || item.yanglao_price }}
65
+            </div>
67
           </div>
66
           </div>
68
         </div>
67
         </div>
69
       </div>
68
       </div>
70
-      </div>
71
-      
69
+
72
       <div class="flex flex-row items-center gap-2">
70
       <div class="flex flex-row items-center gap-2">
73
         <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
71
         <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
74
-          <div class="!text-[24px]">{{ Number.parseFloat(item.price * 30).toFixed(2) }} </div>
72
+          <div class="!text-[24px]">{{ Number.parseFloat(item.price * 30) }} </div>
75
           <div class="text-sm">积分</div>
73
           <div class="text-sm">积分</div>
76
         </div>
74
         </div>
77
         <div class="flex text-[#FE0032] font-bold text-lg" v-else>
75
         <div class="flex text-[#FE0032] font-bold text-lg" v-else>
@@ -85,10 +83,20 @@ const is148Merchant = computed(() => {
85
 
83
 
86
       </div>
84
       </div>
87
       <div class="line-through text-xs font-bold flex " v-if="item.ot_price && !is148Merchant">
85
       <div class="line-through text-xs font-bold flex " v-if="item.ot_price && !is148Merchant">
88
-        ¥ {{item.ot_price}}
86
+        ¥ {{ item.ot_price }}
89
       </div>
87
       </div>
90
 
88
 
91
 
89
 
92
     </div>
90
     </div>
93
   </div>
91
   </div>
94
 </template>
92
 </template>
93
+<style scoped>
94
+.text_unshow {
95
+  white-space: nowrap;
96
+  /* 禁止换行 */
97
+  overflow: hidden;
98
+  /* 隐藏溢出内容 */
99
+  text-overflow: ellipsis;
100
+  /* 显示省略号 */
101
+}
102
+</style>

+ 171 - 77
src/pages/store/product/detail.vue

@@ -70,6 +70,10 @@ const state = reactive({
70
 const detail: any = ref(null)
70
 const detail: any = ref(null)
71
 const isTo = ref(3)
71
 const isTo = ref(3)
72
 let isShow = ref(false)
72
 let isShow = ref(false)
73
+
74
+//展开收起
75
+const isExpanded = ref(false)
76
+
73
 onShow(() => {
77
 onShow(() => {
74
   uni.showLoading({
78
   uni.showLoading({
75
     title: '数据加载中',
79
     title: '数据加载中',
@@ -205,11 +209,15 @@ onShareAppMessage(async () => {
205
     icon: 'none'
209
     icon: 'none'
206
   })
210
   })
207
   return await getShareId({ pid: state.id, type: 1 }).then(res => {
211
   return await getShareId({ pid: state.id, type: 1 }).then(res => {
212
+    console.log(99999999, res);
208
     if (res) {
213
     if (res) {
214
+
215
+
209
       state.shareId = res.share_id
216
       state.shareId = res.share_id
210
       uni.hideLoading()
217
       uni.hideLoading()
211
       return {
218
       return {
212
         title: `${detail.value.store_name}`,
219
         title: `${detail.value.store_name}`,
220
+        imageUrl: res.url,
213
         path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
221
         path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
214
       }
222
       }
215
     }
223
     }
@@ -391,7 +399,7 @@ function handleCreateShopping() {
391
     // product_attr_unique: JSON.stringify(state.currentSku),
399
     // product_attr_unique: JSON.stringify(state.currentSku),
392
     product_attr_unique: state.currentSku.unique,
400
     product_attr_unique: state.currentSku.unique,
393
     cart_num: state.cartNum,
401
     cart_num: state.cartNum,
394
-    is_new: (state.flag === '1' || state.flag === '3'|| state.flag == '5') ? '1' : '0'
402
+    is_new: (state.flag === '1' || state.flag === '3' || state.flag == '5') ? '1' : '0'
395
   }).then(res => {
403
   }).then(res => {
396
     console.log('resres', res)
404
     console.log('resres', res)
397
 
405
 
@@ -416,30 +424,7 @@ function handleCreateShopping() {
416
       }
424
       }
417
     }
425
     }
418
   }).catch(error => {
426
   }).catch(error => {
419
-    // if (error === '会员礼包不能加入购物车') {
420
-    //   return uni.showToast({
421
-    //     title: error,
422
-    //     icon: 'none'
423
-    //   })
424
-    // } else if (error === '库存不足') {
425
-    //   return uni.showToast({
426
-    //     title: error,
427
-    //     icon: 'none'
428
-    //   })
429
-    // }
430
-    // else if(error==='您已是高级会员,分红满额后可再次购买~') {
431
-    //   uni.showToast({
432
-    //         title: error,
433
-    //         icon: 'none'
434
-    //       })
435
-
436
-    // }else{
437
-    //   console.log('我是error>>>',error);
438
-    //   uni.showToast({
439
-    //         title: error,
440
-    //         icon: 'none'
441
-    //       })
442
-    // }
427
+
443
     console.log('我是error>>>', error);
428
     console.log('我是error>>>', error);
444
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
429
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
445
     if (error === '请登录') {
430
     if (error === '请登录') {
@@ -478,22 +463,7 @@ function handleBuyshow() {
478
       })
463
       })
479
     }
464
     }
480
   }).catch(error => {
465
   }).catch(error => {
481
-    // if (error === '会员礼包不能加入购物车') {
482
-    //   return uni.showToast({
483
-    //     title: error,
484
-    //     icon: 'none'
485
-    //   })
486
-    // } else if (error === '库存不足') {
487
-    //   return uni.showToast({
488
-    //     title: error,
489
-    //     icon: 'none'
490
-    //   })
491
-    // }
492
-    // else {
493
-    //   return uni.navigateTo({
494
-    //     url: '/pages/user/login/index'
495
-    //   })
496
-    // }
466
+
497
     console.log('我是error>>>', error);
467
     console.log('我是error>>>', error);
498
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
468
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
499
     if (error === '请登录') {
469
     if (error === '请登录') {
@@ -539,22 +509,7 @@ function handleAddshow() {
539
       state.isShowSku = false
509
       state.isShowSku = false
540
     }
510
     }
541
   }).catch(error => {
511
   }).catch(error => {
542
-    // if (error === '会员礼包不能加入购物车') {
543
-    //   return uni.showToast({
544
-    //     title: error,
545
-    //     icon: 'none'
546
-    //   })
547
-    // } else if (error === '库存不足') {
548
-    //   return uni.showToast({
549
-    //     title: error,
550
-    //     icon: 'none'
551
-    //   })
552
-    // }
553
-    // else {
554
-    //   return uni.navigateTo({
555
-    //     url: '/pages/user/login/index'
556
-    //   })
557
-    // }
512
+
558
     console.log('我是error>>>', error);
513
     console.log('我是error>>>', error);
559
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
514
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
560
     if (error === '请登录') {
515
     if (error === '请登录') {
@@ -590,10 +545,13 @@ function notStarted() {
590
 
545
 
591
 // 规格显示双按钮
546
 // 规格显示双按钮
592
 function handleTwobtn() {
547
 function handleTwobtn() {
548
+  console.log(state.currentSku);
593
   isTo.value = 2
549
   isTo.value = 2
594
   state.isShowSku = !state.isShowSku
550
   state.isShowSku = !state.isShowSku
595
 }
551
 }
596
 function handleQgbtn() {
552
 function handleQgbtn() {
553
+  console.log(state.currentSku);
554
+
597
   isTo.value = 4
555
   isTo.value = 4
598
   state.isShowSku = !state.isShowSku
556
   state.isShowSku = !state.isShowSku
599
 }
557
 }
@@ -614,8 +572,8 @@ function handleOrderConfirm(flag: '1' | '2' | '3' | '5') {
614
       }).then(() => {
572
       }).then(() => {
615
         setTimeout(() => {
573
         setTimeout(() => {
616
           uni.redirectTo({
574
           uni.redirectTo({
617
-          url: '/pages/user/login/index?key=4'
618
-        })
575
+            url: '/pages/user/login/index?key=4'
576
+          })
619
         }, 500)
577
         }, 500)
620
 
578
 
621
       })
579
       })
@@ -729,6 +687,15 @@ function handleShowCustomer() {
729
   })
687
   })
730
 }
688
 }
731
 
689
 
690
+//查看更多》
691
+function handleTomoreProduct(merId: string) {
692
+  console.log(merId)
693
+  uni.navigateTo({
694
+    url: `/pages/store/home/index?id=${merId}`
695
+  })
696
+}
697
+
698
+
732
 // 距离顶部距离
699
 // 距离顶部距离
733
 let Scroll_X = ref(0)
700
 let Scroll_X = ref(0)
734
 
701
 
@@ -744,6 +711,14 @@ onPageScroll((page) => {
744
     headerClass.value = ''
711
     headerClass.value = ''
745
   }
712
   }
746
 })
713
 })
714
+
715
+function handleisExpanded (){
716
+  isExpanded.value=!isExpanded.value
717
+}
718
+
719
+
720
+
721
+
747
 </script>
722
 </script>
748
 
723
 
749
 <template>
724
 <template>
@@ -800,7 +775,7 @@ onPageScroll((page) => {
800
       <div class="flex flex-col p-3 gap-3">
775
       <div class="flex flex-col p-3 gap-3">
801
         <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2">
776
         <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2">
802
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
777
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
803
-            <div class="!text-[24px]">{{ Number.parseFloat(detail.price).toFixed(2) }} </div>
778
+            <div class="!text-[24px]">{{ Number.parseFloat(detail.price * 30) }} </div>
804
             <div class="text-sm">积分</div>
779
             <div class="text-sm">积分</div>
805
           </div>
780
           </div>
806
           <div v-else>
781
           <div v-else>
@@ -832,13 +807,30 @@ onPageScroll((page) => {
832
             <div class="flex bg-primary text-white rounded text-[10px] text-center" v-if="detail.type == 5">
807
             <div class="flex bg-primary text-white rounded text-[10px] text-center" v-if="detail.type == 5">
833
               <div class=" h-4 w-4 ">仓</div>
808
               <div class=" h-4 w-4 ">仓</div>
834
             </div>
809
             </div>
835
-            <div class=" justify-center items-center" v-html="detail.store_name">
810
+            <div class="text-ellipsis justify-center items-center" v-html="detail.store_name">
836
             </div>
811
             </div>
837
           </div>
812
           </div>
838
           <div v-if="detail.store_info" class="text-gray-600 text-sm w-fit px-1"
813
           <div v-if="detail.store_info" class="text-gray-600 text-sm w-fit px-1"
839
             :class="is148Merchant ? 'border border-solid border-gray' : ''">
814
             :class="is148Merchant ? 'border border-solid border-gray' : ''">
840
-            {{ detail.store_info }}
815
+            <div v-if="isExpanded==false"  >
816
+              {{ detail.store_info.length <= 50 ? detail.store_info : detail.store_info.slice(0, 50) + '...' }} 
817
+              <span
818
+              @click="handleisExpanded"
819
+                v-if="detail.store_info.length > 50" style="color:red">
820
+                展开
821
+                </span>
822
+            </div>
823
+            <div v-else-if="isExpanded==true" >
824
+              {{ detail.store_info }} 
825
+              <span
826
+              @click="handleisExpanded"
827
+                style="color:red">
828
+                收起
829
+                </span>
830
+            </div>
831
+
841
           </div>
832
           </div>
833
+
842
         </div>
834
         </div>
843
 
835
 
844
         <div class="flex gap-3 text-[12px]">
836
         <div class="flex gap-3 text-[12px]">
@@ -902,12 +894,16 @@ onPageScroll((page) => {
902
       </div>
894
       </div>
903
 
895
 
904
     </div>
896
     </div>
905
-    <div class="flex flex-col bg-white" v-if="detail.merchant.recommend.length>=3" >
897
+    <!-- v-if="detail.merchant.recommend.length>=3" -->
898
+    <div class="flex flex-col bg-white" v-if="detail.merchant.recommend.length >= 3">
906
       <div class="p-3">
899
       <div class="p-3">
907
-        <div
908
-          class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
909
-          <div class="pl-2">
910
-            店铺推荐
900
+        <div class="flex flex-1 justify-between items-center ">
901
+          <div class="" style="vertical-align:bottom">
902
+            <image style="width:7rpx ;height: 28rpx; margin-right: 8rpx;" src="../../../static/icon/title_1.png"></image>
903
+            <span class="text_dptj">店铺推荐</span>
904
+          </div>
905
+          <div class="text_ckgd" @click="handleTomoreProduct(detail.mer_id)">
906
+            查看更多 >
911
           </div>
907
           </div>
912
         </div>
908
         </div>
913
       </div>
909
       </div>
@@ -915,9 +911,54 @@ onPageScroll((page) => {
915
         <scroll-view class=" whitespace-nowrap  w-screen  text-white text-sm" :scroll-with-animation="true"
911
         <scroll-view class=" whitespace-nowrap  w-screen  text-white text-sm" :scroll-with-animation="true"
916
           :scroll-x="true" :show-scrollbar="false">
912
           :scroll-x="true" :show-scrollbar="false">
917
           <div class="pl-3" v-if="detail && detail.merchant">
913
           <div class="pl-3" v-if="detail && detail.merchant">
918
-            <div v-for="(item, index) in detail.merchant.recommend" :key="index" @click="handleProductItemClick(item)"
914
+            <div v-for="(item, index) in detail.merchant.recommend" :key="index"
919
               class="flex inline-flex items-center justify-center relative ">
915
               class="flex inline-flex items-center justify-center relative ">
920
-              <MerchantProductCard :item="item" exClass="w-40 border border-solid border-gray-200 mr-3" />
916
+              <!-- <MerchantProductCard :item="item" exClass="w-30 border border-solid border-gray-200 mr-3" /> -->
917
+              <div @click="handleProductItemClick(item)" style="width: 233rpx;" class="bg-white rounded-lg text-dark">
918
+
919
+                <image :src="item.image" style="width: 202rpx;height: 202rpx;border-radius: 16rpx; " :fade-in="true">
920
+                </image>
921
+
922
+                <div class="text-sm p-2 flex flex-col gap-1">
923
+                  <div class="text-hidden">
924
+                    {{ item.store_name }}
925
+                  </div>
926
+                  <div v-if="item.type != 15">
927
+                    <div v-if="!is148Merchant"
928
+                      class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
929
+                      <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png" mode="widthFix"
930
+                        style="width: 46rpx; height: 28rpx;">
931
+                      </image>
932
+                      <div class="ylj_d flex items-center jusitify-center ">
933
+                        <div>
934
+                          养老金 ¥{{ item.yanglao || item.yanglao_price }}
935
+                        </div>
936
+                      </div>
937
+                    </div>
938
+                  </div>
939
+
940
+                  <div class="flex flex-row items-center gap-2">
941
+                    <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
942
+                      <div class="!text-[24px]">{{ Number.parseFloat(item.price * 30) }} </div>
943
+                      <div class="text-sm">积分</div>
944
+                    </div>
945
+                    <div class="flex text-[#FE0032] font-bold text-lg" v-else>
946
+                      <div>
947
+                        ¥
948
+                      </div>
949
+                      <div>
950
+                        {{ item.price }}
951
+                      </div>
952
+                    </div>
953
+
954
+                  </div>
955
+                  <div class="line-through text-xs font-bold flex " v-if="item.ot_price && !is148Merchant">
956
+                    ¥ {{ item.ot_price }}
957
+                  </div>
958
+
959
+
960
+                </div>
961
+              </div>
921
             </div>
962
             </div>
922
 
963
 
923
           </div>
964
           </div>
@@ -928,10 +969,10 @@ onPageScroll((page) => {
928
 
969
 
929
     <div class="flex flex-col justify-center bg-white">
970
     <div class="flex flex-col justify-center bg-white">
930
       <div class="p-3">
971
       <div class="p-3">
931
-        <div
932
-          class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-800 before:rounded relative inline-block">
933
-          <div class="pl-2">
934
-            图文详情
972
+        <div class="flex flex-1 justify-start items-center ">
973
+          <div class="" style="vertical-align:bottom">
974
+            <image style="width:7rpx ;height: 28rpx; margin-right: 8rpx;" src="../../../static/icon/title_1.png"></image>
975
+            <span class="text_dptj">图片详情</span>
935
           </div>
976
           </div>
936
         </div>
977
         </div>
937
       </div>
978
       </div>
@@ -946,10 +987,10 @@ onPageScroll((page) => {
946
 
987
 
947
     <div class="flex flex-col pb-safe gap-3">
988
     <div class="flex flex-col pb-safe gap-3">
948
       <div class="p-3 bg-white">
989
       <div class="p-3 bg-white">
949
-        <div
950
-          class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
951
-          <div class="pl-2">
952
-            精品推荐
990
+        <div class="flex flex-1 justify-start items-center ">
991
+          <div class="" style="vertical-align:bottom">
992
+            <image style="width:7rpx ;height: 28rpx; margin-right: 8rpx;" src="../../../static/icon/title_1.png"></image>
993
+            <span class="text_dptj">精品推荐</span>
953
           </div>
994
           </div>
954
         </div>
995
         </div>
955
       </div>
996
       </div>
@@ -1165,6 +1206,59 @@ button::after {
1165
 .out-conter {
1206
 .out-conter {
1166
   text-align: center;
1207
   text-align: center;
1167
 }
1208
 }
1209
+
1210
+.text_dptj {
1211
+  height: 28rpx;
1212
+  font-size: 28rpx;
1213
+  font-family: PingFangSC, PingFang SC;
1214
+  font-weight: 600;
1215
+  color: #333333;
1216
+  line-height: 28rpx;
1217
+}
1218
+
1219
+.text_ckgd {
1220
+  height: 22rpx;
1221
+  font-size: 24rpx;
1222
+  font-family: PingFangSC, PingFang SC;
1223
+  font-weight: 400;
1224
+  color: #999999;
1225
+  line-height: 22rpx;
1226
+}
1227
+
1228
+
1229
+.text-hidden {
1230
+  overflow: hidden;
1231
+  white-space: nowrap;
1232
+  text-overflow: ellipsis;
1233
+}
1234
+
1235
+.ylj_d {
1236
+  height: 25rpx;
1237
+  font-size: 18rpx;
1238
+  font-family: PingFangSC, PingFang SC;
1239
+  font-weight: 400;
1240
+  color: #FE0032;
1241
+  line-height: 25rpx;
1242
+  padding-left: 6rpx;
1243
+  padding-right: 6rpx;
1244
+}
1245
+
1246
+.text-container {
1247
+  overflow: hidden;
1248
+}
1249
+
1250
+.clamp-expanded {
1251
+  overflow: visible;
1252
+}
1253
+
1254
+
1255
+.text-ellipsis {
1256
+  display: -webkit-box;
1257
+  -webkit-box-orient: vertical;
1258
+  overflow: hidden;
1259
+  text-overflow: ellipsis;
1260
+  -webkit-line-clamp: 2; /* 控制显示行数 */
1261
+}
1168
 </style>
1262
 </style>
1169
 <route lang="yaml">
1263
 <route lang="yaml">
1170
 style:
1264
 style:

+ 39 - 31
src/pages/user/index.vue

@@ -2,7 +2,7 @@
2
 import { useUserStore } from "~/stores/userStore";
2
 import { useUserStore } from "~/stores/userStore";
3
 import CXBAuthorize from "~/components/CXBAuthorize/CXBAuthorize.vue";
3
 import CXBAuthorize from "~/components/CXBAuthorize/CXBAuthorize.vue";
4
 import { getAgentInfo, getUserInfo } from "~/apis/user";
4
 import { getAgentInfo, getUserInfo } from "~/apis/user";
5
-import { CDN_URL,CDM_URL } from "~/config/app";
5
+import { CDN_URL, CDM_URL } from "~/config/app";
6
 import Routine from "~/libs/routine";
6
 import Routine from "~/libs/routine";
7
 import { totalOrderNumber } from "~/apis/order.api";
7
 import { totalOrderNumber } from "~/apis/order.api";
8
 import type { OrderQuantityModel } from "~/apis/model/order.model";
8
 import type { OrderQuantityModel } from "~/apis/model/order.model";
@@ -10,6 +10,7 @@ import FPopup from "~/components/FPopup/FPopup.vue";
10
 import { CANCEL_EVENT, OPEN_EVENT } from "~/constants/event";
10
 import { CANCEL_EVENT, OPEN_EVENT } from "~/constants/event";
11
 import type { Ref } from "vue";
11
 import type { Ref } from "vue";
12
 const pageStore = usePageStoreWidthOut()
12
 const pageStore = usePageStoreWidthOut()
13
+const userStore = useUserStore();
13
 const currentType = ref('')
14
 const currentType = ref('')
14
 const myOrderList = [{
15
 const myOrderList = [{
15
   id: 'noPay',
16
   id: 'noPay',
@@ -90,9 +91,9 @@ const myServiceList = [{
90
   url: '/pages/invite-friends/index'
91
   url: '/pages/invite-friends/index'
91
 }, {
92
 }, {
92
   icon: CDN_URL + '/static/assets/dianpuruzhu_220620.png',
93
   icon: CDN_URL + '/static/assets/dianpuruzhu_220620.png',
93
-  text: '商铺入驻',
94
+  text: userStore.userInfo?.is_merchant=="-1"?'商铺入驻':'我的商铺',
94
   url: ''
95
   url: ''
95
-},  {
96
+}, {
96
   icon: CDN_URL + '/static/assets/mine_setting_220620.png',
97
   icon: CDN_URL + '/static/assets/mine_setting_220620.png',
97
   text: '设置',
98
   text: '设置',
98
   url: '/pages/setting/index'
99
   url: '/pages/setting/index'
@@ -100,7 +101,7 @@ const myServiceList = [{
100
 const state = reactive({
101
 const state = reactive({
101
   isLogin: false
102
   isLogin: false
102
 })
103
 })
103
-const userStore = useUserStore();
104
+
104
 const orderQuantity: Ref<OrderQuantityModel> = ref()
105
 const orderQuantity: Ref<OrderQuantityModel> = ref()
105
 // const orderQuantity =reactive({
106
 // const orderQuantity =reactive({
106
 //   noComment: '',
107
 //   noComment: '',
@@ -180,7 +181,7 @@ function handleService(item: {
180
   text: string
181
   text: string
181
   url: string
182
   url: string
182
 }) {
183
 }) {
183
-  if (item.text === '商铺入驻') {
184
+  if (item.text === '商铺入驻'||item.text === '我的店铺') {
184
     return uni.navigateToMiniProgram({
185
     return uni.navigateToMiniProgram({
185
       appId: 'wx9a3e4ab07f8a9ba2',
186
       appId: 'wx9a3e4ab07f8a9ba2',
186
       path: 'pages/index/index',
187
       path: 'pages/index/index',
@@ -239,7 +240,7 @@ function handleShowMyAllOrder(tab?: number) {
239
 
240
 
240
 const userType = computed(() => {
241
 const userType = computed(() => {
241
   const userRichType = userStore.userInfo?.user_rich_type
242
   const userRichType = userStore.userInfo?.user_rich_type
242
- 
243
+
243
   // console.log(userStore.userInfo)
244
   // console.log(userStore.userInfo)
244
   // 普通用户
245
   // 普通用户
245
   if (userRichType == 0) {
246
   if (userRichType == 0) {
@@ -325,11 +326,11 @@ const backImg = computed(() => {
325
     const areamanage = userStore.userInfo?.area_manage_type
326
     const areamanage = userStore.userInfo?.area_manage_type
326
     // 县/区代理
327
     // 县/区代理
327
     if (areamanage == 'district') {
328
     if (areamanage == 'district') {
328
-      return CDM_URL+'/image/2023-11-24/20231124154421388.png'
329
+      return CDM_URL + '/image/2023-11-24/20231124154421388.png'
329
     }
330
     }
330
     // 市代理
331
     // 市代理
331
     if (areamanage == 'city') {
332
     if (areamanage == 'city') {
332
-      return CDM_URL+'/image/2023-11-24/20231124154612477.png'
333
+      return CDM_URL + '/image/2023-11-24/20231124154612477.png'
333
     }
334
     }
334
   }
335
   }
335
 
336
 
@@ -391,9 +392,9 @@ function handleShowMyRulePage() {
391
       <div class="pt-15 ">
392
       <div class="pt-15 ">
392
         <div class="flex gap-2 mb-2 text-white mb-6">
393
         <div class="flex gap-2 mb-2 text-white mb-6">
393
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
394
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
394
-            @click="handleShowMyProfile" mode="widthFix" class="w-9 h-9 rounded-full"></image>
395
-          <image v-else @click="checkAuth" src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix"
396
-            class="w-9 h-9 rounded-full" />
395
+            @click="handleShowMyProfile" style="width:74rpx; height:74rpx;" class="rounded-full"></image>
396
+          <image v-else @click="checkAuth" src="https://app.bjtdba.com/uploads/logo.jpg" 
397
+            class="rounded-full" style="width:74rpx; height:74rpx;" />
397
           <div class="flex flex-col">
398
           <div class="flex flex-col">
398
             <div class="flex">
399
             <div class="flex">
399
               <div class="text-sm">
400
               <div class="text-sm">
@@ -412,21 +413,19 @@ function handleShowMyRulePage() {
412
                 <image mode="heightFix" lazy-load class="vip_img" :src="userType"></image>
413
                 <image mode="heightFix" lazy-load class="vip_img" :src="userType"></image>
413
               </div>
414
               </div>
414
               <!-- 市区县代理 -->
415
               <!-- 市区县代理 -->
415
-              <div @click="openPopup" v-if="areaType"
416
-                class="flex rounded-full  text-[12px] text-white w-12 h-5  w-fit ">
416
+              <div @click="openPopup" v-if="areaType" class="flex rounded-full  text-[12px] text-white w-12 h-5  w-fit ">
417
                 <image mode="heightFix" lazy-load class="vip_img" :src="areaType"></image>
417
                 <image mode="heightFix" lazy-load class="vip_img" :src="areaType"></image>
418
               </div>
418
               </div>
419
               <!-- 股东 -->
419
               <!-- 股东 -->
420
-              <div v-if="AlholderType" 
421
-                class="flex rounded-full  text-[12px] text-white w-12 h-5   w-fit">
420
+              <div v-if="AlholderType" class="flex rounded-full  text-[12px] text-white w-12 h-5   w-fit">
422
                 <image mode="heightFix" lazy-load class="vip_img" :src="AlholderType"></image>
421
                 <image mode="heightFix" lazy-load class="vip_img" :src="AlholderType"></image>
423
               </div>
422
               </div>
424
             </div>
423
             </div>
425
           </div>
424
           </div>
426
           <FPopup v-model:show="showValue" position="center" exClass="box_2 ">
425
           <FPopup v-model:show="showValue" position="center" exClass="box_2 ">
427
             <div class="box_2 flex-row">
426
             <div class="box_2 flex-row">
428
-              <div class="box_2" v-if="backImg" >
429
-                <image  lazy-load class="img_1" :src="backImg"></image>
427
+              <div class="box_2" v-if="backImg">
428
+                <image lazy-load class="img_1" :src="backImg"></image>
430
               </div>
429
               </div>
431
               <div class="group_2 flex-col lolr ">
430
               <div class="group_2 flex-col lolr ">
432
                 <div class="div_box pong1 ">
431
                 <div class="div_box pong1 ">
@@ -458,29 +457,31 @@ function handleShowMyRulePage() {
458
           </FPopup>
457
           </FPopup>
459
 
458
 
460
         </div>
459
         </div>
461
-        <div class="bg-white rounded flex flex-col gap-6 py-4 text-xl">
462
-          <div v-if="userStore.userInfo" class="flex flex-wrap">
463
-            <div @tap="handleShowAnnuityDetail" class="w-1/3 flex flex-col justify-center items-center">
464
-              <div>{{ userStore.yanglao.all_yanglao }}</div>
460
+        <div style="border-radius: 16rpx;" class="bg-white flex flex-col gap-6 py-4 text-xl">
461
+          <div v-if="userStore.userInfo" class="flex ">
462
+            <div @tap="handleShowAnnuityDetail" class="w-1/2 flex flex-col justify-center" style="padding-left: 48rpx;">
465
               <div class="text-xs">养老金</div>
463
               <div class="text-xs">养老金</div>
464
+              <div>{{ userStore.yanglao.all_yanglao }}</div>
466
             </div>
465
             </div>
467
-            <div @tap="handleShowMyInvitation" class="w-1/3  flex flex-col justify-center items-center">
468
-              <div>{{ agentInfo.brokerage_price}}</div>
466
+            <div @tap="handleShowMyInvitation" class="w-1/2  flex flex-col justify-center " style="padding-left: 48rpx;">
469
               <div class="text-xs">我的佣金</div>
467
               <div class="text-xs">我的佣金</div>
470
-            </div>
471
-            <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center items-center">
472
-              <div>{{ userStore.userInfo.score }}</div>
473
-              <div class="text-xs">我的积分</div>
468
+              <div>{{ agentInfo.brokerage_price }}</div>
474
             </div>
469
             </div>
475
           </div>
470
           </div>
476
           <div v-if="userStore.userInfo" class="flex">
471
           <div v-if="userStore.userInfo" class="flex">
477
-            <div @click="handleToRedIntegral" class="w-1/2 flex flex-col justify-center items-center">
478
-              <div>{{ userStore.userInfo.member_brokerage_price}}</div>
472
+            <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center " style="padding-left: 48rpx;">
473
+              <div class="text-xs">我的积分</div>
474
+              <div>{{ userStore.userInfo.score }}</div>
475
+            </div>
476
+            <div class="icon_d"></div>
477
+            <div @click="handleToRedIntegral" class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;">
479
               <div class="text-xs">红积分提现</div>
478
               <div class="text-xs">红积分提现</div>
479
+              <div>{{ userStore.userInfo.member_brokerage_price }}</div>
480
             </div>
480
             </div>
481
-            <div class="w-1/2 flex flex-col  justify-center items-center">
482
-              <div>{{ userStore.userInfo.team_number }}</div>
481
+            <div class="icon_d"></div>
482
+            <div class="w-1/3 flex flex-col  justify-center" style="padding-left: 48rpx;">
483
               <div class="text-xs">团队人数</div>
483
               <div class="text-xs">团队人数</div>
484
+              <div>{{ userStore.userInfo.team_number }}</div>
484
             </div>
485
             </div>
485
           </div>
486
           </div>
486
 
487
 
@@ -680,6 +681,13 @@ page {
680
   position: absolute;
681
   position: absolute;
681
   top: 447rpx
682
   top: 447rpx
682
 }
683
 }
684
+
685
+
686
+.icon_d {
687
+  width: 1rpx;
688
+  height: 40rpx;
689
+  background: #D8D8D8;
690
+}
683
 </style>
691
 </style>
684
 <route lang="yaml">
692
 <route lang="yaml">
685
 style:
693
 style:

BIN
src/static/icon/ckgd.png


BIN
src/static/icon/title_1.png


BIN
src/static/icon/复制.png


BIN
src/static/icon/展开.png


BIN
src/static/icon/快递.png


BIN
src/static/icon/扫码.png


BIN
src/static/icon/收起.png


BIN
src/static/icon/联系商家.png


+ 2 - 0
src/stores/userStore.ts

@@ -57,6 +57,8 @@ export const useUserStore = defineStore('userStore', {
57
         async getUserInfo() {
57
         async getUserInfo() {
58
             try {
58
             try {
59
                 this.userInfo = await getUserInfo();
59
                 this.userInfo = await getUserInfo();
60
+                console.log(this.userInfo);
61
+                
60
 
62
 
61
             } catch (error) {
63
             } catch (error) {
62
                 uni.navigateTo({
64
                 uni.navigateTo({