|
|
@@ -2,8 +2,8 @@
|
|
2
|
2
|
// import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
|
|
3
|
3
|
import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
|
|
4
|
4
|
|
|
5
|
|
-import {encodePhone} from "../../utils";
|
|
6
|
|
-import {getAgentInfo, getRules, getUserInfo} from "~/apis/user";
|
|
|
5
|
+import { encodePhone } from "../../utils";
|
|
|
6
|
+import { getAgentInfo, getRules, getUserInfo } from "~/apis/user";
|
|
7
|
7
|
|
|
8
|
8
|
const userStore = useUserStore()
|
|
9
|
9
|
const ruleDetail = ref<{
|
|
|
@@ -19,119 +19,204 @@ const ruleDetail = ref<{
|
|
19
|
19
|
const currentType = ref<any>([])
|
|
20
|
20
|
|
|
21
|
21
|
const showUpgradeInfo = ref(false)
|
|
|
22
|
+// const userType = computed(() => {
|
|
|
23
|
+// const userRichType = userStore.userInfo?.user_rich_type
|
|
|
24
|
+// // console.log(userStore.userInfo)
|
|
|
25
|
+// const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
|
|
|
26
|
+// // 创始人
|
|
|
27
|
+// if (userRichType == 3) {
|
|
|
28
|
+// if (bangfu) {
|
|
|
29
|
+// return ['创始人', bangfu]
|
|
|
30
|
+// }
|
|
|
31
|
+// return ['创始人']
|
|
|
32
|
+// // return [].push()
|
|
|
33
|
+// }
|
|
|
34
|
+// // 普通用户
|
|
|
35
|
+// if (userRichType == 0) {
|
|
|
36
|
+// if (bangfu) {
|
|
|
37
|
+// return ['用户', bangfu]
|
|
|
38
|
+// }
|
|
|
39
|
+// return ['用户']
|
|
|
40
|
+// }
|
|
|
41
|
+// // 会员
|
|
|
42
|
+// if (userRichType == 1) {
|
|
|
43
|
+// if (bangfu) {
|
|
|
44
|
+// return ['会员', bangfu]
|
|
|
45
|
+// }
|
|
|
46
|
+// return ['会员']
|
|
|
47
|
+
|
|
|
48
|
+// }
|
|
|
49
|
+// if (userRichType == 3) {
|
|
|
50
|
+// if (bangfu) {
|
|
|
51
|
+// return ['创始人', bangfu]
|
|
|
52
|
+// }
|
|
|
53
|
+// return ['创始人']
|
|
|
54
|
+// }
|
|
|
55
|
+// // 合伙人
|
|
|
56
|
+// if (userRichType == 4) {
|
|
|
57
|
+// // return '高级会员'
|
|
|
58
|
+// if (bangfu) {
|
|
|
59
|
+// return ['VIP', bangfu]
|
|
|
60
|
+// }
|
|
|
61
|
+// return ['VIP']
|
|
|
62
|
+// }
|
|
|
63
|
+// if (userRichType == 5) {
|
|
|
64
|
+// if (bangfu) {
|
|
|
65
|
+// return ['初始级合伙人', bangfu]
|
|
|
66
|
+// }
|
|
|
67
|
+// return ['初始级合伙人']
|
|
|
68
|
+// }
|
|
|
69
|
+// if (userRichType == 6) {
|
|
|
70
|
+// if (bangfu) {
|
|
|
71
|
+// return ['中级合伙人', bangfu]
|
|
|
72
|
+// }
|
|
|
73
|
+// return ['中级合伙人']
|
|
|
74
|
+// }
|
|
|
75
|
+// if (userRichType == 7) {
|
|
|
76
|
+// if (bangfu) {
|
|
|
77
|
+// return ['高级合伙人', bangfu]
|
|
|
78
|
+// }
|
|
|
79
|
+// return ['高级合伙人']
|
|
|
80
|
+// }
|
|
|
81
|
+// if (!userRichType) {
|
|
|
82
|
+// if (bangfu) {
|
|
|
83
|
+// return ['用户', bangfu]
|
|
|
84
|
+// }
|
|
|
85
|
+// return ['用户']
|
|
|
86
|
+// }
|
|
|
87
|
+// })
|
|
|
88
|
+// /*
|
|
|
89
|
+// const userType = computed(() => {
|
|
|
90
|
+// const userRichType = userStore.userInfo?.user_rich_type
|
|
|
91
|
+
|
|
|
92
|
+// // 创始人
|
|
|
93
|
+// if (userRichType == 3) {
|
|
|
94
|
+// return '创始人'
|
|
|
95
|
+// }
|
|
|
96
|
+// // 普通用户
|
|
|
97
|
+// if (userRichType == 0) {
|
|
|
98
|
+// return '用户'
|
|
|
99
|
+// }
|
|
|
100
|
+// // 会员
|
|
|
101
|
+// if (userRichType == 1) {
|
|
|
102
|
+// return '会员'
|
|
|
103
|
+// }
|
|
|
104
|
+// if (userRichType == 3) {
|
|
|
105
|
+// return '创始人'
|
|
|
106
|
+// }
|
|
|
107
|
+// // 合伙人
|
|
|
108
|
+// if (userRichType == 4) {
|
|
|
109
|
+// // return '合伙人(VIP)'
|
|
|
110
|
+// return 'VIP'
|
|
|
111
|
+// }
|
|
|
112
|
+// if (userRichType == 5) {
|
|
|
113
|
+// return '初始级合伙人'
|
|
|
114
|
+// }
|
|
|
115
|
+// if (userRichType == 6) {
|
|
|
116
|
+// return '中级合伙人'
|
|
|
117
|
+// }
|
|
|
118
|
+// if (userRichType == 7) {
|
|
|
119
|
+// return '高级合伙人'
|
|
|
120
|
+// }
|
|
|
121
|
+// if (!userRichType) {
|
|
|
122
|
+// return '用户'
|
|
|
123
|
+// }
|
|
|
124
|
+// })
|
|
|
125
|
+// */
|
|
|
126
|
+
|
|
|
127
|
+//0:普通用户 1:会员 3:创始人 4:高级会员 8合伙人 9联合创始人
|
|
22
|
128
|
const userType = computed(() => {
|
|
23
|
129
|
const userRichType = userStore.userInfo?.user_rich_type
|
|
24
|
|
- // console.log(userStore.userInfo)
|
|
|
130
|
+ console.log('我是大哥',userStore.userInfo)
|
|
25
|
131
|
const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
|
|
26
|
|
- // 创始人
|
|
27
|
|
- if (userRichType == 3) {
|
|
28
|
|
- if (bangfu) {
|
|
29
|
|
- return ['创始人', bangfu]
|
|
30
|
|
- }
|
|
31
|
|
- return ['创始人']
|
|
32
|
|
- // return [].push()
|
|
33
|
|
- }
|
|
|
132
|
+ // console.log('我是帮扶',bangfu);
|
|
|
133
|
+
|
|
34
|
134
|
// 普通用户
|
|
35
|
135
|
if (userRichType == 0) {
|
|
36
|
|
- if (bangfu) {
|
|
37
|
|
- return ['用户', bangfu]
|
|
38
|
|
- }
|
|
39
|
|
- return ['用户']
|
|
|
136
|
+ // if (bangfu) {
|
|
|
137
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
138
|
+ // }
|
|
|
139
|
+ return ['../../static/img-hy/用户.png']
|
|
40
|
140
|
}
|
|
41
|
141
|
// 会员
|
|
42
|
142
|
if (userRichType == 1) {
|
|
43
|
|
- if (bangfu) {
|
|
44
|
|
- return ['会员', bangfu]
|
|
45
|
|
- }
|
|
46
|
|
- return ['会员']
|
|
|
143
|
+ // if (bangfu) {
|
|
|
144
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
145
|
+ // }
|
|
|
146
|
+ return ['../../static/img-hy/会员.png']
|
|
47
|
147
|
|
|
48
|
148
|
}
|
|
|
149
|
+ // 创始人
|
|
49
|
150
|
if (userRichType == 3) {
|
|
50
|
|
- if (bangfu) {
|
|
51
|
|
- return ['创始人', bangfu]
|
|
52
|
|
- }
|
|
53
|
|
- return ['创始人']
|
|
|
151
|
+ // if (bangfu) {
|
|
|
152
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
153
|
+ // }
|
|
|
154
|
+ return ['../../static/img-hy/创始人.png']
|
|
54
|
155
|
}
|
|
55
|
156
|
// 合伙人
|
|
56
|
157
|
if (userRichType == 4) {
|
|
57
|
158
|
// return '高级会员'
|
|
58
|
|
- if (bangfu) {
|
|
59
|
|
- return ['VIP', bangfu]
|
|
60
|
|
- }
|
|
61
|
|
- return ['VIP']
|
|
62
|
|
- }
|
|
63
|
|
- if (userRichType == 5) {
|
|
64
|
|
- if (bangfu) {
|
|
65
|
|
- return ['初始级合伙人', bangfu]
|
|
66
|
|
- }
|
|
67
|
|
- return ['初始级合伙人']
|
|
|
159
|
+ // if (bangfu) {
|
|
|
160
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
161
|
+ // }
|
|
|
162
|
+ return ['../../static/img-hy/高级会员.png']
|
|
68
|
163
|
}
|
|
69
|
|
- if (userRichType == 6) {
|
|
70
|
|
- if (bangfu) {
|
|
71
|
|
- return ['中级合伙人', bangfu]
|
|
72
|
|
- }
|
|
73
|
|
- return ['中级合伙人']
|
|
|
164
|
+ if (userRichType == 8) {
|
|
|
165
|
+ // if (bangfu) {
|
|
|
166
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
167
|
+ // }
|
|
|
168
|
+ return ['../../static/img-hy/合伙人.png']
|
|
74
|
169
|
}
|
|
75
|
|
- if (userRichType == 7) {
|
|
76
|
|
- if (bangfu) {
|
|
77
|
|
- return ['高级合伙人', bangfu]
|
|
78
|
|
- }
|
|
79
|
|
- return ['高级合伙人']
|
|
|
170
|
+ if (userRichType == 9) {
|
|
|
171
|
+ // if (bangfu) {
|
|
|
172
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
173
|
+ // }
|
|
|
174
|
+ return ['../../static/img-hy/联合创始人.png']
|
|
80
|
175
|
}
|
|
81
|
176
|
if (!userRichType) {
|
|
82
|
|
- if (bangfu) {
|
|
83
|
|
- return ['用户', bangfu]
|
|
84
|
|
- }
|
|
85
|
|
- return ['用户']
|
|
|
177
|
+ // if (bangfu) {
|
|
|
178
|
+ // return ['../../static/img-hy/帮扶中心.png', bangfu]
|
|
|
179
|
+ // }
|
|
|
180
|
+ return ['']
|
|
86
|
181
|
}
|
|
87
|
182
|
})
|
|
88
|
|
-/*
|
|
89
|
|
-const userType = computed(() => {
|
|
90
|
|
- const userRichType = userStore.userInfo?.user_rich_type
|
|
91
|
|
-
|
|
92
|
|
- // 创始人
|
|
93
|
|
- if (userRichType == 3) {
|
|
94
|
|
- return '创始人'
|
|
95
|
|
- }
|
|
|
183
|
+//0:普通用户 1:股东
|
|
|
184
|
+const AlholderType = computed(() => {
|
|
|
185
|
+ const stockholder = userStore.userInfo?.stockholder
|
|
|
186
|
+ console.log('我是stockholder',userStore.userInfo.stockholder)
|
|
96
|
187
|
// 普通用户
|
|
97
|
|
- if (userRichType == 0) {
|
|
98
|
|
- return '用户'
|
|
99
|
|
- }
|
|
100
|
|
- // 会员
|
|
101
|
|
- if (userRichType == 1) {
|
|
102
|
|
- return '会员'
|
|
|
188
|
+ if (stockholder == 0) {
|
|
|
189
|
+ return ['']
|
|
103
|
190
|
}
|
|
104
|
|
- if (userRichType == 3) {
|
|
105
|
|
- return '创始人'
|
|
106
|
|
- }
|
|
107
|
|
- // 合伙人
|
|
108
|
|
- if (userRichType == 4) {
|
|
109
|
|
- // return '合伙人(VIP)'
|
|
110
|
|
- return 'VIP'
|
|
|
191
|
+ // 股东
|
|
|
192
|
+ if (stockholder == 1) {
|
|
|
193
|
+ return ['../../static/img-hy/股东.png']
|
|
111
|
194
|
}
|
|
112
|
|
- if (userRichType == 5) {
|
|
113
|
|
- return '初始级合伙人'
|
|
114
|
|
- }
|
|
115
|
|
- if (userRichType == 6) {
|
|
116
|
|
- return '中级合伙人'
|
|
|
195
|
+
|
|
|
196
|
+})
|
|
|
197
|
+// '':普通用户 district-区/县代 city-市代',
|
|
|
198
|
+const areaType = computed(() => {
|
|
|
199
|
+ const areamanage = userStore.userInfo?.area_manage_type
|
|
|
200
|
+ console.log('我是area_manage_type',userStore.userInfo.area_manage_type)
|
|
|
201
|
+ // 县/区代理
|
|
|
202
|
+ if (areamanage == 'district') {
|
|
|
203
|
+ return ['../../static/img-hy/区/县代理.png']
|
|
117
|
204
|
}
|
|
118
|
|
- if (userRichType == 7) {
|
|
119
|
|
- return '高级合伙人'
|
|
|
205
|
+ // 市代理
|
|
|
206
|
+ if (areamanage == 'city') {
|
|
|
207
|
+ return ['../../static/img-hy/市级代理.png']
|
|
120
|
208
|
}
|
|
121
|
|
- if (!userRichType) {
|
|
122
|
|
- return '用户'
|
|
|
209
|
+ //普通用户
|
|
|
210
|
+ if(!areamanage){
|
|
|
211
|
+ return['']
|
|
123
|
212
|
}
|
|
|
213
|
+
|
|
124
|
214
|
})
|
|
125
|
|
-*/
|
|
126
|
215
|
|
|
127
|
216
|
|
|
128
|
|
-onLoad(async (option) => {
|
|
129
|
|
- // console.log(option)
|
|
130
|
|
- if (option && option.userType) {
|
|
131
|
|
- currentType.value = [option.userType]
|
|
132
|
|
- } else {
|
|
133
|
|
- currentType.value = userType
|
|
134
|
|
- }
|
|
|
217
|
+
|
|
|
218
|
+onLoad(async () => {
|
|
|
219
|
+
|
|
135
|
220
|
await userStore.getUserInfo()
|
|
136
|
221
|
await userStore.getUserYanglaoJin()
|
|
137
|
222
|
})
|
|
|
@@ -229,10 +314,8 @@ function handleToVipPage() {
|
|
229
|
314
|
<div class="flex flex-col gap-4 relative px-3 pb-safe">
|
|
230
|
315
|
<div class="pt-5 ">
|
|
231
|
316
|
<div class="flex gap-2 mb-2 text-white mb-6">
|
|
232
|
|
- <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
|
|
233
|
|
- mode="widthFix"
|
|
234
|
|
- class="w-9 h-9 rounded-full"
|
|
235
|
|
- ></image>
|
|
|
317
|
+ <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
|
|
|
318
|
+ class="w-9 h-9 rounded-full"></image>
|
|
236
|
319
|
|
|
237
|
320
|
<div class="flex">
|
|
238
|
321
|
<div class="flex flex-col">
|
|
|
@@ -246,51 +329,38 @@ function handleToVipPage() {
|
|
246
|
329
|
</div>
|
|
247
|
330
|
</div>
|
|
248
|
331
|
<div class="flex gap-1 items-center px-1">
|
|
249
|
|
- <div
|
|
250
|
|
- v-for="(item, index) in currentType"
|
|
251
|
|
- :key="index"
|
|
252
|
|
- class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
|
|
253
|
|
- {{ item }}
|
|
|
332
|
+ <div class="flex rounded-full text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
|
|
|
333
|
+ <image class="vip_img" :src="userType" v-if="userType"></image>
|
|
|
334
|
+ <image class="vip_img" :src="AlholderType" v-if="AlholderType
|
|
|
335
|
+ "></image>
|
|
|
336
|
+ <image class="vip_img" :src="areaType" v-if="areaType"></image>
|
|
254
|
337
|
</div>
|
|
255
|
338
|
</div>
|
|
256
|
|
-<!-- <div-->
|
|
257
|
|
-<!-- class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">-->
|
|
258
|
|
-<!-- {{ userType }}-->
|
|
259
|
|
-<!-- </div>-->
|
|
|
339
|
+ <!-- <div-->
|
|
|
340
|
+ <!-- class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">-->
|
|
|
341
|
+ <!-- {{ userType }}-->
|
|
|
342
|
+ <!-- </div>-->
|
|
260
|
343
|
</div>
|
|
261
|
344
|
|
|
262
|
345
|
|
|
263
|
346
|
</div>
|
|
264
|
347
|
<div class="bg-white rounded flex flex-col gap-6 py-4 text-xl">
|
|
265
|
|
- <div
|
|
266
|
|
- v-if="userStore.userInfo"
|
|
267
|
|
- class="flex flex-wrap">
|
|
268
|
|
- <div
|
|
269
|
|
- @tap="handleShowAnnuityDetail"
|
|
270
|
|
- class="w-1/3 flex flex-col justify-center items-center"
|
|
271
|
|
- >
|
|
|
348
|
+ <div v-if="userStore.userInfo" class="flex flex-wrap">
|
|
|
349
|
+ <div @tap="handleShowAnnuityDetail" class="w-1/3 flex flex-col justify-center items-center">
|
|
272
|
350
|
<div>{{ userStore.yanglao.all_yanglao }}</div>
|
|
273
|
351
|
<div class="text-xs">养老金</div>
|
|
274
|
352
|
</div>
|
|
275
|
|
- <div
|
|
276
|
|
- @tap="handleShowMyInvitation"
|
|
277
|
|
- class="w-1/3 flex flex-col justify-center items-center">
|
|
|
353
|
+ <div @tap="handleShowMyInvitation" class="w-1/3 flex flex-col justify-center items-center">
|
|
278
|
354
|
<div>{{ agentInfo.brokerage_price ? agentInfo.brokerage_price : '0' }}</div>
|
|
279
|
355
|
<div class="text-xs">我的佣金</div>
|
|
280
|
356
|
</div>
|
|
281
|
|
- <div
|
|
282
|
|
- @tap="handleShowMyIntegral"
|
|
283
|
|
- class="w-1/3 flex flex-col justify-center items-center">
|
|
|
357
|
+ <div @tap="handleShowMyIntegral" class="w-1/3 flex flex-col justify-center items-center">
|
|
284
|
358
|
<div>{{ userStore.userInfo.score }}</div>
|
|
285
|
359
|
<div class="text-xs">我的积分</div>
|
|
286
|
360
|
</div>
|
|
287
|
361
|
</div>
|
|
288
|
|
- <div
|
|
289
|
|
- v-if="userStore.userInfo"
|
|
290
|
|
- class="flex">
|
|
291
|
|
- <div
|
|
292
|
|
- @click="handleToRedIntegral"
|
|
293
|
|
- class="w-1/2 flex flex-col justify-center items-center">
|
|
|
362
|
+ <div v-if="userStore.userInfo" class="flex">
|
|
|
363
|
+ <div @click="handleToRedIntegral" class="w-1/2 flex flex-col justify-center items-center">
|
|
294
|
364
|
<div>{{ userStore.userInfo.red }}</div>
|
|
295
|
365
|
<div class="text-xs">红积分提现</div>
|
|
296
|
366
|
</div>
|
|
|
@@ -304,22 +374,14 @@ function handleToVipPage() {
|
|
304
|
374
|
|
|
305
|
375
|
</div>
|
|
306
|
376
|
|
|
307
|
|
- <div
|
|
308
|
|
- v-if="ruleDetail && ruleDetail.content && !showUpgradeInfo"
|
|
309
|
|
- class="p-3 bg-white text-sm text-gray-500"
|
|
310
|
|
- >
|
|
|
377
|
+ <div v-if="ruleDetail && ruleDetail.content && !showUpgradeInfo" class="p-3 bg-white text-sm text-gray-500">
|
|
311
|
378
|
<mpHtml :content="ruleDetail.content"></mpHtml>
|
|
312
|
379
|
</div>
|
|
313
|
|
- <div
|
|
314
|
|
- v-else
|
|
315
|
|
- class="p-3 bg-white text-sm text-gray-500"
|
|
316
|
|
- >
|
|
|
380
|
+ <div v-else class="p-3 bg-white text-sm text-gray-500">
|
|
317
|
381
|
<mpHtml :content="ruleDetail.content" v-if="ruleDetail && ruleDetail.content"></mpHtml>
|
|
318
|
382
|
|
|
319
|
383
|
<div class="flex justify-center items-center">
|
|
320
|
|
- <nut-button
|
|
321
|
|
- @click="handleToVipPage"
|
|
322
|
|
- type="primary" size="small">立即开通</nut-button>
|
|
|
384
|
+ <nut-button @click="handleToVipPage" type="primary" size="small">立即开通</nut-button>
|
|
323
|
385
|
|
|
324
|
386
|
</div>
|
|
325
|
387
|
</div>
|
|
|
@@ -330,10 +392,8 @@ function handleToVipPage() {
|
|
330
|
392
|
<div class="font-bold">还有更多奖励权益</div>
|
|
331
|
393
|
<div class="flex justify-end">
|
|
332
|
394
|
|
|
333
|
|
- <div
|
|
334
|
|
- @click="handleUserUpgrade"
|
|
335
|
|
- class="text-[12px] border border-solid border-1px rounded px-1 border-gray text-gray-600"
|
|
336
|
|
- >了解更多奖励</div>
|
|
|
395
|
+ <div @click="handleUserUpgrade"
|
|
|
396
|
+ class="text-[12px] border border-solid border-1px rounded px-1 border-gray text-gray-600">了解更多奖励</div>
|
|
337
|
397
|
</div>
|
|
338
|
398
|
</div>
|
|
339
|
399
|
|
|
|
@@ -341,8 +401,6 @@ function handleToVipPage() {
|
|
341
|
401
|
|
|
342
|
402
|
</div>
|
|
343
|
403
|
</div>
|
|
344
|
|
-
|
|
345
|
|
-
|
|
346
|
404
|
</template>
|
|
347
|
405
|
|
|
348
|
406
|
<route lang="yaml">
|
|
|
@@ -355,7 +413,13 @@ style:
|
|
355
|
413
|
</route>
|
|
356
|
414
|
|
|
357
|
415
|
<style>
|
|
358
|
|
-page{
|
|
|
416
|
+page {
|
|
359
|
417
|
background: #f5f5f5;
|
|
360
|
418
|
}
|
|
|
419
|
+
|
|
|
420
|
+.vip_img {
|
|
|
421
|
+ width: 48px;
|
|
|
422
|
+ height: 24px;
|
|
|
423
|
+ margin-left: 2px;
|
|
|
424
|
+}
|
|
361
|
425
|
</style>
|