业务员签约
This commit is contained in:
@@ -10,8 +10,8 @@ import router from '../router'
|
|||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
||||||
// apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,15 @@ const rights = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 业务员签约
|
||||||
|
const sign = () => {
|
||||||
|
return request({
|
||||||
|
url : 'app/user/sign_url',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
index,
|
index,
|
||||||
rights
|
rights,
|
||||||
|
sign
|
||||||
}
|
}
|
||||||
@@ -26,23 +26,23 @@
|
|||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
<label>类 型</label>
|
<label>类 型:</label>
|
||||||
<view class="log-flex-val nowrap">{{item.type}}</view>
|
<view class="log-flex-val nowrap">{{item.type}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
<label>服务费</label>
|
<label>金 额:</label>
|
||||||
<view class="log-flex-val nowrap">{{item.perf}}</view>
|
<view class="log-flex-val nowrap">{{item.perf}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
<label>客 户</label>
|
<label>客 户:</label>
|
||||||
<view class="log-flex-val nowrap">{{item.nick_name || '-'}}</view>
|
<view class="log-flex-val nowrap">{{item.nick_name || '-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
<label>推荐人</label>
|
<label>推荐人:</label>
|
||||||
<view class="log-flex-val nowrap">{{item.parent_name || '-'}}</view>
|
<view class="log-flex-val nowrap">{{item.parent_name || '-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
<label>时 间</label>
|
<label>时 间:</label>
|
||||||
<view class="log-flex-val nowrap">{{item.created_at}}</view>
|
<view class="log-flex-val nowrap">{{item.created_at}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -202,12 +202,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
label{
|
label{
|
||||||
color: gray;
|
color: gray;
|
||||||
width: 100rpx;
|
width: 140rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-val{
|
&-val{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
width: calc(100% - 100rpx);
|
width: calc(100% - 140rpx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
report(this.$Route.query.id).then(res => {
|
report(this.$Route.query.id).then(res => {
|
||||||
let { title, total, veidoos, created_at, isAnswer } = res;
|
let { title, total, veidoos, created_at, isAnswer, isSign } = res;
|
||||||
this.isAnswer = isAnswer;
|
this.isAnswer = isAnswer;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.total = total;
|
this.total = total;
|
||||||
@@ -91,8 +91,23 @@
|
|||||||
this.accuracy = (veidoos.count.accuracy).substring(0, (veidoos.count.accuracy).length - 1);
|
this.accuracy = (veidoos.count.accuracy).substring(0, (veidoos.count.accuracy).length - 1);
|
||||||
this.allTotal = veidoos.allTotal;
|
this.allTotal = veidoos.allTotal;
|
||||||
this.wrong = veidoos.wrong;
|
this.wrong = veidoos.wrong;
|
||||||
|
if(!isSign && isAnswer){
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '恭喜您通过了业务员考试,是否立即签约?',
|
||||||
|
cancelColor : '#446EFE',
|
||||||
|
cancelText : '去签约',
|
||||||
|
confirmText : '稍后签',
|
||||||
|
success : ModalRes => {
|
||||||
|
if(ModalRes.cancel){
|
||||||
|
this.$Router.pushTab({
|
||||||
|
name: 'Work'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon : "none"
|
icon : "none"
|
||||||
|
|||||||
@@ -12,7 +12,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info-flex">
|
<view class="info-flex">
|
||||||
<label>昵称</label>
|
<label>昵称</label>
|
||||||
<input class="info-input" maxlength="8" v-model="nickname" type="text" placeholder="昵称" @blur="onNickname">
|
<input class="info-input" maxlength="8" v-model="nickname" type="text" placeholder="昵称" disabled @blur="onNickname">
|
||||||
|
</view>
|
||||||
|
<view class="info-flex">
|
||||||
|
<label>通讯地址</label>
|
||||||
|
<input class="info-input" v-model="sign.address" type="text" placeholder="输入通讯地址" :disabled="sign.isSign" @blur="onAddress">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -28,6 +32,10 @@
|
|||||||
url : '',
|
url : '',
|
||||||
path: ''
|
path: ''
|
||||||
}, // 上传头像
|
}, // 上传头像
|
||||||
|
sign : {
|
||||||
|
isSign : false,
|
||||||
|
address : ''
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -40,12 +48,13 @@
|
|||||||
title: '加载中...'
|
title: '加载中...'
|
||||||
})
|
})
|
||||||
info().then(res => {
|
info().then(res => {
|
||||||
let { nickname, avatar} = res
|
let { nickname, avatar, sign } = res
|
||||||
this.nickname = nickname
|
this.nickname = nickname
|
||||||
this.avatar = {
|
this.avatar = {
|
||||||
url : avatar,
|
url : avatar,
|
||||||
path: ''
|
path: ''
|
||||||
}
|
}
|
||||||
|
this.sign = sign
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -58,6 +67,10 @@
|
|||||||
onNickname(e){
|
onNickname(e){
|
||||||
this.updInfo('nickname', this.nickname)
|
this.updInfo('nickname', this.nickname)
|
||||||
},
|
},
|
||||||
|
// 更新通讯地址
|
||||||
|
onAddress(e){
|
||||||
|
this.updInfo('address', this.sign.address)
|
||||||
|
},
|
||||||
// 更新资料
|
// 更新资料
|
||||||
updInfo(key, val){
|
updInfo(key, val){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="block open-interest">
|
<view class="block open-interest">
|
||||||
<view class="title">仅需两步即可成为业务员</view>
|
<view class="title">仅需三步即可成为业务员</view>
|
||||||
<view class="open-interest-block">
|
<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>
|
<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">
|
<view class="open-interest-text">
|
||||||
@@ -43,6 +43,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
<!-- 提示信息 -->
|
<!-- 提示信息 -->
|
||||||
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
|
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
|
||||||
@@ -198,7 +206,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { index, rights } from '@/apis/interfaces/work.js'
|
import { index, rights, sign } from '@/apis/interfaces/work.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -216,7 +224,12 @@
|
|||||||
orderCount : {},
|
orderCount : {},
|
||||||
// 权益说明
|
// 权益说明
|
||||||
privilegeShow : false,
|
privilegeShow : false,
|
||||||
privilegeText : ''
|
privilegeText : '',
|
||||||
|
// 签约状态
|
||||||
|
sign : {
|
||||||
|
isSign : false,
|
||||||
|
address : ""
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -227,6 +240,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
onToast(val){
|
||||||
this.privilegeText = val.content
|
this.privilegeText = val.content
|
||||||
@@ -241,7 +289,8 @@
|
|||||||
Promise.all([rights(), index()]).then(res => {
|
Promise.all([rights(), index()]).then(res => {
|
||||||
let rightsData = res[0],
|
let rightsData = res[0],
|
||||||
indexData = res[1]
|
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.rightsArr = rightsData
|
||||||
this.userInfo = {
|
this.userInfo = {
|
||||||
nickname,
|
nickname,
|
||||||
@@ -253,6 +302,8 @@
|
|||||||
this.isAnswer = isAnswer
|
this.isAnswer = isAnswer
|
||||||
this.orderCount = business_orders_count
|
this.orderCount = business_orders_count
|
||||||
this.identity = identity
|
this.identity = identity
|
||||||
|
this.sign = sign
|
||||||
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
BIN
static/icons/work_icon_27.png
Normal file
BIN
static/icons/work_icon_27.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
BIN
static/im/icon_00.png
Normal file
BIN
static/im/icon_00.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
static/im/icon_01.png
Normal file
BIN
static/im/icon_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
BIN
static/im/icon_02.png
Normal file
BIN
static/im/icon_02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Reference in New Issue
Block a user