同步
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
6
App.vue
6
App.vue
@@ -56,6 +56,12 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
//#endif
|
//#endif
|
||||||
|
},
|
||||||
|
globalData:{
|
||||||
|
signUrl: "https://web.douhuofalv.com/app/e-sign?sign_type=order",
|
||||||
|
// https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=order 测试环境
|
||||||
|
certificationUrl: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
|
||||||
|
// 'https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=personal' 测试环境
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ 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/', //测试环境
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +51,6 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
updateToken('token', res.header.Authorization)
|
updateToken('token', res.header.Authorization)
|
||||||
}
|
}
|
||||||
if(res.statusCode === 200){
|
if(res.statusCode === 200){
|
||||||
uni.hideLoading()
|
|
||||||
const resolveData = res.data
|
const resolveData = res.data
|
||||||
if(resolveData.status_code === 200) {
|
if(resolveData.status_code === 200) {
|
||||||
resolve(resolveData.data)
|
resolve(resolveData.data)
|
||||||
@@ -146,6 +146,7 @@ const loginHint = () => {
|
|||||||
if( loginHintState ) return
|
if( loginHintState ) return
|
||||||
if(!loginHintState) loginHintState = true
|
if(!loginHintState) loginHintState = true
|
||||||
updateToken('')
|
updateToken('')
|
||||||
|
uni.hideLoading()
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '登录提示',
|
title: '登录提示',
|
||||||
content: '您的登录信息已过期,请重新登录',
|
content: '您的登录信息已过期,请重新登录',
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const recharge = () =>{
|
|||||||
url: "app/services/recharge"
|
url: "app/services/recharge"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// // 自由服务包支付
|
// 自由服务包支付
|
||||||
const zyPay = (id) =>{
|
const zyPay = (id) =>{
|
||||||
return request({
|
return request({
|
||||||
url: "app/services/recharge/" + id + "/pay",
|
url: "app/services/recharge/" + id + "/pay",
|
||||||
|
|||||||
@@ -190,6 +190,16 @@ const orderCancel = id => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 操作记录
|
||||||
|
const orderLog = (id, page) => {
|
||||||
|
return request({
|
||||||
|
url: 'business/' + id + '/do_logs',
|
||||||
|
data: {
|
||||||
|
page
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 支付订单
|
// 支付订单
|
||||||
export {
|
export {
|
||||||
lists,
|
lists,
|
||||||
@@ -214,5 +224,6 @@ export {
|
|||||||
getConfirmScheme,
|
getConfirmScheme,
|
||||||
getConfirmSchemeInfo,
|
getConfirmSchemeInfo,
|
||||||
sbuConfirmScheme,
|
sbuConfirmScheme,
|
||||||
orderCancel
|
orderCancel,
|
||||||
|
orderLog
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,52 @@ const diffCoinPay = orderId => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ❤️银联支付
|
||||||
|
const umsPay = (orderId, data) => {
|
||||||
|
return request({
|
||||||
|
url : 'pay/order/' + orderId + '/ums',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 银联支付补差价
|
||||||
|
const diffUmsPay = (orderId, data) => {
|
||||||
|
return request({
|
||||||
|
url: 'pay/diff/' + orderId + '/ums',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ️银联支付查询支付结果
|
||||||
|
const umsState = (trade_id) => {
|
||||||
|
return request({
|
||||||
|
url : 'payments/query/' + trade_id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自由服务包订单信息
|
||||||
|
const umsFreeInfo = (service) => {
|
||||||
|
return request({
|
||||||
|
url : 'app/services/recharge/' + service + '/order',
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自由服务包支付
|
||||||
|
const umsFree = (orderNo, type) => {
|
||||||
|
return request({
|
||||||
|
url : 'app/services/recharge/' + orderNo + '/ums',
|
||||||
|
data : { type },
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
coinPay,
|
coinPay,
|
||||||
diffCoinPay
|
diffCoinPay,
|
||||||
|
umsPay,
|
||||||
|
diffUmsPay,
|
||||||
|
umsState,
|
||||||
|
umsFree,
|
||||||
|
umsFreeInfo
|
||||||
}
|
}
|
||||||
@@ -110,6 +110,29 @@ const getRegion = id => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 确认绑定关系
|
||||||
|
const relationsVerify = (invite, type) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/relations/verify',
|
||||||
|
data: {
|
||||||
|
type,
|
||||||
|
invite
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定分享关系
|
||||||
|
const relationsBind = (invite, type) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/relations/bind',
|
||||||
|
data: {
|
||||||
|
type,
|
||||||
|
invite
|
||||||
|
},
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
relations,
|
relations,
|
||||||
code,
|
code,
|
||||||
@@ -123,5 +146,7 @@ export {
|
|||||||
userInfoBase,
|
userInfoBase,
|
||||||
userInfoBanks,
|
userInfoBanks,
|
||||||
userInfoBank,
|
userInfoBank,
|
||||||
getRegion
|
getRegion,
|
||||||
|
relationsVerify,
|
||||||
|
relationsBind
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "抖火",
|
"name" : "抖火",
|
||||||
"appid" : "__UNI__C305C03",
|
"appid" : "__UNI__C305C03",
|
||||||
"description" : "纵有疾风起,人生不言弃",
|
"description" : "纵有疾风起,人生不言弃",
|
||||||
"versionName" : "1.1.9",
|
"versionName" : "1.2.8",
|
||||||
"versionCode" : 101,
|
"versionCode" : 102,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
13
pages.json
13
pages.json
@@ -535,6 +535,15 @@
|
|||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/work/orderLog",
|
||||||
|
"auth": true,
|
||||||
|
"name": "OrderLog",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "记录",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
@@ -555,8 +564,8 @@
|
|||||||
}, {
|
}, {
|
||||||
"iconPath": "static/icons/tabs_icon_01.png",
|
"iconPath": "static/icons/tabs_icon_01.png",
|
||||||
"selectedIconPath": "static/icons/tabs_show_01.png",
|
"selectedIconPath": "static/icons/tabs_show_01.png",
|
||||||
"pagePath": "pages/college/index",
|
"pagePath": "pages/college/test",
|
||||||
"text": "商学院"
|
"text": "业务考试"
|
||||||
}, {
|
}, {
|
||||||
"iconPath": "static/icons/tabs_icon_02.png",
|
"iconPath": "static/icons/tabs_icon_02.png",
|
||||||
"selectedIconPath": "static/icons/tabs_show_02.png",
|
"selectedIconPath": "static/icons/tabs_show_02.png",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
score().then(res => {
|
score().then(res => {
|
||||||
this.score = res.score
|
this.score = res.score
|
||||||
this.logs = res.logs
|
this.logs = res.logs
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
username: this.phone,
|
username: this.phone,
|
||||||
password: this.password
|
password: this.password
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
// 存储登录凭证
|
// 存储登录凭证
|
||||||
this.$store.commit('setToken', res.token_type + ' ' + res.access_token);
|
this.$store.commit('setToken', res.token_type + ' ' + res.access_token);
|
||||||
this.onBack()
|
this.onBack()
|
||||||
|
|||||||
@@ -107,6 +107,7 @@
|
|||||||
} catch (err){
|
} catch (err){
|
||||||
this.$Router.replaceAll({name: 'Index'})
|
this.$Router.replaceAll({name: 'Index'})
|
||||||
}
|
}
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -125,6 +126,7 @@
|
|||||||
this.captchaImg = img
|
this.captchaImg = img
|
||||||
this.captchaKey = key
|
this.captchaKey = key
|
||||||
this.captchaShow = true
|
this.captchaShow = true
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
@@ -118,6 +118,7 @@
|
|||||||
this.captchaImg = img
|
this.captchaImg = img
|
||||||
this.captchaKey = key
|
this.captchaKey = key
|
||||||
this.captchaShow = true
|
this.captchaShow = true
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
@@ -173,6 +173,7 @@
|
|||||||
type : 2,
|
type : 2,
|
||||||
answers: this.answerArr
|
answers: this.answerArr
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
this.$Router.replace({
|
this.$Router.replace({
|
||||||
name: 'CollegeResults',
|
name: 'CollegeResults',
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<view class="submit-item">·倒计时结束后系统将提示交卷</view>
|
<view class="submit-item">·倒计时结束后系统将提示交卷</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<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>
|
<button @click="onAnswer(item.evaluation_id, item.canDo)" v-else>开始答题</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,6 +41,19 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onCollegeResults(id){
|
||||||
|
if(id == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '非考试成员无成绩记录',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'CollegeResults',
|
||||||
|
params: {id},
|
||||||
|
})
|
||||||
|
},
|
||||||
onAnswer(id, isTo){
|
onAnswer(id, isTo){
|
||||||
if(!isTo){
|
if(!isTo){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="introduce" v-if='loaded'>
|
<view class="introduce" v-if='loaded'>
|
||||||
<image class="richTxt" :src="base.cover" mode="widthFix" />
|
<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" @click="nowBuy" v-if="!is_recharge">
|
||||||
<view class="nowbuy nonebuy" v-else> <view class="btn"> 已开通 </view> </view>
|
<view class="btn">¥{{base.price}}立即购买</view>
|
||||||
|
</view>
|
||||||
|
<view class="nowbuy nonebuy" v-else>
|
||||||
|
<view class="btn">已购买</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { recharge } from '@/apis/interfaces/index.js'
|
||||||
recharge,zyPay
|
import { umsFree } from '@/apis/interfaces/pay.js'
|
||||||
} from '@/apis/interfaces/index.js'
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
identity : false,
|
||||||
loaded : false,
|
loaded : false,
|
||||||
base : '',
|
base : '',
|
||||||
is_recharge : true,
|
is_recharge : true,
|
||||||
|
parent : false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -23,6 +28,8 @@
|
|||||||
methods:{
|
methods:{
|
||||||
getInfo(){
|
getInfo(){
|
||||||
recharge().then(res => {
|
recharge().then(res => {
|
||||||
|
this.parent = res.parent
|
||||||
|
this.identity = res.identity
|
||||||
this.base = res.base
|
this.base = res.base
|
||||||
this.is_recharge = res.is_recharge
|
this.is_recharge = res.is_recharge
|
||||||
this.loaded = true
|
this.loaded = true
|
||||||
@@ -36,23 +43,36 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
nowBuy(){
|
nowBuy(){
|
||||||
zyPay(this.base.service_id).then(res => {
|
if(!this.parent){
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: '支付成功',
|
title : '提示',
|
||||||
icon: 'none',
|
content : '暂无推荐人无法购买自由服务包',
|
||||||
mask: true,
|
cancelText : '取消',
|
||||||
duration: 2000
|
confirmText : '确定',
|
||||||
|
showCancel : false,
|
||||||
})
|
})
|
||||||
this.is_recharge = true
|
return
|
||||||
|
}
|
||||||
}).catch(err => {
|
if(!this.identity){
|
||||||
console.log(err)
|
uni.showModal({
|
||||||
uni.showToast({
|
title : '提示',
|
||||||
title: err.message,
|
content : '当前身份暂时无法购买自由服务包,请开通业务员后重试',
|
||||||
icon: 'none',
|
cancelText : '取消',
|
||||||
mask: true,
|
confirmText : '去开通',
|
||||||
duration: 2000
|
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,6 +83,33 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -104,6 +131,12 @@
|
|||||||
jfList:[],
|
jfList:[],
|
||||||
defaultViewId:'',
|
defaultViewId:'',
|
||||||
zfList:[],
|
zfList:[],
|
||||||
|
// 首次进入弹窗
|
||||||
|
timeData : {},
|
||||||
|
first : 1,
|
||||||
|
showAdTime : 0,
|
||||||
|
showAdImg : true,
|
||||||
|
layAdImg : ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -163,6 +196,15 @@
|
|||||||
list.push(params)
|
list.push(params)
|
||||||
})
|
})
|
||||||
this.notice = list
|
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=>{
|
}).catch(err=>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:err.message,
|
title:err.message,
|
||||||
@@ -218,6 +260,11 @@
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 关闭弹窗广告
|
||||||
|
onRemoveAd(){
|
||||||
|
this.first = 0;
|
||||||
|
this.showAdImg = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -227,6 +274,38 @@
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
padding-top: 20rpx;
|
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{
|
.banner{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -9,14 +9,14 @@
|
|||||||
<!-- 选择支付方式 -->
|
<!-- 选择支付方式 -->
|
||||||
<view class="choose">
|
<view class="choose">
|
||||||
<radio-group @change="payMethod = $event.detail.value" >
|
<radio-group @change="payMethod = $event.detail.value" >
|
||||||
<label class="choose-item">
|
<label class="choose-item" v-if="payType != 'free'">
|
||||||
<view class="choose-text nowrap">
|
<view class="choose-text nowrap">
|
||||||
<image src="@/static/icons/pay_alipay.png" mode="aspectFill"></image>
|
<image src="@/static/icons/pay_alipay.png" mode="aspectFill"></image>
|
||||||
火力值支付
|
火力值支付
|
||||||
</view>
|
</view>
|
||||||
<radio class="choose-radio" value="coin" checked></radio>
|
<radio class="choose-radio" value="coin" :checked="payMethod == 'coin'"></radio>
|
||||||
</label>
|
</label>
|
||||||
<label class="choose-item nowrap">
|
<!-- <label class="choose-item nowrap">
|
||||||
<view class="choose-text">
|
<view class="choose-text">
|
||||||
<image src="@/static/icons/pay_code.png" mode="aspectFill"></image>
|
<image src="@/static/icons/pay_code.png" mode="aspectFill"></image>
|
||||||
付款码支付
|
付款码支付
|
||||||
@@ -29,6 +29,13 @@
|
|||||||
微信支付
|
微信支付
|
||||||
</view>
|
</view>
|
||||||
<radio class="choose-radio" value="wx"></radio>
|
<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>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,23 +48,86 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { info } from '@/apis/interfaces/order.js'
|
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 {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
getState : false,
|
||||||
|
trade_id : '',
|
||||||
orderId : '',
|
orderId : '',
|
||||||
diffId : '',
|
diffId : '',
|
||||||
payMethod : 'coin',
|
payMethod : 'coin',
|
||||||
payType : 'price',
|
payType : 'price',
|
||||||
total : '0.00',
|
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() {
|
created() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '获取订单信息...',
|
title: '获取订单信息...',
|
||||||
mask : true
|
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 => {
|
info(this.$Route.query.orderId).then(res => {
|
||||||
let { total, order_no, business_order_id, diff_prices, diff } = res
|
let { total, order_no, business_order_id, diff_prices, diff } = res
|
||||||
this.orderId = business_order_id
|
this.orderId = business_order_id
|
||||||
@@ -93,8 +163,53 @@
|
|||||||
icon : 'none'
|
icon : 'none'
|
||||||
})
|
})
|
||||||
break;
|
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(){
|
onCoinPay(){
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
@@ -118,7 +233,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 活力值补差价支付
|
// 火力值补差价支付
|
||||||
onDiffCoinPay(){
|
onDiffCoinPay(){
|
||||||
diffCoinPay(this.diffId).then(res => {
|
diffCoinPay(this.diffId).then(res => {
|
||||||
wx.showModal({
|
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(){
|
onRrmoveItem(){
|
||||||
this.$store.commit('setOrderId', this.orderId)
|
this.$store.commit('setOrderId', this.orderId)
|
||||||
|
|||||||
@@ -129,7 +129,10 @@
|
|||||||
// 移出操作后的订单
|
// 移出操作后的订单
|
||||||
this.removeItem(id)
|
this.removeItem(id)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,10 +216,11 @@
|
|||||||
city_id: this.citys[this.citysVal].id,
|
city_id: this.citys[this.citysVal].id,
|
||||||
front_card: this.frontCard.path,
|
front_card: this.frontCard.path,
|
||||||
back_card : this.backCard.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://',
|
app_scheme: 'doufire://',
|
||||||
channel: 'app'
|
channel: 'app'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
let certificationData = res;
|
let certificationData = res;
|
||||||
this.idCard = true
|
this.idCard = true
|
||||||
this.isPathChange = false
|
this.isPathChange = false
|
||||||
@@ -262,7 +263,7 @@
|
|||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
eSigns({
|
eSigns({
|
||||||
redirect_url: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
|
redirect_url: getApp().globalData.certificationUrl,
|
||||||
app_scheme: 'doufire://'
|
app_scheme: 'doufire://'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.isRefresh = true
|
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>
|
<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>
|
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||||
</view>
|
</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-flex" @click="onNav('WeChat')">
|
||||||
<view class="nav-icon"><image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号</view>
|
<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>
|
<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>
|
<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>
|
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { info } from '@/apis/interfaces/user.js'
|
import { info,relationsVerify, relationsBind } from '@/apis/interfaces/user.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -86,7 +137,22 @@
|
|||||||
nickname : '',
|
nickname : '',
|
||||||
identity : '',
|
identity : '',
|
||||||
avatar : '',
|
avatar : '',
|
||||||
certification : ''
|
certification : '',
|
||||||
|
// 绑定关系
|
||||||
|
bindTypeArr : [
|
||||||
|
{ name: '手机号', value: 'mobile'},
|
||||||
|
{ name: '邀请码', value: 'verify'},
|
||||||
|
],
|
||||||
|
bindTypeVal : 'mobile',
|
||||||
|
showBind : false,
|
||||||
|
isInvitation : true,
|
||||||
|
parent : '',
|
||||||
|
invitationUser : {
|
||||||
|
avatar : '',
|
||||||
|
nickname: '',
|
||||||
|
username: ''
|
||||||
|
},
|
||||||
|
invitation : '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -100,11 +166,12 @@
|
|||||||
title: '加载中...'
|
title: '加载中...'
|
||||||
})
|
})
|
||||||
info().then(res => {
|
info().then(res => {
|
||||||
let { nickname, identity, avatar, certification } = res
|
let { nickname, identity, avatar, certification, parent } = res
|
||||||
this.nickname = nickname
|
this.nickname = nickname
|
||||||
this.identity = identity
|
this.identity = identity
|
||||||
this.avatar = avatar
|
this.avatar = avatar
|
||||||
this.certification = certification
|
this.certification = certification
|
||||||
|
this.parent = parent
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -117,6 +184,66 @@
|
|||||||
onNav(name){
|
onNav(name){
|
||||||
this.$Router.push({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(){
|
onUserCode(){
|
||||||
if(this.identity.order > 1){
|
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>
|
</style>
|
||||||
|
|||||||
@@ -7,14 +7,19 @@
|
|||||||
<block v-if="users.length > 0">
|
<block v-if="users.length > 0">
|
||||||
<view class="team-item" v-for="(item, index) in users" :key="index">
|
<view class="team-item" v-for="(item, index) in users" :key="index">
|
||||||
<u-avatar :src="item.avatar" size="40"></u-avatar>
|
<u-avatar :src="item.avatar" size="40"></u-avatar>
|
||||||
<view class="name nowrap">
|
<view class="name">
|
||||||
{{item.nickname}}
|
<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-2" v-if="item.identity.order == 2">业务员</text>
|
||||||
<text class="identity identity-1" v-if="item.identity.order == 1">普通用户</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>
|
<text class="identity identity-3" v-if="item.identity.order == 3">顾问</text>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="mobile">{{item.username}}</view>
|
<view class="mobile">{{item.username}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<u-loadmore v-if="pagesShow" :status="status" />
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="list-null">
|
<view class="list-null">
|
||||||
@@ -37,17 +42,36 @@
|
|||||||
users : [],
|
users : [],
|
||||||
count : {
|
count : {
|
||||||
all: 0
|
all: 0
|
||||||
}
|
},
|
||||||
|
// 分页
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
pagesShow : false,
|
||||||
|
status : false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
relations({
|
relations({
|
||||||
larer: 1
|
larer : 1,
|
||||||
|
page : this.page.current
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
|
||||||
let { users, count } = res;
|
let { users, count } = res;
|
||||||
this.users = users.data
|
|
||||||
this.count = count
|
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 => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -55,6 +79,17 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.pagesShow = true;
|
||||||
|
if(this.page.has_more){
|
||||||
|
this.status = 'loading';
|
||||||
|
this.page.current++
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.status = 'nomore';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -100,10 +135,13 @@
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 15rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border:solid 1rpx #000;
|
border:solid 1rpx #000;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
&:first-child{
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
&.identity-2{
|
&.identity-2{
|
||||||
background: #ECF0FF;
|
background: #ECF0FF;
|
||||||
border-color: #443DE2;
|
border-color: #443DE2;
|
||||||
@@ -119,6 +157,17 @@
|
|||||||
border-color: #FEAD45;
|
border-color: #FEAD45;
|
||||||
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{
|
.mobile{
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
<u-icon class="icon-u" name="arrow-right" color="#ddd" size="20"></u-icon>
|
<u-icon class="icon-u" name="arrow-right" color="#ddd" size="20"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<u-loadmore v-if="pagesShow" :status="status" />
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="search-null">
|
<view class="search-null">
|
||||||
@@ -65,10 +67,15 @@
|
|||||||
return {
|
return {
|
||||||
isSearch : false,
|
isSearch : false,
|
||||||
users : [],
|
users : [],
|
||||||
pages : {},
|
|
||||||
searchValue : '',
|
searchValue : '',
|
||||||
searchResults : [],
|
searchResults : [],
|
||||||
searchText : '输入姓名或姓名搜索'
|
searchText : '输入姓名或姓名搜索',
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
pagesShow : false,
|
||||||
|
status : false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -82,10 +89,15 @@
|
|||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
relations().then(res => {
|
relations({
|
||||||
|
page : this.page.current,
|
||||||
|
certification : 1
|
||||||
|
}).then(res => {
|
||||||
let { users } = res;
|
let { users } = res;
|
||||||
this.users = users.data
|
let atList = users.page.current == 1 ? [] : this.users
|
||||||
this.pages = users.page
|
this.users = atList.concat(users.data)
|
||||||
|
this.page = users.page
|
||||||
|
this.pagesShow = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -123,6 +135,16 @@
|
|||||||
this.$store.commit('setUser', userInfo)
|
this.$store.commit('setUser', userInfo)
|
||||||
this.$Router.back()
|
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>
|
</script>
|
||||||
@@ -146,11 +168,11 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: white;
|
background: white;
|
||||||
|
|
||||||
.cover{
|
.cover{
|
||||||
width: 88rpx;
|
width: 88rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
|
background: #f8f8f8;
|
||||||
}
|
}
|
||||||
.text{
|
.text{
|
||||||
width: calc(100% - 168rpx);
|
width: calc(100% - 168rpx);
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
this.list = atList.concat(data)
|
this.list = atList.concat(data)
|
||||||
this.page = page
|
this.page = page
|
||||||
this.pagesShow = false
|
this.pagesShow = false
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
@@ -83,6 +83,16 @@
|
|||||||
v-model="item.subVal[formItem.key]"
|
v-model="item.subVal[formItem.key]"
|
||||||
></textarea>
|
></textarea>
|
||||||
</block>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -140,6 +150,7 @@
|
|||||||
forms.then(val => {
|
forms.then(val => {
|
||||||
this.servicePush( val, institutionArr, businessTitle, businessId )
|
this.servicePush( val, institutionArr, businessTitle, businessId )
|
||||||
})
|
})
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -400,6 +411,15 @@
|
|||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
text-align: right;
|
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
|
||||||
.radio-flex{
|
.radio-flex{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<view class="open-interest-title">通过业务员考试</view>
|
<view class="open-interest-title">通过业务员考试</view>
|
||||||
<view class="open-interest-submit">通过线上考试即可完成</view>
|
<view class="open-interest-submit">通过线上考试即可完成</view>
|
||||||
</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>
|
||||||
</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 == 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>
|
<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' -->
|
<!-- 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 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 class="btns-item" @click="$Router.push({name: 'OrderInfo', params: {orderId: item.business_order_id}})">查看</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -280,7 +281,8 @@ import modal from 'uview-ui/libs/config/props/modal';
|
|||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
orderSign(id, {
|
orderSign(id, {
|
||||||
app_scheme: "doufire://"
|
app_scheme: "doufire://",
|
||||||
|
redirect_url: getApp().globalData.signUrl
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$store.commit('setOrderId', id)
|
this.$store.commit('setOrderId', id)
|
||||||
this.getSignState = true
|
this.getSignState = true
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
if(is_finish == 1 && this.$Route.query.type == 'perfect'){
|
if(is_finish == 1 && this.$Route.query.type == 'perfect'){
|
||||||
this.$store.commit('setOrderId', this.$Route.query.orderId)
|
this.$store.commit('setOrderId', this.$Route.query.orderId)
|
||||||
}
|
}
|
||||||
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
BIN
static/icons/pay_ali.png
Normal file
BIN
static/icons/pay_ali.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
BIN
static/icons/user_nav_07.png
Normal file
BIN
static/icons/user_nav_07.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Reference in New Issue
Block a user