Basil 2 vuotta sitten
vanhempi
commit
3777d85284
64 muutettua tiedostoa jossa 3132 lisäystä ja 547 poistoa
  1. 2 0
      components.d.ts
  2. 23 4
      src/apis/common.ts
  3. 1 1
      src/apis/merchant.ts
  4. 21 0
      src/apis/model/feedback.model.ts
  5. 1 1
      src/apis/model/myRelationProductModel.ts
  6. 18 0
      src/apis/model/order.model.ts
  7. 13 1
      src/apis/model/product.model.ts
  8. 3 0
      src/apis/model/userShareProductModel.ts
  9. 15 3
      src/apis/order.api.ts
  10. 2 0
      src/apis/product.ts
  11. 76 13
      src/apis/user.ts
  12. 28 13
      src/components/CXBSkuPopup/CXBSkuPopup.vue
  13. 2 2
      src/components/CXBYaojinTag/CXBYaojinTag.vue
  14. 2 2
      src/components/ProductCard/ProductCard.vue
  15. 2 0
      src/components/ProductList/ProductList.vue
  16. 1 1
      src/pages.json
  17. 188 0
      src/pages/after-sales-order-list/index.vue
  18. 11 3
      src/pages/annuity/index.vue
  19. 9 2
      src/pages/bangfuzhongxin/index.vue
  20. 84 13
      src/pages/dacang/list/index.vue
  21. 180 16
      src/pages/feedback/index.vue
  22. 1 1
      src/pages/home/components/header.vue
  23. 1 1
      src/pages/home/index.vue
  24. 39 29
      src/pages/immediate-withdrawal/index.vue
  25. 199 21
      src/pages/invite-friends/index.vue
  26. 12 5
      src/pages/invite-partners/index.vue
  27. 43 17
      src/pages/my-integral/index.vue
  28. 73 0
      src/pages/my-integral/meet-scan-code.vue
  29. 269 0
      src/pages/my-integral/user-invation.vue
  30. 64 6
      src/pages/my-invitation/index.vue
  31. 23 6
      src/pages/my-relation-merchant/index.vue
  32. 35 15
      src/pages/my-relation-product/index.vue
  33. 46 17
      src/pages/my-rules/index.vue
  34. 33 7
      src/pages/order-confirm/index.vue
  35. 2 2
      src/pages/order/components/OrderItem.vue
  36. 1 1
      src/pages/order/components/OtherOrderItem.vue
  37. 12 10
      src/pages/order/detail.vue
  38. 14 10
      src/pages/order/index.vue
  39. 54 50
      src/pages/order/third-order.vue
  40. 95 16
      src/pages/order_addcart/index.vue
  41. 15 2
      src/pages/pension_account/index.vue
  42. 12 3
      src/pages/product/zibuyangsheng.vue
  43. 30 27
      src/pages/real-name-authentication/index.vue
  44. 61 13
      src/pages/red-integral/index.vue
  45. 57 0
      src/pages/revenue-sharing/detail.vue
  46. 79 58
      src/pages/revenue-sharing/index.vue
  47. 1 1
      src/pages/search/index.vue
  48. 32 5
      src/pages/share-the-product/index.vue
  49. 156 12
      src/pages/store/home/components/MerchantHeader.vue
  50. 1 1
      src/pages/store/home/components/MerchantProductCard.vue
  51. 1 1
      src/pages/store/home/components/MerchantProductList.vue
  52. 250 35
      src/pages/store/home/index.vue
  53. 214 0
      src/pages/store/home/search.vue
  54. 16 6
      src/pages/store/nearby/index.vue
  55. 253 40
      src/pages/store/product/detail.vue
  56. 51 11
      src/pages/store/product/other.vue
  57. 50 12
      src/pages/third_party_binding/index.vue
  58. 5 4
      src/pages/user/address/edit.vue
  59. 2 2
      src/pages/user/address/index.vue
  60. 111 15
      src/pages/user/index.vue
  61. 12 4
      src/pages/version-update/index.vue
  62. 2 2
      src/pages/vip/index.vue
  63. 1 1
      src/pages/webview/agreement.vue
  64. 22 3
      src/pages/withdrawal-record/index.vue

+ 2 - 0
components.d.ts

@@ -54,6 +54,7 @@ declare module '@vue/runtime-core' {
54 54
     NutMenu: typeof import('uniapp-nutui/components/menu/menu.vue')['default']
55 55
     NutMenuItem: typeof import('uniapp-nutui/components/menuitem/menuitem.vue')['default']
56 56
     NutNoticebar: typeof import('uniapp-nutui/components/noticebar/noticebar.vue')['default']
57
+    NutOverlay: typeof import('uniapp-nutui/components/overlay/overlay.vue')['default']
57 58
     NutPicker: typeof import('uniapp-nutui/components/picker/picker.vue')['default']
58 59
     NutPopup: typeof import('uniapp-nutui/components/popup/popup.vue')['default']
59 60
     NutSearchbar: typeof import('uniapp-nutui/components/searchbar/searchbar.vue')['default']
@@ -61,6 +62,7 @@ declare module '@vue/runtime-core' {
61 62
     NutTable: typeof import('uniapp-nutui/components/table/table.vue')['default']
62 63
     NutTabPane: typeof import('uniapp-nutui/components/tabpane/tabpane.vue')['default']
63 64
     NutTabs: typeof import('uniapp-nutui/components/tabs/tabs.vue')['default']
65
+    NutUploader: typeof import('uniapp-nutui/components/uploader/uploader.vue')['default']
64 66
     ProductCard: typeof import('./src/components/ProductCard/ProductCard.vue')['default']
65 67
     ProductList: typeof import('./src/components/ProductList/ProductList.vue')['default']
66 68
     SignInGiftBag: typeof import('./src/components/CXBDialogSignIn/SignInGiftBag.vue')['default']

+ 23 - 4
src/apis/common.ts

@@ -5,6 +5,7 @@ import type {ArticleCategoryModel, ArticleModel, ArticleResult} from "~/apis/mod
5 5
 import type {HomeQuickLinkModel} from "~/apis/model/common.model";
6 6
 import type {IntegralProductModel, IntegralProductParams} from "~/apis/model/integral.model";
7 7
 import type {AnnouncementResult} from "~/apis/model/announcement.model";
8
+import type {FeedbackRequestModel} from "~/apis/model/feedback.model";
8 9
 // import {a} from "unocss-preset-weapp/dist/utilities-46c43da7";
9 10
 // 引入
10 11
 // import amap from '~/libs/amap-wx.130.js';
@@ -37,10 +38,31 @@ enum API {
37 38
     USER_LOGOUT = '/gateway/userCenter_service/userCenterService/userLogout',
38 39
 
39 40
     // 上传图片
40
-    UPLOAD_IMAGE_FIELD = '/api/upload/image/field'
41
+    UPLOAD_IMAGE_FIELD = '/api/upload/image/field',
42
+    // 意见反馈-类型
43
+    FEEDBACK_TYPE_NEW = '/api/common/feedback_type_new',
44
+    // 意见反馈提交
45
+    FEEDBACK = '/api/user/feedback'
41 46
 }
42 47
 
43 48
 /**
49
+ * 添加反馈
50
+ * @param params
51
+ */
52
+export function createFeedback(params: FeedbackRequestModel) {
53
+    return defHttp.post({
54
+        url: API.FEEDBACK,
55
+        data: {
56
+            ...params
57
+        }
58
+    })
59
+}
60
+export function getFeedbackType() {
61
+    return defHttp.get({
62
+        url: API.FEEDBACK_TYPE_NEW,
63
+    })
64
+}
65
+/**
44 66
  * 注销账号
45 67
  * @param phone
46 68
  */
@@ -48,9 +70,6 @@ export function closeAccount(phone: string) {
48 70
 
49 71
     return defHttp.post({
50 72
         url: API.USER_LOGOUT,
51
-        data: {
52
-            phone
53
-        }
54 73
     })
55 74
 }
56 75
 

+ 1 - 1
src/apis/merchant.ts

@@ -45,7 +45,7 @@ export function getMerchantDetail(id: string): Promise<MerchantDetailModel> {
45 45
     return defHttp.get({
46 46
         url: API.GET_DETAIL + `/${id}`
47 47
     }, {
48
-        withToken: false
48
+        // withToken: false
49 49
     })
50 50
 }
51 51
 

+ 21 - 0
src/apis/model/feedback.model.ts

@@ -0,0 +1,21 @@
1
+export interface FeedbackTypeModel {
2
+    // 分类id
3
+    feedback_category_id: string
4
+    // 名称
5
+    cate_name: string
6
+    // 是否选中
7
+    selected: boolean
8
+}
9
+
10
+export interface FeedbackRequestModel {
11
+    // 反馈类型 id
12
+    type: string
13
+    // 内容
14
+    content: string
15
+    // 图片
16
+    images: Array<string>
17
+    // 联系人姓名
18
+    realname: string
19
+    // 电话
20
+    contact: string
21
+}

+ 1 - 1
src/apis/model/myRelationProductModel.ts

@@ -1,7 +1,7 @@
1 1
 export interface MyRelationProductPrams {
2 2
     page: number
3 3
     limit: number
4
-    keyword: string
4
+    keywords: string
5 5
 }
6 6
 export interface MyRelationProductResult {
7 7
     count: number

+ 18 - 0
src/apis/model/order.model.ts

@@ -6,6 +6,24 @@ export interface OrderListObligationResult {
6 6
     list: Array<OrderListObligationModel>
7 7
 }
8 8
 
9
+export interface OrderQuantityModel {
10
+    // 评价
11
+    noComment: string
12
+    done: string
13
+    // 退款售后
14
+    refund: string
15
+    // 待收货
16
+    noDeliver: string
17
+    // 待付款
18
+    noPay: string
19
+    // 待发货
20
+    noPostage: string
21
+    orderPrice: string
22
+    orderCount: string
23
+    // 全部
24
+    all: string
25
+}
26
+
9 27
 export interface OrderListObligationModel {
10 28
      group_order_id: string//订单id
11 29
      group_order_sn: string

+ 13 - 1
src/apis/model/product.model.ts

@@ -15,11 +15,23 @@ export interface ProductParams {
15 15
     limit: number
16 16
 }
17 17
 
18
+/**
19
+ * 请求类别,推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7;
20
+ *
21
+ */
18 22
 export interface SearchProductParams {
19
-    mer_keyword: string
23
+    mer_id?: string
24
+    mer_keyword?: string
20 25
     pageNum: number
21 26
     pageSize: number
22 27
     order: ORDER
28
+    //请求类别,推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7;
29
+    is_best?: number
30
+    sales?: number
31
+    is_new?: number
32
+    priceType?: number
33
+    type?: number
34
+    category_id?: string
23 35
     // order: 'sales' | 'is_new' | 'price_asc'
24 36
 }
25 37
 

+ 3 - 0
src/apis/model/userShareProductModel.ts

@@ -4,6 +4,9 @@ export interface UserShareProductParams {
4 4
     uid: string
5 5
     pageNum: number
6 6
     pageSize: number
7
+    start_time?: string
8
+    end_time?: string
9
+
7 10
 }
8 11
 
9 12
 export interface UserShareProductListModel {

+ 15 - 3
src/apis/order.api.ts

@@ -2,7 +2,7 @@ import {defHttp} from "~/utils/http"
2 2
 
3 3
 import type {
4 4
     IntegralOrderCreateModel, OrderCheckModel, OrderCreateModel,
5
-    OrderCreateShoppingModel, OrderListDataModel, OrderListObligationResult, OrderListResult
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 8
 
@@ -68,6 +68,14 @@ enum API {
68 68
 }
69 69
 
70 70
 /**
71
+ * 订单统计
72
+ */
73
+export function totalOrderNumber(): Promise<OrderQuantityModel> {
74
+    return defHttp.get({
75
+        url: API.ORDER_NUMBER,
76
+    })
77
+}
78
+/**
71 79
  * 三方订单
72 80
  * @param params
73 81
  */
@@ -148,10 +156,14 @@ export function orderCheck(params: {
148 156
 /**
149 157
  * 修改购物车数量
150 158
  * @param cart_id
159
+ * @param cart_num
151 160
  */
152
-export function cartChange(cart_id: string) {
161
+export function cartChange(cart_id: string, cart_num: number) {
153 162
     return defHttp.post({
154
-        url: `${API.USER_CART_CHANGE}/${cart_id}`
163
+        url: `${API.USER_CART_CHANGE}/${cart_id}`,
164
+        data: {
165
+            cart_num
166
+        }
155 167
     })
156 168
 }
157 169
 

+ 2 - 0
src/apis/product.ts

@@ -102,6 +102,8 @@ export function searchProductList(params: SearchProductParams): Promise<SearchPr
102 102
         data: {
103 103
             ...params
104 104
         }
105
+    }, {
106
+        withToken: false
105 107
     })
106 108
 }
107 109
 

+ 76 - 13
src/apis/user.ts

@@ -111,6 +111,11 @@ enum API {
111 111
     USER_APPLY_BANG_FU = '/api/user/apply_bang_fu',
112 112
 
113 113
     /**
114
+     * 第三方账号绑定状态
115
+     */
116
+    USER_GET_ACCOUNT = '/api/user/getAccount',
117
+
118
+    /**
114 119
      * 邀请好友分享图片分类接口
115 120
      */
116 121
     USER_SHARE_PRODUCT_SERVICE_CLASSIFY_LIST = `/gateway/userCenter_service/userShareProductService/classifyList`,
@@ -154,19 +159,61 @@ enum API {
154 159
 
155 160
     USER_ADD_CERTIFICATION = '/api/user/add_certification',
156 161
 
157
-   // 关注商铺
162
+    // 关注商铺
158 163
     USER_RELATION_CREATE = '/api/user/relation/create',
159 164
     // getCertification
165
+    // 邀请码绑定接口
166
+    SPREAD_NUMBER = '/gateway/userCenter_service/userShareProductService/spreadNumber',
167
+
168
+    // 分享二维码图片
169
+    SPREAD_IMAGE = '/api/user/spread_image?type=wechat'
170
+}
171
+
172
+export function getSpreadImage() {
173
+    return defHttp.get({
174
+        url: API.SPREAD_IMAGE,
175
+
176
+    })
177
+}
178
+/**
179
+ * 绑定邀请码
180
+ *
181
+ * @param params
182
+ */
183
+export function getSpreadNumber(params: { uid: string, number: string }) {
184
+    return defHttp.post({
185
+        url: API.SPREAD_NUMBER,
186
+        data: {
187
+            ...params
188
+        },
189
+    }, {
190
+        withToken: false
191
+    })
192
+}
193
+
194
+/**
195
+ * 第三方账号绑定状态
196
+ */
197
+export function getBindingState() {
198
+    return defHttp.post({
199
+        url: API.USER_GET_ACCOUNT
200
+    }).catch(error => {
201
+        uni.showToast({
202
+            title: error,
203
+            icon: 'none'
204
+        })
205
+    })
160 206
 }
161 207
 
162 208
 /**
163 209
  * 公证处养老金余额
164 210
  */
165
-export function getAmountFromGzc(): Promise<{amount: string}> {
211
+export function getAmountFromGzc(): Promise<{ amount: string }> {
166 212
     return defHttp.get({
167 213
         url: API.GET_AMOUNT_FROM_GZC,
168 214
     })
169 215
 }
216
+
170 217
 /**
171 218
  * PHP 我的邀请
172 219
  */
@@ -175,11 +222,12 @@ export function getAgentInfo(): Promise<InvitePHPModel> {
175 222
         url: API.GET_AGENT_INFO
176 223
     })
177 224
 }
225
+
178 226
 /**
179 227
  * JAVA 我的邀请
180 228
  * @param params
181 229
  */
182
-export function getSelectUserInviteProfit(params: {uid: string}): Promise<IntegralResult>{
230
+export function getSelectUserInviteProfit(params: { uid: string }): Promise<IntegralResult> {
183 231
     return defHttp.get({
184 232
         url: API.SELECT_USER_INVITE_PROFIT,
185 233
         data: {
@@ -189,6 +237,7 @@ export function getSelectUserInviteProfit(params: {uid: string}): Promise<Integr
189 237
         withToken: false
190 238
     })
191 239
 }
240
+
192 241
 /**
193 242
  * 提现配置
194 243
  */
@@ -207,11 +256,12 @@ export function getBandAccountInfo(params: {
207 256
         url: API.GET_BAND_ACCOUNT_INFO
208 257
     })
209 258
 }
259
+
210 260
 /**
211 261
  * 获取红积分列表
212 262
  * @param params
213 263
  */
214
-export function getRedIntegralList(params: {page: number, limit: number}) {
264
+export function getRedIntegralList(params: { page: number, limit: number }) {
215 265
     return defHttp.get({
216 266
         url: API.USER_RED_LOG,
217 267
         data: {
@@ -219,6 +269,7 @@ export function getRedIntegralList(params: {page: number, limit: number}) {
219 269
         }
220 270
     })
221 271
 }
272
+
222 273
 /* 关注/收藏
223 274
  */
224 275
 export function relation(params: RelationRequest) {
@@ -229,6 +280,7 @@ export function relation(params: RelationRequest) {
229 280
         }
230 281
     })
231 282
 }
283
+
232 284
 /**
233 285
  * 删除地址
234 286
  * @param id
@@ -251,6 +303,7 @@ export function getCityNewFiveList(pid: number) {
251 303
         }
252 304
     })
253 305
 }
306
+
254 307
 /**
255 308
  * 实名认证
256 309
  */
@@ -268,13 +321,14 @@ export function getCertificationInfo(type: string) {
268 321
  * @param params
269 322
  */
270 323
 export function submitCertification(params: CertificationRequest) {
271
-   return defHttp.get({
272
-       url: API.USER_ADD_CERTIFICATION,
273
-       data: {
274
-           ...params
275
-       }
276
-   })
324
+    return defHttp.get({
325
+        url: API.USER_ADD_CERTIFICATION,
326
+        data: {
327
+            ...params
328
+        }
329
+    })
277 330
 }
331
+
278 332
 /// 地址相关
279 333
 
280 334
 /**
@@ -286,6 +340,7 @@ export function getUserAddressDetail(id: string) {
286 340
         url: API.USER_ADDRESS_DETAIL + `/${id}`
287 341
     })
288 342
 }
343
+
289 344
 export function addressNewCreate(params: {
290 345
     province: string,
291 346
     city: string,
@@ -310,6 +365,7 @@ export function addressNewCreate(params: {
310 365
         }
311 366
     })
312 367
 }
368
+
313 369
 /**
314 370
  * 获取地址列表
315 371
  */
@@ -327,6 +383,7 @@ export function getCityList(): Promise<Array<OneAddressModel>> {
327 383
         url: API.CITY_NEW_LIST
328 384
     })
329 385
 }
386
+
330 387
 /**
331 388
  * 地址添加或者修改
332 389
  * @param params
@@ -340,11 +397,12 @@ export function getCityList(): Promise<Array<OneAddressModel>> {
340 397
 //     })
341 398
 // }
342 399
 
343
-export function getCartCount(): Promise<Array<{count: number}>> {
400
+export function getCartCount(): Promise<Array<{ count: number }>> {
344 401
     return defHttp.get({
345 402
         url: API.USER_CART_COUNT
346 403
     })
347 404
 }
405
+
348 406
 /**
349 407
  * 获取购物车列表
350 408
  */
@@ -363,6 +421,7 @@ export function deleteCartItem(cart_id: any[]) {
363 421
         }
364 422
     })
365 423
 }
424
+
366 425
 /**
367 426
  * 获取我的评价(评论)
368 427
  */
@@ -495,6 +554,7 @@ export function getApplicationWithdrawal(params: {
495 554
         }
496 555
     })
497 556
 }
557
+
498 558
 /**
499 559
  * 获取用户养老金信息
500 560
  */
@@ -517,6 +577,7 @@ export function getUserYanglaoJinLogXx(params: {
517 577
         url: API.GET_YANGLAO_LOG
518 578
     })
519 579
 }
580
+
520 581
 /**
521 582
  * 获线上取养老金记录
522 583
  */
@@ -526,7 +587,7 @@ export function getYanglaoJinLogXs(params: {
526 587
     // 1 线下 0 线上
527 588
     // 1 拼多多, 2 唯品会, 3 苏宁, 5 淘宝, 6 京东, 90 线上, 99 线下
528 589
     source: ''
529
-}):Promise<YanglaoLogXsResult> {
590
+}): Promise<YanglaoLogXsResult> {
530 591
     return defHttp.get({
531 592
         url: API.GET_YANGLAO_LOG,
532 593
         data: {
@@ -534,6 +595,7 @@ export function getYanglaoJinLogXs(params: {
534 595
         }
535 596
     })
536 597
 }
598
+
537 599
 /**
538 600
  * 获取平台服务费计算
539 601
  */
@@ -646,6 +708,7 @@ export function updateUserInfo(params: UpdateUserInfoRequestModel) {
646 708
         }
647 709
     })
648 710
 }
711
+
649 712
 /**
650 713
  * 获取协议内容
651 714
  */
