Browse Source

feat: 我的养老金信息

Basil 3 years ago
parent
commit
5d900f9619

+ 1 - 1
.env.development

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://test.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://app.bjtdba.com'

+ 0 - 64
src/apis/model/loginrespone.json

@@ -1,64 +0,0 @@
1
-{
2
-  "status": 200,
3
-  "message": "success",
4
-  "data": {
5
-    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LmJqdGRiYS5jb20iLCJhdWQiOiJ0ZXN0LmJqdGRiYS5jb20iLCJpYXQiOjE2OTM3MzgzNjQsIm5iZiI6MTY5MzczODM2NCwiZXhwIjoxNzA0NTM4MzY0LCJqdGkiOls5OTI5LCJ1c2VyIl19.l37RvPq47-HK6Hay5FJCLnRef9ELVukVmPU59kCt6l8",
6
-    "exp": 10800000,
7
-    "user": {
8
-      "uid": "9929",
9
-      "wechat_user_id": "0",
10
-      "ali_user_id": "2088002106217164",
11
-      "account": "13488689885",
12
-      "sex": "0",
13
-      "nickname": "134****9885",
14
-      "avatar": "https:\/\/app.bjtdba.com\/uploads\/logo.jpg",
15
-      "phone": "13488689885",
16
-      "now_score": "0.00",
17
-      "now_money": "0.00",
18
-      "member_brokerage_price": "0.00",
19
-      "user_type": "APP",
20
-      "promoter_time": null,
21
-      "is_promoter": "0",
22
-      "pay_count": "0",
23
-      "pay_price": "0.00",
24
-      "spread_count": "0",
25
-      "adr_id": null,
26
-      "identity": "0",
27
-      "mer_id": "0",
28
-      "mer_topping": null,
29
-      "user_name": null,
30
-      "annuity_frozen": "0.00",
31
-      "annuity_num": "0",
32
-      "annuity": "0.00",
33
-      "agent_rebate": "0.00",
34
-      "mer_rebate": "0.00",
35
-      "promoter_rebate": "0.00",
36
-      "cross_store": "0.00",
37
-      "jurisdiction": "0.00",
38
-      "other_jurisdictions": "0.00",
39
-      "adv_fee": "0.00",
40
-      "xqxiaofei": "0.00",
41
-      "birthday60": null,
42
-      "card_number": null,
43
-      "annuity_yiqu": "0.00",
44
-      "is_new": "1",
45
-      "admin_agent_rate": "0.00",
46
-      "locktime": null,
47
-      "user_number": "C000009929",
48
-      "im": "0",
49
-      "im_uuid": null,
50
-      "test_user": "0",
51
-      "is_channel": "0",
52
-      "score": "2.00",
53
-      "annuity_once": "0",
54
-      "first_sign": "1",
55
-      "is_del": "0",
56
-      "first_shopping": "0",
57
-      "external": "1",
58
-      "external_id": null,
59
-      "score_beishengtang": "0.00",
60
-      "level_id": "9542",
61
-      "level": "5"
62
-    }
63
-  }
64
-}

+ 28 - 0
src/apis/model/third-order.model.ts

@@ -0,0 +1,28 @@
1
+/**
2
+ * 三方订单查询结果
3
+ */
4
+export interface ThirdOrderResult {
5
+    list: Array<ThirdOrderModel>
6
+}
7
+
8
+export interface ThirdOrderModel {
9
+    id: string
10
+    goods_id: string
11
+    goods_sign: string//拼多多id
12
+    order_sn: string//订单号
13
+    goods_num: string//商品数量
14
+    goods_img: string//图片
15
+    goods_name: string//名称
16
+    goods_price: string//价格
17
+    other_status: string//订单状态
18
+    other_status_desc: string//状态名称
19
+    order_money: string//订单金额
20
+    pay_money: string//支付金额
21
+    create_time: string//创建时间
22
+    commission: string//佣金
23
+    bill_status: string//结算状态
24
+    bill_end_time: string//结算时间
25
+    source: string
26
+    status_name: string//状态名称
27
+    yanglao: string//养老金
28
+}

+ 112 - 0
src/apis/model/yanglao-log.model.ts

@@ -0,0 +1,112 @@
1
+/**
2
+ * 养老金线上
3
+ */
4
+export interface YanglaoLogXsResult {
5
+    count: number
6
+    list: Array<YanglaoLogXsModel>
7
+}
8
+
9
+/**
10
+ * 养老金线下
11
+ */
12
+export interface YanglaoLogXxResult {
13
+    count: number
14
+    list: Array<YanglaoLogXxModel>
15
+}
16
+
17
+export interface YanglaoLogXsModel {
18
+    bill_id: string
19
+    uid: string
20
+    link_id: string
21
+    pm: string
22
+    title: string
23
+    category: string
24
+    type: string
25
+    number: string//金额
26
+    balance: string
27
+    mark: string//备注
28
+    create_time: string//时间
29
+    status: string//0 = 预估 1 = 有效 -1 = 无效
30
+    commission_type: string
31
+    order_sn: string//订单号
32
+    tripartite: string
33
+    type_shop: string
34
+    mer_id: string
35
+    source: string
36
+    order_type: string
37
+    gzc: string
38
+    mer_name: string
39
+    mer_avatar: string
40
+    product: {
41
+        product: {
42
+            product_id: string
43
+            image: string//商品图片
44
+            store_name: string//	商品名称
45
+            is_show: string
46
+            status: string
47
+            is_del: string
48
+            unit_name: string
49
+            price: string
50
+            mer_status: string
51
+            temp_id: string
52
+            give_coupon_ids: Array<string>
53
+            is_gift_bag: string
54
+            is_used: string
55
+            product_type: string
56
+            old_product_id: string
57
+            temp: {
58
+                shipping_template_id: string
59
+                name: string
60
+                type: string
61
+                appoint: string
62
+                undelivery: string
63
+                mer_id: string
64
+                is_default: string
65
+                sort: string
66
+                create_time: string
67
+//                    regionAddress: string
68
+                undelives: string
69
+            }
70
+            // private Temp temp: string
71
+        }
72
+        productAttr: {
73
+            product_id: string
74
+            stock: string
75
+            price: string
76
+            unique: string
77
+            sku: string
78
+            volume: string
79
+            weight: string
80
+            ot_price: string
81
+            dacang_price: string
82
+            cost: string
83
+            bc_extension_one: string
84
+            bc_extension_two: string
85
+        }
86
+        product_type: string
87
+    }
88
+}
89
+export interface YanglaoLogXxModel {
90
+    bill_id: string
91
+    uid: string
92
+    link_id: string
93
+    pm: string
94
+    title: string
95
+    category: string
96
+    type: string
97
+    number: string//	金额
98
+    balance: string
99
+    mark: string//备注
100
+    create_time: string//时间
101
+    status: string//0 = 预估 1 = 有效 -1 = 无效
102
+    commission_type: string
103
+    order_sn: string//订单号
104
+    tripartite: string
105
+    type_shop: string
106
+    mer_id: string
107
+    source: string
108
+    order_type: string
109
+    gzc: string
110
+    mer_name: string//商户名称
111
+    mer_avatar: string//商户头像
112
+}

+ 2 - 1
src/apis/order.api.ts

@@ -4,6 +4,7 @@ import type {
4 4
     IntegralOrderCreateModel, OrderCheckModel, OrderCreateModel,
5 5
     OrderCreateShoppingModel, OrderListDataModel, OrderListObligationResult, OrderListResult
6 6
 } from "~/apis/model/order.model"
7
+import type {ThirdOrderResult} from "~/apis/model/third-order.model";
7 8
 
