Basil 2 yıl önce
ebeveyn
işleme
1a259d6e92

+ 1 - 0
components.d.ts

@@ -57,6 +57,7 @@ declare module '@vue/runtime-core' {
57 57
     NutOverlay: typeof import('uniapp-nutui/components/overlay/overlay.vue')['default']
58 58
     NutPicker: typeof import('uniapp-nutui/components/picker/picker.vue')['default']
59 59
     NutPopup: typeof import('uniapp-nutui/components/popup/popup.vue')['default']
60
+    NutRate: typeof import('uniapp-nutui/components/rate/rate.vue')['default']
60 61
     NutSearchbar: typeof import('uniapp-nutui/components/searchbar/searchbar.vue')['default']
61 62
     NutSwitch: typeof import('uniapp-nutui/components/switch/switch.vue')['default']
62 63
     NutTable: typeof import('uniapp-nutui/components/table/table.vue')['default']

+ 22 - 13
src/apis/common.ts

@@ -42,9 +42,17 @@ enum API {
42 42
     // 意见反馈-类型
43 43
     FEEDBACK_TYPE_NEW = '/api/common/feedback_type_new',
44 44
     // 意见反馈提交
45
-    FEEDBACK = '/api/user/feedback'
45
+    FEEDBACK = '/api/user/feedback',
46
+    // 获取热门搜索关键词
47
+    HOT_KEYWORD = '/api/common/hot_keyword'
46 48
 }
47 49
 
50
+// 获取热门搜索关键ygnk
51
+export function getHotkeyWord() {
52
+    return defHttp.get({
53
+        url: API.HOT_KEYWORD,
54
+    })
55
+}
48 56
 /**
49 57
  * 添加反馈
50 58
  * @param params
@@ -79,19 +87,20 @@ export function getLocal() {
79 87
         content: '为了您更好的体验,请同意授权位置',
80 88
         success: (res) => {
81 89
             if (res.confirm) {
82
-                // uni.getLocation({
83
-                //     type: 'wgs84',
84
-                //     success(res) {
85
-                //         uni.setStorageSync(USER_LATITUDE, res.latitude)
86
-                //         uni.setStorageSync(USER_LONGITUDE, res.longitude)
87
-                //         getRegeo(res.latitude, res.longitude);
88
-                //     }
89
-                // })
90
-                amap.getWxLocation(async (loc) => {
91
-                    // 获取地址描述数据
92
-                    const regeoRes = await amap.getRegeo({location: loc});
93
-                    console.log(regeoRes.data.regeocode.addressComponent)
90
+                uni.getLocation({
91
+                    type: 'wgs84',
92
+                    success(res) {
93
+                        console.log(res)
94
+                        uni.setStorageSync(USER_LATITUDE, res.latitude)
95
+                        uni.setStorageSync(USER_LONGITUDE, res.longitude)
96
+                        // getRegeo(res.latitude, res.longitude);
97
+                    }
94 98
                 })
99
+                // amap.getWxLocation(async (loc) => {
100
+                    // 获取地址描述数据
101
+                    // const regeoRes = await amap.getRegeo({location: loc});
102
+                    // console.log(regeoRes.data.regeocode.addressComponent)
103
+                // })
95 104
             }
96 105
         }
97 106
     })

+ 4 - 2
src/apis/merchant.ts

@@ -103,11 +103,13 @@ export function getRecommendList(pageParams: PageModel) {
103 103
  * @param pageParams
104 104
  */
105 105
 export function getVipAreaList(pageParams: PageModel): Promise<VipAreaResult> {
106
+
106 107
     return defHttp.get({
107 108
         url: API.GET_VIP_AREA_LIST,
108 109
         params: {
109
-            page: pageParams.page === undefined ? 1 : pageParams.page,
110
-            limit: pageParams.limit === undefined ? 20 : pageParams.limit
110
+            ...pageParams
111
+            // page: pageParams.page === undefined ? 1 : pageParams.page,
112
+            // limit: pageParams.limit === undefined ? 20 : pageParams.limit
111 113
         }
112 114
     })
113 115
 }

+ 107 - 0
src/apis/model/after-sales-order.model.ts

@@ -0,0 +1,107 @@
1
+export interface AfterSalesOrderResult {
2
+    list: Array<AfterSalesOrderModel>
3
+    count: number
4
+}
5
+
6
+export interface AfterSalesOrderModel {
7
+    refund_order_id: string
8
+    refund_price: string
9
+    mer_id: number
10
+    status: string
11
+    merchant: MerchantModel
12
+    refundProduct: Array<RefundProductModel>
13
+}
14
+
15
+export interface MerchantModel {
16
+    mer_name: string
17
+    mer_id: number
18
+    mer_avatar: string
19
+}
20
+
21
+export interface RefundProductModel {
22
+    refund_product_id: string
23
+    refund_order_id: string
24
+    order_product_id: string
25
+    refund_num: string
26
+    create_time: string
27
+    product: ProductsModel
28
+}
29
+
30
+export interface ProductsModel {
31
+    order_product_id: number
32
+    order_id: number
33
+    uid: number
34
+    cart_id: number
35
+    product_id: number
36
+    extension_one: string
37
+    extension_two: string
38
+    product_sku: string
39
+    is_refund: number
40
+    product_num: number
41
+    refund_num: number
42
+    is_reply: number
43
+    product_price: string
44
+    cart_info: CartInfoModel
45
+    create_time: string
46
+    type: string
47
+}
48
+
49
+export interface CartInfoModel {
50
+    product: ProductModel
51
+    productAttr: ProductAttrModel
52
+    product_type: number
53
+}
54
+
55
+export interface ProductModel {
56
+    product_id: number
57
+    image: string
58
+    store_name: string
59
+    is_show: number
60
+    status: number
61
+    is_del: number
62
+    unit_name: string
63
+    price: string
64
+    mer_status: number
65
+    temp_id: number
66
+    give_coupon_ids: Array<string>
67
+    is_gift_bag: number
68
+    is_used: number
69
+    product_type: number
70
+    old_product_id: number
71
+    temp: TempModel
72
+}
73
+
74
+export interface TempModel {
75
+    shipping_template_id: number
76
+    name: string
77
+    type: number
78
+    appoint: number
79
+    undelivery: number
80
+    mer_id: number
81
+    is_default: number
82
+    sort: number
83
+    create_time: string
84
+    undelives: string
85
+    freeAddress: FreeAddressModel
86
+}
87
+
88
+export interface FreeAddressModel {
89
+    shipping_template_free_id: number
90
+    temp_id: number
91
+    city_id: string
92
+    number: number
93
+    price: string
94
+}
95
+export interface ProductAttrModel {
96
+    product_id: number
97
+    stock: number
98
+     price: string
99
+    unique: string
100
+    sku: string
101
+    volume: string
102
+    weight: string
103
+    ot_price: string
104
+    cost: string
105
+    bc_extension_one: string
106
+    bc_extension_two: string
107
+}

+ 14 - 0
src/apis/model/comment-product.ts

@@ -0,0 +1,14 @@
1
+export interface CommentProductRequest {
2
+    // 评价内容
3
+    comment: string
4
+    // 订单 order_product_id
5
+    id: string
6
+    // 图片
7
+    pics: Array<string>
8
+    // 物流评分
9
+    postage_score: number
10
+    // 商品评分
11
+    product_score: number
12
+    // 服务态度
13
+    service_score: number
14
+}

+ 1 - 0
src/apis/model/pageModel.ts

@@ -1,6 +1,7 @@
1 1
 export interface PageModel {
2 2
     page: number
3 3
     limit: number
4
+    keyword?: string
4 5
 }
5 6
 
6 7
 export interface PageResult {}

+ 43 - 0
src/apis/order.api.ts

@@ -5,6 +5,8 @@ import type {
5 5
     OrderCreateShoppingModel, OrderListDataModel, OrderListObligationResult, OrderListResult, OrderQuantityModel
6 6
 } from "~/apis/model/order.model"
7 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";
8 10
 
9 11
 export interface CartIdRequest {
10 12
     cart_id: Array<string>
@@ -68,6 +70,47 @@ enum API {
68 70
 }
69 71
 
70 72
 /**
73
+ * 售后-订单列表
74
+ */
75
+export function refundList(): Promise<AfterSalesOrderResult> {
76
+    return defHttp.get({
77
+        url: API.REFUND_LIST
78
+    })
79
+}
80
+
81
+/**
82
+ * 提交评价
83
+ * @param params
84
+ */
85
+export function submitReply(params: CommentProductRequest) {
86
+    return defHttp.post({
87
+        url: API.REPLY,
88
+        data: {
89
+            ...params
90
+        }
91
+    })
92
+}
93
+
94
+/**
95
+ * 确认收货
96
+ * @param id
97
+ */
98
+export function takeOrder(id: string) {
99
+    return defHttp.post({
100
+        url: API.ORDER_TAKE + `/${id}`
101
+    })
102
+}
103
+/**
104
+ * 获取订单物流信息
105
+ * @param id
106
+ */
107
+export function getLogistics(id: string) {
108
+    return defHttp.post({
109
+        url: API.ORDER_EXPRESS + `/${id}`
110
+    })
111
+}
112
+
113
+/**
71 114
  * 订单统计
72 115
  */
73 116
 export function totalOrderNumber(): Promise<OrderQuantityModel> {

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

@@ -43,7 +43,7 @@ function onClickLeft() {
43 43
 </script>
44 44
 
45 45
 <template>
46
-  <FPage ex-class="font-sans pb-10 fixed inset-0 overflow-auto">
46
+  <FPage ex-class="font-sans pb-10  inset-0 overflow-auto">
47 47
     <FNavBar
48 48
         v-if="show" :title="title ?? titleText" :left-arrow="backArrow" fixed placeholder z-index="999"
49 49
         @click-left="onClickLeft"

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

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
src/pages.json


+ 24 - 14
src/pages/dacang/list/index.vue

@@ -31,18 +31,19 @@ const classifyId = computed(() => {
31 31
 })
32 32
 
33 33
 watch(() => classifyId.value, (val) => {
34
-  currentTab.value = val
34
+  // currentTab.value = val
35
+  // state.currentClassify = val
35 36
   // loadDcProductList(classifyId.value)
36 37
   loadList('reload')
37 38
 })
38
-onLoad((options) => {
39
+onShow((options) => {
39 40
   // console.log(classifyId.value)
40 41
 
41 42
   // if (options.id) {
42
-  if (!classifyId.value) {
43
+  // if (!classifyId.value) {
43 44
     // loadDcProductList(dacangStore.currentClassify)
44 45
     loadList('reload')
45
-  }
46
+  // }
46 47
   // } else {
47 48
   // }
48 49
   getDcProductClassify().then(res => {
@@ -56,7 +57,8 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
56 57
   const params = {
57 58
     page: state.currentPage,
58 59
     limit: state.pageSize,
59
-    classify: state.currentClassify,
60
+    // classify: state.currentClassify,
61
+    classify: classifyId.value,
60 62
     keyword: state.keyword
61 63
   }
62 64
   if (action === 'reload') {
@@ -88,6 +90,7 @@ function handleTabItemClick(tabItem) {
88 90
   state.currentClassify = tabItem
89 91
   // if (!currentTab || currentTab == '') {
90 92
   //   loadList(tabItem)
93
+  dacangStore.setClassify(tabItem)
91 94
   loadList('reload')
92 95
   // }
93 96
 }
@@ -129,20 +132,28 @@ onPullDownRefresh(() => {
129 132
     uni.stopPullDownRefresh()
130 133
   })
131 134
 })
135
+
136
+function handleShowSearchPage() {
137
+  uni.navigateTo({
138
+    url: '/pages/search/search-dacang'
139
+  })
140
+}
132 141
 </script>
133 142
 <template>
134 143
   <div class="h-screen">
135
-    <DacangHeader fixed
136
-                  :tabs="state.tabs"
137
-                  :ex-class="headerClass"
138
-                  :current="classifyId"
139
-                  @click:item="handleTabItemClick"
140
-    />
141
-    <!--
144
+<!--    <DacangHeader fixed-->
145
+<!--                  :tabs="state.tabs"-->
146
+<!--                  :ex-class="headerClass"-->
147
+<!--                  :current="classifyId"-->
148
+<!--                  @click:item="handleTabItemClick"-->
149
+<!--    />-->
142 150
     <div class=" z-10"  >
143 151
       <div :class="headerClass">
144 152
         <FNavBar :fixed="true" exClass="pl-2">
145
-          <div class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red">
153
+          <div
154
+              @click="handleShowSearchPage"
155
+              class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red"
156
+          >
146 157
 
147 158
             <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
148 159
                    mode="widthFix"
@@ -163,7 +174,6 @@ onPullDownRefresh(() => {
163 174
       </div>
164 175
 
165 176
     </div>
166
--->
167 177
 
168 178
 <!--    <FSearch :fixed="true"/>-->
169 179
     <div class="flex flex-col gap-2 ">

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

@@ -47,7 +47,7 @@ onShow(() => {
47 47
   }
48 48
 })
49 49
 onLoad(() => {
50
-  // getLocal()
50
+  getLocal()
51 51
   // 加载地址数据
52 52
   // orderStore.getCurrentAddress()
53 53
   // 1加载首页数据
@@ -162,7 +162,7 @@ page {
162 162
   background-color: #f8f8f8;
163 163
 }
164 164
 </style>
165
-<route lang="yaml" type="home">
165
+<route lang="yaml">
166 166
 style:
167 167
   navigationStyle: custom
168 168
   navigationBarTitleText: 储蓄保

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

@@ -254,7 +254,7 @@ function shareImage() {
254 254
 .integral_bg {
255 255
   width: 710rpx;
256 256
   height: 591rpx;
257
-  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/integral_bg_220826.png');
257
+  background-image: url('https://cdn.bjtdba.com/vod/image/2023-09-18/20230918140610841.png');
258 258
   background-size: 100% 100%;
259 259
 }
260 260
 page {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 197 - 0
src/pages/order/comment.vue


+ 103 - 5
src/pages/order/components/OrderItem.vue

@@ -1,8 +1,16 @@
1 1
 <script setup lang="ts">
2 2
 import FPrice from "~/components/FPrice/FPrice.vue";
3 3
 import {OrderListModel} from "~/apis/model/order.model";
4
-import {cancelOrder} from "~/apis/order.api";
4
+import {cancelOrder, takeOrder} from "~/apis/order.api";
5 5
 import {encodeBase64} from "~/utils/http/helper";
6
+import {deleteAddress} from "~/apis/user";
7
+import {
8
+  DyProductModel,
9
+  JdProductModel,
10
+  SuNingProductModel,
11
+  TaobaoProductThirdPartyWaresModel, VipProductModel
12
+} from "~/apis/model/product.model";
13
+import {DcProductModel} from "~/apis/model/dacang.model";
6 14
 const props = defineProps({
7 15
   orderItem: {
8 16
     type: Object,
@@ -29,6 +37,9 @@ function getStatusText(orderItem: OrderListModel) {
29 37
   if (props.status === 5) {
30 38
     return '未支付'
31 39
   }
40
+  if (props.status === 0) {
41
+    return '待发货'
42
+  }
32 43
   // switch (orderItem.status) {
33 44
   // }
34 45
   if (orderItem.status == 0) {
@@ -93,12 +104,77 @@ function handleShowOrderDetail(order) {
93 104
     url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
94 105
   })
95 106
 }
107
+
108
+function handleRemindTheDelivery() {
109
+  uni.showToast({
110
+    title: '已告知商家尽快发货',
111
+    icon: 'none'
112
+  })
113
+}
114
+
115
+// 查看物流信息页
116
+function handleShowLogistics(orderItem) {
117
+  // console.log(orderItem)
118
+  // console.log('查看物流信息')
119
+  uni.navigateTo({
120
+    url: `/pages/order/logistics?id=${orderItem.order_id}`
121
+  })
122
+}
123
+
124
+// 确认收货
125
+function handleTakeOrder(orderItem) {
126
+  uni.showModal({
127
+    title: '确认收货',
128
+    content: '请确认你已收到货',
129
+    success: function (res) {
130
+      if (res.confirm) {
131
+        takeOrder(orderItem.order_id).then(res => {
132
+          // console.log(res)
133
+          uni.showToast({
134
+            title: '确认收货成功'
135
+          })
136
+          uni.$emit('orderTakeFromList')
137
+
138
+        }).catch(error => {
139
+          uni.showToast({
140
+            title: error,
141
+            icon: "none"
142
+          })
143
+        })
144
+      }
145
+    }
146
+  })
147
+}
148
+
149
+function handleComment(orderItem) {
150
+  uni.navigateTo({
151
+    url: '/pages/order/comment?detail=' + encodeBase64(orderItem)
152
+  })
153
+}
154
+
155
+function handleProductItemClick(
156
+    item
157
+) {
158
+  // function navigateToDetail(params) {
159
+  //   let otherDetailUrl = `/pages/store/product/other`
160
+  //   return uni.navigateTo({
161
+  //     url: `${otherDetailUrl}?params=${params}`
162
+  //   })
163
+  // }
164
+  console.log(item)
165
+  // 大仓
166
+  uni.navigateTo({
167
+    url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
168
+  })
169
+}
170
+
171
+
96 172
 </script>
97 173
 
98 174
 <template>
99 175
   <div class="mb-3 bg-white rounded p-3">
100 176
     <div
101
-        @click="handleHeaderClick"
177
+        @click.stop="handleHeaderClick"
102 178
         class="flex items-center justify-between f-hairline-bottom pb-3">
103 179
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
104 180
         <div class="flex-1 flex items-center gap-2">
@@ -140,11 +216,15 @@ function handleShowOrderDetail(order) {
140 216
               </div>
141 217
 
142 218
             </div>
143
-            <div class="flex justify-end gap-2">
219
+            <div class="flex justify-end gap-2" v-if="props.status === 5">
144 220
               <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
145 221
               <nut-button size="small" plain type="primary" @click="handlePayment">立即支付</nut-button>
146 222
 
147 223
             </div>
224
+            <div class="flex justify-end gap-2" v-if="props.status === 0">
225
+              <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
226
+              <nut-button size="small" plain type="default" @click="handlePayment">申请售后</nut-button>
227
+            </div>
148 228
           </div>
149 229
         </div>
150 230
 
@@ -172,9 +252,27 @@ function handleShowOrderDetail(order) {
172 252
             </div>
173 253
 
174 254
           </div>
175
-          <div class="flex justify-end gap-2">
255
+          <div class="flex justify-end gap-2" v-if="props.status === 5">
176 256
             <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
177
-            <nut-button size="small" plain type="primary" @click="handlePayment">立即支付</nut-button>
257
+            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
258
+
259
+          </div>
260
+          <div class="flex justify-end gap-2" v-if="props.status === 0">
261
+            <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
262
+            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
263
+          </div>
264
+
265
+          <div class="flex justify-end gap-2" v-if="props.status === 1">
266
+            <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
267
+            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
268
+            <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
269
+
270
+          </div>
271
+
272
+          <div class="flex justify-end gap-2" v-if="props.status === 2">
273
+            <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
274
+            <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
275
+
178 276
           </div>
179 277
         </div>
180 278
       </div>

+ 245 - 0
src/pages/order/components/RefundOrderItem.vue

@@ -0,0 +1,245 @@
1
+<script setup lang="ts">
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";
7
+import {
8
+  DyProductModel,
9
+  JdProductModel,
10
+  SuNingProductModel,
11
+  TaobaoProductThirdPartyWaresModel, VipProductModel
12
+} from "~/apis/model/product.model";
13
+import {DcProductModel} from "~/apis/model/dacang.model";
14
+const props = defineProps({
15
+  orderItem: {
16
+    type: Object,
17
+    required: true
18
+  },
19
+  status: {
20
+    type: Number,
21
+  }
22
+})
23
+
24
+// function detailOrderList(p) {}
25
+// const dealOrderList =computed(() => {
26
+//   if (props.orderItem) {
27
+//     const orderItem = props.orderItem
28
+//     if (orderItem?.orderList) {
29
+//       return orderItem.orderList
30
+//     }
31
+//     if (orderItem?.orderProduct) {
32
+//       return orderItem.orderProduct
33
+//     }
34
+//   }
35
+// })
36
+function getStatusText(orderItem) {
37
+  // if (props.status === 1) {
38
+  //   return '未支付'
39
+  // }
40
+  // if (props.status === 0) {
41
+  //   return '待发货'
42
+  // }
43
+  // switch (orderItem.status) {
44
+  // }
45
+  if (orderItem.status == -1) {
46
+    // return '审核未通过'
47
+    return '退款失败'
48
+  }
49
+  if (orderItem.status == 0) {
50
+    // return '待审核'
51
+    return '退款中'
52
+  }
53
+  if (orderItem.status == 1) {
54
+    // return '待退货'
55
+    return '退款中'
56
+  }
57
+  if (orderItem.status == 2) {
58
+    return '退款中'
59
+    // return '待收货'
60
+  }
61
+  if (orderItem.status == 3) {
62
+    // return '已退款'
63
+    return '退款完成'
64
+  }
65
+}
66
+
67
+function handleHeaderClick() {
68
+  uni.navigateTo({
69
+    url: `/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
70
+  })
71
+}
72
+
73
+/**
74
+ * 取消订单
75
+ */
76
+function handleCancelOrder() {
77
+  console.log('取消订单操作')
78
+  cancelOrder(props.orderItem.group_order_id).then(res => {
79
+    setTimeout(() => {
80
+      uni.showToast({
81
+        title: '取消成功',
82
+        icon: 'none'
83
+      })
84
+
85
+      uni.$emit('orderCancelFromList')
86
+
87
+    }, 300)
88
+
89
+  })
90
+}
91
+
92
+function handlePayment() {
93
+  const { orderItem } = props
94
+  uni.navigateTo({
95
+    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.order_id}&OrderList=${JSON.stringify(orderItem)}`
96
+    // url: `/pages/payment/index`
97
+  })
98
+}
99
+
100
+function handleShowOrderDetail(order) {
101
+  console.log(order)
102
+  uni.navigateTo({
103
+    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
104
+  })
105
+}
106
+
107
+function handleRemindTheDelivery() {
108
+  uni.showToast({
109
+    title: '已告知商家尽快发货',
110
+    icon: 'none'
111
+  })
112
+}
113
+
114
+// 查看物流信息页
115
+function handleShowLogistics(orderItem) {
116
+  // console.log(orderItem)
117
+  // console.log('查看物流信息')
118
+  uni.navigateTo({
119
+    url: `/pages/order/logistics?id=${orderItem.order_id}`
120
+  })
121
+}
122
+
123
+// 确认收货
124
+function handleTakeOrder(orderItem) {
125
+  uni.showModal({
126
+    title: '确认收货',
127
+    content: '请确认你已收到货',
128
+    success: function (res) {
129
+      if (res.confirm) {
130
+        takeOrder(orderItem.order_id).then(res => {
131
+          // console.log(res)
132
+          uni.showToast({
133
+            title: '确认收货成功'
134
+          })
135
+          uni.$emit('orderTakeFromList')
136
+
137
+        }).catch(error => {
138
+          uni.showToast({
139
+            title: error,
140
+            icon: "none"
141
+          })
142
+        })
143
+      }
144
+    }
145
+  })
146
+}
147
+
148
+function handleComment(orderItem) {
149
+  uni.navigateTo({
150
+    url: '/pages/order/comment?detail=' + encodeBase64(orderItem)
151
+  })
152
+}
153
+
154
+function handleProductItemClick(
155
+    item
156
+) {
157
+  // function navigateToDetail(params) {
158
+  //   let otherDetailUrl = `/pages/store/product/other`
159
+  //   return uni.navigateTo({
160
+  //     url: `${otherDetailUrl}?params=${params}`
161
+  //   })
162
+  // }
163
+  console.log(item)
164
+  // 大仓
165
+  uni.navigateTo({
166
+    url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
167
+  })
168
+}
169
+
170
+
171
+</script>
172
+
173
+<template>
174
+  <div class="mb-3 bg-white rounded p-3">
175
+    <div
176
+        @click.stop="handleHeaderClick"
177
+        class="flex items-center justify-between f-hairline-bottom pb-3">
178
+      <div class="flex items-center font-bold gap-2 text-sm justify-between">
179
+        <div class="flex-1 flex items-center gap-2">
180
+          <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
181
+          {{ orderItem.merchant.mer_name }}
182
+        </div>
183
+
184
+        <div class="f-text-color-2 i-tabler-chevron-right"></div>
185
+
186
+      </div>
187
+      <div class="text-primary text-xs">
188
+        {{ getStatusText(orderItem) }}
189
+      </div>
190
+    </div>
191
+
192
+
193
+
194
+    <div @tap.stop="handleShowOrderDetail(orderItem)">
195
+        <div v-for="(orderProduct, orderProductIndex) in orderItem.refundProduct" :key="orderProductIndex">
196
+          <div class="flex py-2 gap-3">
197
+            <div class="flex-1 flex gap-2">
198
+              <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
199
+
200
+              <div class="flex flex-col">
201
+                <div class="line-clamp-2 text-[12px]">
202
+                  {{ orderProduct.product.cart_info.product.store_name }}
203
+                </div>
204
+                <div class="text-gray-500 text-[10px]">
205
+                  {{ orderProduct.product.cart_info.productAttr.sku }}
206
+                </div>
207
+              </div>
208
+            </div>
209
+
210
+            <div class="flex flex-col justify-center items-center">
211
+<!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
212
+              <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
213
+            </div>
214
+
215
+          </div>
216
+          <div class="flex justify-end gap-2" >
217
+
218
+            <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">撤销售后</div></nut-button>
219
+            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">查看详情</nut-button>
220
+          </div>
221
+
222
+          <div class="flex justify-end gap-2" v-if="props.status === 0">
223
+            <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
224
+            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
225
+          </div>
226
+
227
+          <div class="flex justify-end gap-2" v-if="props.status === 1">
228
+            <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
229
+            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
230
+            <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
231
+
232
+          </div>
233
+
234
+          <div class="flex justify-end gap-2" v-if="props.status === 2">
235
+            <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
236
+            <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
237
+
238
+          </div>
239
+        </div>
240
+    </div>
241
+
242
+  </div>
243
+
244
+
245
+</template>

+ 10 - 3
src/pages/order/index.vue

@@ -24,7 +24,7 @@
24 24
       <nut-tab-pane title="待发货">
25 25
         <div v-if="state.orderList.length > 0">
26 26
           <div v-for="(orderItem, index) in state.orderList" :key="index">
27
-            <OrderItem :order-item="orderItem"/>
27
+            <OrderItem :order-item="orderItem" :status="0"/>
28 28
 <!--            <OtherOrderItem :item="orderItem" v-else/>-->
29 29
 <!--            <OtherOrderItem :item="orderItem"/>-->
30 30
           </div>
@@ -35,7 +35,7 @@
35 35
       <nut-tab-pane title="待收货">
36 36
         <div v-if="state.orderList.length > 0">
37 37
           <div v-for="(orderItem, index) in state.orderList" :key="index">
38
-            <OrderItem :order-item="orderItem"/>
38
+            <OrderItem :order-item="orderItem" :status="1"/>
39 39
 <!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
40 40
 <!--            <OtherOrderItem :item="orderItem" v-else/>-->
41 41
           </div>
@@ -46,7 +46,7 @@
46 46
       <nut-tab-pane title="待评价">
47 47
         <div v-if="state.orderList.length > 0">
48 48
           <div v-for="(orderItem, index) in state.orderList" :key="index">
49
-            <OrderItem :order-item="orderItem"/>
49
+            <OrderItem :order-item="orderItem" :status="2"/>
50 50
 <!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
51 51
 <!--            <OtherOrderItem :item="orderItem" v-else/>-->
52 52
           </div>
@@ -94,6 +94,11 @@ onLoad(options => {
94 94
     loadAllOrderList()
95 95
     state.tabvalue = 0
96 96
   })
97
+
98
+  uni.$on('orderTakeFromList', () => {
99
+    loadAllOrderList()
100
+    state.tabvalue = 3
101
+  })
97 102
 })
98 103
 function splitArray(list, sp) {
99 104
   if (typeof list != 'object') return [];
@@ -116,6 +121,8 @@ function loadAllOrderList() {
116 121
   })
117 122
 }
118 123
 watch(() => state.tabvalue, (val) => {
124
+  // status: string//订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付
125
+
119 126
   switch (val) {
120 127
     case '0': {
121 128
       loadAllOrderList()

+ 295 - 0
src/pages/order/logistics.vue

@@ -0,0 +1,295 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+import {getRecommendList} from "~/apis/merchant";
4
+import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
5
+import {
6
+  DyProductModel,
7
+  JdProductModel,
8
+  SuNingProductModel,
9
+  TaobaoProductThirdPartyWaresModel, VipProductModel
10
+} from "~/apis/model/product.model";
11
+import {DcProductModel} from "~/apis/model/dacang.model";
12
+import {getLogistics} from "~/apis/order.api";
13
+
14
+const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
15
+
16
+const state = reactive({
17
+  currentPage: 1,
18
+  pageSize: 10,
19
+  total: 0,
20
+  totalPage: 0,
21
+  list: [],
22
+
23
+  orderDetail: {},
24
+  express: []
25
+})
26
+onLoad((options) => {
27
+  uni.showLoading({
28
+    title: '加载中',
29
+    icon: 'none'
30
+  })
31
+  if (options && options.id) {
32
+  getLogistics(options.id).then(res => {
33
+  // getLogistics(4127).then(res => {
34
+    console.log(res)
35
+    if (res && res.order) {
36
+      state.orderDetail = res.order
37
+    }
38
+    if (res && res.express) {
39
+      state.express = res.express
40
+    }
41
+
42
+    uni.hideLoading()
43
+  })
44
+
45
+}
46
+  // }
47
+})
48
+onShow(() => {
49
+  loadList('reload')
50
+})
51
+
52
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
53
+  const params = {
54
+    page: state.currentPage,
55
+    limit: state.pageSize
56
+  }
57
+
58
+  if (action === 'reload') {
59
+    params.page = 1
60
+  }
61
+
62
+  getRecommendList({
63
+    ...params
64
+  }).then(res => {
65
+    if (action === 'page') {
66
+      state.list = state.list.concat(res.list)
67
+    }
68
+    if (action === 'reload') {
69
+      // state.list = state.list.concat(res.list)
70
+      state.list = res.list
71
+    }
72
+    state.totalPage = Math.ceil(res.count / state.pageSize);
73
+    state.status = 'more'
74
+    if (callback) {
75
+      callback(res.list)
76
+    }
77
+  })
78
+}
79
+
80
+function handleProductItemClick(
81
+    item:
82
+        JdProductModel
83
+        & DcProductModel
84
+        & DyProductModel
85
+        & SuNingProductModel
86
+        & TaobaoProductThirdPartyWaresModel
87
+        & VipProductModel
88
+) {
89
+  // function navigateToDetail(params) {
90
+  //   let otherDetailUrl = `/pages/store/product/other`
91
+  //   return uni.navigateTo({
92
+  //     url: `${otherDetailUrl}?params=${params}`
93
+  //   })
94
+  // }
95
+  // 大仓
96
+  uni.navigateTo({
97
+    url: `/pages/store/product/detail?id=${item.product_id}`
98
+  })
99
+}
100
+
101
+function handleScrollToLower() {
102
+  state.status = 'loading';
103
+  state.currentPage += 1;
104
+  // console.log(state.totalPage)
105
+  if (state.currentPage > state.totalPage) {
106
+    state.status = 'noMore';
107
+  } else {
108
+    setTimeout(() => {
109
+      loadList('page')
110
+    }, 300)
111
+  }
112
+}
113
+
114
+onReachBottom(() => {
115
+  handleScrollToLower()
116
+
117
+})
118
+
119
+function handleClipboard() {
120
+  uni.setClipboardData({
121
+    data: state.orderDetail.delivery_id,
122
+    success(res) {
123
+      // wx.getClipboardData({
124
+      //   success (res) {
125
+      //     console.log(res.data) // data
126
+      //   }
127
+      // })
128
+    }
129
+  })
130
+}
131
+</script>
132
+
133
+<template>
134
+
135
+
136
+  <div>
137
+
138
+    <div
139
+        v-if="state.orderDetail"
140
+        class="flex flex-col text-[12px] p-3 ">
141
+      <div class=" rounded-lg bg-white p-3 flex flex-col gap-4">
142
+        <div>
143
+          <div class="text-gray-400">物流公司:{{ state.orderDetail.delivery_name }}</div>
144
+          <div class="flex justify-between items-center ">
145
+            <div class="flex">
146
+              快递单号:{{ state.orderDetail.delivery_id }}
147
+            </div>
148
+            <div class="flex gap-2 items-center">
149
+              <div
150
+                  @click="handleClipboard"
151
+                  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"
152
+              >
153
+                复制
154
+              </div>
155
+              <div
156
+                  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"
157
+              >
158
+                电话
159
+              </div>
160
+              <!--          <nut-button size="mini" type="default">复制</nut-button>-->
161
+              <!--          <nut-button size="mini" type="default">电话</nut-button>-->
162
+            </div>
163
+          </div>
164
+        </div>
165
+
166
+        <div class="flex items-center gap-2 ">
167
+          <div class="rounded-full w-4 h-4 bg-gray-400 text-white flex flex-col justify-center items-center">收</div>
168
+          <div class="text-gray-400">{{ state.orderDetail.user_address + ' ' + state.orderDetail.real_name + ' ' + state.orderDetail.user_phone}}</div>
169
+        </div>
170
+
171
+        <!-- 物流动态 -->
172
+        <div class="logis-detail" v-if="state.express && state.express.length > 0">
173
+          <div class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in state.express" :key="index">
174
+            <div class="logis-item-content">
175
+              <div class="logis-item-content__describe">
176
+                <text class="f-26">{{ item.status }}</text>
177
+              </div>
178
+              <div class="logis-item-content__time">
179
+                <text class="f-22">{{ item.time }}</text>
180
+              </div>
181
+            </div>
182
+          </div>
183
+        </div>
184
+      </div>
185
+    </div>
186
+    <!-- 商品推荐 -->
187
+    <div>
188
+      <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3">
189
+        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
190
+        <div>
191
+          大家都在买
192
+        </div>
193
+        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
194
+      </div>
195
+      <div class="pb-3 px-3 pb-safe" v-if="state.list">
196
+        <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
197
+          <div v-for="(item, index) in state.list"
198
+               :key="index"
199
+               @click="handleProductItemClick(item)"
200
+          >
201
+            <MerchantProductCard :item="item"/>
202
+
203
+          </div>
204
+        </grid-view>
205
+
206
+        <div class=" flex justify-center items-center text-[12px] text-gray-500"
207
+        >
208
+          <div v-if="state.status === 'loading'">
209
+            加载中...
210
+          </div>
211
+          <div v-if="state.status === 'noMore'">
212
+            没有更多了~
213
+          </div>
214
+        </div>
215
+      </div>
216
+
217
+    </div>
218
+
219
+  </div>
220
+
221
+</template>
222
+<route lang="yaml" >
223
+style:
224
+navigationBarTitleText: 已发货
225
+</route>
226
+
227
+<style lang="scss">
228
+page {
229
+  background: #f8f8f8;
230
+}
231
+.nut-tab-pane {
232
+  background: #f5f5f5 !important;
233
+}
234
+
235
+.logis-detail {
236
+  padding: 30rpx;
237
+  background-color: #fff;
238
+
239
+  .logis-item {
240
+    position: relative;
241
+    padding: 10px 0 10px 25px;
242
+    box-sizing: border-box;
243
+    border-left: 1px solid #ccc;
244
+
245
+    &.first {
246
+      border-left: 1px solid #FE0032;
247
+
248
+      &:after {
249
+        background: #FE0032;
250
+      }
251
+
252
+      .logis-item-content {
253
+        background: #fff;
254
+        color: #000;
255
+
256
+        &:after {
257
+          border-bottom-color: #FE0032;
258
+        }
259
+      }
260
+    }
261
+
262
+    &:after {
263
+      content: ' ';
264
+      display: inline-block;
265
+      position: absolute;
266
+      left: -6px;
267
+      top: 30px;
268
+      width: 6px;
269
+      height: 6px;
270
+      border-radius: 10px;
271
+      background: #bdbdbd;
272
+      border: 2px solid #fff;
273
+    }
274
+
275
+    .logis-item-content {
276
+      position: relative;
277
+      background: #fff;
278
+      padding: 10rpx 20rpx;
279
+      box-sizing: border-box;
280
+      color: #666;
281
+
282
+      //&:after {
283
+      //  content: '';
284
+      //  display: inline-block;
285
+      //  position: absolute;
286
+      //  left: -10px;
287
+      //  top: 18px;
288
+      //  border-left: 10px solid #fff;
289
+      //  border-bottom: 10px solid #f3f3f3;
290
+      //}
291
+    }
292
+  }
293
+}
294
+
295
+</style>

+ 158 - 0
src/pages/order/test.json

@@ -0,0 +1,158 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "express": [],
6
+    "order": {
7
+      "order_id": "4127",
8
+      "group_order_id": "4545",
9
+      "order_sn": "wx1694771068127556531",
10
+      "uid": "10574",
11
+      "real_name": "潇潇",
12
+      "user_phone": "18513112593",
13
+      "user_address": "北京顺义区光明街道 月亮湾2",
14
+      "user_address_ids": "1,35,493,0",
15
+      "area_manage_address_ids": "",
16
+      "cart_id": "11091",
17
+      "total_num": "1",
18
+      "total_price": "10.00",
19
+      "total_postage": "10.00",
20
+      "pay_price": "20.00",
21
+      "pay_postage": "10.00",
22
+      "extension_one": "0.99",
23
+      "extension_two": "0.00",
24
+      "commission_rate": "2.0000",
25
+      "coupon_id": "",
26
+      "coupon_price": "0.00",
27
+      "order_type": "0",
28
+      "paid": "1",
29
+      "pay_time": "2023-09-15 17:44:28",
30
+      "pay_type": "5",
31
+      "create_time": "2023-09-15 17:44:28",
32
+      "status": "1",
33
+      "delivery_type": "1",
34
+      "delivery_name": "中通快递",
35
+      "delivery_id": "78367406471357",
36
+      "mark": "",
37
+      "remark": null,
38
+      "admin_mark": null,
39
+      "verify_code": null,
40
+      "verify_time": null,
41
+      "verify_service_id": "0",
42
+      "mer_id": "465",
43
+      "reconciliation_id": "0",
44
+      "cost": "180.00",
45
+      "is_del": "0",
46
+      "is_system_del": "0",
47
+      "remind": "0",
48
+      "remind_time": null,
49
+      "gzc": "0",
50
+      "trade_no": "",
51
+      "channel_trade_no": "",
52
+      "alipay_no": "",
53
+      "weixin_no": "",
54
+      "table_id": "0",
55
+      "mer_money": "18.00",
56
+      "last_status": null,
57
+      "share_id": "0",
58
+      "pay_mer_id": null,
59
+      "is_split_to_tomorrow": "0",
60
+      "service_money": "182.00",
61
+      "test_order": "0",
62
+      "dacang_id": "0",
63
+      "distribution_mode": "0",
64
+      "da_cang_profit": "0.00",
65
+      "recommended_merchants": "0.00",
66
+      "mer_fanyong": "2.00",
67
+      "is_dacang": "0",
68
+      "cost_price": null,
69
+      "douhuomall": null,
70
+      "douhuomall_status": null,
71
+      "douhuomall_msg": null,
72
+      "address_id": "273",
73
+      "douhuomall_order_no": null,
74
+      "supply_type": null,
75
+      "seckill": "1",
76
+      "orderProduct": [
77
+        {
78
+          "order_product_id": "4395",
79
+          "order_id": "4127",
80
+          "uid": "10574",
81
+          "cart_id": "11091",
82
+          "product_id": "6105",
83
+          "extension_one": "0.00",
84
+          "extension_two": "0.00",
85
+          "product_sku": "7b5cd1815c80",
86
+          "is_refund": "0",
87
+          "product_num": "1",
88
+          "refund_num": "1",
89
+          "is_reply": "0",
90
+          "product_price": "10.00",
91
+          "cart_info": {
92
+            "product": {
93
+              "product_id": "6105",
94
+              "image": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-12\/74d95202309120948354624.jpg",
95
+              "store_name": "蛋白肽测试",
96
+              "is_show": "1",
97
+              "status": "1",
98
+              "is_del": "0",
99
+              "unit_name": "的",
100
+              "price": "300.00",
101
+              "mer_status": "1",
102
+              "temp_id": "259",
103
+              "give_coupon_ids": [],
104
+              "is_gift_bag": "0",
105
+              "is_used": "1",
106
+              "product_type": "0",
107
+              "old_product_id": "0",
108
+              "temp": {
109
+                "shipping_template_id": "259",
110
+                "name": "测试001",
111
+                "type": "1",
112
+                "appoint": "0",
113
+                "undelivery": "0",
114
+                "mer_id": "465",
115
+                "is_default": "0",
116
+                "sort": "0",
117
+                "create_time": "2023-09-09 16:13:29",
118
+                "regionAddress": {
119
+                  "shipping_template_region_id": "611",
120
+                  "temp_id": "259",
121
+                  "city_id": "0",
122
+                  "first": "1.00",
123
+                  "first_price": "10.00",
124
+                  "continue": "1.00",
125
+                  "continue_price": "5.00"
126
+                },
127
+                "undelives": null,
128
+                "freeAddress": null
129
+              }
130
+            },
131
+            "productAttr": {
132
+              "gong_mer_profit": null,
133
+              "gong_pension": null,
134
+              "gong_market_price": null,
135
+              "cost_price": null,
136
+              "product_id": "6105",
137
+              "stock": "80",
138
+              "price": "10.00",
139
+              "unique": "7b5cd1815c80",
140
+              "sku": "",
141
+              "volume": "1.00",
142
+              "weight": "1.00",
143
+              "ot_price": "5000.00",
144
+              "dacang_price": "10.00",
145
+              "cost": "180.00",
146
+              "bc_extension_one": 0,
147
+              "bc_extension_two": 0,
148
+              "seckill": 1
149
+            },
150
+            "product_type": "0"
151
+          },
152
+          "create_time": "2023-09-15 17:44:28",
153
+          "type": "5"
154
+        }
155
+      ]
156
+    }
157
+  }
158
+}

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

@@ -56,7 +56,7 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
56 56
                 <div class="font-bold flex " v-if="yanglaoStatistics">
57 57
                   <div>¥</div>
58 58
                   <div>
59
-                    {{ yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a}}
59
+                    {{ (yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a).toFixed(2)}}
60 60
                   </div>
61 61
                 </div>
62 62
               </div>

+ 8 - 6
src/pages/red-integral/index.vue

@@ -6,6 +6,8 @@ import {getRedIntegralList} from "~/apis/user";
6 6
 import dayjs from "dayjs";
7 7
 
8 8
 const userStore = useUserStore();
9
+const data = ref([])
10
+
9 11
 onLoad((options) => {
10 12
   userStore.getUserInfo()
11 13
   getRedIntegralList({page: 1, limit: 20}).then(res => {
@@ -13,16 +15,16 @@ onLoad((options) => {
13 15
     if (res && res.length > 0) {
14 16
       for (let item of res) {
15 17
         // data.value = res
16
-        data.value = {
17
-          red: res.red,
18
-          mark: res.mark,
19
-          time: dayjs(res.time).format('YYYY-MM-DD')
20
-        }
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
+        })
21 24
       }
22 25
     }
23 26
   })
24 27
 })
25
-const data = ref([])
26 28
 // const userType = computed(() => {
27 29
 //   const userRichType = userStore.userInfo.user_rich_type
28 30
 //   // 创始人

+ 1 - 0
src/pages/refund/README.md

@@ -0,0 +1 @@
1
+售后管理

+ 39 - 0
src/pages/refund/index.vue

@@ -0,0 +1,39 @@
1
+<script setup lang="ts">
2
+import {refundList} from "~/apis/order.api";
3
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4
+import RefundOrderItem from "~/pages/order/components/RefundOrderItem.vue";
5
+
6
+const state = reactive({
7
+  tabvalue: 0,
8
+  list: []
9
+})
10
+
11
+onLoad(() => {
12
+  refundList().then(res => {
13
+    console.log(res)
14
+    state.list = res.list
15
+  })
16
+})
17
+</script>
18
+<template>
19
+  <div>
20
+    <nut-tabs v-model="state.tabvalue">
21
+      <nut-tab-pane title="全部">
22
+        <div v-if="state.list.length > 0" class="flex flex-col gap-3">
23
+          <div v-for="(orderItem, index) in state.list" :key="index">
24
+            <RefundOrderItem :order-item="orderItem"/>
25
+          </div>
26
+        </div>
27
+        <CXBEmpty v-else/>
28
+      </nut-tab-pane>
29
+      <nut-tab-pane title="退款中">
30
+      </nut-tab-pane>
31
+      <nut-tab-pane title="退款完成">
32
+      </nut-tab-pane>
33
+    </nut-tabs>
34
+  </div>
35
+</template>
36
+<route lang="yaml"   type="home">
37
+style:
38
+  navigationBarTitleText: 退款/售后
39
+</route>

+ 602 - 0
src/pages/search/search-dacang.vue

@@ -0,0 +1,602 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+import {getHotkeyWord} from "~/apis/common";
4
+import ProductList from "~/components/ProductList/ProductList.vue";
5
+import {getDcProductList} from "~/apis/dacang";
6
+import {useDacangStore} from "~/stores/dacangStore";
7
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
+import {StoreParams, StoreResult} from "~/apis/model/storeModel";
9
+import {USER_LATITUDE, USER_LONGITUDE} from "~/constants";
10
+import {getSelectMerchant} from "~/apis/merchant";
11
+import {remove, uniq} from "lodash-es";
12
+
13
+const deleteIcon = CDN_URL + '/static/assets/search_del_220616.png'
14
+const upDefaultImg = CDN_URL + '/static/assets/tuijian_shangla.png'
15
+const downDefaultImg = CDN_URL + '/static/assets/tuijian_xiala.png'
16
+
17
+const downRedImg = CDN_URL + '/static/assets/tuijian_xiala_red.png'
18
+const upRedImg = CDN_URL + '/static/assets/search_red_shangla_220617.png'
19
+const searchValue = ref()
20
+const isSearchMode = ref(false)
21
+// const i
22
+const emit = defineEmits<{
23
+  (e: 'change', value: boolean): void,
24
+  (e: 'product-type-change', value: number): void,
25
+  (e: 'order-change', value: number): void
26
+}>()
27
+
28
+const merchantState = reactive({
29
+  total: 0,
30
+  totalPage: 0,
31
+  list: [],
32
+  currentPage: 1,
33
+  pageSize: 10,
34
+  is_new: NaN,
35
+  care_count: NaN,
36
+  distanceAsc: 0,
37
+  currentSelected: 0
38
+})
39
+
40
+function handleMerchantTabChange(tab) {
41
+  merchantState.currentSelected = tab
42
+  if (tab === 0) {
43
+    merchantState.distanceAsc = 0
44
+    merchantState.care_count = NaN
45
+    merchantState.is_new = NaN
46
+  }
47
+  if (tab === 1) {
48
+    merchantState.distanceAsc = NaN
49
+    merchantState.is_new = NaN
50
+    merchantState.care_count = 0
51
+  }
52
+  if (tab === 2) {
53
+    merchantState.care_count = NaN
54
+    merchantState.distanceAsc = NaN
55
+    merchantState.is_new = 0
56
+  }
57
+
58
+  loadSelectMerchant('reload')
59
+}
60
+
61
+const state = reactive({
62
+  tabvalue: 0,
63
+
64
+  isDel: false,
65
+  hotkeyWords: [],
66
+  historyKeyWords: [],
67
+  currentKeyword: '',
68
+  order: false,
69
+  keyword: '',
70
+  currentSelected: 1,
71
+  status: 'noMore',
72
+  priceType: NaN,
73
+  sales: NaN,
74
+  is_new: NaN,
75
+  type: 1,
76
+  currentPage: 1,
77
+  pageSize: 10,
78
+  totalPage: 1,
79
+  productList: [],
80
+  // merchantList: []
81
+
82
+})
83
+const classifyId = computed(() => {
84
+  return useDacangStore().$state.currentClassify
85
+})
86
+
87
+
88
+onLoad(async () => {
89
+  loadProductList('reload')
90
+  const historyKeywords = await uni.getStorageSync('HISTORY_KEYWORDS')
91
+  if (historyKeywords) {
92
+    state.historyKeyWords = historyKeywords
93
+  }
94
+
95
+})
96
+
97
+watch(() => state.tabvalue, (val) => {
98
+  console.log(val)
99
+  if (val == 1) {
100
+    loadSelectMerchant('reload')
101
+  }
102
+  if (val == 0) {
103
+    loadProductList('reload')
104
+  }
105
+})
106
+
107
+function handleProductTypeChange(typeValue) {
108
+  state.currentSelected = typeValue
109
+  if (typeValue === 3) {
110
+    state.sales = NaN
111
+    state.is_new = 0
112
+  } else if (typeValue === 2) {
113
+    state.sales = 0
114
+  } else {
115
+    state.type = typeValue
116
+  }
117
+  loadProductList('reload')
118
+}
119
+
120
+
121
+function loadProductList(action: 'page' | 'reload', callback?: (items) => void) {
122
+  const params = {
123
+    page: state.currentPage,
124
+    limit: state.pageSize,
125
+    // classify: state.currentClassify,
126
+    // classify: classifyId.value,
127
+    // keyword: state.keyword
128
+  }
129
+  if (action === 'reload') {
130
+    state.currentPage = 1
131
+    params.page = 1
132
+  }
133
+  if (searchValue.value) {
134
+    params.keyword = searchValue.value
135
+  }
136
+  // if (state.currentSelected === 2) {
137
+  //   params.sales = state.sales
138
+  // }
139
+  // if (state.currentSelected === 3) {
140
+  //   params.is_new = state.is_new
141
+  // }
142
+  if (state.sales === 0) {
143
+    params.sales = state.sales
144
+  }
145
+  if (state.is_new === 0) {
146
+    params.is_new = state.is_new
147
+  }
148
+  if (state.priceType) {
149
+    params.priceType = state.priceType
150
+  }
151
+
152
+  getDcProductList({
153
+    ...params
154
+    // page: state.currentPage,
155
+    // limit: state.pageSize,
156
+    // classify,
157
+    // keyword: ''
158
+  }).then(res => {
159
+    if (action === 'page') {
160
+      state.productList = state.productList.concat(res)
161
+    }
162
+    if (action === 'reload') {
163
+      state.productList = res
164
+    }
165
+
166
+    if (callback) {
167
+      callback(res)
168
+    }
169
+    // state.productList = res
170
+  }).catch(error => {
171
+    uni.showToast({
172
+      title: error,
173
+      icon: 'none'
174
+    })
175
+  })
176
+}
177
+
178
+// 店铺列表
179
+function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => void) {
180
+  // if (state.category_id == 0) {
181
+  //   state.currentMerchantCategoryId = state.category_id
182
+  // }
183
+
184
+  let params: StoreParams = {
185
+    pageNum: merchantState.currentPage,
186
+    pageSize: merchantState.pageSize,
187
+    // mer_keyword: searchValue.value,
188
+    // mer_keyword: mer_keyword,
189
+    lat: uni.getStorageSync(USER_LATITUDE),
190
+    lng: uni.getStorageSync(USER_LONGITUDE)
191
+  }
192
+
193
+  if (searchValue.value) {
194
+    params.mer_keyword = searchValue.value
195
+  }
196
+
197
+  if (action === 'reload') {
198
+    merchantState.currentPage = 1
199
+    params.pageNum = 1
200
+  }
201
+  // 人气
202
+  // care_count
203
+  // 最新 is_new
204
+  // 距离 distanceAsc
205
+  // if (state.)
206
+  // if (state.category_id !== 0) {
207
+  //   // params.category_id = category_id
208
+  //   params = Object.assign({}, params, {
209
+  //     category_id: state.category_id
210
+  //   })
211
+  // }
212
+  if (merchantState.distanceAsc === 0) {
213
+    params = Object.assign({}, params, {
214
+      distanceAsc: 0,
215
+
216
+    })
217
+  }
218
+
219
+  if (merchantState.care_count === 0) {
220
+    params.care_count = merchantState.care_count
221
+  }
222
+  if (merchantState.is_new === 0) {
223
+    params.is_new = merchantState.is_new
224
+  }
225
+  getSelectMerchant(params).then((res) => {
226
+    console.log(res)
227
+    merchantState.total = res.total
228
+    merchantState.totalPage = Math.ceil(merchantState.total / merchantState.pageSize);
229
+    console.log(merchantState.totalPage)
230
+    // state.merchantList = res.list
231
+    if (action === 'page') {
232
+      merchantState.list = state.list.concat(res.list)
233
+    }
234
+    if (action === 'reload') {
235
+      merchantState.list = res.list
236
+    }
237
+    // state.totalPage = Math.ceil(totalItems / state.pageSize);
238
+
239
+    merchantState.status = 'more'
240
+
241
+    if (callback) {
242
+      callback(res.list)
243
+    }
244
+  })
245
+}
246
+
247
+onShow(() => {
248
+  getHotkeyWord().then(res => {
249
+    console.log(res)
250
+    state.hotkeyWords = res
251
+  })
252
+})
253
+
254
+function handleOrderPrice(val) {
255
+  // state.order = !state.order
256
+  state.currentSelected = NaN
257
+  state.order = true
258
+  if (val === 0) {
259
+    state.priceType = 1
260
+  } else {
261
+    state.priceType = 0
262
+  }
263
+  emit('order-change', state.priceType)
264
+}
265
+
266
+function handleScrollToLower() {
267
+  state.status = 'loading';
268
+  state.currentPage += 1;
269
+  // console.log(state.totalPage)
270
+  if (state.currentPage > state.totalPage) {
271
+    state.status = 'noMore';
272
+  } else {
273
+    setTimeout(() => {
274
+      loadProductList('page')
275
+    }, 300)
276
+  }
277
+}
278
+
279
+onReachBottom(() => {
280
+  handleScrollToLower()
281
+
282
+})
283
+
284
+onPullDownRefresh(() => {
285
+  loadProductList('reload', items => {
286
+    setTimeout(() => {
287
+      uni.stopPullDownRefresh()
288
+    }, 300)
289
+  })
290
+})
291
+
292
+async function handleSearch() {
293
+  isSearchMode.value = true
294
+  // state.historyKeyWords
295
+  if (searchValue.value) {
296
+    state.historyKeyWords.push(searchValue.value)
297
+    state.historyKeyWords = uniq(state.historyKeyWords)
298
+    await uni.setStorageSync('HISTORY_KEYWORDS', state.historyKeyWords)
299
+  }
300
+  // state.historyKeyWords
301
+  if (state.tabvalue == 0) {
302
+    loadProductList('reload')
303
+  }
304
+  if (state.tabvalue == 1) {
305
+    loadSelectMerchant('reload')
306
+  }
307
+}
308
+
309
+async function handleRemoveKeyword(tag) {
310
+  state.historyKeyWords = state.historyKeyWords.filter((curVal, index) => {
311
+    return curVal !== tag
312
+  })
313
+  console.log(state.historyKeyWords)
314
+  await uni.setStorageSync('HISTORY_KEYWORDS', state.historyKeyWords)
315
+}
316
+async function handleRemoveAllKeyword() {
317
+  state.historyKeyWords = []
318
+  await uni.setStorageSync('HISTORY_KEYWORDS', [])
319
+}
320
+
321
+async function handleKeywordSearch(keywordItem) {
322
+  // keywordItem.keyword
323
+  if (keywordItem.keyword) {
324
+    searchValue.value = keywordItem.keyword
325
+    state.historyKeyWords.push(searchValue.value)
326
+    state.historyKeyWords = uniq(state.historyKeyWords)
327
+    await uni.setStorageSync('HISTORY_KEYWORDS', state.historyKeyWords)
328
+    loadProductList('reload')
329
+    isSearchMode.value = true
330
+  }
331
+}
332
+
333
+function handleShowMerchant(merchant) {
334
+  console.log(merchant)
335
+  uni.navigateTo({
336
+    url: '/pages/store/home/index?id=' + merchant.mer_id
337
+  })
338
+}
339
+</script>
340
+
341
+<template>
342
+  <div>
343
+    <div class="fixed  h-fit z-1 bg-white top-0 w-full">
344
+      <nut-searchbar
345
+          v-model="searchValue" @search="handleSearch" @clear="handleSearch">
346
+        <template v-slot:rightout>
347
+          <div @tap="handleSearch">
348
+            搜索
349
+          </div>
350
+        </template>
351
+      </nut-searchbar>
352
+    </div>
353
+
354
+    <div class="mt-16 px-3 flex flex-col gap-6" v-if="!isSearchMode">
355
+      <div class="flex flex-col gap-3" v-if="state.historyKeyWords && state.historyKeyWords.length > 0">
356
+
357
+        <div class="flex justify-between items-center">
358
+          <div class="font-bold">搜索历史</div>
359
+          <!--          <div class="flex justify-end items-center">-->
360
+          <!--            <image :src="deleteIcon" mode="widthFix" class="w-3 h-3"></image>-->
361
+          <!--          </div>-->
362
+
363
+          <div class="text-[12px] flex ">
364
+            <div v-if="state.isDel" class="flex items-center">
365
+              <div @click="handleRemoveAllKeyword">全部删除</div>
366
+              <div class="text-gray-300">|</div>
367
+              <div @click="state.isDel = false" class="text-primary">完成</div>
368
+            </div>
369
+            <image
370
+                v-else
371
+                :src="deleteIcon" @click="state.isDel = !state.isDel" mode="widthFix" class="w-3 h-3"></image>
372
+
373
+          </div>
374
+
375
+        </div>
376
+        <!--tags -->
377
+        <div class="flex gap-3  flex-wrap">
378
+          <div v-for="(tagItem, index) in state.historyKeyWords" :key="index"
379
+               class="flex justify-center items-center border border-solid border-gray-200 text-[12px] rounded-full min-w-6 text-center  max-w-fit px-2 py-1 bg-white"
380
+               :class="state.isDel ? 'gap-2': ''"
381
+          >
382
+            <div class="flex-1">
383
+              {{ tagItem }}
384
+            </div>
385
+            <div class="flex" v-if="state.isDel" @click="handleRemoveKeyword(tagItem)">
386
+              <div class="i-tabler-x text-[8px] text-gray"></div>
387
+            </div>
388
+          </div>
389
+        </div>
390
+
391
+      </div>
392
+      <div class="flex flex-col gap-3">
393
+        <div class="font-bold">热门搜索</div>
394
+        <!--tags -->
395
+        <div class="flex gap-3">
396
+          <div v-for="(tagItem, index) in state.hotkeyWords" :key="index"
397
+               @click="handleKeywordSearch(tagItem)"
398
+               class="flex items-center border border-solid border-gray-200 text-[12px] rounded-full min-w-6 text-center  max-w-fit px-2 bg-white py-1"
399
+          >
400
+            <div>
401
+              {{ tagItem.keyword }}
402
+            </div>
403
+          </div>
404
+        </div>
405
+      </div>
406
+    </div>
407
+
408
+    <div v-if="isSearchMode">
409
+      <div class="fixed top-10 z-3 w-full">
410
+        <nut-tabs v-model="state.tabvalue">
411
+          <nut-tab-pane title="商品" class="bg-gray-50">
412
+            <div class="text-[14px]">
413
+              <div class="flex flex-row items-center">
414
+                <div class="basis-1/4 text-left ">
415
+                  <div
416
+                      @click="handleProductTypeChange(1)"
417
+
418
+                      class="flex flex-row justify-center items-center gap-1">
419
+                    <div
420
+
421
+                        :class="state.currentSelected === 1 ? 'text-primary font-bold' : ''"
422
+                    >
423
+                      综合
424
+                    </div>
425
+                    <div class="flex flex-col justify-center items-center">
426
+                      <div v-if="state.currentSelected !== 1 " class="h-fit flex flex-col items-center">
427
+                        <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2"></image>
428
+                      </div>
429
+                      <div v-if="state.currentSelected === 1" class="h-fit flex flex-col items-center">
430
+                        <image :src="downRedImg" mode="widthFix" class="w-2 h-2"></image>
431
+                      </div>
432
+
433
+                    </div>
434
+                  </div>
435
+
436
+                </div>
437
+                <div
438
+                    @click="handleProductTypeChange(2)"
439
+                    class="basis-1/4 text-center"
440
+                    :class="state.currentSelected === 2 ? 'text-primary font-bold' : ''"
441
+                >销量
442
+                </div>
443
+                <div
444
+                    @click="handleProductTypeChange(3)"
445
+                    :class="state.currentSelected === 3 ? 'text-primary font-bold' : ''"
446
+                    class="basis-1/4 text-center">上新
447
+                </div>
448
+                <div
449
+                    @click="handleOrderPrice(state.priceType)"
450
+                    class="basis-1/4 text-right">
451
+                  <div class="flex flex-row justify-center items-center gap-1">
452
+                    <div
453
+                        :class="state.order ? 'text-primary font-bold' : ''"
454
+                    >
455
+                      价格
456
+                    </div>
457
+                    <div class="flex flex-col justify-center items-center">
458
+                      <div v-if="!state.order" class="h-fit flex flex-col items-center">
459
+                        <image :src="upDefaultImg" mode="widthFix" class="w-2 h-2"></image>
460
+                        <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2"></image>
461
+                      </div>
462
+                      <div v-if="state.order" class="h-fit flex flex-col items-center">
463
+                        <image :src="upRedImg" mode="widthFix" class="w-2 h-2" v-if="state.priceType === 1"></image>
464
+                        <image :src="upDefaultImg" mode="widthFix" class="w-2 h-2" v-else></image>
465
+
466
+                        <image :src="downRedImg" mode="widthFix" class="w-2 h-2" v-if="state.priceType === 0"></image>
467
+                        <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2" v-else></image>
468
+
469
+                      </div>
470
+
471
+                    </div>
472
+                  </div>
473
+
474
+                </div>
475
+              </div>
476
+            </div>
477
+          </nut-tab-pane>
478
+          <nut-tab-pane title="店铺">
479
+            <div class="text-[14px]">
480
+              <div class="flex flex-row items-center">
481
+                <div class="basis-1/3 text-left ">
482
+                  <div class="flex flex-row justify-center items-center gap-1">
483
+                    <div
484
+                        :class="merchantState.currentSelected === 0 ? 'text-primary font-bold' : ''"
485
+                        @click="handleMerchantTabChange(0)"
486
+                    >
487
+                      距离
488
+                    </div>
489
+                  </div>
490
+
491
+                </div>
492
+                <div
493
+                    @click="handleMerchantTabChange(1)"
494
+                    class="basis-1/3 text-center"
495
+                    :class="merchantState.currentSelected === 1 ? 'text-primary font-bold' : ''"
496
+                >
497
+                  人气
498
+                </div>
499
+                <div
500
+                    @click="handleMerchantTabChange(2)"
501
+                    :class="merchantState.currentSelected === 2 ? 'text-primary font-bold' : ''"
502
+                    class="basis-1/3 text-center">最新
503
+                </div>
504
+              </div>
505
+            </div>
506
+
507
+          </nut-tab-pane>
508
+        </nut-tabs>
509
+
510
+      </div>
511
+
512
+      <!-- 商品列表 -->
513
+      <div class="mt-40 pb-10" v-if="state.tabvalue == 0">
514
+        <div v-if="state.productList.length > 0">
515
+          <ProductList :list="state.productList"/>
516
+          <div class=" flex justify-center items-center text-[12px] text-gray-500"
517
+               v-if="state.productList && state.productList.length > 0">
518
+            <div v-if="state.status === 'loading'">
519
+              加载中...
520
+            </div>
521
+            <div v-if="state.status === 'noMore'">
522
+              没有更多了~
523
+            </div>
524
+          </div>
525
+        </div>
526
+        <CXBEmpty v-else/>
527
+
528
+      </div>
529
+      <!-- 店铺列表 -->
530
+      <div class="mt-40 pb-10" v-if="state.tabvalue == 1">
531
+        <div v-if="merchantState.list.length > 0" class="p-3 bg-white">
532
+          <div
533
+              v-for="(item, index) in merchantState.list" :key="index"
534
+              @click="handleShowMerchant(item)"
535
+              class="mb-3 ">
536
+            <div class="flex">
537
+              <div class="flex ">
538
+                <image :src="item.mer_avatar"
539
+                       mode="aspectFill"
540
+                       class="w-20 h-20 rounded-lg"
541
+                ></image>
542
+              </div>
543
+
544
+              <div class="flex flex-col justify-between px-2">
545
+                <div class="flex flex-col gap-2">
546
+                  <div class="truncate w-40 ">
547
+                    {{ item.mer_name }}
548
+                  </div>
549
+                  <div class="text-xs text-gray">
550
+                    {{ item.care_count }} 人关注
551
+                  </div>
552
+                </div>
553
+
554
+                <div class="text-xs">{{ (item.distance / 100).toFixed(1) }}km</div>
555
+              </div>
556
+
557
+            </div>
558
+          </div>
559
+          <div class=" flex justify-center items-center text-[12px] text-gray-500">
560
+            <div v-if="merchantState.status === 'loading'">
561
+              加载中...
562
+            </div>
563
+            <div v-if="merchantState.status === 'noMore'">
564
+              没有更多了~
565
+            </div>
566
+          </div>
567
+        </div>
568
+        <CXBEmpty v-else/>
569
+
570
+
571
+      </div>
572
+
573
+    </div>
574
+
575
+  </div>
576
+</template>
577
+
578
+<style>
579
+.nut-searchbar__search-input {
580
+  border: 1px solid #FE0032;
581
+  background: white !important;
582
+  font-size: 13px;
583
+}
584
+
585
+page {
586
+  background: #f8f8f8;
587
+
588
+  --nut-menu-item-font-size: 14px;
589
+  --nut-menu-bar-line-height: 24px;
590
+  --nut-menu-bar-box-shadow: none;
591
+  --nut-menu-item-active-text-color: #FE0032;
592
+  --nut-white: #fff;
593
+}
594
+</style>
595
+
596
+<route lang="yaml">
597
+style:
598
+  navigationBarTitleText: 搜索
599
+  enablePullDownRefresh: true
600
+
601
+</route>
602
+

+ 8 - 3
src/pages/store/home/index.vue

@@ -31,7 +31,7 @@ const state = reactive({
31 31
   priceType: NaN,
32 32
   sales: NaN,
33 33
   is_new: NaN,
34
-  type: 1,
34
+  type: NaN,
35 35
   currentPage: 1,
36 36
   pageSize: 10,
37 37
   totalPage: 1
@@ -47,7 +47,7 @@ onLoad((options: any) => {
47 47
     id.value = options.id
48 48
     getMerchantDetail(id.value).then((res: any) => {
49 49
       merchant.value = {...res}
50
-      console.log(res)
50
+      // console.log(res)
51 51
     })
52 52
 
53 53
     // 148 专用
@@ -73,10 +73,13 @@ onLoad((options: any) => {
73 73
 // }
74 74
 function handleProductTypeChange(typeValue) {
75 75
   if (typeValue === 3) {
76
+    state.priceType = NaN
76 77
     state.sales = NaN
77 78
     state.is_new = 0
78 79
   }
79 80
   else if (typeValue === 2) {
81
+    state.priceType = NaN
82
+    state.is_new = NaN
80 83
     state.sales = 0
81 84
   } else {
82 85
     state.type = typeValue
@@ -84,6 +87,7 @@ function handleProductTypeChange(typeValue) {
84 87
   loadList('reload')
85 88
 }
86 89
 function handleOrderChange(priceType) {
90
+  console.log(priceType)
87 91
   state.priceType = priceType
88 92
 
89 93
   // reset
@@ -117,10 +121,11 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
117 121
   if (state.sales === 0) {
118 122
     params.sales = state.sales
119 123
   }
124
+  // console.log(state.is_new)
120 125
   if (state.is_new === 0) {
121 126
     params.is_new = state.is_new
122 127
   }
123
-  if (state.priceType) {
128
+  if (state.priceType === 1 || state.priceType === 0) {
124 129
     params.priceType = state.priceType
125 130
   }
126 131
   if (action === 'reload') {

+ 1 - 10
src/pages/store/home/search.vue

@@ -116,7 +116,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
116 116
 function handleScrollToLower() {
117 117
   state.status = 'loading';
118 118
   state.currentPage += 1;
119
-  console.log(state.totalPage)
119
+  // console.log(state.totalPage)
120 120
   if (state.currentPage > state.totalPage) {
121 121
     state.status = 'noMore';
122 122
   } else {
@@ -137,15 +137,6 @@ onPullDownRefresh(() => {
137 137
       uni.stopPullDownRefresh()
138 138
     }, 300)
139 139
   })
140
-  // loadPost(state.data.id, 'reload', items => {
141
-  //   if (items) {
142
-  //     setTimeout(() => {
143
-  //       uni.stopPullDownRefresh()
144
-  //     }, 300)
145
-  //   } else {
146
-  //     uni.stopPullDownRefresh()
147
-  //   }
148
-  // })
149 140
 })
150 141
 
151 142
 function handleProductTypeChange(typeValue) {

+ 147 - 83
src/pages/store/nearby/index.vue

@@ -3,6 +3,7 @@ import {getMerchantCategory, getSelectMerchant, getSelectMerchantSort} from "~/a
3 3
 import type {StoreResult} from "~/apis/model/storeModel";
4 4
 import {StoreParams} from "~/apis/model/storeModel";
5 5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
+import {USER_LATITUDE, USER_LONGITUDE} from "~/constants";
6 7
 
7 8
 const state = reactive<any>({
8 9
   // 列表高度
@@ -30,11 +31,20 @@ const state = reactive<any>({
30 31
   lng: '',
31 32
 
32 33
   currentMerchantCategoryId: 0,
34
+
35
+  options: [{
36
+    text: '智能推荐',
37
+    value: 1,
38
+  }, {
39
+    text: '距离优先',
40
+    value: 2
41
+  }],
42
+  menuDefaultValue: 1
33 43
   // merchantPageInfo: {}
34 44
 })
35 45
 const searchValue = ref('')
36 46
 
37
-const { windowHeight } = uni.getSystemInfoSync()
47
+const {windowHeight} = uni.getSystemInfoSync()
38 48
 state.scrollHeight = windowHeight - 70
39 49
 
40 50
 onLoad(() => {
@@ -44,6 +54,9 @@ onLoad(() => {
44 54
   })
45 55
 
46 56
   // loadSelectMerchant('reload')
57
+})
58
+
59
+onShow(() => {
47 60
   loadAll()
48 61
 })
49 62
 
@@ -51,6 +64,7 @@ function loadAll() {
51 64
   state.category_id = 0
52 65
   loadSelectMerchant('reload')
53 66
 }
67
+
54 68
 function handleCategoryChange(category) {
55 69
   console.log(category)
56 70
   state.currentMerchantCategoryId = category.merchant_category_id
@@ -59,6 +73,7 @@ function handleCategoryChange(category) {
59 73
   state.category_id = category.merchant_category_id
60 74
   loadSelectMerchant('reload')
61 75
 }
76
+
62 77
 function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => void) {
63 78
   if (state.category_id == 0) {
64 79
     state.currentMerchantCategoryId = state.category_id
@@ -68,8 +83,9 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
68 83
     pageSize: state.pageSize,
69 84
     mer_keyword: searchValue.value,
70 85
     // mer_keyword: mer_keyword,
71
-    lat: '',
72
-    lng: '',
86
+    // lat: '',
87
+    // lng: '',
88
+
73 89
   }
74 90
   if (state.category_id !== 0) {
75 91
     // params.category_id = category_id
@@ -77,6 +93,13 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
77 93
       category_id: state.category_id
78 94
     })
79 95
   }
96
+  if (state.menuDefaultValue === 2) {
97
+    params = Object.assign({}, params, {
98
+      distanceAsc: 0,
99
+      lat: uni.getStorageSync(USER_LATITUDE),
100
+      lng: uni.getStorageSync(USER_LONGITUDE)
101
+    })
102
+  }
80 103
   getSelectMerchant(params).then((res: StoreResult) => {
81 104
     state.total = res.total
82 105
     state.totalPage = Math.ceil(state.total / state.pageSize);
@@ -106,8 +129,12 @@ function handleShowMerchant(merchant) {
106 129
 }
107 130
 
108 131
 
109
-function change() {}
110
-function onChange() {}
132
+function change() {
133
+}
134
+
135
+function onChange() {
136
+}
137
+
111 138
 // 下拉刷新被下拉
112 139
 const onRefresherPulling = e => {
113 140
   state.triggered = true;
@@ -124,6 +151,7 @@ const onRefresherAbort = e => {
124 151
 const onRefresherRefresh = e => {
125 152
   loadSelectMerchant(0)
126 153
 };
154
+
127 155
 function handleScrollToLower() {
128 156
   state.status = 'loading';
129 157
   state.currentPage += 1;
@@ -137,102 +165,119 @@ function handleScrollToLower() {
137 165
 
138 166
 </script>
139 167
 <template>
140
-<!--  <nut-category :category="state.merchantCategory" @change="change">-->
141
-<!--    <nut-category-pane :categoryChild="state.merchantList" @onChange="onChange">-->
142
-<!--    </nut-category-pane>-->
143
-<!--  </nut-category>-->
144
-    <nut-searchbar
145
-        class="absolute top-0"
146
-        v-model="searchValue" @search="loadSelectMerchant('reload')" @clear="loadSelectMerchant( 'reload')">
147
-      <template v-slot:rightout>
148
-        <div @tap="loadSelectMerchant('reload')">
149
-          搜索
150
-        </div>
151
-      </template>
152
-    </nut-searchbar>
168
+  <!--  <nut-category :category="state.merchantCategory" @change="change">-->
169
+  <!--    <nut-category-pane :categoryChild="state.merchantList" @onChange="onChange">-->
170
+  <!--    </nut-category-pane>-->
171
+  <!--  </nut-category>-->
172
+  <nut-searchbar
173
+      class="absolute top-0"
174
+      v-model="searchValue" @search="loadSelectMerchant('reload')" @clear="loadSelectMerchant( 'reload')">
175
+    <template v-slot:rightout>
176
+      <div @tap="loadSelectMerchant('reload')">
177
+        搜索
178
+      </div>
179
+    </template>
180
+  </nut-searchbar>
153 181
 
154 182
   <div class="flex">
155 183
     <!-- 左侧 一级分类 -->
156
-    <scroll-view
157
-        :scroll-y="true"
158
-        :style="{ height: `${state.scrollHeight}px` }"
159
-        class="w-25 h-full bg-[#f8f8f8]"
160
-    >
161
-      <div
162
-          @tap="loadAll()"
163
-          :class="state.currentMerchantCategoryId == 0 ? 'bg-white font-bold' : ''"
164
-          class="relative w-25 h-15 block text-sm flex justify-center items-center">
165
-        <div class="flex items-center gap-1">
166
-          <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == 0"></div>
167
-          <div>全部</div>
184
+    <div>
185
+      <scroll-view
186
+          :scroll-y="true"
187
+          :style="{ height: `${state.scrollHeight}px` }"
188
+          class="w-25 h-full bg-[#f8f8f8]"
189
+      >
190
+        <div
191
+            @tap="loadAll()"
192
+            :class="state.currentMerchantCategoryId == 0 ? 'bg-white font-bold' : ''"
193
+            class="relative w-25 h-12 block text-sm flex justify-center items-center">
194
+          <div class="flex items-center gap-1">
195
+            <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == 0"></div>
196
+            <div>全部</div>
197
+          </div>
198
+
168 199
         </div>
200
+        <div v-for="(item, index) in state.merchantCategory" :key="index"
201
+             @tap="handleCategoryChange(item)"
202
+             :class="state.currentMerchantCategoryId == item.merchant_category_id ? 'bg-white font-bold' : ''"
203
+             class="relative h-12 block text-sm flex justify-center items-center gap-1 w-25"
204
+        >
205
+          <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == item.merchant_category_id"></div>
169 206
 
170
-      </div>
171
-      <div v-for="(item, index) in state.merchantCategory" :key="index"
172
-           @tap="handleCategoryChange(item)"
173
-           :class="state.currentMerchantCategoryId == item.merchant_category_id ? 'bg-white font-bold' : ''"
174
-           class="relative h-15 block text-sm flex justify-center items-center gap-1 w-25"
175
-      >
176
-        <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == item.merchant_category_id"></div>
207
+          <div>
208
+            {{ item.category_name }}
177 209
 
178
-        <div>
179
-          {{item.category_name}}
210
+          </div>
180 211
 
181 212
         </div>
213
+      </scroll-view>
182 214
 
215
+    </div>
216
+
217
+
218
+    <div>
219
+      <div class="fixed z-3 flex flex-col justify-center h-10">
220
+        <nut-menu>
221
+          <nut-menu-item v-model="state.menuDefaultValue"
222
+                         :options="state.options"
223
+                         @change="loadSelectMerchant('reload')"
224
+          >
225
+
226
+          </nut-menu-item>
227
+        </nut-menu>
183 228
       </div>
184
-    </scroll-view>
185
-
186
-
187
-    <scroll-view
188
-        :scroll-y="true"
189
-        :style="{ height: `${state.scrollHeight}px` }"
190
-        scroll-with-animation
191
-        class="flex flex-1  flex-col h-full w-full  p-3 gap-3"
192
-        :refresher-enabled="true"
193
-        refresher-background="#f5f5f5"
194
-        refresher-default-style="black"
195
-        :refresher-triggered="state.triggered"
196
-        @scrolltolower="handleScrollToLower"
197
-        @refresherPulling="onRefresherPulling"
198
-        @refresherRestore="onRefresherRestore"
199
-        @refresherAbort="onRefresherAbort"
200
-        @refresherrefresh="onRefresherRefresh"
201
-        v-if="state.merchantList && state.merchantList.length > 0"
202
-
203
-    >
204
-      <div
205
-          v-for="(item, index) in state.merchantList" :key="index"
206
-          @click="handleShowMerchant(item)"
207
-          class="mb-3 ">
208
-        <div class="flex">
209
-          <div class="flex ">
210
-            <image :src="item.mer_avatar"
211
-                   mode="aspectFill"
212
-                   class="w-20 h-20 rounded-lg"
213
-            ></image>
214
-          </div>
215 229
 
216
-          <div class="flex flex-col justify-between px-2">
217
-            <div class="flex flex-col gap-2">
218
-              <div class="truncate w-40 ">
219
-                {{ item.mer_name }}
220
-              </div>
221
-              <div class="text-xs text-gray">
222
-                {{ item.care_count }} 人关注
230
+      <scroll-view
231
+          :scroll-y="true"
232
+          :style="{ height: `${state.scrollHeight}px` }"
233
+          scroll-with-animation
234
+          class="flex flex-1  flex-col h-full w-full  p-3 gap-3 mt-8"
235
+          :refresher-enabled="true"
236
+          refresher-background="#f5f5f5"
237
+          refresher-default-style="black"
238
+          :refresher-triggered="state.triggered"
239
+          @scrolltolower="handleScrollToLower"
240
+          @refresherPulling="onRefresherPulling"
241
+          @refresherRestore="onRefresherRestore"
242
+          @refresherAbort="onRefresherAbort"
243
+          @refresherrefresh="onRefresherRefresh"
244
+          v-if="state.merchantList && state.merchantList.length > 0"
245
+
246
+      >
247
+        <div
248
+            v-for="(item, index) in state.merchantList" :key="index"
249
+            @click="handleShowMerchant(item)"
250
+            class="mb-3 ">
251
+          <div class="flex">
252
+            <div class="flex ">
253
+              <image :src="item.mer_avatar"
254
+                     mode="aspectFill"
255
+                     class="w-20 h-20 rounded-lg"
256
+              ></image>
257
+            </div>
258
+
259
+            <div class="flex flex-col justify-between px-2">
260
+              <div class="flex flex-col gap-2">
261
+                <div class="truncate w-40 ">
262
+                  {{ item.mer_name }}
263
+                </div>
264
+                <div class="text-xs text-gray">
265
+                  {{ item.care_count }} 人关注
266
+                </div>
223 267
               </div>
268
+
269
+              <div class="text-xs">{{ (item.distance / 100).toFixed(1) }}km</div>
224 270
             </div>
225 271
 
226
-            <div class="text-xs">{{ (item.distance / 100).toFixed(1)}}km</div>
227 272
           </div>
228
-
229 273
         </div>
230
-      </div>
231
-    </scroll-view>
232
-    <div class="flex-1 justify-center items-center" v-else>
233
-      <CXBEmpty />
274
+      </scroll-view>
275
+      <div class="flex-1 justify-center items-center" v-else>
276
+        <CXBEmpty/>
234 277
 
278
+      </div>
235 279
     </div>
280
+
236 281
   </div>
237 282
 </template>
238 283
 <route lang="yaml">
@@ -240,3 +285,22 @@ style:
240 285
   navigationBarTitleText: 储蓄保
241 286
   enablePullDownRefresh: true
242 287
 </route>
288
+
289
+<style lang="scss">
290
+page {
291
+
292
+  --nut-menu-item-font-size: 14px;
293
+  --nut-menu-bar-line-height: 24px;
294
+  --nut-menu-bar-box-shadow: none;
295
+  --nut-menu-item-active-text-color: #FE0032;
296
+
297
+  .nut-menu {
298
+    background: none !important;
299
+  }
300
+  .nut-menu__bar {
301
+    box-shadow: none !important;
302
+    border: 1px solid #FE0032;
303
+    border-radius: 4px;
304
+  }
305
+}
306
+</style>

+ 1 - 0
src/pages/store/product/detail.vue

@@ -486,6 +486,7 @@ function handleShowCustomer() {
486 486
           <div class="pl-3" v-if="detail && detail.merchant">
487 487
             <div v-for="(item, index) in detail.merchant.recommend"
488 488
                  :key="index"
489
+                 @click="handleProductItemClick(item)"
489 490
                  class="flex inline-flex items-center justify-center relative "
490 491
             >
491 492
               <MerchantProductCard :item="item" exClass="w-40 border border-solid border-gray-200 mr-3"/>

+ 6 - 3
src/pages/store/product/other.vue

@@ -62,7 +62,7 @@ function loadProductDetail(product: Partial<IProductDetail>) {
62 62
   if (product.platform == 6) {
63 63
     getJdProductDetail(product.id).then(res => {
64 64
       const jdProduct = res[0]
65
-      console.log(jdProduct)
65
+      // console.log(jdProduct)
66 66
       mergeProductDetail({
67 67
         images: jdProduct.detail,
68 68
         coupon: {
@@ -164,9 +164,12 @@ function loadProductDetail(product: Partial<IProductDetail>) {
164 164
 function handleBuyNow() {
165 165
   console.log(detail.value)
166 166
   if (detail.value?.platform == 6 && detail.value?.spreadUrl) {
167
+    // console.log(detail.value?.spreadUrl)
168
+    console.log(detail.value)
167 169
     uni.navigateToMiniProgram({
168 170
       appId: 'wx91d27dbf599dff74',
169
-      path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(detail.value?.spreadUrl),
171
+      // path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(detail.value?.spreadUrl),
172
+      path: 'pages/union/proxy/proxy?spreadUrl=' + detail.value.materialUrl,
170 173
       extraData: {
171 174
         foo: 'bar'
172 175
       },
@@ -206,7 +209,7 @@ function handleBuyNow() {
206 209
   }
207 210
 
208 211
   if (detail.value?.platform == 9) {
209
-    // console.log(detail.value)
212
+    console.log(detail.value)
210 213
   }
211 214
   if (detail.value?.platform == 2) {
212 215
     console.log(detail.value)

+ 100 - 25
src/pages/vip/index.vue

@@ -1,24 +1,24 @@
1 1
 <template>
2
-  <CXBBasePage :show="true" title="">
2
+<!--  <CXBBasePage :show="true" title="">-->
3 3
 
4 4
     <div class="flex flex-col gap-3 ">
5
-<!--      <div-->
6
-<!--          class="overflow-hidden fixed top-0 w-full"-->
7
-<!--      >-->
8
-<!--        <nut-searchbar-->
9
-<!--            v-model="searchValue" @search="searchProduct" @clear="loadProductList('reload')">-->
10
-<!--          &lt;!&ndash;      <template v-slot:leftout>&ndash;&gt;-->
11
-<!--          &lt;!&ndash;        <div @tap="navBack">&ndash;&gt;-->
12
-<!--          &lt;!&ndash;          <nut-icon name="left"></nut-icon>&ndash;&gt;-->
13
-<!--          &lt;!&ndash;        </div>&ndash;&gt;-->
14
-<!--          &lt;!&ndash;      </template>&ndash;&gt;-->
15
-<!--          <template v-slot:rightout>-->
16
-<!--            <div @tap="searchProduct">-->
17
-<!--              搜索-->
18
-<!--            </div>-->
19
-<!--          </template>-->
20
-<!--        </nut-searchbar>-->
21
-<!--      </div>-->
5
+      <div
6
+          class="overflow-hidden fixed top-0 w-full"
7
+      >
8
+        <nut-searchbar
9
+            v-model="state.keyword" @search="loadList('reload')" @clear="loadList('reload')">
10
+          <!--      <template v-slot:leftout>-->
11
+          <!--        <div @tap="navBack">-->
12
+          <!--          <nut-icon name="left"></nut-icon>-->
13
+          <!--        </div>-->
14
+          <!--      </template>-->
15
+          <template v-slot:rightout>
16
+            <div @tap="loadList('reload')">
17
+              搜索
18
+            </div>
19
+          </template>
20
+        </nut-searchbar>
21
+      </div>
22 22
       <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>
23 23
       <div class="flex px-3">
24 24
         会员专区
@@ -77,11 +77,19 @@
77 77
 
78 78
           </div>
79 79
         </grid-view>
80
-
80
+        <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500" >
81
+          <div v-if="state.status === 'loading'">
82
+            加载中...
83
+          </div>
84
+          <div v-if="state.status === 'noMore'">
85
+            没有更多了~
86
+          </div>
87
+        </div>
81 88
       </div>
89
+      <CXBEmpty v-else/>
82 90
     </div>
83 91
 
84
-  </CXBBasePage>
92
+<!--  </CXBBasePage>-->
85 93
 </template>
86 94
 
87 95
 <script setup lang="ts">
@@ -90,6 +98,7 @@ import FSearch from "~/components/FSearch/FSearch.vue";
90 98
 import {computed} from "vue";
91 99
 import {getVipAreaList} from "~/apis/merchant";
92 100
 import {CDN_URL} from "~/config/app";
101
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
93 102
 
94 103
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
95 104
 
@@ -102,12 +111,44 @@ const navBarStyle = computed(() => {
102 111
   }
103 112
 })
104 113
 
114
+const state = reactive({
115
+  currentPage: 1,
116
+  pageSize: 10,
117
+  totalPage: 1,
118
+
119
+  keyword: '' ,
120
+  status: 'noMore',
121
+})
105 122
 const list = ref()
106 123
 
107 124
 onLoad(() => {
125
+  // getVipAreaList({
126
+  //   page: 1,
127
+  //   limit: 20
128
+  // }).then(res => {
129
+  //   // console.log(res.list)
130
+  //   console.log(res.list)
131
+  //   if (res) {
132
+  //     list.value = res.list
133
+  //   }
134
+  // })
135
+  loadList('reload')
136
+})
137
+
138
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
139
+  console.log(state.keyword)
140
+  const params = {
141
+    page: state.currentPage,
142
+    limit: state.pageSize
143
+  }
144
+  if (state.keyword) {
145
+    params.keyword = state.keyword
146
+  }
147
+  console.log(params)
108 148
   getVipAreaList({
109
-    page: 1,
110
-    limit: 20
149
+    // page: state.currentPage,
150
+    // limit: state.pageSize
151
+    ...params
111 152
   }).then(res => {
112 153
     // console.log(res.list)
113 154
     console.log(res.list)
@@ -115,18 +156,52 @@ onLoad(() => {
115 156
       list.value = res.list
116 157
     }
117 158
   })
118
-})
119
-
159
+}
120 160
 function handleItemClick(item) {
121 161
   uni.navigateTo({
122 162
     url: `/pages/store/product/detail?id=${item.product_id}`
123 163
   })
124 164
 }
165
+
166
+function handleScrollToLower() {
167
+  state.status = 'loading';
168
+  state.currentPage += 1;
169
+  console.log(state.totalPage)
170
+  if (state.currentPage > state.totalPage) {
171
+    state.status = 'noMore';
172
+  } else {
173
+    setTimeout(() => {
174
+      loadList('page')
175
+    }, 300)
176
+  }
177
+}
178
+
179
+onReachBottom(() => {
180
+  console.log('到底了。。。')
181
+
182
+  handleScrollToLower()
183
+
184
+})
185
+
186
+onPullDownRefresh(() => {
187
+  loadList('reload', items => {
188
+    setTimeout(() => {
189
+      uni.stopPullDownRefresh()
190
+    }, 300)
191
+  })
192
+})
125 193
 </script>
126 194
 
127 195
 <route lang="yaml">
128 196
 style:
129
-  navigationStyle: custom
130 197
   navigationBarTitleText: 储蓄保会员
131 198
   enablePullDownRefresh: true
132 199
 </route>
200
+<style>
201
+page {
202
+  background: #f8f8f8;
203
+  --nut-searchbar-background: #fff;
204
+  --nut-searchbar-input-background: #f8f8f8;
205
+  --nut-searchbar-input-box-shadow: none;
206
+}
207
+</style>

+ 19 - 1
src/pages/webview/agreement.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <web-view :src="url" />
2
+  <web-view :src="url" @load="onPageLoad"/>
3 3
 </template>
4 4
 <script setup lang="ts">
5 5
 // const props = defineProps({
@@ -8,6 +8,7 @@
8 8
 //     required: true
9 9
 //   }
10 10
 // })
11
+const type = ref('')
11 12
 const url = ref('https://vod.bjtdba.com/agreement/')
12 13
 const PRIVACY_AGREEMENT = '1' // 隐私政策
13 14
 const SERVICE_AGREEMENT = '2' // 服务协议
@@ -15,7 +16,24 @@ const SERVICE_AGREEMENT = '2' // 服务协议
15 16
 // const PROTOCOL = `http://vod.bjtdba.com/agreement/`
16 17
 onLoad((option: any) => {
17 18
   url.value = url.value + option.type
19
+  type.value = option.type
20
+  // uni.setNavigationBarTitle({
21
+  //   title: '活动说明'
22
+  // })
23
+  // if (option.type == '17') {
24
+  //   uni.setNavigationBarTitle({
25
+  //     title: '活动说明'
26
+  //   })
27
+  // }
18 28
 })
29
+
30
+function onPageLoad() {
31
+  // if (type.value == '17') {
32
+  //   uni.setNavigationBarTitle({
33
+  //     title: '活动说明'
34
+  //   })
35
+  // }
36
+}
19 37
 </script>
20 38
 <route lang="yaml">
21 39
 style:

BIN
src/static/icon/chuangke-off.png


BIN
src/static/icon/chuangke-on.png