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="label" class="mt-10">
<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"
@click="previewImage(item.FILEPATH, info.drivingImgs)"></u--image>
</view>
@ -59,7 +59,7 @@
<view slot="title" class="title">车辆照片</view>
<view slot="label" class="mt-10">
<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"
@click="previewImage(item.FILEPATH, info.vehicleImgs)"></u--image>
</view>
@ -103,6 +103,8 @@ export default {
async getData() {
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID });
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++) {
this.info.drivingImgs[i].FILEPATH = this.$store.state.filePath + resData.pd.drivingImgs[i].filepath;
}

View File

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