瀏覽代碼

feat: 养老金页面

Basil 3 年之前
父節點
當前提交
9aa1d8be93

+ 8 - 0
components.d.ts

@@ -40,15 +40,23 @@ declare module '@vue/runtime-core' {
40
     FTag: typeof import('./src/components/FTag/FTag.vue')['default']
40
     FTag: typeof import('./src/components/FTag/FTag.vue')['default']
41
     FTransition: typeof import('./src/components/FTransition/FTransition.vue')['default']
41
     FTransition: typeof import('./src/components/FTransition/FTransition.vue')['default']
42
     NutButton: typeof import('uniapp-nutui/components/button/button.vue')['default']
42
     NutButton: typeof import('uniapp-nutui/components/button/button.vue')['default']
43
+    NutCalendar: typeof import('uniapp-nutui/components/calendar/calendar.vue')['default']
43
     NutCascader: typeof import('uniapp-nutui/components/cascader/cascader.vue')['default']
44
     NutCascader: typeof import('uniapp-nutui/components/cascader/cascader.vue')['default']
44
     NutCheckbox: typeof import('uniapp-nutui/components/checkbox/checkbox.vue')['default']
45
     NutCheckbox: typeof import('uniapp-nutui/components/checkbox/checkbox.vue')['default']
46
+    NutDatePicker: typeof import('uniapp-nutui/components/datepicker/datepicker.vue')['default']
45
     NutDialog: typeof import('uniapp-nutui/components/dialog/dialog.vue')['default']
47
     NutDialog: typeof import('uniapp-nutui/components/dialog/dialog.vue')['default']
46
     NutForm: typeof import('uniapp-nutui/components/form/form.vue')['default']
48
     NutForm: typeof import('uniapp-nutui/components/form/form.vue')['default']
47
     NutFormItem: typeof import('uniapp-nutui/components/formitem/formitem.vue')['default']
49
     NutFormItem: typeof import('uniapp-nutui/components/formitem/formitem.vue')['default']
50
+    NutIcon: typeof import('uniapp-nutui/components/icon/icon.vue')['default']
48
     NutInput: typeof import('uniapp-nutui/components/input/input.vue')['default']
51
     NutInput: typeof import('uniapp-nutui/components/input/input.vue')['default']
49
     NutInputNumber: typeof import('uniapp-nutui/components/inputnumber/inputnumber.vue')['default']
52
     NutInputNumber: typeof import('uniapp-nutui/components/inputnumber/inputnumber.vue')['default']
53
+    NutMenu: typeof import('uniapp-nutui/components/menu/menu.vue')['default']
54
+    NutMenuItem: typeof import('uniapp-nutui/components/menuitem/menuitem.vue')['default']
50
     NutNoticebar: typeof import('uniapp-nutui/components/noticebar/noticebar.vue')['default']
55
     NutNoticebar: typeof import('uniapp-nutui/components/noticebar/noticebar.vue')['default']
56
+    NutPopup: typeof import('uniapp-nutui/components/popup/popup.vue')['default']
57
+    NutSearchbar: typeof import('uniapp-nutui/components/searchbar/searchbar.vue')['default']
51
     NutSwitch: typeof import('uniapp-nutui/components/switch/switch.vue')['default']
58
     NutSwitch: typeof import('uniapp-nutui/components/switch/switch.vue')['default']
59
+    NutTable: typeof import('uniapp-nutui/components/table/table.vue')['default']
52
     NutTabPane: typeof import('uniapp-nutui/components/tabpane/tabpane.vue')['default']
60
     NutTabPane: typeof import('uniapp-nutui/components/tabpane/tabpane.vue')['default']
53
     NutTabs: typeof import('uniapp-nutui/components/tabs/tabs.vue')['default']
61
     NutTabs: typeof import('uniapp-nutui/components/tabs/tabs.vue')['default']
54
     ProductCard: typeof import('./src/components/ProductCard/ProductCard.vue')['default']
62
     ProductCard: typeof import('./src/components/ProductCard/ProductCard.vue')['default']

+ 6 - 0
src/apis/auth.api.ts

@@ -22,6 +22,12 @@ enum API {
22
     USER_EXTRACT_BAND_OPENID = '/api/user/extract/band_openid',
22
     USER_EXTRACT_BAND_OPENID = '/api/user/extract/band_openid',
23
 }
23
 }
24
 
24
 
25
+
26
+export function getUpdateAccount(): Promise<{wechat_user_id: string, ali_user_id: string}> {
27
+    return defHttp.post({
28
+        url: API.USER_UPDATE_ACCOUNT,
29
+    })
30
+}
25
 /**
31
 /**
26
  * 短信验证码
32
  * 短信验证码
27
  * @param phone
33
  * @param phone

+ 9 - 0
src/apis/model/auth.model.ts

@@ -0,0 +1,9 @@
1
+/**
2
+ * 第三方账号绑定
3
+ */
4
+export interface UpdateAccountModel {
5
+    //绑定微信返回这个参数(openid)
6
+    wechat_user_id: string
7
+    //绑定支付宝返回这个参数(userId)
8
+    ali_user_id: string
9
+}

+ 14 - 0
src/apis/model/invite.model.ts

@@ -0,0 +1,14 @@
1
+export interface InviteResult {
2
+    numberSun: string
3
+    UserYesterdayInviteProfit: string
4
+    UserUnsettledInviteProfit: string
5
+}
6
+
7
+export interface InvitePHPModel {
8
+    nickname: string//昵称
9
+    avatar: string//头像
10
+    brokerage_price: string//当前佣金
11
+    yesterday: string//昨日收益
12
+    cumulative: string//累计收益
13
+    extract: string//	累计已提现
14
+}

+ 14 - 0
src/apis/model/redIntegral.model.ts

@@ -0,0 +1,14 @@
1
+export interface RedIntegralResult {
2
+    status: number
3
+    message: string
4
+    data: Array<RedIntegralModel>
5
+}
6
+
7
+export interface RedIntegralModel {
8
+    uid: string
9
+    red: string
10
+    pm: string
11
+    time: string
12
+    create_time: string
13
+    mark: string
14
+}

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

