Commit cc003ba0 authored by lei's avatar lei

fix:商户详情的图片预览,隐患列表的点击穿透。

parent 49912ae1
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
v-for="(imgItem, subIndex) in formData.photos" v-for="(imgItem, subIndex) in formData.photos"
:src="imgItem" :src="imgItem"
alt="" alt=""
@click="showImage(formData.photos, subIndex)"
style="width: 1.4rem; height: 1.4rem; margin-right: 0.2rem" style="width: 1.4rem; height: 1.4rem; margin-right: 0.2rem"
/> />
</div> </div>
......
var VUE = null var VUE = null
window.addEventListener('load', function () { window.addEventListener('load', function () {
// 在原有Vue实例中添加 // 在原有Vue实例中添加
VUE = new Vue({ VUE = new Vue({
el: '#app', el: '#app',
data() { data() {
return { return {
formData: { formData: {
}, },
} }
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.detail() this.detail()
}, },
methods: { methods: {
detail() { detail() {
vant.Toast.loading({ vant.Toast.loading({
message: '正在加载...', message: '正在加载...',
forbidClick: true, forbidClick: true,
loadingType: 'spinner', loadingType: 'spinner',
}); });
http2.post({ http2.post({
serviceId: API_KEY_MAP["no-page"]['id'], serviceId: API_KEY_MAP["no-page"]['id'],
interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"], interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"], interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: { reqParams: {
sign: 19, sign: 19,
"feedbackId": gemhoUtil.getParameter('id'), "feedbackId": gemhoUtil.getParameter('id'),
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.detail() this.detail()
}, 0); }, 0);
return return
} }
if (res) { if (res) {
console.log('接口回调数据=建议详情', JSON.parse(res)) console.log('接口回调数据=建议详情', JSON.parse(res))
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
vant.Toast.clear() vant.Toast.clear()
}) })
}, 0); }, 0);
var result = JSON.parse(res) var result = JSON.parse(res)
this.formData = result.data this.formData = result.data
} }
}) })
}, },
}, showImage(list, index) {
}) vant.ImagePreview({
images: list,
startPosition: index,
closeable: true,
});
},
},
})
}) })
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</van-tabs> </van-tabs>
<!-- 隐患列表 --> <!-- 隐患列表 -->
<van-list> <van-list>
<van-cell v-for="item in filteredHazards" :key="item.id" > <van-cell v-for="item in filteredHazards" :key="item.id" @click="viewDetail(item,'YH_XQ')">
<div style="width: 100%;"> <div style="width: 100%;">
<!-- 第一行:隐患描述 --> <!-- 第一行:隐患描述 -->
<div style=" <div style="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment