Browse Source

新增车牌占用手机验证界面

yxb
zengyuehua 2 years ago
parent
commit
658a52957b
4 changed files with 95 additions and 12 deletions
  1. 83
    7
      after-sale/rescind-carId/rescind-carId-select.vue
  2. 1
    1
      manifest.json
  3. 7
    0
      pages.json
  4. 4
    4
      utils/util/fileData.js

+ 83
- 7
after-sale/rescind-carId/rescind-carId-select.vue View File

<view class="tip-value"> 拍摄规范 </view> <view class="tip-value"> 拍摄规范 </view>
</view> </view>
</view> </view>
<image v-if="!state.form.vehBodyUrl" class="icon" :src="`${$imgUrl}applyCard/chetou.png`">
<image v-if="!state.FormData.peopleVehicleImgUrl" class="icon" :src="`${$imgUrl}applyCard/chetou.png`">
</image> </image>
<image v-else class="icon" :src="state.form.vehBodyUrl"></image>
<image v-else class="icon" :src="state.FormData.peopleVehicleImgUrl"></image>
</view> </view>
</view> </view>
<view class="shibie-wrapper"> <view class="shibie-wrapper">
<u-input v-model="state.form.vehicleId" /> <u-input v-model="state.form.vehicleId" />
</u-form-item> </u-form-item>
<u-form-item label="车牌颜色"> <u-form-item label="车牌颜色">
<u-input v-model="state.form.man" />
<u-input v-model="state.form.caridCorlor" type="select" @click="show1 = true" />
</u-form-item> </u-form-item>
<!-- <u-form-item label="所有人"> <!-- <u-form-item label="所有人">
<u-input v-model="state.form.man" /> <u-input v-model="state.form.man" />
下一步 下一步
</button> </button>
</view> </view>
<!-- 选择车牌颜色 -->
<u-select v-model="show1" :list="state.actionSheetList" @confirm="selectConfirm"></u-select>
</view> </view>
</template> </template>


import { import {
request request
} from "@/utils/network/request.js"; } from "@/utils/network/request.js";

import {
getItem
} from "@/utils/storage.ts"
import { import {
stringToJson stringToJson
} from "@/utils/network/encryption"; } from "@/utils/network/encryption";


// ###################### // ######################



const show1 = ref(false)
const state = reactive({ const state = reactive({
ocrData: { ocrData: {
name: "", name: "",
tmerValidity: "", tmerValidity: "",
}, },
form: { form: {
caridCorlor:"",//车牌颜色
userName: "", //开户人姓名 userName: "", //开户人姓名
userIdNum: "", //用户证件号码 userIdNum: "", //用户证件号码
userPosImgUrl: "", //身份证正面 userPosImgUrl: "", //身份证正面
card: "23728347626342332", card: "23728347626342332",
phone: "", phone: "",
}, },
actionSheetList: [{
label: "蓝色",
value: 0,
}, {
label: "黄色",
value: 1,
},
{
label: "黑色",
value: 2,
},
{
label: "白色",
value: 3,
},
{
label: "渐变绿色",
value: 4,
},
{
label: "黄绿双拼色",
value: 5,
},
{
label: "蓝白渐变色",
value: 6,
},
{
label: "未确定",
value: 9,
},
{
label: "绿色",
value: 11,
},
{
label: "红色",
value: 12,
},
],
FormData: {
vehiclePlate: '',
vehiclePlatecolor: '',
openid: getItem('openId'),
idcardFrontImgUrl: '',
idcardBacktImgUrl: '',
vehPosImgUrl: '',
vehNegImgUrl: '',
peopleVehicleImgUrl: '',
commitmentUrl: '',
mobile: '',
code: ''
}
}); });
const savaHandle = () => { const savaHandle = () => {
navTo("/after-sale/rescind-carId/result");
navTo("/after-sale/rescind-carId/verification");




console.log(state.form);
console.log(state.FormData);
// var data = state.form // var data = state.form
// const options = { // const options = {
// type: 2, // type: 2,


// }) // })
}; };

const selectConfirm = (item: any) => {
console.log(item);
state.FormData.vehiclePlatecolor=item[0].value
state.form.caridCorlor=item[0].label
};

const cardFileImageUpdate = () => { const cardFileImageUpdate = () => {
uni.chooseImage({ uni.chooseImage({
count: 1, //只能选取一张照片 count: 1, //只能选取一张照片
request(fileUpload, options).then((res) => { request(fileUpload, options).then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
console.log(data); console.log(data);
state.form.vehBodyUrl = data.data.url;
state.FormData.peopleVehicleImgUrl = data.data.url;
}); });
}) })
.catch((error) => {}); .catch((error) => {});
state.form.issueDate = data.issue; state.form.issueDate = data.issue;
state.form.vehPosImgUrl = data.imageUrl; state.form.vehPosImgUrl = data.imageUrl;
state.form.vehicleModel = data.model; state.form.vehicleModel = data.model;

state.FormData.vehiclePlate = data.plate_a
state.FormData.vehPosImgUrl = data.imageUrl
} else { } else {
state.form.approvedCount = parseFloat(data.apc); state.form.approvedCount = parseFloat(data.apc);
state.form.maintenaceMass = parseFloat(data.unladen); state.form.maintenaceMass = parseFloat(data.unladen);
state.form.vehicleDimensions = data.overall; state.form.vehicleDimensions = data.overall;
state.form.totalMass = parseFloat(data.gross); state.form.totalMass = parseFloat(data.gross);
state.form.vehNegImgUrl = data.imageUrl; state.form.vehNegImgUrl = data.imageUrl;

state.FormData.vehNegImgUrl = data.imageUrl
} }
}); });
}) })
state.form.userIdNum = data.idno; state.form.userIdNum = data.idno;
state.form.userPosImgUrl = data.imageUrl; state.form.userPosImgUrl = data.imageUrl;
state.form.address = data.address; state.form.address = data.address;

state.FormData.idcardFrontImgUrl = data.imageUrl
} else { } else {
state.form.tmerValidity = data.begindate + "-" + data.enddate; state.form.tmerValidity = data.begindate + "-" + data.enddate;
state.form.userNegImgUrl = data.imageUrl; state.form.userNegImgUrl = data.imageUrl;

state.FormData.idcardBacktImgUrl = data.imageUrl
} }
}); });
}) })

+ 1
- 1
manifest.json View File

"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx008c60533388527a",
"appid" : "wx214b4f8de36a0181",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"checkSiteMap" : false, "checkSiteMap" : false,

+ 7
- 0
pages.json View File

"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "rescind-carId/verification",
"style": {
"navigationBarTitleText": "验证",
"enablePullDownRefresh": false
}
},
{ {
"path": "rescind-carId/base-change-people", "path": "rescind-carId/base-change-people",
"style": { "style": {

+ 4
- 4
utils/util/fileData.js View File

import {
TextEncoder,
TextDecoder
} from "text-decoding";
// import {
// TextEncoder,
// TextDecoder
// } from "text-decoding";




export function IntegerToHexString(num, nLen) { export function IntegerToHexString(num, nLen) {

Loading…
Cancel
Save