quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<template>
    <view class="index-team o-h" v-if="!loadding">
        <!-- #ifdef MP-WEIXIN || APP-PLUS -->
        <view class="ww100" :style="'height:'+topBarTop()+'px;'"></view>
        <view class="tc  head_top" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
            <view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view>
            <view class="fb">{{titel}}</view>
        </view>
        <!-- #endif -->
        <!--头部图片-->
        <view class="banner d-c-c d-c">
            <image :src="top_background" mode="widthFix"></image>
        </view>
 
        <!--是分销商-->
        <template v-if="is_shareholder && isData">
            <!--金额信息-->
            <view class="team-wrap pr m-0-20" style="margin-top: 300rpx;">
                <view class="d-b-c border-b pb30 f28 lh150 user-info">
                    <view class="d-b-c">
                        <view class="photo">
                            <image :src="user.avatarUrl" mode="aspectFill"></image>
                        </view>
                        <text class="gray3 f32">{{ user.nickName }}</text>
                    </view>
                    <view>
                        <text class="gray3 f28 grade">{{ shareholder.grade.name }}</text>
                    </view>
                </view>
                <view class="d-s-c p-30-0 top_dash">
                    <view class="flex-1 d-c-c d-c">
                        <view class="redF6">
                            <text class="f24">¥</text>
                            <text class="f40">{{ shareholder.money }}</text>
                        </view>
                        <view class="pt20 f26 gray3">{{ info_words.index.words.money.value }}</view>
                    </view>
                    <view class="flex-1 d-c-c d-c">
                        <view class="">
                            <text class="f24">¥</text>
                            <text class="f40">{{ shareholder.freeze_money }}</text>
                        </view>
                        <view class="pt20 f28 gray3">{{ info_words.index.words.freeze_money.value }}</view>
                    </view>
                    <view class="flex-1 d-c-c d-c">
                        <view class="">
                            <text class="f24">¥</text>
                            <text class="f40">{{ shareholder.total_money }}</text>
                        </view>
                        <view class="pt20 f28 gray3">{{ info_words.index.words.total_money.value }}</view>
                    </view>
                </view>
                <view class="d-c-c pt30">
                    <button type="primary" class="btn-gcred flex-1" @click="gotoCash">{{ info_words.index.words.cash.value }}</button>
                </view>
            </view>
            <!--图标入口-->
            <view class="team-wrap m-0-20 p30 d-s-c f-w mt20 bg-white">
                <view class="d-c-c d-c flex-1" @click="gotoPage('pages2/shareholder/cash/list/list')">
                    <view>
                        <image class="team_index_img" src="../../../static/icon/icon-zijinmingxi.png" mode=""></image>
                    </view>
                    <text class="pt10 f26 mt20">{{ info_words.cash_list.title.value }}</text>
                </view>
                <view class="d-c-c d-c flex-1" @click="gotoPage('pages2/shareholder/bonus/bonus')">
                    <view>
                        <image class="team_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""></image>
                    </view>
                    <text class="pt10 f26 mt20">{{ info_words.bonus_list.title.value }}</text>
                </view>
            </view>
        </template>
        <!--不是分销商-->
        <template v-if="!is_shareholder && isData">
            <view class="no-team">
                <view class="mt50 p-0-20 pt30 red f34 tc">{{ info_words.index.words.not_shareholder.value }}</view>
                <view class="p30 f28" v-if="setting.become=='40'">您需要下级分销商人数达到<text class="orange">{{setting.totalfxs_down}}</text>人才能成为{{ info_words.index.words.shareholder.value }},您当前的分销商人数为<text class="orange">{{agent_total}}</text>人,继续努力吧!</view>
                <view class="p30 f28" v-if="setting.become=='50'">您需要累计分销佣金达到<text class="orange">{{setting.total_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前累计分销佣金为<text class="orange">{{agent_money}}</text>元,继续努力吧!</view>
                <view class="p30 f28" v-if="setting.become=='70'">您需要团队累计业绩达到<text class="orange">{{setting.total_team_money}}</text>元才能成为{{ info_words.index.words.shareholder.value }},您当前团队累计业绩为<text class="orange">{{team_money}}</text>元,继续努力吧!</view>
                <view class="p30 f28" v-if="setting.become=='90'">您需要一次性消费达到<text class="orange">{{setting.one_expend_money}}</text>元才能成为{{ info_words.index.words.region.value }},继续努力吧!</view>
                <view class="section-product" v-if="setting.become=='110'">
                    <view class="p30 f28">您需要团队推荐商户入驻人数需达到<text class="orange">{{setting.totalsh_down}}</text>人并且团队推荐指定会员等级达到<text class="orange" v-for="(item, index ) in gradeList">{{(index>0?'或':'')+item.name}}</text>满<text class="orange">{{setting.totalvip_down}}</text>人并且至少购买VIP专区商品<text class="orange">{{setting.purchase_count}}</text>次或购买以下任意一款商品才能成为{{ info_words.index.words.shareholder.value }}</view>
                    <view @click="gotoProductDetail(item.product_id)" class="item" :class="index==productList.length-1?'noborder':'border-b-e'" v-for="(item, index) in productList" :key="index">
                        <image :src="item.product_image" class="cover" mode="aspectFit"></image>
                        <view class="info">
                            <view class="title">{{ item.product_name }}</view>
                            <view class="describe">{{ item.product_sku.product_attr }}</view>
                            <view class="level-box count_choose">
                                <view class="price">
                                    ¥
                                    <text class="num">{{ item.product_sku.product_price }}</text>
                                </view>
                            </view>
                        </view>
                        <view class="icon-box pl20">
                            <text class="icon iconfont icon-jiantou f50"></text>
                        </view>
                    </view>
                </view>
                <view class="section-product" v-if="setting.become=='100'">
                    <view class="p30 f28 d-c-c">您需要购买以下任意一款商品才能申请{{ info_words.index.words.shareholder.value }}</view>
                    <view @click="gotoProductDetail(item.product_id)" class="item" :class="index==productList.length-1?'noborder':'border-b-e'" v-for="(item, index) in productList" :key="index">
                        <image :src="item.product_image" class="cover" mode="aspectFit"></image>
                        <view class="info">
                            <view class="title">{{ item.product_name }}</view>
                            <view class="describe">{{ item.product_sku.product_attr }}</view>
                            <view class="level-box count_choose">
                                <view class="price">
                                    ¥
                                    <text class="num">{{ item.product_sku.product_price }}</text>
                                </view>
                            </view>
                        </view>
                        <view class="icon-box pl20">
                            <text class="icon iconfont icon-jiantou f50"></text>
                        </view>
                    </view>
                </view>
                <view class="p30 mt30" v-if="setting.become=='10'">
                    <button type="primary" class="btn-gcred" @click="applyShareholder">{{ info_words.index.words.apply_now.value }}</button>
                </view>
                <view class="p30 mt30" v-else-if="setting.become=='40' || setting.become=='50'">
                    <button type="primary" class="btn-gcred" @click="gotoAgent">马上去招募人员</button>
                </view>
                <view class="p30 mt30" v-else-if="setting.become=='70'">
                    <button type="primary" class="btn-gcred" @click="gotoTeam">去看看我的团队</button>
                </view>
                <view class="p30">
                    <button type="primary" class="btn-gray" @click="gotoShop">{{ info_words.apply.words.goto_mall.value }}</button>
                </view>
            </view>
            <view class="bottom-banner d-c-c d-c" v-if="description_pic!=''">
                <image :src="description_pic" mode="widthFix"></image>
            </view>
        </template>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                /*是否加载完成*/
                loadding: true,
                indicatorDots: true,
                autoplay: true,
                interval: 2000,
                duration: 500,
                /*0:不是股东,1:申请中,2:已经是股东*/
                is_shareholder: false,
                isData: false,
                team: {},
                /*顶部背景*/
                top_background: '',
                // 股东权益说明
                description_pic: '',
                /*基本信息*/
                info_words: {},
                words: {},
                user: {},
                titel: '',
                setting: {},
                agent_total: 0,
                agent_money: 0,
                team_money: 0,
                productList: [],
                shareholder: {},
                gradeList:[]
            };
        },
        onLoad(e) {
            if (e.is_shareholder) {
                this.is_shareholder = e.is_shareholder;
            }
        },
        onShow() {
            uni.showLoading({
                title: '加载中'
            });
            /*获取个人中心数据*/
            this.getData();
        },
        methods: {
            /*获取数据*/
            getData() {
                let self = this;
                self._get('user.shareholder/center', {}, function(data) {
                    self.info_words = data.data.words;
                    uni.setNavigationBarTitle({
                        title: self.info_words.index.title.value != '' ? self.info_words.index.title.value : self.info_words.index.title
                            .default
                    });
                    self.titel = data.data.words.index.title.value
                    self.is_shareholder = data.data.is_shareholder;
                    self.top_background = data.data.background;
                    self.shareholder = data.data.shareholder;
                    self.user = data.data.user;
                    self.setting = data.data.setting;
                    self.productList = data.data.productList;
                    self.gradeList = data.data.gradeList;
                    self.agent_total = data.data.agent_total;
                    self.agent_money = data.data.agent_money;
                    self.team_money = data.data.team_money;
                    self.isData = true;
                    self.loadding = false;
                    uni.hideLoading();
                });
            },
 
            /*申请股东*/
            applyShareholder() {
                this.gotoPage('/pages2/shareholder/apply/apply');
            },
 
            /*去商城逛逛*/
            gotoShop() {
                this.gotoPage('pages/index/index')
            },
            
            /*去分销中心*/
            gotoAgent() {
                this.gotoPage('pages/agent/index/index')
            },
            
            /*去分红中心*/
            gotoTeam() {
                this.gotoPage('pages2/shareholder/index/index')
            },
 
            /*去提现*/
            gotoCash() {
                this.gotoPage('pages2/shareholder/cash/apply/apply');
            },
            
            goback() {
                uni.navigateBack();
            },
            
            /*跳转产品详情*/
            gotoProductDetail(e) {
                let url = 'pages/product/detail/detail?product_id=' + e
                this.gotoPage(url);
            },
        }
    };
