Commit 7f5b8a9c authored by 李俊赕's avatar 李俊赕
parents 5ab10fc4 7d801cfb
qn_base_url = 'https://qn-static.banshouhui.com/self-support/'
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
}, },
computed: { computed: {
url() { url() {
return '../../static/settle/top' + this.index + '@3x.png' return qn_base_url + 'top' + this.index + '.png'
} }
} }
} }
......
<template> <template>
<view class="content-view"> <view class="content-view">
<view class="headimage-view"> <view class="headimage-view">
<image class="headimage-view-image" src="../../static/settle/kefu@3x.png"></image> <image class="headimage-view-image" :src="kefuImage"></image>
<text class="name-text">朱曼婷</text> <text class="name-text">朱曼婷</text>
</view> </view>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="content-info-tip">长按二维码添加官方客服微信及时了解审核进度</view> <view class="content-info-tip">长按二维码添加官方客服微信及时了解审核进度</view>
</view> </view>
<view class="QRcode-view"> <view class="QRcode-view">
<image class="content-info-QRcode" src="../../static/settle/erweima@3x.png"></image> <image class="content-info-QRcode":src="erweimaImage"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
}, },
data() { data() {
return {} return {}
},
computed: {
erweimaImage() {
return qn_base_url + 'erweima.png'
},
kefuImage() {
return qn_base_url + 'kefu.png'
}
} }
} }
</script> </script>
......
...@@ -4,6 +4,7 @@ import uView from "uview-ui"; ...@@ -4,6 +4,7 @@ import uView from "uview-ui";
import vuexStore from "@/store/$u.mixin.js"; import vuexStore from "@/store/$u.mixin.js";
import store from '@/store/index' import store from '@/store/index'
import {router,RouterMount} from '@/router/index.js' //路径换成自己的 import {router,RouterMount} from '@/router/index.js' //路径换成自己的
import './common/global.js'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.mixin(vuexStore) Vue.mixin(vuexStore)
......
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
{ {
"path": "pages/exam/index", "path": "pages/exam/index",
"style": { "style": {
"navigationBarTitleText": "入驻考试" "navigationBarTitleText": "入驻考试",
"navigationStyle": "custom",
"disableScroll": true
} }
}, },
{ {
...@@ -227,8 +229,8 @@ ...@@ -227,8 +229,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "在线考试-old", //模式名称 "name": "入驻考试", //模式名称
"path": "pages/exam/start", //启动页面,必选 "path": "pages/exam/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
......
<template> <template>
<view class="backView"> <view class="backView">
<template v-if="isStart==false"> <Settle :index="2">
<!-- <template v-if="isStart==false">
<view class="noticeView"> <view class="noticeView">
<text class="noticeText">规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。 <text class="noticeText">规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。
</text> </text>
...@@ -10,37 +11,45 @@ ...@@ -10,37 +11,45 @@
<text class="bottomTitle">开始考试答题</text> <text class="bottomTitle">开始考试答题</text>
</view> </view>
</view> </view>
</template> </template> -->
<template v-if="isStart==true && currentItem"> <!-- <template v-if="isStart==true && currentItem"> -->
<view class="bottom-padding"> <view class="bottom-padding" v-if="currentItem">
<view class="numberView"> <view class="title-view">
<text class="numberText">{{progress}}</text> <view class="title-text">
<text>{{ titleText[Math.max(0, currentItem.question.answerType - 1)] }}</text>
</view>
<view class="title-right-view">
<image class="timeIcon" :src="time1Image" mode=""></image>
<text class="timeText">倒计时:</text><text class="time-count-down">{{currentTime}}</text>
</view>
</view> </view>
<view class="topicView"> <view class="topicView">
<text class="topicText">{{currentItem.question.content}}</text> <text class="topicText">{{currentItem.question.content}}</text>
</view> </view>
<view class="itemBackView" v-for="(item,ikey) in currentItem.answerList" :key="ikey"> <view :class="['itemView',item.isSelect ? 'active':'']" v-for="(item,ikey) in currentItem.answerList" :key="ikey" @click="itemClick(item,ikey)">
<view :class="['itemView',item.isSelect ? 'active':'']" @click="itemClick(item,ikey)">
<view :class="item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "> <view :class="item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' ">
<text :class="item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText defaultColor' "> <text
:class="item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText gray-color' ">
{{alphaArr[ikey]}} {{alphaArr[ikey]}}
</text> </text>
</view> </view>
<text :class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' ">{{contentFilter(item.content)}}</text> <view
<!--view></view--> :class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' ">{{contentFilter(item.content)}}</view>
</view>
</view> </view>
<!--view class="itemView" v-for="(item,ikey) in currentItem.answerList":key="ikey"> <!--view class="itemView" v-for="(item,ikey) in currentItem.answerList":key="ikey">
<text :class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' " <text :class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
@click="itemClick(item,ikey)">{{item.content}}</text> @click="itemClick(item,ikey)">{{item.content}}</text>
</view--> </view-->
</view>
<!-- </template> -->
<template v-slot:bottom>
<view class="answerBottomView"> <view class="answerBottomView">
<view class="bottomLeftView"> <view class="bottom-left-view">
<image class="timeIcon" :src="clock_url" mode=""></image> <image class="bottom-icon" :src="timuImage" mode=""></image>
<text class="timeText">倒计时:{{currentTime}}</text> <text class="numberText">{{progress}}</text>
</view> </view>
<view class="bottomRightView"> <view class="bottomRightView">
<view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' " <view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' "
...@@ -50,12 +59,11 @@ ...@@ -50,12 +59,11 @@
</view> </view>
</view> </view>
</view>
</template> </template>
</Settle>
<view class="mask" v-show="isComplete"> <view class="mask" v-show="isComplete">
<view class="box"> <view class="box">
<image class="icon" src="@/static/settle/icon-success.png"></image> <image class="icon" :src="chenggongImage"></image>
<view class="txt">您已成功完成考试</view> <view class="txt">您已成功完成考试</view>
<button class="btn" @click="$u.debounce(goSignContract, 500)"> <button class="btn" @click="$u.debounce(goSignContract, 500)">
去提交 去提交
...@@ -66,10 +74,14 @@ ...@@ -66,10 +74,14 @@
</template> </template>
<script> <script>
import Settle from '@/components/settle/index.vue'
const globalUrl = process.uniEnv || {} const globalUrl = process.uniEnv || {}
const systemApiUrl = globalUrl.systemUrl.apiUrl const systemApiUrl = globalUrl.systemUrl.apiUrl
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
export default { export default {
components: {
Settle
},
data() { data() {
return { return {
examId: 2, examId: 2,
...@@ -83,11 +95,25 @@ ...@@ -83,11 +95,25 @@
progress: '', progress: '',
bottomTitle: '下一题', bottomTitle: '下一题',
isStop: false, isStop: false,
clock_url:'https://qn-static.banshouhui.com/clock_exam.png', clock_url: 'https://qn-static.banshouhui.com/clock_exam.png',
examScore:0, examScore: 0,
alphaArr:['A','B','C','D','E'], alphaArr: ['A', 'B', 'C', 'D', 'E'],
timer:null, timer: null,
isComplete:false, // 是否已经考试完成判定 isComplete: false, // 是否已经考试完成判定
}
},
computed: {
titleText() {
return ['单选', '多选', '问答']
},
time1Image() {
return qn_base_url + 'time1.png'
},
chenggongImage() {
return qn_base_url + 'chenggong.png'
},
timuImage() {
return qn_base_url + 'timu.png'
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -98,18 +124,18 @@ ...@@ -98,18 +124,18 @@
}, },
methods: { methods: {
goSignContract(){ goSignContract() {
const url = '/pages/settle/prompt' const url = '/pages/settle/prompt'
uni.navigateTo({ uni.navigateTo({
url url: url + '?pageIndex=' + '3'
}) })
}, },
contentFilter(txt){ contentFilter(txt) {
if(!txt){ if (!txt) {
return txt return txt
} }
let reg = /\w+\.?/; let reg = /\w+\.?/;
const result = txt.replace(reg,'') const result = txt.replace(reg, '')
return result return result
}, },
//开始考试 点击 //开始考试 点击
...@@ -160,14 +186,14 @@ ...@@ -160,14 +186,14 @@
that.applyExam() that.applyExam()
return return
} }
if(res.data.data.examStatus == 1){ if (res.data.data.examStatus == 1) {
console.log('111111111111111111111111111') console.log('111111111111111111111111111')
that.isComplete = true that.isComplete = true
that.examScore = res.data.data.examScore that.examScore = res.data.data.examScore
that.postResult() that.postResult()
return return
} }
if (res.data.data.examStatus == 0 ) { if (res.data.data.examStatus == 0) {
that.userExamId = res.data.data.id that.userExamId = res.data.data.id
that.getNext() that.getNext()
} }
...@@ -301,6 +327,7 @@ ...@@ -301,6 +327,7 @@
that.handleData() that.handleData()
that.currentTime = 100 that.currentTime = 100
that.isSelect = false that.isSelect = false
clearTimeout(this.timer) clearTimeout(this.timer)
that.startCounting() that.startCounting()
...@@ -338,9 +365,9 @@ ...@@ -338,9 +365,9 @@
handleData: function() { handleData: function() {
this.currentItem.answerList.forEach((item,index) => { this.currentItem.answerList.forEach((item, index) => {
item.isSelect = false item.isSelect = false
this.$set(this.currentItem.answerList,index,item) this.$set(this.currentItem.answerList, index, item)
}) })
}, },
...@@ -395,7 +422,7 @@ ...@@ -395,7 +422,7 @@
} }
} }
this.$set(this.currentItem.answerList[i],isSelect,item.isSelect) this.$set(this.currentItem.answerList[i], isSelect, item.isSelect)
} }
...@@ -420,7 +447,7 @@ ...@@ -420,7 +447,7 @@
nextClick: function() { nextClick: function() {
//判断有没有选 //判断有没有选
if (!this.isSelect){ if (!this.isSelect) {
return return
} }
...@@ -433,18 +460,18 @@ ...@@ -433,18 +460,18 @@
}, },
//上传考试结果 //上传考试结果
postResult: function () { postResult: function() {
uni.showLoading({ uni.showLoading({
title: '请稍候' title: '请稍候'
}) })
let that = this let that = this
uni.request({ uni.request({
url: ucenterApiUrl+'/v1/settled/update-settled-exam-score' url: ucenterApiUrl + '/v1/settled/update-settled-exam-score' +
+'?access-token='+getApp().globalData.token, '?access-token=' + getApp().globalData.token,
method: 'POST', method: 'POST',
data: { data: {
score:this.examScore || 0, score: this.examScore || 0,
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading()
...@@ -509,7 +536,7 @@ ...@@ -509,7 +536,7 @@
//this.userAnswerIds = item.id + ',' + this.userAnswerIds //this.userAnswerIds = item.id + ',' + this.userAnswerIds
//answerType 题目类型,1单选,2多选,3简答, //answerType 题目类型,1单选,2多选,3简答,
if (this.currentItem.question.answerType== 2){//多选 if (this.currentItem.question.answerType == 2) { //多选
///* ///*
...@@ -521,7 +548,7 @@ ...@@ -521,7 +548,7 @@
//*/ //*/
}else{//单选 } else { //单选
this.userAnswerIds = item.id this.userAnswerIds = item.id
} }
...@@ -548,11 +575,12 @@ ...@@ -548,11 +575,12 @@
<style lang="scss"> <style lang="scss">
.backView { .backView {
background-color: #F3F3F3; background-color: #F4F5F7;
// position: absolute; position: absolute;
// top: 0; top: 0;
// left: 0; left: 0;
// width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
...@@ -585,45 +613,45 @@ ...@@ -585,45 +613,45 @@
} }
.topicView { .topicView {
margin-top: 60rpx; margin-top: 40rpx;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 40rpx;
} }
.topicText { .topicText {
color: #333333; color: #333333;
font-size: 36rpx; font-size: 32rpx;
padding-left: 28rpx;
padding-right: 36rpx;
padding-bottom: 20rpx;
line-height: 48rpx; line-height: 48rpx;
font-weight: bold; font-weight: bold;
} }
.itemBackView { // .itemBackView {
margin-top: 40rpx; // margin-top: 30rpx;
width: 100%; // width: 100%;
display: flex; // display: flex;
justify-content: center; // justify-content: center;
align-items: center; // align-items: center;
} // }
.itemView { .itemView {
background-color: #FFFFFF; margin-top: 30rpx;
width: 690rpx; background-color: #F4F5F7;
width: 100%;
padding: 40rpx 30rpx;
display: flex; display: flex;
flex-direction: row; align-items: flex-start;
align-items: center;
border-radius: 12rpx; border-radius: 12rpx;
border:2rpx solid transparent; border: 2rpx solid transparent;
&.active{ font-size: 28rpx;
border:2rpx solid #2272FF; &.active {
background-color: #FFFFFF;
border: 2rpx solid #2272FF;
} }
} }
.itemIndexView { .itemIndexView {
margin-left: 30rpx;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
border-radius: 8rpx; border-radius: 8rpx;
...@@ -631,12 +659,17 @@ ...@@ -631,12 +659,17 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink:0
} }
.grayBorder{ .grayBorder {
border: 2rpx solid #999999; border: 2rpx solid #999999;
} }
.gray-color {
color: #999999;
}
.itemIndexText { .itemIndexText {
border-radius: 8rpx; border-radius: 8rpx;
width: 36rpx; width: 36rpx;
...@@ -650,9 +683,6 @@ ...@@ -650,9 +683,6 @@
.itemText { .itemText {
margin-left: 20rpx; margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
padding-top: 40rpx;
padding-bottom: 40rpx;
padding-right: 40rpx;
} }
.bottomView { .bottomView {
...@@ -681,69 +711,87 @@ ...@@ -681,69 +711,87 @@
color: #FFFFFF; color: #FFFFFF;
} }
.answerBottomView { // .answerBottomView {
background-color: #FFFFFF; // background-color: #FFFFFF;
width: 100%; // width: 100%;
height: 200rpx; // height: 200rpx;
// display: flex;
// flex-direction: row;
// align-items: center;
// justify-content: space-between;
// position: fixed;
// bottom: 0;
// }
.title-view {
display: flex; display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between; justify-content: space-between;
position: fixed; align-items: center;
bottom: 0;
}
.bottomLeftView{ .title-text {
height: 160rpx; border-radius: 8rpx;
background-color: #FF930D;
font-size: 20rpx;
color: #FFFFFF;
width: 72rpx;
height: 40rpx;
display: flex; display: flex;
flex-direction: row;
align-items: center; align-items: center;
justify-content: center;
} }
.bottomRightView{ .title-right-view {
height: 160rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
}
.timeIcon { .timeIcon {
margin-left: 30rpx; margin-right: 12rpx;
width: 48rpx; width: 32rpx;
height: 48rpx; height: 32rpx;
} }
.timeText { .timeText {
margin-left: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
} }
.time-count-down {
width: 80rpx;
text-align: right;
}
}
}
.bottomRightView {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30rpx;
}
.nextBtn { .nextBtn {
width: 400rpx; width: 300rpx;
height: 104rpx; height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
margin-right: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.defaultColor { .defaultColor {
background-color: #FFFFFF; color: #333333;
color: #999999;
} }
.defaultBackColor { .defaultBackColor {
background-color: #999999; background-color: #D1D4D4;
} }
.selectedColor { .selectedColor {
color: #2272FF; color: #2272FF;
} }
.whiteColor{ .whiteColor {
color: #FFFFFF; color: #FFFFFF;
} }
...@@ -752,9 +800,35 @@ ...@@ -752,9 +800,35 @@
} }
.bottom-padding { .bottom-padding {
padding-bottom: 180rpx; margin-bottom: 188rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 40rpx 30rpx 46rpx 30rpx;
} }
.mask{
.answerBottomView {
display: flex;
align-items: center;
justify-content: space-between;
.bottom-left-view {
display: flex;
align-items: center;
margin-left: 30rpx;
.bottom-icon {
width: 44rpx;
height: 44rpx;
}
.numberText {
color: #666666;
font-size: 32rpx;
margin-left: 30rpx;
}
}
}
.mask {
position: fixed; position: fixed;
left: 0; left: 0;
width: 100%; width: 100%;
...@@ -763,30 +837,34 @@ ...@@ -763,30 +837,34 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
} }
.box{
.box {
width: 660rpx; width: 660rpx;
height:696rpx; height: 696rpx;
padding:0 70rpx; padding: 0 70rpx;
border-radius: 12rpx; border-radius: 12rpx;
background-color: #fff; background-color: #fff;
.icon{
margin:80rpx auto 0 ; .icon {
margin: 80rpx auto 0;
display: block; display: block;
width:192rpx; width: 224rpx;
height:192rpx; height: 224rpx;
} }
.txt{
margin-top:78rpx; .txt {
margin-bottom:98rpx; margin-top: 20rpx;
margin-bottom: 98rpx;
font-weight: bold; font-weight: bold;
font-size: 48rpx; font-size: 40rpx;
line-height:66rpx ; line-height: 66rpx;
color: #666; color: #2272FF;
text-align: center; text-align: center;
} }
.btn{
.btn {
line-height: 104rpx; line-height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
background: #2272ff; background: #2272ff;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="exam-wrap"> <view class="exam-wrap">
<Settle :index="3"> <Settle :index="3">
<view class="tip-text"> <view class="tip-text">
<image class="tip-image" mode="widthFix" src="../../static/settle/tips1@3x.png"></image> <image class="tip-image" mode="widthFix" :src="tips1Image"></image>
<text>接单教程可让您快速了解如何使用小程序,建议先查看并学习教程。</text> <text>接单教程可让您快速了解如何使用小程序,建议先查看并学习教程。</text>
</view> </view>
<view class="learn-view"> <view class="learn-view">
...@@ -136,6 +136,9 @@ ...@@ -136,6 +136,9 @@
'font-size': '32rpx', 'font-size': '32rpx',
'font-weight': 'bold' 'font-weight': 'bold'
} }
},
tips1Image() {
return qn_base_url + 'tips1@3x.png'
} }
}, },
onLoad() { onLoad() {
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<Settle :index="2"> <Settle :index="2">
<view class="base-list"> <view class="base-list">
<view class="tip-text"> <view class="tip-text">
<image class="tip-image" mode="widthFix" src="../../static/settle/anquan@3x.png"></image> <image class="tip-image" mode="widthFix" :src="anquanImage"></image>
<text>身份证照片、电工证照片、行驶证/驾驶证照片及车辆照片仅用于申请入驻。</text> <text>身份证照片、电工证照片、行驶证/驾驶证照片及车辆照片仅用于申请入驻。</text>
</view> </view>
<view class="base-item"> <view class="base-item">
<view class="item item-select" @click="gopage('/pages/settle/select?selectType=area')"> <view class="item item-select" @click="gopage('/pages/settle/select?selectType=area')">
<view class="flex-center"> <view class="flex-center">
<image class="item-image" src="../../static/settle/mixing@3x.png"></image> <image class="item-image" :src="mixingImage"></image>
<text class="label">接单城市</text> <text class="label">接单城市</text>
</view> </view>
<p :class="['u-flex-1 u-text-right txt', {before: !cityText}]">{{ cityText ? '已选择' : '去选择' }} <p :class="['u-flex-1 u-text-right txt', {before: !cityText}]">{{ cityText ? '已选择' : '去选择' }}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="base-item" style="height: 600rpx;"> <view class="base-item" style="height: 600rpx;">
<view class="item item-select" @click="gopage('/pages/settle/select?selectType=working_age')"> <view class="item item-select" @click="gopage('/pages/settle/select?selectType=working_age')">
<view class="flex-center"> <view class="flex-center">
<image class="item-image" src="../../static/settle/mixing@3x.png"></image> <image class="item-image" :src="mixingImage"></image>
<text class="label">电工工龄(年)</text> <text class="label">电工工龄(年)</text>
</view> </view>
<p :class="['u-flex-1 u-text-right area', {before: !baseInfo.working_age}]"> <p :class="['u-flex-1 u-text-right area', {before: !baseInfo.working_age}]">
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
<view> <view>
<view class="item item-select" @click="locationClick()"> <view class="item item-select" @click="locationClick()">
<view class="flex-center"> <view class="flex-center">
<image class="item-image" src="../../static/settle/mixing@3x.png"></image> <image class="item-image" :src="mixingImage"></image>
<text class="itemTitle">详细地址</text> <text class="itemTitle">详细地址</text>
</view> </view>
<view class="flex-center"> <view class="flex-center">
<image class="item-image-l" src="../../static/settle/dizhi@3x.png"></image> <image class="item-image-l" :src="dizhiImage"></image>
<text class="right-label blueColor">自动定位</text> <text class="right-label blueColor">自动定位</text>
</view> </view>
</view> </view>
...@@ -123,6 +123,15 @@ ...@@ -123,6 +123,15 @@
}, },
cityText() { cityText() {
return this.areaTxts.join('、') return this.areaTxts.join('、')
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
},
dizhiImage() {
return qn_base_url + 'dizhi.png'
} }
}, },
components: { components: {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<view class="page-content"> <view class="page-content">
<Settle :index="2"> <Settle :index="2">
<view class="tip-text"> <view class="tip-text">
<image class="tip-image" mode="widthFix" src="../../static/settle/anquan@3x.png"></image> <image class="tip-image" mode="widthFix" :src="anquanImage"></image>
<text>身份证照片、电工证照片、行驶证/驾驶证照片及车辆照片仅用于申请入驻。</text> <text>身份证照片、电工证照片、行驶证/驾驶证照片及车辆照片仅用于申请入驻。</text>
</view> </view>
<view class="info-view"> <view class="info-view">
<view v-for="(fileItem, index) in formShowList" class="title-view" :key="index"> <view v-for="(fileItem, index) in formShowList" class="title-view" :key="index">
<view> <view>
<image class="title-image" src="../../static/settle/mixing@3x.png"></image> <image class="title-image" :src="mixingImage"></image>
<text>{{ fileItem.label }}</text> <text>{{ fileItem.label }}</text>
</view> </view>
<view class="info-tip-text">{{ fileItem.tips }}</view> <view class="info-tip-text">{{ fileItem.tips }}</view>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
></image> ></image>
</view> </view>
<view v-if="index == 0" class="bottom-tip-view"> <view v-if="index == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" src="../../static/settle/tishi@3x.png"></image> <image class="bottom-tip-image" mode="widthFix" :src="qn_base_url + 'tishi.png'"></image>
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text> <text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view> </view>
<view class="card-info-view" v-if="index == 0 <view class="card-info-view" v-if="index == 0
...@@ -116,14 +116,14 @@ export default { ...@@ -116,14 +116,14 @@ export default {
* vehicle:车辆照 * vehicle:车辆照
**/ **/
other_photos: { other_photos: {
"driver_license": { driver_license: {
"url": "", url: "",
}, },
"driving_license": { driving_license: {
"url": "", url: "",
}, },
"vehicle":{ vehicle: {
"url": "", url: "",
}, },
}, },
id_card_back_check: false, id_card_back_check: false,
...@@ -134,7 +134,8 @@ export default { ...@@ -134,7 +134,8 @@ export default {
electrician_certificate: [], electrician_certificate: [],
driver_license: [], driver_license: [],
driving_license: [], driving_license: [],
vehicle: [], vehicle_front: [],
vehicle_side: [],
}, },
formShowList: [{ formShowList: [{
filedName: "id_card_front", filedName: "id_card_front",
...@@ -143,7 +144,7 @@ export default { ...@@ -143,7 +144,7 @@ export default {
label: "实名认证", label: "实名认证",
tips: "上传二代身份证照片,图片大小不大于3M", tips: "上传二代身份证照片,图片大小不大于3M",
imgs: [], imgs: [],
placeholderImages: ['../../static/settle/renxiang@3x.png', '../../static/settle/guohui@3x.png'] placeholderImages: [qn_base_url + 'renxiang.png', qn_base_url + 'guohui.png']
}, },
// { // {
// filedName: "id_card_back", // filedName: "id_card_back",
...@@ -160,24 +161,24 @@ export default { ...@@ -160,24 +161,24 @@ export default {
maxImgs: 1, maxImgs: 1,
tips: "上传电工证证照片,图片大小不大于3M", tips: "上传电工证证照片,图片大小不大于3M",
imgs: [], imgs: [],
placeholderImages: ['../../static/settle/diangong@3x.png'] placeholderImages: [qn_base_url + 'diangong.png']
}, },
{ {
filedName: "driver_license", filedName: "driver_license",
label: "驾驶证/行驶证照片", label: "驾驶证/行驶证照片",
imgs: [], imgs: [],
maxImgs: 999, maxImgs: 999,
tips: "两证单张照片需包含两页内容,图片大小不大于3M", tips: "两证单张照片需包含两页内容,每种证件只上传一张照片",
placeholderImages: ['../../static/settle/jiashi@3x.png', '../../static/settle/jiashi@3x.png'] placeholderImages: [qn_base_url + 'jiashi.png', qn_base_url + 'jiashi.png']
}, },
{ {
filedName: "vehicle", filedName: "vehicle_front",
label: "车辆照", label: "车辆照",
maxImgs: 1, maxImgs: 1,
tips: "两证单张照片需包含两页内容,图片大小不大于3M", tips: "上传车辆照片",
imgs: [], imgs: [],
placeholderImages: ['../../static/settle/zhengmian@3x.png', placeholderImages: [qn_base_url + 'zhengmian.png',
'../../static/settle/cemian@3x.png'] qn_base_url + 'cemian.png']
}, },
], ],
...@@ -222,6 +223,12 @@ export default { ...@@ -222,6 +223,12 @@ export default {
'id_card_number': '身份证号', 'id_card_number': '身份证号',
'id_card_date': '有效期' 'id_card_date': '有效期'
} }
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
} }
}, },
components: { components: {
...@@ -253,8 +260,8 @@ export default { ...@@ -253,8 +260,8 @@ export default {
self.uploadType = item.filedName || '' self.uploadType = item.filedName || ''
// 默认上传证件类型图片 // 默认上传证件类型图片
let attr = {category: self.categories[1]} let attr = {category: self.categories[1]}
switch (index) { switch (item.filedName) {
case 0: case 'id_card_front':
// 身份证 // 身份证
// 上传图片 // 上传图片
// 成功之后更新 fileInfo、 item里的imgs // 成功之后更新 fileInfo、 item里的imgs
...@@ -267,6 +274,26 @@ export default { ...@@ -267,6 +274,26 @@ export default {
self.uploadType = "id_card_back" self.uploadType = "id_card_back"
} }
break; break;
case 'driver_license':
// 驾驶证/行驶证
if(key == 0) {
// 驾驶证照片
self.uploadType = "driver_license"
} else {
// 行驶证照片
self.uploadType = "driving_license"
}
break;
case 'vehicle_front':
// 车辆照
if(key == 0) {
// 车辆正面照片
self.uploadType = "vehicle_front"
} else {
// 车辆侧面照片
self.uploadType = "vehicle_side"
}
break;
default: default:
//其他 //其他
// 上传图片 // 上传图片
...@@ -289,15 +316,23 @@ export default { ...@@ -289,15 +316,23 @@ export default {
if (uploadImgs && uploadImgs.length < 1) { if (uploadImgs && uploadImgs.length < 1) {
return return
} }
if (uploadType === 'driver_license' || uploadType === 'driving_license' || uploadType === 'vehicle') { let photoType = uploadType;
const otherImgs = this.imgObj[uploadType] if(uploadType === 'vehicle_front' || uploadType === 'vehicle_side') {
photoType = 'vehicle'
}
if (photoType === 'driver_license' || photoType === 'driving_license' || photoType === 'vehicle') {
let otherImgs = this.imgObj[uploadType]
if (photoType === 'vehicle') {
otherImgs = this.imgObj['vehicle_front'].concat(this.imgObj['vehicle_side'])
}
let imgs = [] let imgs = []
otherImgs.map(item => { otherImgs.map(item => {
const img = item.key || item.src || '' const img = item.key || item.src || ''
imgs.push(img) imgs.push(img)
}) })
this.fileInfo[uploadType] = imgs.join(',')
this.fileInfo['other_photos'][photoType]['url'] = imgs.join(',')
return return
} }
this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || '' this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || ''
...@@ -362,6 +397,9 @@ export default { ...@@ -362,6 +397,9 @@ export default {
const fileInfo = this.fileInfo; const fileInfo = this.fileInfo;
let checkFunc = function(item) { let checkFunc = function(item) {
if(item.filedName === 'id_card') {
const value = fileInfo['id_card_front'];
}
const value = fileInfo[item.filedName]; const value = fileInfo[item.filedName];
const tips = "请上传您的" + item.label; const tips = "请上传您的" + item.label;
if (!value) { if (!value) {
...@@ -406,7 +444,9 @@ export default { ...@@ -406,7 +444,9 @@ export default {
if (!this.checkFileInfo()) { if (!this.checkFileInfo()) {
return; return;
} }
const fileInfo = this.fileInfo; let fileInfo = this.fileInfo;
debugger
fileInfo.other_photos = JSON.stringify(fileInfo.other_photos)
let submitInfoData = { let submitInfoData = {
...fileInfo, ...fileInfo,
recommender: getApp().globalData.settleRecommend recommender: getApp().globalData.settleRecommend
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<template v-slot:bottom> <template v-slot:bottom>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="saving" @click="paySubmit"> <button class="btn-submit" :disabled="saving" @click="paySubmit">
<image class="button-image" mode="widthFix" src="../../static/settle/weixin@3x.png"></image> <image class="button-image" mode="widthFix" :src="weixinImage"></image>
<text>{{saving ? '支付中……' : '微信支付'}}</text> <text>{{saving ? '支付中……' : '微信支付'}}</text>
</button> </button>
</view> </view>
...@@ -63,7 +63,11 @@ ...@@ -63,7 +63,11 @@
this.getBaseInfo() this.getBaseInfo()
} }
}, },
computed: {}, computed: {
weixinImage() {
return qn_base_url + 'weixin.png'
}
},
watch: { watch: {
isRefresh(val) { isRefresh(val) {
this.getBaseInfo() this.getBaseInfo()
...@@ -75,7 +79,7 @@ ...@@ -75,7 +79,7 @@
methods: { methods: {
successCallback() { successCallback() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/settle/prompt' url: '/pages/settle/prompt' + '?pageIndex=' + '4'
}) })
}, },
async getBaseInfo() { async getBaseInfo() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="content-view"> <view class="content-view">
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
<image :class="['icon', {active: status != 1}]" <image :class="['icon', {active: status != 1}]"
:src="status == 1 ? require('@/static/settle/chenggong@3x.png') : require('@/static/settle/icon-prompt@3x.png')"> :src="imageUrl">
</image> </image>
</view> </view>
<view class="txt-box"> <view class="txt-box">
...@@ -95,9 +95,9 @@ ...@@ -95,9 +95,9 @@
}, },
computed: { computed: {
imageUrl() { imageUrl() {
return this.status == 1 ? require('@/static/settle/chenggong@3x.png') : require( return this.status == 1 ? qn_base_url + 'chenggong.png' : qn_base_url + 'icon-prompt.png'
'@/static/settle/icon-prompt@3x.png') },
}
}, },
onLoad(e) { onLoad(e) {
if (e) { if (e) {
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
this.getBaseInfo() this.getBaseInfo()
} }
}, },
computed: {},
components: { components: {
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="page-content"> <view class="page-content">
<Settle :index="4"> <Settle :index="4">
<view class="tip-text"> <view class="tip-text">
<image class="tip-image" mode="widthFix" src="../../static/settle/tips3@3x.png"></image> <image class="tip-image" mode="widthFix" :src="tips3Image"></image>
<text>身份证信息、银行卡相关信息、签约人信息须为同一人,否则无法入驻。</text> <text>身份证信息、银行卡相关信息、签约人信息须为同一人,否则无法入驻。</text>
</view> </view>
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,9 @@
}, },
placeholderStyle() { placeholderStyle() {
return 'color:#999999;font-size:28rpx' return 'color:#999999;font-size:28rpx'
},
tips3Image() {
return qn_base_url + 'tips3.png'
} }
}, },
components: { components: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment