qiuyuan 98435311b2 1
2025-12-29 13:54:05 +08:00

141 lines
2.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="doc-page">
<view class="doc-content">
<view class="doc-file" v-for="item of docList" @click="downLoadFile(item)">
<image src="/static/imgs/PDF.png" alt="" srcset="" class="doc-img" />
<view class="doc-name">{{item.name}}</view>
</view>
<view style="margin-top: 20px;">
<u-button shape="circle" type="primary" @click="reback()">返回</u-button>
</view>
</view>
<u-modal :show="show" title="提示" @confirm="show=false">
<view>
<view style="padding: 5px;font-size: 16px;line-height: 23px;">
预约完成请致电社区并关注预约记录留意审核状态谢谢
</view>
<view v-if="warnMsg" style="line-height: 21px;font-size: 14px;border-radius: 5px; padding: 5px;background: #ffac31;color: #ffffff;">{{warnMsg}}</view>
</view>
</u-modal>
</view>
</template>
<script>
import {
IMAGE_BASE_URL,
BASE_URL
} from '@/utils/config';
import {
downloadPdfFiles
} from '@/utils/download.js'
export default {
data() {
return {
docList: [],
content: '预约完成,请致电社区,并关注预约记录留意审核状态,谢谢!',
show: false,
warnMsg: '',
nameList: {
'applyPdf': '申请表申请表申请表申请表申请表申请表申请表申请表申请表申请表',
'covenantPdf': '协议书'
}
}
},
onLoad(option) {
this.show = true
const obj = JSON.parse(option.files)
this.warnMsg = obj.warnMsg
this.docList = [{
name: obj.applyPdfName,
url: BASE_URL + obj.applyPdf
},
{
name: obj.covenantPdfName,
url: BASE_URL + obj.covenantPdf
},
]
},
methods: {
handleBack() {
// 固定跳转首页
uni.redirectTo({
url: `/pages/meetingList/index`
})
},
async downLoadFile(fileUrl) {
const result = await downloadPdfFiles(fileUrl);
if (result.success == true) {
// uni.navigateTo({
// url: `/pages/meetingList/index`
// });
}
},
reback() {
uni.reLaunch({
url: `/pages/meetingList/index`
})
}
}
}
</script>
<style scoped>
.doc-page {
width: 100vw;
height: 100vh;
/* margin: 10rpx; */
}
.doc-content {
margin: 10px;
}
.doc-file {
padding: 20rpx 10rpx;
display: flex;
align-items: center;
/* margin: 10px; */
/* border-bottom: 1px solid #c9c9c9; */
}
.doc-file:not(:last-child) {
border-bottom: 1px solid #c9c9c9;
}
.doc-img {
width: 25px;
height: 28px;
}
.doc-name {
padding: 0 5px;
flex: 1;
color: #666666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nav-bar {
display: flex;
align-items: center;
padding: 15px;
// background-color: #fff;
border-bottom: 1px solid #f5f5f5;
margin-top: 84rpx;
}
.nav-left {
display: flex;
align-items: center;
margin-right: 10px;
}
.nav-title {
flex: 1;
text-align: center;
// font-weight: bold;
width: 100%;
}
</style>