Bläddra i källkod

上传安装照片

master
@weixixuan 1 dag sedan
förälder
incheckning
b1bdb1fdd9

+ 50
- 3
subpackage/after-sale/activation/operation-upload.vue Visa fil

@@ -14,6 +14,20 @@
</image>
</view>
</view>
<view class="item-row" v-if="state.orderDetail.promotionModes == 1">
<view class="item-left">
<view class="title">安装照</view>
<view class="desc">上传安装照片</view>
<view class="flag"><text>拍摄示例</text> </view>
</view>
<view class="item-right" @click="chooseImage">
<image v-if="state.installPhoto" :src="getFullImageUrl(state.installPhoto)" mode="aspectFill"></image>
<image v-else :src="defInstallImg" mode="aspectFill"></image>
</view>
</view>
<view class="hint" style="margin-top: 40rpx;">
<image :src="`${$imgUrl}common/icon-hint.png`" class="icon"></image>
<view>请打开手机蓝牙后再进行下一步操作。</view>
@@ -67,7 +81,8 @@
import {
msg,
navTo,
uploadFile
uploadFile,
getFullImageUrl
} from '@/utils/utils';
import {
fileURL
@@ -80,7 +95,7 @@
requestNew
} from "@/utils/network/request.js";
import {
activeImgUpload,orderDetailQuery
activeImgUpload,orderDetailQuery, issueUploadInstallPhoto
} from "@/utils/network/api.js";
import {
onLoad
@@ -89,6 +104,7 @@
const height = uni.getSystemInfoSync().windowHeight

const defHeadstockImg = imgURL + "issuance/chetou.png";
const defInstallImg = imgURL + "bluetooth/device-active-img2.png";

const state = reactive({
headstockImg: null, //车头照
@@ -96,7 +112,9 @@
orderId: null,
openId: null,
transfer: 0,
isAfter: ''
isAfter: '',
installPhoto: null,
orderDetail: {}
});
onLoad((option) => {
//读取传入 存储的数据orderInfo
@@ -128,12 +146,17 @@
state.disabled = false
requestNew(orderDetailQuery, options).then((res) => {
console.log("orderInfo", res);
state.orderDetail = res
state.headstockImg='https://qtzl.etcjz.cn/'+res['vehBodyUrl']
});
};

//下一步
const gotoNextStep = () => {
if (state.orderDetail.promotionModes == 1 && !state.installPhoto) {
msg('请上传安装照片')
return
}
uni.openBluetoothAdapter()
/* 判断是否打开蓝牙 */
uni.getBluetoothAdapterState({
@@ -152,6 +175,30 @@
}
})
}
//选择图片
const chooseImage = () => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success: (res) => {
uploadFile(res.tempFilePaths[0], 100).then((uploadRes) => {
state.installPhoto = uploadRes.imageUrl
let option = {
type: 2,
data: {
orderNo: state.orderId,
url: state.installPhoto
},
method: "POST",
showLoading: true,
}
requestNew(issueUploadInstallPhoto, option)
})
}
})
}
</script>

<style>

+ 3
- 10
subpackage/orders/car-release.vue Visa fil

@@ -678,16 +678,9 @@
// }
// });
// 线上申请需要填写安装照片
if (orderInfo && orderInfo.promotionModes == '1') {
navTo(
`/subpackage/orders/device-install-photo?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
);
} else {
navTo(
`/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
);
}
navTo(
`/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
);
}
}

Laddar…
Avbryt
Spara