@@ -774,7 +837,7 @@ export function login(key: string) {
774 837
 /**
775 838
  * 新签到信息
776 839
  */
777
-export function getNewSignInInfo():Promise<SignInInfoModel> {
840
+export function getNewSignInInfo(): Promise<SignInInfoModel> {
778 841
     return defHttp.get({
779 842
         url: API.NEW_SIGN_INFO,
780 843
     })

+ 28 - 13
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 h-[40%]"
105
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe min-h-[40%] h-fit"
106 106
 
107 107
   >
108 108
     <div class="flex flex-col justify-between h-full">
@@ -129,28 +129,43 @@ function handleCountChange(value) {
129 129
                   剩余库存{{currentSku.stock}}
130 130
                 </div>
131 131
                 <div class="flex items-end gap-2" v-if="detail.mer_id === '148'">
132
-                  {{ currentSku.price * 30 }} 积分
132
+                  {{ currentSku.ot_price * 30 }} 积分
133 133
                 </div>
134 134
                 <div class="flex items-end gap-2" v-else>
135 135
                   <FPrice :price="currentSku.price"/>
136
-                  <FPrice v-if="detail && detail.ot_price" :price="detail.ot_price" :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through/>
136
+                  <FPrice v-if="currentSku.ot_price" :price="currentSku.ot_price" :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through/>
137 137
                 </div>
138 138
               </div>
139 139
 
140 140
             </div>
141 141
           </div>
142 142
 
143
-          <div class="flex flex-row gap-2  flex-wrap">
144
-            <div
145
-                v-for="(item, index) in skuList"
146
-                :key="index"
147
-                @tap="handleSelectedSku(item)"
148
-                class="text-[12px] border border-solid rounded p-1 px-2 "
149
-                :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
150
-            >
151
-              {{ item.sku }}
143
+<!--          <template v-if="skuList && skuList.length > 0"></template>-->
144
+<!--          <scroll-view-->
145
+<!--              :scroll-y="true"-->
146
+<!--              class="h-20"-->
147
+<!--          >-->
148
+
149
+            <div class="text-xs flex" v-if="skuList && skuList.length > 0">规格</div>
150
+            <div class="flex flex-row gap-2  flex-wrap ">
151
+              <div
152
+                  v-for="(item, index) in skuList"
153
+                  :key="index"
154
+                  @tap="handleSelectedSku(item)"
155
+
156
+              >
157
+                <div
158
+                    v-if="item.sku && item.sku !== ''"
159
+                    class="text-[12px] border border-solid rounded p-1 px-2 "
160
+                    :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
161
+                >
162
+                  {{ item.sku }}
163
+
164
+                </div>
165
+              </div>
152 166
             </div>
153
-          </div>
167
+
168
+<!--          </scroll-view>-->
154 169
         </div>
155 170
         <div class="p-3">
156 171
           <div class="flex  justify-between text-sm">

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

@@ -7,8 +7,8 @@ const props = defineProps({
7 7
 })
8 8
 </script>
9 9
 <template>
10
-  <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
11
-    <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
10
+  <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit h-4">
11
+    <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
12 12
            mode="widthFix" class="!w-7"></image>
13 13
     <div class="px-2 flex items-center jusitify-center text-[11px]">
14 14
       <div>

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

@@ -30,8 +30,8 @@ const emit = defineEmits<{
30 30
         {{item.name}}
31 31
       </div>
32 32
       <div class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
33
-        <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
34
-               mode="widthFix" class="!w-8 "></image>
33
+        <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
34
+               mode="widthFix" class="!w-8 h-4"></image>
35 35
         <div class="px-2 flex items-center jusitify-center">
36 36
           <div v-if="item.type == 5">
37 37
             养老金 ¥{{item.yanglao}}

+ 2 - 0
src/components/ProductList/ProductList.vue

@@ -1,6 +1,7 @@
1 1
 <script lang="ts" setup>
2 2
 
3 3
 import ProductCard from "~/components/ProductCard/ProductCard.vue";
4
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4 5
 
5 6
 const props = defineProps({
6 7
   list: {
@@ -35,5 +36,6 @@ function handleClickItem(item) {
35 36
     </grid-view>
36 37
 
37 38
   </div>
39
+  <CXBEmpty v-else/>
38 40
   <!--  </scroll-view>-->
39 41
 </template>

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


+ 188 - 0
src/pages/after-sales-order-list/index.vue

@@ -0,0 +1,188 @@
1
+<template>
2
+  <CXBBasePage>
3
+    <nut-tabs v-model="state.tabvalue">
4
+      <nut-tab-pane title="全部">
5
+
6
+        <div v-if="state.allOrderList.length > 0" class="flex flex-col gap-3">
7
+          <div v-for="(orderItem, index) in state.allOrderList" :key="index">
8
+            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
9
+            <OtherOrderItem :item="orderItem" v-else/>
10
+          </div>
11
+        </div>
12
+        <CXBEmpty v-else/>
13
+
14
+      </nut-tab-pane>
15
+      <nut-tab-pane title="待付款">
16
+        <div v-if="state.obligationOrderList.length > 0">
17
+          <div v-for="(orderItem, index) in state.obligationOrderList" :key="index">
18
+            <OrderItem :order-item="orderItem"/>
19
+            <!--            <OtherOrderItem :item="orderItem" v-else/>-->
20
+          </div>
21
+        </div>
22
+        <CXBEmpty v-else/>
23
+      </nut-tab-pane>
24
+      <nut-tab-pane title="待发货">
25
+        <div v-if="state.orderList.length > 0">
26
+          <div v-for="(orderItem, index) in state.orderList" :key="index">
27
+            <OrderItem :order-item="orderItem"/>
28
+            <!--            <OtherOrderItem :item="orderItem" v-else/>-->
29
+            <!--            <OtherOrderItem :item="orderItem"/>-->
30
+          </div>
31
+        </div>
32
+        <CXBEmpty v-else/>
33
+
34
+      </nut-tab-pane>
35
+      <nut-tab-pane title="待收货">
36
+        <div v-if="state.orderList.length > 0">
37
+          <div v-for="(orderItem, index) in state.orderList" :key="index">
38
+            <OrderItem :order-item="orderItem"/>
39
+            <!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
40
+            <!--            <OtherOrderItem :item="orderItem" v-else/>-->
41
+          </div>
42
+        </div>
43
+        <CXBEmpty v-else/>
44
+
45
+      </nut-tab-pane>
46
+      <nut-tab-pane title="待评价">
47
+        <div v-if="state.orderList.length > 0">
48
+          <div v-for="(orderItem, index) in state.orderList" :key="index">
49
+            <OrderItem :order-item="orderItem"/>
50
+            <!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
51
+            <!--            <OtherOrderItem :item="orderItem" v-else/>-->
52
+          </div>
53
+        </div>
54
+        <CXBEmpty v-else/>
55
+      </nut-tab-pane>
56
+    </nut-tabs>
57
+
58
+  </CXBBasePage>
59
+</template>
60
+<script lang="ts" setup>
61
+// import { reactive } from 'vue';
62
+// export default {
63
+//   setup() {
64
+import {getOrderListFromStatus, getAllOrder, getGroupOrderList} from "~/apis/order.api";
65
+import type {OrderListModel} from "~/apis/model/order.model";
66
+import FPrice from "~/components/FPrice/FPrice.vue";
67
+import FButton from "~/components/FButton/FButton.vue";
68
+import OrderItem from "~/pages/order/components/OrderItem.vue";
69
+import amapWx from "~/libs/amap-wx";
70
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
71
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
72
+import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
73
+
74
+const state = reactive({
75
+  tabvalue: 0,
76
+
77
+  allOrderTotal: 0,
78
+  allOrderList: [],
79
+
80
+  // 待付款订单列表
81
+  obligationOrderList: [],
82
+
83
+  orderList: [],
84
+});
85
+
86
+onLoad(options => {
87
+  if (options && options.tabIndex) {
88
+    state.tabvalue = options.tabIndex
89
+  }
90
+  loadAllOrderList()
91
+
92
+  // 监听事件
93
+  uni.$on('orderCancelFromList', () => {
94
+    loadAllOrderList()
95
+    state.tabvalue = 0
96
+  })
97
+})
98
+function  	splitArray(list, sp) {
99
+  if (typeof list != 'object') return [];
100
+  if (sp == undefined) sp = [];
101
+  for (var i = 0; i < list.length; i++) {
102
+    sp.push(list[i]);
103
+  }
104
+  return sp;
105
+}
106
+function loadAllOrderList() {
107
+  // 获取全部订单
108
+  getAllOrder({
109
+    page: 1,
110
+    limit: 10
111
+  }).then(res => {
112
+    // console.log(res)
113
+    state.allOrderTotal = res.total
114
+    state.allOrderList = res.list
115
+    // console.log(res)
116
+  })
117
+}
118
+watch(() => state.tabvalue, (val) => {
119
+  switch (val) {
120
+    case '0': {
121
+      loadAllOrderList()
122
+      break;
123
+    }
124
+    case '1': {
125
+      getGroupOrderList({
126
+        page: 1,
127
+        limit: 10
128
+      }).then(res => {
129
+        // console.log(res)
130
+        // state.obligationOrderList = splitArray(res.list, state.obligationOrderList)
131
+        state.obligationOrderList = res.list
132
+      })
133
+      break;
134
+      // getOrderListFromStatus({
135
+      //   page: 1,
136
+      //   limit: 10,
137
+      //   status: 0
138
+      // }).then(res => {
139
+      //   state.obligationOrderList = res.list
140
+      // })
141
+    }
142
+      // 待发货
143
+    case '2': {
144
+      getOrderListFromStatus({
145
+        page: 1,
146
+        limit: 10,
147
+        status: 0
148
+      }).then(res => {
149
+        state.orderList = res.list
150
+      })
151
+      break;
152
+    }
153
+    case '3': {
154
+      getOrderListFromStatus({
155
+        page: 1,
156
+        limit: 10,
157
+        status: 1
158
+      }).then(res => {
159
+        state.orderList = res.list
160
+      })
161
+      break;
162
+    }
163
+    case '4': {
164
+      getOrderListFromStatus({
165
+        page: 1,
166
+        limit: 10,
167
+        status: 2
168
+      }).then(res => {
169
+        state.orderList = res.list
170
+      })
171
+      break;
172
+    }
173
+  }
174
+})
175
+
176
+
177
+</script>
178
+<route lang="yaml">
179
+style:
180
+navigationBarTitleText: 我的订单
181
+enablePullDownRefresh: true
182
+</route>
183
+
184
+<style>
185
+.nut-tab-pane {
186
+  background: #f5f5f5 !important;
187
+}
188
+</style>

+ 11 - 3
src/pages/annuity/index.vue

@@ -101,6 +101,11 @@ function handleToCitic() {
101 101
     }
102 102
   })
103 103
 }
104
+function handleShowAgreement(type) {
105
+  uni.navigateTo({
106
+    url: '/pages/webview/agreement?type=' + type
107
+  })
108
+}
104 109
 </script>
105 110
 
106 111
 <template>
@@ -108,6 +113,9 @@ function handleToCitic() {
108 113
     <div class="h-20 bg-[#fe0032] absolute w-screen top-0"></div>
109 114
 
110 115
     <div class="px-4 flex flex-col relative gap-3">
116
+      <div @click="handleShowAgreement(8)" class="flex justify-end text-white">
117
+        <div class="text-sm">养老金规则</div>
118
+      </div>
111 119
       <div class="flex flex-col bg-white rounded  p-4">
112 120
         <div class="flex items-center w-full gap-2">
113 121
           <image v-if="userStore.userInfo && userStore.userInfo.avatar"
@@ -128,7 +136,7 @@ function handleToCitic() {
128 136
               @tap="handleRealName"
129 137
               class="text-xs underline text-[#fe0032]"
130 138
           >
131
-            {{userStore.userInfo.is_ertification ? '已认证' : '实名认证'}}
139
+            {{userStore.userInfo.is_ertification == 1 ? '已认证' : '实名认证'}}
132 140
 
133 141
           </div>
134 142
         </div>
@@ -140,7 +148,7 @@ function handleToCitic() {
140 148
           <div class=" flex justify-around w-full">
141 149
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
142 150
               <div class="font-bold">
143
-                ¥ {{yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a}}
151
+                ¥ {{(yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a).toFixed(2)}}
144 152
               </div>
145 153
               <div class="text-xs text-gray-400">预估养老金</div>
146 154
             </div>
@@ -213,7 +221,7 @@ function handleToCitic() {
213 221
     </div>
214 222
 
215 223
     <div class="text-xs p-4 justify-center items-center rounded">
216
-      <div class="bg-yellow/10  flex gap-1 items-center p-3">
224
+      <div class="bg-yellow/10  flex gap-1 items-center p-3" @click="handleShowAgreement(7)">
217 225
         <div class="text-[#ff6010]">个人消费养老金规范管理计划合规管理 有计划养老</div>
218 226
         <image :src="get_to_know_buttons_220713Image" mode="widthFix" class="w-15"></image>
219 227
       </div>

+ 9 - 2
src/pages/bangfuzhongxin/index.vue

@@ -2,7 +2,7 @@
2 2
 import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
3 3
 
4 4
 import {useUserStore} from "~/stores/userStore";
5
-import {applyBangFu, getRules, getUserInfo} from "~/apis/user";
5
+import {applyBangFu, getAgentInfo, getRules, getUserInfo} from "~/apis/user";
6 6
 
7 7
 const userStore = useUserStore()
8 8
 const ruleDetail = ref<{
@@ -14,6 +14,8 @@ const ruleDetail = ref<{
14 14
   status: string
15 15
   title: string
16 16
 }>()
17
+
18
+const agentInfo = ref({})
17 19
 onShow(() => {
18 20
   if (uni.getStorageSync('UID')) {
19 21
     getUserInfo().then(userInfoResult => {
@@ -31,6 +33,10 @@ onShow(() => {
31 33
       icon: 'none'
32 34
     })
33 35
   })
36
+
37
+  getAgentInfo().then(res => {
38
+    agentInfo.value = res
39
+  })
34 40
 })
35 41
 
36 42
 const ruleId = computed(() => {
@@ -117,7 +123,8 @@ function handleShowMyInvitation() {
117 123
           <div
118 124
               @tap="handleShowMyInvitation"
119 125
               class="w-1/3  flex flex-col justify-center items-center">
120
-            <div>{{ userStore.userInfo.member_brokerage_price }}</div>
126
+<!--            <div>{{ userStore.userInfo.member_brokerage_price || '0.00' }}</div>-->
127
+            <div>{{ agentInfo.brokerage_price }}</div>
121 128
             <div class="text-sm">我的佣金</div>
122 129
           </div>
123 130
           <div class="w-1/3  flex flex-col justify-center items-center">

+ 84 - 13
src/pages/dacang/list/index.vue

@@ -11,23 +11,37 @@ const headerImage = CDN_URL + `/static/assets/banner-dacang.png`
11 11
 
12 12
 const state = reactive({
13 13
   tabs: [],
14
-  productList: <Array<DcProductModel>>[]
14
+  productList: <Array<DcProductModel>>[],
15
+
16
+  currentClassify: '',
17
+  keyword: '',
18
+
19
+  status: 'noMore',
20
+
21
+  currentPage: 1,
22
+  pageSize: 10,
23
+  totalPage: 1
15 24
 })
16 25
 
17 26
 const dacangStore = useDacangStore()
27
+
28
+const currentTab = ref()
18 29
 const classifyId = computed(() => {
19 30
   return useDacangStore().$state.currentClassify
20 31
 })
21 32
 
22
-watch(() => classifyId.value, () => {
23
-  loadDcProductList(classifyId.value)
33
+watch(() => classifyId.value, (val) => {
34
+  currentTab.value = val
35
+  // loadDcProductList(classifyId.value)
36
+  loadList('reload')
24 37
 })
25 38
 onLoad((options) => {
26 39
   // console.log(classifyId.value)
27 40
 
28 41
   // if (options.id) {
29 42
   if (!classifyId.value) {
30
-    loadDcProductList(dacangStore.currentClassify)
43
+    // loadDcProductList(dacangStore.currentClassify)
44
+    loadList('reload')
31 45
   }
32 46
   // } else {
33 47
   // }
@@ -38,21 +52,43 @@ onLoad((options) => {
38 52
 
39 53
 })
40 54
 
41
-function loadDcProductList(classify) {
55
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
56
+  const params = {
57
+    page: state.currentPage,
58
+    limit: state.pageSize,
59
+    classify: state.currentClassify,
60
+    keyword: state.keyword
61
+  }
62
+  if (action === 'reload') {
63
+    params.page = 1
64
+  }
65
+
42 66
   getDcProductList({
43
-    page: 1,
44
-    limit: 10,
45
-    classify,
46
-    keyword: ''
67
+    ...params
68
+    // page: state.currentPage,
69
+    // limit: state.pageSize,
70
+    // classify,
71
+    // keyword: ''
47 72
   }).then(res => {
48
-    state.productList = res
73
+    if (action === 'page') {
74
+      state.productList = state.productList.concat(res)
75
+    }
76
+    if (action === 'reload') {
77
+      state.productList = res
78
+    }
79
+
80
+    if (callback) {
81
+      callback(res)
82
+    }
83
+    // state.productList = res
49 84
   })
50 85
 }
51 86
 
52
-function handleTabItemClick(currentTab) {
53
-
87
+function handleTabItemClick(tabItem) {
88
+  state.currentClassify = tabItem
54 89
   // if (!currentTab || currentTab == '') {
55
-    loadDcProductList(currentTab)
90
+  //   loadList(tabItem)
91
+  loadList('reload')
56 92
   // }
57 93
 }
58 94
 
@@ -66,6 +102,33 @@ onPageScroll((page) => {
66 102
     headerClass.value = ''
67 103
   }
68 104
 })
105
+
106
+onReachBottom(() => {
107
+  console.log(classifyId)
108
+  uni.showLoading()
109
+  console.log(state.currentClassify)
110
+  if (!state.currentClassify) {
111
+    state.currentClassify = classifyId
112
+  }
113
+
114
+  state.status = 'loading'
115
+  state.currentPage += 1
116
+  loadList('page', (items) => {
117
+    uni.hideLoading()
118
+    console.log(items)
119
+    if (!items.length > 0) {
120
+      console.log('没有更多了')
121
+      state.status = 'noMore'
122
+    }
123
+  })
124
+})
125
+onPullDownRefresh(() => {
126
+  uni.showLoading()
127
+  loadList('reload', (items) => {
128
+    uni.hideLoading()
129
+    uni.stopPullDownRefresh()
130
+  })
131
+})
69 132
 </script>
70 133
 <template>
71 134
   <div class="h-screen">
@@ -108,6 +171,14 @@ onPageScroll((page) => {
108 171
 
109 172
 
110 173
     <ProductList :list="state.productList" />
174
+      <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500" v-if="state.productList.length > 0">
175
+        <div v-if="state.status === 'loading'">
176
+          加载中...
177
+        </div>
178
+        <div v-if="state.status === 'noMore'">
179
+          没有更多了~
180
+        </div>
181
+      </div>
111 182
     </div>
112 183
 
113 184
   </div>

+ 180 - 16
src/pages/feedback/index.vue

@@ -1,7 +1,154 @@
1 1
 <script setup lang="ts">
2 2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3 3
 import {CDN_URL} from "~/config/app";
4
+import {createFeedback, getFeedbackType} from "~/apis/common";
5
+import {UPLOAD_URL} from "~/utils/http";
6
+import {getToken} from "~/utils/auth";
7
+
4 8
 const add_photos_220711Image = CDN_URL + '/static/assets/add_photos_220711.png'
9
+const state = reactive({
10
+  isUploading: false,
11
+})
12
+
13
+const headers = {
14
+  "Content-Type": "multipart/form-data",
15
+  'X-Token': 'Bearer ' + getToken()
16
+}
17
+function upload(filePath) {
18
+  const inputName = 'field';
19
+
20
+  uni.uploadFile({
21
+    url: UPLOAD_URL,
22
+    name: 'field',
23
+    formData: {
24
+      'filename': inputName
25
+    },
26
+    header: {
27
+      // #ifdef MP
28
+      "Content-Type": "multipart/form-data",
29
+      // #endif
30
+      'X-Token': 'Bearer ' + getToken()
31
+      // [TOKENNAME]: 'Bearer ' + store.state.app.token
32
+
33
+    },
34
+    filePath,
35
+    // filePath: tempFiles[curIndex],
36
+    success: uploadFileRes => {
37
+      state.isUploading = false;
38
+      // if (uploadFileRes && uploadFileRes.data) {
39
+      //
40
+      // }
41
+      data.images.push(uploadFileRes.data)
42
+    },
43
+    fail: err => {
44
+      state.isUploading = false;
45
+      // console.log(err, '上传失败');
46
+      uni.showToast({
47
+        title: '上传失败,请重试'
48
+      })
49
+    },
50
+
51
+  })
52
+
53
+}
54
+
55
+function chooseImage(e) {
56
+  let curIndex = 0
57
+
58
+  uni.chooseMedia({
59
+    count: 9,
60
+    mediaType: ['image'],
61
+    sourceType: ['album', 'camera'],
62
+    maxDuration: 30,
63
+    camera: 'back',
64
+    sizeType: ['original', 'compressed'],
65
+    success: (res) => {
66
+      const {tempFiles, type} = res
67
+      state.isUploading = true;
68
+      // if (tempFiles.length > 0) {
69
+      for (let file of tempFiles) {
70
+        upload(file.tempFilePath)
71
+      }
72
+      // }
73
+
74
+    }
75
+  })
76
+}
77
+
78
+const formData = reactive({
79
+  type: '',
80
+  content: '',
81
+  images: [],
82
+  realname: '',
83
+  contact: ''
84
+})
85
+
86
+const defaultFileList = ref([])
87
+const currentTypeId = ref('')
88
+const feedbackTypes = ref([])
89
+onLoad(() => {
90
+  getFeedbackType().then(res => {
91
+    console.log(res)
92
+    feedbackTypes.value = res
93
+    formData.type = res[0].feedback_category_id
94
+    currentTypeId.value = res[0].feedback_category_id
95
+  })
96
+})
97
+
98
+function handleItemClick(item) {
99
+  currentTypeId.value = item.feedback_category_id
100
+  formData.type = currentTypeId.value
101
+}
102
+
103
+function handleUploadSuccess({ data, option, fileItem }) {
104
+  console.log(data.data.path)
105
+  if (data && data.data && data.data.path) {
106
+    formData.images.push(data.data.path)
107
+  }
108
+
109
+  console.log(fileItem)
110
+}
111
+
112
+function handleSubmit() {
113
+  if (!formData.content) {
114
+    return uni.showToast({
115
+      title: '详情不能为空'
116
+    })
117
+  }
118
+  if (!formData.realname) {
119
+    return uni.showToast({
120
+      title: '姓名不能为空',
121
+      icon: 'none'
122
+    })
123
+  }
124
+  if (!formData.content) {
125
+    return uni.showToast({
126
+      title: '手机号或邮箱不能为空'
127
+    })
128
+  }
129
+  createFeedback({
130
+    type: formData.type,
131
+    contact: formData.content,
132
+    images: formData.images,
133
+    realname: formData.realname,
134
+    content: formData.content
135
+  }).then(res => {
136
+    uni.showToast({
137
+      title: '提交成功',
138
+      icon: 'none'
139
+    }).then(() => {
140
+      setTimeout(() => {
141
+        uni.navigateBack()
142
+
143
+      }, 500)
144
+    })
145
+  }).catch(error => {
146
+    uni.showToast({
147
+      title: error,
148
+      icon: "none"
149
+    })
150
+  })
151
+}
5 152
 </script>
6 153
 
7 154
 <template>
@@ -10,16 +157,22 @@ const add_photos_220711Image = CDN_URL + '/static/assets/add_photos_220711.png'
10 157
       <div class="text-sm">
11 158
         反馈类型
12 159
       </div>
13
-      <div class="flex py-2 gap-2">
14
-        <button class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 border-red text-red text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini">
15
-          操作问题
16
-        </button>
17
-        <button class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 border-red text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini">
18
-          金额相关
19
-        </button>
20
-        <button class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 border-red text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini">
21
-          货物相关
160
+      <div class="flex flex-row py-2 gap-2">
161
+        <button
162
+            v-for="(item, index) in feedbackTypes" :key="index"
163
+            @click="handleItemClick(item)"
164
+            class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini"
165
+            :class="currentTypeId === item.feedback_category_id ? ' border-red text-primary ' : ''"
166
+        >
167
+
168
+          {{ item.cate_name }}
22 169
         </button>
170
+        <!--        <button class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 border-red text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini">-->
171
+        <!--          金额相关-->
172
+        <!--        </button>-->
173
+        <!--        <button class="box-border flex items-center justify-center text-center rounded-full border-solid border-1 border-red text-xs gap-2 m-0 f-button-wrapper-reset f-button-mini">-->
174
+        <!--          货物相关-->
175
+        <!--        </button>-->
23 176
       </div>
24 177
 
25 178
     </div>
@@ -30,11 +183,19 @@ const add_photos_220711Image = CDN_URL + '/static/assets/add_photos_220711.png'
30 183
       <div class="flex flex-col my-2 gap-2 bg-gray-100">
31 184
         <textarea placeholder="您填写的信息越详细,问题越可有效解决哦~"
32 185
                   class="p-2 text-xs"
186
+                  v-model="formData.content"
33 187
         />
34 188
         <div class="flex p-2 text-gray">
35 189
           <div class="flex flex-col justify-center items-center text-xs gap-2">
36
-            <image :src="add_photos_220711Image" mode="widthFix" class="w-6 h-6"></image>
37
-            <div>添加照片</div>
190
+            <nut-uploader :url="UPLOAD_URL"
191
+                          :headers="headers"
192
+                          :name="'field'"
193
+                          :timeout="1000*50"
194
+                          :data="{ filename: 'field'}"
195
+                          v-model:file-list="defaultFileList" maximum="3"
196
+                          @success="handleUploadSuccess"
197
+            >
198
+            </nut-uploader>
38 199
           </div>
39 200
         </div>
40 201
 
@@ -48,10 +209,10 @@ const add_photos_220711Image = CDN_URL + '/static/assets/add_photos_220711.png'
48 209
       </div>
49 210
       <div class="flex flex-col py-2 gap-2 text-sm">
50 211
         <div class="bg-gray-100 rounded p-2">
51
-          <input placeholder="请填写您的姓名"/>
212
+          <input placeholder="请填写您的姓名" v-model="formData.realname"/>
52 213
         </div>
53 214
         <div class="bg-gray-100 rounded p-2">
54
-          <input placeholder="请填写您的手机号或邮箱"/>
215
+          <input placeholder="请填写您的手机号或邮箱" v-model="formData.contact"/>
55 216
         </div>
56 217
       </div>
57 218
 
@@ -59,9 +220,12 @@ const add_photos_220711Image = CDN_URL + '/static/assets/add_photos_220711.png'
59 220
 
60 221
     <div class="fixed bottom-0 pb-safe w-full">
61 222
       <div class="px-10 ">
62
-        <div class="text-center text-white bg-red rounded-full text-sm p-2">
63
-          提交
64
-        </div>
223
+        <nut-button
224
+            @click="handleSubmit"
225
+            type="primary" block>提交
226
+        </nut-button>
227
+        <!--        <div class="text-center text-white bg-red rounded-full text-sm p-2">-->
228
+        <!--        </div>-->
65 229
       </div>
66 230
 
67 231
     </div>

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

@@ -43,7 +43,7 @@ const props = defineProps({
43 43
   }
44 44
 })
45 45
 function handleClick() {
46
-  if (userStore.userInfo) {
46
+  if (userStore.userInfo && userStore.uid) {
47 47
     uni.navigateTo({
48 48
       url: '/pages/annuity/index'
49 49
     })

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

@@ -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: 储蓄保

+ 39 - 29
src/pages/immediate-withdrawal/index.vue

@@ -10,6 +10,7 @@ import {
10 10
 import {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
11 11
 import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
12 12
 import {CDN_URL} from "~/config/app";
13
+import {isNumber} from "~/utils";
13 14
 const zfb_logoImage = CDN_URL + '/static/assets/zfb_logo.png'
14 15
 const wx_logoImage = CDN_URL + '/static/assets/wx_logo.png'
15 16
 const userStore = useUserStore()
@@ -22,44 +23,51 @@ const widthdrawalConfig = ref({})
22 23
 
23 24
 const cashWithdrawalAmount = ref(0)
24 25
 // userSpreadInfo.value.brokerage_price
25
-onLoad(() => {
26
-  userStore.getUserInfo().then(res => {})
26
+onLoad(async () => {
27
+  await userStore.getUserInfo()
27 28
   // 佣金信息
28
-  getUserSpreadInfo().then((res: SpreadInfoModel) => {
29
-    userSpreadInfo.value = res
30
-  })
29
+  userSpreadInfo.value = await getUserSpreadInfo()
31 30
 
32
-  getUserYangLaoJin().then(res => {
33
-    yanglaojin.value = res
34
-    // console.log('加载养老金数据')
35
-    // console.log(res)
36
-  })
31
+  yanglaojin.value = getUserYangLaoJin()
37 32
 
38 33
   // 提现配置
39
-  getWithdrawalConfig().then(res => {
40
-    // console.log(res)
41
-    widthdrawalConfig.value = res
42
-  })
34
+  widthdrawalConfig.value = await getWithdrawalConfig()
43 35
 })
44 36
 
45
-function handleInputChange(e) {
46
-  if (e.detail.value) {
47
-    cashWithdrawalAmount.value = e.detail.value
48
-    console.log(cashWithdrawalAmount.value)
37
+watch(() => cashWithdrawalAmount.value, (val) => {
38
+  if (val && isNumber(Number.parseFloat(val))) {
49 39
     getWithdrawalService({
50
-      money: e.detail.value
40
+      money: val
51 41
     }).then(res => {
52 42
       // console.log(res)
53 43
       withdrawalCal.value = res
54 44
       console.log(res)
55 45
     })
46
+  } else {
47
+    withdrawalCal.value = {}
48
+  }
49
+})
50
+function handleInputAll() {
51
+  console.log(userSpreadInfo.value?.brokerage_price)
52
+  if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && Number.parseFloat(userSpreadInfo.value?.brokerage_price) >= 100 ) {
53
+    cashWithdrawalAmount.value = userSpreadInfo.value.brokerage_price
54
+  } else {
55
+    uni.showToast({
56
+      title: '可用余额太少,未满足提现要求',
57
+      icon: 'none'
58
+    })
56 59
   }
57 60
 }
58
-
59 61
 /**
60 62
  * 立即提现
61 63
  */
62 64
 function handleImmediateWithdrawal() {
65
+  // 1 判断是否需要实名
66
+  if (!yanglaojin.value?.is_certification == 1) {
67
+    return uni.navigateTo({
68
+      url: '/pages/real-name-authentication/index'
69
+    })
70
+  }
63 71
 
64 72
   if (widthdrawalConfig.value.withdrawal_status == '0') {
65 73
     return uni.showToast({
@@ -85,12 +93,7 @@ function handleImmediateWithdrawal() {
85 93
   }
86 94
 
87 95
 
88
-  // 1 判断是否需要实名
89
-  if (!yanglaojin.value?.is_certification == 1) {
90
-    return uni.navigateTo({
91
-      url: '/pages/real-name-authentication/index'
92
-    })
93
-  }
96
+
94 97
 
95 98
   getApplicationWithdrawal({ extract_price: cashWithdrawalAmount.value, extract_type: 1}).then(res => {
96 99
     // uni.showToast({
@@ -117,6 +120,12 @@ function handleWithdrawalRecord() {
117 120
     url: '/pages/withdrawal-record/index'
118 121
   })
119 122
 }
123
+
124
+function handleShowAgreement(type) {
125
+  uni.navigateTo({
126
+    url: '/pages/webview/agreement?type=' + type
127
+  })
128
+}
120 129
 </script>
121 130
 <template>
122 131
   <div class="p-3 flex flex-col gap-3">
@@ -126,16 +135,17 @@ function handleWithdrawalRecord() {
126 135
     <div class="bg-white rounded-lg text-sm p-3 flex flex-col gap-4">
127 136
       <div class="flex justify-between">
128 137
         <div class="font-bold">提现金额</div>
129
-        <div class="text-xs text-gray">提现规则</div>
138
+        <div class="text-xs text-gray" @click="handleShowAgreement(12)">提现规则</div>
130 139
       </div>
131 140
       <div class="flex justify-center items-center pt-4 f-hairline-bottom">
132 141
         <div class="text-lg font-bold">¥</div>
133 142
         <div class="flex-1">
134 143
           <input placeholder="请输入金额" class="w-full"
135
-                 @change="handleInputChange"
144
+                 type="number"
145
+                 v-model="cashWithdrawalAmount"
136 146
           />
137 147
         </div>
138
-        <div class="text-xs text-red">全部提现</div>
148
+        <div class="text-xs text-red" @click="handleInputAll">全部提现</div>
139 149
       </div>
140 150
       <div class="flex text-gray items-center gap-3 text-sm">
141 151
         <div v-if="userSpreadInfo">

+ 199 - 21
src/pages/invite-friends/index.vue

@@ -5,6 +5,9 @@ import {
5 5
 } from "~/apis/user";
6 6
 import type {SharePosterImageResult, SharePostersClassify} from "~/apis/model/inviteFriendsModel";
7 7
 import ProductCard from "~/components/ProductCard/ProductCard.vue";
8
+import {call} from "dayjs";
9
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
10
+import {CDN_URL} from "~/config/app";
8 11
 const state = reactive<any>({
9 12
   // 列表高度
10 13
   scrollHeight: 0,
@@ -12,20 +15,36 @@ const state = reactive<any>({
12 15
   curIndex: 0,
13 16
   // 内容区垂直滚动条位置
14 17
   scrollTop: 0,
18
+  triggered: false,
19
+  categoryId: 0,
20
+  currentCategoryId: 0,
15 21
 
16
-  merchantCategory: [],
17
-  merchantList: [],
18
-  merchantPageNum: 1,
19
-  merchantPageSize: 10,
20
-  merchantKeyword: '',
21
-  lat: '',
22
-  lng: ''
22
+  currentPage: 1,
23
+  pageSize: 10,
24
+  totalPage: 1,
25
+
26
+
27
+  showTip: false,
28
+  list: [],
29
+  // merchantCategory: [],
30
+  // merchantList: [],
31
+  // merchantPageNum: 1,
32
+  // merchantPageSize: 10,
33
+  // merchantKeyword: '',
34
+  // lat: '',
35
+  // lng: ''
23 36
   // merchantPageInfo: {}
24 37
 })
25 38
 
39
+const show = ref(false)
40
+const currentItem = ref({})
26 41
 const { windowHeight } = uni.getSystemInfoSync()
27 42
 state.scrollHeight = windowHeight
28 43
 
44
+const wechatImg = CDN_URL + '/static/assets/share_wechat.png'
45
+const pyqImg = CDN_URL + '/static/assets/share_circlefriends.png'
46
+const bctpImg = CDN_URL + '/static/assets/bctp_221023.png'
47
+
29 48
 const categoryList = ref<Array<SharePostersClassify>>()
30 49
 const sharePosterImageResult = ref<SharePosterImageResult>()
31 50
 
@@ -36,15 +55,119 @@ onLoad(() => {
36 55
     }
37 56
   })
38 57
 
39
-  getUserSharePostersImagesList({
40
-    pageNum: 1,
41
-    pageSize: 10,
58
+  // pageNum: number
59
+  // pageSize: number
60
+  // 分类 id
61
+  // classify?: string
62
+  // 推荐 = 1
63
+  // type: string
64
+  // getUserSharePostersImagesList({
65
+  //   pageNum: 1,
66
+  //   pageSize: 10,
67
+  //   type: '1'
68
+  // }).then(res => {
69
+  //   sharePosterImageResult.value = res
70
+  //   // console.log(res)
71
+  // })
72
+  loadList('reload')
73
+})
74
+
75
+
76
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
77
+  // if (state.categoryId == 0) {
78
+  //   state.currentCategoryId = 0
79
+  // }
80
+  const params = {
81
+    pageNum: state.currentPage,
82
+    pageSize: state.pageSize,
42 83
     type: '1'
43
-  }).then(res => {
44
-    sharePosterImageResult.value = res
45
-    // console.log(res)
84
+  }
85
+  if (state.currentCategoryId > 0) {
86
+    params.classify = state.currentCategoryId
87
+  }
88
+
89
+  getUserSharePostersImagesList(params).then(res => {
90
+    state.triggered = false
91
+    // sharePosterImageResult.value = res
92
+    if (action === 'page') {
93
+      state.list = state.list.concat(res.pageInfo.list)
94
+    }
95
+    if (action === 'reload') {
96
+      state.list = res.pageInfo.list
97
+    }
98
+
99
+    state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
100
+    state.status = 'more'
101
+    if (callback) {
102
+      callback(res.pageInfo.list)
103
+    }
46 104
   })
47
-})
105
+}
106
+
107
+function handleCategoryItemClick(item) {
108
+  state.currentCategoryId = item.id
109
+  loadList('reload')
110
+}
111
+const onRefresherPulling = e => {
112
+  state.triggered = true;
113
+  loadList('reload')
114
+
115
+};
116
+// 下拉刷新被复位
117
+const onRefresherRestore = e => {
118
+  state.triggered = false;
119
+};
120
+// 下拉刷新被中止
121
+const onRefresherAbort = e => {
122
+  state.triggered = false;
123
+}
124
+// 下拉刷新被触发
125
+const onRefresherRefresh = e => {
126
+  // loadSelectMerchant(0)
127
+  loadList('reload')
128
+
129
+};
130
+function handleScrollToLower() {
131
+
132
+  state.status = 'loading';
133
+  state.currentPage += 1;
134
+  if (state.currentPage >= state.totalPage) {
135
+    state.status = 'noMore';
136
+  } else {
137
+    // queryFavorites('page');
138
+    loadList('page')
139
+  }
140
+}
141
+
142
+function loadAll() {
143
+  state.currentCategoryId = 0
144
+  loadList('reload')
145
+}
146
+function handleItemClick(item) {
147
+  currentItem.value = item
148
+  show.value = true
149
+}
150
+
151
+function shareImage() {
152
+  wx.downloadFile({
153
+    url: currentItem.value.image_fake,
154
+    success: (res) => {
155
+      wx.showShareImageMenu({
156
+        path: res.tempFilePath
157
+      })
158
+    }
159
+  })
160
+}
161
+
162
+function shareTimeline() {
163
+  // state.showTip = !state.showTip
164
+  state.showTip = true
165
+}
166
+
167
+function handleClose() {
168
+  state.showTip = false
169
+  show.value = false
170
+}
48 171
 </script>
49 172
 <template>
50 173
   <div class="flex">
@@ -55,14 +178,24 @@ onLoad(() => {
55 178
         class="flex w-25 h-full bg-[#f8f8f8]"
56 179
     >
57 180
       <div
58
-          class="relative h-15 block text-sm flex justify-center items-center"
59
-      >
60
-        推荐
181
+          @tap="loadAll"
182
+          :class="state.currentCategoryId == 0 ? 'bg-white font-bold' : ''"
183
+          class="relative w-25 h-15 block text-sm flex justify-center items-center">
184
+        <div class="flex items-center gap-1">
185
+          <div class="h-4 bg-primary w-1" v-if="state.currentCategoryId == 0"></div>
186
+          <div>推荐</div>
187
+        </div>
188
+
61 189
       </div>
62 190
       <div v-for="(item, index) in categoryList" :key="index"
191
+           @click="handleCategoryItemClick(item)"
192
+           :class="state.currentCategoryId == item.id ? 'bg-white font-bold' : ''"
63 193
            class="relative h-15 block text-sm flex justify-center items-center"
64 194
       >
65
-        {{item.name}}
195
+        <div class="flex items-center gap-1">
196
+          <div class="h-4 bg-primary w-1" v-if="state.currentCategoryId == item.id"></div>
197
+          <div>{{ item.name }}</div>
198
+        </div>
66 199
 
67 200
       </div>
68 201
     </scroll-view>
@@ -71,20 +204,65 @@ onLoad(() => {
71 204
         :scroll-y="true"
72 205
         :style="{ height: `${state.scrollHeight}px` }"
73 206
         class="flex flex-1  flex-col h-full  p-3 gap-3 pb-safe"
207
+        :refresher-enabled="true"
208
+        refresher-background="#f5f5f5"
209
+        refresher-default-style="black"
210
+        :refresher-triggered="state.triggered"
211
+        @scrolltolower="handleScrollToLower"
212
+        @refresherPulling="onRefresherPulling"
213
+        @refresherRestore="onRefresherRestore"
214
+        @refresherAbort="onRefresherAbort"
215
+        @refresherrefresh="onRefresherRefresh"
216
+        v-if="state.list && state.list.length > 0"
74 217
     >
75 218
       <grid-view
76
-          v-if="sharePosterImageResult && sharePosterImageResult.pageInfo"
77 219
           type="masonry" cross-axis-count="2" 	cross-axis-gap="10px" main-axis-gap="10px"
78 220
       >
79
-        <div v-for="(item, index) in sharePosterImageResult.pageInfo.list"
221
+        <div v-for="(item, index) in state.list"
80 222
              :key="index"
223
+             @click="handleItemClick(item)"
81 224
         >
82
-          <image :src="item.image" mode="widthFix" class="w-30 h-full rounded-lg"></image>
225
+          <image
226
+              :src="item.image_fake"
227
+              mode="widthFix" class="w-30 h-full rounded-lg"></image>
83 228
         </div>
84 229
       </grid-view>
85 230
     </scroll-view>
231
+    <div class="flex flex-col justify-center items-center w-full" v-else>
232
+      <CXBEmpty />
233
+    </div>
86 234
 
87 235
   </div>
236
+
237
+  <nut-overlay v-model:visible="show" :lock-scroll="true">
238
+<!--    <image src="https://cdn.bjtdba.com/vod/image/2023-09-16/20230916070524825.png"-->
239
+<!--           mode="widthFix" class="absolute top-0 right-0"-->
240
+<!--           @tap.stop="handleClose"-->
241
+<!--           v-if="state.showTip"-->
242
+<!--    ></image>-->
243
+
244
+    <div class="flex flex-col justify-center items-center w-full h-full"
245
+    >
246
+      <div class="bg-white">
247
+        <image :src="currentItem.image_fake" mode="widthFix" class="w-60"></image>
248
+        <div class="bg-white p-3 flex justify-around gap-3">
249
+          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">
250
+            <image :src="wechatImg" mode="widthFix" class="w-8 h-8"></image>
251
+            <div>微信</div>
252
+          </div>
253
+          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">
254
+            <image :src="pyqImg" mode="widthFix" class="w-8 h-8"></image>
255
+            <div>朋友圈</div>
256
+          </div>
257
+          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">
258
+            <image :src="bctpImg" mode="widthFix" class="w-8 h-8"></image>
259
+            <div>保存图片</div>
260
+          </div>
261
+        </div>
262
+      </div>
263
+
264
+    </div>
265
+  </nut-overlay>
88 266
 </template>
89 267
 
90 268
 <route lang="yaml">

+ 12 - 5
src/pages/invite-partners/index.vue

@@ -3,6 +3,7 @@ import {getUserInviteList} from "~/apis/user";
3 3
 import type {InvitePartnerModel} from "~/apis/model/invitePartnerModel";
4 4
 import {Ref} from "vue";
5 5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
+import {encodePhone} from "../../utils";
6 7
 const userStore = useUserStore()
7 8
 const invitePartnerModel: Ref<InvitePartnerModel | undefined> = ref<InvitePartnerModel>() || undefined
8 9
 onLoad(() => {
@@ -45,7 +46,8 @@ function handleSearch() {
45 46
           商户
46 47
         </div>
47 48
         <div class="font-bold text-[24px]" v-if="invitePartnerModel">
48
-          {{ invitePartnerModel.userCount }}
49
+          {{ invitePartnerModel.MerchantCount }}
50
+
49 51
         </div>
50 52
       </div>
51 53
       <div class="flex flex-col justify-center items-center gap-4">
@@ -53,7 +55,8 @@ function handleSearch() {
53 55
           伙伴
54 56
         </div>
55 57
         <div class="font-bold text-[24px]" v-if="invitePartnerModel">
56
-          {{ invitePartnerModel.MerchantCount }}
58
+          {{ invitePartnerModel.userCount }}
59
+
57 60
         </div>
58 61
       </div>
59 62
     </div>
@@ -64,19 +67,23 @@ function handleSearch() {
64 67
     </nut-searchbar>
65 68
 
66 69
     <div class="pb-safe">
67
-      <div class="grid grid-cols-3 bg-white rounded-tl-lg rounded-tr-lg text-center text-sm p-3">
70
+      <div class="grid grid-cols-3 bg-white rounded-tl-lg rounded-tr-lg text-center text-xs p-3">
68 71
         <div class="text-left">用户</div>
69 72
         <div>身份</div>
70 73
         <div class="text-right">加入时间</div>
71 74
       </div>
72 75
       <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList">
73 76
         <div class="grid grid-cols-3 text-center text-sm p-2 bg-white text-gray-500" v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index">
74
-          <div class="text-left">{{ item.nickname || '无昵称' }}</div>
77
+          <div class="flex flex-col">
78
+            <div class="text-left">{{ item.nickname || '无昵称' }}</div>
79
+            <div class="text-left text-[11px] text-gray-500">{{ item.phone ? encodePhone(item.phone) : '' }}</div>
80
+          </div>
81
+
75 82
           <div>{{ item.statusType }}</div>
76 83
           <div class="text-right">{{ item.promoterTime }}</div>
77 84
         </div>
78 85
       </div>
79
-      <div else>
86
+      <div v-else>
80 87
         <CXBEmpty />
81 88
       </div>
82 89
     </div>

+ 43 - 17
src/pages/my-integral/index.vue

@@ -39,6 +39,17 @@ if (userStore.userInfo) {
39 39
   })
40 40
 }
41 41
 
42
+function handleSign() {
43
+  console.log(state.signToday)
44
+  if (state.signToday == 0)  {
45
+    state.isShowSignIn = true
46
+  } else {
47
+    return uni.showToast({
48
+      title: '今日已签到过',
49
+      icon: 'none'
50
+    })
51
+  }
52
+}
42 53
 function handleShowIntegralDetail() {
43 54
   uni.navigateTo({
44 55
     url: '/pages/my-integral/detail'
@@ -52,15 +63,27 @@ function handleToZibuyangsheng() {
52 63
 }
53 64
 
54 65
 function handleToPoster() {
55
-  uni.showToast({
56
-    title: '待开发',
57
-    icon: 'none'
66
+  // uni.showToast({
67
+  //   title: '待开发',
68
+  //   icon: 'none'
69
+  // })
70
+  uni.navigateTo({
71
+    url: '/pages/my-integral/user-invation'
72
+  })
73
+}
74
+
75
+function handleShowAgreement() {
76
+  uni.navigateTo({
77
+    url: '/pages/webview/agreement?type=16'
58 78
   })
59 79
 }
60 80
 </script>
61 81
 <template>
62 82
   <div class="flex flex-col p-3 gap-3">
63
-    <div class="bg-red-500 rounded-lg flex flex-col items-center text-white h-30 p-3">
83
+    <div @click="handleShowAgreement" class="flex justify-end">
84
+      <div class="text-sm">积分规则</div>
85
+    </div>
86
+    <div class="bg-red-500 rounded-lg flex flex-col items-center text-white h-30 p-3 gap-3">
64 87
       <div class="">我的积分</div>
65 88
       <div class="font-bold text-[32px]">
66 89
         {{ userStore.userInfo.score }}
@@ -69,14 +92,14 @@ function handleToPoster() {
69 92
 
70 93
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
71 94
       <div class="">滋补保健 {{ userStore.userInfo.score_beishengtang}}</div>
72
-
73
-      <nut-button
74
-          size="mini"
75
-          type="primary"
95
+      <FButton
76 96
           @tap="handleToZibuyangsheng"
97
+          size="mini"
98
+          :exClass="['rounded-full','!text-[12px]', 'text-white', `bg-primary`, 'w-full']"
99
+
77 100
       >
78 101
         去兑换
79
-      </nut-button>
102
+      </FButton>
80 103
     </div>
81 104
 
82 105
     <div
@@ -96,25 +119,28 @@ function handleToPoster() {
96 119
             <div class="text-xs">每日签到</div>
97 120
             <div class="text-xs text-gray-500">每日签到得奖励</div>
98 121
           </div>
99
-          <nut-button
122
+          <FButton
123
+              @click="handleSign"
100 124
               size="mini"
101
-              :class="state.signToday ? 'bg-gray text-white' : ''"
125
+              :exClass="['rounded-full','!text-[12px]', 'text-white', `${state.signToday === 0 ? 'bg-primary' : 'bg-gray' }`, 'w-full']"
102 126
           >
103
-            {{ state.signToday ? '已签到' : '去签到' }}
104
-          </nut-button>
127
+            {{ !state.isShowSignIn ? '已签到' : '去签到' }}
128
+          </FButton>
105 129
         </div>
106 130
         <div class="flex  justify-between items-center">
107 131
           <div class="flex flex-col gap-2">
108 132
             <div class="text-xs">邀请好友得积分</div>
109 133
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
110 134
           </div>
111
-          <nut-button
112
-              size="mini"
113
-              type="primary"
135
+          <FButton
114 136
               @tap="handleToPoster"
137
+              size="mini"
138
+              :exClass="['rounded-full','!text-[12px]', 'text-white', `bg-primary`, 'w-full']"
139
+
115 140
           >
116 141
             去邀请
117
-          </nut-button>
142
+
143
+          </FButton>
118 144
         </div>
119 145
       </div>
120 146
 

+ 73 - 0
src/pages/my-integral/meet-scan-code.vue

@@ -0,0 +1,73 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
4
+import {getSpreadImage} from "~/apis/user";
5
+// const meet_scan_code_bg = CDN_URL + '/static/assets/meet_scan_code_bg.png'
6
+const saoyisao_bg = 'https://cdn.bjtdba.com/vod/image/2023-09-16/20230916141128334.png'
7
+// 获得奖励
8
+const huodejiangli = 'https://cdn.bjtdba.com/vod/image/2023-09-16/20230916141155242.png'
9
+const spreadImage = ref({})
10
+const isLoading = ref(false)
11
+onShow(() => {
12
+  uni.showLoading({
13
+    title: '二维码加载中',
14
+  })
15
+  getSpreadImage().then(res => {
16
+    spreadImage.value = res[0]
17
+    uni.hideLoading()
18
+  }).catch(error => {
19
+    uni.showToast({
20
+      title: error,
21
+      icon: 'none'
22
+    })
23
+    uni.hideLoading()
24
+  })
25
+})
26
+</script>
27
+
28
+<template>
29
+  <CXBBasePage :show="true" title="">
30
+    <div class="scan_bg flex items-center">
31
+      <div class="w-full px-5 flex flex-col items-center justify-center gap-4">
32
+        <div class="saoyisao_bg flex justify-center">
33
+          <image :src="spreadImage.attachment_src" mode="widthFix" class="w-56 h-56 mt-20"></image>
34
+        </div>
35
+        <div class="process"></div>
36
+      </div>
37
+    </div>
38
+  </CXBBasePage>
39
+
40
+</template>
41
+<style>
42
+.scan_bg {
43
+  width: 750rpx;
44
+  height: 1624rpx;
45
+  background-image: url('https://cdn.bjtdba.com/vod/image/2023-09-16/20230916141109846.png');
46
+  background-size: 100% 100%;
47
+}
48
+
49
+.saoyisao_bg {
50
+  width: 100%;
51
+  height: 875rpx;
52
+  background-image: url('https://cdn.bjtdba.com/vod/image/2023-09-16/20230916141128334.png');
53
+  background-size: 100% 100%;
54
+}
55
+
56
+.process {
57
+  width: 658rpx;
58
+  height: 256rpx;
59
+  background-image: url('https://cdn.bjtdba.com/vod/image/2023-09-16/20230916141155242.png');
60
+  background-size: 100% 100%;
61
+}
62
+page {
63
+  background: #ffcb75;
64
+}
65
+
66
+</style>
67
+
68
+<route lang="yaml" >
69
+style:
70
+  navigationBarTitleText: 邀请好友
71
+  navigationStyle: custom
72
+</route>
73
+

+ 269 - 0
src/pages/my-integral/user-invation.vue

@@ -0,0 +1,269 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+import {getSpreadImage, getSpreadNumber, getUserInviteList} from "~/apis/user";
4
+import {encodePhone} from "../../utils";
5
+const userStore = useUserStore()
6
+
7
+const invite_friends_bg = CDN_URL + '/static/assets/invite_friends_bg_220826.png'
8
+const meet_scan_code_bg = CDN_URL + '/static/assets/meet_scan_code_bg_220826.png'
9
+const huodongshuomingImg = CDN_URL + '/static/assets/huodongshuoming.png'
10
+const buttonImg = CDN_URL + '/static/assets/invitation_button_220826.png'
11
+
12
+const integral_bg = CDN_URL + '/static/assets/integral_bg_220826.png'
13
+const goodFriendImg = CDN_URL + '/static/assets/my_good_friend_220826.png'
14
+
15
+const wexinLogo = CDN_URL + '/static/assets/wx_logo_220826.png'
16
+const smLogo = CDN_URL + '/static/assets/sm_logo_220826.png'
17
+
18
+const invitePartnerModel = ref({})
19
+
20
+const spreadData = ref(null)
21
+onLoad(() => {
22
+  getUserInviteList({
23
+    uid: userStore.uid ? userStore.uid : '',
24
+    // nickname: '',
25
+    pageNum: 1,
26
+    pageSize: 1000
27
+  }).then(res => {
28
+    if (res) {
29
+      invitePartnerModel.value = res
30
+      console.log(res)
31
+    }
32
+  })
33
+
34
+  getSpreadImage().then(res => {
35
+    spreadData.value = res[0]
36
+    console.log(spreadData.value)
37
+    // uni.hideLoading()
38
+  }).catch(error => {
39
+    uni.showToast({
40
+      title: error,
41
+      icon: 'none'
42
+    })
43
+    // uni.hideLoading()
44
+  })
45
+})
46
+
47
+
48
+function handleShowAgreement(type) {
49
+  uni.navigateTo({
50
+    url: '/pages/webview/agreement?type=' + type
51
+  })
52
+}
53
+
54
+onLoad(() => {
55
+  userStore.getUserInfo()
56
+})
57
+
58
+const showDialog = ref(false)
59
+const inviteCode = ref('')
60
+function onCancel() {
61
+  inviteCode.value = ''
62
+}
63
+function onOk() {
64
+  if (inviteCode.value === '') {
65
+    return uni.showToast({
66
+      title: '邀请码不能为空',
67
+      icon: 'none'
68
+    })
69
+  }
70
+  getSpreadNumber({uid: userStore.uid, number: inviteCode.value}).then(res => {
71
+    // console.log(res)
72
+    inviteCode.value = ''
73
+  }).catch(error => {
74
+    uni.showToast({
75
+      title: error,
76
+      icon: 'none'
77
+    })
78
+    inviteCode.value = ''
79
+  })
80
+}
81
+
82
+function handleShowCode() {
83
+  uni.navigateTo({
84
+    url: '/pages/my-integral/meet-scan-code'
85
+  })
86
+}
87
+
88
+function shareWeixin() {
89
+  wx.downloadFile({
90
+    url: spreadData.value.wap_poster,
91
+    success: (res) => {
92
+      wx.showShareImageMenu({
93
+        path: res.tempFilePath
94
+      })
95
+    }
96
+  })
97
+}
98
+function shareImage() {
99
+  if (!spreadData.value) {
100
+    uni.showLoading({
101
+      title: '二维码获取中'
102
+    })
103
+    getSpreadImage().then(res => {
104
+      spreadData.value = res[0]
105
+      console.log(spreadData.value)
106
+      shareWeixin()
107
+      uni.hideLoading()
108
+    }).catch(error => {
109
+      uni.showToast({
110
+        title: error,
111
+        icon: 'none'
112
+      })
113
+      uni.hideLoading()
114
+    })
115
+  } else {
116
+    shareWeixin()
117
+  }
118
+}
119
+</script>
120
+<template>
121
+  <div class="relative top-0 left-0 min-h-screen h-full w-full bg-[#FFCB75] z-0 ">
122
+    <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
123
+    <image
124
+        @click="handleShowAgreement(17)"
125
+        :src="huodongshuomingImg" mode="widthFix" class="w-10 absolute top-0 right-3"></image>
126
+    <div
127
+        @click="showDialog = true"
128
+        class="text-sm text-black absolute top-3 left-3 px-2">
129
+      邀请码
130
+    </div>
131
+
132
+    <nut-dialog title="邀请码"  v-model:visible="showDialog" @cancel="onCancel" @ok="onOk" >
133
+      <template>
134
+        <input v-model="inviteCode" class="border border-solid border-1px rounded h-10" placeholder="请输入推荐人邀请码"/>
135
+      </template>
136
+    </nut-dialog>
137
+
138
+    <div class="relative top-120 text-white flex flex-col items-center justify-center pb-30">
139
+      <div class=" w-full h-10 relative flex justify-center items-center">
140
+        <div class="relative w-60 text-center z-1 h-10 absolute top-2">
141
+          立即邀请
142
+        </div>
143
+        <image :src="buttonImg" mode="widthFix" class="w-60 h-10 absolute top-0"></image>
144
+      </div>
145
+      <div class="text-primary text-[12px] relative py-3">我的邀请码:{{ userStore && userStore.userInfo && userStore.userInfo.user_number }}</div>
146
+      <div class="relative w-full flex items-center">
147
+        <div class="w-full px-3 flex justify-center items-center  text-gray-600 text-[12px]">
148
+          <div class="integral_bg">
149
+            <div class="pt-20 flex flex-col gap-3 px-5 h-48 ">
150
+              <div class="bg-[#ffedc6] flex justify-around items-center flex-1 ">
151
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center gap-2">
152
+                  <div>首次邀请好友</div>
153
+                  <div class="flex gap-1  ">
154
+                    <text>奖励<text class="text-primary text-xl font-bold">99</text>积分</text>
155
+                  </div>
156
+                </div>
157
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
158
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
159
+                  <div>好友首次获得养老金</div>
160
+                  <div class="flex gap-1  ">
161
+                    <text>奖励<text class="text-primary text-xl font-bold">350</text>积分</text>
162
+                  </div>
163
+                </div>
164
+              </div>
165
+
166
+              <div class="bg-[#ffedc6] flex justify-around items-center flex-1">
167
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
168
+                  <div>好友签到3天</div>
169
+                  <div class="flex gap-1  ">
170
+                    <text>奖励<text class="text-primary text-xl font-bold">50</text>积分</text>
171
+                  </div>
172
+                </div>
173
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
174
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
175
+                  <div>好友签到14天</div>
176
+                  <div class="flex gap-1  ">
177
+                    <text>奖励<text class="text-primary text-xl font-bold">100</text>积分</text>
178
+                  </div>
179
+                </div>
180
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
181
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
182
+                  <div>好友签到30天</div>
183
+                  <div class="flex gap-1  ">
184
+                    <text>奖励<text class="text-primary text-xl font-bold">300</text>积分</text>
185
+                  </div>
186
+                </div>
187
+              </div>
188
+
189
+            </div>
190
+
191
+          </div>
192
+
193
+
194
+<!--          <image :src="integral_bg" mode="widthFix" class="w-full h-full relative"></image>-->
195
+
196
+        </div>
197
+      </div>
198
+      <div class="relative w-full">
199
+        <div class="px-4">
200
+          <div class="bg-[#F8F8F8] rounded-lg h-60 text-gray-500">
201
+            <div class="bg-[#FDF5E8] rounded-t-lg flex items-center justify-center py-2">
202
+              <image :src="goodFriendImg" mode="widthFix" class="w-50"></image>
203
+            </div>
204
+            <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList && invitePartnerModel.userInviteVoList.list.length > 0">
205
+              <swiper autoplay vertical :circular="true" :display-multiple-items="4" class="w-auto h-46">
206
+                <swiper-item  v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index" class="w-auto text-[12px] h-auto">
207
+                  <div class="p-3 h-30 flex justify-between  f-hairline-bottom">
208
+                    <div class="flex gap-2">
209
+                      <image :src="item.avatar" mode="widthFix" class="w-8 h-8"></image>
210
+                      <div class="flex flex-col">
211
+                        <div class="font-bold">{{ item.nickname }}</div>
212
+                        <div>{{ encodePhone( item.phone ) }}</div>
213
+                      </div>
214
+                    </div>
215
+
216
+                    <div class="text-gray">{{ item.promoterTime }}</div>
217
+
218
+
219
+                  </div>
220
+                </swiper-item>
221
+              </swiper>
222
+            </div>
223
+
224
+            <div v-else class="flex justify-center items-center text-[12px] text-gray h-48">
225
+              竟然没有好友
226
+            </div>
227
+          </div>
228
+
229
+        </div>
230
+
231
+      </div>
232
+      <div class="relative w-full text-[12px] py-5 text-black flex justify-center items-center">
233
+        <div class="flex gap-4">
234
+          <div
235
+              @click="shareImage"
236
+              class="flex flex-col justify-center items-center gap-3">
237
+            <image :src="wexinLogo" mode="widthFix" class="w-10 h-10"></image>
238
+            <div>微信</div>
239
+          </div>
240
+          <div
241
+              @click="handleShowCode"
242
+              class="flex flex-col justify-center items-center gap-3">
243
+            <image :src="smLogo" mode="widthFix" class="w-10 h-10"></image>
244
+            <div>面对面扫码</div>
245
+          </div>
246
+        </div>
247
+      </div>
248
+    </div>
249
+
250
+  </div>
251
+</template>
252
+
253
+<style>
254
+.integral_bg {
255
+  width: 710rpx;
256
+  height: 591rpx;
257
+  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/integral_bg_220826.png');
258
+  background-size: 100% 100%;
259
+}
260
+page {
261
+  background: #ffcb75;
262
+}
263
+
264
+</style>
265
+<route lang="yaml">
266
+style:
267
+  navigationBarTitleText: 邀请好友
268
+</route>
269
+

+ 64 - 6
src/pages/my-invitation/index.vue

@@ -1,6 +1,8 @@
1 1
 <script setup lang="ts">
2 2
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
3 3
 import FCell from "~/components/FCell/FCell.vue";
4
+import {getAgentInfo, getSelectUserInviteProfit} from "~/apis/user";
5
+const userStore = useUserStore()
4 6
 const list = [{
5 7
   title: '邀请伙伴',
6 8
   url: '/pages/invite-partners/index'
@@ -18,45 +20,101 @@ const list = [{
18 20
   url: '/pages/immediate-withdrawal/index'
19 21
 }]
20 22
 
23
+
24
+const data = ref({
25
+  // state.nickname = res.nickname
26
+  // state.avatar = res.avatar
27
+  // state.brokerage_price = res.brokerage_price
28
+  // state.yesterday = res.yesterday
29
+  // state.cumulative = res.cumulative
30
+  // state.extract = res.extract
31
+  nickname: '',
32
+  avatar: '',
33
+  brokerage_price: '' ,
34
+  yesterday: '' ,
35
+  cumulative: '' ,
36
+  extract: ''
37
+})
38
+
39
+const userInviteProfit = reactive({
40
+  numberSun: '',
41
+  UserUnsettledInviteProfit: '' ,
42
+  UserYesterdayInviteProfit: ''
43
+})
44
+onLoad(() => {
45
+  console.log('load...')
46
+  getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
47
+    console.log(res)
48
+    const inviteData = res.data
49
+    userInviteProfit.numberSun = res.numberSun
50
+    userInviteProfit.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
51
+    userInviteProfit.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
52
+  })
53
+  getAgentInfo().then(res => {
54
+    console.log(res)
55
+    if (res) {
56
+      data.value = res
57
+    }
58
+  }).catch(error => {
59
+    uni.showToast({
60
+      title: error,
61
+      icon: 'none'
62
+    })
63
+  })
64
+})
65
+
21 66
 function handleClick(item: { url: string, title: string }) {
22 67
   uni.navigateTo({
23 68
     url: item.url
24 69
   })
25 70
 }
71
+
72
+function handleShowAgreement() {
73
+  uni.navigateTo({
74
+    url: '/pages/webview/agreement?type=6'
75
+  })
76
+}
26 77
 </script>
27 78
 <template>
28 79
   <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0 z--1"></div>
29 80
 
30 81
   <div class="px-3 py-3 flex flex-col gap-3">
82
+    <div @click="handleShowAgreement" class="flex justify-end text-white">
83
+      <div class="text-sm">规则</div>
84
+    </div>
31 85
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
32 86
       <div class="flex justify-around">
33 87
         <div class="flex flex-col justify-center items-center gap-2">
34 88
           <div class="text-xs text-gray">
35 89
             当前收益(元)
36 90
           </div>
37
-          <div class="font-bold text-[28px]">0.00</div>
91
+          <div class="font-bold text-[28px]">
92
+            {{ data.brokerage_price }}
93
+          </div>
38 94
         </div>
39 95
         <div class="flex flex-col justify-center items-center gap-2">
40 96
           <div class="text-xs text-gray">
41 97
             未结算(元)
42 98
           </div>
43
-          <div class="font-bold text-[28px]">0.00</div>
99
+          <div class="font-bold text-[28px]">
100
+            {{ userInviteProfit.UserUnsettledInviteProfit ? userInviteProfit.UserUnsettledInviteProfit : '0.00' }}
101
+          </div>
44 102
         </div>
45 103
       </div>
46 104
       <div class="flex justify-around">
47 105
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
48 106
           <div class="text-xs text-gray">昨日收益(元)</div>
49
-          <div class="font-bold text-red">0.00</div>
107
+          <div class="font-bold text-red">{{ data.yesterday }}</div>
50 108
         </div>
51 109
 
52 110
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
53 111
           <div class="text-xs text-gray">累计收益(元)</div>
54
-          <div class="font-bold">0.00</div>
112
+          <div class="font-bold">{{ data.cumulative }}</div>
55 113
         </div>
56 114
 
57 115
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
58 116
           <div class="text-xs text-gray">累计已提(元)</div>
59
-          <div class="font-bold">0.00</div>
117
+          <div class="font-bold">{{ data.extract }}</div>
60 118
         </div>
61 119
       </div>
62 120
 
@@ -76,7 +134,7 @@ page {
76 134
   background: #f8f8f8;
77 135
 }
78 136
 </style>
79
-<route lang="yaml" >
137
+<route lang="yaml">
80 138
 style:
81 139
   navigationBarBackgroundColor: "#FD1642"
82 140
   navigationBarTextStyle: "white"

+ 23 - 6
src/pages/my-relation-merchant/index.vue

@@ -6,12 +6,13 @@ const list = ref<any[]>()
6 6
 onLoad((option: any) => {
7 7
   loadMyRelationMerchantList()
8 8
 })
9
+const searchValue = ref('')
9 10
 
10
-function loadMyRelationMerchantList() {
11
+function loadMyRelationMerchantList(keywords = '') {
11 12
   getMyRelationMerchantList({
12 13
     page: 1,
13 14
     limit: 10,
14
-    keywords: ''
15
+    keywords,
15 16
   }).then(res => {
16 17
     if (res) {
17 18
       console.log(res)
@@ -27,18 +28,25 @@ function handleRemoveMyRelation(item: any, index: number) {
27 28
     success: (res) =>  {
28 29
       if (res.confirm) {
29 30
         removeMyRelation({
30
-          type: 1,
31
+          type: 10,
31 32
           type_id: item.type_id
32 33
         }).then(delRes => {
33
-          return uni.showToast({
34
+          loadMyRelationMerchantList()
35
+
36
+          uni.showToast({
34 37
             title: '取消收藏成功',
35 38
             icon: 'success'
36 39
           }).then(() => {
37
-            loadMyRelationMerchantList()
38 40
             // if (list) {
39 41
             //   list.value.splice(index, 1)
40 42
             // }
41 43
           })
44
+
45
+        }).catch(error => {
46
+          uni.showToast({
47
+            title: error,
48
+            icon: 'none'
49
+          })
42 50
         })
43 51
       }
44 52
     }
@@ -49,7 +57,16 @@ function handleRemoveMyRelation(item: any, index: number) {
49 57
 <template>
50 58
   <div>
51 59
     <div class="bg-white p-3 mb-3">
52
-      <FSearch />
60
+      <nut-searchbar
61
+          class="absolute top-0"
62
+          v-model="searchValue" @search="loadMyRelationMerchantList( searchValue)" @clear="loadMyRelationMerchantList( '')">
63
+        <template v-slot:rightout>
64
+          <div @tap="loadMyRelationMerchantList(searchValue)">
65
+            搜索
66
+          </div>
67
+        </template>
68
+      </nut-searchbar>
69
+      <!--      <FSearch />-->
53 70
     </div>
54 71
     <div v-if="list && list.length > 0" class="flex flex-col gap-3">
55 72
       <div class="bg-white flex p-3" v-for="(item, index) in list" :key="index">

+ 35 - 15
src/pages/my-relation-product/index.vue

@@ -8,17 +8,25 @@ onLoad((option: any) => {
8 8
   loadMyFavorite()
9 9
 })
10 10
 
11
-function loadMyFavorite() {
11
+const searchValue = ref('')
12
+function loadMyFavorite(keywords= '') {
12 13
   getMyRelationProduct({
13 14
     page: 1,
14 15
     limit: 10,
15
-    keyword: ''
16
+    keywords,
16 17
   }).then(res => {
17 18
     if (res) {
18 19
       list.value = res.list
19 20
     }
20 21
   })
21 22
 }
23
+
24
+function handleShowDetail(item) {
25
+  console.log(item)
26
+  uni.navigateTo({
27
+    url: `/pages/store/product/detail?id=${item.product_id}`
28
+  })
29
+}
22 30
 function handleRemoveMyRelationProduct(item: MyRelationProductModel, index: number) {
23 31
   console.log(item)
24 32
   uni.showModal({
@@ -48,25 +56,37 @@ function handleRemoveMyRelationProduct(item: MyRelationProductModel, index: numb
48 56
 
49 57
 <template>
50 58
   <div>
51
-    <div class="bg-white p-3">
52
-      <FSearch />
59
+    <div class="bg-white ">
60
+<!--      <FSearch />-->
61
+      <nut-searchbar
62
+          class="absolute top-0"
63
+          v-model="searchValue" @search="loadMyFavorite( searchValue)" @clear="loadMyFavorite( '')">
64
+        <template v-slot:rightout>
65
+          <div @tap="loadMyFavorite(searchValue)">
66
+            搜索
67
+          </div>
68
+        </template>
69
+      </nut-searchbar>
53 70
     </div>
54 71
     <div v-if="list && list.length > 0">
55 72
      <div class="bg-white flex p-3" v-for="(item, index) in list" :key="index">
56
-       <div>
57
-         <image :src="item.image" mode="widthFix" class="w-15 h-15 rounded "></image>
58
-       </div>
59
-       <div class="flex flex-col text-sm px-3 justify-between">
60
-         <div>{{ item.store_name }}</div>
61
-         <div class="flex items-center justify-between">
62
-           <div class=" text-red font-bold">¥{{ item.price }}</div>
63
-           <div
64
-               @tap="handleRemoveMyRelationProduct(item, index)"
65
-               class="border border-solid border-red rounded-full px-2 text-[10px] text-red">
66
-             取消收藏
73
+       <div class="w-full flex">
74
+         <div>
75
+           <image :src="item.image" mode="widthFix" class="w-15 h-15 rounded "></image>
76
+         </div>
77
+         <div class="flex flex-col text-sm px-3 justify-between w-full">
78
+           <div @click="handleShowDetail(item)">{{ item.store_name }}</div>
79
+           <div class="flex items-center justify-between">
80
+             <div class=" text-red font-bold">¥{{ item.price }}</div>
81
+             <div
82
+                 @tap="handleRemoveMyRelationProduct(item, index)"
83
+                 class="border border-solid border-red rounded-full px-2 text-[10px] text-red">
84
+               取消收藏
85
+             </div>
67 86
            </div>
68 87
          </div>
69 88
        </div>
89
+
70 90
      </div>
71 91
     </div>
72 92
     <div v-else>

+ 46 - 17
src/pages/my-rules/index.vue

@@ -3,7 +3,7 @@
3 3
 import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
4 4
 
5 5
 import {encodePhone} from "../../utils";
6
-import {getRules, getUserInfo} from "~/apis/user";
6
+import {getAgentInfo, getRules, getUserInfo} from "~/apis/user";
7 7
 
8 8
 const userStore = useUserStore()
9 9
 const ruleDetail = ref<{
@@ -19,6 +19,7 @@ const ruleDetail = ref<{
19 19
 const showUpgradeInfo = ref(false)
20 20
 const userType = computed(() => {
21 21
   const userRichType = userStore.userInfo?.user_rich_type
22
+
22 23
   // 创始人
23 24
   if (userRichType == 3) {
24 25
     return '创始人'
@@ -31,15 +32,30 @@ const userType = computed(() => {
31 32
   if (userRichType == 1) {
32 33
     return '会员'
33 34
   }
35
+  if (userRichType == 3) {
36
+    return '创始人'
37
+  }
34 38
   // 合伙人
35
-  if (userRichType == 2) {
36
-    return '合伙人'
39
+  if (userRichType == 4) {
40
+    // return '合伙人(VIP)'
41
+    return 'VIP'
42
+  }
43
+  if (userRichType == 5) {
44
+    return '初始级合伙人'
45
+  }
46
+  if (userRichType == 6) {
47
+    return '中级合伙人'
48
+  }
49
+  if (userRichType == 7) {
50
+    return '高级合伙人'
37 51
   }
38 52
   if (!userRichType) {
39 53
     return '用户'
40 54
   }
41 55
 })
42 56
 
57
+
58
+
43 59
 onLoad(async () => {
44 60
   await userStore.getUserInfo()
45 61
   await userStore.getUserYanglaoJin()
@@ -74,11 +90,13 @@ function handleShowAnnuityDetail() {
74 90
 }
75 91
 const ruleId = computed(() => {
76 92
   const userRichType = userStore.userInfo?.user_rich_type
93
+
94
+  console.log(userRichType)
77 95
   // 创始人
78 96
   if (userRichType === 3) {
79 97
     return 21
80 98
   }
81
-  // 普通用户
99
+  // 用户
82 100
   if (userRichType === 0) {
83 101
     return 18
84 102
   }
@@ -87,22 +105,30 @@ const ruleId = computed(() => {
87 105
     return 19
88 106
   }
89 107
   // 合伙人
90
-  if (userRichType === 2) {
108
+  if (userRichType === 2 || userRichType == 4) {
91 109
     return 20
92 110
   }
93 111
 
94 112
   return 18
95 113
 })
114
+const agentInfo = ref({})
96 115
 
97 116
 onShow(() => {
98 117
 
99
-  getRules(ruleId.value).then(res => {
100
-    ruleDetail.value = res
101
-  }).catch(error => {
102
-    uni.showToast({
103
-      title: error,
104
-      icon: 'none'
118
+  if (ruleId.value) {
119
+    console.log(ruleId.value)
120
+    getRules(ruleId.value).then(res => {
121
+      ruleDetail.value = res
122
+    }).catch(error => {
123
+      uni.showToast({
124
+        title: error,
125
+        icon: 'none'
126
+      })
105 127
     })
128
+  }
129
+
130
+  getAgentInfo().then(res => {
131
+    agentInfo.value = res
106 132
   })
107 133
 })
108 134
 
@@ -124,9 +150,9 @@ function handleToVipPage() {
124 150
 </script>
125 151
 <template>
126 152
   <div>
127
-    <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0"></div>
153
+    <div class="bg-[#FD1642] h-25 w-full absolute top-0 left-0"></div>
128 154
     <div class="flex flex-col gap-4 relative px-3 pb-safe">
129
-      <div class="pt-15 ">
155
+      <div class="pt-5 ">
130 156
         <div class="flex gap-2 mb-2 text-white mb-6">
131 157
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
132 158
                  mode="widthFix"
@@ -145,8 +171,8 @@ function handleToVipPage() {
145 171
               </div>
146 172
             </div>
147 173
             <div
148
-                class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center">
149
-              {{ userType || '用户' }}
174
+                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">
175
+              {{ userType }}
150 176
             </div>
151 177
           </div>
152 178
 
@@ -166,7 +192,7 @@ function handleToVipPage() {
166 192
             <div
167 193
                 @tap="handleShowMyInvitation"
168 194
                 class="w-1/3  flex flex-col justify-center items-center">
169
-              <div>{{ userStore.userInfo.member_brokerage_price }}</div>
195
+              <div>{{ agentInfo.brokerage_price }}</div>
170 196
               <div class="text-xs">我的佣金</div>
171 197
             </div>
172 198
             <div
@@ -210,7 +236,7 @@ function handleToVipPage() {
210 236
         <div class="flex justify-center items-center">
211 237
           <nut-button
212 238
               @click="handleToVipPage"
213
-              type="primary" size="small">立即升级</nut-button>
239
+              type="primary" size="small">立即开通</nut-button>
214 240
 
215 241
         </div>
216 242
       </div>
@@ -238,8 +264,11 @@ function handleToVipPage() {
238 264
 
239 265
 <route lang="yaml">
240 266
 style:
267
+  navigationBarBackgroundColor: "#FD1642"
241 268
   navigationBarTitleText: 储蓄保
242 269
   enablePullDownRefresh: true
270
+  navigationBarTextStyle: "white"
271
+
243 272
 </route>
244 273
 
245 274
 <style>

+ 33 - 7
src/pages/order-confirm/index.vue

@@ -13,9 +13,12 @@ import {watchThrottled} from "@vueuse/core";
13 13
 const addressIcon = CDN_URL + '/static/assets/dingwi_220624.png'
14 14
 // const addressInfo = ref({})
15 15
 const addressStore = useAddressStore()
16
+const userStore = useUserStore()
17
+
16 18
 const data = reactive({
17 19
   cartOrder: [],
18 20
 
21
+  type: '',
19 22
   addressInfo: {},
20 23
   cartId: '',
21 24
   addressId: '',
@@ -31,6 +34,9 @@ const data = reactive({
31 34
 })
32 35
 onLoad((options) => {
33 36
 
37
+  if (options && options.type) {
38
+    data.type = options.type
39
+  }
34 40
   // console.log(options.cartId)
35 41
   if (options && options.cartId) {
36 42
     data.cartId = options.cartId
@@ -60,9 +66,9 @@ onLoad((options) => {
60 66
     data.vipType = res.da_type
61 67
   })
62 68
   /// 检查商品
63
-  checkProductDaCang(data.productId).then(res => {
64
-    console.log(res)
65
-  })
69
+  // checkProductDaCang(data.productId).then(res => {
70
+  //   console.log(res)
71
+  // })
66 72
   /// 获取订单商品数据
67 73
   orderCheck({
68 74
     cart_id: data.cartId.split(','),
@@ -74,6 +80,12 @@ onLoad((options) => {
74 80
     data.totalPrice = res.order_price
75 81
     data.orderStatus = res.status
76 82
     // data.proPrice = res.proPrice
83
+  }).catch(error => {
84
+    console.log(error + '----')
85
+    uni.showToast({
86
+      title: error,
87
+      icon: 'none'
88
+    })
77 89
   })
78 90
 })
79 91
 
@@ -116,7 +128,9 @@ function handleSubmit() {
116 128
     address_id: data.addressId,
117 129
     // 优惠券
118 130
     // coupon:
119
-    pay_type: 'weixin',
131
+    // pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分
132
+    pay_type:  data.type && data.type == '3' ? '5' : 'weixin',
133
+    mer_id: data.type && data.type == '3' ? '148': '',
120 134
     // 用户留言
121 135
     mark: '',
122 136
     // take: [],
@@ -201,6 +215,7 @@ function handleAddressSelect() {
201 215
           <div class="flex items-center gap-2 text-sm font-bold f-hairline-bottom p-3">
202 216
             <image :src="item.mer_avatar" mode="widthFix" class="w-5 h-5"></image>
203 217
             <div>{{ item.mer_name }}</div>
218
+<!--            <div>{{ item.mer_id}}</div>-->
204 219
           </div>
205 220
 
206 221
           <div v-for="(orderProductItem, orderProductItemIndex) in item.list" :key="orderProductItemIndex">
@@ -214,19 +229,28 @@ function handleAddressSelect() {
214 229
                   {{ orderProductItem.product.store_name }}
215 230
                   <div class="text-[11px] text-gray-500">{{ orderProductItem.productAttr.sku }}</div>
216 231
                 </div>
217
-                <FPrice :price="orderProductItem.productAttr.price"></FPrice>
218
-                <CXBYaojinTag :amount="orderProductItem.yanglao"/>
232
+                <FPrice :price="orderProductItem.productAttr.price" v-if="item.mer_id != '148'"></FPrice>
233
+                <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"></FPrice>
234
+                <CXBYaojinTag :amount="orderProductItem.yanglao" v-if="item.mer_id != '148'"/>
235
+
219 236
               </div>
220 237
 
221 238
             </div>
222 239
 
223 240
             <div>
224 241
               <FCell
242
+                  v-if="item.mer_id != '148'"
225 243
                   title="优惠劵"
226 244
                   :value="item.order.coupon_price ? item.order.coupon_price : '暂无优惠券'"
227 245
                   arrow
228 246
               ></FCell>
229 247
               <FCell
248
+                  v-if="item.mer_id == '148'"
249
+                  title="积分"
250
+                  :value="userStore.userInfo.score ? userStore.userInfo.score : '暂无积分'"
251
+                  arrow
252
+              ></FCell>
253
+              <FCell
230 254
                   title="运费"
231 255
                   :value="item.order.postage_price > 0 ? item.order.postage_price : '免运费'"
232 256
                   arrow
@@ -246,7 +270,9 @@ function handleAddressSelect() {
246 270
     <div class="fixed bottom-0 pb-safe w-full bg-white">
247 271
       <div class="flex justify-between items-center p-3">
248 272
         <div class="flex-1 flex text-sm font-bold">
249
-          应付金额:<FPrice :price="data.totalPrice"></FPrice>
273
+          应付金额:
274
+          <FPrice v-if="data.type && data.type == '3'" :price="data.totalPrice * 30"></FPrice>
275
+         <FPrice  v-else :price="data.totalPrice"></FPrice>
250 276
         </div>
251 277
         <div class="flex">
252 278
           <nut-button type="primary" size="small" @click="handleSubmit">提交订单</nut-button>

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

@@ -39,7 +39,7 @@
39 39
 
40 40
             </div>
41 41
             <div class="flex justify-end gap-2">
42
-              <nut-button size="small" type="default" @click="handleCancelOrder">取消订单</nut-button>
42
+              <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
43 43
               <nut-button size="small" plain type="primary" @click="handlePayment">立即支付</nut-button>
44 44
 
45 45
             </div>
@@ -71,7 +71,7 @@
71 71
 
72 72
           </div>
73 73
           <div class="flex justify-end gap-2">
74
-            <nut-button size="small" type="default" @click="handleCancelOrder">取消订单</nut-button>
74
+            <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
75 75
             <nut-button size="small" plain type="primary" @click="handlePayment">立即支付</nut-button>
76 76
           </div>
77 77
         </div>

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

@@ -94,7 +94,7 @@ function handleClick() {
94 94
       </div>
95 95
       <div class="flex justify-center items-center gap-2">
96 96
         <div class="flex items-center">
97
-          补贴养老金:<FPrice :price="item.yanlao"></FPrice>
97
+          预估养老金:<FPrice :price="item.yanlao"></FPrice>
98 98
         </div>
99 99
         <div class="border border-solid border-1px border-gray-500 text-gray rounded px-1">{{ item.status_name }}</div>
100 100
       </div>

+ 12 - 10
src/pages/order/detail.vue

@@ -28,18 +28,18 @@ onLoad((options) => {
28 28
 
29 29
 function handleCancelOrder() {
30 30
   console.log('取消订单操作')
31
-  cancelOrder(detail.order_id).then(res => {
31
+  cancelOrder(detail.value.group_order_id).then(res => {
32
+    uni.showToast({
33
+      title: '取消成功',
34
+      icon: 'none'
35
+    })
32 36
     setTimeout(() => {
33
-      uni.showToast({
34
-        title: '取消成功',
35
-        icon: 'none'
36
-      })
37
-
38 37
       uni.$emit('orderCancelFromList')
39
-
38
+      uni.navigateBack()
40 39
     }, 300)
41 40
 
42 41
   }).catch(error => {
42
+
43 43
     uni.navigateTo({
44 44
       url: '/pages/user/login/index?key=30'
45 45
     })
@@ -47,9 +47,11 @@ function handleCancelOrder() {
47 47
 }
48 48
 
49 49
 function handlePayment() {
50
-  const {detail: orderItem} = props
50
+  // const {detail: orderItem} = props
51
+  // const { orderItem } = detail.value
52
+  // console.log(orderItem)
51 53
   uni.navigateTo({
52
-    url: '/pages/payment/index?' + `pay_price=${orderItem.pay_price}&order_id=${orderItem.order_id}&OrderList=${JSON.stringify(orderItem)}`
54
+    url: '/pages/payment/index?' + `pay_price=${ detail.value.pay_price}&order_id=${ detail.value.order_id}&OrderList=${JSON.stringify( detail.value)}`
53 55
     // url: `/pages/payment/index`
54 56
   })
55 57
 }
@@ -162,7 +164,7 @@ function handlePayment() {
162 164
 
163 165
     <div class="fixed bottom-0 bg-white p-safe items-center  w-full">
164 166
       <div class="flex justify-end gap-2 p-3">
165
-        <nut-button size="small" type="default" @click="handleCancelOrder">取消订单</nut-button>
167
+        <nut-button size="small" type="default" @click="handleCancelOrder" class="text-black"><div class="text-black">取消订单</div></nut-button>
166 168
         <nut-button size="small" plain type="primary" @click="handlePayment">立即支付</nut-button>
167 169
 
168 170
       </div>

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

@@ -2,9 +2,10 @@
2 2
   <CXBBasePage>
3 3
     <nut-tabs v-model="state.tabvalue">
4 4
       <nut-tab-pane title="全部">
5
+
5 6
         <div v-if="state.allOrderList.length > 0" class="flex flex-col gap-3">
6 7
           <div v-for="(orderItem, index) in state.allOrderList" :key="index">
7
-            <OrderItem :order-item="orderItem" v-if="orderItem.source = 7"/>
8
+            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
8 9
             <OtherOrderItem :item="orderItem" v-else/>
9 10
           </div>
10 11
         </div>
@@ -23,8 +24,9 @@
23 24
       <nut-tab-pane title="待发货">
24 25
         <div v-if="state.orderList.length > 0">
25 26
           <div v-for="(orderItem, index) in state.orderList" :key="index">
26
-            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
27
-            <OtherOrderItem :item="orderItem" v-else/>
27
+            <OrderItem :order-item="orderItem"/>
28
+<!--            <OtherOrderItem :item="orderItem" v-else/>-->
29
+<!--            <OtherOrderItem :item="orderItem"/>-->
28 30
           </div>
29 31
         </div>
30 32
         <CXBEmpty v-else/>
@@ -33,8 +35,9 @@
33 35
       <nut-tab-pane title="待收货">
34 36
         <div v-if="state.orderList.length > 0">
35 37
           <div v-for="(orderItem, index) in state.orderList" :key="index">
36
-            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
37
-            <OtherOrderItem :item="orderItem" v-else/>
38
+            <OrderItem :order-item="orderItem"/>
39
+<!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
40
+<!--            <OtherOrderItem :item="orderItem" v-else/>-->
38 41
           </div>
39 42
         </div>
40 43
         <CXBEmpty v-else/>
@@ -43,8 +46,9 @@
43 46
       <nut-tab-pane title="待评价">
44 47
         <div v-if="state.orderList.length > 0">
45 48
           <div v-for="(orderItem, index) in state.orderList" :key="index">
46
-            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
47
-            <OtherOrderItem :item="orderItem" v-else/>
49
+            <OrderItem :order-item="orderItem"/>
50
+<!--            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>-->
51
+<!--            <OtherOrderItem :item="orderItem" v-else/>-->
48 52
           </div>
49 53
         </div>
50 54
         <CXBEmpty v-else/>
@@ -68,7 +72,7 @@ import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
68 72
 import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
69 73
 
70 74
 const state = reactive({
71
-  tabvalue: '0',
75
+  tabvalue: 0,
72 76
 
73 77
   allOrderTotal: 0,
74 78
   allOrderList: [],
@@ -88,10 +92,10 @@ onLoad(options => {
88 92
   // 监听事件
89 93
   uni.$on('orderCancelFromList', () => {
90 94
     loadAllOrderList()
91
-    state.tabvalue = '0'
95
+    state.tabvalue = 0
92 96
   })
93 97
 })
94
-function  	splitArray(list, sp) {
98
+function splitArray(list, sp) {
95 99
   if (typeof list != 'object') return [];
96 100
   if (sp == undefined) sp = [];
97 101
   for (var i = 0; i < list.length; i++) {

+ 54 - 50
src/pages/order/third-order.vue

@@ -1,69 +1,73 @@
1 1
 <template>
2
-  <nut-tabs v-model="state.tabvalue">
3
-    <nut-tab-pane title="京东">
4
-      <div v-if="state.jdOrderList" class="flex flex-col gap-3">
5
-        <div v-for="(item, index) in state.jdOrderList" :key="index">
6
-          <div class="bg-white rounded p-2 flex flex-col gap-2">
7
-            <div class="flex justify-between items-center text-[12px] f-hairline-bottom py-2">
8
-              <div>订单号:{{ item.order_sn }}</div>
9
-              <div class="text-primary">{{ item.other_status_desc }}</div>
10
-            </div>
2
+  <CXBBasePage>
3
+    <nut-tabs v-model="state.tabvalue">
4
+      <nut-tab-pane title="京东">
5
+        <div v-if="state.jdOrderList && state.jdOrderList.length > 0" class="flex flex-col gap-3">
6
+          <div v-for="(item, index) in state.jdOrderList" :key="index">
7
+            <div class="bg-white rounded p-2 flex flex-col gap-2">
8
+              <div class="flex justify-between items-center text-[12px] f-hairline-bottom py-2">
9
+                <div>订单号:{{ item.order_sn }}</div>
10
+                <div class="text-primary">{{ item.other_status_desc }}</div>
11
+              </div>
11 12
 
12
-            <div class="flex  gap-2">
13
-              <div class="flex">
14
-                <image :src="item.goods_img" mode="widthFix" class="w-16 h-16 rounded"></image>
13
+              <div class="flex  gap-2">
14
+                <div class="flex">
15
+                  <image :src="item.goods_img" mode="widthFix" class="w-16 h-16 rounded"></image>
15 16
 
16
-              </div>
17
-              <div class="flex items-center">
18
-                <div class="flex flex-col gap-1">
19
-                  <div class="bg-primary text-[10px] rounded text-white px-1 w-fit">
20
-                    京东
21
-                  </div>
22
-                  <div class="text-[12px] line-clamp-2">
23
-                    {{ item.goods_name }}
17
+                </div>
18
+                <div class="flex items-center">
19
+                  <div class="flex flex-col gap-1">
20
+                    <div class="bg-primary text-[10px] rounded text-white px-1 w-fit">
21
+                      京东
22
+                    </div>
23
+                    <div class="text-[12px] line-clamp-2">
24
+                      {{ item.goods_name }}
25
+                    </div>
24 26
                   </div>
27
+                  <div class="flex text-[11px] w-15 justify-end">{{ 'X' + item.goods_num }}</div>
25 28
                 </div>
26
-                <div class="flex text-[11px] w-15 justify-end">{{ 'X' + item.goods_num }}</div>
27 29
               </div>
28
-            </div>
29
-            <div class="flex justify-between text-[11px] items-center">
30
-              <div>{{ item.create_time }}</div>
31
-              <div class="flex justify-center items-center">
32
-                补贴养老金:<FPrice :price="item.yanlao"></FPrice>
33
-                <div class="border border-solid border-1px border-gray-500 text-gray rounded">{{ item.status_name }}</div>
30
+              <div class="flex justify-between text-[11px] items-center">
31
+                <div>{{ item.create_time }}</div>
32
+                <div class="flex justify-center items-center">
33
+                  预估养老金:<FPrice :price="item.yanlao"></FPrice>
34
+                  <div class="border border-solid border-1px border-gray-500 text-gray rounded">{{ item.status_name }}</div>
35
+                </div>
34 36
               </div>
35 37
             </div>
36
-          </div>
37 38
 
38 39
 
40
+          </div>
41
+          <!--        <div>{{ item.status_name }}</div>-->
42
+
39 43
         </div>
40
-<!--        <div>{{ item.status_name }}</div>-->
41
-
42
-      </div>
43
-      <CXBEmpty v-else/>
44
-
45
-    </nut-tab-pane>
46
-    <nut-tab-pane title="唯品会">
47
-      <CXBEmpty />
48
-    </nut-tab-pane>
49
-    <nut-tab-pane title="苏宁易购">
50
-      <CXBEmpty />
51
-    </nut-tab-pane>
52
-    <nut-tab-pane title="淘宝">
53
-      <CXBEmpty />
54
-    </nut-tab-pane>
55
-    <nut-tab-pane title="拼多多">
56
-      <CXBEmpty />
57
-    </nut-tab-pane>
58
-    <nut-tab-pane title="抖音">
59
-      <CXBEmpty />
60
-    </nut-tab-pane>
61
-  </nut-tabs>
44
+        <CXBEmpty v-else/>
45
+
46
+      </nut-tab-pane>
47
+      <nut-tab-pane title="唯品会">
48
+        <CXBEmpty />
49
+      </nut-tab-pane>
50
+      <nut-tab-pane title="苏宁易购">
51
+        <CXBEmpty />
52
+      </nut-tab-pane>
53
+      <nut-tab-pane title="淘宝">
54
+        <CXBEmpty />
55
+      </nut-tab-pane>
56
+      <nut-tab-pane title="拼多多">
57
+        <CXBEmpty />
58
+      </nut-tab-pane>
59
+      <nut-tab-pane title="抖音">
60
+        <CXBEmpty />
61
+      </nut-tab-pane>
62
+    </nut-tabs>
63
+
64
+  </CXBBasePage>
62 65
 </template>
63 66
 <script setup lang="ts">
64 67
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
65 68
 import {getThirdOrder} from "~/apis/order.api";
66 69
 import FPrice from "~/components/FPrice/FPrice.vue";
70
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
67 71
 enum TYPE {
68 72
   JD = '6',
69 73
   TB = '5',

+ 95 - 16
src/pages/order_addcart/index.vue

@@ -15,6 +15,8 @@ import {
15 15
 import {DcProductModel} from "~/apis/model/dacang.model";
16 16
 import {encodeBase64} from "~/utils/http/helper";
17 17
 import {CDN_URL} from "~/config/app";
18
+import {uniq} from "lodash-es";
19
+import {cartChange} from "~/apis/order.api";
18 20
 const gouwucheImage = CDN_URL + '/static/assets/gouwuche.png'
19 21
 const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
20 22
 const state = reactive({
@@ -31,6 +33,7 @@ const state = reactive({
31 33
 const shopping = ref<ShoppingResult>()
32 34
 
33 35
 onShow(() => {
36
+  state.cart_id = []
34 37
   loadCartList()
35 38
   if (!state.isManage) {
36 39
     state.isManage = true
@@ -47,14 +50,23 @@ onShow(() => {
47 50
 function loadCartList() {
48 51
   getCartList().then(res => {
49 52
     shopping.value = res
53
+
54
+    console.log(res)
50 55
     shopping.value?.list.forEach((shopItem, index) => {
51
-      shopItem.allCheck = true
56
+      // shopItem.allCheck = true
57
+
58
+      shopItem.allCheck = false
52 59
       shopItem.list.forEach(goodItem => {
53
-        goodItem.check = true
54
-        state.cart_id.push(goodItem.cart_id)
60
+        goodItem.check = false
61
+        // state.cart_id.push(goodItem.cart_id)
55 62
         // if (goodItem.cart_num === 1) {}
56 63
       })
64
+      console.log(shopItem)
57 65
     })
66
+    // cartAllCheck("all")
67
+    // if (shopping.value) {
68
+    //   handleSelectAll()
69
+    // }
58 70
   })
59 71
 }
60 72
 const hasShopping = computed(() => {
@@ -87,6 +99,18 @@ function handleGoodsItemCheck() {
87 99
   cartAllCheck('single')
88 100
 }
89 101
 
102
+function shopCheck(shopItem) {
103
+  if (shopItem.allCheck) {
104
+    console.log(shopItem)
105
+    shopItem.list.forEach((good, index) => {
106
+      good.check = true
107
+    })
108
+  } else {
109
+    shopItem.list.forEach((good, index) => {
110
+      good.check = false
111
+    })
112
+  }
113
+}
90 114
 function cartAllCheck(type: 'single' | 'all') {
91 115
   let allArr = []
92 116
   let totalMoney = 0
@@ -120,6 +144,7 @@ function cartAllCheck(type: 'single' | 'all') {
120 144
       if (goodItem.check) {
121 145
         totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
122 146
         totalNum += Number.parseFloat(goodItem.cart_num)
147
+        state.cart_id.push(goodItem.cart_id)
123 148
       }
124 149
     })
125 150
   })
@@ -129,6 +154,26 @@ function cartAllCheck(type: 'single' | 'all') {
129 154
   state.totalPrice = totalMoney
130 155
 }
131 156
 
157
+function reTotal() {
158
+  let allArr = []
159
+  let totalMoney = 0
160
+  let totalNum = 0
161
+
162
+  shopping.value?.list.forEach((goods, index) => {
163
+    // 总金额|总数
164
+    goods.list.forEach(goodItem => {
165
+      if (goodItem.check) {
166
+        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
167
+        totalNum += Number.parseFloat(goodItem.cart_num)
168
+        // state.cart_id.push(goodItem.cart_id)
169
+      }
170
+    })
171
+  })
172
+
173
+  isAllSelect.value = allArr.length === shopping.value?.list.length
174
+  state.totalCartCount = totalNum
175
+  state.totalPrice = totalMoney
176
+}
132 177
 function handleSelectAll(checked: boolean) {
133 178
   // console.log('000')
134 179
   // isAllSelect.value = !isAllSelect.value
@@ -143,9 +188,12 @@ function handleManageCart() {
143 188
 
144 189
 function handleSubmit() {
145 190
   console.log(state.isManage)
191
+
146 192
   if (!state.isManage) {
147 193
     handleDelete()
148 194
   } else { // submit
195
+    state.cart_id = uniq(state.cart_id)
196
+
149 197
     // console.log(state.cart_id)
150 198
     if (state.cart_id && state.cart_id.length > 0) {
151 199
       uni.navigateTo({
@@ -170,6 +218,7 @@ function handleDelete() {
170 218
       }
171 219
     })
172 220
   })
221
+  state.cart_id = uniq(state.cart_id)
173 222
 
174 223
   // console.log(cart_id)
175 224
   if (state.cart_id.length === 0) {
@@ -178,12 +227,24 @@ function handleDelete() {
178 227
       icon: "none"
179 228
     })
180 229
   } else {
181
-    deleteCartItem(state.cart_id).then(res => {
182
-      uni.showToast({
183
-        title: '删除成功'
184
-      })
230
+    uni.showModal({
231
+      title: '温馨提示',
232
+      content: '确认将宝贝删除?',
233
+      success: (res) => {
234
+        if (res.confirm) {
235
+          deleteCartItem(state.cart_id).then(res => {
236
+            uni.showToast({
237
+              title: '删除成功'
238
+            })
239
+            state.isManage = true
240
+            state.cart_id = []
241
+            state.totalPrice = ''
242
+            loadCartList()
243
+          })
185 244
 
186
-      loadCartList()
245
+        } else if (res.cancel) {
246
+        }
247
+      }
187 248
     })
188 249
   }
189 250
 }
@@ -209,6 +270,21 @@ function handleProductItemClick(
209 270
       url: `/pages/store/product/detail?id=${item.product_id}`
210 271
     })
211 272
 }
273
+
274
+function handleNumberChange(num, goodItem) {
275
+  console.log(goodItem)
276
+  uni.showLoading()
277
+  console.log(num)
278
+  cartChange(goodItem.cart_id, num).then(res => {
279
+    reTotal()
280
+    uni.hideLoading()
281
+  })
282
+  // console.log(goodItem)
283
+  // console.log(num)
284
+  // const
285
+  // goodItem.productAttr.price = goodItem.productAttr.price * num
286
+  // goodItem.productAttr.price = goodItem.productAttr.price * goodItem.cart_num
287
+}
212 288
 </script>
213 289
 <template>
214 290
   <div class="">
@@ -248,7 +324,7 @@ function handleProductItemClick(
248 324
           <div
249 325
               class="f-hairline-bottom flex  items-center font-bold p-3"
250 326
           >
251
-            <nut-checkbox v-model="shopItem.allCheck" label="全选"
327
+            <nut-checkbox v-model="shopItem.allCheck" @change="shopCheck(shopItem)" label="全选"
252 328
                           class="!text-primary"
253 329
             >
254 330
               {{ shopItem.mer_name }}
@@ -261,32 +337,34 @@ function handleProductItemClick(
261 337
             <div class="flex">
262 338
               <nut-checkbox v-model="goodItem.check"
263 339
                             @change="handleGoodsItemCheck"
264
-                            label="选"
340
+                            label="选"
265 341
                             class="!text-primary"
266 342
               ></nut-checkbox>
267
-
268 343
               <image
269 344
                   :src="goodItem.product.image"
270 345
                   mode="aspectFill" class="w-18 h-18 rounded"
271 346
               ></image>
272 347
             </div>
273 348
 
274
-            <div class="flex flex-col gap-3 w-full">
349
+            <div class="flex flex-col gap-1 w-full">
275 350
               <div
276 351
                   @click="handleProductItemClick(goodItem)"
277 352
                   class="text-overflow line-clamp-1">{{ goodItem.product.store_name }}</div>
278
-              <div class="flex items-center gap-2">
353
+              <div class="flex flex-col justify-start gap-1">
279 354
                 <div
280
-                    class="text-[10px] bg-gray-100 text-gray rounded-full min-w-5 text-center p-1 justify-center items-center">
355
+                    class="text-[10px] text-gray min-w-5  p-1  items-center flex">
281 356
                   {{ goodItem.productAttr.sku }}
282 357
                 </div>
283
-                <CXBYaojinTag :amount="goodItem.yanglao"/>
358
+                <div class="flex">
359
+                  <CXBYaojinTag :amount="goodItem.yanglao"/>
360
+
361
+                </div>
284 362
               </div>
285 363
               <div class="flex  justify-between ">
286 364
                 <FPrice :price="goodItem.productAttr.price"
287 365
                         ex-class="font-bold text-dark"
288 366
                 />
289
-                <nut-input-number v-model="goodItem.cart_num"/>
367
+                <nut-input-number v-model="goodItem.cart_num" @change="(num) => handleNumberChange(num, goodItem)"/>
290 368
               </div>
291 369
             </div>
292 370
           </div>
@@ -335,6 +413,7 @@ function handleProductItemClick(
335 413
         <div class="flex text-[12px]">
336 414
           合计:
337 415
           <FPrice :price="state.totalPrice"></FPrice>
416
+<!--          {{totalCartInfo.totalPrice}}-->
338 417
         </div>
339 418
         <FButton
340 419
             @click="handleSubmit"

+ 15 - 2
src/pages/pension_account/index.vue

@@ -1,6 +1,7 @@
1 1
 <script lang="ts" setup>
2 2
 import {CDN_URL} from "~/config/app";
3 3
 import {getUserYangLaoJin} from "~/apis/user";
4
+import dayjs from "dayjs";
4 5
 const annuity_yuan_220713Image = CDN_URL + '/static/assets/annuity_yuan_220713.png'
5 6
 const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
6 7
 const userStore = useUserStore()
@@ -12,11 +13,20 @@ onLoad(() => {
12 13
     userYangLaoJin.value = res
13 14
   })
14 15
 })
16
+
17
+function handleClick() {
18
+  uni.navigateTo({
19
+    url: '/pages/immediate-withdrawal/index'
20
+  })
21
+}
22
+
15 23
 </script>
16 24
 
17 25
 <template>
18 26
   <div class=" w-screen max-w-lg mx-auto">
19 27
     <div class="p-4 flex flex-col gap-3">
28
+
29
+
20 30
       <div class="rounded-lg bg-[#FE2C46] p-3 text-white">
21 31
         <div class="flex items-center w-full gap-2  top-5 left-8">
22 32
           <image src="https://app.bjtdba.com/uploads/logo.jpg"
@@ -32,6 +42,7 @@ onLoad(() => {
32 42
             <div class="flex gap-1">
33 43
               <div>养老金账号余额</div>
34 44
               <div
45
+                  @click="handleClick"
35 46
                   class="text-[#d88700] bg-[#feebcd] rounded-full text-[10px] h-4 px-2"
36 47
               >去提现</div>
37 48
             </div>
@@ -47,7 +58,7 @@ onLoad(() => {
47 58
                   <div>¥</div>
48 59
                   <div>{{ userStore.yanglao.all_yanglao }}</div>
49 60
                 </div>
50
-                <div class="text-xs text-light-100">补贴养老金</div>
61
+                <div class="text-xs text-light-100">预估养老金</div>
51 62
               </div>
52 63
               <div class="flex flex-col justify-center items-center ">
53 64
                 <div class="font-bold">¥{{ userStore.yanglao.all_yanglao_a }}</div>
@@ -77,7 +88,9 @@ onLoad(() => {
77 88
               </div>
78 89
               <div class="block mt-3">
79 90
                 <div>加入时间</div>
80
-                <div class="text-gray">2023-07-31</div>
91
+                <div class="text-gray">
92
+                  {{userYangLaoJin.create_time && dayjs(userYangLaoJin.create_time).format('YYYY-MM-DD')}}
93
+                </div>
81 94
               </div>
82 95
             </div>
83 96
             <div class="text-center">

+ 12 - 3
src/pages/product/zibuyangsheng.vue

@@ -3,6 +3,7 @@ import {getEntropyProductList} from "~/apis/common";
3 3
 import ProductCard from "~/components/ProductCard/ProductCard.vue";
4 4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5 5
 import {getProductList} from "~/apis/merchant";
6
+import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6 7
 const list = ref()
7 8
 onLoad((options) => {
8 9
   getProductList(options.id).then(res => {
@@ -12,7 +13,8 @@ onLoad((options) => {
12 13
 
13 14
 function handleItemClick(item) {
14 15
   uni.navigateTo({
15
-    url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
16
+    // url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
17
+    url: `/pages/store/product/detail?id=${item.product_id}`
16 18
   })
17 19
 }
18 20
 </script>
@@ -28,15 +30,22 @@ function handleItemClick(item) {
28 30
             <div v-for="(item, index) in list"
29 31
                  :key="index"
30 32
             >
33
+
31 34
               <div class="bg-white rounded-lg">
32 35
                 <image :src="item.image" mode="widthFix" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
33 36
                 <div class="text-sm p-2 flex flex-col gap-2">
34 37
                   <div class="line-clamp-2">
35 38
                     {{ item.store_name }}
36 39
                   </div>
40
+                  <CXBYaojinTag :amount="item.yanglao" />
37 41
                   <div class="text-[#fe0032] flex items-end gap-2">
38
-                    <div class="text-[20px]">{{ Number(item.price * 30).toFixed(2) }}</div>
39
-                    <div class="text-xs">积分</div>
42
+                    <div class="text-[20px]">{{ Number(item.price).toFixed(2) }}</div>
43
+<!--                    <div class="text-xs">积分</div>-->
44
+                  </div>
45
+                  <div class="line-through text-xs font-bold text-gray-400 flex ">
46
+                    <div>
47
+                      ¥ {{item.ot_price}}
48
+                    </div>
40 49
                   </div>
41 50
                 </div>
42 51
               </div>

+ 30 - 27
src/pages/real-name-authentication/index.vue

@@ -48,7 +48,7 @@ onLoad(async () => {
48 48
       state.isCertified = true
49 49
 
50 50
       formData.user_card = res.user_card.replace(/^(\d{4})\d+(\d{4})$/, '$1********$2')
51
-      formData.user_name = res.user_name
51
+      formData.user_name = formatName(res.user_name)
52 52
       // formData.card_positive = res.card_positive
53 53
       // formData.card_reverse = res.card_reverse
54 54
 
@@ -127,22 +127,22 @@ function validateForm() {
127 127
     return state.isFormValidate = false
128 128
   }
129 129
 
130
-  if (formData.mobile === '') {
131
-    uni.showToast({
132
-      title: '请填写手机号',
133
-      icon: 'none'
134
-    })
135
-    return state.isFormValidate = false
136
-  }
137
-
138
-  if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(formData.mobile)) {
139
-     uni.showToast({
140
-      title: '请填写正确的手机号',
141
-      icon: 'none'
142
-    })
143
-    return state.isFormValidate = false
144
-
145
-  }
130
+  // if (formData.mobile === '') {
131
+  //   uni.showToast({
132
+  //     title: '请填写手机号',
133
+  //     icon: 'none'
134
+  //   })
135
+  //   return state.isFormValidate = false
136
+  // }
137
+
138
+  // if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(formData.mobile)) {
139
+  //    uni.showToast({
140
+  //     title: '请填写正确的手机号',
141
+  //     icon: 'none'
142
+  //   })
143
+  //   return state.isFormValidate = false
144
+  //
145
+  // }
146 146
 
147 147
   if (formData.user_card === '') {
148 148
      uni.showToast({
@@ -214,6 +214,10 @@ function handleSubmit () {
214 214
     return false
215 215
   }
216 216
 }
217
+function formatName (str) {
218
+  return new Array(str.length).join('*') + str.substr(-1);
219
+
220
+}
217 221
 </script>
218 222
 
219 223
 <template>
@@ -230,15 +234,15 @@ function handleSubmit () {
230 234
                :class="state.isCertified && 'text-gray'"
231 235
         />
232 236
       </div>
233
-      <div class="f-hairline-bottom py-3 flex" v-if="!state.isCertified">
234
-        <div>手机号码:</div>
235
-        <input v-model="formData.mobile"
236
-               :disabled="state.isCertified"
237
-               placeholder="请输入证件号码" class="text-sm"
238
-               :class="state.isCertified && 'text-gray'"
239
-
240
-        />
241
-      </div>
237
+<!--      <div class="f-hairline-bottom py-3 flex" v-if="!state.isCertified">-->
238
+<!--        <div>手机号码:</div>-->
239
+<!--        <input v-model="formData.mobile"-->
240
+<!--               :disabled="state.isCertified"-->
241
+<!--               placeholder="请输入证件号码" class="text-sm"-->
242
+<!--               :class="state.isCertified && 'text-gray'"-->
243
+
244
+<!--        />-->
245
+<!--      </div>-->
242 246
       <div class="f-hairline-bottom py-3 flex">
243 247
         <div>证件号码:</div>
244 248
         <input v-model="formData.user_card"
@@ -289,7 +293,6 @@ function handleSubmit () {
289 293
     <div class=" px-3">
290 294
       <nut-button
291 295
           @tap="handleSubmit"
292
-          :disabled="!state.isFormValidate"
293 296
           :loading="state.isLoading"
294 297
           type="primary" block>确认提交</nut-button>
295 298
     </div>

+ 61 - 13
src/pages/red-integral/index.vue

@@ -3,36 +3,84 @@ import {useUserStore} from "~/stores/userStore";
3 3
 import {encodePhone} from "../../utils";
4 4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5 5
 import {getRedIntegralList} from "~/apis/user";
6
+import dayjs from "dayjs";
6 7
 
7 8
 const userStore = useUserStore();
8 9
 onLoad((options) => {
9 10
   userStore.getUserInfo()
11
+  getRedIntegralList({page: 1, limit: 20}).then(res => {
12
+    console.log(res)
13
+    if (res && res.length > 0) {
14
+      for (let item of res) {
15
+        // data.value = res
16
+        data.value = {
17
+          red: res.red,
18
+          mark: res.mark,
19
+          time: dayjs(res.time).format('YYYY-MM-DD')
20
+        }
21
+      }
22
+    }
23
+  })
10 24
 })
25
+const data = ref([])
26
+// const userType = computed(() => {
27
+//   const userRichType = userStore.userInfo.user_rich_type
28
+//   // 创始人
29
+//   if (userRichType === 3) {
30
+//     return '创始人'
31
+//   }
32
+//   // 普通用户
33
+//   if (userRichType === 0) {
34
+//     return '用户'
35
+//   }
36
+//   // 会员
37
+//   if (userRichType === 1) {
38
+//     return '会员'
39
+//   }
40
+//   // 合伙人
41
+//   if (userRichType === 2) {
42
+//     return '合伙人'
43
+//   }
44
+//   if (!userRichType) {
45
+//     return '用户'
46
+//   }
47
+//
48
+//
49
+// })
11 50
 const userType = computed(() => {
12
-  const userRichType = userStore.userInfo.user_rich_type
51
+  const userRichType = userStore.userInfo?.user_rich_type
52
+
13 53
   // 创始人
14
-  if (userRichType === 3) {
54
+  if (userRichType == 3) {
15 55
     return '创始人'
16 56
   }
17 57
   // 普通用户
18
-  if (userRichType === 0) {
58
+  if (userRichType == 0) {
19 59
     return '用户'
20 60
   }
21 61
   // 会员
22
-  if (userRichType === 1) {
62
+  if (userRichType == 1) {
23 63
     return '会员'
24 64
   }
65
+  if (userRichType == 3) {
66
+    return '创始人'
67
+  }
25 68
   // 合伙人
26
-  if (userRichType === 2) {
27
-    return '合伙人'
69
+  if (userRichType == 4) {
70
+    return 'VIP'
71
+  }
72
+  if (userRichType == 5) {
73
+    return '初始级合伙人'
74
+  }
75
+  if (userRichType == 6) {
76
+    return '中级合伙人'
77
+  }
78
+  if (userRichType == 7) {
79
+    return '高级合伙人'
28 80
   }
29 81
   if (!userRichType) {
30 82
     return '用户'
31 83
   }
32
-
33
-  getRedIntegralList({page: 1, limit: 20}).then(res => {
34
-    console.log(res)
35
-  })
36 84
 })
37 85
 
38 86
 const state = reactive({
@@ -64,10 +112,10 @@ function handleImmediateWithdrawal() {
64 112
 
65 113
 <template>
66 114
   <CXBBasePage>
67
-    <div class="bg-[#FD1642] h-30 w-full absolute top-0 left-0"></div>
115
+    <div class="bg-[#FD1642] h-25 w-full absolute top-0 left-0"></div>
68 116
 
69 117
     <div class="flex flex-col gap-4 relative px-3">
70
-      <div class="pt-10 ">
118
+      <div class="pt-5 ">
71 119
         <div class="flex gap-2 mb-2 text-white mb-3">
72 120
           <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
73 121
                  class="w-9 h-9 rounded-full"
@@ -85,7 +133,7 @@ function handleImmediateWithdrawal() {
85 133
                   <div class="text-sm" v-if="userStore.userInfo">
86 134
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
87 135
                   </div>
88
-                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center">
136
+                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center px-2">
89 137
                     {{userType}}
90 138
                   </div>
91 139
                 </div>

+ 57 - 0
src/pages/revenue-sharing/detail.vue

@@ -0,0 +1,57 @@
1
+<script setup lang="ts">
2
+import FPrice from "~/components/FPrice/FPrice.vue";
3
+import {decodeBase64} from "~/utils/http/helper";
4
+
5
+const detail = ref({
6
+})
7
+// const props = defineProps({
8
+//   detail: {
9
+//     type: Object,
10
+//     required: true
11
+//   }
12
+// })
13
+onLoad((options) => {
14
+  if (options.detail) {
15
+    detail.value = JSON.parse(decodeBase64(options.detail))
16
+    if (detail.value && detail.value.tradeType) {
17
+      uni.setNavigationBarTitle({
18
+        title: '推广佣金获取详情'
19
+      })
20
+    }
21
+  }
22
+})
23
+</script>
24
+
25
+<template>
26
+  <div>
27
+    <div class="flex flex-col f-hairline-bottom py-4 justify-center items-center text-[12px] gap-3">
28
+      <div>金额</div>
29
+      <FPrice :price="detail.number" ex-class="text-xl font-bold !text-black"></FPrice>
30
+    </div>
31
+
32
+    <div class="flex flex-col text-[12px] p-4 gap-3">
33
+      <div class="flex gap-4">
34
+        <div class="text-gray w-1/5">交易类型</div>
35
+        <div class="w-4/5">推广佣金获取</div>
36
+      </div>
37
+      <div class="flex gap-4">
38
+        <div class="text-gray w-1/5">交易时间</div>
39
+        <div class="w-4/5">{{ detail.create_time}}</div>
40
+      </div>
41
+      <div class="flex gap-4">
42
+        <div class="text-gray w-1/5">流水单号</div>
43
+        <div class="w-4/5">{{ detail.order_sn }}</div>
44
+      </div>
45
+      <div class="flex gap-4">
46
+        <div class="text-gray w-1/5">备注</div>
47
+        <div class="w-4/5">{{ detail.mark }}</div>
48
+      </div>
49
+    </div>
50
+
51
+  </div>
52
+</template>
53
+
54
+<route lang="yaml">
55
+style:
56
+  navigationBarTitleText: 推广佣金收益详情
57
+</route>

+ 79 - 58
src/pages/revenue-sharing/index.vue

@@ -6,6 +6,7 @@ import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6 6
 import {getAgentInfo, getRevenueSharing, getSelectUserInviteProfit} from "~/apis/user";
7 7
 import type {RevenueSharingModel} from "~/apis/model/revenueSharingModel";
8 8
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
9
+import {encodeBase64} from "~/utils/http/helper";
9 10
 const userStore = useUserStore()
10 11
 const state = reactive({
11 12
   numberSun: '',
@@ -18,7 +19,7 @@ const state = reactive({
18 19
   cumulative: '',
19 20
   extract: '',
20 21
 
21
-  currentTab: 1,
22
+  currentTab: 0,
22 23
   list: [
23 24
   //     {
24 25
   //   order_sn: '11111',
@@ -57,9 +58,10 @@ function loadList(type: number) {
57 58
     limit: 20,
58 59
     type
59 60
   }).then((res: Array<RevenueSharingModel>) => {
60
-    if (res && res.length > 0) {
61
+    // if (res && res.length > 0) {
62
+    console.log(res)
61 63
       state.list = res
62
-    }
64
+    // }
63 65
   })
64 66
 
65 67
 }
@@ -79,93 +81,112 @@ function getStatusText(status: number) {
79 81
     return '失效'
80 82
   }
81 83
 }
84
+
85
+function handleItemClick(item) {
86
+  uni.navigateTo({
87
+    url: '/pages/revenue-sharing/detail?detail=' + encodeBase64(Object.assign({}, item))
88
+  })
89
+}
82 90
 </script>
83 91
 
84 92
 <template>
85
-  <CXBBasePage>
93
+  <div class="flex flex-col px-3">
86 94
     <div class="bg-[#FD1642] h-20 rounded-bottom-full w-full absolute top-0 left-0 z--1"></div>
87 95
 
88
-    <div class="px-3 py-3 flex flex-col gap-3">
89
-      <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
90
-        <div class="flex justify-around py-8">
91
-          <div class="flex-1 flex flex-col justify-center items-center gap-2">
92
-            <div class="text-[11px] text-gray">累计佣金(元)</div>
93
-            <div class="font-bold ">
94
-              {{ state.cumulative }}
96
+    <div class=" py-3 flex flex-col gap-3 fixed top-0 z-2 w-full">
97
+      <div class="w-full">
98
+        <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
99
+          <div class="flex justify-around py-8">
100
+            <div class="flex-1 flex flex-col justify-center items-center gap-2">
101
+              <div class="text-[11px] text-gray">累计佣金(元)</div>
102
+              <div class="font-bold ">
103
+                {{ state.cumulative }}
104
+              </div>
95 105
             </div>
96
-          </div>
97 106
 
98
-          <div class="flex-1 flex flex-col justify-center items-center gap-2">
99
-            <div class="text-[11px] text-gray">已提现(元)</div>
100
-            <div class="font-bold">{{ state.extract }}</div>
101
-          </div>
107
+            <div class="flex-1 flex flex-col justify-center items-center gap-2">
108
+              <div class="text-[11px] text-gray">已提现(元)</div>
109
+              <div class="font-bold">{{ state.extract }}</div>
110
+            </div>
102 111
 
103
-          <div class="flex-1 flex flex-col justify-center items-center gap-2">
104
-            <div class="text-[11px] text-gray">佣金余额(元)</div>
105
-            <div class="font-bold">{{ state.brokerage_price }}</div>
106
-          </div>
112
+            <div class="flex-1 flex flex-col justify-center items-center gap-2">
113
+              <div class="text-[11px] text-gray">佣金余额(元)</div>
114
+              <div class="font-bold">{{ state.brokerage_price }}</div>
115
+            </div>
107 116
 
108
-          <div class="flex-1 flex flex-col justify-center items-center gap-2">
109
-            <div class="text-[11px] text-gray">未结算(元)</div>
110
-            <div class="font-bold">{{ state.UserUnsettledInviteProfit }}</div>
117
+            <div class="flex-1 flex flex-col justify-center items-center gap-2">
118
+              <div class="text-[11px] text-gray">未结算(元)</div>
119
+              <div class="font-bold">{{ state.UserUnsettledInviteProfit }}</div>
120
+            </div>
111 121
           </div>
112
-        </div>
113
-
114
-      </div>
115 122
 
116
-      <div>
117
-        <div class="flex justify-around text-center text-sm pb-3">
123
+        </div>
124
+        <div class="flex justify-around text-center text-sm py-3 bg-gray-300">
118 125
           <div
119
-              @click="handleTabClick(1)"
120
-              :class="state.currentTab === 1? 'text-primary' : ''"
126
+              @click="handleTabClick(0)"
127
+              :class="state.currentTab === 0? 'text-primary' : ''"
121 128
           >线上商城明细</div>
122 129
           <div
123
-              :class="state.currentTab === 2? 'text-primary' : ''"
124
-              @click="handleTabClick(2)"
130
+              :class="state.currentTab === 1? 'text-primary' : ''"
131
+              @click="handleTabClick(1)"
125 132
           >线下实体明细</div>
126 133
         </div>
127
-        <div>
128
-          <div v-if="state.list && state.list.length > 0" class="bg-white p-3 gap-3">
129
-            <div v-for="(item, index) in state.list" :key="index">
130
-              <div class="flex flex-col">
131
-                <div class="flex justify-between text-gray text-xs items-center f-hairline-bottom pb-3">
132
-                  <div>订单号:{{ item.order_sn }}</div>
133
-                  <div>{{ getStatusText(item.status) }}</div>
134
+      </div>
135
+<!--      <div class="fixed top-50">-->
136
+
137
+<!--      </div>-->
138
+
139
+
140
+    </div>
141
+    <div class="px-3 py-3 flex flex-col gap-3 pt-50">
142
+      <div>
143
+        <div v-if="state.list && state.list.length > 0" class="bg-white p-3 gap-3">
144
+          <div v-for="(item, index) in state.list" :key="index"
145
+               @click="handleItemClick(item)"
146
+          >
147
+            <div class="flex flex-col">
148
+              <div class="flex justify-between text-gray text-xs items-center f-hairline-bottom pb-3">
149
+                <div>订单号:{{ item.order_sn }}</div>
150
+                <div>{{ getStatusText(item.status) }}</div>
151
+              </div>
152
+              <div class="font-bold flex py-2 justify-between">
153
+                <div>
154
+                  {{ item.content }}
134 155
                 </div>
135
-                <div class="font-bold flex py-2 justify-between">
136
-                  <div>
137
-                    {{ item.content }}
138
-                  </div>
139
-                  <div class="text-primary">+{{ item.number.toFixed(2) }}</div>
156
+                <div class="text-primary">+{{ Number.parseFloat(item.number).toFixed(2) }}</div>
157
+              </div>
158
+              <div class="flex justify-between text-gray text-xs">
159
+                <div class="flex flex-col">
160
+                  <div>消费时间</div>
161
+                  <div class="text-black text-sm">{{ item.xiadan }}</div>
140 162
                 </div>
141
-                <div class="flex justify-between text-gray text-xs">
142
-                  <div class="flex flex-col">
143
-                    <div>消费时间</div>
144
-                    <div class="text-black text-sm">{{ item.xiadan }}</div>
145
-                  </div>
146
-                  <div class="flex flex-col">
147
-                    <div>结算时间</div>
148
-                    <div class="text-black text-sm">{{ item.jiesuan }}</div>
149
-                  </div>
163
+                <div class="flex flex-col">
164
+                  <div>结算时间</div>
165
+                  <div class="text-black text-sm">{{ item.jiesuan }}</div>
150 166
                 </div>
151 167
               </div>
168
+            </div>
152 169
 
153 170
 
154 171
 
155
-            </div>
156 172
           </div>
157
-
158
-          <CXBEmpty v-else/>
159 173
         </div>
174
+
175
+        <CXBEmpty v-else/>
160 176
       </div>
161 177
 
162 178
     </div>
163 179
 
164
-  </CXBBasePage>
180
+  </div>
165 181
 </template>
166
-<route lang="yaml" >
182
+<route lang="yaml"  type="home">
167 183
 style:
168 184
   navigationBarBackgroundColor: "#FD1642"
169 185
   navigationBarTextStyle: "white"
170 186
   navigationBarTitleText: 分享收益
171 187
 </route>
188
+<style>
189
+page {
190
+ background: #f8f8f8;
191
+}
192
+</style>

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

@@ -567,7 +567,7 @@ function handleScrollToLower() {
567 567
                 </div>
568 568
                 <div
569 569
                     class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
570
-                  <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
570
+                  <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
571 571
                          mode="widthFix" class="!w-8.5"></image>
572 572
                   <div class="px-2 flex items-center jusitify-center text-xs">
573 573
                     <div>

+ 32 - 5
src/pages/share-the-product/index.vue

@@ -17,7 +17,7 @@ const state = reactive({
17 17
     key: 'ctime'
18 18
   }, {
19 19
     title: '好友分享',
20
-    key: 'friendSum'
20
+    key: 'friendsSum'
21 21
   }, {
22 22
     title: '朋友圈分享',
23 23
     key: 'momentsSum'
@@ -32,17 +32,24 @@ const state = reactive({
32 32
   // showPicker: false,
33 33
   date: [],
34 34
   isVisible: false,
35
-  currentDate: ''
35
+  currentDate: dayjs().format('YYYY-MM-DD')
36 36
 })
37 37
 
38 38
 const openSwitch = param => {
39 39
   state[`${param}`] = true;
40
+  state.date = [
41
+    dayjs().format('YYYY-MM-DD'),  dayjs().format('YYYY-MM-DD')
42
+  ]
40 43
 };
41 44
 const closeSwitch = param => {
42 45
   state[`${param}`] = false;
46
+  state.date = []
43 47
 };
44 48
 const setChooseValue= param => {
45 49
   state.date = [...[param[0][3], param[1][3]]];
50
+  if (state.date.length > 0) {
51
+    loadList(state.date[0], state.date[1])
52
+  }
46 53
 };
47 54
 const select = (param: string) => {
48 55
   console.log(param);
@@ -52,6 +59,8 @@ const show = ref(false);
52 59
 const popupConfirm = ({ selectedValue, selectedOptions })=>{
53 60
   popupDesc.value = selectedOptions.map((val: any) => val.text).join('');
54 61
   show.value = false;
62
+  // console.log(popupDesc.value)
63
+
55 64
 }
56 65
 onLoad((option) => {
57 66
   if (userStore.uid) {
@@ -62,10 +71,28 @@ onLoad((option) => {
62 71
     }).then(res => {
63 72
       state.ctr = res.ctr
64 73
       state.buy = res.buy
74
+      console.log(res.pageInfo.list)
65 75
       state.data = res.pageInfo.list
66 76
     })
67 77
   }
68 78
 })
79
+
80
+function loadList(start_time: string, end_time: string) {
81
+  if (userStore.uid) {
82
+
83
+    getUserShareProductList({
84
+      uid: userStore.uid,
85
+      pageNum: 1,
86
+      pageSize: 20,
87
+      start_time,
88
+      end_time,
89
+    }).then(res => {
90
+      state.ctr = res.ctr
91
+      state.buy = res.buy
92
+      state.data = res.pageInfo.list
93
+    })
94
+  }
95
+}
69 96
 </script>
70 97
 
71 98
 <template>
@@ -76,12 +103,12 @@ onLoad((option) => {
76 103
       <div class="flex justify-around py-8">
77 104
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
78 105
           <div class="text-[11px] text-gray">商品点击率</div>
79
-          <div class="font-bold text-[20px]">{{ state.ctr }}%</div>
106
+          <div class="font-bold text-[20px]">{{ state.ctr ? state.ctr : '0.00' }}%</div>
80 107
         </div>
81 108
 
82 109
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
83 110
           <div class="text-[11px] text-gray">商品购买率</div>
84
-          <div class="font-bold text-[20px]">{{ state.buy }}%</div>
111
+          <div class="font-bold text-[20px]">{{ state.buy ? state.buy : '0.00' }}%</div>
85 112
         </div>
86 113
       </div>
87 114
     </div>
@@ -110,7 +137,7 @@ onLoad((option) => {
110 137
         v-model:visible="state.isVisible"
111 138
         :default-value="state.date"
112 139
         type="range"
113
-        :start-date="`2017-12-22`"
140
+        :start-date="`2017-01-01`"
114 141
         @close="closeSwitch('isVisible')"
115 142
         @choose="setChooseValue"
116 143
         @select="select"

+ 156 - 12
src/pages/store/home/components/MerchantHeader.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2
-  <div class="bg-light rounded-lg p-3 text-sm flex flex-col gap-4">
3
-    <div class="flex flex-row justify-between items-center">
2
+  <div class="bg-[#ededed] rounded-lg p-4 text-sm flex flex-col gap-4">
3
+    <div v-if="!isSearchHome" class="flex flex-row justify-between items-center">
4 4
       <div class="flex flex-row gap-3">
5 5
         <div class="rounded bg-white w-8 h-8">
6 6
           <image :src="model.mer_avatar" mode="widthFix" class="w-full"></image>
@@ -13,16 +13,17 @@
13 13
         </div>
14 14
 
15 15
       </div>
16
+      <!--      {{props.model.care}}-->
16 17
       <div
17
-          @tap="handleRelation"
18
+          @click.stop="handleRelation"
18 19
           v-if="!isCare"
19 20
           class="rounded-full text-white bg-gradient-to-r from-[#fe0032] to-[#fe7577] w-12 h-6 text-xs text-white flex justify-center items-center px-2 gap-1">
20 21
         <div class="i-tabler-heart"></div>
21 22
         关注
22 23
       </div>
23 24
       <div
24
-          v-if="isCare"
25
-          @tap="handleRemoveRelation"
25
+          v-else
26
+          @click="handleRemoveRelation"
26 27
           class="rounded-full text-gray text-[11px] flex justify-center items-center px-2 gap-1 border border-solid border-1px border-gray w-12 h-6 ">
27 28
         已关注
28 29
       </div>
@@ -30,11 +31,58 @@
30 31
       <!--        关注-->
31 32
       <!--      </CXBButton>-->
32 33
     </div>
33
-    <div class="flex flex-row items-center">
34
-      <div class="basis-1/4 text-left">推荐</div>
35
-      <div class="basis-1/4 text-center">销量</div>
36
-      <div class="basis-1/4 text-center">上新</div>
37
-      <div class="basis-1/4 text-right">价格</div>
34
+    <div class="flex flex-row items-center"
35
+         v-if="isCategory"
36
+    >
37
+      <div class="basis-1/4 text-left cx-menu">
38
+        <nut-menu>
39
+          <template #icon>
40
+            <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2"></image>
41
+          </template>
42
+          <nut-menu-item v-model="state.menuDefaultValue"
43
+                         :options="state.options"
44
+                         @change="handleProductTypeChange"
45
+          >
46
+
47
+          </nut-menu-item>
48
+        </nut-menu>
49
+      </div>
50
+        <div
51
+            @click="handleProductTypeChange(2)"
52
+            class="basis-1/4 text-center"
53
+            :class="state.currentSelected === 2 ? 'text-primary font-bold' : ''"
54
+        >销量</div>
55
+        <div
56
+            @click="handleProductTypeChange(3)"
57
+            :class="state.currentSelected === 3 ? 'text-primary font-bold' : ''"
58
+            class="basis-1/4 text-center">上新</div>
59
+        <div
60
+            @click="handleOrderPrice(state.priceType)"
61
+            class="basis-1/4 text-right">
62
+          <div class="flex flex-row justify-center items-center gap-1">
63
+            <div
64
+                :class="state.order ? 'text-primary font-bold' : ''"
65
+            >
66
+              价格
67
+            </div>
68
+            <div class="flex flex-col justify-center items-center">
69
+              <div v-if="!state.order"  class="h-fit flex flex-col items-center">
70
+                <image :src="upDefaultImg" mode="widthFix" class="w-2 h-2"></image>
71
+                <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2"></image>
72
+              </div>
73
+              <div v-if="state.order"  class="h-fit flex flex-col items-center">
74
+                <image :src="upRedImg" mode="widthFix" class="w-2 h-2" v-if="state.priceType === 1"></image>
75
+                <image :src="upDefaultImg" mode="widthFix" class="w-2 h-2" v-else></image>
76
+
77
+                <image :src="downRedImg" mode="widthFix" class="w-2 h-2" v-if="state.priceType === 0"></image>
78
+                <image :src="downDefaultImg" mode="widthFix" class="w-2 h-2" v-else></image>
79
+
80
+              </div>
81
+
82
+            </div>
83
+          </div>
84
+
85
+        </div>
38 86
     </div>
39 87
 
40 88
   </div>
@@ -45,15 +93,79 @@ import type {PropType} from "vue";
45 93
 import {MerchantDetailModel} from "~/apis/model/storeModel";
46 94
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
47 95
 import {relation, removeMyRelation} from "~/apis/user";
96
+import amapWx from "~/libs/amap-wx";
97
+import {getMerchantDetail} from "~/apis/merchant";
98
+import {CDN_URL} from "~/config/app";
99
+const upDefaultImg = CDN_URL + '/static/assets/tuijian_shangla.png'
100
+const downDefaultImg = CDN_URL + '/static/assets/tuijian_xiala.png'
101
+
102
+const downRedImg = CDN_URL + '/static/assets/tuijian_xiala_red.png'
103
+const upRedImg = CDN_URL + '/static/assets/search_red_shangla_220617.png'
48 104
 
105
+const emit = defineEmits<{
106
+  (e: 'change', value: boolean): void,
107
+  (e: 'product-type-change', value: number): void,
108
+  (e: 'order-change', value: number): void
109
+}>()
49 110
 const props = defineProps({
50 111
   model: {
51 112
     type: Object as PropType<MerchantDetailModel>,
52
-    required: true
113
+  },
114
+  isCategory: {
115
+    type: Boolean,
116
+    default: true
117
+  },
118
+  isSearchHome: {
119
+    type: Boolean,
120
+    default: false
53 121
   }
54 122
 })
55 123
 
56
-const isCare = ref(props.model.care)
124
+const isCare = ref()
125
+if (props.model && props.model.care) {
126
+  isCare.value = props.model.care
127
+}
128
+
129
+const state = reactive({
130
+  options: [{
131
+    text: '推荐',
132
+    value: 1
133
+  }, {
134
+    text: '大仓商品',
135
+    value: 7,
136
+  }, {
137
+    text: '平台商品',
138
+    value: 6,
139
+  }],
140
+  menuDefaultValue: 1,
141
+  currentSelected: 1,
142
+  order: false,
143
+  priceType: 0
144
+})
145
+function handleOrderPrice(val) {
146
+  // state.order = !state.order
147
+  state.currentSelected = NaN
148
+  state.order = true
149
+  if (val === 0) {
150
+    state.priceType = 1
151
+  } else {
152
+    state.priceType = 0
153
+  }
154
+  emit('order-change', state.priceType)
155
+}
156
+function handleProductTypeChange(value) {
157
+  state.order = false
158
+
159
+  state.currentSelected = value
160
+  emit('product-type-change', value)
161
+}
162
+watch(() => props.model, (val) => {
163
+  console.log(val)
164
+  isCare.value = val.care
165
+}, {
166
+  deep: true
167
+})
168
+
57 169
 function handleRelation() {
58 170
   relation({
59 171
     type: '10',
@@ -63,6 +175,12 @@ function handleRelation() {
63 175
     uni.showToast({
64 176
       title: '已关注'
65 177
     })
178
+    // getMerchantDetail(props.model.mer_id).then((res: any) => {
179
+    //   // merchant.value = {...res}
180
+    //   console.log(res)
181
+    // })
182
+    emit('change', true)
183
+
66 184
   }).catch(error => {
67 185
     if (error === '请登录') {
68 186
       uni.navigateTo({
@@ -73,11 +191,37 @@ function handleRelation() {
73 191
 }
74 192
 
75 193
 function handleRemoveRelation() {
194
+  console.log('on....')
76 195
   removeMyRelation({type: 10, type_id: props.model.mer_id}).then(res => {
77 196
     isCare.value = false
78 197
     uni.showToast({
79 198
       title: '取消关注'
80 199
     })
200
+    emit('change', true)
201
+
81 202
   })
82 203
 }
83 204
 </script>
205
+<style lang="scss">
206
+
207
+//.nut-menu .nut-menu__bar{
208
+//  --nut-white: transparent;
209
+//  background-color: #008be8 !important;
210
+//}
211
+//
212
+:deep(.nut-menu__bar) {
213
+  --nut-white: none;
214
+  background: none;
215
+  background-color: transparent !important;
216
+}
217
+
218
+page {
219
+
220
+  //background: transparent;
221
+  --nut-menu-item-font-size: 14px;
222
+  --nut-menu-bar-line-height: 24px;
223
+  --nut-menu-bar-box-shadow: none;
224
+  --nut-menu-item-active-text-color: #FE0032;
225
+  --nut-white: #ededed;
226
+}
227
+</style>

+ 1 - 1
src/pages/store/home/components/MerchantProductCard.vue

@@ -54,7 +54,7 @@ const props = defineProps({
54 54
         {{item.store_name}}
55 55
       </div>
56 56
       <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
57
-        <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
57
+        <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
58 58
                mode="widthFix" class="!w-8.5"></image>
59 59
         <div class="px-2 flex items-center jusitify-center text-xs">
60 60
           <div>

+ 1 - 1
src/pages/store/home/components/MerchantProductList.vue

@@ -21,7 +21,7 @@ function handleItemClick (item) {
21 21
 </script>
22 22
 <template>
23 23
   <!--  <scroll-view type="custom">-->
24
-  <div  class="pb-safe" v-if="list && list.length > 0">
24
+  <div  class="" v-if="list && list.length > 0">
25 25
     <grid-view type="masonry" cross-axis-count="2" 	cross-axis-gap="10px" main-axis-gap="10px">
26 26
       <div v-for="(item, index) in list"
27 27
            :key="index"

+ 250 - 35
src/pages/store/home/index.vue

@@ -1,10 +1,14 @@
1 1
 <script lang="ts" setup>
2
-import {getMerchantCategory, getMerchantDetail, getProductList} from "~/apis/merchant";
2
+import {getMerchantCategory, getMerchantDetail} from "~/apis/merchant";
3 3
 import type {MerchantModel} from "~/apis/model/storeModel";
4 4
 import type {Ref} from "vue";
5 5
 import MerchantHeader from "~/pages/store/home/components/MerchantHeader.vue";
6 6
 import MerchantProductList from "~/pages/store/home/components/MerchantProductList.vue";
7 7
 import type {MerchantCategoryModel} from "~/apis/model/storeModel";
8
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
9
+import {searchProductList} from "~/apis/product";
10
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
11
+import FSearch from "~/components/FSearch/FSearch.vue";
8 12
 
9 13
 let merchant: Ref<MerchantModel> = ref<MerchantModel>({
10 14
   mer_id: NaN,
@@ -16,27 +20,132 @@ let merchant: Ref<MerchantModel> = ref<MerchantModel>({
16 20
   service_phone: '',
17 21
   sales: NaN,
18 22
   care_count: NaN,
23
+
24
+})
25
+
26
+const state = reactive({
27
+  keyword: '',
28
+
29
+  status: 'noMore',
30
+  triggered: false,
31
+  priceType: NaN,
32
+  sales: NaN,
33
+  is_new: NaN,
34
+  type: 1,
35
+  currentPage: 1,
36
+  pageSize: 10,
37
+  totalPage: 1
19 38
 })
20
-let productList: any[] = ref<any>([])
39
+const id = ref('')
40
+let productList = ref<any>([])
41
+
21 42
 const categoryList = ref<Array<MerchantCategoryModel>>()
43
+
22 44
 onLoad((options: any) => {
23 45
   if (options.id) {
24
-    const id = options.id
25
-    getMerchantDetail(id).then((res: any) => {
46
+    // console.log(options.id)
47
+    id.value = options.id
48
+    getMerchantDetail(id.value).then((res: any) => {
26 49
       merchant.value = {...res}
50
+      console.log(res)
27 51
     })
28 52
 
29
-    getProductList(id).then((res: any) => {
30
-      productList.value = res.list
31
-    })
32
-
33
-    getMerchantCategory(id).then(res => {
53
+    // 148 专用
54
+    // getProductList(id.value).then((res: any) => {
55
+    //   productList.value = res.list
56
+    // })
57
+    //
58
+    getMerchantCategory(id.value).then(res => {
34 59
       categoryList.value = res
35 60
       // console.log(res)
36 61
     })
62
+
63
+    loadList('reload')
64
+    // getStoreProductList()
37 65
   }
38 66
 })
39 67
 
68
+
69
+// function searchProduct() {
70
+//   searchProductList({
71
+//     mer_id: id.value
72
+//   })
73
+// }
74
+function handleProductTypeChange(typeValue) {
75
+  if (typeValue === 3) {
76
+    state.sales = NaN
77
+    state.is_new = 0
78
+  }
79
+  else if (typeValue === 2) {
80
+    state.sales = 0
81
+  } else {
82
+    state.type = typeValue
83
+  }
84
+  loadList('reload')
85
+}
86
+function handleOrderChange(priceType) {
87
+  state.priceType = priceType
88
+
89
+  // reset
90
+  state.sales = NaN
91
+  state.is_new =NaN
92
+
93
+  loadList('reload')
94
+}
95
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
96
+  const params = {
97
+    mer_id: id.value,
98
+    // mer_keyword: '',
99
+    pageNum: state.currentPage,
100
+    pageSize: state.pageSize,
101
+    // mer_id?: string
102
+    // mer_keyword?: string
103
+    // pageNum: number
104
+    // pageSize: number
105
+    // order: ORDER
106
+    //请求类别,推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7;
107
+    // is_best?: number
108
+    // sales?: number
109
+    // is_new?: number
110
+    // priceType?: number
111
+    // type?: number
112
+    // category_id?: string
113
+  }
114
+  if (state.type) {
115
+    params.type = state.type
116
+  }
117
+  if (state.sales === 0) {
118
+    params.sales = state.sales
119
+  }
120
+  if (state.is_new === 0) {
121
+    params.is_new = state.is_new
122
+  }
123
+  if (state.priceType) {
124
+    params.priceType = state.priceType
125
+  }
126
+  if (action === 'reload') {
127
+    params.pageNum = 1
128
+  }
129
+  searchProductList({
130
+    ...params
131
+  }).then(res => {
132
+    state.triggered = false
133
+    if (action === 'page') {
134
+      productList.value = productList.value.contact(res.pageInfo.list)
135
+    }
136
+    if (action === 'reload') {
137
+      productList.value = res.pageInfo.list
138
+    }
139
+    console.log(res.pageInfo)
140
+    state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
141
+    state.status = 'more'
142
+
143
+
144
+    if (callback) {
145
+      callback(res.pageInfo.list)
146
+    }
147
+  })
148
+}
40 149
 const navList = [{
41 150
   id: 1,
42 151
   text: '首页',
@@ -54,41 +163,145 @@ function handleNavItemClick(navItemId: any) {
54 163
   }
55 164
 }
56 165
 
166
+function handleFavoriteChange() {
167
+  getMerchantDetail(id.value).then((res: any) => {
168
+    merchant.value = {...res}
169
+  })
170
+}
171
+
172
+function handleScrollToLower() {
173
+  state.status = 'loading';
174
+  state.currentPage += 1;
175
+  console.log(state.totalPage)
176
+  if (state.currentPage > state.totalPage) {
177
+    state.status = 'noMore';
178
+  } else {
179
+    setTimeout(() => {
180
+      loadList('page')
181
+    }, 300)
182
+  }
183
+}
184
+
185
+onReachBottom(() => {
186
+  console.log('到底了。。。')
187
+
188
+  handleScrollToLower()
189
+
190
+})
191
+
192
+function handleOpenSearchPage(category?: {}) {
193
+  let url = `/pages/store/home/search?id=${id.value}`
194
+  if (category) {
195
+    // url.concat(`$category_id=${category_id}`)
196
+    url = url + `&category=${JSON.stringify(category)}`
197
+  }
198
+  uni.navigateTo({
199
+    url
200
+  })
201
+}
202
+
203
+onPullDownRefresh(() => {
204
+  loadList('reload', items => {
205
+    setTimeout(() => {
206
+      uni.stopPullDownRefresh()
207
+    }, 300)
208
+  })
209
+})
57 210
 </script>
58 211
 <template>
59
-  <div class="px-3 pb-safe pb-10">
60
-    <MerchantHeader :model="merchant"/>
61
-    <MerchantProductList
62
-        :list="productList"
63
-        v-if="currentItemId === 1"
64
-    />
65
-    <div v-if="currentItemId === 2"
66
-         class="w-full gap-3"
67
-    >
68
-      <div v-for="(categoryItem, index) in categoryList" :key="index"
69
-           class="flex items-center gap-1 text-sm font-bold bg-white p-3 mb-3 rounded"
70
-      >
71
-        <div class=" bg-gradient-to-b from-[#fe7577] to-[#fe0032] w-1 h-4 rounded"></div>
72
-        {{ categoryItem.cate_name }}
212
+    <div class="fixed top-0 w-full bg-white z-1">
213
+      <div class="p-3">
214
+        <div
215
+            @click="handleOpenSearchPage"
216
+
217
+            class="w-full bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-gray-200"
218
+
219
+        >
220
+
221
+          <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
222
+                 mode="widthFix"
223
+                 class="w-4 h-4  pl-2 py-1"
224
+          ></image>
225
+          <div class="flex flex-1 w-100%">
226
+            <div class="flex-1"></div>
227
+          </div>
228
+
229
+
230
+        </div>
231
+
73 232
       </div>
233
+<!--      <nut-searchbar-->
234
+<!--          v-model="searchValue" @search="loadSelectMerchant('reload')" @clear="loadSelectMerchant( 'reload')">-->
235
+<!--        <template v-slot:rightout>-->
236
+<!--          <div @tap="loadSelectMerchant('reload')">-->
237
+<!--            搜索-->
238
+<!--          </div>-->
239
+<!--        </template>-->
240
+<!--      </nut-searchbar>-->
74 241
     </div>
75
-  </div>
76
-  <div class="fixed bottom-0 bg-white w-full">
77
-    <div class="pb-safe pt-1 shadow flex justify-around text-gray">
242
+
243
+    <div class="px-3 pb-25 mt-15 flex flex-col gap-3">
244
+      <MerchantHeader
245
+          :model="merchant"
246
+          @change="handleFavoriteChange"
247
+          @product-type-change="handleProductTypeChange"
248
+          @order-change="handleOrderChange"
249
+          :is-category="  currentItemId === 1"
250
+      />
78 251
       <div
79
-          @tap="handleNavItemClick(item.id)"
80
-          v-for="(item, index) in navList"
81
-          :key="item.id"
82
-          class="flex flex-col justify-center items-center gap-1"
83
-          :class="item.id === currentItemId ? '!text-[#fe0032]' : ''"
252
+          v-if="currentItemId === 1"
253
+
254
+      >
255
+        <MerchantProductList
256
+            :list="productList"
257
+            v-if="productList.length > 0"
258
+        />
259
+        <CXBEmpty v-else/>
260
+
261
+        <div class=" flex justify-center items-center text-[12px] text-gray-500" v-if="productList && productList.length > 0">
262
+          <div v-if="state.status === 'loading'">
263
+            加载中...
264
+          </div>
265
+          <div v-if="state.status === 'noMore'">
266
+            没有更多了~
267
+          </div>
268
+        </div>
269
+      </div>
270
+
271
+      <div v-if="currentItemId === 2"
272
+           class="w-full gap-3"
84 273
       >
85
-        <div :class="item.icon"></div>
86
-        <div class="text-xs">
87
-          {{ item.text }}
274
+        <div v-for="(categoryItem, index) in categoryList" :key="index"
275
+             @click="handleOpenSearchPage(categoryItem)"
276
+             class="flex items-center gap-1 text-sm font-bold bg-white p-3 mb-3 rounded"
277
+        >
278
+          <div class=" bg-gradient-to-b from-[#fe7577] to-[#fe0032] w-1 h-4 rounded"></div>
279
+          {{ categoryItem.cate_name }}
88 280
         </div>
89 281
       </div>
282
+
90 283
     </div>
91
-  </div>
284
+
285
+
286
+    <div class="fixed bottom-0 bg-white w-full">
287
+      <div class="pb-safe pt-1 shadow flex justify-around text-gray">
288
+        <div
289
+            @tap="handleNavItemClick(item.id)"
290
+            v-for="(item, index) in navList"
291
+            :key="item.id"
292
+            class="flex flex-col justify-center items-center gap-1"
293
+            :class="item.id === currentItemId ? '!text-[#fe0032]' : ''"
294
+        >
295
+          <div :class="item.icon"></div>
296
+          <div class="text-xs">
297
+            {{ item.text }}
298
+          </div>
299
+        </div>
300
+      </div>
301
+    </div>
302
+
303
+
304
+
92 305
 </template>
93 306
 <route lang="yaml">
94 307
 style:
@@ -100,6 +313,8 @@ style:
100 313
 <style>
101 314
 page {
102 315
   background-color: #f8f8f8;
316
+  --nut-searchbar-background: #fff;
317
+  --nut-searchbar-input-box-shadow: none;
103 318
 }
104 319
 
105 320
 </style>

+ 214 - 0
src/pages/store/home/search.vue

@@ -0,0 +1,214 @@
1
+<script setup lang="ts">
2
+// const props = defineProps({
3
+//   keyword: {
4
+//     type
5
+//   }
6
+// })
7
+import MerchantHeader from "~/pages/store/home/components/MerchantHeader.vue";
8
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9
+import MerchantProductList from "~/pages/store/home/components/MerchantProductList.vue";
10
+import {getMerchantCategory, getMerchantDetail} from "~/apis/merchant";
11
+import {searchProductList} from "~/apis/product";
12
+
13
+const state = reactive({
14
+  category_id: '',
15
+  mer_keyword: '',
16
+  category: null,
17
+  status: 'noMore',
18
+  triggered: false,
19
+  priceType: NaN,
20
+  sales: NaN,
21
+  is_new: NaN,
22
+  type: 1,
23
+  currentPage: 1,
24
+  pageSize: 10,
25
+  totalPage: 1,
26
+
27
+  searchValue: ''
28
+})
29
+
30
+let productList = ref<any>([])
31
+const id = ref('')
32
+
33
+onLoad((options) => {
34
+  console.log(options)
35
+  if (options && options.keyword) {
36
+    state.mer_keyword = options.mer_keyword
37
+  }
38
+  if (options && options.category) {
39
+    // state.category_id = options.category_id
40
+    state.category = JSON.parse(options.category)
41
+    console.log(state.category)
42
+    state.category_id = state.category.store_category_id
43
+    state.searchValue = state.category.cate_name
44
+  }
45
+
46
+  if (options.id) {
47
+    id.value = options.id
48
+    loadList('reload')
49
+  }
50
+
51
+})
52
+
53
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
54
+  const params = {
55
+    mer_id: id.value,
56
+    // mer_keyword: '',
57
+    pageNum: state.currentPage,
58
+    pageSize: state.pageSize,
59
+    // mer_id?: string
60
+    // mer_keyword?: string
61
+    // pageNum: number
62
+    // pageSize: number
63
+    // order: ORDER
64
+    //请求类别,推荐:1;销量:2;上新3;价格升序4,价格降序5;平台商品6;大仓商品7;
65
+    // is_best?: number
66
+    // sales?: number
67
+    // is_new?: number
68
+    // priceType?: number
69
+    // type?: number
70
+    // category_id?: string
71
+  }
72
+  if (state.type) {
73
+    params.type = state.type
74
+  }
75
+  if (state.sales === 0) {
76
+    params.sales = state.sales
77
+  }
78
+  if (state.is_new === 0) {
79
+    params.is_new = state.is_new
80
+  }
81
+  if (state.priceType) {
82
+    params.priceType = state.priceType
83
+  }
84
+  if (state.category_id) {
85
+    params.category_id = state.category_id
86
+  }
87
+
88
+  if (state.searchValue) {
89
+    params.mer_keyword = state.searchValue
90
+  }
91
+  if (action === 'reload') {
92
+    params.pageNum = 1
93
+  }
94
+
95
+  searchProductList({
96
+    ...params
97
+  }).then(res => {
98
+    state.triggered = false
99
+    if (action === 'page') {
100
+      productList.value = productList.value.contact(res.pageInfo.list)
101
+    }
102
+    if (action === 'reload') {
103
+      productList.value = res.pageInfo.list
104
+    }
105
+    console.log(res.pageInfo)
106
+    state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
107
+    state.status = 'more'
108
+
109
+
110
+    if (callback) {
111
+      callback(res.pageInfo.list)
112
+    }
113
+  })
114
+}
115
+
116
+function handleScrollToLower() {
117
+  state.status = 'loading';
118
+  state.currentPage += 1;
119
+  console.log(state.totalPage)
120
+  if (state.currentPage > state.totalPage) {
121
+    state.status = 'noMore';
122
+  } else {
123
+    setTimeout(() => {
124
+      loadList('page')
125
+    }, 300)
126
+  }
127
+}
128
+
129
+onReachBottom(() => {
130
+  handleScrollToLower()
131
+
132
+})
133
+
134
+onPullDownRefresh(() => {
135
+  loadList('reload', items => {
136
+    setTimeout(() => {
137
+      uni.stopPullDownRefresh()
138
+    }, 300)
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
+})
150
+
151
+function handleProductTypeChange(typeValue) {
152
+  if (typeValue === 3) {
153
+    state.sales = NaN
154
+    state.is_new = 0
155
+  }
156
+  else if (typeValue === 2) {
157
+    state.sales = 0
158
+  } else {
159
+    state.type = typeValue
160
+  }
161
+  loadList('reload')
162
+}
163
+function handleOrderChange(priceType) {
164
+  state.priceType = priceType
165
+
166
+  // reset
167
+  state.sales = NaN
168
+  state.is_new =NaN
169
+
170
+  loadList('reload')
171
+}
172
+</script>
173
+<template>
174
+  <div class="fixed top-0 w-full bg-white z-1">
175
+    <nut-searchbar
176
+        v-model="state.searchValue" @search="loadList('reload')" @clear="loadList( 'reload')">
177
+      <template v-slot:rightout>
178
+        <div @tap="loadList('reload')">
179
+          搜索
180
+        </div>
181
+      </template>
182
+    </nut-searchbar>
183
+  </div>
184
+
185
+  <div class="p-3 pb-25 mt-15 flex flex-col gap-3">
186
+<!--    <MerchantHeader -->
187
+    <MerchantHeader :is-search-home="true"
188
+                    @product-type-change="handleProductTypeChange"
189
+                    @order-change="handleOrderChange"
190
+    />
191
+    <MerchantProductList
192
+        :list="productList"
193
+        v-if="productList.length > 0"
194
+
195
+    />
196
+    <CXBEmpty v-else/>
197
+  </div>
198
+</template>
199
+
200
+<route lang="yaml">
201
+style:
202
+  navigationBarTitleText: 搜索
203
+  enablePullDownRefresh: true
204
+</route>
205
+
206
+
207
+<style>
208
+page {
209
+  background-color: #f8f8f8;
210
+  --nut-searchbar-background: #fff;
211
+  --nut-searchbar-input-box-shadow: none;
212
+}
213
+
214
+</style>

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

@@ -2,6 +2,7 @@
2 2
 import {getMerchantCategory, getSelectMerchant, getSelectMerchantSort} from "~/apis/merchant";
3 3
 import type {StoreResult} from "~/apis/model/storeModel";
4 4
 import {StoreParams} from "~/apis/model/storeModel";
5
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5 6
 
6 7
 const state = reactive<any>({
7 8
   // 列表高度
@@ -87,6 +88,8 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
87 88
     if (action === 'reload') {
88 89
       state.merchantList = res.list
89 90
     }
91
+    // state.totalPage = Math.ceil(totalItems / state.pageSize);
92
+
90 93
     state.status = 'more'
91 94
 
92 95
     if (callback) {
@@ -96,6 +99,7 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
96 99
 }
97 100
 
98 101
 function handleShowMerchant(merchant) {
102
+  console.log(merchant)
99 103
   uni.navigateTo({
100 104
     url: '/pages/store/home/index?id=' + merchant.mer_id
101 105
   })
@@ -130,6 +134,7 @@ function handleScrollToLower() {
130 134
     loadSelectMerchant('page')
131 135
   }
132 136
 }
137
+
133 138
 </script>
134 139
 <template>
135 140
 <!--  <nut-category :category="state.merchantCategory" @change="change">-->
@@ -138,9 +143,9 @@ function handleScrollToLower() {
138 143
 <!--  </nut-category>-->
139 144
     <nut-searchbar
140 145
         class="absolute top-0"
141
-        v-model="searchValue" @search="loadSelectMerchant(0, searchValue)" @clear="loadSelectMerchant(0, '')">
146
+        v-model="searchValue" @search="loadSelectMerchant('reload')" @clear="loadSelectMerchant( 'reload')">
142 147
       <template v-slot:rightout>
143
-        <div @tap="loadSelectMerchant(0, searchValue)">
148
+        <div @tap="loadSelectMerchant('reload')">
144 149
           搜索
145 150
         </div>
146 151
       </template>
@@ -151,12 +156,12 @@ function handleScrollToLower() {
151 156
     <scroll-view
152 157
         :scroll-y="true"
153 158
         :style="{ height: `${state.scrollHeight}px` }"
154
-        class="flex w-40 h-full bg-[#f8f8f8]"
159
+        class="w-25 h-full bg-[#f8f8f8]"
155 160
     >
156 161
       <div
157 162
           @tap="loadAll()"
158 163
           :class="state.currentMerchantCategoryId == 0 ? 'bg-white font-bold' : ''"
159
-          class="relative h-15 block text-sm flex justify-center items-center">
164
+          class="relative w-25 h-15 block text-sm flex justify-center items-center">
160 165
         <div class="flex items-center gap-1">
161 166
           <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == 0"></div>
162 167
           <div>全部</div>
@@ -166,7 +171,7 @@ function handleScrollToLower() {
166 171
       <div v-for="(item, index) in state.merchantCategory" :key="index"
167 172
            @tap="handleCategoryChange(item)"
168 173
            :class="state.currentMerchantCategoryId == item.merchant_category_id ? 'bg-white font-bold' : ''"
169
-           class="relative h-15 block text-sm flex justify-center items-center gap-1"
174
+           class="relative h-15 block text-sm flex justify-center items-center gap-1 w-25"
170 175
       >
171 176
         <div class="h-4 bg-primary w-1" v-if="state.currentMerchantCategoryId == item.merchant_category_id"></div>
172 177
 
@@ -183,7 +188,7 @@ function handleScrollToLower() {
183 188
         :scroll-y="true"
184 189
         :style="{ height: `${state.scrollHeight}px` }"
185 190
         scroll-with-animation
186
-        class="flex flex-1  flex-col h-full  p-3 gap-3"
191
+        class="flex flex-1  flex-col h-full w-full  p-3 gap-3"
187 192
         :refresher-enabled="true"
188 193
         refresher-background="#f5f5f5"
189 194
         refresher-default-style="black"
@@ -193,6 +198,7 @@ function handleScrollToLower() {
193 198
         @refresherRestore="onRefresherRestore"
194 199
         @refresherAbort="onRefresherAbort"
195 200
         @refresherrefresh="onRefresherRefresh"
201
+        v-if="state.merchantList && state.merchantList.length > 0"
196 202
 
197 203
     >
198 204
       <div
@@ -223,6 +229,10 @@ function handleScrollToLower() {
223 229
         </div>
224 230
       </div>
225 231
     </scroll-view>
232
+    <div class="flex-1 justify-center items-center" v-else>
233
+      <CXBEmpty />
234
+
235
+    </div>
226 236
   </div>
227 237
 </template>
228 238
 <route lang="yaml">

+ 253 - 40
src/pages/store/product/detail.vue

@@ -6,9 +6,27 @@ import FCell from "~/components/FCell/FCell.vue";
6 6
 import type {SkuModel} from "~/apis/model/product.model";
7 7
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
8 8
 import {createShopping} from "~/apis/order.api";
9
-import {getCartCount} from "~/apis/user";
10
-
9
+import {getAgentInfo, getCartCount, relation, removeMyRelation} from "~/apis/user";
10
+import {
11
+  DyProductModel,
12
+  JdProductModel,
13
+  SuNingProductModel,
14
+  TaobaoProductThirdPartyWaresModel, VipProductModel
15
+} from "~/apis/model/product.model";
16
+import {DcProductModel} from "~/apis/model/dacang.model";
17
+import {CDN_URL} from "~/config/app";
18
+
19
+const shangpinxiangqing_dianpu = CDN_URL + '/static/assets/shangpinxiangqing_dianpu.png'
20
+const shangpinxiangqing_kefu = CDN_URL + '/static/assets/shangpinxiangqing_kefu.png'
21
+const shangpinxiangqing_gouwuche = CDN_URL + '/static/assets/shangpinxiangqing_gouwuche.png'
22
+const wx_shareImg = CDN_URL + '/static/assets/wx_share_221121.png'
23
+const pyqImg = CDN_URL + '/static/assets/pyq_221121.png'
24
+
25
+const shareShowTips = ref(false)
11 26
 const state = reactive({
27
+  id: '',
28
+  // 是否收藏
29
+  isRelation: false,
12 30
   indicatorDots: true,
13 31
   circular: true,
14 32
   autoplay: true,
@@ -27,7 +45,8 @@ const state = reactive({
27 45
     imagePath:
28 46
         '//img14.360buyimg.com/n4/jfs/t1/215845/12/3788/221990/618a5c4dEc71cb4c7/7bd6eb8d17830991.jpg'
29 47
   },
30
-
48
+//1表示立即购买;2表示加入购物车,3表示立即兑换
49
+  flag: '1',
31 50
   isNew: '0',
32 51
   cartNum: 1,
33 52
 
@@ -40,17 +59,35 @@ onShow(() => {
40 59
 
41 60
 })
42 61
 
62
+uni.showShareMenu({
63
+  withShareTicket: true,
64
+  menus: ['shareAppMessage', 'shareTimeline']
65
+})
43 66
 onLoad((option: any) => {
44 67
   // const id = '5491'
45
-  const id = option.id
46
-  getProductDetail(id).then(res => {
47
-    console.log(res)
68
+  state.id = option.id
69
+
70
+
71
+  getRecommendList({
72
+    page: 1,
73
+    limit: 10
74
+  }).then(res => {
75
+    state.recommendList = res.list
76
+  })
77
+
78
+  loadProductDetail()
79
+})
80
+
81
+function loadProductDetail() {
82
+  getProductDetail(state.id).then(res => {
83
+    // console.log(res)
48 84
     detail.value = res
49 85
     if (res && res.mer_id && res.mer_id === '148') {
50 86
       if (detail.value && detail.value.price ) {
51 87
         detail.value.price = detail.value.price * 30
52 88
       }
53 89
     }
90
+    state.isRelation = res.isRelation
54 91
     // if (detail.value.mer_id === '148') {
55 92
     // }
56 93
   }).catch(error => {
@@ -64,17 +101,23 @@ onLoad((option: any) => {
64 101
       }, 500)
65 102
     })
66 103
   })
104
+}
67 105
 
68
-  getRecommendList({
69
-    page: 1,
70
-    limit: 10
71
-  }).then(res => {
72
-    state.recommendList = res.list
73
-  })
74
-
106
+onShareAppMessage(() => {
107
+  return {
108
+    title: `${detail.value.store_name}`,
109
+    path: `pages/store/product/detail?id=${state.id}&from=share`
110
+  }
111
+})
75 112
 
113
+onShareTimeline(() => {
114
+  return {
115
+    title: `${detail.value.store_name}`,
116
+    query: `id=${state.id}&from=share`
117
+  }
76 118
 })
77 119
 
120
+
78 121
 function loadCartCount() {
79 122
   getCartCount().then(res => {
80 123
     console.log(res)
@@ -103,7 +146,7 @@ function loadCartCount() {
103 146
 //   }
104 147
 // })
105 148
 const is148Merchant = computed(() => {
106
-  return detail.value && detail.value.mer_id && detail.value.mer_id === '148'
149
+  return detail.value && detail.value.mer_id && detail.value.mer_id == '148'
107 150
 })
108 151
 //预览轮播图
109 152
 function previewImage(index: number) {
@@ -136,21 +179,25 @@ function onSelectedSku(item) {
136 179
 
137 180
 function handleAddCart() {
138 181
   state.isShowSku = true
182
+  state.flag = 2
183
+
139 184
 
140 185
 }
141 186
 
142 187
 function handleCreateShopping() {
188
+  console.log(state.flag)
143 189
   createShopping({
144 190
     product_id: detail.value.product_id,
145 191
     // product_attr_unique: JSON.stringify(state.currentSku),
146 192
     product_attr_unique: state.currentSku.unique,
147 193
     cart_num: state.cartNum,
148
-    is_new: state.isNew
194
+    is_new: (state.flag === '1' || state.flag === '3') ? '1': '0'
149 195
   }).then(res => {
150 196
     if (res.cart_id) {
151
-      if (state.isNew === '1') {
197
+      console.log(state.flag)
198
+      if (state.flag == '1' || state.flag == '3') {
152 199
         uni.navigateTo({
153
-          url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=1&product_id=${detail.value.product_id}`
200
+          url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=${state.flag}&product_id=${detail.value.product_id}`
154 201
         })
155 202
       } else {
156 203
         uni.showToast({
@@ -162,19 +209,39 @@ function handleCreateShopping() {
162 209
       }
163 210
     }
164 211
   }).catch(error => {
165
-    uni.navigateTo({
166
-      url: '/pages/user/login/index'
167
-    })
168
-    // uni.showToast({
169
-    //   title: error,
170
-    //   icon: 'none'
171
-    // })
212
+    if (error === '会员礼包不能加入购物车') {
213
+      return uni.showToast({
214
+        title: error,
215
+        icon: 'none'
216
+      })
217
+    } else if (error === '库存不足')  {
218
+      return uni.showToast({
219
+        title: error,
220
+        icon: 'none'
221
+      })
222
+    }
223
+    else {
224
+      return uni.navigateTo({
225
+        url: '/pages/user/login/index'
226
+      })
227
+    }
228
+
172 229
   })
173 230
 }
174 231
 
175
-function handleOrderConfirm() {
232
+/**
233
+ *
234
+ * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
235
+ */
236
+function handleOrderConfirm(flag: '1' | '2'| '3') {
237
+  state.flag = flag
176 238
   state.isShowSku = true
177
-  state.isNew = '1'
239
+  // if (is148Merchant.value) {
240
+  //   state.isNew = '1'
241
+  // } else {
242
+  //   state.isNew = '3'
243
+  // }
244
+  // console.log(state.isNew)
178 245
 }
179 246
 function handleCountChange(val) {
180 247
   // console.log(val)
@@ -183,6 +250,93 @@ function handleCountChange(val) {
183 250
     state.cartNum = val
184 251
   // }
185 252
 }
253
+function handleProductItemClick(
254
+    item:
255
+        JdProductModel
256
+        & DcProductModel
257
+        & DyProductModel
258
+        & SuNingProductModel
259
+        & TaobaoProductThirdPartyWaresModel
260
+        & VipProductModel
261
+) {
262
+  // function navigateToDetail(params) {
263
+  //   let otherDetailUrl = `/pages/store/product/other`
264
+  //   return uni.navigateTo({
265
+  //     url: `${otherDetailUrl}?params=${params}`
266
+  //   })
267
+  // }
268
+  // 大仓
269
+  uni.navigateTo({
270
+    url: `/pages/store/product/detail?id=${item.product_id}`
271
+  })
272
+}
273
+
274
+function handleRelation() {
275
+  relation({
276
+    type: '1',
277
+    type_id: state.id
278
+  }).then(res => {
279
+    // isCare.value = true
280
+    uni.showToast({
281
+      title: '已收藏'
282
+    })
283
+    state.isRelation = true
284
+
285
+    // getMerchantDetail(props.model.mer_id).then((res: any) => {
286
+    //   // merchant.value = {...res}
287
+    //   console.log(res)
288
+    // })
289
+    // emit('change', true)
290
+    // loadProductDetail()
291
+
292
+  }).catch(error => {
293
+    if (error === '请登录') {
294
+      uni.navigateTo({
295
+        url: '/pages/user/login/index'
296
+      })
297
+    }
298
+  })
299
+}
300
+
301
+function handleRemoveRelation() {
302
+  console.log('on....')
303
+  removeMyRelation({type: 1, type_id: state.id}).then(res => {
304
+    // isCare.value = false
305
+    state.isRelation = false
306
+
307
+    uni.showToast({
308
+      title: '取消关注'
309
+    })
310
+    // emit('change', true)
311
+
312
+  })
313
+}
314
+
315
+function toggleRelation() {
316
+  if (state.isRelation) {
317
+    handleRemoveRelation()
318
+
319
+  } else {
320
+    handleRelation()
321
+
322
+  }
323
+}
324
+
325
+function handleShowCustomer() {
326
+  return uni.openCustomerServiceChat({
327
+    extInfo: {
328
+      url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db'
329
+    },
330
+    corpId: 'wwaeb55681929a37ae',
331
+    success: (res => {
332
+      console.log(res)
333
+    }),
334
+    fail: (res => {
335
+      console.log(res)
336
+    })
337
+  })
338
+}
339
+
186 340
 </script>
187 341
 
188 342
 <template>
@@ -204,6 +358,14 @@ function handleCountChange(val) {
204 358
           </swiper-item>
205 359
         </swiper>
206 360
       </div>
361
+      <div class="bg-black bg-op-30 fixed top-3  rounded-full right-3 h-6 w-6 flex flex-col justify-center items-center"
362
+           @click="toggleRelation"
363
+      >
364
+        <div class="h4 w-4"
365
+             :class="state.isRelation ? 'bg-primary i-tabler-star-filled' : 'i-tabler-star text-white'"
366
+
367
+        ></div>
368
+      </div>
207 369
 
208 370
       <div
209 371
           class="flex flex-col p-3 gap-3">
@@ -227,8 +389,8 @@ function handleCountChange(val) {
227 389
         <div
228 390
             v-if="!is148Merchant"
229 391
             class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
230
-          <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
231
-                 mode="widthFix" class="!w-8 "></image>
392
+          <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
393
+                 mode="widthFix" class="!w-8 h-4"></image>
232 394
           <div class="px-2 flex items-center jusitify-center" v-if="detail.yanglao">
233 395
             <div>
234 396
               养老金 ¥{{ detail.yanglao }}
@@ -249,6 +411,20 @@ function handleCountChange(val) {
249 411
           </div>
250 412
         </div>
251 413
 
414
+        <div class="flex gap-3 text-[12px]">
415
+          <div>分享:</div>
416
+          <div class="flex-1  items-center flex  " @click="shareShowTips = true">
417
+            <div class="flex gap-2 w-1/2">
418
+              <image :src="wx_shareImg" mode="widthFix" class="w-5 h-5"></image>
419
+              <div>微信</div>
420
+            </div>
421
+            <div class="flex gap-2 w-1/2">
422
+              <image :src="pyqImg" mode="widthFix" class="w-5 h-5"></image>
423
+              <div>朋友圈</div>
424
+            </div>
425
+          </div>
426
+
427
+        </div>
252 428
       </div>
253 429
     </div>
254 430
 
@@ -258,7 +434,7 @@ function handleCountChange(val) {
258 434
     >
259 435
       <template #title>
260 436
         <div class="flex items-center" v-if="state.currentSku">
261
-          <div>规格:</div>
437
+          <div class="font-bold">规格:</div>
262 438
 <!--          <div v-for="(key, index) in Object.keys(detail.sku)"-->
263 439
 <!--               :key="index"-->
264 440
 <!--               class="pl-2 text-sm"-->
@@ -352,6 +528,7 @@ function handleCountChange(val) {
352 528
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
353 529
           <div v-for="(item, index) in state.recommendList"
354 530
                :key="index"
531
+               @click="handleProductItemClick(item)"
355 532
           >
356 533
             <MerchantProductCard :item="item"/>
357 534
 
@@ -367,26 +544,33 @@ function handleCountChange(val) {
367 544
       <div class=" flex justify-around">
368 545
         <div
369 546
             @tap="handleShowMerchant(detail.mer_id)"
370
-            class="flex flex-col justify-center items-center pl-3"
547
+            class="flex flex-col justify-center items-center pl-4"
371 548
         >
372
-          <div class="i-tabler-building-store"></div>
373
-          <div class="text-xs">店铺</div>
549
+<!--          <div class="i-tabler-building-store"></div>-->
550
+          <image :src="shangpinxiangqing_dianpu" mode="widthFix" class="w-6 h-6"></image>
551
+          <div class="text-[11px]">店铺</div>
374 552
         </div>
375 553
 
376
-        <div class="flex flex-col justify-center items-center pl-3">
377
-          <div class="i-tabler-headset"></div>
378
-          <div class="text-xs">客服</div>
554
+        <div
555
+            @tap="handleShowCustomer"
556
+            class="flex flex-col justify-center items-center pl-4">
557
+<!--          <div class="i-tabler-headset"></div>-->
558
+          <image :src="shangpinxiangqing_kefu" mode="widthFix" class="w-6 h-6"></image>
559
+
560
+          <div class="text-[11px]">客服</div>
379 561
         </div>
380 562
         <div
381 563
             @tap="handleShowShopCart"
382
-            class="flex flex-col justify-center items-center pl-3 relative">
564
+            class="flex flex-col justify-center items-center pl-4 relative">
383 565
           <div class="bg-primary rounded-full w-3 h-3 text-[9px] text-white justify-center items-center absolute top--1 right--1 text-center"
384 566
                v-if="state.cartCount"
385 567
           >
386 568
             {{state.cartCount}}
387 569
           </div>
388
-          <div class="i-tabler-shopping-cart"></div>
389
-          <div class="text-xs">购物车</div>
570
+          <image :src="shangpinxiangqing_gouwuche" mode="widthFix" class="w-6 h-6"></image>
571
+
572
+<!--          <div class="i-tabler-shopping-cart"></div>-->
573
+          <div class="text-[11px]">购物车</div>
390 574
         </div>
391 575
       </div>
392 576
       <div class="flex flex-row text-sm text-white gap-2 pr-3">
@@ -400,11 +584,11 @@ function handleCountChange(val) {
400 584
             class="bg-[#F94032] rounded-full w-25 flex justify-center items-center h-9"
401 585
         >
402 586
           <div v-if="is148Merchant"
403
-               @click="handleOrderConfirm"
587
+               @click="handleOrderConfirm('3')"
404 588
           >立即兑换</div>
405 589
           <div
406 590
               v-else
407
-              @click="handleOrderConfirm"
591
+              @click="handleOrderConfirm('1')"
408 592
           >立即购买</div>
409 593
         </div>
410 594
       </div>
@@ -433,6 +617,35 @@ function handleCountChange(val) {
433 617
 <!--      </div>-->
434 618
 <!--    </template>-->
435 619
 <!--  </nut-sku>-->
620
+
621
+
622
+  <nut-overlay v-model:visible="shareShowTips" :lock-scroll="true">
623
+        <image src="https://cdn.bjtdba.com/vod/image/2023-09-16/20230916194347287.png"
624
+               mode="widthFix" class="absolute top-0 right-0"
625
+        ></image>
626
+
627
+<!--    <div class="flex flex-col justify-center items-center w-full h-full"-->
628
+<!--    >-->
629
+<!--      <div class="bg-white">-->
630
+<!--        <image :src="currentItem.image_fake" mode="widthFix" class="w-60"></image>-->
631
+<!--        <div class="bg-white p-3 flex justify-around gap-3">-->
632
+<!--          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">-->
633
+<!--            <image :src="wechatImg" mode="widthFix" class="w-8 h-8"></image>-->
634
+<!--            <div>微信</div>-->
635
+<!--          </div>-->
636
+<!--          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">-->
637
+<!--            <image :src="pyqImg" mode="widthFix" class="w-8 h-8"></image>-->
638
+<!--            <div>朋友圈</div>-->
639
+<!--          </div>-->
640
+<!--          <div class="flex flex-col text-[12px] justify-center items-center" @tap.stop="shareImage">-->
641
+<!--            <image :src="bctpImg" mode="widthFix" class="w-8 h-8"></image>-->
642
+<!--            <div>保存图片</div>-->
643
+<!--          </div>-->
644
+<!--        </div>-->
645
+<!--      </div>-->
646
+
647
+<!--    </div>-->
648
+  </nut-overlay>
436 649
 </template>
437 650
 <style>
438 651
 page {

+ 51 - 11
src/pages/store/product/other.vue

@@ -62,11 +62,13 @@ 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 66
       mergeProductDetail({
66 67
         images: jdProduct.detail,
67 68
         coupon: {
68 69
           amount: jdProduct.couMoney
69 70
         },
71
+        ...jdProduct
70 72
       })
71 73
     })
72 74
   }
@@ -79,7 +81,8 @@ function loadProductDetail(product: Partial<IProductDetail>) {
79 81
         coupon: {
80 82
           startTime: product.couponStartTime,
81 83
           endTime: product.couponEndTime
82
-        }
84
+        },
85
+        ...product
83 86
       })
84 87
     })
85 88
   }
@@ -87,13 +90,13 @@ function loadProductDetail(product: Partial<IProductDetail>) {
87 90
   // 拼多多
88 91
   if (product.platform == 1) {
89 92
     getPddProductDetail(product.id).then(res => {
90
-      console.log('拼多多')
91
-      console.log(res)
93
+      // detail.value = res
92 94
       mergeProductDetail({
93 95
         spreadUrl: res.pddlink.url,
94 96
         images: res.goods_gallery_urls,
95 97
         featured: res.goods_gallery_urls,
96
-        mallName: res.mall_name
98
+        mallName: res.mall_name,
99
+        ...res
97 100
         // allowance:
98 101
       })
99 102
       if (res.coupon_start_time > 0) {
@@ -117,10 +120,12 @@ function loadProductDetail(product: Partial<IProductDetail>) {
117 120
     getVipProductDetail(product.id).then(res => {
118 121
       // console.log(res.result[0])
119 122
       const product = res.result[0]
123
+      // detail.value = product
120 124
       mergeProductDetail({
121 125
         featured: product.goodsCarouselPictures,
122 126
         images: product.goodsDetailPictures,
123
-        mallName: '唯品自营'
127
+        mallName: '唯品自营',
128
+        ...product
124 129
       })
125 130
       if (product.couponInfo) {
126 131
         mergeProductDetail({
@@ -138,23 +143,27 @@ function loadProductDetail(product: Partial<IProductDetail>) {
138 143
     getSuProductDetail(product.id).then(res => {
139 144
       // const product = res
140 145
       mergeProductDetail({
141
-        images: res.detail
146
+        images: res.detail,
147
+        ...res
142 148
       })
143 149
     })
144 150
   }
145 151
   // 抖音
146 152
   if (product.platform == 9) {
147 153
     getDyProductDetail(product.id).then(res => {
154
+      console.log(res)
148 155
       mergeProductDetail({
149 156
         mallName: res.shopName,
150 157
         images: res.imgs,
158
+        ...res
151 159
       })
152 160
     })
153 161
   }
154 162
 }
155 163
 
156 164
 function handleBuyNow() {
157
-  if (detail.value?.platform == 6 || detail.value?.spreadUrl) {
165
+  console.log(detail.value)
166
+  if (detail.value?.platform == 6 && detail.value?.spreadUrl) {
158 167
     uni.navigateToMiniProgram({
159 168
       appId: 'wx91d27dbf599dff74',
160 169
       path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(detail.value?.spreadUrl),
@@ -171,6 +180,37 @@ function handleBuyNow() {
171 180
       }
172 181
     })
173 182
   }
183
+  if (detail.value?.platform == 1) {
184
+    // console.log(detail.value)
185
+    const pddWx = detail.value.pddlink.wx
186
+    // console.log(pddWx)
187
+    uni.navigateToMiniProgram({
188
+      appId: pddWx.app_id,
189
+      path: pddWx.page_path,
190
+      // extraData: {
191
+      //  foo: 'bar'
192
+      // },
193
+      envVersion: 'release',
194
+      success(res) {
195
+        // 打开成功
196
+        console.log(res);
197
+      },
198
+      fail: (error) => {
199
+        console.log(error);
200
+      }
201
+    })
202
+  }
203
+  if (detail.value?.platform == 3) {
204
+    // console.log('sunig')
205
+    // console.log(detail.value)
206
+  }
207
+
208
+  if (detail.value?.platform == 9) {
209
+    // console.log(detail.value)
210
+  }
211
+  if (detail.value?.platform == 2) {
212
+    console.log(detail.value)
213
+  }
174 214
 }
175 215
 
176 216
 /**
@@ -253,13 +293,13 @@ const hasCoupon = computed(() => {
253 293
         <div class="w-full bg-white pb-safe">
254 294
           <div class="flex justify-between items-center p-3">
255 295
             <div class="inline-flex items-center">
256
-              <div class="text-sm">补贴养老金</div>
257
-              <FPrice :price="detail.allowance" need-symbol/>
296
+              <div class="text-sm">预估养老金</div>
297
+              <FPrice :price="detail.allowance" need-symbol ex-class="text-[20px] font-bold"/>
258 298
             </div>
259 299
             <div>
260
-              <CXBButton @tap="handleBuyNow">
300
+              <nut-button type="primary" @tap="handleBuyNow">
261 301
                 立即购买
262
-              </CXBButton>
302
+              </nut-button>
263 303
             </div>
264 304
           </div>
265 305
         </div>

+ 50 - 12
src/pages/third_party_binding/index.vue

@@ -1,33 +1,71 @@
1 1
 <script lang="ts" setup>
2 2
 import {CDN_URL} from "~/config/app";
3
+import {getBindingState} from "~/apis/user";
4
+import {findLast} from "lodash-es";
3 5
 
4 6
 const zfbImage = CDN_URL + '/static/assets/zfb_sf_220908.png'
5 7
 const wxImage = CDN_URL + '/static/assets/wx_sf_220908.png'
8
+
9
+const bindState = ref([])
10
+
11
+onLoad(() => {
12
+  getBindingState().then(res => {
13
+    console.log(res)
14
+    if (res) {
15
+      bindState.value = res
16
+    }
17
+  }).catch(error => {
18
+    uni.showToast({
19
+      title: error,
20
+      icon: 'none'
21
+    })
22
+  })
23
+})
24
+
25
+function getBindState(type) {
26
+  if (bindState.value) {
27
+    return findLast(bindState.value, (value) => {
28
+      return value.type === type
29
+    })
30
+    // return bindState.value.map(value => {
31
+    //   if (value.type === type){
32
+    //     console.log(value)
33
+    //     return value[0]
34
+    //   }
35
+    // })
36
+  }
37
+}
6 38
 </script>
7 39
 <template>
8 40
   <div class="flex flex-col">
9
-    <div class="flex flex-row  justify-between bg-white my-3 p-4">
41
+    <div class="flex flex-row  justify-between bg-white p-4">
42
+
10 43
       <div class="flex-1 flex text-sm items-center gap-2">
11 44
         <image :src="wxImage" mode="widthFix" class="w-4 h-4"></image>
12 45
         <div>
13 46
           微信授权
14 47
         </div>
15 48
       </div>
16
-      <div class="border border-solid rounded-full text-red text-xs px-2 h-4">
17
-        已授权
49
+      <div class="border border-solid rounded-full  text-xs px-2 h-4"
50
+           :class="getBindState('1') ? 'text-red' : 'text-gray border-gray'"
51
+      >
52
+        {{ getBindState('1') ? '已授权' : '未授权' }}
18 53
       </div>
19 54
     </div>
20
-    <div class="flex flex-row  justify-between bg-white p-4">
21
-      <div class="flex-1 flex text-sm items-center gap-2">
22
-        <image :src="zfbImage" mode="widthFix" class="w-4 h-4"></image>
23
-        <div>
24
-          支付宝授权
25
-        </div>
26
-      </div>
27
-      <div class="border border-solid rounded-full text-red text-xs px-2 h-4">
28
-        已授权
55
+  </div>
56
+  <div class="flex flex-row  justify-between bg-white p-4">
57
+    <div class="flex-1 flex text-sm items-center gap-2">
58
+      <image :src="zfbImage" mode="widthFix" class="w-4 h-4"></image>
59
+      <div>
60
+        支付宝授权
29 61
       </div>
30 62
     </div>
63
+    <div class="border border-solid rounded-full  text-xs px-2 h-4"
64
+         :class="getBindState('2') ? 'text-red' : 'text-gray border-gray'"
65
+    >
66
+      {{ getBindState('2') ? '已授权' : '未授权' }}
67
+
68
+    </div>
31 69
   </div>
32 70
 </template>
33 71
 

+ 5 - 4
src/pages/user/address/edit.vue

@@ -222,15 +222,16 @@ const submit = () => {
222 222
         village: formData.village,
223 223
         address_id: formData.address_id
224 224
       }).then(res => {
225
-        console.log(res)
225
+        // console.log(res)
226 226
         if (res) {
227 227
           uni.showToast({
228 228
             title: '保存成功'
229 229
           })
230 230
           setTimeout(() => {
231
-            uni.redirectTo({
232
-              url: '/pages/user/address/index'
233
-            })
231
+          //   uni.redirectTo({
232
+          //     url: '/pages/user/address/index'
233
+          //   })
234
+            uni.navigateBack()
234 235
           }, 500)
235 236
         }
236 237
       }).catch(message => {

+ 2 - 2
src/pages/user/address/index.vue

@@ -79,7 +79,7 @@ export default {
79 79
       // from.value =
80 80
       getUserAddressList().then(res => {
81 81
         if (res) {
82
-          console.log(res)
82
+          // console.log(res)
83 83
           data.value = res.list
84 84
         }
85 85
       })
@@ -102,7 +102,7 @@ export default {
102 102
     const handleClickItem = (item: AddressModel) => {
103 103
       // uni.navigateTo()
104 104
       addressStore.getCurrentAddress(item.address_id)
105
-      console.log(from.value)
105
+      // console.log(from.value)
106 106
       if (from.value && from.value === 'order') {
107 107
         setTimeout(() => {
108 108
           uni.navigateBack()

+ 111 - 15
src/pages/user/index.vue

@@ -1,24 +1,34 @@
1 1
 <script lang="ts" setup>
2 2
 import {useUserStore} from "~/stores/userStore";
3 3
 import CXBAuthorize from "~/components/CXBAuthorize/CXBAuthorize.vue";
4
-import {getUserInfo} from "~/apis/user";
4
+import {getAgentInfo, getUserInfo} from "~/apis/user";
5 5
 import {CDN_URL} from "~/config/app";
6 6
 import Routine from "~/libs/routine";
7
+import {totalOrderNumber} from "~/apis/order.api";
8
+import type {OrderQuantityModel} from "~/apis/model/order.model";
9
+import type {Ref} from "vue";
7 10
 
8 11
 const myOrderList = [{
12
+  id: 'noPay',
9 13
   icon: CDN_URL + '/static/assets/obligation_220620.png',
10 14
   text: '待付款',
15
+  count: '',
11 16
   url: ''
12 17
 }, {
13 18
   icon: CDN_URL + '/static/assets/daifahuo_220620.png',
19
+  id: 'noPostage',
14 20
   text: '待发货',
21
+  count: '',
15 22
   url: ''
16 23
 }, {
17 24
   icon: CDN_URL + '/static/assets/daishouhuo_220620.png',
25
+  id: 'noDeliver',
18 26
   text: '待收货',
27
+  count: '',
19 28
   url: ''
20 29
 }, {
21 30
   icon: CDN_URL + '/static/assets/daipingjia_220620.png',
31
+  id: 'noComment',
22 32
   text: '待评价',
23 33
   url: ''
24 34
 }, {
@@ -83,7 +93,24 @@ const state = reactive({
83 93
   isLogin: false
84 94
 })
85 95
 const userStore = useUserStore();
96
+const orderQuantity: Ref<OrderQuantityModel> = ref()
97
+// const orderQuantity =reactive({
98
+//   noComment: '',
99
+//   done: '',
100
+//   // 退款售后
101
+//   refund: '',
102
+//   // 待收货
103
+//   noDeliver: '',
104
+//   // 待付款
105
+//   noPay: '',
106
+//   // 待发货
107
+//   noPostage: '',
108
+//   orderPrice: '',
109
+//   orderCount: ''
110
+// })
86 111
 
112
+const agentInfo = ref({})
113
+// onLoad(() => {})
87 114
 onShow(async () => {
88 115
   uni.showLoading({
89 116
     title: '登录中',
@@ -97,6 +124,13 @@ onShow(async () => {
97 124
     uni.hideLoading()
98 125
     await userStore.getUserInfo()
99 126
     await userStore.getUserYanglaoJin()
127
+    agentInfo.value = await getAgentInfo()
128
+    // console.log(agentInfo)
129
+    // await   loadProductDetail()
130
+    //
131
+    // getAgentInfo().then(res => {
132
+    //   console.log(res)
133
+    // })
100 134
 
101 135
   } else {
102 136
     uni.navigateTo({
@@ -104,6 +138,12 @@ onShow(async () => {
104 138
     })
105 139
     userStore.setUserInfo(null)
106 140
   }
141
+
142
+  totalOrderNumber().then(res => {
143
+    console.log(res)
144
+    orderQuantity.value = res
145
+    // orderQuantity
146
+  })
107 147
 })
108 148
 
109 149
 function checkAuth() {
@@ -183,6 +223,7 @@ function handleShowMyAllOrder(tab?: number) {
183 223
 
184 224
 const userType = computed(() => {
185 225
   const userRichType = userStore.userInfo?.user_rich_type
226
+
186 227
   // 创始人
187 228
   if (userRichType == 3) {
188 229
     return '创始人'
@@ -195,9 +236,22 @@ const userType = computed(() => {
195 236
   if (userRichType == 1) {
196 237
     return '会员'
197 238
   }
239
+  if (userRichType == 3) {
240
+    return '创始人'
241
+  }
198 242
   // 合伙人
199
-  if (userRichType == 2) {
200
-    return '合伙人'
243
+  if (userRichType == 4) {
244
+    // return '高级会员'
245
+    return 'VIP'
246
+  }
247
+  if (userRichType == 5) {
248
+    return '初始级合伙人'
249
+  }
250
+  if (userRichType == 6) {
251
+    return '中级合伙人'
252
+  }
253
+  if (userRichType == 7) {
254
+    return '高级合伙人'
201 255
   }
202 256
   if (!userRichType) {
203 257
     return '用户'
@@ -219,9 +273,15 @@ function handleToContact(item) {
219 273
   if (item.type === 'customer') {
220 274
     return uni.openCustomerServiceChat({
221 275
       extInfo: {
222
-        url: item.url
276
+        url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db'
223 277
       },
224
-      corpId: ''
278
+      corpId: 'wwaeb55681929a37ae',
279
+      success: (res => {
280
+        console.log(res)
281
+      }),
282
+      fail: (res => {
283
+        console.log(res)
284
+      })
225 285
     })
226 286
   }
227 287
 }
@@ -269,8 +329,8 @@ function handleShowMyRulePage() {
269 329
             </div>
270 330
             <div
271 331
                 @click="handleShowMyRulePage"
272
-                class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center">
273
-              {{ userType || '用户' }}
332
+                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">
333
+              {{ userType }}
274 334
             </div>
275 335
           </div>
276 336
 
@@ -290,7 +350,7 @@ function handleShowMyRulePage() {
290 350
             <div
291 351
                 @tap="handleShowMyInvitation"
292 352
                 class="w-1/3  flex flex-col justify-center items-center">
293
-              <div>{{ userStore.userInfo.member_brokerage_price }}</div>
353
+              <div>{{ agentInfo.brokerage_price }}</div>
294 354
               <div class="text-xs">我的佣金</div>
295 355
             </div>
296 356
             <div
@@ -322,10 +382,15 @@ function handleShowMyRulePage() {
322 382
       <div class="bg-white rounded px-3 text-sm">
323 383
         <div class="flex justify-between pt-4 mb-4">
324 384
           <div>我的订单</div>
325
-          <div
326
-              @click="handleShowMyAllOrder"
327
-              class="text-sm text-gray">查看全部
385
+          <div class="flex items-center">
386
+            <div
387
+                @click="handleShowMyAllOrder(0)"
388
+                class="text-sm text-gray">查看全部
389
+            </div>
390
+            <div class="f-text-color-2 i-tabler-chevron-right"></div>
328 391
           </div>
392
+
393
+
329 394
         </div>
330 395
         <div class="flex pb-4">
331 396
           <div
@@ -333,10 +398,41 @@ function handleShowMyRulePage() {
333 398
               v-for="(item, index) in myOrderList" :key="index"
334 399
               class="flex flex-col justify-center items-center w-1/5 gap-3"
335 400
           >
336
-            <image :src="item.icon"
337
-                   mode="widthFix"
338
-                   class="w-8 h-8 "
339
-            />
401
+            <div class="relative">
402
+              <div class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
403
+                   v-if="
404
+                   item.id == 'noPay' && orderQuantity &&  orderQuantity.noPay != '0'"
405
+
406
+              >
407
+                {{ orderQuantity.noPay}}
408
+              </div>
409
+              <div class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
410
+                   v-if="
411
+                   item.id == 'refund' && orderQuantity && orderQuantity.refund != '0'"
412
+
413
+              >
414
+                {{ orderQuantity.refund}}
415
+              </div>
416
+              <div class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
417
+                   v-if="
418
+                   item.id == 'noDeliver' && orderQuantity && orderQuantity.noDeliver != '0'"
419
+
420
+              >
421
+                {{ orderQuantity.noDeliver}}
422
+              </div>
423
+              <div class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
424
+                   v-if="
425
+                   item.id == 'noPostage' && orderQuantity && orderQuantity.noPostage != '0'"
426
+
427
+              >
428
+                {{ orderQuantity.noPostage}}
429
+              </div>
430
+              <image :src="item.icon"
431
+                     mode="widthFix"
432
+                     class="w-7 h-7 "
433
+              />
434
+            </div>
435
+
340 436
             <div class="text-xs">{{ item.text }}</div>
341 437
           </div>
342 438
         </div>

+ 12 - 4
src/pages/version-update/index.vue

@@ -14,6 +14,13 @@ onLoad(() => {
14 14
     console.log(res)
15 15
   })
16 16
 })
17
+
18
+function handelUpdate() {
19
+  uni.showToast({
20
+    title: '已是最新版本',
21
+    icon: 'none'
22
+  })
23
+}
17 24
 </script>
18 25
 <template>
19 26
   <CXBBasePage>
@@ -27,10 +34,11 @@ onLoad(() => {
27 34
       </div>
28 35
     </div>
29 36
     <div class="fixed bottom-0 pb-safe w-full">
30
-      <div class="px-10 ">
31
-        <div class="text-center text-white bg-red rounded-full text-sm p-2">
32
-          检查更新
33
-        </div>
37
+      <div class="px-10 pb-10">
38
+<!--        <div class="text-center text-white bg-red rounded-full text-sm p-2">-->
39
+<!--          检查更新-->
40
+<!--        </div>-->
41
+        <nut-button type="primary" block @click="handelUpdate">检查更新</nut-button>
34 42
       </div>
35 43
     </div>
36 44
   </CXBBasePage>

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

@@ -35,11 +35,11 @@
35 35
               <image :src="item.image" mode="widthFix" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square"></image>
36 36
 
37 37
               <div class="text-sm p-2 flex flex-col gap-1">
38
-                <div class="line-clamp-2">
38
+                <div class="line-clamp-1">
39 39
                   {{item.store_name}}
40 40
                 </div>
41 41
                 <div class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
42
-                  <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
42
+                  <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
43 43
                          mode="widthFix" class="!w-8 "></image>
44 44
                   <div class="px-2 flex items-center jusitify-center">
45 45
                     <div>

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

@@ -8,7 +8,7 @@
8 8
 //     required: true
9 9
 //   }
10 10
 // })
11
-const url = ref('http://vod.bjtdba.com/agreement/')
11
+const url = ref('https://vod.bjtdba.com/agreement/')
12 12
 const PRIVACY_AGREEMENT = '1' // 隐私政策
13 13
 const SERVICE_AGREEMENT = '2' // 服务协议
14 14
 // 协议链接

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

@@ -1,6 +1,8 @@
1 1
 <script setup lang="ts">
2 2
 import {getWithdrawal} from "~/apis/user";
3 3
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4
+import dayjs from "dayjs";
5
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
4 6
 const list = ref([])
5 7
 onLoad((option) => {
6 8
   getWithdrawal({
@@ -13,12 +15,29 @@ onLoad((option) => {
13 15
 })
14 16
 </script>
15 17
 <template>
16
-  <div>
17
-    <div v-if="list.length > 0"></div>
18
+  <CXBBasePage>
19
+    <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
20
+      <div v-for="(item, index) in list" :key="index" class="flex-1 text-xs f-hairline-bottom bg-white p-3">
21
+        <div class="flex justify-between">
22
+          <div>
23
+            <div>提现至{{ item.widthdrawal_type === '1' ? '微信' : '支付宝' }}</div>
24
+            <div class="text-gray text-[11px]">{{ dayjs(item.create_time).format('YYYY-MM-DD') }}</div>
25
+          </div>
26
+          <div>
27
+            <div>-{{ item.extract_price }}</div>
28
+            <div class="text-[11px]"
29
+                 :class="item.status === '0' ? 'text-primary' : 'text-gray'"
30
+            >{{ item.status === '-1' ? '已失败' : item.status === '0' ? '提现中' : item.status === '1'? '已到账' : ''}}</div>
31
+          </div>
32
+        </div>
33
+
34
+
35
+      </div>
36
+    </div>
18 37
     <div v-else>
19 38
       <CXBEmpty />
20 39
     </div>
21
-  </div>
40
+  </CXBBasePage>
22 41
 </template>
23 42
 
24 43
 <style>