业务员签约
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="block open-interest">
|
||||
<view class="title">仅需两步即可成为业务员</view>
|
||||
<view class="title">仅需三步即可成为业务员</view>
|
||||
<view class="open-interest-block">
|
||||
<image class="open-interest-icon" :src="isCertification ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_24.png')"></image>
|
||||
<view class="open-interest-text">
|
||||
@@ -43,6 +43,14 @@
|
||||
</view>
|
||||
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
||||
</view>
|
||||
<view class="open-interest-block">
|
||||
<image class="open-interest-icon" :src="sign.isSign ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_27.png')"></image>
|
||||
<view class="open-interest-text">
|
||||
<view class="open-interest-title">业务员签约</view>
|
||||
<view class="open-interest-submit">完成业务员在线签约</view>
|
||||
</view>
|
||||
<button class="open-interest-btn" size="mini" :disabled="sign.isSign" @click="onSign">{{sign.isSign ? '已签约': '去签约'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示信息 -->
|
||||
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
|
||||
@@ -198,7 +206,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { index, rights } from '@/apis/interfaces/work.js'
|
||||
import { index, rights, sign } from '@/apis/interfaces/work.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -216,7 +224,12 @@
|
||||
orderCount : {},
|
||||
// 权益说明
|
||||
privilegeShow : false,
|
||||
privilegeText : ''
|
||||
privilegeText : '',
|
||||
// 签约状态
|
||||
sign : {
|
||||
isSign : false,
|
||||
address : ""
|
||||
}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -227,6 +240,41 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 签约
|
||||
onSign(){
|
||||
if(!this.isCertification){
|
||||
uni.showToast({
|
||||
title: '暂未实名认证,无法签约,请完成实名认证',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.sign.address == ''){
|
||||
uni.showToast({
|
||||
title: '暂时无法签约,请前往个人中心我的信息完善通讯地址信息后重试',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title : '获取签约地址',
|
||||
mask : true
|
||||
})
|
||||
sign().then(res => {
|
||||
uni.hideLoading()
|
||||
this.$Router.push({
|
||||
name : 'ESign',
|
||||
params : {
|
||||
url: res.sign_url
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 显示业务员权益
|
||||
onToast(val){
|
||||
this.privilegeText = val.content
|
||||
@@ -241,18 +289,21 @@
|
||||
Promise.all([rights(), index()]).then(res => {
|
||||
let rightsData = res[0],
|
||||
indexData = res[1]
|
||||
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity } = indexData
|
||||
|
||||
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData
|
||||
this.rightsArr = rightsData
|
||||
this.userInfo = {
|
||||
nickname,
|
||||
avatar
|
||||
}
|
||||
this.isCertification = isCertification
|
||||
this.certification = certification
|
||||
this.isManager = isManager
|
||||
this.isAnswer = isAnswer
|
||||
this.orderCount = business_orders_count
|
||||
this.identity = identity
|
||||
this.certification = certification
|
||||
this.isManager = isManager
|
||||
this.isAnswer = isAnswer
|
||||
this.orderCount = business_orders_count
|
||||
this.identity = identity
|
||||
this.sign = sign
|
||||
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user