瀏覽代碼

二维码+退款/售后

dxz1228 2 年之前
父節點
當前提交
9a54088fb0

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

@@ -23,4 +23,5 @@ export interface MyRelationProductModel {
23 23
     care_count: string
24 24
     // 原价(划线价格)
25 25
     ot_price: string
26
+    isSelected?:boolean
26 27
 }

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

@@ -6,7 +6,7 @@ export interface SpreadInfoModel {
6 6
     yesterday_brokerage: number
7 7
     total_extract: number
8 8
     total_brokerage: number
9
-
9
+    member_brokerage_price:string
10 10
    // 佣金余额(可提现)
11 11
     brokerage_price: string
12 12
     now_money: string

+ 29 - 0
src/apis/user.ts

@@ -98,6 +98,8 @@ enum API {
98 98
     USER_RELATION_PRODUCT_LIST = '/api/user/relation/product/lst',
99 99
     // 取消收藏
100 100
     USER_RELATION_DELETE = '/api/user/relation/delete',
101
+    // 批量取消收藏
102
+    BATCH_RELATION_DELETE = '/api/user/relation/batch/delete',
101 103
     // 我关注的店铺
102 104
     USER_RELATION_MERCHANT_LIST = '/api/user/relation/merchant/lst',
103 105
 
@@ -569,6 +571,18 @@ export function removeMyRelation(params: { type: number, type_id: string }) {
569 571
         }
570 572
     })
571 573
 }
574
+/**
575
+ * 批量取消我的收藏 user/relation/batch/delete
576
+ * @param type 1
577
+ */
578
+export function batchremoveMyRelation(params: { type: number, type_id:any[]}) {
579
+    return defHttp.post({
580
+        url: API.BATCH_RELATION_DELETE,
581
+        data: {
582
+            ...params
583
+        }
584
+    })
585
+}
572 586
 
573 587
 /**
574 588
  * 获取我的收藏
@@ -611,6 +625,21 @@ export function getApplicationWithdrawal(params: {
611 625
         }
612 626
     })
613 627
 }
628
+/**
629
+ * 提现申请
630
+ */
631
+export function getApplicationredWithdrawal(params: {
632
+    extract_price: string,
633
+    extract_type: string,
634
+    type:number
635
+}) {
636
+    return defHttp.post({
637
+        url: API.USER_EXTRACT_CREATE,
638
+        data: {
639
+            ...params
640
+        }
641
+    })
642
+}
614 643
 
615 644
 /**
616 645
  * 获取用户养老金信息

File diff suppressed because it is too large
+ 907 - 1
src/pages.json


+ 240 - 35
src/pages/immediate-withdrawal/index.vue

@@ -1,5 +1,6 @@
1 1
 <script setup lang="ts">
2 2
 import {
3
+  getApplicationredWithdrawal,
3 4
   getApplicationWithdrawal,
4 5
   getBandAccountInfo,
5 6
   getUserSpreadInfo,
@@ -25,10 +26,20 @@ const yanglaojin = ref<UserYanglaoJinModel>()
25 26
 const widthdrawalConfig = ref({})
26 27
 
27 28
 const cashWithdrawalAmount = ref()
28
-
29
+const isshow = ref(0)
29 30
 const isDisabled = ref(true)
30 31
 const userBrokeragePrice = ref(0)
32
+const member_brokerage_price = ref(0)
31 33
 // userSpreadInfo.value.brokerage_price
34
+onLoad((options) => {
35
+  if (options && options.type) {
36
+    if (options.type == 1) {
37
+      isshow.value = 1
38
+    } else if (options.type == 2) {
39
+      isshow.value = 2
40
+    }
41
+  }
42
+})
32 43
 onShow(async () => {
33 44
   cashWithdrawalAmount.value = null
34 45
   getBandAccountInfo({ type: '1' }).then(res => {
@@ -72,6 +83,7 @@ onShow(async () => {
72 83
   await userStore.getUserInfo()
73 84
   // 佣金信息
74 85
   userSpreadInfo.value = await getUserSpreadInfo()
86
+  console.log(99999, userSpreadInfo.value);
75 87
 
76 88
   yanglaojin.value = await getUserYangLaoJin()
77 89
 
@@ -81,15 +93,29 @@ onShow(async () => {
81 93
   console.log(widthdrawalConfig.value)
82 94
   userBrokeragePrice.value = userSpreadInfo.value?.brokerage_price ? parseFloat(userSpreadInfo.value?.brokerage_price) : 0
83 95
   console.log(userBrokeragePrice.value)
96
+  member_brokerage_price.value = userSpreadInfo.value?.member_brokerage_price ? parseFloat(userSpreadInfo.value?.member_brokerage_price) : 0
97
+  console.log(member_brokerage_price.value)
84 98
   // if (userSpreadInfo.value?.brokerage_price) {
85
-  if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
86
-    isDisabled.value = true
87
-    return uni.showToast({
88
-      title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
89
-      icon: 'none'
90
-    })
99
+  if (isshow.value == 1) {
100
+    if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
101
+      isDisabled.value = true
102
+      return uni.showToast({
103
+        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
104
+        icon: 'none'
105
+      })
106
+    }
107
+  } else if (isshow.value == 2) {
108
+
109
+    if (member_brokerage_price.value < widthdrawalConfig.value.withdrawal_money) {
110
+      isDisabled.value = true
111
+      return uni.showToast({
112
+        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
113
+        icon: 'none'
114
+      })
115
+    }
91 116
   }
92 117
 
118
+
93 119
   // }
94 120
 })
95 121
 
@@ -113,24 +139,27 @@ function Tochecked() {
113 139
   if (iswxshow.value == true) {
114 140
     Accountbind({ openid: userStore.openid, wx_type: '1' }).then(resg => {
115 141
       console.log('我是resg', resg);
142
+      setTimeout(() => {
143
+        uni.showToast({
144
+          title: '绑定成功',
145
+          icon: 'none'
146
+        })
147
+      }, 300)
116 148
 
117
-      uni.showToast({
118
-        title: '绑定成功',
119
-        icon: 'none'
120
-      })
121 149
       iswxshow.value = true
122 150
     }).catch((error) => {
123
-      uni.showToast({
124
-        title: error,
125
-        icon: 'none'
126
-      })
127
-      if(error=='此微信已绑定其他账户'){
128
-        iswxshow.value=false
129
-      }
151
+      setTimeout(() => {
152
+        uni.showToast({
153
+          title: error,
154
+          icon: 'none'
155
+        })
156
+      }, 300)
157
+
158
+      iswxshow.value = false
130 159
     })
131
-  }else{
160
+  } else {
132 161
     console.log(111);
133
-    
162
+
134 163
   }
135 164
 }
136 165
 
@@ -140,21 +169,33 @@ function Tochecked() {
140 169
 
141 170
 function handleInputAll() {
142 171
   // console.log(userSpreadInfo.value?.brokerage_price)
143
-  if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && userSpreadInfo.value?.brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
144
-    cashWithdrawalAmount.value = userSpreadInfo.value.brokerage_price
145
-  } else {
146
-    uni.showToast({
147
-      title: '可用余额太少,未满足提现要求',
148
-      icon: 'none'
149
-    })
172
+  if (isshow.value == 1) {
173
+    if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && userSpreadInfo.value?.brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
174
+      cashWithdrawalAmount.value = userSpreadInfo.value.brokerage_price
175
+    } else {
176
+      uni.showToast({
177
+        title: '可用余额太少,未满足提现要求',
178
+        icon: 'none'
179
+      })
180
+    }
181
+  } else if (isshow.value == 2) {
182
+    if (userSpreadInfo.value && userSpreadInfo.value.member_brokerage_price && userSpreadInfo.value?.member_brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
183
+      cashWithdrawalAmount.value = userSpreadInfo.value.member_brokerage_price
184
+    } else {
185
+      uni.showToast({
186
+        title: '可用余额太少,未满足提现要求',
187
+        icon: 'none'
188
+      })
189
+    }
150 190
   }
191
+
151 192
 }
152 193
 
153 194
 /**
154 195
  * 立即提现
155 196
  */
156 197
 function handleImmediateWithdrawal() {
157
-  
198
+
158 199
   if (isDisabled.value) {
159 200
     return
160 201
   }
@@ -213,7 +254,7 @@ function handleImmediateWithdrawal() {
213 254
     })
214 255
   }
215 256
 
