liaoxujun@qq.com
2024-03-05 f0ca9fb79a91544c037c55a291be00e8c469bf34
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
<template>
    <view>
        <u-navbar title="分销申请" safeAreaInsetTop fixed placeholder>
            <view class="coreshop-navbar-left-slot" slot="left">
                <u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
                <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
                <u-icon name="home" size="22" @click="goHome"></u-icon>
            </view>
            <view slot="right">
            </view>
        </u-navbar>
        <view v-if="show">
            <u-toast ref="uToast" />
            <u-no-network></u-no-network>
            <view class="coreshop-bg-red coreshop-solid-top coreshop-padding-left-80 coreshop-padding-right-80 coreshop-padding-top-45 coreshop-padding-bottom-45">
                <view class="coreshop-text-center coreshop-margin-bottom-10">
                    <text class="coreshop-text-white" v-if="condition.conditionStatus">已达标</text>
                    <text class="coreshop-text-white" v-if="!condition.conditionStatus">未达标</text>
                    <text class="coreshop-text-white coreshop-font-40">{{condition.conditionProgress}}%</text>
                </view>
                <!--<progress class="coreshop-progress-radius" percent="100" active stroke-width="10" activeColor="#fbbd08" />-->
                <u-line-progress :percentage="condition.conditionProgress" activeColor="#5FB878"></u-line-progress>
                <view class="coreshop-text-center coreshop-margin-bottom-10 coreshop-margin-top-10">
                    <text class="coreshop-text-white">{{condition.conditionMsg}}</text>
                </view>
                <view class="coreshop-text-left coreshop-margin-bottom-10  coreshop-margin-top-40">
                    <text class="coreshop-text-white coreshop-font-xs">注:消费金额只算实付金额部分,储值抵扣/退款退货金额不算在内。</text>
                </view>
            </view>
            <!--标题-->
            <view class="coreshop-text-black coreshop-font-md  coreshop-padding-10 coreshop-solid-bottom">经销商须知</view>
            <!--内容-->
            <view class="coreshop-text-gray coreshop-margin-20">
                <u-parse :content="distributionNotes" :selectable="true"></u-parse>
            </view>
            <view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom">
                <u-button size="normal" type="error" v-if="condition.conditionStatus" @click="goApply()">申请</u-button>
                <u-button size="normal" type="primary" v-else>您的条件暂不满足</u-button>
            </view>
        </view>
    </view>
 
</template>
<script>
    export default {
        data() {
            return {
                show: false,
                condition: {}
            }
        },
        methods: {
            goApply() {
                this.$u.route('/pages/member/distribution/apply/apply');
            }
        },
        computed: {
            distributionNotes() {
                return this.$store.state.config.distributionNotes
            }
        },
        onLoad: function () {
            var _this = this;
            _this.$u.api.getDistributionInfo().then(res => {
                if (res.status) {
                    _this.condition = res.data;
                    if (_this.condition.hasOwnProperty('verifyStatus')) {
                        if (_this.condition.verifyStatus == 1 || (!_this.condition.needApply && _this.conditionStatus)) {
                            _this.$u.route({ type: 'redirectTo', url: '/pages/member/distribution/panel/panel' });
                        } else if (_this.condition.verifyStatus > 1) {
                            _this.$u.route({ type: 'redirectTo', url: '/pages/member/distribution/applyState/applyState' });
                        } else {
                            _this.show = true;
                        }
                    }
                } else {
                    //报错了
                    _this.$u.toast(res.msg);
                }
            });
        }
    }
</script>
<style lang="scss" scoped>
    @import "index.scss";
</style>