|
|
@@ -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> |