Lou
2024-03-23 562334a51ad179223b01f1516bb964a2b778e85c
更新
2 files modified
61 ■■■■ changed files
subPackage/article/detail.vue 57 ●●●● patch | view | raw | blame | history
subPackage/article/document.vue 4 ●●●● patch | view | raw | blame | history
subPackage/article/detail.vue
@@ -72,11 +72,12 @@
                                <text class="f-26 ml-10" v-if="item.optionRange == 0">(单选)</text>
                                <text class="f-26 ml-10" v-if="item.optionRange == 1 && !item.optionNumber">(多选)</text>
                                <text class="f-26 ml-10" v-if="item.optionRange == 1 && item.optionNumber>0">
                                    (多选{{`最多可选${item.optionNumber}项`}})</text>
                                    (多选{{`最多可选${item.optionNumber}项`}})
                                </text>
                            </view>
                            <view class="file-btn  bgc-main f-28" v-if="item.attachment"
                            <view class="file-btn  f-26  " v-if="item.attachment"
                                @click="navToDocument(item.attachment)">
                                查看附件
                                {{item.discussContent}}附件
                            </view>
@@ -95,8 +96,8 @@
                                                    :showText="false"></uv-line-progress>
                                            </view>
                                            <!-- <text class="c-33 f-28"
                                                v-if="i.number && item.isSubmit">{{i.number}}人</text> -->
                                            <text class="c-33 f-28"
                                                v-if="i.number && item.isSubmit  && item.voteNumberPublic == 1">{{i.number}}人</text>
                                        </view>
                                    </view>
                                </u-radio-group>
@@ -116,7 +117,8 @@
                                                <uv-line-progress v-else height="6"
                                                    :showText="false"></uv-line-progress>
                                            </view>
                                            <!-- <text class="c-33 f-28" v-if="i.number">{{i.number}}人</text> -->
                                            <text class="c-33 f-28"
                                                v-if="i.number && item.voteNumberPublic == 1">{{i.number}}人</text>
                                        </view>
                                    </view>
                                </u-checkbox-group>
@@ -196,6 +198,9 @@
    import * as communityModel from "@/api/community/community.js"
    import tagCell from '@/components/noticeList/tagCell.vue'
    import captionRow from "@/components/caption/caption.vue"
    import {
        minioBaseUrl
    } from "@/common/setting.js"
    export default {
        components: {
            tagCell,
@@ -539,20 +544,37 @@
                }, 1000)
            },
            sendValidationCode() {
            },
            navToDocument(url) {
                uni.navigateTo({
                    url: `document?url=${url}`
                })
                wx.showLoading({
                    title: "加载中...",
                });
                wx.downloadFile({
                    url: `${minioBaseUrl}${url}`,
                    success: function(res) {
                        const filePath = res.tempFilePath;
                        wx.openDocument({
                            filePath: filePath,
                            success: function(res) {
                                wx.hideLoading();
                            },
                            complete: function(err) {
                                console.log("complete===>", err);
                            },
                            fail: function(res) {
                                console.log("打开失败");
                            },
                        });
                    },
                });
                // uni.navigateTo({
                //     url: `document?url=${url}`
                // })
            }
        }
    }
</script>
@@ -789,11 +811,12 @@
    }
    .file-btn {
        width: 140rpx;
        padding: 10rpx 0;
        border-radius: 10rpx;
        display: inline-block;
        padding: 10rpx 20rpx;
        border-radius: 6rpx;
        color: #fff;
        margin-bottom: 20rpx;
        text-align: center;
        background-color: #999;
    }
</style>
subPackage/article/document.vue
@@ -31,6 +31,10 @@
                            success: function(res) {
                                wx.hideLoading();
                            },
                            complete: function(err) {
                                console.log("complete===>", err);
                            },
                            fail: function(res) {
                                console.log("打开失败");
                            },