8 9
 export interface CartIdRequest {
9 10
     cart_id: Array<string>
@@ -70,7 +71,7 @@ enum API {
70 71
  * 三方订单
71 72
  * @param params
72 73
  */
73
-export function getThirdOrder(params: { type: string, page: number, limit: 10 | number}) {
74
+export function getThirdOrder(params: { type: string, page: number, limit: 20 | number}): Promise<ThirdOrderResult> {
74 75
     return defHttp.get({
75 76
         url: API.USER_THIRD_ORDER,
76 77
         data: {

+ 34 - 1
src/apis/user.ts

@@ -28,6 +28,7 @@ import type {AddressResult, OneAddressModel} from "~/apis/model/address.model";
28 28
 import type {UserVipInfoModel} from "~/apis/model/user-vip-info.model";
29 29
 import type {CertificationRequest} from "~/apis/model/certification.model";
30 30
 import type {RelationRequest} from "~/apis/model/relation.model";
31
+import type {YanglaoLogXsResult, YanglaoLogXxResult} from "~/apis/model/yanglao-log.model";
31 32
 
32 33
 // 会员中心的提现
33 34
 // export function entropy(data) {
@@ -42,6 +43,8 @@ enum API {
42 43
     GET_YANGLAO = '/api/user/get_yanglao',
43 44
     // 养老金记录
44 45
     GET_YANGLAOJIN_STATISTICS = '/api/user/get_yanglao_statistics',
46
+    // 养老金明细
47
+    GET_YANGLAO_LOG = '/api/user/yanglaolog',
45 48
     // 获取用户信息
46 49
     USER = '/api/user',
47 50
     // 获取协议
@@ -413,7 +416,37 @@ export function getUserYangLaoJin(): Promise<UserYanglaoJinModel> {
413 416
 }
414 417
 
415 418
 /**
416
- * 获取平台服务纪晓岚计算
419
+ * 获取线下养老金记录
420
+ */
421
+export function getUserYanglaoJinLogXx(params: {
422
+    page: number
423
+    limit: number
424
+    // 1 线下 0 线上
425
+    source: '99'
426
+}): Promise<YanglaoLogXxResult> {
427
+    return defHttp.get({
428
+        url: API.GET_YANGLAO_LOG
429
+    })
430
+}
431
+/**
432
+ * 获线上取养老金记录
433
+ */
434
+export function getYanglaoJinLogXs(params: {
435
+    page: number
436
+    limit: number
437
+    // 1 线下 0 线上
438
+    // 1 拼多多, 2 唯品会, 3 苏宁, 5 淘宝, 6 京东, 90 线上, 99 线下
439
+    source: ''
440
+}):Promise<YanglaoLogXsResult> {
441
+    return defHttp.get({
442
+        url: API.GET_YANGLAO_LOG,
443
+        data: {
444
+            ...params
445
+        }
446
+    })
447
+}
448
+/**
449
+ * 获取平台服务费计算
417 450
  */
418 451
 export function getWithdrawalService(params: WithdrawalParams): Promise<WithdrawalServiceModel> {
419 452
     return defHttp.post({

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

@@ -60,7 +60,9 @@ const skuList = computed(() => {
60 60
   if (props.detail && props.detail.sku) {
61 61
     for (let key in props.detail.sku) {
62 62
       const skuItem: SkuModel = props.detail.sku[key]
63
+      // if (skuItem.sku !== '') {
63 64
       skuData.push(skuItem)
65
+      // }
64 66
       currentSku.value = skuData[0]
65 67
     }
66 68
   }
@@ -92,6 +94,7 @@ function handleAddCart() {
92 94
 function handleCountChange(value) {
93 95
   emit('count-change', value)
94 96
 }
97
+
95 98
 </script>
96 99
 
97 100
 <template>
@@ -125,7 +128,10 @@ function handleCountChange(value) {
125 128
                 <div class="text-[12px] text-right text-gray-500 ">
126 129
                   剩余库存{{currentSku.stock}}
127 130
                 </div>
128
-                <div class="flex items-end gap-2" >
131
+                <div class="flex items-end gap-2" v-if="detail.mer_id === '148'">
132
+                  {{ currentSku.price * 30 }} 积分
133
+                </div>
134
+                <div class="flex items-end gap-2" v-else>
129 135
                   <FPrice :price="currentSku.price"/>
130 136
                   <FPrice v-if="detail && detail.ot_price" :price="detail.ot_price" :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through/>
131 137
                 </div>

+ 5 - 0
src/components/FTabs/FTabs.vue

@@ -10,6 +10,10 @@ const props = defineProps({
10 10
   current: {
11 11
     type: String,
12 12
     default: ''
13
+  },
14
+  exClass: {
15
+    type: String,
16
+    default: ''
13 17
   }
14 18
 })
15 19
 
@@ -35,6 +39,7 @@ function handleClick(currentTab: string) {
35 39
 
36 40
   <scroll-view
37 41
       class=" whitespace-nowrap  w-screen absolute top-25 text-white text-sm"
42
+      :class="exClass"
38 43
       :scroll-with-animation="true"
39 44
       :scroll-x="true"
40 45
       :show-scrollbar="false"

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


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

@@ -47,6 +47,12 @@ onLoad(() => {
47 47
   getYanglaojinStatistics().then(res => {
48 48
     // state.all_yanglao = res.all_yanglao
49 49
     yanglaoStatistics.value = res
50
+  }).catch(error => {
51
+    if (error === '未登录') {
52
+      uni.navigateTo({
53
+        url: '/pages/user/login/index'
54
+      })
55
+    }
50 56
   })
51 57
 })
52 58
 function handleThirdBind() {
@@ -119,17 +125,17 @@ function handleToCitic() {
119 125
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
120 126
           <div class="flex flex-col justify-center items-center">
121 127
             <div class="text-xs">总养老金</div>
122
-            <div class="text-[#F94032] font-bold text-[28px]">¥0.00</div>
128
+            <div class="text-[#F94032] font-bold text-[28px]">¥{{yanglaoStatistics.all_yanglao}}</div>
123 129
           </div>
124 130
           <div class=" flex justify-around w-full">
125
-            <div class="flex flex-col justify-center items-center ">
131
+            <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
126 132
               <div class="font-bold">
127 133
                 ¥ {{yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a}}
128 134
               </div>
129 135
               <div class="text-xs text-gray-400">预估养老金</div>
130 136
             </div>
131 137
 
132
-            <div class="flex flex-col justify-center items-center pl-3">
138
+            <div class="flex flex-col justify-center items-center pl-3" v-if="yanglaoStatistics">
133 139
               <div>¥ {{yanglaoStatistics.all_yanglao_a}}</div>
134 140
               <div class="text-xs text-gray-400">已结算</div>
135 141
             </div>

+ 107 - 0
src/pages/dacang/list/components/dacang-header.vue

@@ -0,0 +1,107 @@
1
+<script lang="ts" setup>
2
+import {computed, PropType} from "vue";
3
+import FSearch from "~/components/FSearch/FSearch.vue";
4
+import type {UserInfoModel} from "~/apis/model/userInfoModel";
5
+import {useUserStore} from "~/stores/userStore";
6
+// import {useUserStore} from "~/stores/userStore";
7
+const userStore = useUserStore()
8
+
9
+const systemInfo = uni.getSystemInfoSync()
10
+const statusBarHeight = systemInfo.statusBarHeight ?? 0
11
+const navBarHeight = computed(() => {
12
+  // const propsHeight = Number(props.height)
13
+  let defaultHeight = 44
14
+  // #ifdef MP
15
+  // if (props.fixed) {
16
+  const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
17
+  const menuHeight = menuButtonInfo.height
18
+  const menuTop = menuButtonInfo.top
19
+  defaultHeight = (menuTop - statusBarHeight) * 2 + menuHeight
20
+  // }
21
+  // #endif
22
+  // return propsHeight || defaultHeight
23
+  return defaultHeight
24
+})
25
+
26
+const navBarStyle = computed(() => {
27
+  return {
28
+    paddingTop: `${statusBarHeight}px`,
29
+  }
30
+})
31
+
32
+const props = defineProps({
33
+  exClass: {
34
+    type: String
35
+  },
36
+  tabs: {
37
+    type: Array
38
+  },
39
+  // userInfo: {
40
+  //   type: Object as PropType<UserInfoModel>,
41
+  //   required: true
42
+  // },
43
+  yanglaojin: {
44
+    type: Number,
45
+    default: NaN
46
+  },
47
+  current: {
48
+    type: String
49
+  }
50
+})
51
+function handleClick() {
52
+  if (userStore.userInfo) {
53
+    uni.navigateTo({
54
+      url: '/pages/annuity/index'
55
+    })
56
+  } else {
57
+    uni.navigateTo({
58
+      url: '/pages/user/login/index?key=30'
59
+    })
60
+  }
61
+}
62
+
63
+// function handleShowSearchPage() {
64
+//
65
+// }
66
+const emit = defineEmits<{
67
+  (e: 'click:item', value:string): void
68
+}>()
69
+function handleTabItemClick(currentTab) {
70
+  emit('click:item', currentTab)
71
+}
72
+
73
+</script>
74
+<template>
75
+  <div class="home-header fixed w-screen text-white z-10 w-full h-32"
76
+       :class="exClass"
77
+  >
78
+    <div class="pl-2 pt-2"
79
+         :style="navBarStyle"
80
+    >
81
+      <div class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red">
82
+
83
+        <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
84
+               mode="widthFix"
85
+               class="w-4 h-4  pl-2 py-1"
86
+        ></image>
87
+        <div class="flex flex-1 items-center w-100%">
88
+          <div class="flex-1 pl-2 text-gray">搜索商品关键词</div>
89
+          <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
90
+            搜索
91
+          </div>
92
+        </div>
93
+
94
+
95
+      </div>
96
+
97
+    </div>
98
+
99
+<!--    <div class="p-3">-->
100
+      <div class=" mr-6 mb-3">
101
+        <FTabs :tabs="tabs" :ex-class="exClass" @click:item="handleTabItemClick"/>
102
+
103
+      </div>
104
+<!--    </div>-->
105
+
106
+  </div>
107
+</template>

+ 0 - 46
src/pages/dacang/list/components/header.vue

@@ -1,46 +0,0 @@
1
-<script lang="ts" setup>
2
-import {computed} from "vue";
3
-import FSearch from "~/components/FSearch/FSearch.vue";
4
-
5
-const systemInfo = uni.getSystemInfoSync()
6
-const statusBarHeight = systemInfo.statusBarHeight ?? 0
7
-const navBarHeight = computed(() => {
8
-  // const propsHeight = Number(props.height)
9
-  let defaultHeight = 44
10
-  // #ifdef MP
11
-  // if (props.fixed) {
12
-  const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
13
-  const menuHeight = menuButtonInfo.height
14
-  const menuTop = menuButtonInfo.top
15
-  defaultHeight = (menuTop - statusBarHeight) * 2 + menuHeight
16
-  // }
17
-  // #endif
18
-  // return propsHeight || defaultHeight
19
-  return defaultHeight
20
-})
21
-
22
-const navBarStyle = computed(() => {
23
-  return {
24
-    paddingTop: `${statusBarHeight}px`,
25
-  }
26
-})
27
-</script>
28
-<template>
29
-  <div class="home-header fixed w-screen "
30
-       :style="navBarStyle"
31
-  >
32
-    <div class="flex gap-2 mb-2 pl-2">
33
-      <image src="https://app.bjtdba.com/uploads/logo.jpg"
34
-             mode="widthFix"
35
-             class="w-9 h-9 rounded-full"
36
-      />
37
-      <div class="flex flex-col text-white">
38
-        <div class="text-sm">134****9885</div>
39
-        <div class="text-xs">0.00 元养老金</div>
40
-      </div>
41
-    </div>
42
-
43
-    <FSearch />
44
-
45
-  </div>
46
-</template>

+ 45 - 19
src/pages/dacang/list/index.vue

@@ -6,6 +6,9 @@ import ProductList from "~/components/ProductList/ProductList.vue";
6 6
 import type {DcProductModel} from "~/apis/model/dacang.model";
7 7
 import {useDacangStore} from "~/stores/dacangStore";
8 8
 import {CDN_URL} from "~/config/app";
9
+import DacangHeader from "~/pages/dacang/list/components/dacang-header.vue";
10
+const headerImage = CDN_URL + `/static/assets/banner-dacang.png`
11
+
9 12
 const state = reactive({
10 13
   tabs: [],
11 14
   productList: <Array<DcProductModel>>[]
@@ -52,34 +55,57 @@ function handleTabItemClick(currentTab) {
52 55
     loadDcProductList(currentTab)
53 56
   // }
54 57
 }
55
-const headerImage = CDN_URL + `/static/assets/banner-dacang.png`
58
+
59
+const headerClass = ref('')
60
+
61
+onPageScroll((page) => {
62
+  // page.scrollTop
63
+  if (page.scrollTop >= 76 ) {
64
+    headerClass.value = '!bg-primary !text-white'
65
+  } else {
66
+    headerClass.value = ''
67
+  }
68
+})
56 69
 </script>
57 70
 <template>
58
-  <div>
59
-    <FNavBar :fixed="true" exClass="pl-2">
60
-      <div class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red"
61
-
62
-      >
63
-
64
-        <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
65
-               mode="widthFix"
66
-               class="w-4 h-4  pl-2 py-1"
67
-        ></image>
68
-        <div class="flex flex-1 items-center w-100%">
69
-          <div class="flex-1 pl-2 text-gray">搜索商品关键词</div>
70
-          <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
71
-            搜索
72
-          </div>
73
-        </div>
71
+  <div class="h-screen">
72
+    <DacangHeader fixed
73
+                  :tabs="state.tabs"
74
+                  :ex-class="headerClass"
75
+                  :current="classifyId"
76
+                  @click:item="handleTabItemClick"
77
+    />
78
+    <!--
79
+    <div class=" z-10"  >
80
+      <div :class="headerClass">
81
+        <FNavBar :fixed="true" exClass="pl-2">
82
+          <div class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red">
83
+
84
+            <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
85
+                   mode="widthFix"
86
+                   class="w-4 h-4  pl-2 py-1"
87
+            ></image>
88
+            <div class="flex flex-1 items-center w-100%">
89
+              <div class="flex-1 pl-2 text-gray">搜索商品关键词</div>
90
+              <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
91
+                搜索
92
+              </div>
93
+            </div>
74 94
 
75 95
 
96
+          </div>
97
+
98
+        </FNavBar>
99
+        <FTabs :tabs="state.tabs" :current="classifyId" @click:item="handleTabItemClick"/>
76 100
       </div>
77
-    </FNavBar>
101
+
102
+    </div>
103
+-->
104
+
78 105
 <!--    <FSearch :fixed="true"/>-->
79 106
     <div class="flex flex-col gap-2 ">
80 107
       <image :src="headerImage" mode="widthFix" class="w-full h-50"></image>
81 108
 
82
-    <FTabs :tabs="state.tabs" :current="classifyId" @click:item="handleTabItemClick"/>
83 109
 
84 110
     <ProductList :list="state.productList" />
85 111
     </div>

+ 21 - 12
src/pages/home/components/header.vue

@@ -2,7 +2,9 @@
2 2
 import {computed, PropType} from "vue";
3 3
 import FSearch from "~/components/FSearch/FSearch.vue";
4 4
 import type {UserInfoModel} from "~/apis/model/userInfoModel";
5
+import {useUserStore} from "~/stores/userStore";
5 6
 // import {useUserStore} from "~/stores/userStore";
7
+const userStore = useUserStore()
6 8
 
7 9
 const systemInfo = uni.getSystemInfoSync()
8 10
 const statusBarHeight = systemInfo.statusBarHeight ?? 0
@@ -31,19 +33,25 @@ const props = defineProps({
31 33
   exClass: {
32 34
     type: String
33 35
   },
34
-  userInfo: {
35
-    type: Object as PropType<UserInfoModel>,
36
-    required: true
37
-  },
36
+  // userInfo: {
37
+  //   type: Object as PropType<UserInfoModel>,
38
+  //   required: true
39
+  // },
38 40
   yanglaojin: {
39 41
     type: Number,
40 42
     default: NaN
41 43
   }
42 44
 })
43 45
 function handleClick() {
44
-  uni.navigateTo({
45
-    url: '/pages/annuity/index'
46
-  })
46
+  if (userStore.userInfo) {
47
+    uni.navigateTo({
48
+      url: '/pages/annuity/index'
49
+    })
50
+  } else {
51
+    uni.navigateTo({
52
+      url: '/pages/user/login/index?key=30'
53
+    })
54
+  }
47 55
 }
48 56
 
49 57
 // function handleShowSearchPage() {
@@ -59,8 +67,8 @@ function handleClick() {
59 67
         @click="handleClick"
60 68
         class="flex gap-2 mb-2 pl-2"
61 69
     >
62
-      <image v-if="userInfo && userInfo.avatar"
63
-             :src="userInfo.avatar"
70
+      <image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar"
71
+             :src="userStore.userInfo.avatar"
64 72
              mode="widthFix"
65 73
              class="w-9 h-9 rounded-full"
66 74
       />
@@ -71,9 +79,10 @@ function handleClick() {
71 79
              class="w-9 h-9 rounded-full"
72 80
       />
73 81
       <div class="flex flex-col ">
74
-        <div class="text-sm" v-if="userInfo">{{ userInfo.nickname ? userInfo.nickname : '登录'}}</div>
75
-        <div class="text-xs" v-if="!isNaN(yanglaojin)">{{ yanglaojin }}元养老金</div>
76
-        <div v-else class="text-sm">
82
+        <div class="text-sm" v-if="userStore.userInfo && userStore.userInfo.nickname">{{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录'}}</div>
83
+        <div class="text-sm" v-else>登录</div>
84
+        <div class="text-xs" v-if="!isNaN(yanglaojin) && userStore.userInfo">{{ yanglaojin }}元养老金</div>
85
+        <div v-else class="text-xs">
77 86
           领取养老金
78 87
         </div>
79 88
       </div>

+ 20 - 16
src/pages/home/index.vue

@@ -56,17 +56,21 @@ onLoad(() => {
56 56
   getNoticeList().then(res => {
57 57
     state.announcementList = res.list
58 58
   })
59
-  // 2 检查用户签到信息
60
-  getNewSignInInfo().then(res => {
61
-    const { today, day } = res
62
-    state.signToday = today
63
-    if (today === 0) {
64
-      state.isShowSignIn = true
65
-    }
66
-    // // if (today === 0) {
67
-    //   2.1 弹出签到窗口
68
-    // }
69
-  })
59
+  if (userStore.userInfo) {
60
+    // 2 检查用户签到信息
61
+    getNewSignInInfo().then(res => {
62
+      const {today, day} = res
63
+      state.signToday = today
64
+      if (today === 0) {
65
+        state.isShowSignIn = true
66
+      }
67
+      // // if (today === 0) {
68
+      //   2.1 弹出签到窗口
69
+      // }
70
+    }).catch(error => {
71
+      console.error(error + '->GetNewsSignInInfo')
72
+    })
73
+  }
70 74
   state.page = 1
71 75
   loadProductList()
72 76
 })
@@ -75,8 +79,7 @@ watch(() => state.isShowSignIn, (val) => {
75 79
   val ? uni.hideTabBar() : uni.showTabBar()
76 80
 })
77 81
 const headerClass = ref('')
78
-// const headerClass = computed(() => {
79
-// })
82
+
80 83
 onPageScroll((page) => {
81 84
   // page.scrollTop
82 85
   if (page.scrollTop >= 76 ) {
@@ -113,14 +116,15 @@ function loadProductList() {
113 116
       }, 300)
114 117
     }
115 118
     uni.hideLoading()
119
+  }).catch(error => {
120
+    console.error(error + '->getProduct')
116 121
   })
117 122
 }
118 123
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
119 124
 </script>
120 125
 <template>
121 126
   <div class="h-screen ">
122
-    <Header :user-info="userStore.userInfo"
123
-            :yanglaojin="state.all_yanglao"
127
+    <Header :yanglaojin="state.all_yanglao"
124 128
             :exClass="headerClass"
125 129
     />
126 130
     <div class="flex flex-col gap-3 ">
@@ -148,7 +152,7 @@ page {
148 152
   background-color: #f8f8f8;
149 153
 }
150 154
 </style>
151
-<route lang="yaml">
155
+<route lang="yaml"  type="home">
152 156
 style:
153 157
   navigationStyle: custom
154 158
   navigationBarTitleText: 储蓄保

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

@@ -1,121 +0,0 @@
1
-{
2
-  "status": 200,
3
-  "message": "success",
4
-  "data": {
5
-    "count": 1,
6
-    "list": [
7
-      {
8
-        "group_order_id": "4345",
9
-        "group_order_sn": "wx1693385272076388560",
10
-        "uid": "10086",
11
-        "total_postage": "0.00",
12
-        "total_price": "9.90",
13
-        "total_num": "1",
14
-        "coupon_price": "0.00",
15
-        "real_name": "刘",
16
-        "user_phone": "13488689885",
17
-        "user_address": "北京顺义区光明街道 好",
18
-        "pay_price": "9.90",
19
-        "pay_postage": "0.00",
20
-        "cost": "8.52",
21
-        "give_coupon_ids": "",
22
-        "paid": "0",
23
-        "pay_time": null,
24
-        "pay_type": "0",
25
-        "create_time": "2023-08-30 16:47:52",
26
-        "is_remind": "1",
27
-        "is_del": "0",
28
-        "rand": "",
29
-        "split": "0",
30
-        "serialNumber": "",
31
-        "test_order": "0",
32
-        "hf_pay_id": "",
33
-        "pay_wx": null,
34
-        "mer_id": "321",
35
-        "orderList": [
36
-          {
37
-            "order_id": "3917",
38
-            "orderProduct": [
39
-              {
40
-                "order_product_id": "4194",
41
-                "order_id": "3917",
42
-                "uid": "10086",
43
-                "cart_id": "10103",
44
-                "product_id": "5596",
45
-                "extension_one": "0.00",
46
-                "extension_two": "0.00",
47
-                "product_sku": "ca0315e5d940",
48
-                "is_refund": "0",
49
-                "product_num": "1",
50
-                "refund_num": "1",
51
-                "is_reply": "0",
52
-                "product_price": "9.90",
53
-                "cart_info": {
54
-                  "product": {
55
-                    "product_id": "5596",
56
-                    "image": "https:\/\/img.funengscm.com\/9cd5c46fd77ad01148262061098311bf",
57
-                    "store_name": "LP-363071蓝漂压缩毛巾1袋",
58
-                    "is_show": "1",
59
-                    "status": "1",
60
-                    "is_del": "0",
61
-                    "unit_name": "个",
62
-                    "price": "9.90",
63
-                    "mer_status": "1",
64
-                    "temp_id": "105",
65
-                    "give_coupon_ids": [],
66
-                    "is_gift_bag": "0",
67
-                    "is_used": "1",
68
-                    "product_type": "0",
69
-                    "old_product_id": "710",
70
-                    "temp": {
71
-                      "shipping_template_id": "105",
72
-                      "name": "包邮",
73
-                      "type": "0",
74
-                      "appoint": "0",
75
-                      "undelivery": "0",
76
-                      "mer_id": "0",
77
-                      "is_default": "0",
78
-                      "sort": "0",
79
-                      "create_time": "2020-07-13 17:30:51",
80
-                      "regionAddress": null,
81
-                      "undelives": null,
82
-                      "freeAddress": null
83
-                    }
84
-                  },
85
-                  "productAttr": {
86
-                    "gong_mer_profit": "0.69",
87
-                    "gong_pension": "0.34",
88
-                    "gong_market_price": "9.90",
89
-                    "cost_price": "8.52",
90
-                    "product_id": "5596",
91
-                    "stock": "97",
92
-                    "price": "9.90",
93
-                    "unique": "ca0315e5d940",
94
-                    "sku": "1袋*20颗",
95
-                    "volume": "0.00",
96
-                    "weight": "0.00",
97
-                    "ot_price": "12.50",
98
-                    "dacang_price": "0.00",
99
-                    "cost": "8.52",
100
-                    "bc_extension_one": 0,
101
-                    "bc_extension_two": 0,
102
-                    "seckill": 0
103
-                  },
104
-                  "product_type": "0"
105
-                },
106
-                "create_time": "2023-08-30 16:47:52",
107
-                "type": "5"
108
-              }
109
-            ],
110
-            "group_order_id": "4345"
111
-          }
112
-        ],
113
-        "merchant": {
114
-          "mer_id": "321",
115
-          "mer_name": "大仓创客",
116
-          "mer_avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20220428\/d616961db8aefbe92f72972a1d7db88a.png"
117
-        }
118
-      }
119
-    ]
120
-  }
121
-}

+ 87 - 4
src/pages/order/third-order.vue

@@ -1,7 +1,46 @@
1 1
 <template>
2 2
   <nut-tabs v-model="state.tabvalue">
3 3
     <nut-tab-pane title="京东">
4
-      <CXBEmpty />
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>
11
+
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>
15
+
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 }}
24
+                  </div>
25
+                </div>
26
+                <div class="flex text-[11px] w-15 justify-end">{{ 'X' + item.goods_num }}</div>
27
+              </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>
34
+              </div>
35
+            </div>
36
+          </div>
37
+
38
+
39
+        </div>
40
+<!--        <div>{{ item.status_name }}</div>-->
41
+
42
+      </div>
43
+      <CXBEmpty v-else/>
5 44
 
6 45
     </nut-tab-pane>
7 46
     <nut-tab-pane title="唯品会">
@@ -24,6 +63,7 @@
24 63
 <script setup lang="ts">
25 64
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
26 65
 import {getThirdOrder} from "~/apis/order.api";
66
+import FPrice from "~/components/FPrice/FPrice.vue";
27 67
 enum TYPE {
28 68
   JD = '6',
29 69
   TB = '5',
@@ -41,7 +81,12 @@ const state = reactive({
41 81
   // 待付款订单列表
42 82
   obligationOrderList: [],
43 83
 
44
-  orderList: [],
84
+  jdOrderList: [],
85
+  tbOrderList: [],
86
+  pddOrderList: [],
87
+  dyOrderList: [],
88
+  vipOrderList: [],
89
+  suOrderList: []
45 90
 });
46 91
 
47 92
 onLoad(() => {
@@ -77,10 +122,41 @@ watch(() => state.tabvalue, (val) => {
77 122
     }
78 123
   }
79 124
 })
80
-function loadOrderList(type: string) {
125
+function loadOrderList(type: TYPE) {
81 126
 
82 127
   getThirdOrder({type, page: 1, limit: 10}).then(res => {
83
-    state.orderList = res
128
+    switch (type) {
129
+      case TYPE.JD: {
130
+        state.jdOrderList = res.list
131
+        break
132
+      }
133
+      case TYPE.VIP: {
134
+        state.vipOrderList = res.list
135
+        break
136
+      }
137
+      case TYPE.PDD: {
138
+        state.pddOrderList = res.list
139
+        break
140
+      }
141
+      case TYPE.DY: {
142
+        state.dyOrderList = res.list
143
+        break
144
+      }
145
+      case TYPE.SU: {
146
+        state.suOrderList = res.list
147
+        break
148
+      }
149
+      case TYPE.TB: {
150
+        state.tbOrderList = res.list
151
+        break
152
+      }
153
+    }
154
+  }).catch(error => {
155
+    if (error === '请登录') {
156
+      uni.redirectTo({
157
+        url: '/pages/user/login/index'
158
+      })
159
+    }
84 160
   })
85 161
 }
86 162
 </script>
@@ -90,3 +166,10 @@ style:
90 166
   navigationBarTitleText: 三方订单
91 167
   enablePullDownRefresh: true
92 168
 </route>
169
+<style>
170
+
171
+.nut-tab-pane {
172
+  background: #f5f5f5 !important;
173
+}
174
+
175
+</style>

+ 17 - 5
src/pages/pension_account/index.vue

@@ -1,7 +1,17 @@
1 1
 <script lang="ts" setup>
2 2
 import {CDN_URL} from "~/config/app";
3
+import {getUserYangLaoJin} from "~/apis/user";
3 4
 const annuity_yuan_220713Image = CDN_URL + '/static/assets/annuity_yuan_220713.png'
4 5
 const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
6
+const userStore = useUserStore()
7
+
8
+const userYangLaoJin = ref({})
9
+
10
+onLoad(() => {
11
+  getUserYangLaoJin().then(res => {
12
+    userYangLaoJin.value = res
13
+  })
14
+})
5 15
 </script>
6 16
 
7 17
 <template>
@@ -13,7 +23,7 @@ const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
13 23
                  mode="widthFix"
14 24
                  class="w-9 h-9 rounded"
15 25
           />
16
-          <div>用户</div>
26
+          <div>{{ userStore.userInfo.nickname }}</div>
17 27
         </div>
18 28
 
19 29
         <div class="">
@@ -28,19 +38,19 @@ const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
28 38
 
29 39
             <div class="flex content-end items-end">
30 40
               <div class="">¥</div>
31
-              <div class="text-[32px] font-bold ">0.00</div>
41
+              <div class="text-[32px] font-bold ">{{ userStore.yanglao.all_yanglao}}</div>
32 42
             </div>
33 43
 
34 44
             <div class="flex justify-around w-full divide-gray divide-gray-1 h-15">
35 45
               <div class="flex flex-col justify-center items-center ">
36 46
                 <div class="font-bold flex ">
37 47
                   <div>¥</div>
38
-                  <div>0.00</div>
48
+                  <div>{{ userStore.yanglao.all_yanglao }}</div>
39 49
                 </div>
40 50
                 <div class="text-xs text-light-100">补贴养老金</div>
41 51
               </div>
42 52
               <div class="flex flex-col justify-center items-center ">
43
-                <div class="font-bold">¥0.00</div>
53
+                <div class="font-bold">¥{{ userStore.yanglao.all_yanglao_a }}</div>
44 54
                 <div class="text-xs text-light-100">已结算养老金</div>
45 55
               </div>
46 56
             </div>
@@ -76,7 +86,9 @@ const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
76 86
               </div>
77 87
               <div class="block mt-3">
78 88
                 <div>法定提取时间</div>
79
-                <div class="text-gray">未实名认证</div>
89
+                <div class="text-gray">
90
+                  {{ userYangLaoJin.birthday60 }}
91
+                </div>
80 92
               </div>
81 93
             </div>
82 94
 

+ 18 - 2
src/pages/pension_choice_platform/index.vue

@@ -3,32 +3,48 @@ import {CDN_URL} from "~/config/app";
3 3
 
4 4
 const list = [{
5 5
   title: '京东',
6
-  icon: CDN_URL + '/static/assets/jingdong_d.png'
6
+  icon: CDN_URL + '/static/assets/jingdong_d.png',
7
+  type: '6'
7 8
 }, {
9
+  type: '2',
8 10
   title: '唯品会',
9 11
   icon: CDN_URL + '/static/assets/weipinhui_d.png'
10 12
 }, {
13
+  type: '3',
11 14
   title: '苏宁易购',
12 15
   icon: CDN_URL + '/static/assets/suningyigou_d.png'
13 16
 }, {
17
+  type: '5',
14 18
   title: '淘宝',
15 19
   icon: CDN_URL + '/static/assets/taobaoyanglao_d.png'
16 20
 }, {
21
+  type: '9',
17 22
   title: '抖音',
18 23
   icon: CDN_URL + '/static/assets/douyin_d_230313.png'
19 24
 }, {
25
+  type: '1',
20 26
   title: '拼多多',
21 27
   icon: CDN_URL + '/static/assets/pinduoduo_d.png'
22 28
 }, {
29
+  type: '90',
23 30
   title: '储蓄宝',
24 31
   icon: CDN_URL + '/static/assets/cxb_logo_230316.png'
25 32
 }]
33
+
34
+function handleItemClick(item) {
35
+  uni.navigateTo({
36
+    url: '/pages/pension_record/list?type=' + item.type
37
+  })
38
+}
26 39
 </script>
27 40
 <template>
28 41
   <div class="py-3">
29 42
     <div class="bg-white py-2">
30 43
       <div class=" grid grid-cols-4 gap-4">
31
-        <div v-for="(item, index) in list" :key="index" class="flex flex-col justify-center items-center gap-1">
44
+        <div
45
+            @tap="handleItemClick(item)"
46
+            v-for="(item, index) in list" :key="index" class="flex flex-col justify-center items-center gap-1"
47
+        >
32 48
           <image :src="item.icon" mode="widthFix" class="w-12 h-12"></image>
33 49
           <div class="text-xs">{{ item.title }}</div>
34 50
         </div>

+ 72 - 0
src/pages/pension_record/detail.vue

@@ -0,0 +1,72 @@
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
+  yanglao: '',
7
+  trading_hour: '',
8
+  status_name: '',
9
+  shop_name: '',
10
+  order_no: '',
11
+  remark: '',
12
+  tradeType: ''
13
+})
14
+// const props = defineProps({
15
+//   detail: {
16
+//     type: Object,
17
+//     required: true
18
+//   }
19
+// })
20
+onLoad((options) => {
21
+  if (options.detail) {
22
+    detail.value = JSON.parse(decodeBase64(options.detail))
23
+    if (detail.value && detail.value.tradeType) {
24
+      uni.setNavigationBarTitle({
25
+        title: '推广佣金获取详情'
26
+      })
27
+    }
28
+  }
29
+})
30
+</script>
31
+
32
+<template>
33
+  <div>
34
+    <div class="flex flex-col f-hairline-bottom py-4 justify-center items-center text-[12px] gap-3">
35
+      <div>金额</div>
36
+      <FPrice :price="detail.yanglao" ex-class="text-xl font-bold !text-black"></FPrice>
37
+    </div>
38
+
39
+    <div class="flex flex-col text-[12px] p-4 gap-3">
40
+      <div class="flex gap-4">
41
+        <div class="text-gray w-1/5">交易类型</div>
42
+        <div class="w-4/5">{{ detail.tradeType ? '推广佣金获取' : '养老金获取'}}</div>
43
+      </div>
44
+      <div class="flex gap-4">
45
+        <div class="text-gray w-1/5">交易时间</div>
46
+        <div class="w-4/5">{{ detail.create_time}}</div>
47
+      </div>
48
+      <div class="flex gap-4">
49
+        <div class="text-gray w-1/5">交易状态</div>
50
+        <div class="4/5">{{ detail.other_status_desc }}</div>
51
+      </div>
52
+      <div class="flex gap-4">
53
+        <div class="text-gray w-1/5">商品名称</div>
54
+        <div class="line-clamp-2 w-4/5">{{ detail.goods_name }}</div>
55
+      </div>
56
+      <div class="flex gap-4">
57
+        <div class="text-gray w-1/5">流水单号</div>
58
+        <div class="w-4/5">{{ detail.order_sn }}</div>
59
+      </div>
60
+      <div class="flex gap-4">
61
+        <div class="text-gray w-1/5">备注</div>
62
+        <div class="w-4/5">{{ detail.remark }}</div>
63
+      </div>
64
+    </div>
65
+
66
+  </div>
67
+</template>
68
+
69
+<route lang="yaml">
70
+style:
71
+  navigationBarTitleText: 养老金详情
72
+</route>

+ 29 - 13
src/pages/pension_record/index.vue

@@ -8,6 +8,12 @@ onLoad(() => {
8 8
   getYanglaojinStatistics().then(res => {
9 9
     // state.all_yanglao = res.all_yanglao
10 10
     yanglaoStatistics.value = res
11
+  }).catch(error => {
12
+    if (error === '请登录') {
13
+      uni.navigateTo({
14
+        url: '/pages/user/login/index'
15
+      })
16
+    }
11 17
   })
12 18
 })
13 19
 
@@ -16,6 +22,12 @@ function handleChoicePlatform() {
16 22
     url: '/pages/pension_choice_platform/index'
17 23
   })
18 24
 }
25
+
26
+function handleShow99List() {
27
+  uni.navigateTo({
28
+    url: '/pages/pension_record/list?type=99'
29
+  })
30
+}
19 31
 const dianshang_yanglaojinImage = CDN_URL + '/static/assets/dianshang_yanglaojin.png'
20 32
 const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin.png'
21 33
 </script>
@@ -31,7 +43,9 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
31 43
             </div>
32 44
 
33 45
             <div class="flex content-end items-end">
34
-              <div class="text-[32px] font-bold ">0</div>
46
+              <div class="text-[32px] font-bold " v-if="yanglaoStatistics">
47
+                {{ yanglaoStatistics.all_num }}
48
+              </div>
35 49
             </div>
36 50
 
37 51
             <div class="flex justify-around w-full divide-gray divide-gray-1 h-15">
@@ -39,14 +53,16 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
39 53
                 <div class="text-xs text-light-100">
40 54
                   未结算(补贴)养老金:
41 55
                 </div>
42
-                <div class="font-bold flex ">
56
+                <div class="font-bold flex " v-if="yanglaoStatistics">
43 57
                   <div>¥</div>
44
-                  <div>0.00</div>
58
+                  <div>
59
+                    {{ yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a}}
60
+                  </div>
45 61
                 </div>
46 62
               </div>
47
-              <div class="flex flex-col justify-center items-center ">
63
+              <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
48 64
                 <div class="text-xs text-light-100">已结算养老金:</div>
49
-                <div class="font-bold">¥0.00</div>
65
+                <div class="font-bold">¥{{ yanglaoStatistics.all_yanglao_a }}</div>
50 66
 
51 67
               </div>
52 68
             </div>
@@ -57,15 +73,15 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
57 73
         </div>
58 74
 
59 75
       </div>
60
-      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3">
61
-        <div class=" border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b pb-2">电商平台消费(单):0</div>
62
-        <div class="flex justify-between text-xs">
63
-          <div>已结算(单):{{ yanglaoStatistics.all_yanglao_a }}</div>
64
-          <div>未结算(单):{{ yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a }}</div>
76
+      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3" v-if="yanglaoStatistics && yanglaoStatistics.third_party_num">
77
+        <div class=" border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b pb-2">电商平台消费(单):{{ yanglaoStatistics.third_party_num.all_num}}</div>
78
+        <div class="flex justify-between text-xs" v-if="yanglaoStatistics">
79
+          <div>已结算(单):{{ yanglaoStatistics.all_yanglao_a.all_num_a }}</div>
80
+          <div v-if="yanglaoStatistics.third_party_num_n">未结算(单):{{ yanglaoStatistics.third_party_num_n.all_num_n }}</div>
65 81
         </div>
66 82
       </div>
67 83
 
68
-      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3">
84
+      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3" v-if="yanglaoStatistics">
69 85
         <div class=" border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b pb-2">
70 86
           实体店消费(单):{{ yanglaoStatistics.offLine.num }}
71 87
         </div>
@@ -74,7 +90,7 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
74 90
         </div>
75 91
       </div>
76 92
 
77
-      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3">
93
+      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3" v-if="yanglaoStatistics">
78 94
         <div class=" border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b pb-2">
79 95
           线上店铺消费(单):{{ yanglaoStatistics.onLine.num + yanglaoStatistics.onLine_take_no.num }}
80 96
         </div>
@@ -88,7 +104,7 @@ const shitidian_yanglaojinImage = CDN_URL + '/static/assets/shitidian_yanglaojin
88 104
       <div @tap="handleChoicePlatform">
89 105
         <image :src="dianshang_yanglaojinImage" mode="widthFix"></image>
90 106
       </div>
91
-      <div>
107
+      <div @tap="handleShow99List">
92 108
         <image :src="shitidian_yanglaojinImage" mode="widthFix"></image>
93 109
       </div>
94 110
     </div>

+ 65 - 0
src/pages/pension_record/list.json

@@ -0,0 +1,65 @@
1
+{
2
+  "status": 200,
3
+  "message": "获取订单列表成功",
4
+  "data": {
5
+    "list": [
6
+      {
7
+        "id": "2096",
8
+        "goods_id": "10084616549984",
9
+        "order_sn": "276234094041",
10
+        "goods_num": "1",
11
+        "goods_img": "http:\/\/img11.360buyimg.com\/n0\/jfs\/t1\/88262\/35\/44262\/195824\/64f1604bF93e732bd\/f8469c7ee60b618b.jpg",
12
+        "goods_name": "盾王石材返碱清洗剂户外大理石返碱地铺石墙面去泛黄反碱花岗岩清洁剂 500ml",
13
+        "pay_money": "29.00",
14
+        "goods_price": "39.00",
15
+        "status": "15",
16
+        "create_time": "2023-09-06 09:55:14",
17
+        "commission": "13.83",
18
+        "bill_status": "0",
19
+        "bill_end_time": "2023-11-05 09:55:14",
20
+        "other_status_desc": "待付款",
21
+        "source": 6,
22
+        "status_name": "未结算",
23
+        "yanglao": "6.88"
24
+      },
25
+      {
26
+        "id": "2095",
27
+        "goods_id": "10064758193491",
28
+        "order_sn": "276223809915",
29
+        "goods_num": "1",
30
+        "goods_img": "http:\/\/img11.360buyimg.com\/n0\/jfs\/t1\/95514\/16\/36892\/100040\/640ec344Fe2619bfb\/22c5f8fe5891c82b.png",
31
+        "goods_name": "赫尼庄园(HERNIY MANOR)古堡干红葡萄酒 6瓶整箱木箱装 法国进口15度AOP超重型瓶红酒送礼",
32
+        "pay_money": "760.00",
33
+        "goods_price": "3800.00",
34
+        "status": "3",
35
+        "create_time": "2023-09-06 09:51:11",
36
+        "commission": "0.00",
37
+        "bill_status": "2",
38
+        "bill_end_time": "2023-11-05 09:51:11",
39
+        "other_status_desc": "已取消",
40
+        "source": 6,
41
+        "status_name": "失效",
42
+        "yanglao": "173.75"
43
+      },
44
+      {
45
+        "id": "2094",
46
+        "goods_id": "65444556247",
47
+        "order_sn": "276256475345",
48
+        "goods_num": "1",
49
+        "goods_img": "http:\/\/img11.360buyimg.com\/n0\/jfs\/t1\/218187\/17\/24760\/82551\/64ef6153Fb8c3367d\/b30c1875138ab597.jpg",
50
+        "goods_name": "泊泉雅蜗牛水润爽肤水补水保湿控油收缩毛孔 130ml",
51
+        "pay_money": "79.00",
52
+        "goods_price": "129.00",
53
+        "status": "3",
54
+        "create_time": "2023-09-06 09:51:43",
55
+        "commission": "0.00",
56
+        "bill_status": "2",
57
+        "bill_end_time": "2023-11-05 09:51:43",
58
+        "other_status_desc": "已取消",
59
+        "source": 6,
60
+        "status_name": "失效",
61
+        "yanglao": "21.24"
62
+      }
63
+    ]
64
+  }
65
+}

+ 108 - 0
src/pages/pension_record/list.vue

@@ -0,0 +1,108 @@
1
+<script setup lang="ts">
2
+import {getYanglaoJinLogXs, getUserYanglaoJinLogXx} from "~/apis/user";
3
+import {getThirdOrder} from "~/apis/order.api";
4
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
+import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6
+import {encodeBase64} from "~/utils/http/helper";
7
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
+const list = ref([])
9
+onLoad((options) => {
10
+  const type = options.type
11
+  if (type === '99') {
12
+    getUserYanglaoJinLogXx({
13
+      page: 1,
14
+      limit: 20,
15
+      source: '1'
16
+    }).then(res => {
17
+      list.value = res.list
18
+    }).catch(error => {
19
+      if (error === '请登录') {
20
+        uni.navigateTo({
21
+          url: '/pages/user/login/index'
22
+        })
23
+      }
24
+    })
25
+  }
26
+
27
+  if (type === '90') {
28
+    getYanglaoJinLogXs({
29
+      page: 1,
30
+      limit: 20,
31
+      source: '0'
32
+    }).then(res => {
33
+      list.value = res.list
34
+    }).catch(error => {
35
+      if (error === '请登录') {
36
+        uni.navigateTo({
37
+          url: '/pages/user/login/index'
38
+        })
39
+      }
40
+    })
41
+  }
42
+
43
+  if (type !== 90 && type !== 99) {
44
+    getThirdOrder({
45
+      page: 1,
46
+      limit: 20,
47
+      type
48
+    }).then(res => {
49
+      list.value = res.list
50
+    }).catch(error => {
51
+      if (error === '请登录') {
52
+        uni.navigateTo({
53
+          url: '/pages/user/login/index'
54
+        })
55
+      }
56
+    })
57
+  }
58
+})
59
+
60
+function handleItemClick(item) {
61
+  uni.navigateTo({
62
+    url: '/pages/pension_record/detail?detail=' + encodeBase64(Object.assign({}, item, { tradeType: '', remark: ''}))
63
+  })
64
+}
65
+</script>
66
+
67
+<template>
68
+  <CXBBasePage>
69
+    <div v-if="list && list.length > 0" class="flex flex-col gap-3 p-3">
70
+      <div
71
+          @tap="handleItemClick(item)"
72
+          v-for="(item, index) in list" :key="index" class="bg-white rounded p-3 text-[12px]">
73
+        <div class="flex items-center gap-3 text-[12px]">
74
+          <image :src="item.goods_img" mode="widthFix" class="w-15 h-15"></image>
75
+          <div class="flex flex-col">
76
+            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.goods_name }}</div>
77
+            <CXBYaojinTag :amount="item.yanglao" />
78
+          </div>
79
+        </div>
80
+        <div class="flex text-gray text-[12px] f-hairline-bottom py-3">
81
+          订单号:{{ item.order_sn }}
82
+        </div>
83
+        <div class="flex flex-col gap-2 pt-3">
84
+          <div class="flex">
85
+            下单时间:{{ item.create_time }}
86
+          </div>
87
+          <div class="flex justify-between items-center">
88
+            <div>
89
+              养老金来源:购买商品
90
+            </div>
91
+            <div class="flex items-center text-gray">
92
+              <div>详情</div>
93
+              <div class="f-text-color-2 i-tabler-chevron-right"></div>
94
+            </div>
95
+          </div>
96
+        </div>
97
+      </div>
98
+    </div>
99
+
100
+    <CXBEmpty v-else />
101
+  </CXBBasePage>
102
+</template>
103
+
104
+<route lang="yaml">
105
+style:
106
+  navigationBarTitleText: 养老金
107
+  enablePullDownRefresh: true
108
+</route>

+ 6 - 0
src/pages/store/home/components/MerchantHeader.vue

@@ -63,6 +63,12 @@ function handleRelation() {
63 63
     uni.showToast({
64 64
       title: '已关注'
65 65
     })
66
+  }).catch(error => {
67
+    if (error === '请登录') {
68
+      uni.navigateTo({
69
+        url: '/pages/user/login/index'
70
+      })
71
+    }
66 72
   })
67 73
 }
68 74
 

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

@@ -90,7 +90,7 @@ function handleNavItemClick(navItemId: any) {
90 90
     </div>
91 91
   </div>
92 92
 </template>
93
-<route lang="yaml"  type="home">
93
+<route lang="yaml">
94 94
 style:
95 95
   navigationBarTitleText: 储蓄保
96 96
   enablePullDownRefresh: true

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

@@ -385,7 +385,9 @@ function handleCountChange(val) {
385 385
         <div
386 386
             class="bg-[#F94032] rounded-full w-25 flex justify-center items-center h-9"
387 387
         >
388
-          <div v-if="is148Merchant">立即兑换</div>
388
+          <div v-if="is148Merchant"
389
+               @click="handleOrderConfirm"
390
+          >立即兑换</div>
389 391
           <div
390 392
               v-else
391 393
               @click="handleOrderConfirm"

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

@@ -219,6 +219,7 @@ const hasCoupon = computed(() => {
219 219
         >
220 220
           <div
221 221
               class="px-3 relative"
222
+              @tap="handleBuyNow"
222 223
           >
223 224
             <image :src="discount_coupon_bg_220804Image"
224 225
                    mode="widthFix"

+ 38 - 9
src/pages/user/index.vue

@@ -88,6 +88,8 @@ onShow(async () => {
88 88
     // })
89 89
     uni.hideLoading()
90 90
     await userStore.getUserInfo()
91
+    await userStore.getUserYanglaoJin()
92
+
91 93
   } else {
92 94
     uni.navigateTo({
93 95
       url: '/pages/user/login/index?key=3'
@@ -138,8 +140,8 @@ function handleService(item: {
138 140
   })
139 141
 }
140 142
 
141
-// onLoad(async () => {
142
-//   await userStore.getUserInfo()
143
+// onShow(async () => {
144
+  // await userStore.getUserInfo()
143 145
 // })
144 146
 
145 147
 function encodePhone(phone: string) {
@@ -170,6 +172,26 @@ function handleShowMyAllOrder(tab?: number) {
170 172
     url: '/pages/order/index?tabIndex=' + tab
171 173
   })
172 174
 }
175
+
176
+const userType = computed(() => {
177
+    const userRichType = userStore.userInfo.user_rich_type
178
+    // 创始人
179
+    if (userRichType === 3) {
180
+      return '创始人'
181
+    }
182
+    // 普通用户
183
+    if (userRichType === 0) {
184
+      return '用户'
185
+    }
186
+    // 会员
187
+    if (userRichType === 1) {
188
+      return '会员'
189
+    }
190
+    // 合伙人
191
+    if (userRichType === 2) {
192
+      return '合伙人'
193
+    }
194
+})
173 195
 </script>
174 196
 <template>
175 197
   <div v-if="state.isLogin">
@@ -187,16 +209,23 @@ function handleShowMyAllOrder(tab?: number) {
187 209
               mode="widthFix"
188 210
               class="w-9 h-9 rounded-full"
189 211
           />
190
-          <div class="flex flex-col">
191
-            <div class="text-sm">
192
-              <div class="text-sm" v-if="userStore.userInfo">
193
-                {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
212
+          <div class="flex">
213
+            <div class="flex flex-col">
214
+              <div class="text-sm">
215
+                <div class="text-sm" v-if="userStore.userInfo">
216
+                  {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
217
+                </div>
218
+              </div>
219
+              <div class="text-xs" v-if="userStore.userInfo && userStore.userInfo.phone">
220
+                {{ encodePhone(userStore.userInfo.phone) }}
194 221
               </div>
195 222
             </div>
196
-            <div class="text-xs" v-if="userStore.userInfo && userStore.userInfo.phone">
197
-              {{ encodePhone(userStore.userInfo.phone) }}
223
+            <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center">
224
+              {{userType}}
198 225
             </div>
199 226
           </div>
227
+
228
+
200 229
         </div>
201 230
         <div class="bg-white rounded flex flex-col gap-6 py-4 text-xl">
202 231
           <div
@@ -206,7 +235,7 @@ function handleShowMyAllOrder(tab?: number) {
206 235
                 @tap="handleShowAnnuityDetail"
207 236
                 class="w-1/3 flex flex-col justify-center items-center"
208 237
             >
209
-              <div>{{ userStore.userInfo.annuity }}</div>
238
+              <div>{{ userStore.yanglao.all_yanglao }}</div>
210 239
               <div class="text-sm">养老金</div>
211 240
             </div>
212 241
             <div

+ 1 - 1
src/pages/user/login/index.vue

@@ -139,7 +139,7 @@ async function handleWexinLogin() {
139 139
             class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>
140 140
         </div>
141 141
       </div>
142
-      <navigator url="/pages/user/login/orght-phone"
142
+      <navigator url="/pages/user/login/other-phone"
143 143
           class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm">
144 144
         <div>其他手机号登录</div>
145 145
       </navigator>

BIN
src/static.zip


+ 5 - 0
src/stores/addressStore.ts

@@ -23,11 +23,16 @@ export const useAddressStore = defineStore('addressStore', {
23 23
                     // data.addressInfo = res
24 24
                     // data.addressId = res.address_id || 0
25 25
                     this.address = address
26
+                }).catch(error => {
27
+                    console.error(error + '->getUserAddressDetail')
26 28
                 })
27 29
             } else {
28 30
                 getUserAddressList().then(res => {
29 31
                     this.address = res.list.length > 0 ? res.list[0] : {}
30 32
                     // this.addressId = res.list.length > 0 ? res.list[0].address_id : '0'
33
+                }).catch(error => {
34
+                    console.error(error + '->getUserAddressList')
35
+
31 36
                 })
32 37
             }
33 38
             // this.currentAddress = address

+ 12 - 1
src/stores/userStore.ts

@@ -1,5 +1,5 @@
1 1
 import {defineStore} from "pinia";
2
-import {getUserInfo} from "~/apis/user";
2
+import {getUserInfo, getYanglaojinStatistics} from "~/apis/user";
3 3
 import Cache from '~/utils/cache'
4 4
 import {LOGIN_STATUS, UID, USER_INFO} from "~/constants";
5 5
 import type {UserInfoModel} from "~/apis/model/userInfoModel";
@@ -11,6 +11,7 @@ interface UserStoreState {
11 11
     uid: string | null
12 12
     mer_id: number
13 13
     permissionList: Array<string> | null
14
+    yanglao: number
14 15
 }
15 16
 export const useUserStore = defineStore('userStore', {
16 17
     state: () => ({
@@ -20,9 +21,18 @@ export const useUserStore = defineStore('userStore', {
20 21
         // isLogin: !!token,
21 22
         uid: Cache.get(UID) || null,
22 23
         mer_id: 0, // 店铺 ID
24
+        yanglao: 0,
23 25
         permissionList: null // 权限列表
24 26
     }) as UserStoreState,
25 27
     actions: {
28
+        // getYanglaojinStatistics().then(res => {
29
+        //     state.all_yanglao = res.all_yanglao
30
+        // })
31
+        async getUserYanglaoJin() {
32
+            const res = await getYanglaojinStatistics()
33
+            // this.yanglao = res.all_yanglao
34
+            this.yanglao = res
35
+        },
26 36
         // isLogin() {
27 37
         //     return !!this.token
28 38
         // },
@@ -36,6 +46,7 @@ export const useUserStore = defineStore('userStore', {
36 46
         logout() {
37 47
             this.token = null
38 48
             this.uid = null
49
+            this.userInfo = null
39 50
             Cache.clear(LOGIN_STATUS)
40 51
             Cache.clear(UID)
41 52
         },