需求变更进行调整

This commit is contained in:
2026-01-30 09:01:38 +08:00
parent 44a4b33502
commit 79a21ff0a5
30 changed files with 1482 additions and 1707 deletions

View File

@@ -7,6 +7,10 @@
:show-with-animation="true"
:selectable="true"></u-parse>
</view>
<u-swiper :list="imgList" @change="change"></u-swiper>
<view v-for="(item,index) in attachments" :key="index">
<text @click="download(item)">{{ item.fileName }}</text>
</view>
</view>
</template>
@@ -16,7 +20,9 @@
return {
id:null,
title:'资讯',
content: ``
content: ``,
imgList:[],
attachments:[]
}
},
onLoad(option) {
@@ -31,8 +37,25 @@
if(res.flag) {
this.title = res.data.noticeTitle;
this.content = res.data.noticeContent;
if(res.data.imgs) {
const _this = this;
res.data.imgs.forEach(img=>{
_this.imgList.push(_this.$config.staticUrl + img)
})
}
this.attachments = res.data.attachments;
}
})
},
download(item){
uni.downloadFile({
url: this.$config.staticUrl + item.url,
success(res) {
uni.openDocument({
filePath: res.tempFilePath
})
}
})
}
}
}