</script>
 
<style>
    page {
        background-color: #f2f2f2;
    }
 
    .index-team .banner {
        position: absolute;
        width: 100%;
        z-index: 0;
        min-height: 167rpx;
        /* padding-bottom: 60rpx; */
        background-repeat: no-repeat;
        background-size: 100%;
        top: 0;
    }
 
    .index-team .banner image {
        width: 100%;
    }
 
    .no-team {
        margin-top: 290rpx;
        position: relative;
        background: #fff;
        border-radius: 30rpx 30rpx 0 0;
    }
 
    .no-team-img {
        padding-top: 60rpx;
    }
 
    .no-team-img image {
        width: 300rpx;
    }
 
    .team-wrap {
        border-radius: 12rpx;
        background-position: -8px 52rpx;
        background-size: 100% 100%;
        background-image: radial-gradient(circle at 8px, transparent 0%, transparent 8px, #ffffff 8px, #ffffff 100%);
        padding: 31rpx 25rpx 36rpx 25rpx;
    }
 
    .index-team .team-wrap .iconfont {
        font-size: 60rpx;
    }
 
    .index-team .btn-gcred {
        height: 88rpx;
        line-height: 88rpx;
        border-radius: 44rpx;
    }
    
    .index-team .btn-gray {
        height: 88rpx;
        line-height: 88rpx;
        border-radius: 44rpx;
    }
 
    .reg180 {
        padding-right: 20rpx;
        text-align: right;
        transform: rotateY(180deg);
        position: absolute;
        bottom: 0;
    }
 
    .icon-jiantou {
 
        color: #FFFFFF;
        font-size: 30rpx;
    }
 
    .head_top {
        position: absolute;
        width: 100%;
        height: 30px;
        line-height: 30px;
        color: #FFFFFF;
        font-size: 32rpx;
        z-index: 2;
    }
 
    .top_dash {
        border-bottom: 1rpx dashed #D9D9D9;
        padding-bottom: 9px;
 
    }
 
    .team_index_img {
        width: 90rpx;
        height: 90rpx;
    }
    
    /* 商品列表样式 */
    .section-product .item {
        margin: 0 26rpx;
        display: flex;
        align-items: center;
        padding-bottom: 29rpx;
        padding-top: 29rpx;
    }
    
    .section-product .cover {
        width: 150rpx;
        height: 150rpx;
        border-radius: 8px;
    }
    
    .section-product .info {
        flex: 1;
        padding-left: 30rpx;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .section-product .title {
        width: 100%;
        font-size: 26rpx;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .vender .list .describe {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .section-product .describe {
        margin-top: 20rpx;
        font-size: 24rpx;
        color: #999999;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }
    
    .section-product .price {
        color: #F6220C;
        font-size: 24rpx;
    }
    
    .section-product .price .num {
        padding: 0 4rpx;
        font-size: 32rpx;
    }
    
    .section-product .level-box {
        margin-top: 20rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .section-product .level-box .key {
        font-size: 24rpx;
        color: #999999;
    }
    
    .section-product .level-box .num-wrap {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .section-product .level-box .icon-box {
        width: 33rpx;
        height: 33rpx;
        border: 1px solid #c5c5c5;
        background: #f2f2f2;
    }
    
    .section-product .level-box .icon-box .gray {
        color: #cccccc;
    }
    
    .section-product .level-box .icon-box .gray3 {
        color: #333333;
    }
    
    .section-product .level-box .text-wrap {
        margin: 0 20rpx;
        height: 33rpx;
        border: none;
        background: none;
    }
    
    .section-product .level-box .text-wrap input {
        padding: 0 4rpx;
        height: 33rpx;
        line-height: 1;
        width: 40rpx;
        font-size: 32rpx;
        text-align: center;
        display: flex;
        align-items: center;
        min-height: 33rpx;
    }
    
    .section-product .icon-jiantou {
        color: #999;
    }
    
    .user-info .photo,
    .user-info .photo image {
        width: 50rpx;
        height: 50rpx;
        border-radius: 50%;
    }
    
    .user-info .photo {
        padding-right: 10rpx;
    }
    
    .user-info .grade {
        display: block;
        padding: 6rpx 20rpx;
        font-size: 22rpx;
        /* height: 36rpx; */
        line-height: 36rpx;
        border-radius: 40rpx;
        background: $dominant-color;
        /* color: #ffffff; */
        font-family: PingFang SC;
    }
</style>