同步
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
score().then(res => {
|
||||
this.score = res.score
|
||||
this.logs = res.logs
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
username: this.phone,
|
||||
password: this.password
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
// 存储登录凭证
|
||||
this.$store.commit('setToken', res.token_type + ' ' + res.access_token);
|
||||
this.onBack()
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
} catch (err){
|
||||
this.$Router.replaceAll({name: 'Index'})
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -125,6 +126,7 @@
|
||||
this.captchaImg = img
|
||||
this.captchaKey = key
|
||||
this.captchaShow = true
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
this.captchaImg = img
|
||||
this.captchaKey = key
|
||||
this.captchaShow = true
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
type : 2,
|
||||
answers: this.answerArr
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
this.$Router.replace({
|
||||
name: 'CollegeResults',
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<view class="submit-item">·倒计时结束后系统将提示交卷</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button @click="$Router.push({name: 'CollegeResults', params: {id: item.answer.last_answer_id}})" v-if="item.answer.is_finish">查看成绩</button>
|
||||
<button @click="onCollegeResults(item.answer.last_answer_id)" v-if="item.answer.is_finish">查看成绩</button>
|
||||
<button @click="onAnswer(item.evaluation_id, item.canDo)" v-else>开始答题</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -41,6 +41,19 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
onCollegeResults(id){
|
||||
if(id == 0){
|
||||
uni.showToast({
|
||||
title: '非考试成员无成绩记录',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$Router.push({
|
||||
name: 'CollegeResults',
|
||||
params: {id},
|
||||
})
|
||||
},
|
||||
onAnswer(id, isTo){
|
||||
if(!isTo){
|
||||
uni.showModal({
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
<template>
|
||||
<view class="introduce" v-if='loaded'>
|
||||
<image class="richTxt" :src="base.cover" mode="widthFix" />
|
||||
<view class="nowbuy" @click="nowBuy" v-if="!is_recharge"> <view class="btn">¥{{base.price}} 立即购买 </view> </view>
|
||||
<view class="nowbuy nonebuy" v-else> <view class="btn"> 已开通 </view> </view>
|
||||
<view class="nowbuy" @click="nowBuy" v-if="!is_recharge">
|
||||
<view class="btn">¥{{base.price}}立即购买</view>
|
||||
</view>
|
||||
<view class="nowbuy nonebuy" v-else>
|
||||
<view class="btn">已购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
recharge,zyPay
|
||||
} from '@/apis/interfaces/index.js'
|
||||
import { recharge } from '@/apis/interfaces/index.js'
|
||||
import { umsFree } from '@/apis/interfaces/pay.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loaded:false,
|
||||
base: '',
|
||||
is_recharge: true,
|
||||
identity : false,
|
||||
loaded : false,
|
||||
base : '',
|
||||
is_recharge : true,
|
||||
parent : false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -23,6 +28,8 @@
|
||||
methods:{
|
||||
getInfo(){
|
||||
recharge().then(res => {
|
||||
this.parent = res.parent
|
||||
this.identity = res.identity
|
||||
this.base = res.base
|
||||
this.is_recharge = res.is_recharge
|
||||
this.loaded = true
|
||||
@@ -36,24 +43,37 @@
|
||||
})
|
||||
},
|
||||
nowBuy(){
|
||||
zyPay(this.base.service_id).then(res => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
})
|
||||
this.is_recharge = true
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
if(!this.parent){
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '暂无推荐人无法购买自由服务包',
|
||||
cancelText : '取消',
|
||||
confirmText : '确定',
|
||||
showCancel : false,
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.identity){
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '当前身份暂时无法购买自由服务包,请开通业务员后重试',
|
||||
cancelText : '取消',
|
||||
confirmText : '去开通',
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.pushTab({name: 'Work'})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$Router.replace({
|
||||
name : 'Pay',
|
||||
params : {
|
||||
paytype : 'free',
|
||||
serviceId : this.base.service_id,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,12 +83,39 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<u-popup :show="showAdImg" mode="center" bgColor="transparent">
|
||||
<view class="ad-lay">
|
||||
<view class="ad-down">
|
||||
<u-count-down
|
||||
ref="adCountDown"
|
||||
:time="showAdTime"
|
||||
:autoStart="false"
|
||||
@change="timeData = $event"
|
||||
@finish="showAdImg = false">
|
||||
<view>
|
||||
自动关闭<text>{{ timeData.seconds }}</text>S
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<image class="ad-img" :src="layAdImg" mode="widthFix"></image>
|
||||
<view class="ad-btn">
|
||||
<u-icon
|
||||
class="ad-btn-icon"
|
||||
name="close-circle"
|
||||
color="white"
|
||||
size="36px"
|
||||
@click="onRemoveAd"
|
||||
></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { region } from '@/apis/interfaces/address.js'
|
||||
import { categories,jf,zf,index } from '@/apis/interfaces/index.js'
|
||||
import { categories, jf, zf, index } from '@/apis/interfaces/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -104,6 +131,12 @@
|
||||
jfList:[],
|
||||
defaultViewId:'',
|
||||
zfList:[],
|
||||
// 首次进入弹窗
|
||||
timeData : {},
|
||||
first : 1,
|
||||
showAdTime : 0,
|
||||
showAdImg : true,
|
||||
layAdImg : ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -163,6 +196,15 @@
|
||||
list.push(params)
|
||||
})
|
||||
this.notice = list
|
||||
let { is_lay_ad, lay_ad_img, times } = res.layad
|
||||
if(is_lay_ad) this.layAdImg = lay_ad_img
|
||||
if(this.first === 1 && is_lay_ad){
|
||||
this.showAdImg = true
|
||||
this.showAdTime = times * 1000
|
||||
this.$nextTick(() => {
|
||||
this.$refs.adCountDown.start()
|
||||
})
|
||||
}
|
||||
}).catch(err=>{
|
||||
uni.showToast({
|
||||
title:err.message,
|
||||
@@ -217,7 +259,12 @@
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
},
|
||||
// 关闭弹窗广告
|
||||
onRemoveAd(){
|
||||
this.first = 0;
|
||||
this.showAdImg = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -227,6 +274,38 @@
|
||||
background-color: white;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
// ad弹窗广告
|
||||
.ad-lay{
|
||||
width: 70vw;
|
||||
position: relative;
|
||||
.ad-down{
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
z-index: 1;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
font-size: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 24rpx;
|
||||
color: white;
|
||||
.ad-down-u{
|
||||
display: inline-block;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
}
|
||||
.ad-img{
|
||||
width: 70vw;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.ad-btn{
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
.ad-btn-icon{
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 轮播图
|
||||
.banner{
|
||||
position: relative;
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
</view>
|
||||
<!-- 选择支付方式 -->
|
||||
<view class="choose">
|
||||
<radio-group @change="payMethod = $event.detail.value">
|
||||
<label class="choose-item">
|
||||
<radio-group @change="payMethod = $event.detail.value" >
|
||||
<label class="choose-item" v-if="payType != 'free'">
|
||||
<view class="choose-text nowrap">
|
||||
<image src="@/static/icons/pay_alipay.png" mode="aspectFill"></image>
|
||||
火力值支付
|
||||
</view>
|
||||
<radio class="choose-radio" value="coin" checked></radio>
|
||||
<radio class="choose-radio" value="coin" :checked="payMethod == 'coin'"></radio>
|
||||
</label>
|
||||
<label class="choose-item nowrap">
|
||||
<!-- <label class="choose-item nowrap">
|
||||
<view class="choose-text">
|
||||
<image src="@/static/icons/pay_code.png" mode="aspectFill"></image>
|
||||
付款码支付
|
||||
@@ -29,6 +29,13 @@
|
||||
微信支付
|
||||
</view>
|
||||
<radio class="choose-radio" value="wx"></radio>
|
||||
</label> -->
|
||||
<label class="choose-item nowrap">
|
||||
<view class="choose-text">
|
||||
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
|
||||
支付宝支付
|
||||
</view>
|
||||
<radio class="choose-radio" value="ali" :checked="payMethod == 'ali'"></radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
@@ -41,23 +48,86 @@
|
||||
|
||||
<script>
|
||||
import { info } from '@/apis/interfaces/order.js'
|
||||
import { coinPay, diffCoinPay } from '@/apis/interfaces/pay.js'
|
||||
import { coinPay, diffCoinPay, umsPay, umsState, diffUmsPay, umsFree, umsFreeInfo } from '@/apis/interfaces/pay.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
getState : false,
|
||||
trade_id : '',
|
||||
orderId : '',
|
||||
diffId : '',
|
||||
payMethod : 'coin',
|
||||
payType : 'price',
|
||||
total : '0.00',
|
||||
orderNo : ''
|
||||
orderNo : '',
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if(this.getState && this.trade_id != ''){
|
||||
// 查询支付状态
|
||||
uni.showLoading({
|
||||
title: '查询支付结果...',
|
||||
mask : true
|
||||
})
|
||||
let outTime;
|
||||
let resNumb = 0;
|
||||
outTime = setInterval(() => {
|
||||
if(resNumb >= 3){
|
||||
clearInterval(outTime)
|
||||
uni.showToast({
|
||||
title: '查询失败',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
umsState(this.trade_id).then(res => {
|
||||
resNumb++
|
||||
if(res.state === 'success'){
|
||||
clearInterval(outTime)
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '支付成功',
|
||||
showCancel : false,
|
||||
confirmColor: '#446EFE',
|
||||
success : () => {
|
||||
this.onRrmoveItem()
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
clearInterval(outTime)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
uni.showLoading({
|
||||
title: '获取订单信息...',
|
||||
mask : true
|
||||
})
|
||||
if(this.$Route.query.paytype === 'free'){
|
||||
this.payMethod = "ali"
|
||||
umsFreeInfo(this.$Route.query.serviceId).then(res => {
|
||||
let { order_id, price, order_no } = res;
|
||||
this.orderId = order_id
|
||||
this.total = price
|
||||
this.orderNo = order_no
|
||||
this.payType = this.$Route.query.paytype
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
info(this.$Route.query.orderId).then(res => {
|
||||
let { total, order_no, business_order_id, diff_prices, diff } = res
|
||||
this.orderId = business_order_id
|
||||
@@ -93,8 +163,53 @@
|
||||
icon : 'none'
|
||||
})
|
||||
break;
|
||||
case 'ali':
|
||||
if(this.payType == 'price') this.onUmsPay('mp_alipay')
|
||||
if(this.payType == 'diff') this.onDiffUmsPay('mp_alipay')
|
||||
if(this.payType == 'free') this.onFreePay('mp_alipay')
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 银联三方支付
|
||||
onUmsPay(type){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
umsPay(this.orderId, { type }).then(res => {
|
||||
uni.hideLoading()
|
||||
this.getState = true
|
||||
this.trade_id = res.trade_id
|
||||
if(res.alipay){
|
||||
plus.runtime.openURL(res.alipay)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 银联三方补差价支付
|
||||
onDiffUmsPay(type){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
diffUmsPay(this.diffId, {type}).then(res => {
|
||||
uni.hideLoading()
|
||||
this.getState = true
|
||||
this.trade_id = res.trade_id
|
||||
if(res.alipay){
|
||||
plus.runtime.openURL(res.alipay)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 火力值支付
|
||||
onCoinPay(){
|
||||
wx.showLoading({
|
||||
@@ -118,7 +233,7 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
// 活力值补差价支付
|
||||
// 火力值补差价支付
|
||||
onDiffCoinPay(){
|
||||
diffCoinPay(this.diffId).then(res => {
|
||||
wx.showModal({
|
||||
@@ -137,6 +252,26 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
// 银联三方自由服务包支付
|
||||
onFreePay(type){
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
umsFree(this.orderId, type).then(res => {
|
||||
uni.hideLoading()
|
||||
this.getState = true
|
||||
this.trade_id = res.trade_id
|
||||
if(res.alipay){
|
||||
plus.runtime.openURL(res.alipay)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 更新订单列表
|
||||
onRrmoveItem(){
|
||||
this.$store.commit('setOrderId', this.orderId)
|
||||
|
||||
@@ -129,7 +129,10 @@
|
||||
// 移出操作后的订单
|
||||
this.removeItem(id)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,10 +216,11 @@
|
||||
city_id: this.citys[this.citysVal].id,
|
||||
front_card: this.frontCard.path,
|
||||
back_card : this.backCard.path,
|
||||
redirect_url: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
|
||||
redirect_url: getApp().globalData.certificationUrl,
|
||||
app_scheme: 'doufire://',
|
||||
channel: 'app'
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
let certificationData = res;
|
||||
this.idCard = true
|
||||
this.isPathChange = false
|
||||
@@ -262,7 +263,7 @@
|
||||
mask : true
|
||||
})
|
||||
eSigns({
|
||||
redirect_url: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
|
||||
redirect_url: getApp().globalData.certificationUrl,
|
||||
app_scheme: 'doufire://'
|
||||
}).then(res => {
|
||||
this.isRefresh = true
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_03.png"></image>实名认证</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
</view>
|
||||
<view class="nav-flex" @click="onParent">
|
||||
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
</view>
|
||||
<view class="nav-flex" @click="onNav('WeChat')">
|
||||
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
@@ -74,11 +78,58 @@
|
||||
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_05.png"></image>设置</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
</view>
|
||||
<!-- 绑定分享关系 -->
|
||||
<u-modal
|
||||
:show="showBind"
|
||||
confirmColor="#446EFE"
|
||||
:showCancelButton="true"
|
||||
:confirmText="isInvitation ? '校验邀请码': '绑定关系'"
|
||||
@cancel="()=> {
|
||||
this.showBind = false
|
||||
this.isInvitation = true
|
||||
this.invitation = ''
|
||||
}"
|
||||
@confirm="onBind"
|
||||
>
|
||||
<slot>
|
||||
<view class="bind-view" v-if="isInvitation">
|
||||
<view class="bind-title">绑定推荐人</view>
|
||||
<view class="bind-subtitle">选择通过那种方式绑定推荐人</view>
|
||||
<view class="bind-type">
|
||||
<u-radio-group
|
||||
class="bind-type-radios"
|
||||
v-model="bindTypeVal"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio
|
||||
:customStyle="{marginLeft: '4px', marginRight: '4px'}"
|
||||
v-for="(item, index) in bindTypeArr"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:name="item.value"
|
||||
/>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="bind-input">
|
||||
<input type="text" v-model="invitation" :placeholder="bindTypeVal == 'mobile'? '输入推荐人手机号' : '输入推荐人邀请码'">
|
||||
</view>
|
||||
</view>
|
||||
<view class="bind-user" v-else>
|
||||
<view class="bind-title">推荐人</view>
|
||||
<view class="bind-subtitle">请确认绑定推荐人关系用户信息</view>
|
||||
<view class="bind-acitve">
|
||||
<image :src="invitationUser.avatar || require('@/static/imgs/default-active.png')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="bind-nickname">{{invitationUser.nickname}}</view>
|
||||
<view class="bind-username">{{invitationUser.username}}</view>
|
||||
</view>
|
||||
</slot>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { info } from '@/apis/interfaces/user.js'
|
||||
import { info,relationsVerify, relationsBind } from '@/apis/interfaces/user.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -86,7 +137,22 @@
|
||||
nickname : '',
|
||||
identity : '',
|
||||
avatar : '',
|
||||
certification : ''
|
||||
certification : '',
|
||||
// 绑定关系
|
||||
bindTypeArr : [
|
||||
{ name: '手机号', value: 'mobile'},
|
||||
{ name: '邀请码', value: 'verify'},
|
||||
],
|
||||
bindTypeVal : 'mobile',
|
||||
showBind : false,
|
||||
isInvitation : true,
|
||||
parent : '',
|
||||
invitationUser : {
|
||||
avatar : '',
|
||||
nickname: '',
|
||||
username: ''
|
||||
},
|
||||
invitation : '',
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -100,11 +166,12 @@
|
||||
title: '加载中...'
|
||||
})
|
||||
info().then(res => {
|
||||
let { nickname, identity, avatar, certification } = res
|
||||
let { nickname, identity, avatar, certification, parent } = res
|
||||
this.nickname = nickname
|
||||
this.identity = identity
|
||||
this.avatar = avatar
|
||||
this.certification = certification
|
||||
this.parent = parent
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -117,6 +184,66 @@
|
||||
onNav(name){
|
||||
this.$Router.push({name})
|
||||
},
|
||||
// 推荐关系
|
||||
onParent(){
|
||||
if(this.parent == ''){
|
||||
this.showBind = true
|
||||
return
|
||||
}
|
||||
uni.showModal({
|
||||
title : '我的推荐人',
|
||||
content : this.parent.nickname,
|
||||
confirmText : '关闭',
|
||||
cancelText : '联系TA',
|
||||
success : modalRes => {
|
||||
if(modalRes.cancel){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.parent.username
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 绑定邀请码
|
||||
onBind(){
|
||||
// 检验邀请码
|
||||
if(this.isInvitation){
|
||||
if(this.invitation === ''){
|
||||
uni.showToast({
|
||||
title: '请输入邀请码',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
relationsVerify(this.invitation, this.bindTypeVal).then(res => {
|
||||
this.invitationUser = res
|
||||
this.isInvitation = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
// 绑定关系
|
||||
relationsBind(this.invitation, this.bindTypeVal).then(res => {
|
||||
this.showBind = false
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '关系绑定成功',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
this.getUserInfo()
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 分享码
|
||||
onUserCode(){
|
||||
if(this.identity.order > 1){
|
||||
@@ -266,4 +393,84 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// 邀请码
|
||||
.bind-view{
|
||||
padding: 15rpx 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
.bind-title{
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.bind-type{
|
||||
margin-top: 30rpx;
|
||||
.bind-type-radios{
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.bind-subtitle{
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: gray;
|
||||
padding-top: 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.bind-input{
|
||||
padding-top: 30rpx;
|
||||
input{
|
||||
background: #f8f8f8;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 确认绑定用户关系
|
||||
.bind-user{
|
||||
padding: 15rpx 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
.bind-title{
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.bind-subtitle{
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: gray;
|
||||
padding-top: 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.bind-acitve{
|
||||
text-align: center;
|
||||
padding-top: 30rpx;
|
||||
image{
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
background: #f8f8f8;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.bind-nickname{
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
line-height: 40rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
.bind-username{
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,14 +7,19 @@
|
||||
<block v-if="users.length > 0">
|
||||
<view class="team-item" v-for="(item, index) in users" :key="index">
|
||||
<u-avatar :src="item.avatar" size="40"></u-avatar>
|
||||
<view class="name nowrap">
|
||||
{{item.nickname}}
|
||||
<text class="identity identity-2" v-if="item.identity.order == 2">业务员</text>
|
||||
<text class="identity identity-1" v-if="item.identity.order == 1">普通用户</text>
|
||||
<text class="identity identity-3" v-if="item.identity.order == 3">顾问</text>
|
||||
<view class="name">
|
||||
<view class="nowrap">{{item.nickname}}</view>
|
||||
<view>
|
||||
<text class="identity certification-y" v-if="item.certification"><image src="@/static/icons/user_nav_03.png"></image>已实名</text>
|
||||
<text class="identity identity-2" v-if="item.identity.order == 2">业务员</text>
|
||||
<text class="identity identity-1" v-if="item.identity.order == 1">普通用户</text>
|
||||
<text class="identity identity-3" v-if="item.identity.order == 3">顾问</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mobile">{{item.username}}</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="list-null">
|
||||
@@ -34,26 +39,56 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
users: [],
|
||||
count: {
|
||||
users : [],
|
||||
count : {
|
||||
all: 0
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
page : {
|
||||
current : 1,
|
||||
has_more: false,
|
||||
},
|
||||
pagesShow : false,
|
||||
status : false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
relations({
|
||||
larer: 1
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
let { users, count } = res;
|
||||
this.users = users.data
|
||||
this.count = count
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
})
|
||||
relations({
|
||||
larer : 1,
|
||||
page : this.page.current
|
||||
}).then(res => {
|
||||
let { users, count } = res;
|
||||
this.count = count
|
||||
let atList = users.page.current == 1 ? [] : this.users
|
||||
this.users = atList.concat(users.data)
|
||||
this.page = users.page
|
||||
this.pagesShow = false
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -100,10 +135,13 @@
|
||||
border-radius: 20rpx;
|
||||
height: 40rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 10rpx;
|
||||
padding: 0 15rpx;
|
||||
font-size: 24rpx;
|
||||
border:solid 1rpx #000;
|
||||
box-sizing: border-box;
|
||||
&:first-child{
|
||||
margin-left: 0;
|
||||
}
|
||||
&.identity-2{
|
||||
background: #ECF0FF;
|
||||
border-color: #443DE2;
|
||||
@@ -119,6 +157,17 @@
|
||||
border-color: #FEAD45;
|
||||
color: #FEAD45;
|
||||
}
|
||||
&.certification-y{
|
||||
background: #FFF7EC;
|
||||
border-color: #FEAD45;
|
||||
color: #FEAD45;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mobile{
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
<u-icon class="icon-u" name="arrow-right" color="#ddd" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="search-null">
|
||||
@@ -65,10 +67,15 @@
|
||||
return {
|
||||
isSearch : false,
|
||||
users : [],
|
||||
pages : {},
|
||||
searchValue : '',
|
||||
searchResults : [],
|
||||
searchText : '输入姓名或姓名搜索'
|
||||
searchText : '输入姓名或姓名搜索',
|
||||
page : {
|
||||
current : 1,
|
||||
has_more: false,
|
||||
},
|
||||
pagesShow : false,
|
||||
status : false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -82,10 +89,15 @@
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
relations().then(res => {
|
||||
relations({
|
||||
page : this.page.current,
|
||||
certification : 1
|
||||
}).then(res => {
|
||||
let { users } = res;
|
||||
this.users = users.data
|
||||
this.pages = users.page
|
||||
let atList = users.page.current == 1 ? [] : this.users
|
||||
this.users = atList.concat(users.data)
|
||||
this.page = users.page
|
||||
this.pagesShow = false
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -123,6 +135,16 @@
|
||||
this.$store.commit('setUser', userInfo)
|
||||
this.$Router.back()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getUsers()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -146,11 +168,11 @@
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: white;
|
||||
|
||||
.cover{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: $radius;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.text{
|
||||
width: calc(100% - 168rpx);
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
this.list = atList.concat(data)
|
||||
this.page = page
|
||||
this.pagesShow = false
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -83,6 +83,16 @@
|
||||
v-model="item.subVal[formItem.key]"
|
||||
></textarea>
|
||||
</block>
|
||||
<block v-if="formItem.type == 'text'">
|
||||
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</label>
|
||||
<view class="inputs-flex">
|
||||
<input
|
||||
class="text-input"
|
||||
v-model="item.subVal[formItem.key]"
|
||||
:placeholder="'请输入' + formItem.title"
|
||||
>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -140,6 +150,7 @@
|
||||
forms.then(val => {
|
||||
this.servicePush( val, institutionArr, businessTitle, businessId )
|
||||
})
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -400,6 +411,15 @@
|
||||
width: 64rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.text-input{
|
||||
background: #F6F6F6;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 30rpx 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
// radio
|
||||
.radio-flex{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<view class="open-interest-title">通过业务员考试</view>
|
||||
<view class="open-interest-submit">通过线上考试即可完成</view>
|
||||
</view>
|
||||
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.push({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
||||
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示信息 -->
|
||||
|
||||
132
pages/work/orderLog.vue
Normal file
132
pages/work/orderLog.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="logs" v-if="list.length > 0">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="item-flex">
|
||||
<label>所属机构</label>
|
||||
<view class="value nowrap">{{item.item || '-'}}</view>
|
||||
</view>
|
||||
<view class="item-flex">
|
||||
<label>操作老师</label>
|
||||
<view class="value nowrap"><text>{{item.operate.type}}</text>{{item.operate.name || '-'}}</view>
|
||||
</view>
|
||||
<view class="item-flex">
|
||||
<label>操作时间</label>
|
||||
<view class="value nowrap">{{item.created_at || '-'}}</view>
|
||||
</view>
|
||||
<view class="item-flex">
|
||||
<label>备注信息</label>
|
||||
<view class="value">{{item.description || '-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
</view>
|
||||
<view class="vertical order-null" v-else>
|
||||
<u-empty
|
||||
mode="order"
|
||||
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||
text="暂无订单操作记录"
|
||||
>
|
||||
</u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderLog } from '@/apis/interfaces/order.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list : [],
|
||||
// 分页
|
||||
page : {
|
||||
current : 1,
|
||||
has_more: false,
|
||||
},
|
||||
pagesShow : false,
|
||||
status : ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
orderLog(this.$Route.query.orderId, this.page.current ).then(res => {
|
||||
let { data, page } = res;
|
||||
let atList = page.current == 1 ? [] : this.list
|
||||
this.list = atList.concat(data)
|
||||
this.page = page
|
||||
this.pagesShow = false
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 空
|
||||
.order-null{
|
||||
height: 100vh;
|
||||
background: white;
|
||||
padding-bottom: 20vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
// 列表
|
||||
.logs{
|
||||
padding: 10rpx;
|
||||
.item{
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx;
|
||||
.item-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
padding: 10rpx 0;
|
||||
label{
|
||||
width: 200rpx;
|
||||
color: gray;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.value{
|
||||
width: calc(100% - 200rpx);
|
||||
text-align: right;
|
||||
line-height: 40rpx;
|
||||
word-wrap: break-word;
|
||||
text{
|
||||
background: $main-color;
|
||||
color: white;
|
||||
margin-right: 20rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
</style>
|
||||
@@ -78,6 +78,7 @@
|
||||
<view class="btns-item btns-border" v-if="item.status.value == 5" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id, type: 'perfect'}})">完善</view>
|
||||
<view class="btns-item btns-border" v-if="item.status.value == 6" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id }})">查看资料</view>
|
||||
<!-- type: 'perfect' -->
|
||||
<view class="btns-item btns-border" v-if="item.status.value == 8" @click="$Router.push({name: 'OrderLog', params: {orderId: item.business_order_id}})">查看记录</view>
|
||||
<view class="btns-item btns-border" v-if="item.can.confirm && item.is_my" @click="$Router.push({name: 'ConfirmScheme', params: {orderId: item.business_order_id,}})">去确认</view>
|
||||
<view class="btns-item" @click="$Router.push({name: 'OrderInfo', params: {orderId: item.business_order_id}})">查看</view>
|
||||
</view>
|
||||
@@ -206,7 +207,7 @@ import modal from 'uview-ui/libs/config/props/modal';
|
||||
data.map(val => {
|
||||
val.is_show_type = false
|
||||
})
|
||||
let atList = page.current == 1 ? [] : this.orders
|
||||
let atList = page.current == 1 ? [] : this.orders
|
||||
this.orders = atList.concat(data)
|
||||
this.page = page
|
||||
this.pagesShow = false
|
||||
@@ -280,7 +281,8 @@ import modal from 'uview-ui/libs/config/props/modal';
|
||||
mask : true
|
||||
})
|
||||
orderSign(id, {
|
||||
app_scheme: "doufire://"
|
||||
app_scheme: "doufire://",
|
||||
redirect_url: getApp().globalData.signUrl
|
||||
}).then(res => {
|
||||
this.$store.commit('setOrderId', id)
|
||||
this.getSignState = true
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
if(is_finish == 1 && this.$Route.query.type == 'perfect'){
|
||||
this.$store.commit('setOrderId', this.$Route.query.orderId)
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
Reference in New Issue
Block a user