@@ -40,7 +40,7 @@ | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(1)"> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(99)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 车头照 </view> | |||
@@ -235,7 +235,7 @@ | |||
<view | |||
class="picture-wrapper" | |||
v-if="state.form.useUserType != 0" | |||
@click="cardFileImageUpdate(2)" | |||
@click="cardFileImageUpdate(101)" | |||
> | |||
<view class="bg"> | |||
<view class=""> | |||
@@ -309,7 +309,7 @@ | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(10)"> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(100)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 委托书 </view> | |||
@@ -375,7 +375,7 @@ | |||
:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(10)"> | |||
<view class="picture-wrapper" v-if="state.userType == 'PERSONAL_USER'" @click="cardFileImageUpdate(100)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 委托书 </view> | |||
@@ -831,15 +831,15 @@ | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
uploadFile(res.tempFilePaths[0], val).then((data : any) => { | |||
if (val == 1) { | |||
if (val == 99) { | |||
state.form.vehBodyUrl = data.imageUrl; | |||
state.form.vehBodyUrlName = data.imageName; | |||
} else if (val == 10) { | |||
state.form.vehBodyUrlName = res.tempFilePaths[0]; | |||
} else if (val == 100) { | |||
state.form.proxyUrl = data.imageUrl; | |||
state.form.proxyUrlName = data.imageName; | |||
} else { | |||
state.form.proxyUrlName = res.tempFilePaths[0]; | |||
} else if (val == 101){ | |||
state.form.roadTransportPermitPicUrl = data.imageUrl; | |||
state.form.roadTransportPermitPicUrlName = data.imageName; | |||
state.form.roadTransportPermitPicUrlName = res.tempFilePaths[0]; | |||
} | |||
}) | |||
}, |
@@ -401,6 +401,7 @@ | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
console.log("上传本地",res); | |||
state.form.proxyUrlName = res.tempFilePaths[0]; | |||
uploadFile(res.tempFilePaths[0], val).then((data) => { | |||
// state.form.proxyUrl = data; |
@@ -532,50 +532,15 @@ export const uploadFile = (tempImagePath, imageType) => { | |||
}, | |||
success: (uploadFileRes) => { | |||
console.log("uploadFileRes", uploadFileRes, JSON.parse(uploadFileRes.data).data.ossFilePath) | |||
// let uploadFileImage = 'http://100.64.2.113:9000' + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
// console.log("111", JSON.parse(uploadFileRes.data).data.ossFilePath,JSON.parse(uploadFileRes.data)); | |||
// var data={} | |||
// if (code == "/iaw/txOcr/idCardOcr") { //身份证 imageType 1 2 | |||
// data = { | |||
// source: "1", | |||
// agencyId: agentId, | |||
// imageType: imageType, | |||
// fileName: tempImagePath, | |||
// url: uploadFileImage | |||
// }; | |||
// } else if (code == "/iaw/txOcr/vehicleLicenseOcr") { //行驶证 imageType 1正 2反 | |||
// data = { | |||
// source: "1", | |||
// agencyId: agentId, | |||
// imageType: imageType, | |||
// fileName: tempImagePath, | |||
// imageUrl: uploadFileImage | |||
// }; | |||
// } else if (code == "") { //委托书 车头照 17 | |||
// let uploadFileImage = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
// console.log("17", uploadFileImage) | |||
// resolve(uploadFileImage) | |||
// return; | |||
// } else if (code == '/iaw/txOcr/businessLicenseOcr') { //营业执照 | |||
// data = { | |||
// type: 'business_license', | |||
// url: uploadFileImage, | |||
// agencyId: agentId, | |||
// fileName: tempImagePath, | |||
// }; | |||
// console.log("91", uploadFileImage) | |||
// } | |||
if (parseInt(imageType) >= 99) { | |||
resolve({ imageUrl: JSON.parse(uploadFileRes.data).data.ossFilePath }) | |||
return | |||
} | |||
const magType = imageType == 10?1:imageType; | |||
const options = { | |||
type: 2, | |||
data: { | |||
type: magType, | |||
type: imageType, | |||
imagePath: JSON.parse(uploadFileRes.data).data.ossFilePath, | |||
}, | |||
method: "POST", |