@@ -17,7 +17,7 @@ export interface RevenueSharingModel {
17
     // 金额
17
     // 金额
18
     number: string
18
     number: string
19
     //状态:0-未结算。1-已结算。-1-失效
19
     //状态:0-未结算。1-已结算。-1-失效
20
-    status: string
20
+    status: number
21
     create_time: string
21
     create_time: string
22
     uid: string
22
     uid: string
23
     // 订单号
23
     // 订单号

+ 7 - 0
src/apis/model/withdrawal.model.ts

@@ -0,0 +1,7 @@
1
+export interface WithdrawalConfigurationModel {
2
+      withdrawal_alipay : string//支付宝提现0:关闭,1:开启
3
+      withdrawal_card : string
4
+      withdrawal_money : string//最低金额
5
+      withdrawal_status : string//提现功能0:关闭 ,1:开启
6
+      withdrawal_wchat : string//微信提现0:关闭 , 1:开启
7
+}

+ 94 - 2
src/apis/user.ts

@@ -29,6 +29,7 @@ import type {UserVipInfoModel} from "~/apis/model/user-vip-info.model";
29
 import type {CertificationRequest} from "~/apis/model/certification.model";
29
 import type {CertificationRequest} from "~/apis/model/certification.model";
30
 import type {RelationRequest} from "~/apis/model/relation.model";
30
 import type {RelationRequest} from "~/apis/model/relation.model";
31
 import type {YanglaoLogXsResult, YanglaoLogXxResult} from "~/apis/model/yanglao-log.model";
31
 import type {YanglaoLogXsResult, YanglaoLogXxResult} from "~/apis/model/yanglao-log.model";
32
+import type {InvitePHPModel} from "~/apis/model/invite.model";
32
 
33
 
33
 // 会员中心的提现
34
 // 会员中心的提现
34
 // export function entropy(data) {
35
 // export function entropy(data) {
@@ -41,6 +42,8 @@ enum API {
41
 
42
 
42
     // 养老金信息
43
     // 养老金信息
43
     GET_YANGLAO = '/api/user/get_yanglao',
44
     GET_YANGLAO = '/api/user/get_yanglao',
45
+    // 公证处养老金余额
46
+    GET_AMOUNT_FROM_GZC = '/api/user/getAmountFromGzc',
44
     // 养老金记录
47
     // 养老金记录
45
     GET_YANGLAOJIN_STATISTICS = '/api/user/get_yanglao_statistics',
48
     GET_YANGLAOJIN_STATISTICS = '/api/user/get_yanglao_statistics',
46
     // 养老金明细
49
     // 养老金明细
@@ -61,17 +64,27 @@ enum API {
61
     USER_WITHDRAWAL = '/api/user/withdrawal',
64
     USER_WITHDRAWAL = '/api/user/withdrawal',
62
     // 提现配置
65
     // 提现配置
63
     WITHDRAWAL_CONFIG = '/api/withdrawal/config',
66
     WITHDRAWAL_CONFIG = '/api/withdrawal/config',
67
+    // 提现检测是否绑定提交账户接口
68
+    GET_BAND_ACCOUNT_INFO = '/api/user/extract/get_band_account_info',
69
+    // 绑定账号
70
+    // USER_BAND_ACCOUNT = '/api/user/extract/band_account',
71
+    // 提现申请
72
+    USER_EXTRACT_CREATE = '/api/user/extract/create',
73
+
64
     // 佣金信息
74
     // 佣金信息
65
     USER_SPREAD_INFO = '/api/user/spread_info',
75
     USER_SPREAD_INFO = '/api/user/spread_info',
66
 
76
 
67
     // JAVA 累计收益列表 use by accumulateIncome
77
     // JAVA 累计收益列表 use by accumulateIncome
68
     USER_INVITE_PROFIT_LIST = '/gateway/userCenter_service/userInviteService/userInviteProfitList',
78
     USER_INVITE_PROFIT_LIST = '/gateway/userCenter_service/userInviteService/userInviteProfitList',
69
     // 分享收益
79
     // 分享收益
70
-    GET_COMMISSION_LIST = '/api/get_commission_list',
80
+    GET_COMMISSION_LIST = '/api/user/get_commission_list',
71
 
81
 
72
     // 评论列表
82
     // 评论列表
73
     GET_REPLY_LIST = '/api/reply/list',
83
     GET_REPLY_LIST = '/api/reply/list',
74
-
84
+    // java 我的邀请
85
+    SELECT_USER_INVITE_PROFIT = '/gateway/userCenter_service/userInviteService/selectUserInviteProfit',
86
+    // PHP 我的邀请
87
+    GET_AGENT_INFO = '/api/user/get_agent_info',
75
     // java 邀请商户+伙伴个数 列表
88
     // java 邀请商户+伙伴个数 列表
76
     USER_INVITE_LIST = '/gateway/userCenter_service/userInviteService/userInviteList',
89
     USER_INVITE_LIST = '/gateway/userCenter_service/userInviteService/userInviteList',
77
     // java 用户分享产品列表
90
     // java 用户分享产品列表
@@ -144,6 +157,66 @@ enum API {
144
     // getCertification
157
     // getCertification
145
 }
158
 }
146
 
159
 
160
+/**
161
+ * 公证处养老金余额
162
+ */
163
+export function getAmountFromGzc(): Promise<{amount: string}> {
164
+    return defHttp.get({
165
+        url: API.GET_AMOUNT_FROM_GZC,
166
+    })
167
+}
168
+/**
169
+ * PHP 我的邀请
170
+ */
171
+export function getAgentInfo(): Promise<InvitePHPModel> {
172
+    return defHttp.get({
173
+        url: API.GET_AGENT_INFO
174
+    })
175
+}
176
+/**
177
+ * JAVA 我的邀请
178
+ * @param params
179
+ */
180
+export function getSelectUserInviteProfit(params: {uid: string}): Promise<IntegralResult>{
181
+    return defHttp.get({
182
+        url: API.SELECT_USER_INVITE_PROFIT,
183
+        data: {
184
+            ...params
185
+        }
186
+    }, {
187
+        withToken: false
188
+    })
189
+}
190
+/**
191
+ * 提现配置
192
+ */
193
+export function getWithdrawalConfig() {
194
+    return defHttp.get({
195
+        url: API.WITHDRAWAL_CONFIG
196
+    })
197
+}
198
+
199
+// 提现检测是否绑定提交账户接口
200
+export function getBandAccountInfo(params: {
201
+    // 1微信
202
+    type: string
203
+}) {
204
+    return defHttp.post({
205
+        url: API.GET_BAND_ACCOUNT_INFO
206
+    })
207
+}
208
+/**
209
+ * 获取红积分列表
210
+ * @param params
211
+ */
212
+export function getRedIntegralList(params: {page: number, limit: number}) {
213
+    return defHttp.get({
214
+        url: API.USER_RED_LOG,
215
+        data: {
216
+            ...params
217
+        }
218
+    })
219
+}
147
 /* 关注/收藏
220
 /* 关注/收藏
148
  */
221
  */
149
 export function relation(params: RelationRequest) {
222
 export function relation(params: RelationRequest) {
@@ -407,6 +480,20 @@ export function getWithdrawal(params: {
407
 }
480
 }
408
 
481
 
409
 /**
482
 /**
483
+ * 提现申请
484
+ */
485
+export function getApplicationWithdrawal(params: {
486
+    extract_price: string,
487
+    extract_type: string
488
+}) {
489
+    return defHttp.post({
490
+        url: API.USER_EXTRACT_CREATE,
491
+        data: {
492
+            ...params
493
+        }
494
+    })
495
+}
496
+/**
410
  * 获取用户养老金信息
497
  * 获取用户养老金信息
411
  */
498
  */
412
 export function getUserYangLaoJin(): Promise<UserYanglaoJinModel> {
499
 export function getUserYangLaoJin(): Promise<UserYanglaoJinModel> {
@@ -662,7 +749,12 @@ export function reLogin() {
662
     uni.switchTab({
749
     uni.switchTab({
663
         url: '/pages/home/index'
750
         url: '/pages/home/index'
664
     })
751
     })
752
+}
665
 
753
 
754
+export function login(key: string) {
755
+    uni.navigateTo({
756
+        url: '/pages/user/login/index?key=' + key
757
+    })
666
 }
758
 }
667
 
759
 
668
 /**
760
 /**

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

@@ -102,7 +102,7 @@ function handleCountChange(value) {
102
       v-model:show="showValue"
102
       v-model:show="showValue"
103
       @close="onCancel"
103
       @close="onCancel"
104
       position="bottom"
104
       position="bottom"
105
-      exClass="rounded-rt-xl rounded-lt-xl flex flex-col p-safe h-[40%]"
105
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe h-[40%]"
106
 
106
 
107
   >
107
   >
108
     <div class="flex flex-col justify-between h-full">
108
     <div class="flex flex-col justify-between h-full">
@@ -111,7 +111,7 @@ function handleCountChange(value) {
111
           <div class="flex flex-row gap-3">
111
           <div class="flex flex-row gap-3">
112
             <image :src="detail.image"
112
             <image :src="detail.image"
113
                    v-if="currentSku"
113
                    v-if="currentSku"
114
-                   mode="widthFix" class="w-25 h-25 rounded"></image>
114
+                   mode="aspectFit" class="w-25 h-25 rounded"></image>
115
             <div class="flex flex-col w-full">
115
             <div class="flex flex-col w-full">
116
 
116
 
117
               <div class="flex gap-2 justify-between w-full">
117
               <div class="flex gap-2 justify-between w-full">
@@ -140,12 +140,12 @@ function handleCountChange(value) {
140
             </div>
140
             </div>
141
           </div>
141
           </div>
142
 
142
 
143
-          <div class="flex flex-row gap-2">
143
+          <div class="flex flex-row gap-2  flex-wrap">
144
             <div
144
             <div
145
                 v-for="(item, index) in skuList"
145
                 v-for="(item, index) in skuList"
146
                 :key="index"
146
                 :key="index"
147
                 @tap="handleSelectedSku(item)"
147
                 @tap="handleSelectedSku(item)"
148
-                class="text-[12px] border border-solid rounded p-1 px-2"
148
+                class="text-[12px] border border-solid rounded p-1 px-2 "
149
                 :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
149
                 :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
150
             >
150
             >
151
               {{ item.sku }}
151
               {{ item.sku }}
@@ -162,7 +162,7 @@ function handleCountChange(value) {
162
         </div>
162
         </div>
163
       </div>
163
       </div>
164
 
164
 
165
-      <div class="px-3">
165
+      <div class="px-3 ">
166
         <FButton
166
         <FButton
167
             @click="handleAddCart"
167
             @click="handleAddCart"
168
             size="small"
168
             size="small"

文件差異過大導致無法顯示
+ 1 - 1
src/pages.json


+ 7 - 1
src/pages/account-cancel/index.vue

@@ -13,6 +13,10 @@ function onCancel() {
13
   modalVisible.value = false
13
   modalVisible.value = false
14
 }
14
 }
15
 
15
 
16
+function handleCancel() {
17
+  modalVisible.value = true
18
+}
19
+
16
 function onOk() {
20
 function onOk() {
17
   closeAccount(userStore.userInfo.phone).then(res => {
21
   closeAccount(userStore.userInfo.phone).then(res => {
18
     reLogin()
22
     reLogin()
@@ -46,7 +50,9 @@ function onOk() {
46
     </div>
50
     </div>
47
 
51
 
48
     <div class="fixed bottom-0 pb-safe w-full">
52
     <div class="fixed bottom-0 pb-safe w-full">
49
-      <div class="px-10 ">
53
+      <div
54
+          @click="handleCancel"
55
+          class="px-10 ">
50
         <div class="text-center text-white bg-primary rounded-full text-sm p-2">
56
         <div class="text-center text-white bg-primary rounded-full text-sm p-2">
51
           注销账户
57
           注销账户
52
         </div>
58
         </div>

+ 50 - 5
src/pages/accumulate-income/index.vue

@@ -5,20 +5,44 @@ import type {AccumulateIncomeModel} from "~/apis/model/accumulateIncomeModel";
5
 import {Ref} from "vue";
5
 import {Ref} from "vue";
6
 const userStore = useUserStore()
6
 const userStore = useUserStore()
7
 const accumulateIncome: Ref<AccumulateIncomeModel | undefined> = ref<AccumulateIncomeModel>()
7
 const accumulateIncome: Ref<AccumulateIncomeModel | undefined> = ref<AccumulateIncomeModel>()
8
+const state = reactive({
9
+  options: [{
10
+    text: '全部类型',
11
+    value: ''
12
+  }, {
13
+    text: '分享收益',
14
+    value: 0
15
+  }, {
16
+    text: '奖励收益',
17
+    value: 8
18
+  }],
19
+  selectValue: '',
20
+  list: [{
21
+    // number: 0.19,
22
+    // title: '分享收益',
23
+    // createTime: '202020'
24
+  }],
25
+})
8
 
26
 
9
 onLoad((option: any) => {
27
 onLoad((option: any) => {
10
   if (userStore.uid) {
28
   if (userStore.uid) {
11
     getUserInviteProfitList({
29
     getUserInviteProfitList({
12
       pageNum: 1,
30
       pageNum: 1,
13
-      pageSize: 10,
31
+      pageSize: 20,
14
       uid: userStore.uid,
32
       uid: userStore.uid,
15
     }).then(res => {
33
     }).then(res => {
16
       accumulateIncome.value = res
34
       accumulateIncome.value = res
35
+      state.list = res.pageInfo.list
36
+
17
     })
37
     })
18
   }
38
   }
19
 })
39
 })
40
+
41
+// function loadList()
20
 </script>
42
 </script>
21
 <template>
43
 <template>
44
+  <div class="bg-[#FD1642] h-20 rounded-bottom-full w-full absolute top-0 left-0 z--1"></div>
45
+
22
   <div class="px-3 py-3 flex flex-col gap-3">
46
   <div class="px-3 py-3 flex flex-col gap-3">
23
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
47
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
24
       <div class="flex justify-around">
48
       <div class="flex justify-around">
@@ -54,15 +78,31 @@ onLoad((option: any) => {
54
     </div>
78
     </div>
55
     <div class="bg-white rounded-lg p-3 flex flex-col gap-4 text-sm">
79
     <div class="bg-white rounded-lg p-3 flex flex-col gap-4 text-sm">
56
       <div class="flex justify-between">
80
       <div class="flex justify-between">
57
-        <div class="border border-solid border-1 border-red px-4 text-xs rounded text-red">
58
-          全部类型
59
-        </div>
81
+<!--        <div class="border border-solid border-1 border-red px-4 text-xs rounded text-red">-->
82
+<!--          全部类型-->
83
+<!--        </div>-->
84
+        <nut-menu>
85
+          <nut-menu-item v-model="state.selectValue" :options="state.options" />
86
+        </nut-menu>
60
         <div class="text-xs">金额</div>
87
         <div class="text-xs">金额</div>
61
       </div>
88
       </div>
62
     </div>
89
     </div>
63
 
90
 
64
     <div class="pb-safe">
91
     <div class="pb-safe">
65
-        <CXBEmpty />
92
+      <div v-if="state.list && state.list.length > 0" class="text-[12px]">
93
+        <div v-for="(item, index) in state.list" :key="index" class="bg-white p-3 f-hairline-bottom">
94
+          <div class="flex items-center">
95
+            <div class="flex flex-col gap-3 flex-1">
96
+              <div>{{ item.title }}</div>
97
+              <div class="text-gray">{{ item.createTime }}</div>
98
+            </div>
99
+            <div class="text-sm">+{{ item.number }}</div>
100
+          </div>
101
+
102
+        </div>
103
+
104
+      </div>
105
+        <CXBEmpty v-else/>
66
     </div>
106
     </div>
67
 
107
 
68
   </div>
108
   </div>
@@ -71,9 +111,14 @@ onLoad((option: any) => {
71
 <style>
111
 <style>
72
 page {
112
 page {
73
   background: #f8f8f8;
113
   background: #f8f8f8;
114
+  --nut-menu-item-font-size: 12px;
115
+  --nut-menu-bar-line-height: 24px;
116
+  --nut-menu-bar-box-shadow: none
74
 }
117
 }
75
 </style>
118
 </style>
76
 <route lang="yaml">
119
 <route lang="yaml">
77
 style:
120
 style:
121
+  navigationBarBackgroundColor: "#FD1642"
122
+  navigationBarTextStyle: "white"
78
   navigationBarTitleText: 累计收益
123
   navigationBarTitleText: 累计收益
79
 </route>
124
 </route>

+ 14 - 4
src/pages/annuity/index.vue

@@ -1,5 +1,5 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {getYanglaojinStatistics} from "~/apis/user";
2
+import {getAmountFromGzc, getYanglaojinStatistics} from "~/apis/user";
3
 import {CDN_URL} from "~/config/app";
3
 import {CDN_URL} from "~/config/app";
4
 const get_to_know_buttons_220713Image = CDN_URL + '/static/assets/get_to_know_buttons_220713.png'
4
 const get_to_know_buttons_220713Image = CDN_URL + '/static/assets/get_to_know_buttons_220713.png'
5
 const ylj_fh_220914Image = CDN_URL + '/static/assets/ylj_fh_220914.png'
5
 const ylj_fh_220914Image = CDN_URL + '/static/assets/ylj_fh_220914.png'
@@ -40,6 +40,9 @@ const progress = [{
40
 const state = reactive({
40
 const state = reactive({
41
   all_yanglao: 0,
41
   all_yanglao: 0,
42
   all_num: 0,
42
   all_num: 0,
43
+  amountFromGzc: {
44
+    amount: 0
45
+  }
43
 })
46
 })
44
 
47
 
45
 const yanglaoStatistics = ref()
48
 const yanglaoStatistics = ref()
@@ -54,6 +57,10 @@ onLoad(() => {
54
       })
57
       })
55
     }
58
     }
56
   })
59
   })
60
+
61
+  getAmountFromGzc().then(res => {
62
+    state.amountFromGzc = res
63
+  })
57
 })
64
 })
58
 function handleThirdBind() {
65
 function handleThirdBind() {
59
   uni.navigateTo({
66
   uni.navigateTo({
@@ -120,12 +127,15 @@ function handleToCitic() {
120
           <div
127
           <div
121
               @tap="handleRealName"
128
               @tap="handleRealName"
122
               class="text-xs underline text-[#fe0032]"
129
               class="text-xs underline text-[#fe0032]"
123
-          >实名认证</div>
130
+          >
131
+            {{userStore.userInfo.is_ertification ? '已认证' : '实名认证'}}
132
+
133
+          </div>
124
         </div>
134
         </div>
125
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
135
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
126
           <div class="flex flex-col justify-center items-center">
136
           <div class="flex flex-col justify-center items-center">
127
             <div class="text-xs">总养老金</div>
137
             <div class="text-xs">总养老金</div>
128
-            <div class="text-[#F94032] font-bold text-[28px]">¥{{yanglaoStatistics.all_yanglao}}</div>
138
+            <div class="text-[#F94032] font-bold text-[28px]" v-if="yanglaoStatistics">¥{{yanglaoStatistics.all_yanglao}}</div>
129
           </div>
139
           </div>
130
           <div class=" flex justify-around w-full">
140
           <div class=" flex justify-around w-full">
131
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
141
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
@@ -142,7 +152,7 @@ function handleToCitic() {
142
             <div
152
             <div
143
                 @tap="handleToCitic"
153
                 @tap="handleToCitic"
144
                 class="flex flex-col justify-center items-center pl-3">
154
                 class="flex flex-col justify-center items-center pl-3">
145
-              <div>¥0.00</div>
155
+              <div>¥{{ state.amountFromGzc.amount }}</div>
146
               <div class="text-xs text-gray-400">中信公证处</div>
156
               <div class="text-xs text-gray-400">中信公证处</div>
147
             </div>
157
             </div>
148
           </div>
158
           </div>

+ 26 - 8
src/pages/bangfuzhongxin/index.vue

@@ -24,8 +24,12 @@ onShow(() => {
24
   }
24
   }
25
 
25
 
26
   getRules(ruleId.value).then(res => {
26
   getRules(ruleId.value).then(res => {
27
-    console.log(res)
28
     ruleDetail.value = res
27
     ruleDetail.value = res
28
+  }).catch(error => {
29
+    uni.showToast({
30
+      title: error,
31
+      icon: 'none'
32
+    })
29
   })
33
   })
30
 })
34
 })
31
 
35
 
@@ -65,6 +69,18 @@ function handleApplyBangFu() {
65
     })
69
     })
66
   })
70
   })
67
 }
71
 }
72
+
73
+function handleShowAnnuityDetail() {
74
+  uni.navigateTo({
75
+    url: '/pages/annuity/index'
76
+  })
77
+}
78
+
79
+function handleShowMyInvitation() {
80
+  uni.navigateTo({
81
+    url: '/pages/my-invitation/index'
82
+  })
83
+}
68
 </script>
84
 </script>
69
 
85
 
70
 <template>
86
 <template>
@@ -95,7 +111,7 @@ function handleApplyBangFu() {
95
           <div
111
           <div
96
               @tap="handleShowAnnuityDetail"
112
               @tap="handleShowAnnuityDetail"
97
               class="w-1/3 flex flex-col justify-center items-center">
113
               class="w-1/3 flex flex-col justify-center items-center">
98
-            <div>{{ userStore.userInfo.annuity }}</div>
114
+            <div>{{ userStore.yanglao.all_yanglao }}</div>
99
             <div class="text-sm">养老金</div>
115
             <div class="text-sm">养老金</div>
100
           </div>
116
           </div>
101
           <div
117
           <div
@@ -124,18 +140,20 @@ function handleApplyBangFu() {
124
 
140
 
125
     </div>
141
     </div>
126
 
142
 
127
-    <div class="p-3 bg-white text-sm text-gray-500">
128
-      <div v-if="ruleDetail && ruleDetail.content">
143
+    <div
144
+        v-if="ruleDetail && ruleDetail.content"
145
+        class="p-3 bg-white text-sm text-gray-500"
146
+    >
129
         <mpHtml :content="ruleDetail.content"></mpHtml>
147
         <mpHtml :content="ruleDetail.content"></mpHtml>
130
-      </div>
131
     </div>
148
     </div>
132
 
149
 
133
     <div class="flex flex-col justify-center items-center">
150
     <div class="flex flex-col justify-center items-center">
134
-      <div
151
+      <nut-button
135
           @tap="handleApplyBangFu"
152
           @tap="handleApplyBangFu"
136
-          class="w-fit h-8 rounded-full bg-red text-white text-xs px-2 flex flex-col justify-center items-center">
153
+          type="primary"
154
+      >
137
         立即开通
155
         立即开通
138
-      </div>
156
+      </nut-button>
139
     </div>
157
     </div>
140
   </div>
158
   </div>
141
 </template>
159
 </template>

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

@@ -162,7 +162,7 @@ page {
162
   background-color: #f8f8f8;
162
   background-color: #f8f8f8;
163
 }
163
 }
164
 </style>
164
 </style>
165
-<route lang="yaml"  type="home">
165
+<route lang="yaml"   type="home">
166
 style:
166
 style:
167
   navigationStyle: custom
167
   navigationStyle: custom
168
   navigationBarTitleText: 储蓄保
168
   navigationBarTitleText: 储蓄保

+ 78 - 18
src/pages/immediate-withdrawal/index.vue

@@ -1,5 +1,12 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {getUserSpreadInfo, getUserYangLaoJin, getWithdrawalService} from "~/apis/user";
2
+import {
3
+  getApplicationWithdrawal,
4
+  getBandAccountInfo,
5
+  getUserSpreadInfo,
6
+  getUserYangLaoJin,
7
+  getWithdrawalConfig,
8
+  getWithdrawalService
9
+} from "~/apis/user";
3
 import {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
10
 import {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
4
 import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
11
 import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
5
 import {CDN_URL} from "~/config/app";
12
 import {CDN_URL} from "~/config/app";
@@ -10,23 +17,35 @@ const userSpreadInfo = ref<SpreadInfoModel>()
10
 
17
 
11
 const withdrawalCal = ref({})
18
 const withdrawalCal = ref({})
12
 const yanglaojin = ref<UserYanglaoJinModel>()
19
 const yanglaojin = ref<UserYanglaoJinModel>()
20
+
21
+const widthdrawalConfig = ref({})
22
+
23
+const cashWithdrawalAmount = ref(0)
13
 // userSpreadInfo.value.brokerage_price
24
 // userSpreadInfo.value.brokerage_price
14
 onLoad(() => {
25
 onLoad(() => {
15
   userStore.getUserInfo().then(res => {})
26
   userStore.getUserInfo().then(res => {})
27
+  // 佣金信息
16
   getUserSpreadInfo().then((res: SpreadInfoModel) => {
28
   getUserSpreadInfo().then((res: SpreadInfoModel) => {
17
     userSpreadInfo.value = res
29
     userSpreadInfo.value = res
18
   })
30
   })
19
 
31
 
20
   getUserYangLaoJin().then(res => {
32
   getUserYangLaoJin().then(res => {
21
     yanglaojin.value = res
33
     yanglaojin.value = res
22
-    console.log('加载养老金数据')
23
-    console.log(res)
34
+    // console.log('加载养老金数据')
35
+    // console.log(res)
24
   })
36
   })
25
 
37
 
38
+  // 提现配置
39
+  getWithdrawalConfig().then(res => {
40
+    // console.log(res)
41
+    widthdrawalConfig.value = res
42
+  })
26
 })
43
 })
27
 
44
 
28
 function handleInputChange(e) {
45
 function handleInputChange(e) {
29
   if (e.detail.value) {
46
   if (e.detail.value) {
47
+    cashWithdrawalAmount.value = e.detail.value
48
+    console.log(cashWithdrawalAmount.value)
30
     getWithdrawalService({
49
     getWithdrawalService({
31
       money: e.detail.value
50
       money: e.detail.value
32
     }).then(res => {
51
     }).then(res => {
@@ -41,13 +60,54 @@ function handleInputChange(e) {
41
  * 立即提现
60
  * 立即提现
42
  */
61
  */
43
 function handleImmediateWithdrawal() {
62
 function handleImmediateWithdrawal() {
63
+
64
+  if (widthdrawalConfig.value.withdrawal_status == '0') {
65
+    return uni.showToast({
66
+      title: '提现功能关闭',
67
+      icon: 'none'
68
+    })
69
+  }
70
+  if (widthdrawalConfig.value.withdrawal_wchat == '0') {
71
+    return uni.showToast({
72
+      title: '微信提现功能关闭',
73
+      icon: 'none'
74
+    })
75
+  }
76
+
77
+  if (userSpreadInfo.value?.brokerage_price) {
78
+    if (userSpreadInfo.value?.brokerage_price < widthdrawalConfig.value.withdrawal_money) {
79
+      return uni.showToast({
80
+        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现'
81
+      })
82
+    }
83
+  } else {
84
+    return
85
+  }
86
+
87
+
44
   // 1 判断是否需要实名
88
   // 1 判断是否需要实名
45
-  if (yanglaojin.value?.is_certification === 1) {}
46
-  else {
47
-    uni.navigateTo({
89
+  if (!yanglaojin.value?.is_certification == 1) {
90
+    return uni.navigateTo({
48
       url: '/pages/real-name-authentication/index'
91
       url: '/pages/real-name-authentication/index'
49
     })
92
     })
50
   }
93
   }
94
+
95
+  getApplicationWithdrawal({ extract_price: cashWithdrawalAmount.value, extract_type: 1}).then(res => {
96
+    // uni.showToast({
97
+    //   title: res,
98
+    //   icon: 'none'
99
+    // })
100
+    uni.showToast({
101
+      title: '提现成功',
102
+      icon: 'none'
103
+    }).then(res => {
104
+      uni.navigateTo({
105
+        url: '/pages/immediate-withdrawal/index'
106
+      })
107
+    })
108
+  })
109
+
110
+
51
   // if (yanglaojin.value) {
111
   // if (yanglaojin.value) {
52
   // }
112
   // }
53
 }
113
 }
@@ -98,29 +158,29 @@ function handleWithdrawalRecord() {
98
             <div>微信支付</div>
158
             <div>微信支付</div>
99
           </div>
159
           </div>
100
           <div>
160
           <div>
101
-            <radio/>
161
+            <radio checked/>
102
           </div>
162
           </div>
103
         </div>
163
         </div>
104
 
164
 
105
-        <div class="flex items-center justify-between py-3">
106
-          <div class="flex items-center gap-2">
107
-            <image :src="zfb_logoImage" mode="widthFix" class="w-8 h-8"></image>
108
-            <div>支付宝支付</div>
109
-            </div>
110
-            <div>
111
-              <radio />
112
-            </div>
113
-          </div>
165
+<!--        <div class="flex items-center justify-between py-3">-->
166
+<!--          <div class="flex items-center gap-2">-->
167
+<!--            <image :src="zfb_logoImage" mode="widthFix" class="w-8 h-8"></image>-->
168
+<!--            <div>支付宝支付</div>-->
169
+<!--            </div>-->
170
+<!--            <div>-->
171
+<!--              <radio />-->
172
+<!--            </div>-->
173
+<!--          </div>-->
114
       </div>
174
       </div>
115
     </div>
175
     </div>
116
 
176
 
117
     <div class="flex flex-col">
177
     <div class="flex flex-col">
118
       <div class=" flex rounded-full bg-red-300">
178
       <div class=" flex rounded-full bg-red-300">
119
-        <div class="h-10 flex justify-center items-center text-sm text-white  w-full"
179
+        <nut-button type="primary" block
120
              @tap="handleImmediateWithdrawal"
180
              @tap="handleImmediateWithdrawal"
121
         >
181
         >
122
           立即提现
182
           立即提现
123
-        </div>
183
+        </nut-button>
124
       </div>
184
       </div>
125
 
185
 
126
       <div class="flex flex-col text-sm text-gray leading-8 py-4">
186
       <div class="flex flex-col text-sm text-gray leading-8 py-4">

+ 25 - 0
src/pages/invite-partners/index.vue

@@ -18,9 +18,26 @@ onLoad(() => {
18
     }
18
     }
19
   })
19
   })
20
 })
