From b74be18bef977fbeefb7d13e16f432fed47966b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 14 Nov 2023 11:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=82=A3=E8=80=85=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/information/information.vue | 53 +++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/pages/information/information.vue b/pages/information/information.vue index a2a2fd9..ab57518 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -39,8 +39,11 @@ + 附件文件 - + + + @@ -49,33 +52,49 @@ import { consultationlnfo, } from '@/api/seekadvicefrom/seekadvicefrom.js'; + import baseurl from '@/api/baseurl.js' export default { data() { return { + baseurl: '', id: '', list: [], status: '', + fileUrls: [], + url: [], } }, onLoad(options) { - console.log(options, '859') + this.baseurl = baseurl; this.id = options.item this.status = uni.getStorageInfoSync('status') this.info() }, methods: { + clickImg() { + uni.previewImage({ + urls: this.url, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了 + current: '', // 当前显示图片的http链接,默认是第一个 + success: function(res) {}, + fail: function(res) {}, + complete: function(res) {}, + }) + }, + back() { uni.navigateBack({ delta: 1 }) }, info() { + this.url = [] consultationlnfo(this.id).then(res => { - console.log(res) + res.data.fileUrls.forEach(e => { + this.url.push(baseurl + e) + }) this.list = res.data }) }, - }, } @@ -125,14 +144,28 @@ height: 600rpx; background-color: #fff; line-height: 120rpx; - position: relative; + // background-color: red; + // position: relative; - image { - position: absolute; - top: 20%; - width: 300rpx; - height: 300rpx; + .imageitem { + width: 100%; + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + align-items: center; + // position: absolute; + + image { + display: inline-block; + // position: absolute; + // left: 0%; + // top: 20%; + width: 33%; + height: 200rpx; + } } + + } .content {