Commit 4daae323 authored by Morson's avatar Morson
parents 84df9113 73616dfd
; ;
(function() { (function() {
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境 let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let ENV_VAR = null; let ENV_VAR = null;
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') { if (NODE_ENV === 'dev') {
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
} }
} else if (process.env.NODE_ENV === "production") { } else if (process.env.NODE_ENV === "production") {
ENV_VAR = require('./.env.prod.js'); ENV_VAR = require('./.env.prod.js');
//ENV_VAR = require('./.env.test.js');
} }
if (ENV_VAR) { if (ENV_VAR) {
process.uniEnv = {}; process.uniEnv = {};
......
...@@ -120,6 +120,13 @@ let orderApiFun = function(vm){ ...@@ -120,6 +120,13 @@ let orderApiFun = function(vm){
*/ */
let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'}); let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'});
/**
* 获取工单联系人经纬度
*/
let addressToCoordinate= async (orderId) => await vm.$u.get(prefix+'order/specialfee/'+ vm.vuex_token +'/address/coordinate/'+orderId);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
listOrderCount, listOrderCount,
...@@ -145,7 +152,8 @@ let orderApiFun = function(vm){ ...@@ -145,7 +152,8 @@ let orderApiFun = function(vm){
getMeasure, getMeasure,
saveCompleteData, saveCompleteData,
inOrderFinish, inOrderFinish,
outOrderFinish outOrderFinish,
addressToCoordinate
} }
return orderApi return orderApi
} }
......
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
align-items: flex-start; align-items: flex-start;
text-align: left;
.address-image { .address-image {
width: 26rpx; width: 26rpx;
height: 28rpx; height: 28rpx;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
// if(e.standardId) { // if(e.standardId) {
// this.standardId = e.standardId // this.standardId = e.standardId
// } // }
this.token = getApp().globalData.token this.token = this.vuex_token
}, },
methods: { methods: {
// 保存照片到本地 // 保存照片到本地
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据 // this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true this.loading = true
this.$u.api.getUserWatermark({ this.$u.api.getUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'system_id': this.systemId 'system_id': this.systemId
}).then(res => { }).then(res => {
if (res && res.result) { if (res && res.result) {
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
saveUserWatermark: function() { saveUserWatermark: function() {
this.loading = true this.loading = true
this.$u.api.saveUserWatermark({ this.$u.api.saveUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'watermark': this.result 'watermark': this.result
}).then(res => { }).then(res => {
if (res.result.code == true) { if (res.result.code == true) {
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
<cover-view class="bottom-box" v-if="!standardShow"> <cover-view class="bottom-box" v-if="!standardShow">
<cover-image class="icon" src='/static/photo/icon-back.png' mode="" @click="goBack"></cover-image> <cover-image class="icon" src='/static/photo/icon-back.png' mode="" @click="goBack"></cover-image>
<cover-image class='icon-take icon' src='/static/photo/icon-take.png' @click="$u.debounce(takePhoto, 500)"> </cover-image> <cover-image class='icon-take icon' src='/static/photo/icon-take.png' @click="$u.debounce(takePhoto, 500)"> </cover-image>
<cover-image class='icon' src='/static/photo/icon-standard.png' @click="standardShow = true"> </cover-image> <cover-image class='icon' src='/static/photo/icon-standard.png' @click="standardShow = true" v-if="standardStatus"> </cover-image>
<view class='icon' v-else></view>
</cover-view> </cover-view>
<canvas canvas-id="canvas" id="photoCanvas" class="canvas" <canvas canvas-id="canvas" id="photoCanvas" class="canvas"
:style="{'width':750 + 'rpx','height': cameraHeight + 'rpx'}"></canvas> :style="{'width':750 + 'rpx','height': cameraHeight + 'rpx'}"></canvas>
...@@ -101,7 +102,8 @@ ...@@ -101,7 +102,8 @@
ratio: 0, ratio: 0,
cameraChange: false, cameraChange: false,
waterSetting: null, waterSetting: null,
shadowInitShow: false, // 第一次进入页面需显示弹窗 shadowInitShow: false, // 第一次进入页面需显示弹窗
standardStatus: false // 是否显示拍照要求
} }
}, },
created(e) { created(e) {
...@@ -119,6 +121,7 @@ ...@@ -119,6 +121,7 @@
if (this.currentItem.images.length > 0) { if (this.currentItem.images.length > 0) {
this.shadowInitShow = true this.shadowInitShow = true
this.standardShow = true this.standardShow = true
this.standardStatus = true
} }
}, },
computed: { computed: {
......
...@@ -183,7 +183,6 @@ ...@@ -183,7 +183,6 @@
if (result && result.record) { if (result && result.record) {
vm.loaded = true; vm.loaded = true;
vm.needSettled = result.needSettled; vm.needSettled = result.needSettled;
vm.needSettled = false
vm.status = Number(result.record.status || '0'); vm.status = Number(result.record.status || '0');
// vm.status = 8 // vm.status = 8
} }
...@@ -347,11 +346,18 @@ ...@@ -347,11 +346,18 @@
for (var i in res.data) { for (var i in res.data) {
count += res.data[i] count += res.data[i]
} }
// 修改tab总数 // 修改tab总数
uni.setTabBarBadge({ if (count > 0) {
index: 1, uni.setTabBarBadge({
text: String(count) index: 1,
}) text: String(count)
})
} else {
uni.removeTabBarBadge({
index: 1
})
}
} }
} else { } else {
...@@ -483,7 +489,7 @@ ...@@ -483,7 +489,7 @@
.tip-other { .tip-other {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #666666;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
return process.uniEnv.qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
}, },
buttonStyle() { buttonStyle() {
return this.submitBtnStatus ? { return {
'color': '#FFFFFF', 'color': '#FFFFFF',
'background-color': '#2272FF;', 'background-color': '#2272FF;',
'width': '300rpx', 'width': '300rpx',
...@@ -223,14 +223,6 @@ ...@@ -223,14 +223,6 @@
'font-size': '32rpx', 'font-size': '32rpx',
'font-weight': 'bold', 'font-weight': 'bold',
'margin-left': '50rpx' 'margin-left': '50rpx'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '300rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold',
'margin-left': '50rpx'
} }
}, },
customStyle() { customStyle() {
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<text class="cell-title">充电桩信息:</text> <text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
<!-- <view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<!-- <view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<text>备注:</text> <text>备注:</text>
...@@ -118,7 +119,7 @@ ...@@ -118,7 +119,7 @@
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime" class="time-view"> <view v-if="order.currentOverTime" class="time-view">
<text>{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text> <text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
<u-count-down <u-count-down
:timestamp="timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
font-size="20" font-size="20"
...@@ -142,6 +143,7 @@ ...@@ -142,6 +143,7 @@
<view class="right"> <view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]"> <view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text> <text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -155,6 +157,11 @@ ...@@ -155,6 +157,11 @@
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue" import PopView from "@/components/popView/index.vue"
let now = Date.now() let now = Date.now()
let r = require("../../libs/bmap-wx.min.js");
let h = new r.BMapWX({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak: "lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
export default { export default {
components: { components: {
appointTime, appointTime,
...@@ -218,7 +225,16 @@ ...@@ -218,7 +225,16 @@
appointmentDatetimeRange:'', appointmentDatetimeRange:'',
appointmentDatetime:'', appointmentDatetime:'',
signDistance:3000, signDistance:3000,
contactAddressLongitud:0,
contactAddressLatitud:0,
num:0, num:0,
waterInfo: {
longitude: '', // 经度
latitude: '', // 维度
address: '', //地址
date: '', //日期
markImage: 'https://qn-static.banshouhui.com/live_mark.png'
}
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -233,6 +249,7 @@ ...@@ -233,6 +249,7 @@
this.getSignDistance() this.getSignDistance()
}, },
computed: { computed: {
phoneIcon() { phoneIcon() {
//self-support/icon/dianhua-0@2x.png //self-support/icon/dianhua-0@2x.png
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
...@@ -262,6 +279,31 @@ ...@@ -262,6 +279,31 @@
} }
}, },
methods: { methods: {
baiduLocation() {
// 百度sdk解析经纬度
let waterInfo = this.waterInfo
const t = function() {
let t = {
success: function(res) {
let e = res.wxMarkerData[0];
let i = e.address;
waterInfo.address = i
},
fail: function(err) {
console.log(err, 'err')
}
};
if (waterInfo.latitude && waterInfo.longitude) {
let e = waterInfo.latitude + "," + waterInfo.longitude;
t.location = e;
}
if(waterInfo.address){
t.address = waterInfo.address
}
h.geocoding(t);
};
t()
},
openLocation(){ openLocation(){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ uni.getLocation({
...@@ -319,7 +361,6 @@ ...@@ -319,7 +361,6 @@
this.takeStatus = false this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面, // 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成 if(img){ // 拍照完成
this.isErrorSign = true this.isErrorSign = true
this.errorSignUrl = process.uniEnv.qn_asset_url +img[img.length-1].key this.errorSignUrl = process.uniEnv.qn_asset_url +img[img.length-1].key
this.handleBtn() this.handleBtn()
...@@ -340,6 +381,7 @@ ...@@ -340,6 +381,7 @@
if (res.code == 200) { if (res.code == 200) {
self.order = res.data self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
self.timeOutChange(self.order.currentOverTime)
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
this.visibale = true this.visibale = true
} }
...@@ -426,7 +468,22 @@ ...@@ -426,7 +468,22 @@
console.log(data,'timeChange') console.log(data,'timeChange')
this.appointmentDatetimeRange = data.item this.appointmentDatetimeRange = data.item
}, },
addressToCoordinate(){
let self = this
self.$u.api.addressToCoordinate(self.orderId).then((res) => {
if (res.code == 200) {
self.contactAddressLongitud=res.data.lng
self.contactAddressLatitud = res.data.lat
} else {
console.log(res.message);
}
})
},
getCurrentBtn() { getCurrentBtn() {
// this.waterInfo.address=this.order.contactProvinceText+this.order.contactCityText
// +this.order.contactCommunityText
// //+this.order.contactStreetText
// this.baiduLocation()
// 根据工单状态确定按钮的显示 // 根据工单状态确定按钮的显示
var orderStatus = this.order.orderStatus var orderStatus = this.order.orderStatus
// 业务类型 指派单/订单池 // 业务类型 指派单/订单池
...@@ -460,7 +517,9 @@ ...@@ -460,7 +517,9 @@
this.allowFeedback = true this.allowFeedback = true
this.showCenterBtn = true this.showCenterBtn = true
this.submitType = "maintainWorkerCheckin" this.submitType = "maintainWorkerCheckin"
this.isAllowDianhuaAndDaohang = true
this.errorSignIn = true this.errorSignIn = true
this.addressToCoordinate()
} else if (orderStatus > 31 && orderStatus < 80) { } else if (orderStatus > 31 && orderStatus < 80) {
// 完工 // 完工
this.centerButton = "filish" this.centerButton = "filish"
...@@ -469,7 +528,7 @@ ...@@ -469,7 +528,7 @@
this.allowFeedback = true this.allowFeedback = true
this.showCenterBtn = true this.showCenterBtn = true
this.scenePhoto = true this.scenePhoto = true
this.isAllowDianhuaAndDaohang = true
} else {} } else {}
}, },
handleBtn() { handleBtn() {
...@@ -496,7 +555,7 @@ ...@@ -496,7 +555,7 @@
}else if (this.submitType === 'maintainWorkerCheckin') { // 签到 }else if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合 // 检查见到距离是否符合
if(!this.isErrorSign){ if(!this.isErrorSign){
if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){ if(this.getDistance(this.contactAddressLatitud,this.contactAddressLongitud)>this.signDistance){
this.commonToast('签到失败,请点击异常签到处理或联系客服','error') this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
return return
} }
...@@ -505,7 +564,16 @@ ...@@ -505,7 +564,16 @@
data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:'' data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:''
data.url = this.errorSignUrl?this.errorSignUrl:'' data.url = this.errorSignUrl?this.errorSignUrl:''
}else if(this.submitType === 'toFilish'){ // 去完工 }else if(this.submitType === 'toFilish'){ // 去完工
this.filish() if (this.order.categoryName != '充电桩') {
uni.showModal({
title: '提示',
content: '非充电桩订单,请在扳手APP进行完工',
showCancel:false,
confirmText: '好的',
})
} else {
this.filish()
}
return return
} }
this.$u.api[this.submitType](data, this.order.orderId).then(res => { this.$u.api[this.submitType](data, this.order.orderId).then(res => {
...@@ -523,8 +591,8 @@ ...@@ -523,8 +591,8 @@
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.data.message!==undefined ? res.data.message:res.message, title: res.data.message!==undefined ? res.data.message:res.message,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default' // 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'error', type: 'warning',
callback: res.data.message==='该工单已被抢'?this.isGan():'' callback: res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():''
}) })
} }
}) })
...@@ -561,10 +629,14 @@ ...@@ -561,10 +629,14 @@
// 检查是否可以拒单 // 检查是否可以拒单
var data={} var data={}
this.$u.api.checkRejectable(data).then(res => { this.$u.api.checkRejectable(data).then(res => {
if (res.data.code === 200 && res.data.data === true) { if (res.data.code === 200 ) {
uni.navigateTo({ if( res.data.data === true){
url: 'pages/order/refuse?orderId='+this.order.orderId uni.navigateTo({
}) url: 'pages/order/refuse?orderId='+this.order.orderId
})
}else{
this.commonToast("本月无拒单机会,请联系客服","warning")
}
} }
}) })
}, },
...@@ -588,7 +660,7 @@ ...@@ -588,7 +660,7 @@
}); });
}, },
getDistance(Latitud, Longitud){ getDistance(Latitud, Longitud){
return this.distance(Latitud,Longitud,this.dataValue[0],this.dataValue[1]) return this.distance(Latitud,Longitud,this.dataValue[1],this.dataValue[0])
}, },
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
...@@ -599,16 +671,21 @@ ...@@ -599,16 +671,21 @@
* @param float $lat2 维度 * @param float $lat2 维度
* @return float 浮点数 * @return float 浮点数
*/ */
distance(la1, lo1, la2, lo2) { distance(lat1, lng1, lat2, lng2) {
var La1 = la1 * Math.PI / 180.0; console.log(lat1, lng1, lat2, lng2)
var La2 = la2 * Math.PI / 180.0; var radLat1 = this.Rad(lat1);
var La3 = La1 - La2; var radLat2 = this.Rad(lat2);
var Lb3 = lo1 * Math.PI / 180.0 - lo2 * Math.PI / 180.0; var a = radLat1 - radLat2;
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(La3 / 2), 2),Math.cos(La1) * Math.cos(La2) * Math.pow(Math.sin(Lb3 / 2), 2))); var b = this.Rad(lng1) - this.Rad(lng2);
s = s * 6378.137;//地球半径 var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
s = Math.round(s * 10000) / 10000; Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
console.log("计算结果",s,'KM'); s = s *6378.137 ;// EARTH_RADIUS;
return s?s.toFixed(2):0; s = Math.round(s * 10000)/10 ; //输出为米
console.log("计算结果",s,'M');
return s?s.toFixed(2):0;
},
Rad(d){
return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
}, },
timestampDiff(currentOverTime){ // 计算超时时间 timestampDiff(currentOverTime){ // 计算超时时间
if(!currentOverTime){ if(!currentOverTime){
......
...@@ -274,10 +274,16 @@ ...@@ -274,10 +274,16 @@
count += res.data[i] count += res.data[i]
} }
// 修改tab总数 // 修改tab总数
uni.setTabBarBadge({ if (count > 0) {
index: 1, uni.setTabBarBadge({
text: String(count) index: 1,
}) text: String(count)
})
} else {
uni.removeTabBarBadge({
index: 1
})
}
} }
} else { } else {
console.log(res.message, "获取订单数量失败!"); console.log(res.message, "获取订单数量失败!");
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
this.loading = true this.loading = true
let that = this let that = this
this.$u.cloudApi.getGroupStandardV2({ this.$u.cloudApi.getGroupStandardV2({
'token': getApp().globalData.token, 'token': this.vuex_token,
'classify_id': this.classifyId, 'classify_id': this.classifyId,
'system_id': this.systemId, 'system_id': this.systemId,
'brand_id': this.brandId 'brand_id': this.brandId
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
// 清除图片 // 清除图片
handleClickSure: function() { handleClickSure: function() {
this.$u.cloudApi.cleanImage({ this.$u.cloudApi.cleanImage({
'token': getApp().globalData.token, 'token': this.vuex_token,
}).then(res => { }).then(res => {
this.isPopShow = false this.isPopShow = false
if (res && res.result) { if (res && res.result) {
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
photo.currentItem = item photo.currentItem = item
photo.itemIndex = ikey photo.itemIndex = ikey
const len = item.orderImages.length const len = item.orderImages?item.orderImages.length:0
photo.currentItemLength = len > 9 ? 10 : len photo.currentItemLength = len > 9 ? 10 : len
uni.hideTabBar() uni.hideTabBar()
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
this.standardId = e.standardId this.standardId = e.standardId
} }
this.token = getApp().globalData.token this.token = this.vuex_token
}, },
methods: { methods: {
// 保存照片到本地 // 保存照片到本地
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据 // this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true this.loading = true
this.$u.cloudApi.getUserWatermark({ this.$u.cloudApi.getUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'system_id': this.systemId 'system_id': this.systemId
}).then(res => { }).then(res => {
if (res && res.result) { if (res && res.result) {
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
saveUserWatermark: function() { saveUserWatermark: function() {
this.loading = true this.loading = true
this.$u.cloudApi.saveUserWatermark({ this.$u.cloudApi.saveUserWatermark({
'token': getApp().globalData.token, 'token': this.vuex_token,
'watermark': this.result 'watermark': this.result
}).then(res => { }).then(res => {
if (res.result.code == true) { if (res.result.code == true) {
......
...@@ -360,7 +360,7 @@ ...@@ -360,7 +360,7 @@
return; return;
} }
uni.showToast({ uni.showToast({
title: '入驻基本信息提交成功', title: '提交成功',
icon: 'success' icon: 'success'
}); });
let timer = setTimeout(() => { let timer = setTimeout(() => {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
></image> ></image>
</view> </view>
<view class="card-info-view" v-if="index == 0 <view class="card-info-view" v-if="index == 0
&& ((fileInfo.id_card_name || fileInfo.id_card_number || fileInfo.id_card_date) || frontErrorMsg || backErrorMsg)"> && ((fileInfo.id_card_name || fileInfo.id_card_number || fileInfo.id_card_expire) || frontErrorMsg || backErrorMsg)">
<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>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="card-item-error" v-if="((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)">{{ frontErrorMsg }}</view> <view class="card-item-error" v-if="((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 class="card-item-error" v-if="(cardkey == 'id_card_expire' && backErrorMsg)">{{ backErrorMsg }}</view>
</view> </view>
</view> </view>
<view v-if="index == 0" class="bottom-tip-view"> <view v-if="index == 0" class="bottom-tip-view">
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
id: "", id: "",
id_card_name: "", id_card_name: "",
id_card_number: "", id_card_number: "",
id_card_date: '', id_card_expire: '',
id_card_front: "", id_card_front: "",
id_card_back: "", id_card_back: "",
electrician_certificate: "", electrician_certificate: "",
...@@ -221,7 +221,7 @@ export default { ...@@ -221,7 +221,7 @@ export default {
return { return {
'id_card_name': '姓名', 'id_card_name': '姓名',
'id_card_number': '身份证号', 'id_card_number': '身份证号',
'id_card_date': '有效期' 'id_card_expire': '有效期'
} }
}, },
anquanImage() { anquanImage() {
...@@ -407,9 +407,9 @@ export default { ...@@ -407,9 +407,9 @@ export default {
res.data.id_card_number || ""; res.data.id_card_number || "";
this.frontErrorMsg = (!this.fileInfo.id_card_name || !this.fileInfo.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_expire = res.data.id_card_expire || "";
this.fileInfo.id_card_back_check = true; this.fileInfo.id_card_back_check = true;
this.backErrorMsg = !this.fileInfo.id_card_date ? "识别失败,请重新上传" : '' this.backErrorMsg = !this.fileInfo.id_card_expire ? "识别失败,请重新上传" : ''
} }
}, },
checkFileInfo() { checkFileInfo() {
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
function uploadURLFromRegionCode(code) { function uploadURLFromRegionCode(code) {
var uploadURL = null; var uploadURL = null;
switch (code) { switch (code) {
case 'ECN': uploadURL = 'https://up.qbox.me'; break; case 'ECN': uploadURL = 'https://upload.qiniup.com'; break;
case 'NCN': uploadURL = 'https://up-z1.qbox.me'; break; case 'NCN': uploadURL = 'https://up-z1.qbox.me'; break;
case 'SCN': uploadURL = 'https://up-z2.qbox.me'; break; case 'SCN': uploadURL = 'https://up-z2.qbox.me'; break;
case 'NA': uploadURL = 'https://up-na0.qbox.me'; break; case 'NA': uploadURL = 'https://up-na0.qbox.me'; break;
......
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