216
-  if(iswxshow.value==false){
257
+  if (iswxshow.value == false) {
217 258
     uni.showToast({
218 259
       title: '请先勾选提现方式',
219 260
       icon: 'none'
@@ -243,6 +284,99 @@ function handleImmediateWithdrawal() {
243 284
   // if (yanglaojin.value) {
244 285
   // }
245 286
 }
287
+/**
288
+ * 立即提现
289
+ */
290
+function handleImmediateredWithdrawal() {
291
+
292
+  if (isDisabled.value) {
293
+    return
294
+  }
295
+  if (widthdrawalConfig.value.withdrawal_status == '0') {
296
+    isDisabled.value = true
297
+    return uni.showToast({
298
+      title: '提现功能关闭',
299
+      icon: 'none'
300
+    })
301
+  }
302
+  if (widthdrawalConfig.value.withdrawal_wchat == '0') {
303
+    isDisabled.value = true
304
+
305
+    return uni.showToast({
306
+      title: '微信提现功能关闭',
307
+      icon: 'none'
308
+    })
309
+  }
310
+
311
+  // 1.用户可提现余额≤最低提现额
312
+  if (member_brokerage_price.value < widthdrawalConfig.value.withdrawal_money) {
313
+    return uni.showToast({
314
+      title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
315
+      icon: 'none'
316
+    })
317
+  }
318
+
319
+  // 2 当输入金额≤可提现余额<最低提现额度
320
+  if (Number.parseFloat(cashWithdrawalAmount.value) <= Number.parseFloat(member_brokerage_price.value) && Number.parseFloat(cashWithdrawalAmount.value) < widthdrawalConfig.value.withdrawal_money) {
321
+    // 1 判断是否需要实名
322
+    if (!yanglaojin.value?.is_certification == 1) {
323
+      return uni.navigateTo({
324
+        url: '/pages/real-name-authentication/index'
325
+      })
326
+    }
327
+
328
+    return uni.showToast({
329
+      title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
330
+      icon: 'none'
331
+    })
332
+  }
333
+
334
+  // 当输入金额>可提现余额且输入金额≥最低提现额度
335
+  if ((Number.parseFloat(cashWithdrawalAmount.value) > Number.parseFloat(member_brokerage_price.value)) && (Number.parseFloat(cashWithdrawalAmount.value) >= widthdrawalConfig.value.withdrawal_money)) {
336
+    // 1 判断是否需要实名
337
+    if (!yanglaojin.value?.is_certification == 1) {
338
+      return uni.navigateTo({
339
+        url: '/pages/real-name-authentication/index'
340
+      })
341
+    }
342
+
343
+
344
+    return uni.showToast({
345
+      title: '输入金额超过可提现余额',
346
+      icon: 'none'
347
+    })
348
+  }
349
+
350
+  if (iswxshow.value == false) {
351
+    uni.showToast({
352
+      title: '请先勾选提现方式',
353
+      icon: 'none'
354
+    })
355
+    return
356
+  }
357
+
358
+  getApplicationredWithdrawal({ extract_price: cashWithdrawalAmount.value, extract_type: "1", type: 2 }).then(res => {
359
+
360
+    uni.showToast({
361
+      title: '提现已申请',
362
+      icon: 'none'
363
+    })
364
+    setTimeout(() => {
365
+      uni.navigateTo({
366
+        url: '/pages/withdrawal-record/index'
367
+      })
368
+    }, 300)
369
+  }).catch(error => {
370
+    uni.showToast({
371
+      title: error,
372
+      icon: 'none'
373
+    })
374
+  })
375
+
376
+
377
+  // if (yanglaojin.value) {
378
+  // }
379
+}
246 380
 
247 381
 function handleWithdrawalRecord() {
248 382
   uni.navigateTo({
@@ -257,7 +391,8 @@ function handleShowAgreement(type) {
257 391
 }
258 392
 </script>
259 393
 <template>
260
-  <div class="p-3 flex flex-col gap-3">
394
+  <!-- 佣金提现 -->
395
+  <div class="p-3 flex flex-col gap-3" v-if="isshow == 1">
261 396
     <div class="flex justify-end">
262 397
       <div class=" text-sm" @tap="handleWithdrawalRecord">提现记录</div>
263 398
     </div>
@@ -294,8 +429,8 @@ function handleShowAgreement(type) {
294 429
             <div>微信</div>
295 430
           </div>
296 431
           <div>
297
-            <radio :checked="true" v-if="iswxshow==true" />
298
-            <radio :checked="false"  v-if="iswxshow==false" @click="Tochecked"  />
432
+            <radio :checked="true" v-if="iswxshow == true" />
433
+            <radio :checked="false" v-if="iswxshow == false" @click="Tochecked" />
299 434
           </div>
300 435
         </div>
301 436
 
@@ -321,9 +456,79 @@ function handleShowAgreement(type) {
321 456
 
322 457
       <div class="flex flex-col text-sm text-gray leading-8 py-4">
323 458
         <div>详细说明</div>
324
-        <div>平台服务费 {{ withdrawalCal.service }}</div>
325
-        <div>本次提取将扣除服务费 ¥{{ withdrawalCal.service_money }}</div>
326
-        <div>本次提取实际到账额度 ¥{{ withdrawalCal.money }}</div>
459
+        <div>平台服务费 {{ cashWithdrawalAmount ? withdrawalCal.service : '0' }}</div>
460
+        <div>本次提取将扣除服务费 ¥{{ cashWithdrawalAmount ? withdrawalCal.service_money : '0.00' }}</div>
461
+        <div>本次提取实际到账额度 ¥{{ cashWithdrawalAmount ? withdrawalCal.money : '0.00' }}</div>
462
+      </div>
463
+
464
+    </div>
465
+
466
+  </div>
467
+  <!-- 红积分提现 -->
468
+  <div class="p-3 flex flex-col gap-3" v-if="isshow == 2">
469
+    <div class="bg-white rounded-lg text-sm p-3 flex flex-col gap-4">
470
+      <div class="flex justify-between">
471
+        <div class="font-bold">提现金额</div>
472
+        <div class="text-xs text-gray" @click="handleShowAgreement(6)">提现规则</div>
473
+      </div>
474
+      <div class="flex justify-center items-center pt-4 f-hairline-bottom">
475
+        <div class="text-lg font-bold">¥</div>
476
+        <div class="flex-1">
477
+          <input placeholder="请输入金额" class="w-full" type="digit" v-model="cashWithdrawalAmount" />
478
+        </div>
479
+        <div class="text-xs text-red" @click="handleInputAll">全部提现</div>
480
+      </div>
481
+      <div class="flex text-gray items-center gap-3 text-sm">
482
+        <div v-if="userSpreadInfo">
483
+          可用余额¥:{{ userStore.userInfo.member_brokerage_price }}
484
+        </div>
485
+        <div v-if="userStore.userInfo">
486
+          可用红积分:{{ parseFloat(Number(userStore.userInfo.red)).toFixed(2).replace(/\.?0+$/, '') }}
487
+        </div>
488
+      </div>
489
+
490
+    </div>
491
+    <div class="bg-white rounded-lg text-sm p-3 flex flex-col">
492
+      <div class="flex f-hairline-bottom font-bold text-sm pb-2">
493
+        提现至
494
+      </div>
495
+      <div>
496
+        <div class="flex items-center justify-between py-3">
497
+          <div class="flex items-center gap-2">
498
+            <image :src="wx_logoImage" mode="widthFix" class="w-8 h-8"></image>
499
+            <div>微信</div>
500
+          </div>
501
+          <div>
502
+            <radio :checked="true" v-if="iswxshow == true" />
503
+            <radio :checked="false" v-if="iswxshow == false" @click="Tochecked" />
504
+          </div>
505
+        </div>
506
+
507
+        <!--        <div class="flex items-center justify-between py-3">-->
508
+        <!--          <div class="flex items-center gap-2">-->
509
+        <!--            <image :src="zfb_logoImage" mode="widthFix" class="w-8 h-8"></image>-->
510
+        <!--            <div>支付宝支付</div>-->
511
+        <!--            </div>-->
512
+        <!--            <div>-->
513
+        <!--              <radio />-->
514
+        <!--            </div>-->
515
+        <!--          </div>-->
516
+      </div>
517
+    </div>
518
+
519
+    <div class="flex flex-col">
520
+      <div class=" flex rounded-full bg-red-300">
521
+        <nut-button type="primary" block :disabled="isDisabled" :class="isDisabled && 'bg-gray-800'"
522
+          @tap="handleImmediateredWithdrawal">
523
+          立即提现
524
+        </nut-button>
525
+      </div>
526
+
527
+      <div class="flex flex-col text-sm text-gray leading-8 py-4">
528
+        <div>详细说明</div>
529
+        <div>平台服务费 {{ cashWithdrawalAmount ? withdrawalCal.service : '0' }}</div>
530
+        <div>本次提取将扣除服务费 ¥{{ cashWithdrawalAmount ? withdrawalCal.service_money : '0.00' }}</div>
531
+        <div>本次提取实际到账额度 ¥{{ cashWithdrawalAmount ? withdrawalCal.money : '0.00' }}</div>
327 532
       </div>
328 533
 
329 534
     </div>

+ 62 - 19
src/pages/my-invitation/index.vue

@@ -1,7 +1,7 @@
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, getUserUnionId} from "~/apis/user";
4
+import { getAgentInfo, getSelectUserInviteProfit, getUserUnionId } from "~/apis/user";
5 5
 const userStore = useUserStore()
6 6
 const list = [{
7 7
   title: '邀请伙伴',
@@ -16,9 +16,6 @@ const list = [{
16 16
   title: '累计收益',
17 17
   url: '/pages/accumulate-income/index'
18 18
 }, {
19
-  title: '去提现',
20
-  url: '/pages/immediate-withdrawal/index'
21
-},{
22 19
   title: '支付平台绑定',
23 20
   url: '/pages/third_party_binding/index'
24 21
 }]
@@ -33,15 +30,15 @@ const data = ref({
33 30
   // state.extract = res.extract
34 31
   nickname: '',
35 32
   avatar: '',
36
-  brokerage_price: '' ,
37
-  yesterday: '' ,
38
-  cumulative: '' ,
33
+  brokerage_price: '',
34
+  yesterday: '',
35
+  cumulative: '',
39 36
   extract: ''
40 37
 })
41 38
 
42 39
 const userInviteProfit = reactive({
43 40
   numberSun: '',
44
-  UserUnsettledInviteProfit: '' ,
41
+  UserUnsettledInviteProfit: '',
45 42
   UserYesterdayInviteProfit: ''
46 43
 })
47 44
 onLoad(() => {
@@ -90,6 +87,37 @@ function handleClick(item: { url: string, title: string }) {
90 87
   })
91 88
 }
92 89
 
90
+function handleClickTomo() {
91
+  if (userStore.userInfo.is_ertification == 1) {
92
+    uni.navigateTo({
93
+      url: '/pages/immediate-withdrawal/index?type=1'
94
+    })
95
+  } else {
96
+    setTimeout(() => {
97
+      uni.showModal({
98
+        title: '温馨提示',
99
+        content: '实名认证后才可提现',
100
+        cancelText: "取消", // 取消按钮的文字
101
+        confirmText: "去认证", // 确认按钮的文字
102
+        showCancel: true, // 是否显示取消按钮,默认为 true
103
+        confirmColor: '#f55850',
104
+        success: (res) => {
105
+          if (res.confirm) {
106
+            console.log('comfirm') //点击确定之后执行的代码
107
+            setTimeout(() => {
108
+              uni.navigateTo({
109
+                url: '/pages/real-name-authentication/index'
110
+              })
111
+            }, 300);
112
+          } else {
113
+            console.log('cancel') //点击取消之后执行的代码
114
+          }
115
+        }
116
+      })
117
+    }, 300);
118
+  }
119
+}
120
+
93 121
 function handleShowAgreement() {
94 122
   uni.navigateTo({
95 123
     url: '/pages/webview/agreement?type=6'
@@ -104,7 +132,7 @@ function handleShowAgreement() {
104 132
       <div class="text-sm">规则</div>
105 133
     </div>
106 134
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
107
-      <div class="flex justify-around">
135
+      <div class="flex justify-between">
108 136
         <div class="flex flex-col justify-center items-center gap-2">
109 137
           <div class="text-xs text-gray">
110 138
             当前收益(元)
@@ -112,21 +140,22 @@ function handleShowAgreement() {
112 140
           <div class="font-bold text-[28px]">
113 141
             {{ data.brokerage_price ? data.brokerage_price : '0.00' }}
114 142
           </div>
143
+          <div class="text-xs text-gray">昨日收益 <span class="text-red">+ {{ data.yesterday }}</span></div>
115 144
         </div>
116
-        <div class="flex flex-col justify-center items-center gap-2">
117
-          <div class="text-xs text-gray">
118
-            未结算(元)
119
-          </div>
120
-          <div class="font-bold text-[28px]">
121
-            {{ userInviteProfit.UserUnsettledInviteProfit ? userInviteProfit.UserUnsettledInviteProfit : '0.00' }}
122
-          </div>
145
+        <div  class="flex flex-col justify-center items-center gap-2">
146
+          <div @click="handleClickTomo" class="text_qtx">去提现</div>
123 147
         </div>
124 148
       </div>
125 149
       <div class="flex justify-around">
126 150
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
127
-          <div class="text-xs text-gray">昨日收益(元)</div>
128
-          <div class="font-bold text-red">{{ data.yesterday }}</div>
151
+          <div class="text-xs text-gray">未结算(元)</div>
152
+          <div class="font-bold text-red">{{ userInviteProfit.UserUnsettledInviteProfit ?
153
+            userInviteProfit.UserUnsettledInviteProfit : '0.00' }}</div>
129 154
         </div>
155
+        <!-- {
156
+                title: '去提现',
157
+                  url: '/pages/immediate-withdrawal/index?type=1'
158
+        },-->
130 159
 
131 160
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
132 161
           <div class="text-xs text-gray">累计收益(元)</div>
@@ -143,7 +172,8 @@ function handleShowAgreement() {
143 172
 
144 173
     <div class="bg-white  ">
145 174
       <FCellGroup divider arrow :ex-class="['rounded-xl']">
146
-        <FCell v-for="(item, index) in list" :key="index" :title="item.title" exClass="text-sm font-bold" @click="handleClick(item)"/>
175
+        <FCell v-for="(item, index) in list" :key="index" :title="item.title" exClass="text-sm font-bold"
176
+          @click="handleClick(item)" />
147 177
       </FCellGroup>
148 178
     </div>
149 179
 
@@ -155,6 +185,19 @@ page {
155 185
   background: #f8f8f8;
156 186
   overflow: hidden;
157 187
 }
188
+
189
+.text_qtx {
190
+  width: 168rpx;
191
+  height: 63rpx;
192
+  background: linear-gradient(179deg, #FE7577 0%, #FE0032 100%);
193
+  border-radius: 32rpx;
194
+  line-height: 63rpx;
195
+  font-size: 28rpx;
196
+  font-family: PingFangSC, PingFang SC;
197
+  font-weight: 500;
198
+  color: #FFFFFF;
199
+  text-align: center;
200
+}
158 201
 </style>
159 202
 <route lang="yaml">
160 203
 style:

+ 14 - 10
src/pages/my-rules/index.vue

@@ -242,14 +242,15 @@ function handleToVipPage() {
242 242
 }
243 243
 
244 244
 
245
-//弹框展示
246
-function openPopup() {
247
-  showValue.value = true
248
-}
245
+
249 246
 //关闭弹框
250
-const onCancel = () => {
247
+function onCancel() {
251 248
   // show.value = false
249
+
250
+  // console.log(showValue.value);
251
+
252 252
   showValue.value = false
253
+  // console.log(showValue.value);
253 254
 }
254 255
 
255 256
 
@@ -261,7 +262,7 @@ const onCancel = () => {
261 262
       <div class="">
262 263
         <!-- 头像 -->
263 264
         <div class="flex gap-2 mb-2 px-3 mb-6">
264
-          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" 
265
+          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
265 266
             class=" rounded-full" style="width: 102rpx; height: 102rpx;"></image>
266 267
 
267 268
           <div class="flex">
@@ -339,7 +340,8 @@ const onCancel = () => {
339 340
 
340 341
       </div>
341 342
       <div class="px-4 p_abls " style="border-radius: 16rpx; background: #f8f3f3;">
342
-        <div v-if="ruleDetail && ruleDetail.content" class="p-3 bg-white text-sm text-gray-500" style="border-radius: 16rpx;" >
343
+        <div v-if="ruleDetail && ruleDetail.content" class="p-3 bg-white text-sm text-gray-500"
344
+          style="border-radius: 16rpx;">
343 345
           <mpHtml :content="ruleDetail.content"></mpHtml>
344 346
         </div>
345 347
         <div class="text_more px-3 bg-white text-sm flex flex-col" style="margin-top: 26rpx; padding-top: 40rpx;"
@@ -361,12 +363,14 @@ const onCancel = () => {
361 363
           </div>
362 364
         </div>
363 365
       </div>
364
-      <FPopup v-if="nextRuleDetail && nextRuleDetail.content" v-model:show="showValue" @close="onCancel" position="bottom"
366
+      <FPopup v-if="showValue==true" v-model:show="showValue" @close="onCancel" position="bottom"
365 367
         exClass="rounded-rt-xl rounded-lt-xl  min-h-[55%] max-h-[70%] h-full">
366
-        <div class="flex flex-col flex-1 justify-between px-3 h-full ">
368
+        <div v-if="nextRuleDetail && nextRuleDetail.content" class="flex flex-col flex-1 justify-between px-3 h-full ">
367 369
           <div>
368 370
             <div class="pt-2 pr-1 flex justify-end flex-1">
369
-              <div @click="onCancel">✕</div>
371
+              <div style=" text-align: center; width: 42rpx; height: 42rpx;" @click="onCancel">
372
+                <image style="width: 100%; height: 100%" src="../../static/icon/guanbi.png"></image>
373
+              </div>
370 374
             </div>
371 375
             <div class="mt-6" v-html="nextRuleDetail.content"></div>
372 376
           </div>

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

@@ -126,7 +126,7 @@ onUnmounted(() => {
126 126
   <div class="p-3 flex flex-col">
127 127
     <div v-if="state.list.length > 0" class="flex flex-col gap-3">
128 128
       <div v-for="(orderItem, index) in state.list" :key="index">
129
-        <OrderItem :order-item="orderItem" v-if="orderItem.source == 7" />
129
+        <OrderItem :receivegoods="0" :order-item="orderItem" v-if="orderItem.source == 7" />
130 130
         <OtherOrderItem :item="orderItem" v-else />
131 131
       </div>
132 132
       <div class=" flex justify-center items-center text-[12px] text-gray-500" v-if="state.list && state.list.length > 0">

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

@@ -105,7 +105,7 @@ onUnload(() => {
105 105
   <div class="p-3 flex flex-col">
106 106
     <div v-if="state.list.length > 0" class="flex flex-col gap-3">
107 107
       <div v-for="(orderItem, index) in state.list" :key="index">
108
-        <OrderItem :order-item="orderItem" />
108
+        <OrderItem :receivegoods="3" :order-item="orderItem" />
109 109
         <!--        <OtherOrderItem :item="orderItem" v-else/>-->
110 110
       </div>
111 111
       <div class=" flex justify-center items-center text-[12px] text-gray-500"

+ 21 - 3
src/pages/order/components/OrderItem.vue

@@ -23,6 +23,10 @@ const props = defineProps({
23 23
   tabValue: {
24 24
     type: Number,
25 25
     default: 0
26
+  },
27
+  receivegoods: {
28
+    type: Number,
29
+    default: 0
26 30
   }
27 31
 
28 32
 })
@@ -128,7 +132,7 @@ function handlePayment() {
128 132
 }
129 133
 
130 134
 function handleShowOrderDetail(order) {
131
-  console.log(111212121,order)
135
+  console.log(111212121, order)
132 136
   uni.navigateTo({
133 137
     url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
134 138
   })
@@ -167,10 +171,19 @@ function handleTakeOrder(orderItem) {
167 171
       if (res.confirm) {
168 172
         takeOrder(orderItem.order_id).then(res => {
169 173
           // console.log(res)
174
+          
170 175
           uni.showToast({
171 176
             title: '确认收货成功'
172 177
           })
173
-          uni.$emit('orderTakeFromList')
178
+          if(props.receivegoods==0){
179
+            console.log('全部订单');
180
+            
181
+            uni.$emit('AllreloadList')
182
+          }else if(props.receivegoods==3){
183
+            console.log('待收货订单');
184
+            uni.$emit('onTab3PullDownRefresh')
185
+          }
186
+          
174 187
 
175 188
         }).catch(error => {
176 189
           uni.showToast({
@@ -435,7 +448,12 @@ function handleShowDetail(orderItem: any) {
435 448
 
436 449
         <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
437 450
           <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
438
-          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
451
+          <div v-if="orderItem.refund_order_id">
452
+            <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderItem)">售后详情</nut-button>
453
+          </div>
454
+          <div v-else>
455
+            <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
456
+          </div>
439 457
 
440 458
           <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
441 459
 

+ 4 - 2
src/pages/order/components/RefundOrderItem.vue

@@ -42,6 +42,8 @@ function getStatusText(orderItem) {
42 42
   // }
43 43
   // switch (orderItem.status) {
44 44
   // }
45
+  console.log(orderItem);
46
+  
45 47
   if (orderItem.status == -1 && orderItem.refund_type == 2) {
46 48
     // return '退款失败'
47 49
     return '审核未通过'
@@ -57,10 +59,10 @@ function getStatusText(orderItem) {
57 59
   }
58 60
   if (orderItem.status == 1) {
59 61
     // return '待退货'
60
-    return '审核中'
62
+    return '待退货'
61 63
   }
62 64
   if (orderItem.status == 2) {
63
-    return '审核中'
65
+    return '退货中'
64 66
     // return '待收货'
65 67
   }
66 68
   if (orderItem.status == 3) {

+ 31 - 5
src/pages/red-integral/index.vue

@@ -1,6 +1,6 @@
1 1
 <script setup lang="ts">
2 2
 import { useUserStore } from "~/stores/userStore";
3
-import { CDM_URL,CDN_URL } from "~/config/app";
3
+import { CDM_URL, CDN_URL } from "~/config/app";
4 4
 import { encodePhone } from "../../utils";
5 5
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
6 6
 import { getRedIntegralList, getBillIntegralList } from "~/apis/user";
@@ -54,9 +54,35 @@ function handleToVipPage() {
54 54
 }
55 55
 
56 56
 function handleImmediateWithdrawal() {
57
-  uni.navigateTo({
58
-    url: '/pages/immediate-withdrawal/index'
59
-  })
57
+  if (userStore.userInfo.is_ertification == 1) {
58
+    uni.navigateTo({
59
+      url: '/pages/immediate-withdrawal/index?type=2'
60
+    })
61
+  }else{
62
+    setTimeout(() => {
63
+        uni.showModal({
64
+          title: '温馨提示',
65
+          content: '实名认证后才可提现',
66
+          cancelText: "取消", // 取消按钮的文字
67
+          confirmText: "去认证", // 确认按钮的文字
68
+          showCancel: true, // 是否显示取消按钮,默认为 true
69
+          confirmColor: '#f55850',
70
+          success: (res) => {
71
+            if (res.confirm) {
72
+              console.log('comfirm') //点击确定之后执行的代码
73
+              setTimeout(() => {
74
+                uni.navigateTo({
75
+                  url: '/pages/real-name-authentication/index'
76
+                })
77
+              }, 300);
78
+            } else {
79
+              console.log('cancel') //点击取消之后执行的代码
80
+            }
81
+          }
82
+        })
83
+      }, 300);
84
+  }
85
+
60 86
 }
61 87
 </script>
62 88
 
@@ -147,7 +173,7 @@ function handleImmediateWithdrawal() {
147 173
     </div>
148 174
     <div class="flex p_hjf flex-col justify-center ">
149 175
       <div class="text_hjf">红积分</div>
150
-      <div class="hjf_num">{{ userStore.userInfo.red }}</div>
176
+      <div class="hjf_num">{{ parseFloat(Number(userStore.userInfo.red)).toFixed(2).replace(/\.?0+$/, '') }}</div>
151 177
     </div>
152 178
     <div @click="handleToVipPage" class="flex p_add justify-center">
153 179
       <div class="text_add">复购增加红积分</div>

+ 35 - 31
src/pages/refund/index.vue

@@ -1,5 +1,5 @@
1 1
 <script setup lang="ts">
2
-import {refundList} from "~/apis/order.api";
2
+import { refundList } from "~/apis/order.api";
3 3
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4 4
 import RefundOrderItem from "~/pages/order/components/RefundOrderItem.vue";
5 5
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
@@ -27,7 +27,7 @@ onLoad((options) => {
27 27
 })
28 28
 
29 29
 
30
-function loadList(action: 'page' | 'reload',  callback?: (items) => void) {
30
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
31 31
   if (action == 'reload') {
32 32
     state.list = []
33 33
   }
@@ -68,8 +68,16 @@ onReachBottom(() => {
68 68
   handleScrollToLower()
69 69
 
70 70
 })
71
+onPullDownRefresh(() => {
72
+   uni.showLoading({
73
+    title: '加载中'
74
+  })
75
+  loadList('reload');
76
+  uni.hideLoading()
77
+  uni.stopPullDownRefresh();
78
+})
71 79
 // watch(() => state.t)
72
-function handleTabChange(	{title,paneKey,disabled}) {
80
+function handleTabChange({ title, paneKey, disabled }) {
73 81
 
74 82
   console.log(paneKey)
75 83
   if (paneKey == 0) {
@@ -101,44 +109,42 @@ function onClickLeft() {
101 109
 }
102 110
 </script>
103 111
 <template>
104
-  <FNavBar
105
-      title="我的订单" :left-arrow="true" fixed placeholder z-index="999"
106
-      ex-class="bg-white w-screen"
107
-      @click-left="onClickLeft"
108
-  />
109
-  <div class="fixed top-18 bg-white w-screen z-2">
110
-    <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
111
-      <nut-tab-pane title="全部"></nut-tab-pane>
112
-      <nut-tab-pane title="处理中"></nut-tab-pane>
113
-      <nut-tab-pane title="已完成"></nut-tab-pane>
114
-    </nut-tabs>
115
-  </div>
116
-  <div v-if="state.list.length > 0" class="mt-30 flex flex-col p-3">
117
-    <div v-for="(orderItem, index) in state.list" :key="index">
118
-      <RefundOrderItem :order-item="orderItem"/>
112
+  <div class="bg-white">
113
+    <FNavBar title="我的订单" :left-arrow="true" fixed placeholder z-index="999" ex-class="bg-white w-screen"
114
+      @click-left="onClickLeft" />
115
+    <div class="fixed top-18 bg-white w-screen z-2">
116
+      <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
117
+        <nut-tab-pane title="全部"></nut-tab-pane>
118
+        <nut-tab-pane title="处理中"></nut-tab-pane>
119
+        <nut-tab-pane title="已完成"></nut-tab-pane>
120
+      </nut-tabs>
119 121
     </div>
120
-    <div class=" flex justify-center items-center text-[12px] text-gray-500" >
121
-      <div v-if="state.status === 'loading'">
122
-        加载中...
122
+    <div v-if="state.list.length > 0" class="mt-30 flex flex-col p-3" style="background-color: #f8f8f8;">
123
+      <div v-for="(orderItem, index) in state.list" :key="index">
124
+        <RefundOrderItem :order-item="orderItem" />
123 125
       </div>
124
-      <div v-if="state.status === 'noMore'">
125
-        没有更多了~
126
+      <div class=" flex justify-center items-center text-[12px] text-gray-500">
127
+        <div v-if="state.status === 'loading'">
128
+          加载中...
129
+        </div>
130
+        <div v-if="state.status === 'noMore'">
131
+          没有更多了~
132
+        </div>
126 133
       </div>
127 134
     </div>
135
+    <div class="flex h-full flex-col pt-50" v-else>
136
+      <CXBEmpty />
137
+    </div>
128 138
   </div>
129
-  <div class="flex h-full flex-col pt-50" v-else>
130
-    <CXBEmpty />
131
-  </div>
132
-
133 139
 </template>
134 140
 <route lang="yaml">
135 141
 style:
136 142
   navigationBarTitleText: 退款/售后
137 143
   navigationStyle: custom
138
-
144
+  enablePullDownRefresh: true
139 145
 </route>
140 146
 
141
-<style>
147
+<style  >
142 148
 page {
143 149
   background: #f8f8f8;
144 150
 }
@@ -150,6 +156,4 @@ page {
150 156
 .nut-tab-pane {
151 157
   display: none !important;
152 158
 }
153
-
154
-
155 159
 </style>

+ 15 - 2
src/pages/user/login/other-phone.vue

@@ -39,11 +39,21 @@ const userStore = useUserStore()
39 39
 const state = reactive({
40 40
   phone: '',
41 41
   code: '',
42
-
42
+  spread: '',
43 43
   isAuthVerify: false,
44 44
   buttonText: '获取验证码',
45 45
 })
46
-
46
+onLoad((options: any) => {
47
+  console.log(options);
48
+  if (options.scene) {
49
+    let queryString = decodeURIComponent(options.scene)
50
+    console.log(queryString);
51
+    
52
+    // 将字符串按 '&' 分割成数组
53
+    state.spread = queryString.split('=')[1];
54
+    console.log(state.spread);
55
+  }
56
+})
47 57
 function sendCode() {
48 58
   if (state.isAuthVerify) return
49 59
   // if (this.disabled) return;
@@ -128,6 +138,9 @@ function handleLogin() {
128 138
   if (shareId && shareId !== '') {
129 139
     params.share_id = shareId
130 140
   }
141
+  if(state.spread&&state.spread!==''&&state.spread!='0'){
142
+    params.spread=state.spread
143
+  }
131 144
   authSmsLogin({
132 145
     ...params
133 146
   }).then(authRes => {

二進制
src/static/icon/guanbi.png