"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], | "requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], | ||||
"plugins": { | "plugins": { | ||||
"issuer-plugin": { | "issuer-plugin": { | ||||
"version": "dev-0ad154db3153bbeeb43fbf55b2012846", | |||||
"version": "dev-07f01f43a2c98f29fd406c2906ed3d1b", | |||||
"provider": "wxa2d9acdd1054e69b" | "provider": "wxa2d9acdd1054e69b" | ||||
} | } | ||||
} | } |
} from "@/datas/fileURL.js"; | } from "@/datas/fileURL.js"; | ||||
import { | import { | ||||
navTo, | navTo, | ||||
confirm, | |||||
msg, | msg, | ||||
noticeUser | noticeUser | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; |
<view> | <view> | ||||
用户证件号: | 用户证件号: | ||||
</view> | </view> | ||||
<text>{{state.data.customerIdnum}}</text> | |||||
<text>{{desensitization(state.data.customerIdnum)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> | <view> | ||||
ref | ref | ||||
} from "vue" | } from "vue" | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, |
sourceType: ["album"], //从相册选择 | sourceType: ["album"], //从相册选择 | ||||
success: function (res) { | success: function (res) { | ||||
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | ||||
compressImage(res.tempFilePaths[0], (res) => { | |||||
// compressImage(res.tempFilePaths[0], (res) => { | |||||
console.log("过来了", res) | console.log("过来了", res) | ||||
if (state.choiceIndex == 3 || state.choiceIndex == 4) { | if (state.choiceIndex == 3 || state.choiceIndex == 4) { | ||||
state.showImg = false | state.showImg = false | ||||
state.images = res.tempFilePath | |||||
state.images = res.tempFilePaths[0] | |||||
state.phoneType = state.choiceIndex | state.phoneType = state.choiceIndex | ||||
state.isTakePhotoModeShow = false | state.isTakePhotoModeShow = false | ||||
return | return | ||||
} | } | ||||
}) | |||||
// }) | |||||
}, | }, | ||||
}) | }) | ||||
} | } |
ids = option.id; | ids = option.id; | ||||
//请求订单详情 | //请求订单详情 | ||||
queryOrderDetail(option.id); | queryOrderDetail(option.id); | ||||
// uni.$on('bluetoothLink', res => { | |||||
// console.log(res,'===========123'); | |||||
// if (res.status) { | |||||
// // getCardRenewal() | |||||
// setTimeout(()=>{ | |||||
// getObuId() | |||||
// }) | |||||
// } | |||||
// //移除监听 | |||||
// console.log('======移除监听======', res) | |||||
// // uni.$off('bluetoothLink') | |||||
// }) | |||||
if (opn.state) { | if (opn.state) { | ||||
getObuId() | getObuId() |
ref | ref | ||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
formatTime, | |||||
expireDate, | |||||
expireDate2, | |||||
getFormatDate, | |||||
msg, | msg, | ||||
navTo, | navTo, | ||||
strReplace, | strReplace, | ||||
uploadFile | |||||
uploadFile, | |||||
desensitization | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, onShow | onLoad, onShow | ||||
return; | return; | ||||
} | } | ||||
console.log("state.form.vehicleIdNum", state.form.vehicleIdNum, state.form.vehicleIdNumB, orderInfos.vehiclePlate) | console.log("state.form.vehicleIdNum", state.form.vehicleIdNum, state.form.vehicleIdNumB, orderInfos.vehiclePlate) | ||||
if (state.form.vehicleIdNum == orderInfos.vehiclePlate) { | |||||
if (state.form.vehicleIdNumB == orderInfos.vehiclePlate) { | |||||
// if (state.form.vehicleIdNum == orderInfos.vehiclePlate) { | |||||
// if (state.form.vehicleIdNumB == orderInfos.vehiclePlate) { | |||||
activationRecordQuery().then((val) => { | activationRecordQuery().then((val) => { | ||||
console.log("激活次数", val) | console.log("激活次数", val) | ||||
if (val.limit) { | if (val.limit) { | ||||
msg("一年内到达激活次数上限5次") | msg("一年内到达激活次数上限5次") | ||||
} | } | ||||
}); | }); | ||||
} else { | |||||
msg("请上传正确行驶证副页") | |||||
} | |||||
} else { | |||||
msg("请上传正确行驶证") | |||||
} | |||||
// } else { | |||||
// msg("请上传正确行驶证副页") | |||||
// } | |||||
// } else { | |||||
// msg("请上传正确行驶证") | |||||
// } | |||||
}; | }; | ||||
//获取订单详情 | //获取订单详情 | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.customerName = orderInfo.customerName; | orderInfos.customerName = orderInfo.customerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.ownerIdnum = orderInfo.ownerIdnum; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | ||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; |
<text>OBU号</text> | <text>OBU号</text> | ||||
<text>{{ fileDataStrings.obuId }}</text> | <text>{{ fileDataStrings.obuId }}</text> | ||||
</view> | </view> | ||||
<view class="info_plate"> | |||||
<text>收费车型</text> | |||||
<text>{{ fileDataStrings.vehicleClassStr }}</text> | |||||
</view> | |||||
</view> | </view> | ||||
<view class="up_btn" v-if="state.showBtn"> | <view class="up_btn" v-if="state.showBtn"> | ||||
<button aria-disabled="true" @click="btn" v-if="!state.isSuccess" :disabled="!state.disabled" | <button aria-disabled="true" @click="btn" v-if="!state.isSuccess" :disabled="!state.disabled" | ||||
vehiclePlateColorStr: "", | vehiclePlateColorStr: "", | ||||
customerTel: "", | customerTel: "", | ||||
customerId: "", | customerId: "", | ||||
orderId: "" | |||||
orderId: "", | |||||
vehicleClassStr:"" | |||||
}); | }); | ||||
function cmdResult() { | function cmdResult() { | ||||
console.log("在线激活 请求",datas); | console.log("在线激活 请求",datas); | ||||
tools.showLoadingAlert("执行指令"); | tools.showLoadingAlert("执行指令"); | ||||
if (datas.stepNo == 100) { | if (datas.stepNo == 100) { | ||||
msg("激活成功") | |||||
msg("激活成功",{'icon':'success','duration':2000}) | |||||
setTimeout(() => { | setTimeout(() => { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | url: "/subpackage/after-sale/deviceInfo/deviceInfo", | ||||
}); | }); | ||||
}, 3000) | |||||
}, 2000) | |||||
} else { | } else { | ||||
console.log("datas.stepNo",datas.stepNo) | console.log("datas.stepNo",datas.stepNo) | ||||
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | ||||
fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo | fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo | ||||
.vehiclePlateColor); | .vehiclePlateColor); | ||||
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | ||||
fileDataStrings.vehicleClassStr = orderInfo.vehicleClassStr; | |||||
// let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor | // let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor | ||||
// searchVehicleInfoQuery(vehicleId).then((orderInfo) => { | // searchVehicleInfoQuery(vehicleId).then((orderInfo) => { | ||||
// console.log("orderInfo1111", orderInfo) | // console.log("orderInfo1111", orderInfo) | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
msg("激活成功") | |||||
msg("激活成功",{'icon':'success','duration':2000}) | |||||
setTimeout(() => { | setTimeout(() => { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | url: "/subpackage/after-sale/deviceInfo/deviceInfo", |
<view class="item-row"> | <view class="item-row"> | ||||
<view class="item-left"> | <view class="item-left"> | ||||
<view class="title">车头照</view> | <view class="title">车头照</view> | ||||
<view class="desc">上传汽车的车头照片</view> | |||||
<view class="desc">上传汽车的45度车头照片</view> | |||||
<view class="flag"><text>拍摄示例</text> </view> | <view class="flag"><text>拍摄示例</text> </view> | ||||
</view> | </view> | ||||
<view class="item-right" @click="chooseImage(1)"> | <view class="item-right" @click="chooseImage(1)"> |
<view> | <view> | ||||
用户证件号: | 用户证件号: | ||||
</view> | </view> | ||||
<text>{{state.data.customerIdnum}}</text> | |||||
<text>{{desensitization(state.data.customerIdnum)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> | <view> | ||||
ref | ref | ||||
} from "vue" | } from "vue" | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
ref | ref | ||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.customerName = orderInfo.customerName; | orderInfos.customerName = orderInfo.customerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.ownerIdnum = orderInfo.ownerIdnum; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | ||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; |
reactive | reactive | ||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.ownerName = orderInfo.ownerName; | orderInfos.ownerName = orderInfo.ownerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.ownerIdnum = orderInfo.ownerIdnum; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | ||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; |
<view> | <view> | ||||
用户证件号: | 用户证件号: | ||||
</view> | </view> | ||||
<text>{{state.data.customerIdnum}}</text> | |||||
<text>{{desensitization(state.data.customerIdnum)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> | <view> | ||||
ref | ref | ||||
} from "vue" | } from "vue" | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, |
obu.axleDistance = HexToInt(res.substring(44, 48)); | obu.axleDistance = HexToInt(res.substring(44, 48)); | ||||
obu.engineNum = HexToStrig(res.substring(86, 118)); | obu.engineNum = HexToStrig(res.substring(86, 118)); | ||||
obu.type = getVehicleType(HexToInt(res.substring(28, 30))); | obu.type = getVehicleType(HexToInt(res.substring(28, 30))); | ||||
obu.userType = HexToInt(res.substring(30, 32)) == 1 ? "个人用户" : | |||||
"单位用户"; | |||||
if(HexToInt(res.substring(30, 32)) == 0){ | |||||
obu.userType = "普通车" ; | |||||
}else if(HexToInt(res.substring(30, 32)) == 6){ | |||||
obu.userType = "公务车" ; | |||||
} | |||||
obu.vehiclePlate = HexToStrig(res.substring(0, 24), 2); | obu.vehiclePlate = HexToStrig(res.substring(0, 24), 2); | ||||
//获取车牌颜色 | //获取车牌颜色 | ||||
obu.vehiclePlateColor = getVehiclePlateColor(HexToInt(res | obu.vehiclePlateColor = getVehiclePlateColor(HexToInt(res | ||||
.substring(24, 28))); | .substring(24, 28))); | ||||
obu.vin = HexToStrig(res.substring(54, 86)); | obu.vin = HexToStrig(res.substring(54, 86)); | ||||
obu.wheelCount = HexToInt(res.substring(40, 42)); | obu.wheelCount = HexToInt(res.substring(40, 42)); | ||||
obu.outsideDimensions = HexToInt(res.substring(32, 36)) + "x" + | |||||
HexToInt(res.substring(36, 38)) + "x" + HexToInt(res | |||||
.substring(38, 40)) | |||||
obu.outsideDimensions = HexToInt(res.substring(32, 36))*100 + "x" + | |||||
HexToInt(res.substring(36, 38))*100 + "x" + HexToInt(res | |||||
.substring(38, 40))*100 | |||||
getObuList(); | getObuList(); | ||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); |
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
navTo, | navTo, | ||||
getFormatDate | |||||
getFormatDate, | |||||
desensitization | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.ownerName = orderInfo.ownerName; | orderInfos.ownerName = orderInfo.ownerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.ownerIdnum = orderInfo.ownerIdnum; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | ||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; |
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
navTo, | navTo, | ||||
getFormatDate | |||||
getFormatDate, | |||||
desensitization | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
orderInfos.orderId = orderInfo.orderId; | orderInfos.orderId = orderInfo.orderId; | ||||
orderInfos.ownerName = orderInfo.ownerName; | orderInfos.ownerName = orderInfo.ownerName; | ||||
orderInfos.ownerIdtype = orderInfo.ownerIdtype; | orderInfos.ownerIdtype = orderInfo.ownerIdtype; | ||||
orderInfos.ownerIdnum = orderInfo.ownerIdnum; | |||||
orderInfos.ownerIdnum = desensitization(orderInfo.ownerIdnum); | |||||
orderInfos.vehiclePlate = orderInfo.vehiclePlate; | orderInfos.vehiclePlate = orderInfo.vehiclePlate; | ||||
orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr; | ||||
orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; | orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor; |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
<view> | <view> | ||||
用户证件号: | 用户证件号: | ||||
</view> | </view> | ||||
<text>{{state.data.customerIdnum}}</text> | |||||
<text>{{desensitization(state.data.customerIdnum)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> | <view> | ||||
ref | ref | ||||
} from "vue" | } from "vue" | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
<view> | <view> | ||||
用户证件号: | 用户证件号: | ||||
</view> | </view> | ||||
<text>{{state.data.customerIdnum}}</text> | |||||
<text>{{desensitization(state.data.customerIdnum)}}</text> | |||||
</view> | </view> | ||||
<view class="details-item"> | <view class="details-item"> | ||||
<view> | <view> | ||||
ref | ref | ||||
} from "vue" | } from "vue" | ||||
import { | import { | ||||
navTo | |||||
navTo,desensitization | |||||
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> | ||||
sourceType: ["album"], //从相册选择 | sourceType: ["album"], //从相册选择 | ||||
success: function (res) { | success: function (res) { | ||||
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | ||||
compressImage(res.tempFilePaths[0], (res) => { | |||||
// compressImage(res.tempFilePaths[0], (res) => { | |||||
console.log("过来了", res) | console.log("过来了", res) | ||||
if (state.choiceIndex == 3 || state.choiceIndex == 4) { | if (state.choiceIndex == 3 || state.choiceIndex == 4) { | ||||
state.showImg = false | state.showImg = false | ||||
state.images = res.tempFilePath | |||||
state.images =res.tempFilePaths[0] | |||||
state.phoneType = state.choiceIndex | state.phoneType = state.choiceIndex | ||||
state.isTakePhotoModeShow = false | state.isTakePhotoModeShow = false | ||||
return | return | ||||
} | } | ||||
}) | |||||
// }) | |||||
}, | }, | ||||
}) | }) | ||||
} | } |
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | ||||
sourceType: ["album"], //从相册选择 | sourceType: ["album"], //从相册选择 | ||||
success: function (res) { | success: function (res) { | ||||
compressImage(res.tempFilePaths[0], (res) => { | |||||
// compressImage(res.tempFilePaths[0], (res) => { | |||||
console.log("过来了", res) | console.log("过来了", res) | ||||
// if (state.choiceIndex == 3 || state.choiceIndex == 4) { | |||||
// state.showImg = false | |||||
// state.images = res.tempFilePath | |||||
// state.phoneType = state.choiceIndex | |||||
// state.isTakePhotoModeShow = false | |||||
// return | |||||
// } | |||||
state.showImg = false | state.showImg = false | ||||
state.images = res.tempFilePath | |||||
state.images = res.tempFilePaths[0] | |||||
state.phoneType = state.choiceIndex | state.phoneType = state.choiceIndex | ||||
state.isTakePhotoModeShow = false | state.isTakePhotoModeShow = false | ||||
}) | |||||
// }) | |||||
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | ||||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | ||||
sourceType: ["album"], //从相册选择 | sourceType: ["album"], //从相册选择 | ||||
success: function (res) { | success: function (res) { | ||||
compressImage(res.tempFilePaths[0], (res) => { | |||||
// compressImage(res.tempFilePaths[0], (res) => { | |||||
console.log("过来了", res) | console.log("过来了", res) | ||||
state.showImg = false | state.showImg = false | ||||
state.images = res.tempFilePath | |||||
state.images = res.tempFilePaths[0] | |||||
state.phoneType = state.choiceIndex | state.phoneType = state.choiceIndex | ||||
state.isTakePhotoModeShow = false | state.isTakePhotoModeShow = false | ||||
}) | |||||
// }) | |||||
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | ||||
}, | }, |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
<view class="item-row"> | <view class="item-row"> | ||||
<view class="item-left"> | <view class="item-left"> | ||||
<view class="title">车头照</view> | <view class="title">车头照</view> | ||||
<view class="desc">上传汽车的车头照片</view> | |||||
<view class="desc">上传汽车的45度车头照片</view> | |||||
<view class="flag"><text>拍摄示例</text> </view> | <view class="flag"><text>拍摄示例</text> </view> | ||||
</view> | </view> | ||||
<view class="item-right" @click="chooseImage(1)"> | <view class="item-right" @click="chooseImage(1)"> |
<view class="bg"> | <view class="bg"> | ||||
<view class=""> | <view class=""> | ||||
<view class="name"> 车头照 </view> | <view class="name"> 车头照 </view> | ||||
<view class="value"> 上传汽车的车头照片 </view> | |||||
<view class="value"> 上传汽车的45度车头照片 </view> | |||||
<view class="tip"> | <view class="tip"> | ||||
<view class="tip-value"> 拍摄规范 </view> | <view class="tip-value"> 拍摄规范 </view> | ||||
</view> | </view> |
//根据订单类型获取订单类型文字 | //根据订单类型获取订单类型文字 | ||||
export const getOrderTypeName = (orderType) => { | export const getOrderTypeName = (orderType) => { | ||||
return OrderTypes[orderType]; | return OrderTypes[orderType]; | ||||
// switch (orderType) { | |||||
// case OrderTypes.REPLACEMENT_SIGNATURE: | |||||
// return '更换签'; | |||||
// break; | |||||
// case OrderTypes.REPLACEMENT_CARD: | |||||
// return '更换卡'; | |||||
// break; | |||||
// case OrderTypes.ISSUE: | |||||
// return '新办发行'; | |||||
// break; | |||||
// case OrderTypes.SUPPLEMENT_OBU: | |||||
// return '增补OBU'; | |||||
// break; | |||||
// case OrderTypes.OFFICAL_SUPPLEMENT_OBU: | |||||
// return '公务车增补OBU'; | |||||
// break; | |||||
// case OrderTypes.EXCHANGE_CARD_TYPE: | |||||
// return '储值卡转记账卡'; | |||||
// break; | |||||
// default: | |||||
// break; | |||||
// } | |||||
} | } | ||||
//根据车辆类型获取车辆名称 | //根据车辆类型获取车辆名称 | ||||
imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl); | imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl); | ||||
return imgUrl; | return imgUrl; | ||||
} | } | ||||
// 身份证号脱敏 | |||||
export const desensitization = (val) => { | |||||
if(val){ | |||||
return val.replace(/^\d{14}/,'**************'); | |||||
} | |||||
} | |||||
//查看大图 | //查看大图 | ||||
export const checkBigImg = (current, urls) => { | export const checkBigImg = (current, urls) => { | ||||
uni.previewImage({ | uni.previewImage({ |