1. 修改人脸问题

2. 车辆照片key问题修改
dev-2.0
Shan Ao 2025-07-31 11:34:57 +08:00
parent 9c42d4c8df
commit cfe4328551
2 changed files with 21 additions and 15 deletions

View File

@ -48,7 +48,7 @@
<view slot="title" class="title">行驶证照片</view> <view slot="title" class="title">行驶证照片</view>
<view slot="label" class="mt-10"> <view slot="label" class="mt-10">
<view style="display: flex;flex-wrap: wrap"> <view style="display: flex;flex-wrap: wrap">
<view v-for="item in info.drivingImgs" :key="item" class="ml-10 mt-10"> <view v-for="(item, index) in info.drivingImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px" <u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px"
@click="previewImage(item.FILEPATH, info.drivingImgs)"></u--image> @click="previewImage(item.FILEPATH, info.drivingImgs)"></u--image>
</view> </view>
@ -59,7 +59,7 @@
<view slot="title" class="title">车辆照片</view> <view slot="title" class="title">车辆照片</view>
<view slot="label" class="mt-10"> <view slot="label" class="mt-10">
<view style="display: flex;flex-wrap: wrap"> <view style="display: flex;flex-wrap: wrap">
<view v-for="item in info.vehicleImgs" :key="item" class="ml-10 mt-10"> <view v-for="(item, index) in info.vehicleImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px" <u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px"
@click="previewImage(item.FILEPATH, info.vehicleImgs)"></u--image> @click="previewImage(item.FILEPATH, info.vehicleImgs)"></u--image>
</view> </view>
@ -103,6 +103,8 @@ export default {
async getData() { async getData() {
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID }); const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID });
this.info = resData.pd; this.info = resData.pd;
this.info.portId = parseInt(resData.pd.portId);
this.info.LICENCE_TYPE = parseInt(resData.pd.LICENCE_TYPE);
for (let i = 0; i < resData.pd.drivingImgs?.length; i++) { for (let i = 0; i < resData.pd.drivingImgs?.length; i++) {
this.info.drivingImgs[i].FILEPATH = this.$store.state.filePath + resData.pd.drivingImgs[i].filepath; this.info.drivingImgs[i].FILEPATH = this.$store.state.filePath + resData.pd.drivingImgs[i].filepath;
} }

View File

@ -5,8 +5,18 @@
</view> </view>
<view class="livefater"> <view class="livefater">
<view style="width: 700upx; height: 700upx; border-radius: 700upx; overflow: hidden"> <view style="width: 700upx; height: 700upx; border-radius: 700upx; overflow: hidden">
<live-pusher id="livePusher" ref="livePusher" class="livePusher" url="" mode="SD" :muted="true" <live-pusher
:enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2" aspect="1:1" /> id="livePusher"
ref="livePusher"
class="livePusher"
url=""
mode="SD"
:muted="true"
:enable-camera="true"
:auto-focus="true"
:beauty="1"
whiteness="2"
aspect="1:1" />
</view> </view>
<cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image> <cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image>
</view> </view>
@ -19,9 +29,7 @@
<script> <script>
import { import {
submitEditUserFace, submitEditUserFace
compareUserFaceCertify,
compareUserExamFaceCertify
} from '@/api'; } from '@/api';
export default { export default {
@ -77,14 +85,10 @@
// 获取 base 64 图片的二进制到文本 // 获取 base 64 图片的二进制到文本
const USERAVATARURL = speech.substring(speech.indexOf('base64,') + 7) const USERAVATARURL = speech.substring(speech.indexOf('base64,') + 7)
try { try {
// TODO USERAVATARPREFIX USERAVATARURL
// 调用 API 提交人脸图片 // 调用 API 提交人脸图片
const fullBase64 = USERAVATARPREFIX + USERAVATARURL; await submitEditUserFace({ USERAVATARPREFIX, USERAVATARURL, userId: this.$store.getters.getUserInfo.USER_ID });
console.log(fullBase64) uni.hideLoading();
console.log(this.$store.getters.getUserInfo.USER_ID) uni.$u.toast('上传成功');
const res = await submitEditUserFace({ faceData: fullBase64, userId: this.$store.getters.getUserInfo.USER_ID });
uni.hideLoading();
uni.$u.toast('上传成功');
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });
} catch (e) { } catch (e) {
if (e && e.msg) { if (e && e.msg) {