移动系统liao
2025-02-17 557c2711a3e103ebc3d0492344eca9730d5e92b2
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
<template>
    <view>
        <view v-if="show">
            <u-toast ref="uToast" /><u-no-network></u-no-network>
            <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 class="page-body">
                <view class="u-content">
                    <u-parse :content="agentNotes" :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>
    </view>
 
</template>
<script>
    export default {
        data() {
            return {
                show: false,
                condition: {}
            }
        },
        methods: {
            goApply() {
                this.$u.route('/pages/member/agent/apply/apply');
            }
        },
        computed: {
            agentNotes() {
                return this.$store.state.config.agentNotes
            }
        },
        onLoad: function () {
            var _this = this;
            _this.$u.api.getAgentInfo().then(res => {
                if (res.status) {
                    _this.condition = res.data;
                    if (_this.condition.verifyStatus == 1 || (!_this.condition.needApply && _this.conditionStatus)) {
                        _this.$u.route({ type: 'redirectTo', url: '/pages/member/agent/panel/panel' });
                    } else if (_this.condition.verifyStatus > 1) {
                        _this.$u.route({ type: 'redirectTo', url: '/pages/member/agent/applyState/applyState' });
                    } else {
                        _this.show = true;
                    }
                } else {
                    //报错了
                    _this.$u.toast(res.msg);
                }
            });
        }
    }
</script>
<style lang="scss" scoped>
    @import "index.scss";
</style>