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