20
 })
21
+
22
+const searchValue = ref('')
23
+function handleSearch() {
24
+  getUserInviteList({
25
+    uid: userStore.uid ? userStore.uid : '',
26
+    nickname: searchValue.value,
27
+    pageNum: 1,
28
+    pageSize: 100
29
+  }).then(res => {
30
+    if (res) {
31
+      invitePartnerModel.value = res
32
+      console.log(res)
33
+    }
34
+  })
35
+}
21
 </script>
36
 </script>
22
 
37
 
23
 <template>
38
 <template>
39
+  <div class="bg-[#FD1642] h-20 rounded-bottom-full w-full absolute top-0 left-0 z--1"></div>
40
+
24
   <div class="px-3 flex flex-col gap-3">
41
   <div class="px-3 flex flex-col gap-3">
25
     <div class="flex justify-around text-xs bg-white rounded-lg mt-3 h-40">
42
     <div class="flex justify-around text-xs bg-white rounded-lg mt-3 h-40">
26
       <div class="flex flex-col justify-center items-center gap-4">
43
       <div class="flex flex-col justify-center items-center gap-4">
@@ -40,6 +57,12 @@ onLoad(() => {
40
         </div>
57
         </div>
41
       </div>
58
       </div>
42
     </div>
59
     </div>
60
+    <nut-searchbar v-model="searchValue" @search="handleSearch">
61
+      <template v-slot:leftin>
62
+        <nut-icon  name="search2"  />
63
+      </template>
64
+    </nut-searchbar>
65
+
43
     <div class="pb-safe">
66
     <div class="pb-safe">
44
       <div class="grid grid-cols-3 bg-white rounded-tl-lg rounded-tr-lg text-center text-sm p-3">
67
       <div class="grid grid-cols-3 bg-white rounded-tl-lg rounded-tr-lg text-center text-sm p-3">
45
         <div class="text-left">用户</div>
68
         <div class="text-left">用户</div>
@@ -66,5 +89,7 @@ page {
66
 </style>
89
 </style>
67
 <route lang="yaml">
90
 <route lang="yaml">
68
 style:
91
 style:
92
+  navigationBarBackgroundColor: "#FD1642"
93
+  navigationBarTextStyle: "white"
69
   navigationBarTitleText: 邀请伙伴
94
   navigationBarTitleText: 邀请伙伴
70
 </route>
95
 </route>

+ 25 - 17
src/pages/miaosha/index.vue

@@ -5,6 +5,7 @@ import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
6
 import FPrice from "~/components/FPrice/FPrice.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
7
 import FButton from "~/components/FButton/FButton.vue";
8
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
 const currentSeckillDate = ref()
9
 const currentSeckillDate = ref()
9
 
10
 
10
 const list = ref<Array<DcSeckillModel>>()
11
 const list = ref<Array<DcSeckillModel>>()
@@ -12,7 +13,7 @@ const currentProductList = ref([])
12
 onLoad((options) => {
13
 onLoad((options) => {
13
   getDcSeckill().then(res => {
14
   getDcSeckill().then(res => {
14
     list.value = res
15
     list.value = res
15
-    if (res) {
16
+    if (list.value && list.value?.length > 0) {
16
       currentSeckillDate.value = list.value[0].seckill_date
17
       currentSeckillDate.value = list.value[0].seckill_date
17
       currentProductList.value = list.value[0].product_data
18
       currentProductList.value = list.value[0].product_data
18
 
19
 
@@ -33,24 +34,28 @@ function handleItemClick(seckillItem) {
33
 </script>
34
 </script>
34
 <template>
35
 <template>
35
   <CXBBasePage>
36
   <CXBBasePage>
36
-    <scroll-view
37
-        class=" whitespace-nowrap  w-screen  text-sm py-3"
38
-        :scroll-with-animation="true"
39
-        :scroll-x="true"
40
-        :show-scrollbar="false"
37
+    <div
38
+        v-if="list && list.length > 0"
39
+
41
     >
40
     >
42
-      <div
43
-          @tap="handleSeckillDateClick(item)"
44
-          v-for="(item, index) in list"
45
-          :key="index"
46
-          class="flex inline-flex items-center justify-center relative pl-5"
47
-          :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
41
+      <scroll-view
42
+          class=" whitespace-nowrap  w-screen  text-sm py-3"
43
+          :scroll-with-animation="true"
44
+          :scroll-x="true"
45
+          :show-scrollbar="false"
48
       >
46
       >
49
-        {{item.seckill_date}}
50
-      </div>
51
-      <!--      </div>-->
52
-    </scroll-view>
53
-    <div class="p-3 pb-safe">
47
+        <div
48
+            @tap="handleSeckillDateClick(item)"
49
+            v-for="(item, index) in list"
50
+            :key="index"
51
+            class="flex inline-flex items-center justify-center relative pl-5"
52
+            :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
53
+        >
54
+          {{item.seckill_date}}
55
+        </div>
56
+        <!--      </div>-->
57
+      </scroll-view>
58
+      <div class="p-3 pb-safe">
54
         <div class="flex flex-col gap-3">
59
         <div class="flex flex-col gap-3">
55
           <div
60
           <div
56
               @tap="handleItemClick(seckillItem)"
61
               @tap="handleItemClick(seckillItem)"
@@ -88,7 +93,10 @@ function handleItemClick(seckillItem) {
88
           </div>
93
           </div>
89
 
94
 
90
         </div>
95
         </div>
96
+      </div>
91
     </div>
97
     </div>
98
+    <CXBEmpty v-else/>
99
+
92
   </CXBBasePage>
100
   </CXBBasePage>
93
 
101
 
94
 </template>
102
 </template>

+ 53 - 12
src/pages/my-integral/index.vue

@@ -1,12 +1,15 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import {useUserStore} from "~/stores/userStore";
2
 import {useUserStore} from "~/stores/userStore";
3
-import {getUserInfo} from "~/apis/user";
3
+import {getNewSignInInfo, getUserInfo} from "~/apis/user";
4
 import FButton from "~/components/FButton/FButton.vue";
4
 import FButton from "~/components/FButton/FButton.vue";
5
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
5
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
6
+import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
6
 
7
 
7
 const userStore = useUserStore();
8
 const userStore = useUserStore();
8
 const state = reactive({
9
 const state = reactive({
9
-  isLogin: false
10
+  isLogin: false,
11
+  signToday: NaN,
12
+  isShowSignIn: false,
10
 })
13
 })
11
 
14
 
12
 onShow(() => {
15
 onShow(() => {
@@ -20,11 +23,40 @@ onShow(() => {
20
   }
23
   }
21
 })
24
 })
22
 
25
 
26
+if (userStore.userInfo) {
27
+  // 2 检查用户签到信息
28
+  getNewSignInInfo().then(res => {
29
+    const {today, day} = res
30
+    state.signToday = today
31
+    if (today === 0) {
32
+      state.isShowSignIn = true
33
+    }
34
+    // // if (today === 0) {
35
+    //   2.1 弹出签到窗口
36
+    // }
37
+  }).catch(error => {
38
+    console.error(error + '->GetNewsSignInInfo')
39
+  })
40
+}
41
+
23
 function handleShowIntegralDetail() {
42
 function handleShowIntegralDetail() {
24
   uni.navigateTo({
43
   uni.navigateTo({
25
     url: '/pages/my-integral/detail'
44
     url: '/pages/my-integral/detail'
26
   })
45
   })
27
 }
46
 }
47
+
48
+function handleToZibuyangsheng() {
49
+  uni.navigateTo({
50
+    url: '/pages/product/zibuyangsheng?id=430'
51
+  })
52
+}
53
+
54
+function handleToPoster() {
55
+  uni.showToast({
56
+    title: '待开发',
57
+    icon: 'none'
58
+  })
59
+}
28
 </script>
60
 </script>
29
 <template>
61
 <template>
30
   <div class="flex flex-col p-3 gap-3">
62
   <div class="flex flex-col p-3 gap-3">
@@ -38,12 +70,13 @@ function handleShowIntegralDetail() {
38
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
70
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
39
       <div class="">滋补保健 {{ userStore.userInfo.score_beishengtang}}</div>
71
       <div class="">滋补保健 {{ userStore.userInfo.score_beishengtang}}</div>
40
 
72
 
41
-      <CXBButton
73
+      <nut-button
42
           size="mini"
74
           size="mini"
43
-          type="fill"
75
+          type="primary"
76
+          @tap="handleToZibuyangsheng"
44
       >
77
       >
45
         去兑换
78
         去兑换
46
-      </CXBButton>
79
+      </nut-button>
47
     </div>
80
     </div>
48
 
81
 
49
     <div
82
     <div
@@ -63,30 +96,38 @@ function handleShowIntegralDetail() {
63
             <div class="text-xs">每日签到</div>
96
             <div class="text-xs">每日签到</div>
64
             <div class="text-xs text-gray-500">每日签到得奖励</div>
97
             <div class="text-xs text-gray-500">每日签到得奖励</div>
65
           </div>
98
           </div>
66
-          <CXBButton
99
+          <nut-button
67
               size="mini"
100
               size="mini"
68
-              type="fill"
101
+              :class="state.signToday ? 'bg-gray text-white' : ''"
69
           >
102
           >
70
-            去签到
71
-          </CXBButton>
103
+            {{ state.signToday ? '已签到' : '去签到' }}
104
+          </nut-button>
72
         </div>
105
         </div>
73
         <div class="flex  justify-between items-center">
106
         <div class="flex  justify-between items-center">
74
           <div class="flex flex-col gap-2">
107
           <div class="flex flex-col gap-2">
75
             <div class="text-xs">邀请好友得积分</div>
108
             <div class="text-xs">邀请好友得积分</div>
76
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
109
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
77
           </div>
110
           </div>
78
-          <CXBButton
111
+          <nut-button
79
               size="mini"
112
               size="mini"
80
-              type="fill"
113
+              type="primary"
114
+              @tap="handleToPoster"
81
           >
115
           >
82
             去邀请
116
             去邀请
83
-          </CXBButton>
117
+          </nut-button>
84
         </div>
118
         </div>
85
       </div>
119
       </div>
86
 
120
 
87
 
121
 
88
     </div>
122
     </div>
89
   </div>
123
   </div>
124
+
125
+  <CXBDialogSIgnIn
126
+      :show="state.isShowSignIn"
127
+      :today="state.signToday"
128
+      @confirm="state.isShowSignIn = false"
129
+      @close="state.isShowSignIn = false"
130
+  />
90
 </template>
131
 </template>
91
 
132
 
92
 <style>
133
 <style>

+ 8 - 3
src/pages/my-invitation/index.vue

@@ -12,9 +12,10 @@ const list = [{
12
   url: '/pages/share-the-product/index'
12
   url: '/pages/share-the-product/index'
13
 }, {
13
 }, {
14
   title: '累计收益',
14
   title: '累计收益',
15
-  url: ''
15
+  url: '/pages/accumulate-income/index'
16
 }, {
16
 }, {
17
-  title: '去提现'
17
+  title: '去提现',
18
+  url: '/pages/immediate-withdrawal/index'
18
 }]
19
 }]
19
 
20
 
20
 function handleClick(item: { url: string, title: string }) {
21
 function handleClick(item: { url: string, title: string }) {
@@ -24,6 +25,8 @@ function handleClick(item: { url: string, title: string }) {
24
 }
25
 }
25
 </script>
26
 </script>
26
 <template>
27
 <template>
28
+  <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0 z--1"></div>
29
+
27
   <div class="px-3 py-3 flex flex-col gap-3">
30
   <div class="px-3 py-3 flex flex-col gap-3">
28
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
31
     <div class="bg-white rounded-lg p-4 flex flex-col gap-4 ">
29
       <div class="flex justify-around">
32
       <div class="flex justify-around">
@@ -73,7 +76,9 @@ page {
73
   background: #f8f8f8;
76
   background: #f8f8f8;
74
 }
77
 }
75
 </style>
78
 </style>
76
-<route lang="yaml">
79
+<route lang="yaml" >
77
 style:
80
 style:
81
+  navigationBarBackgroundColor: "#FD1642"
82
+  navigationBarTextStyle: "white"
78
   navigationBarTitleText: 我的邀请
83
   navigationBarTitleText: 我的邀请
79
 </route>
84
 </route>

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

@@ -171,7 +171,7 @@ function handleAddressSelect() {
171
             <div class="flex text-sm text-gray-500 justify-between items-center w-full">
171
             <div class="flex text-sm text-gray-500 justify-between items-center w-full">
172
               <div class="flex-1 flex items-center gap-2">
172
               <div class="flex-1 flex items-center gap-2">
173
                 <div class="w-fit flex">
173
                 <div class="w-fit flex">
174
-                  <image :src="addressIcon" mode="widthFix" class="w-4 h-4"></image>
174
+                  <image :src="addressIcon" mode="aspectFit" class="w-4 h-4"></image>
175
                 </div>
175
                 </div>
176
                 <div class="flex-1 flex">
176
                 <div class="flex-1 flex">
177
                   {{ data.addressInfo.province + ' ' + data.addressInfo.city + ' ' + data.addressInfo.district }}
177
                   {{ data.addressInfo.province + ' ' + data.addressInfo.city + ' ' + data.addressInfo.district }}
@@ -206,7 +206,7 @@ function handleAddressSelect() {
206
           <div v-for="(orderProductItem, orderProductItemIndex) in item.list" :key="orderProductItemIndex">
206
           <div v-for="(orderProductItem, orderProductItemIndex) in item.list" :key="orderProductItemIndex">
207
             <div class="p-3 flex gap-3 f-hairline-bottom">
207
             <div class="p-3 flex gap-3 f-hairline-bottom">
208
               <div>
208
               <div>
209
-                <image :src="orderProductItem.product.image" mode="widthFix" class="rounded w-20 h-20"></image>
209
+                <image :src="orderProductItem.product.image" mode="aspectFit" class="rounded w-20 h-20"></image>
210
 
210
 
211
               </div>
211
               </div>
212
               <div class="flex flex-col ">
212
               <div class="flex flex-col ">

+ 5 - 5
src/pages/order/index.vue

@@ -14,8 +14,8 @@
14
       <nut-tab-pane title="待付款">
14
       <nut-tab-pane title="待付款">
15
         <div v-if="state.obligationOrderList.length > 0">
15
         <div v-if="state.obligationOrderList.length > 0">
16
           <div v-for="(orderItem, index) in state.obligationOrderList" :key="index">
16
           <div v-for="(orderItem, index) in state.obligationOrderList" :key="index">
17
-            <OrderItem :order-item="orderItem" v-if="orderItem.source == 7"/>
18
-            <OtherOrderItem :item="orderItem" v-else/>
17
+            <OrderItem :order-item="orderItem"/>
18
+<!--            <OtherOrderItem :item="orderItem" v-else/>-->
19
           </div>
19
           </div>
20
         </div>
20
         </div>
21
         <CXBEmpty v-else/>
21
         <CXBEmpty v-else/>
@@ -105,10 +105,10 @@ function loadAllOrderList() {
105
     page: 1,
105
     page: 1,
106
     limit: 10
106
     limit: 10
107
   }).then(res => {
107
   }).then(res => {
108
-    console.log(res)
108
+    // console.log(res)
109
     state.allOrderTotal = res.total
109
     state.allOrderTotal = res.total
110
     state.allOrderList = res.list
110
     state.allOrderList = res.list
111
-    console.log(res)
111
+    // console.log(res)
112
   })
112
   })
113
 }
113
 }
114
 watch(() => state.tabvalue, (val) => {
114
 watch(() => state.tabvalue, (val) => {
@@ -122,7 +122,7 @@ watch(() => state.tabvalue, (val) => {
122
         page: 1,
122
         page: 1,
123
         limit: 10
123
         limit: 10
124
       }).then(res => {
124
       }).then(res => {
125
-        console.log(res)
125
+        // console.log(res)
126
         // state.obligationOrderList = splitArray(res.list, state.obligationOrderList)
126
         // state.obligationOrderList = splitArray(res.list, state.obligationOrderList)
127
         state.obligationOrderList = res.list
127
         state.obligationOrderList = res.list
128
       })
128
       })

+ 5 - 0
src/pages/product/integral.vue

@@ -2,6 +2,7 @@
2
 import {getEntropyProductList} from "~/apis/common";
2
 import {getEntropyProductList} from "~/apis/common";
3
 import ProductCard from "~/components/ProductCard/ProductCard.vue";
3
 import ProductCard from "~/components/ProductCard/ProductCard.vue";
4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
+import {login, reLogin} from "~/apis/user";
5
 const list = ref()
6
 const list = ref()
6
 onLoad(() => {
7
 onLoad(() => {
7
   getEntropyProductList({
8
   getEntropyProductList({
@@ -11,6 +12,10 @@ onLoad(() => {
11
     limit: 10
12
     limit: 10
12
   }).then(res => {
13
   }).then(res => {
13
     list.value = res
14
     list.value = res
15
+  }).catch(error => {
16
+    if (error === '请登录') {
17
+      return login('30')
18
+    }
14
   })
19
   })
15
 })
20
 })
16
 
21
 

+ 143 - 0
src/pages/red-integral/index.vue

@@ -0,0 +1,143 @@
1
+<script setup lang="ts">
2
+import {useUserStore} from "~/stores/userStore";
3
+import {encodePhone} from "../../utils";
4
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
+import {getRedIntegralList} from "~/apis/user";
6
+
7
+const userStore = useUserStore();
8
+onLoad((options) => {
9
+  userStore.getUserInfo()
10
+})
11
+const userType = computed(() => {
12
+  const userRichType = userStore.userInfo.user_rich_type
13
+  // 创始人
14
+  if (userRichType === 3) {
15
+    return '创始人'
16
+  }
17
+  // 普通用户
18
+  if (userRichType === 0) {
19
+    return '用户'
20
+  }
21
+  // 会员
22
+  if (userRichType === 1) {
23
+    return '会员'
24
+  }
25
+  // 合伙人
26
+  if (userRichType === 2) {
27
+    return '合伙人'
28
+  }
29
+
30
+  getRedIntegralList({page: 1, limit: 20}).then(res => {
31
+    console.log(res)
32
+  })
33
+})
34
+
35
+const state = reactive({
36
+  striped: false,
37
+  columns: [{
38
+    title: '消耗积分数',
39
+    key: 'red'
40
+  }, {
41
+    title: '说明',
42
+    key: 'mark'
43
+  }, {
44
+    title: '时间',
45
+    key: 'time'
46
+  }]
47
+})
48
+
49
+function handleToVipPage() {
50
+  uni.navigateTo({
51
+    url: '/pages/vip/index'
52
+  })
53
+}
54
+
55
+function handleImmediateWithdrawal() {
56
+  uni.navigateTo({
57
+    url: '/pages/immediate-withdrawal/index'
58
+  })
59
+}
60
+</script>
61
+
62
+<template>
63
+  <CXBBasePage>
64
+    <div class="bg-[#FD1642] h-30 w-full absolute top-0 left-0"></div>
65
+
66
+    <div class="flex flex-col gap-4 relative px-3">
67
+      <div class="pt-10 ">
68
+        <div class="flex gap-2 mb-2 text-white mb-3">
69
+          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
70
+                 class="w-9 h-9 rounded-full"
71
+          ></image>
72
+          <image
73
+              v-else
74
+              src="https://app.bjtdba.com/uploads/logo.jpg"
75
+              mode="widthFix"
76
+              class="w-9 h-9 rounded-full"
77
+          />
78
+          <div class="flex">
79
+            <div class="flex flex-col">
80
+              <div class="flex text-sm">
81
+                <div class="flex gap-3">
82
+                  <div class="text-sm" v-if="userStore.userInfo">
83
+                    {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
84
+                  </div>
85
+                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center">
86
+                    {{userType}}
87
+                  </div>
88
+                </div>
89
+
90
+              </div>
91
+              <div class="flex text-xs" v-if="userStore.userInfo && userStore.userInfo.phone">
92
+                {{ encodePhone(userStore.userInfo.phone) }}
93
+              </div>
94
+              <div class="flex justify-between items-center text-[12px] gap-20">
95
+                <div class="flex">
96
+                  红积分:{{ userStore.userInfo.red }}
97
+                </div>
98
+                <div
99
+                    @click="handleToVipPage"
100
+                    class="flex bg-white text-primary px-1">复购增加红积分</div>
101
+              </div>
102
+
103
+
104
+            </div>
105
+
106
+          </div>
107
+        </div>
108
+        <div class="bg-white rounded flex flex-col gap-6 py-4 text-[12px] px-3">
109
+          <div class="flex justify-between">
110
+            <div>
111
+              红积分记录
112
+            </div>
113
+            <div
114
+                @click="handleImmediateWithdrawal"
115
+                class="border border-solid border-1px text-gray-600 border-gray rounded px-2">
116
+              提现
117
+            </div>
118
+          </div>
119
+
120
+        </div>
121
+
122
+      </div>
123
+
124
+      <div>
125
+        <nut-table :columns="state.columns"
126
+                   :data="data"
127
+                   :bordered="false"
128
+        ></nut-table>
129
+      </div>
130
+
131
+    </div>
132
+    </CXBBasePage>
133
+</template>
134
+<route lang="yaml">
135
+style:
136
+  navigationBarTitleText: 储蓄保
137
+  enablePullDownRefresh: true
138
+</route>
139
+<style>
140
+page {
141
+  --nut-table-border-color: none
142
+}
143
+</style>

+ 143 - 45
src/pages/revenue-sharing/index.vue

@@ -3,71 +3,169 @@
3
 import FCell from "~/components/FCell/FCell.vue";
3
 import FCell from "~/components/FCell/FCell.vue";
4
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
4
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
-import {getRevenueSharing} from "~/apis/user";
6
+import {getAgentInfo, getRevenueSharing, getSelectUserInviteProfit} from "~/apis/user";
7
+import type {RevenueSharingModel} from "~/apis/model/revenueSharingModel";
8
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
9
+const userStore = useUserStore()
10
+const state = reactive({
11
+  numberSun: '',
12
+  UserYesterdayInviteProfit: '',
13
+  UserUnsettledInviteProfit: '',
14
+  nickname: '',
15
+  avatar: '',
16
+  brokerage_price: '',
17
+  yesterday: '',
18
+  cumulative: '',
19
+  extract: '',
7
 
20
 
21
+  currentTab: 1,
22
+  list: [
23
+  //     {
24
+  //   order_sn: '11111',
25
+  //   status: 0,
26
+  //   content: '预估用户1502111',
27
+  //   xiadan: '2023-08-04',
28
+  //   jiesuan: '2023-08-05',
29
+  //   number: 0.10
30
+  // }
31
+  ]
32
+})
8
 onLoad((option: any) => {
33
 onLoad((option: any) => {
34
+  // 未结算收益
35
+  getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
36
+    console.log(res)
37
+    state.numberSun = res.numberSun
38
+    state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
39
+    state.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
40
+  })
41
+
42
+  getAgentInfo().then(res => {
43
+    console.log(res)
44
+    state.nickname = res.nickname
45
+    state.avatar = res.avatar
46
+    state.brokerage_price = res.brokerage_price
47
+    state.yesterday = res.yesterday
48
+    state.cumulative = res.cumulative
49
+    state.extract = res.extract
50
+  })
51
+  loadList(0)
52
+})
53
+
54
+function loadList(type: number) {
9
   getRevenueSharing({
55
   getRevenueSharing({
10
-    type: 0,
11
     page: 1,
56
     page: 1,
12
-    limit: 10
13
-  }).then(res => {
14
-    if (res && res.length) {
15
-      console.log(res)
57
+    limit: 20,
58
+    type
59
+  }).then((res: Array<RevenueSharingModel>) => {
60
+    if (res && res.length > 0) {
61
+      state.list = res
16
     }
62
     }
17
   })
63
   })
18
-})
64
+
65
+}
66
+function handleTabClick(type) {
67
+  state.currentTab = type
68
+  loadList(type)
69
+}
70
+function getStatusText(status: number) {
71
+  ////状态:0-未结算。1-已结算。-1-失效
72
+  if (status == 0) {
73
+    return '未结算'
74
+  }
75
+  if (status == 1) {
76
+    return '已结算'
77
+  }
78
+  if (status == -1) {
79
+    return '失效'
80
+  }
81
+}
19
 </script>
82
 </script>
20
 
83
 
21
 <template>
84
 <template>
22
-  <div class="px-3 py-3 flex flex-col gap-3">
23
-    <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
24
-      <div class="flex justify-around py-8">
25
-        <div class="flex-1 flex flex-col justify-center items-center gap-2">
26
-          <div class="text-[11px] text-gray">累计佣金(元)</div>
27
-          <div class="font-bold ">0.00</div>
28
-        </div>
85
+  <CXBBasePage>
86
+    <div class="bg-[#FD1642] h-20 rounded-bottom-full w-full absolute top-0 left-0 z--1"></div>
29
 
87
 
30
-        <div class="flex-1 flex flex-col justify-center items-center gap-2">
31
-          <div class="text-[11px] text-gray">已提现(元)</div>
32
-          <div class="font-bold">0.00</div>
33
-        </div>
88
+    <div class="px-3 py-3 flex flex-col gap-3">
89
+      <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
90
+        <div class="flex justify-around py-8">
91
+          <div class="flex-1 flex flex-col justify-center items-center gap-2">
92
+            <div class="text-[11px] text-gray">累计佣金(元)</div>
93
+            <div class="font-bold ">
94
+              {{ state.cumulative }}
95
+            </div>
96
+          </div>
34
 
97
 
35
-        <div class="flex-1 flex flex-col justify-center items-center gap-2">
36
-          <div class="text-[11px] text-gray">佣金余额(元)</div>
37
-          <div class="font-bold">0.00</div>
38
-        </div>
98
+          <div class="flex-1 flex flex-col justify-center items-center gap-2">
99
+            <div class="text-[11px] text-gray">已提现(元)</div>
100
+            <div class="font-bold">{{ state.extract }}</div>
101
+          </div>
39
 
102
 
40
-        <div class="flex-1 flex flex-col justify-center items-center gap-2">
41
-          <div class="text-[11px] text-gray">未结算(元)</div>
42
-          <div class="font-bold">0.00</div>
43
-        </div>
44
-      </div>
103
+          <div class="flex-1 flex flex-col justify-center items-center gap-2">
104
+            <div class="text-[11px] text-gray">佣金余额(元)</div>
105
+            <div class="font-bold">{{ state.brokerage_price }}</div>
106
+          </div>
45
 
107
 
46
-    </div>
108
+          <div class="flex-1 flex flex-col justify-center items-center gap-2">
109
+            <div class="text-[11px] text-gray">未结算(元)</div>
110
+            <div class="font-bold">{{ state.UserUnsettledInviteProfit }}</div>
111
+          </div>
112
+        </div>
47
 
113
 
48
-    <div>
49
-      <div class="flex justify-around text-center text-sm">
50
-        <div class="text-red">线上商城明细</div>
51
-        <div>线下实体明细</div>
52
       </div>
114
       </div>
115
+
53
       <div>
116
       <div>
54
-        <CXBEmpty />
117
+        <div class="flex justify-around text-center text-sm pb-3">
118
+          <div
119
+              @click="handleTabClick(1)"
120
+              :class="state.currentTab === 1? 'text-primary' : ''"
121
+          >线上商城明细</div>
122
+          <div
123
+              :class="state.currentTab === 2? 'text-primary' : ''"
124
+              @click="handleTabClick(2)"
125
+          >线下实体明细</div>
126
+        </div>
127
+        <div>
128
+          <div v-if="state.list && state.list.length > 0" class="bg-white p-3 gap-3">
129
+            <div v-for="(item, index) in state.list" :key="index">
130
+              <div class="flex flex-col">
131
+                <div class="flex justify-between text-gray text-xs items-center f-hairline-bottom pb-3">
132
+                  <div>订单号:{{ item.order_sn }}</div>
133
+                  <div>{{ getStatusText(item.status) }}</div>
134
+                </div>
135
+                <div class="font-bold flex py-2 justify-between">
136
+                  <div>
137
+                    {{ item.content }}
138
+                  </div>
139
+                  <div class="text-primary">+{{ item.number.toFixed(2) }}</div>
140
+                </div>
141
+                <div class="flex justify-between text-gray text-xs">
142
+                  <div class="flex flex-col">
143
+                    <div>消费时间</div>
144
+                    <div class="text-black text-sm">{{ item.xiadan }}</div>
145
+                  </div>
146
+                  <div class="flex flex-col">
147
+                    <div>结算时间</div>
148
+                    <div class="text-black text-sm">{{ item.jiesuan }}</div>
149
+                  </div>
150
+                </div>
151
+              </div>
152
+
153
+
154
+
155
+            </div>
156
+          </div>
157
+
158
+          <CXBEmpty v-else/>
159
+        </div>
55
       </div>
160
       </div>
161
+
56
     </div>
162
     </div>
57
-<!--    <div class="bg-white rounded-lg py-3">
58
-      <FCellGroup divider arrow>
59
-        <FCell v-for="(item, index) in list" :key="index" :title="item.title" exClass="text-sm font-bold" @click="handleClick(item)"/>
60
-      </FCellGroup>
61
-    </div>-->
62
 
163
 
63
-  </div>
164
+  </CXBBasePage>
64
 </template>
165
 </template>
65
-<style>
66
-page {
67
-  background: #f8f8f8;
68
-}
69
-</style>
70
-<route lang="yaml">
166
+<route lang="yaml" >
71
 style:
167
 style:
168
+  navigationBarBackgroundColor: "#FD1642"
169
+  navigationBarTextStyle: "white"
72
   navigationBarTitleText: 分享收益
170
   navigationBarTitleText: 分享收益
73
 </route>
171
 </route>

+ 111 - 21
src/pages/share-the-product/index.vue

@@ -7,32 +7,81 @@ import dayjs from "dayjs";
7
 import {getUserShareProductList} from "~/apis/user";
7
 import {getUserShareProductList} from "~/apis/user";
8
 import {useUserStore} from "~/stores/userStore";
8
 import {useUserStore} from "~/stores/userStore";
9
 const userStore = useUserStore()
9
 const userStore = useUserStore()
10
+const popupDesc = ref();
11
+const state = reactive({
12
+  ctr: '',
13
+  buy: '',
14
+  list: [],
15
+  columns: [{
16
+    title: '日期',
17
+    key: 'ctime'
18
+  }, {
19
+    title: '好友分享',
20
+    key: 'friendSum'
21
+  }, {
22
+    title: '朋友圈分享',
23
+    key: 'momentsSum'
24
+  }, {
25
+    title: '商品点击',
26
+    key: 'clickNum'
27
+  }, {
28
+    title: '商品购买',
29
+    key: 'buyNum'
30
+  }],
31
+  data: [],
32
+  // showPicker: false,
33
+  date: [],
34
+  isVisible: false,
35
+  currentDate: ''
36
+})
37
+
38
+const openSwitch = param => {
39
+  state[`${param}`] = true;
40
+};
41
+const closeSwitch = param => {
42
+  state[`${param}`] = false;
43
+};
44
+const setChooseValue= param => {
45
+  state.date = [...[param[0][3], param[1][3]]];
46
+};
47
+const select = (param: string) => {
48
+  console.log(param);
49
+};
10
 
50
 
51
+const show = ref(false);
52
+const popupConfirm = ({ selectedValue, selectedOptions })=>{
53
+  popupDesc.value = selectedOptions.map((val: any) => val.text).join('');
54
+  show.value = false;
55
+}
11
 onLoad((option) => {
56
 onLoad((option) => {
12
   if (userStore.uid) {
57
   if (userStore.uid) {
13
     getUserShareProductList({
58
     getUserShareProductList({
14
       uid: userStore.uid,
59
       uid: userStore.uid,
15
       pageNum: 1,
60
       pageNum: 1,
16
-      pageSize: 10
61
+      pageSize: 20
17
     }).then(res => {
62
     }).then(res => {
18
-      console.log(res)
63
+      state.ctr = res.ctr
64
+      state.buy = res.buy
65
+      state.data = res.pageInfo.list
19
     })
66
     })
20
   }
67
   }
21
 })
68
 })
22
 </script>
69
 </script>
23
 
70
 
24
 <template>
71
 <template>
72
+  <div class="bg-[#FD1642] h-20 rounded-bottom-full w-full absolute top-0 left-0 z--1"></div>
73
+
25
   <div class="px-3 py-3 flex flex-col gap-3">
74
   <div class="px-3 py-3 flex flex-col gap-3">
26
     <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
75
     <div class="bg-white rounded-lg p-2 flex flex-col gap-4 ">
27
       <div class="flex justify-around py-8">
76
       <div class="flex justify-around py-8">
28
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
77
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
29
           <div class="text-[11px] text-gray">商品点击率</div>
78
           <div class="text-[11px] text-gray">商品点击率</div>
30
-          <div class="font-bold ">0.00%</div>
79
+          <div class="font-bold text-[20px]">{{ state.ctr }}%</div>
31
         </div>
80
         </div>
32
 
81
 
33
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
82
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
34
           <div class="text-[11px] text-gray">商品购买率</div>
83
           <div class="text-[11px] text-gray">商品购买率</div>
35
-          <div class="font-bold">0.00%</div>
84
+          <div class="font-bold text-[20px]">{{ state.buy }}%</div>
36
         </div>
85
         </div>
37
       </div>
86
       </div>
38
     </div>
87
     </div>
@@ -42,28 +91,62 @@ onLoad((option) => {
42
         <div class="text-xs">单位/次</div>
91
         <div class="text-xs">单位/次</div>
43
       </div>
92
       </div>
44
       <div class="flex justify-end">
93
       <div class="flex justify-end">
45
-        <div class="border border-solid border-1 border-gray-300 px-4 text-xs">
46
-          {{ dayjs().format('YYYY-MM-DD')}}
94
+        <div class="border border-solid border-1 border-gray-300 px-4 text-xs"
95
+             @click="openSwitch('isVisible')"
96
+        >
97
+
98
+          {{ state.date && state.date[0] ? `${state.date[0]}至${state.date[1]}` : '请选择日期'}}
47
         </div>
99
         </div>
100
+<!--        <nut-cell-->
101
+<!--            :showIcon="true"-->
102
+<!--            title="选择日期区间"-->
103
+<!--            :desc="date && date[0] ? `${date[0]}至${date[1]}` : '请选择'"-->
104
+<!--            @click="openSwitch('isVisible')"-->
105
+<!--        >-->
106
+<!--        </nut-cell>-->
48
       </div>
107
       </div>
49
     </div>
108
     </div>
50
-
109
+    <nut-calendar
110
+        v-model:visible="state.isVisible"
111
+        :default-value="state.date"
112
+        type="range"
113
+        :start-date="`2017-12-22`"
114
+        @close="closeSwitch('isVisible')"
115
+        @choose="setChooseValue"
116
+        @select="select"
117
+    >
118
+    </nut-calendar>
119
+    <nut-popup position="bottom" v-model:visible="show">
120
+      <nut-date-picker
121
+          v-model="state.currentDate"
122
+          @confirm="popupConfirm"
123
+          :is-show-chinese="true"
124
+      >
125
+<!--        <nut-button block type="primary" @click="alwaysFun">永远有效</nut-button>-->
126
+      </nut-date-picker>
127
+    </nut-popup>
51
     <div class="pb-safe">
128
     <div class="pb-safe">
52
-      <div class="flex justify-around bg-white rounded-tl-lg rounded-tr-lg text-center text-[11px] p-3">
53
-        <div class="">日期</div>
54
-        <div>好友分享</div>
55
-        <div class="">朋友圈分享</div>
56
-        <div class="">商品点击</div>
57
-        <div class="">商品购买</div>
58
-      </div>
59
-      <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList">
60
-        <div class="grid grid-cols-3 text-center text-sm p-2 bg-white text-gray-500" v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index">
61
-          <div class="text-left">{{ item.nickname || '无昵称' }}</div>
62
-          <div>{{ item.statusType }}</div>
63
-          <div class="text-right">{{ item.promoterTime }}</div>
64
-        </div>
129
+<!--      <div class="flex justify-around bg-white rounded-tl-lg rounded-tr-lg text-center text-[11px] p-3">-->
130
+<!--        <div class="">日期</div>-->
131
+<!--        <div>好友分享</div>-->
132
+<!--        <div class="">朋友圈分享</div>-->
133
+<!--        <div class="">商品点击</div>-->
134
+<!--        <div class="">商品购买</div>-->
135
+<!--      </div>-->
136
+<!--      <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList">-->
137
+<!--        <div class="grid grid-cols-3 text-center text-sm p-2 bg-white text-gray-500" v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index">-->
138
+<!--          <div class="text-left">{{ item.nickname || '无昵称' }}</div>-->
139
+<!--          <div>{{ item.statusType }}</div>-->
140
+<!--          <div class="text-right">{{ item.promoterTime }}</div>-->
141
+<!--        </div>-->
142
+<!--      </div>-->
143
+      <div class="bg-white p-3" v-if="state.data && state.data.length > 0">
144
+        <nut-table :columns="state.columns"
145
+                   :data="state.data"
146
+                   :bordered="true"
147
+        ></nut-table>
65
       </div>
148
       </div>
66
-      <div else>
149
+      <div v-else>
67
         <CXBEmpty />
150
         <CXBEmpty />
68
       </div>
151
       </div>
69
     </div>
152
     </div>
@@ -71,11 +154,18 @@ onLoad((option) => {
71
   </div>
154
   </div>
72
 </template>
155
 </template>
73
 <style>
156
 <style>
157
+
74
 page {
158
 page {
75
   background: #f8f8f8;
159
   background: #f8f8f8;
160
+  --nut-table-cols-padding: 2px
161
+}
162
+.nut-table {
163
+  font-size: 12px !important;
76
 }
164
 }
77
 </style>
165
 </style>
78
 <route lang="yaml">
166
 <route lang="yaml">
79
 style:
167
 style:
168
+  navigationBarBackgroundColor: "#FD1642"
169
+  navigationBarTextStyle: "white"
80
   navigationBarTitleText: 分享产品
170
   navigationBarTitleText: 分享产品
81
 </route>
171
 </route>

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

@@ -56,7 +56,7 @@ function handleNavItemClick(navItemId: any) {
56
 
56
 
57
 </script>
57
 </script>
58
 <template>
58
 <template>
59
-  <div class="px-3">
59
+  <div class="px-3 pb-safe pb-10">
60
     <MerchantHeader :model="merchant"/>
60
     <MerchantHeader :model="merchant"/>
61
     <MerchantProductList
61
     <MerchantProductList
62
         :list="productList"
62
         :list="productList"

+ 8 - 4
src/pages/store/product/detail.vue

@@ -35,6 +35,10 @@ const state = reactive({
35
 })
35
 })
36
 const detail: any = ref(null)
36
 const detail: any = ref(null)
37
 
37
 
38
+onShow(() => {
39
+  loadCartCount()
40
+
41
+})
38
 
42
 
39
 onLoad((option: any) => {
43
 onLoad((option: any) => {
40
   // const id = '5491'
44
   // const id = '5491'
@@ -68,13 +72,12 @@ onLoad((option: any) => {
68
     state.recommendList = res.list
72
     state.recommendList = res.list
69
   })
73
   })
70
 
74
 
71
-  loadCartCount()
72
 
75
 
73
 })
76
 })
74
 
77
 
75
 function loadCartCount() {
78
 function loadCartCount() {
76
   getCartCount().then(res => {
79
   getCartCount().then(res => {
77
-    // console.log(res)
80
+    console.log(res)
78
     state.cartCount = res[0].count
81
     state.cartCount = res[0].count
79
   }).catch(error => {
82
   }).catch(error => {
80
     console.log(error)
83
     console.log(error)
@@ -269,7 +272,9 @@ function handleCountChange(val) {
269
     </FCell>
272
     </FCell>
270
 
273
 
271
     <!-- 店铺信息 -->
274
     <!-- 店铺信息 -->
272
-    <div class="flex gap-3 p-3 bg-white">
275
+    <div
276
+        @tap="handleShowMerchant(detail.mer_id)"
277
+        class="flex gap-3 p-3 bg-white">
273
       <div v-if="detail && detail.merchant">
278
       <div v-if="detail && detail.merchant">
274
         <image :src="detail.merchant.mer_avatar" mode="widthFix" class=" h-12 w-12"></image>
279
         <image :src="detail.merchant.mer_avatar" mode="widthFix" class=" h-12 w-12"></image>
275
       </div>
280
       </div>
@@ -279,7 +284,6 @@ function handleCountChange(val) {
279
           <div class="i-tabler-chevron-right text-gray"></div>
284
           <div class="i-tabler-chevron-right text-gray"></div>
280
         </div>
285
         </div>
281
         <div
286
         <div
282
-            @tap="handleShowMerchant(detail.mer_id)"
283
             class="border border-solid border-red text-red text-xs px-1 rounded-full w-fit"
287
             class="border border-solid border-red text-red text-xs px-1 rounded-full w-fit"
284
         >
288
         >
285
           进入店铺
289
           进入店铺

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

@@ -192,6 +192,12 @@ const userType = computed(() => {
192
       return '合伙人'
192
       return '合伙人'
193
     }
193
     }
194
 })
194
 })
195
+
196
+function handleToRedIntegral() {
197
+  uni.navigateTo({
198
+    url: '/pages/red-integral/index'
199
+  })
200
+}
195
 </script>
201
 </script>
196
 <template>
202
 <template>
197
   <div v-if="state.isLogin">
203
   <div v-if="state.isLogin">
@@ -254,7 +260,9 @@ const userType = computed(() => {
254
           <div
260
           <div
255
               v-if="userStore.userInfo"
261
               v-if="userStore.userInfo"
256
               class="flex">
262
               class="flex">
257
-            <div class="w-1/2 flex flex-col justify-center items-center">
263
+            <div
264
+                @click="handleToRedIntegral"
265
+                class="w-1/2 flex flex-col justify-center items-center">
258
               <div>{{ userStore.userInfo.red }}</div>
266
               <div>{{ userStore.userInfo.red }}</div>
259
               <div class="text-xs">红积分提现</div>
267
               <div class="text-xs">红积分提现</div>
260
             </div>
268
             </div>
@@ -278,7 +286,7 @@ const userType = computed(() => {
278
         </div>
286
         </div>
279
         <div class="flex pb-4">
287
         <div class="flex pb-4">
280
           <div
288
           <div
281
-              @click="handleShowMyAllOrder(index)"
289
+              @click="handleShowMyAllOrder(index + 1)"
282
               v-for="(item, index) in myOrderList" :key="index"
290
               v-for="(item, index) in myOrderList" :key="index"
283
               class="flex flex-col justify-center items-center w-1/5 gap-3"
291
               class="flex flex-col justify-center items-center w-1/5 gap-3"
284
           >
292
           >

+ 9 - 1
src/stores/userStore.ts

@@ -13,6 +13,7 @@ interface UserStoreState {
13
     permissionList: Array<string> | null
13
     permissionList: Array<string> | null
14
     yanglao: number
14
     yanglao: number
15
 }
15
 }
16
+
16
 export const useUserStore = defineStore('userStore', {
17
 export const useUserStore = defineStore('userStore', {
17
     state: () => ({
18
     state: () => ({
18
         menus: [{}],
19
         menus: [{}],
@@ -37,7 +38,14 @@ export const useUserStore = defineStore('userStore', {
37
         //     return !!this.token
38
         //     return !!this.token
38
         // },
39
         // },
39
         async getUserInfo() {
40
         async getUserInfo() {
40
-            this.userInfo = await getUserInfo();
41
+            try {
42
+                this.userInfo = await getUserInfo();
43
+
44
+            } catch (error) {
45
+                uni.navigateTo({
46
+                    url: '/pages/user/login/index'
47
+                })
48
+            }
41
         },
49
         },
42
         login(token: string, exp: number) {
50
         login(token: string, exp: number) {
43
             this.token = token
51
             this.token = token