<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>
|