diff --git a/apis/index.js b/apis/index.js index 0a6a8ca..0bf4ee8 100644 --- a/apis/index.js +++ b/apis/index.js @@ -10,8 +10,8 @@ import router from '../router' // 基础配置 const config = { - apiUrl : 'https://douhuo.douhuofalv.com/api/', - // apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境 + // apiUrl : 'https://douhuo.douhuofalv.com/api/', + apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境 timeout : 60000 } diff --git a/apis/interfaces/work.js b/apis/interfaces/work.js index 64b090d..a101599 100644 --- a/apis/interfaces/work.js +++ b/apis/interfaces/work.js @@ -22,7 +22,15 @@ const rights = () => { }) } +// 业务员签约 +const sign = () => { + return request({ + url : 'app/user/sign_url', + }) +} + export { index, - rights + rights, + sign } \ No newline at end of file diff --git a/pages/account/cash.vue b/pages/account/cash.vue index 675e460..a39d17b 100644 --- a/pages/account/cash.vue +++ b/pages/account/cash.vue @@ -26,23 +26,23 @@ - + {{item.type}} - + {{item.perf}} - + {{item.nick_name || '-'}} - + {{item.parent_name || '-'}} - + {{item.created_at}} @@ -202,12 +202,12 @@ display: flex; label{ color: gray; - width: 100rpx; + width: 140rpx; } } &-val{ text-align: right; - width: calc(100% - 100rpx); + width: calc(100% - 140rpx); } } } diff --git a/pages/college/testResults.vue b/pages/college/testResults.vue index 664c41e..a6b3918 100644 --- a/pages/college/testResults.vue +++ b/pages/college/testResults.vue @@ -82,7 +82,7 @@ }, created() { 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.title = title; this.total = total; @@ -91,8 +91,23 @@ this.accuracy = (veidoos.count.accuracy).substring(0, (veidoos.count.accuracy).length - 1); this.allTotal = veidoos.allTotal; 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 => { - console.log(err) uni.showToast({ title: err.message, icon : "none" diff --git a/pages/user/info.vue b/pages/user/info.vue index eb759ca..a765211 100644 --- a/pages/user/info.vue +++ b/pages/user/info.vue @@ -12,7 +12,11 @@ - + + + + + @@ -28,6 +32,10 @@ url : '', path: '' }, // 上传头像 + sign : { + isSign : false, + address : '' + } }; }, created() { @@ -40,12 +48,13 @@ title: '加载中...' }) info().then(res => { - let { nickname, avatar} = res + let { nickname, avatar, sign } = res this.nickname = nickname this.avatar = { url : avatar, path: '' } + this.sign = sign uni.hideLoading() }).catch(err => { uni.showToast({ @@ -58,6 +67,10 @@ onNickname(e){ this.updInfo('nickname', this.nickname) }, + // 更新通讯地址 + onAddress(e){ + this.updInfo('address', this.sign.address) + }, // 更新资料 updInfo(key, val){ uni.showLoading({ diff --git a/pages/work/index.vue b/pages/work/index.vue index 39fb33c..c44921a 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -26,7 +26,7 @@ - 仅需两步即可成为业务员 + 仅需三步即可成为业务员 @@ -43,6 +43,14 @@ + + + + 业务员签约 + 完成业务员在线签约 + + + @@ -198,7 +206,7 @@