Commit 9a68de66 authored by zhengzy's avatar zhengzy
parents 6df21b2d 7f521e97
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
// 授权用户信息 // 授权用户信息
authUserInfo: '', authUserInfo: '',
// 用户入驻信息
settledInfo: {},
}, },
onLaunch: function() { onLaunch: function() {
// 应用初始化(全局只触发一次) // 应用初始化(全局只触发一次)
...@@ -46,9 +49,7 @@ ...@@ -46,9 +49,7 @@
}, },
onShow: function() { onShow: function() {
// 应用启动,或从后台进入前台显示 // 应用启动,或从后台进入前台显示
if (!this.globalData.token) {
this.autoLogin() this.autoLogin()
}
}, },
onHide: function() { onHide: function() {
// 应用从前台进入后台 // 应用从前台进入后台
......
...@@ -38,13 +38,18 @@ export default [{ ...@@ -38,13 +38,18 @@ export default [{
"cat": 10 "cat": 10
}, },
{ {
"fieldsTitle": "短裙", "fieldsTitle": "文件选择",
"fieldsName": "file",
"fieldsType": "file",
"key": "短裙", "key": "短裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/5.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/5.jpg",
"cat": 10 "cat": 10
}, },
{ {
"fieldsTitle": "阔腿裤", "fieldsTitle": "获取经纬度",
"fieldsName": "location",
"fieldsType": "location",
"required": true,
"key": "阔腿裤", "key": "阔腿裤",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/6.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/6.jpg",
"cat": 10 "cat": 10
......
qn_base_url = 'https://qn-static.banshouhui.com/self-support/'
\ No newline at end of file
<template>
<view class="file-box">
<view class="u-flex" @click="selectUpload">
<view class="txt u-flex-1">{{item.fieldsTitle}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<view class="pics u-flex u-flex-wrap">
<u-image class="pic" v-for="(item,index) in imgList" width="170rpx" height="170" :src="item.path"></u-image>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view>
<u-popup v-model="maskShow" mode="center" width="500">
<view class="upload-box u-p-30">
<view class="title">请选择图片</view>
<view class="u-flex u-row-between">
<view class="upload-item u-text-center" @click="uploadFile('photo')">
<u-image class="pic" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image>
相册
</view>
<view class="upload-item u-text-center" @click="uploadFile">
<u-image class="pic" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image>
拍摄
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import objMixin from './objMixin'
import baseFile from '@/components/upload/index';
export default {
name: 'XhFiles',
components: {},
mixins: [objMixin,baseFile],
props: {},
filters:{},
data() {
return {
maskShow:false
}
},
computed: {
settings() {
return this.item.settings || []
}
},
watch: {},
mounted() {},
methods: {
selectUpload(){
// 弹窗展示
this.maskShow = true
},
async uploadFile(type){
const self = this
if(type&&type==='photo'){
// 直接打开相册
let config = {
options:{
consourceType:['album'],//['album', 'camera']
}
}
await this.chooseImage('qiniu',config)
self.setValue()
return
}
// 使用拍照工具拍摄
},
setValue() {
const dataValue = []
this.imgList.map(item=>{
dataValue.push(item.key)
})
this.valueChange(dataValue)
}
}
}
</script>
<style lang="scss" scoped>
.pic{
margin-right: 15rpx;
margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
// .list {
// display: flex;
// .txt {
// color: #666;
// padding: 10rpx;
// &.active {
// background-color: red;
// color: #fff;
// }
// }
// }
</style>
<template>
<view class="list u-flex u-row-between">
<text class="required" v-if="item.required">*</text>
<view class="u-m-r-20">{{item.fieldsTitle}}</view>
<view class="u-flex-1">{{valueTxt || ''}}</view>
<u-button type="primary" size="mini" @click="$u.debounce(getLocation,1000)">默认按钮</u-button>
</view>
</template>
<script>
import objMixin from './objMixin'
export default {
name: 'XhRadio',
components: {},
mixins: [objMixin],
props: {},
filters:{},
data() {
return {}
},
computed: {
valueTxt() {
let str = ''
const dataValue = this.dataValue
if(dataValue && dataValue.length>1){
str = '经度:'+dataValue[0]+','+'维度:'+dataValue[1]
}
return str
}
},
watch: {},
mounted() {},
methods: {
getLocation() {
let self = this
const dataValue = this.dataValue || []
const waterInfo = this.waterInfo
uni.getLocation({
type: 'gcj02',
success: function(res) {
dataValue.push(res.longitude)
dataValue.push(res.latitude)
self.dataValue = dataValue
self.setValue(dataValue)
},
fail(err) {}
});
},
setValue(txt) {
this.valueChange(this.dataValue)
}
}
}
</script>
<style lang="scss" scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
</style>
<template>
<view class="list">
<view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item===dataValue}"
@click="setValue(item)">{{item}}</view>
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhRadio',
components: {},
mixins: [stringMixin],
props: {},
data() {
return {}
},
computed: {
settings(){
return this.item.settings || []
}
},
watch: {},
mounted() {},
methods: {
setValue(txt){
this.dataValue = txt
this.valueChange(txt)
}
}
}
</script>
<style lang="scss" scoped>
.list{
display: flex;
.txt{
color:#666;
padding:10rpx;
&.active{
background-color: red;
color:#fff;
}
}
}
</style>
...@@ -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>
<view class="content-view">
<view class="headimage-view">
<image class="headimage-view-image" :src="kefuImage"></image>
<text class="name-text">朱曼婷</text>
</view>
<view class="content-info">
<view>
<view class="content-info-title">深圳唯修汇科技有限公司</view>
<view class="content-info-tip">长按二维码添加官方客服微信及时了解审核进度</view>
</view>
<view class="QRcode-view">
<image class="content-info-QRcode":src="erweimaImage"></image>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
},
data() {
return {}
},
computed: {
erweimaImage() {
return qn_base_url + 'erweima.png'
},
kefuImage() {
return qn_base_url + 'kefu.png'
}
}
}
</script>
<style lang="scss" scoped>
.content-view {
background-color: #FFFFFF;
width: 440rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.headimage-view {
position: relative;
.headimage-view-image {
width: 440rpx;
height: 400rpx;
}
.name-text {
position: absolute;
bottom: 20rpx;
left: 20rpx;
color: #FFFFFF;
font-size: 28rpx;
}
}
.content-info {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0rpx 12rpx 20rpx 12rpx;
.content-info-title {
font-size: 24rpx;
color: #333333;
margin-bottom: 10rpx;
}
.content-info-tip {
font-size: 20rpx;
color: #666666;
}
.QRcode-view {
margin-left: 30rpx;
}
.content-info-QRcode {
padding-top: 12rpx;
width: 104rpx;
height: 104rpx;
}
}
}
</style>
...@@ -5,7 +5,9 @@ export default { ...@@ -5,7 +5,9 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
imgList:[] imgList:[],
// 上传文件种类:0--头像、1--证件、2--身份证
categories: ['avatar', 'cert', 'id'],
}; };
}, },
created() { created() {
...@@ -26,10 +28,19 @@ export default { ...@@ -26,10 +28,19 @@ export default {
} }
let res = await uploader.urlFileUpload(options) let res = await uploader.urlFileUpload(options)
}, },
async chooseImage(type){ /**
* 上传图片公用组件
* @param {Object} type 文件上传方式
* @param {Object} attr 文件属性:图片种类[category](身份证、证件、头像);
* 图片上传其他配置[options】(如,选择图片或拍摄options.consourceType,['album', 'camera'];)其他
*/
async chooseImage(type, attr={}){
const self = this const self = this
let imgList = [] let imgList = []
if(type==='qiniu'){ if(type==='qiniu'){
// 图片种类
let category = attr && attr.category || self.categories[0]
let config = attr && attr.options || {} // 图片上传参数配置
// 七牛上传 // 七牛上传
let options = { let options = {
onProgressUpdate(res){ onProgressUpdate(res){
...@@ -57,13 +68,15 @@ export default { ...@@ -57,13 +68,15 @@ export default {
} }
self.imgList = imgList self.imgList = imgList
console.log(res,'res---onEachUpdate') console.log(res,'res---onEachUpdate')
} },
cardType: category,
...config
} }
// 不需要进度条等可直接获取 // 不需要进度条等可直接获取
let res = await uploader.qnImgUpload(options) let res = await uploader.qnImgUpload(options)
console.log(self.imgList,'self.imgList') console.log(self.imgList,'self.imgList')
// console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj') console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj')
// let imgList = res.map(item=>{ // let imgList = res.map(item=>{
// return { // return {
// key:item, // key:item,
......
...@@ -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;
......
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
// 后台自动判断入驻流程是否完成,前台通过status确定状态 // 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) { if (result && result.record) {
vm.loaded = true; vm.loaded = true;
vm.status = result.record.status; vm.status = Number(result.record.status);
// vm.status = 1 // vm.status = 1
} }
}; };
......
...@@ -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() {
......
...@@ -23,24 +23,31 @@ ...@@ -23,24 +23,31 @@
<view class="title">{{groupItem.groupName}}</view> <view class="title">{{groupItem.groupName}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex" <u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top"
:prop="item.fieldsName"> :prop="item.fieldsName">
<view class="label" @click="nextStep(item)"> <view class="label" v-if="toLowerCase(item.fieldsType)!=='location'" @click="nextStep(item)">
<text class="required" v-if="item.required">*</text> <text class="required" v-if="item.required">*</text>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
<template v-if="item.fieldsType"> <template v-if="item.fieldsType">
<xh-input v-if="item.fieldsType==='input'" :groupIndex="groupIndex" <xh-input v-if="toLowerCase(item.fieldsType)==='input'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-input> </xh-input>
<xh-radio v-if="item.fieldsType==='radio'" :groupIndex="groupIndex" <xh-radio v-else-if="toLowerCase(item.fieldsType)==='radio'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-radio> </xh-radio>
<xh-checkbox v-if="item.fieldsType==='checkbox'" :groupIndex="groupIndex" <xh-checkbox v-else-if="toLowerCase(item.fieldsType)==='checkbox'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-checkbox> </xh-checkbox>
<xh-select v-if="item.fieldsType==='select'" :groupIndex="groupIndex" <xh-select v-else-if="toLowerCase(item.fieldsType)==='select'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-select> </xh-select>
<xh-files v-else-if="toLowerCase(item.fieldsType)==='file'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-files>
<xh-location v-else-if="toLowerCase(item.fieldsType)==='location'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-location>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -58,6 +65,8 @@ ...@@ -58,6 +65,8 @@
import XhRadio from '@/components/createCom/XhRadio.vue' import XhRadio from '@/components/createCom/XhRadio.vue'
import XhCheckbox from '@/components/createCom/XhCheckbox.vue' import XhCheckbox from '@/components/createCom/XhCheckbox.vue'
import XhSelect from '@/components/createCom/XhSelect.vue' import XhSelect from '@/components/createCom/XhSelect.vue'
import XhFiles from '@/components/createCom/XhFiles.vue'
import XhLocation from '@/components/createCom/XhLocation.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
...@@ -109,7 +118,9 @@ ...@@ -109,7 +118,9 @@
XhInput, XhInput,
XhRadio, XhRadio,
XhCheckbox, XhCheckbox,
XhSelect XhSelect,
XhFiles,
XhLocation
// formCom // formCom
}, },
created() { created() {
...@@ -144,7 +155,17 @@ ...@@ -144,7 +155,17 @@
// 下一步 // 下一步
console.log(item, 'item') console.log(item, 'item')
}, },
fieldTypeStatus(type){
let typeArr = ['input','radio','checkbox','select','file']
let fieldsType = type.toLocaleLowerCase()
let flag = false
flag = typeArr.indexOf(fieldsType)>=0
return flag
},
toLowerCase(str){
str = str || ''
return str.toLocaleLowerCase()
},
// ------------------------- 以下方法为展示滚动切换 ------------------------- // ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换 // 点击左边的栏目切换
async swichMenu(index) { async swichMenu(index) {
......
...@@ -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,83 +2,77 @@ ...@@ -2,83 +2,77 @@
<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 v-if="fileItem.required" 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>
<view class="image-view"> <view class="image-view">
<image class="info-image" mode="aspectFill" v-for="(src, key) in fileItem.placeholderImages" <image
:src="fileItem.imgs.length > key ? fileItem.imgs[key] : src" :key="src + key" class="info-image"
@click="handleClick(fileItem, index, key)"></image> mode="aspectFill"
v-for="(src, key) in fileItem.placeholderImages"
:src="fileItem.imgs.length > key ? fileItem.imgs[key] : src"
:key="src + key"
@click="handleClick(fileItem, index, key)"
></image>
</view> </view>
<view v-if="index == 0" class="bottom-tip-view"> <view class="card-info-view" v-if="index == 0
<image class="bottom-tip-image" mode="widthFix" src="../../static/settle/tishi@3x.png"></image> && ((fileInfo.id_card_name || fileInfo.id_card_number || fileInfo.id_card_date) || frontErrorMsg || backErrorMsg)">
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view>
<view class="card-info-view" v-if="index == 0 && (fileInfo.id_card_name || fileInfo.id_card_number || fileInfo.id_card_date)">
<view class="card-list-view" v-for="(value, cardkey) in cardTitle" :key="cardkey"> <view class="card-list-view" v-for="(value, cardkey) in cardTitle" :key="cardkey">
<view class="card-list-item"> <view class="card-list-item">
<text>{{value}}</text> <text>{{ value }}</text>
<text class="card-item-text">{{fileInfo[cardkey]}}</text> <text class="card-item-text">{{ fileInfo[cardkey] }}</text>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="card-item-error" v-if="fileInfo[cardkey] && (cardkey == 'id_card_date' ? fileInfo.id_card_back : fileInfo.id_card_front)">识别失败,请重新上传</view> <view class="card-item-error" v-if="fileInfo[cardkey]
&& ((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)">{{frontErrorMsg}}</view>
<view class="card-item-error" v-if="(cardkey == 'id_card_date' && backErrorMsg)">{{ backErrorMsg }}</view>
</view> </view>
</view> </view>
<view v-if="index == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view>
</view> </view>
</view> </view>
<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="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)"> <button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
{{!submitBtnStatus ? "完成必填项,可提交资料" : "提交"}} {{ !submitBtnStatus ? '完成必填项,可提交资料' : '提交' }}
</button> </button>
</view> </view>
</template> </template>
<!-- <view class="base-list">
<view class="base-list">
<template v-for="(fileItem, index) in formShowList"> <template v-for="(fileItem, index) in formShowList">
<view class="item item-select flex flex-yc" :key="index" @click="toUploadImg(fileItem, index)"> <view class="item item-select flex flex-yc" :key="index" @click="toUploadImg(fileItem, index)">
<view class="label txt">{{ fileItem.label }}</view> <view class="label txt">{{ fileItem.label }}</view>
<p class="flex1 u-text-right txt" v-show="fileInfo[fileItem.filedName] !== ''"> <p class="flex1 u-text-right txt" v-show="fileInfo[fileItem.filedName] !== ''">
{{ {{ imgObj[fileItem.filedName] && imgObj[fileItem.filedName].length + '张' }}
imgObj[fileItem.filedName] && imgObj[fileItem.filedName].length + "张"
}}
</p> </p>
<u-icon name="arrow-right" color="#999" size="28"></u-icon> <u-icon name="arrow-right" color="#999" size="28"></u-icon>
</view> </view>
<view class="tips" :key="index + 't'"> <view class="tips" :key="index + 't'">{{ fileItem.tips }}</view>
{{ fileItem.tips }} <view class="tips id-identity-box" :key="index + 'identity'" v-if="fileItem.filedName === 'id_card_front'">
</view>
<view class="tips id-identity-box" :key="index + 'identity'"
v-if="fileItem.filedName === 'id_card_front'">
<view class="txt">请核实识别结果</view> <view class="txt">请核实识别结果</view>
<view class="txt"> <view class="txt">
身份证姓名:{{ fileInfo.id_card_name}}<span class="red" v-show=" 身份证姓名:{{ fileInfo.id_card_name }}
!fileInfo.id_card_name && <span class="red" v-show="!fileInfo.id_card_name && fileInfo.id_card_front">识别失败,请重新上传</span>
fileInfo.id_card_front
">识别失败,请重新上传</span>
</view> </view>
<view class="txt"> <view class="txt">
身份证号码:{{ fileInfo.id_card_number 身份证号码:{{ fileInfo.id_card_number }}
}}<span class="red" v-show=" <span class="red" v-show="!fileInfo.id_card_name && fileInfo.id_card_front">识别失败,请重新上传</span>
!fileInfo.id_card_name &&
fileInfo.id_card_front
">识别失败,请重新上传</span>
</view> </view>
</view> </view>
</template> </template>
</view> </view> -->
<!-- <view class="seat"></view> <!-- <view class="seat"></view>
<view class="btn-wrap fixed flex flex-xc"> <view class="btn-wrap fixed flex flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)"> <button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
...@@ -92,13 +86,21 @@ ...@@ -92,13 +86,21 @@
</template> </template>
<script> <script>
import Settle from '@/components/settle/index.vue' import Settle from '@/components/settle/index.vue'
export default { import base from '@/components/upload/index';
const app = getApp()
export default {
mixins:[base],
components: { components: {
Settle Settle
}, },
data() { data() {
return { return {
imgList:[],
frontErrorMsg: '',
backErrorMsg: '',
uploadType: '',
settledInfo: '',
fileInfo: { fileInfo: {
id: "", id: "",
id_card_name: "", id_card_name: "",
...@@ -107,16 +109,33 @@ ...@@ -107,16 +109,33 @@
id_card_front: "", id_card_front: "",
id_card_back: "", id_card_back: "",
electrician_certificate: "", electrician_certificate: "",
vehicle_photos: "", /**
other_certificates: "", * 其他证件照片信息,json串储存
* driver_license:驾驶证
* driving_license:行驶证
* vehicle:车辆照
**/
other_photos: {
driver_license: {
url: "",
},
driving_license: {
url: "",
},
vehicle: {
url: "",
},
},
id_card_back_check: false, id_card_back_check: false,
}, },
imgObj: { imgObj: {
id_card_front: [], id_card_front: [],
id_card_back: [], id_card_back: [],
electrician_certificate: [], electrician_certificate: [],
vehicle_photos: [], driver_license: [],
other_certificates: [] driving_license: [],
vehicle_front: [],
vehicle_side: [],
}, },
formShowList: [{ formShowList: [{
filedName: "id_card_front", filedName: "id_card_front",
...@@ -125,7 +144,7 @@ ...@@ -125,7 +144,7 @@
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",
...@@ -142,24 +161,24 @@ ...@@ -142,24 +161,24 @@
maxImgs: 1, maxImgs: 1,
tips: "上传电工证证照片,图片大小不大于3M", tips: "上传电工证证照片,图片大小不大于3M",
imgs: [], imgs: [],
placeholderImages: ['../../static/settle/diangong@3x.png'] placeholderImages: [qn_base_url + 'diangong.png']
}, },
{ {
filedName: "other_certificates", 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_photos", 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']
}, },
], ],
...@@ -167,9 +186,12 @@ ...@@ -167,9 +186,12 @@
saving: false, saving: false,
} }
}, },
onLoad(e) {}, onLoad(e) {
this.initSettledInfo()
},
updated() { updated() {
this.updateImgs() // 该方法性能消耗大目前不使用
// this.updateImgs()
}, },
watch: { watch: {
"fileInfo.id_card_front"() { "fileInfo.id_card_front"() {
...@@ -181,7 +203,7 @@ ...@@ -181,7 +203,7 @@
} }
}, },
"fileInfo.id_card_back"() { "fileInfo.id_card_back"() {
if (this.fileInfo.id_card_front) { if (this.fileInfo.id_card_back) {
this.checkIdCard("back"); this.checkIdCard("back");
} else { } else {
this.fileInfo.id_card_back_check = true; this.fileInfo.id_card_back_check = true;
...@@ -201,20 +223,79 @@ ...@@ -201,20 +223,79 @@
'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'
},
tishiImage() {
return qn_base_url + 'tishi.png'
} }
}, },
components: { components: {
}, },
methods: { methods: {
// 初始化入驻信息
async initSettledInfo() {
let self = this
let settledInfo = app.globalData.settledInfo
if(settledInfo && settledInfo.length) {
self.fileInfo.id = settledInfo.id
} else {
const app = getApp()
const callBack = (vm, result) => {
vm.settledInfo = result.record
vm.fileInfo.id = result.record.id
}
settledInfo = await app.getBaseInfo(this, callBack)
uni.hideLoading()
}
},
// item: formShowList的元素 // item: formShowList的元素
// index、key: 选中的是formShowList的第index里面的第key个图片选择器 // index、key: 选中的是formShowList的第index里面的第key个图片选择器
handleClick(item, index, key) { async handleClick(item, index, key) {
switch (index) { let self = this
case 0: self.imgList = []
self.uploadType = item.filedName || ''
// 默认上传证件类型图片
let attr = {category: self.categories[1]}
switch (item.filedName) {
case 'id_card_front':
// 身份证 // 身份证
// 上传图片 // 上传图片
// 成功之后更新 fileInfo、 item里的imgs // 成功之后更新 fileInfo、 item里的imgs
attr = {category: self.categories[2]}
if(key == 0) {
// 身份证正面照片
self.uploadType = "id_card_front"
} else {
// 身份证反面照片
self.uploadType = "id_card_back"
}
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; break;
default: default:
//其他 //其他
...@@ -223,21 +304,38 @@ ...@@ -223,21 +304,38 @@
break; break;
} }
await self.chooseImage("qiniu", attr)
if(self.uploadType && self.imgList && self.imgList.length > 0) {
// 设置图片对象
self.imgObj[self.uploadType] = self.imgList
self.formShowList[index].imgs[key] = self.imgList[0].src
this.updateImgs()
}
}, },
updateImgs() { updateImgs() {
const uploadType = this.uploadType const uploadType = this.uploadType
const uploadImgs = this.imgObj[uploadType] const uploadImgs = this.imgObj[uploadType]
if (uploadImgs.length < 1) { if (uploadImgs && uploadImgs.length < 1) {
return return
} }
if (uploadType === 'other_certificates') { let photoType = uploadType;
const otherImgs = this.imgObj['other_certificates'] 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 || ''
...@@ -277,8 +375,10 @@ ...@@ -277,8 +375,10 @@
if (type === "front") { if (type === "front") {
this.fileInfo.id_card_name = ""; this.fileInfo.id_card_name = "";
this.fileInfo.id_card_number = ""; this.fileInfo.id_card_number = "";
this.frontErrorMsg = res.message || "识别失败,请重新上传"
} else { } else {
this.fileInfo.id_card_back_check = false; this.fileInfo.id_card_back_check = false;
this.backErrorMsg = res.message || "识别失败,请重新上传"
} }
return return
} }
...@@ -288,8 +388,11 @@ ...@@ -288,8 +388,11 @@
res.data.id_card_name || ""; res.data.id_card_name || "";
this.fileInfo.id_card_number = this.fileInfo.id_card_number =
res.data.id_card_number || ""; res.data.id_card_number || "";
this.frontErrorMsg = (!this.fileInfo.id_card_name || !this.fileInfo.id_card_number) ? "识别失败,请重新上传" : ''
} else { } else {
this.fileInfo.id_card_date = res.data.id_card_date || "";
this.fileInfo.id_card_back_check = true; this.fileInfo.id_card_back_check = true;
this.backErrorMsg = !this.fileInfo.id_card_date ? "识别失败,请重新上传" : ''
} }
}, },
checkFileInfo() { checkFileInfo() {
...@@ -297,6 +400,9 @@ ...@@ -297,6 +400,9 @@
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) {
...@@ -341,7 +447,9 @@ ...@@ -341,7 +447,9 @@
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
...@@ -389,7 +497,7 @@ ...@@ -389,7 +497,7 @@
// }); // });
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -562,10 +670,11 @@ ...@@ -562,10 +670,11 @@
} }
.bottom-tip-image { .bottom-tip-image {
width: 24rpx; width: 22rpx;
height: 24rpx; height: 22rpx;
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 4rpx; margin-top: 4rpx;
flex-shrink: 0;
} }
.seat { .seat {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<view class="line-view"></view> <view class="line-view"></view>
<view class="item u-flex u-row-between"> <view class="item u-flex u-row-between">
<view class="txt">待缴纳金额</view> <view class="txt">待缴纳金额</view>
<view class="txt-value">¥ {{settledInfo.record.deposit}}</view> <view class="txt-value">¥ {{settledInfo.record.deposit || '--'}}</view>
</view> </view>
</view> </view>
<!-- <view class="tips">你已缴纳金额:1000.00元</view> <!-- <view class="tips">你已缴纳金额:1000.00元</view>
...@@ -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,16 +4,20 @@ ...@@ -4,16 +4,20 @@
<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">
<text :class="['title',index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text> <text :class="['title', {failed: status == 4} ,index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text>
</view> </view>
<view class="tips-box" v-if="info.tipsArr"> <view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']" <text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']"
v-for="(txt,index) in info.tipsArr">{{txt}}</text> v-for="(txt,index) in info.tipsArr">{{txt}}</text>
</view> </view>
<view class="services-view">
<Services/>
</view>
</view> </view>
<template v-slot:bottom> <template v-slot:bottom>
<button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button> <button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button>
...@@ -24,10 +28,12 @@ ...@@ -24,10 +28,12 @@
<script> <script>
import Settle from '@/components/settle/index.vue' import Settle from '@/components/settle/index.vue'
import Services from '@/components/settle/services.vue'
export default { export default {
components: { components: {
Settle Settle,
Services
}, },
data() { data() {
...@@ -38,21 +44,21 @@ ...@@ -38,21 +44,21 @@
status: 1, status: 1,
statusName: '待审核', statusName: '待审核',
txtArr: ['已提交,等待审核', '正在审核中'], txtArr: ['已提交,等待审核', '正在审核中'],
btnTxt: '去接单广场逛逛', btnTxt: '去首页',
url: '/pages/take/index' url: '/pages/index/index'
}, { }, {
status: 2, status: 2,
statusName: '已通过', statusName: '已通过',
txtArr: ['恭喜,审核通过', '“充电桩安装入驻审核”'], txtArr: ['恭喜,审核通过', '“充电桩安装入驻审核”'],
btnTxt: '去考试', btnTxt: '去考试',
url: '/pages/exam/start' url: '/pages/learn/exam'
}, { }, {
status: 3, status: 3,
statusName: '备选', statusName: '备选',
txtArr: ['您已成为', "“充电桩安装备选服务商”"], txtArr: ['您已成为', "“充电桩安装备选服务商”"],
tipsArr: ['后续如有业务,请留意通知!'], tipsArr: ['后续如有业务,请留意通知!'],
btnTxt: '去接单广场逛逛', btnTxt: '去首页',
url: '/pages/take/index' url: '/pages/index/index'
}, { }, {
status: 4, status: 4,
statusName: '已驳回', statusName: '已驳回',
...@@ -78,8 +84,8 @@ ...@@ -78,8 +84,8 @@
status: 7, status: 7,
statusName: '已支付保证金', statusName: '已支付保证金',
txtArr: ['您已成为', "充电桩安装的正式服务商"], txtArr: ['您已成为', "充电桩安装的正式服务商"],
btnTxt: '去接单广场逛逛', btnTxt: '去首页',
url: '/pages/take/index' url: '/pages/index/index'
}], }],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '', status: '',
...@@ -89,9 +95,9 @@ ...@@ -89,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) {
...@@ -109,7 +115,6 @@ ...@@ -109,7 +115,6 @@
this.getBaseInfo() this.getBaseInfo()
} }
}, },
computed: {},
components: { components: {
}, },
...@@ -156,9 +161,16 @@ ...@@ -156,9 +161,16 @@
}, },
goPage() { goPage() {
const url = this.info.url const url = this.info.url
if (this.status == 1 || this.status == 3 || this.status == 3) {
uni.reLaunch({
url,
});
} else {
uni.navigateTo({ uni.navigateTo({
url, url,
}); });
}
}, },
}, },
} }
...@@ -194,7 +206,7 @@ ...@@ -194,7 +206,7 @@
} }
.txt-box { .txt-box {
padding-bottom: 50rpx;
} }
.title { .title {
...@@ -205,29 +217,25 @@ ...@@ -205,29 +217,25 @@
font-weight: bold; font-weight: bold;
font-size: 44rpx; font-size: 44rpx;
color: #2272FF; color: #2272FF;
&.failed {
color: #FA5A49;
}
&.active { &.active {
color: #666666; color: #666666;
font-size: 24rpx; font-size: 24rpx;
font-weight: 300rpx; font-weight: 400;
margin-top: 26rpx; margin-top: 20rpx;
} }
} }
.tips-box { .tips-box {
margin-top: 32rpx; // margin-top: 32rpx;
text-align: center; text-align: center;
} }
.tips { .tips {
text-align: center; color: #666666;
line-height: 44rpx; font-size: 24rpx;
font-size: 32rpx;
color: #666;
&.red {
color: red;
}
} }
.btn-submit { .btn-submit {
...@@ -246,5 +254,10 @@ ...@@ -246,5 +254,10 @@
color: #999; color: #999;
} }
} }
.services-view {
display: flex;
justify-content: center;
padding-top: 50rpx;
}
} }
</style> </style>
...@@ -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: {
......
...@@ -26,11 +26,11 @@ let baseOptions = { ...@@ -26,11 +26,11 @@ let baseOptions = {
let uploader = new request(baseOptions); let uploader = new request(baseOptions);
// 添加获取七牛云token的方法 // 添加获取七牛云token的方法
uploader.getQnToken = function(data) { uploader.getQnToken = function(params) {
//该地址需要开发者自行配置(每个后台的接口风格都不一样) //该地址需要开发者自行配置(每个后台的接口风格都不一样)
// console.log(uploader.get,'uploader.get') // console.log(uploader.get,'uploader.get')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uploader.post(baseOptions.qiniuUploadUrl,data).then(data => { uploader.post(baseOptions.qiniuUploadUrl, params).then(data => {
/* /*
*接口返回参数: *接口返回参数:
*visitPrefix:访问文件的域名 *visitPrefix:访问文件的域名
......
...@@ -83,7 +83,7 @@ export default class fileUpload extends request { ...@@ -83,7 +83,7 @@ export default class fileUpload extends request {
} }
let qnRes = this.qiniuTokenObj let qnRes = this.qiniuTokenObj
if(!qnRes || qnRes.cardType !== requestInfo.cardType){ if(!qnRes || qnRes.cardType !== requestInfo.cardType){
let params = {type:requestInfo.cardType || ''} let params = {type:requestInfo.cardType || 'avatar'}
qnRes = await this.getQnToken(params) qnRes = await this.getQnToken(params)
this.qiniuTokenObj = { this.qiniuTokenObj = {
cardType:'', cardType:'',
......
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