Lou
2024-01-10 1e2ad8ed685b589ffa3317692ae3dde5e3bed6ca
更新
5 files modified
150 ■■■■■ changed files
components/noticeList/noticeList.vue 36 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 2 ●●● patch | view | raw | blame | history
subPackage/article/communityList.vue 5 ●●●●● patch | view | raw | blame | history
subPackage/article/detail.vue 94 ●●●●● patch | view | raw | blame | history
subPackage/article/signature.vue 13 ●●●●● patch | view | raw | blame | history
components/noticeList/noticeList.vue
@@ -1,12 +1,13 @@
<template>
    <view class="">
        <view class="notice-list" @click="navToDetail(item.id,item.eventType,item.pdId)" v-for="(item,index) in data" :key="index">
        <view class="notice-list" @click="navToDetail(item.id,item.eventType,item.pdId)" v-for="(item,index) in data"
            :key="index">
            <view v-if="item.url" class="notice-inner flex j-c-s-b">
                <view class="notice-list-left flex f-d-c j-c-s-b">
                    <text class="notice-title f-26">{{item.title}}</text>
                    <view class="flex j-c-s-b a-i-c">
                        <view class="flex a-i-c">
                            <tag-cell  v-if="item.dictValue" :text="item.dictValue" />
                            <tag-cell v-if="item.dictValue" :text="item.dictValue" />
                            <view class="flex a-i-c">
                                <u-icon name="eye-fill" size="14" color="#CECECE"></u-icon>
                                <text class="f-24 c-99 ml-5">{{item.viewNumber}}</text>
@@ -36,11 +37,14 @@
<script>
    import tagCell from './tagCell'
    import { minioBaseUrl } from '@/common/setting.js'
    import {
        minioBaseUrl
    } from '@/common/setting.js'
    export default {
        name: "noticeList",
        props: {
            data: Array
            data: Array,
            pageType: String
        },
        components: {
            tagCell
@@ -51,21 +55,31 @@
            }
        },
        methods: {
            setUrl(url){
            setUrl(url) {
                return `${minioBaseUrl}${url}`
            },
            navToDetail(id,type,pdId) {
                if(type == 0 || type == 1){
            navToDetail(id, type, pdId) {
                if (this.pageType) {
                    uni.navigateTo({
                        url: `/subPackage/article/detail?id=${id}&type=${type}&pdId=${pdId}`
                        url: `/subPackage/article/detail?id=${id}&type=${this.pageType}`
                    })
                }else {
                } else {
                    uni.navigateTo({
                        url: `/subPackage/article/detail?id=${id}`
                    })
                }
                // if(type == 0 || type == 1){
                //     uni.navigateTo({
                //         url: `/subPackage/article/detail?id=${id}&type=${type}&pdId=${pdId}`
                //     })
                // }else {
                //     uni.navigateTo({
                //         url: `/subPackage/article/detail?id=${id}`
                //     })
                // }
            }
        }
    }
pages/home/index.vue
@@ -242,7 +242,7 @@
                    {
                        title: "公共收益",
                        icon: "/static/icon/nav-15.png",
                        path: "/subPackage/article/list?type=2"
                        path: "/subPackage/article/list?type=1"
                    }
                ]
subPackage/article/communityList.vue
@@ -2,12 +2,12 @@
    <view class="">
        <z-paging ref="paging" v-model="list" @query="queryList" @onRefresh="refreshList"
            loading-more-no-more-text="没有更多了">
            <view class="tab" v-if="tabList.length" slot="top">
            <view class="tab" v-show="tabList.length" slot="top">
                <u-tabs :list="tabList" :current="tabIndex" keyName="dictValue" @change="changeTab"
                    :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs>
            </view>
            <view class="list bgc-ff">
                <notice-list :data="list" />
                <notice-list :data="list" page-type="4" />
            </view>
        </z-paging>
    </view>
@@ -155,6 +155,7 @@
    .list {
        // margin-top: 108rpx;
        margin-top: 20rpx;
        padding: 0 30rpx;
    }
</style>
subPackage/article/detail.vue
@@ -67,7 +67,7 @@
                    <view class="vote bgc-ff">
                        <view class="mb-20" v-for="(item,index) in voteTopicList" :key="index">
                            <view class="vote-title">
                                <text class="f-30 fw">{{item.discussContent}}</text>
                                <!-- <text class="f-30 fw">{{item.discussContent}}</text> -->
                                <text class="f-26 ml-10">{{item.optionRange == 0?"(单选)":"(多选)"}}</text>
                            </view>
                            <view class="" v-if="item.optionRange == 0">
@@ -197,6 +197,7 @@
                // this.$set(this.params, "eventType", option.type);
                // this.eventType = option.type;
                // this.pdId = option.pdId;
                this.$set(this.params, "type", option.type);
                this.curSite = uni.getStorageSync("siteInfo")
            }
            this.getDetailInfo()
@@ -316,29 +317,27 @@
            //报名
            handleApply() {
                if (this.computeEndTime > 0) {
                if (this.applyInfo.signatureFlag == 1) {
                    uni.navigateTo({
                        url: "signature"
                        url: `signature?type=1`
                    })
                    // communityModel.addApply({
                    //     publicDiscussId: this.pdId,
                    //     articleId: this.params.id,
                    //     houseCode: uni.getStorageSync("siteInfo").houseCode
                    // }).then(res => {
                    //     if (res.code == 200) {
                    //         uni.showToast({
                    //             title: "操作成功"
                    //         })
                    //         this.getApplyList();
                    //         this.getApplyDetail()
                    //     }
                    // })
                } else {
                    uni.showToast({
                        title: "报名已结束",
                        icon: "none"
                    })
                    this.applyRequest()
                }
                // if (this.computeEndTime > 0) {
                //     if (this.detailInfo.signatureFlag == 1) {
                //         uni.navigateTo({
                //             url: `signature?type=1`
                //         })
                //     } else {
                //         this.applyRequest()
                //     }
                // } else {
                //     uni.showToast({
                //         title: "报名已结束",
                //         icon: "none"
                //     })
                // }
            },
            applyRequest(signPath) {
@@ -385,27 +384,50 @@
            //提交投票
            submitVote() {
                if (this.computeEndTime > 0) {
                    let data = this.getParams()
                    communityModel.addVoteOperate(data).then(res => {
                        if (res.code == 200) {
                            uni.showToast({
                                title: "操作成功"
                            })
                            this.$nextTick(() => {
                                this.getApplyDetail();
                                this.getVoteList();
                            })
                        }
                if (this.applyInfo.signatureFlag == 1) {
                    uni.navigateTo({
                        url: `signature?type=2`
                    })
                } else {
                    uni.showToast({
                        title: "投票已结束",
                        icon: "none"
                    })
                    this.voteRequest()
                }
                // if (this.computeEndTime > 0) {
                //     if (this.detailInfo.signatureFlag == 1) {
                //         uni.navigateTo({
                //             url: `signature?type=2`
                //         })
                //     } else {
                //         this.voteRequest()
                //     }
                // } else {
                //     uni.showToast({
                //         title: "投票已结束",
                //         icon: "none"
                //     })
                // }
            },
            voteRequest(signPath) {
                let data = this.getParams()
                if (signPath) {
                    data.signaturePath = signPath
                }
                communityModel.addVoteOperate(data).then(res => {
                    if (res.code == 200) {
                        uni.showToast({
                            title: "操作成功"
                        })
                        this.$nextTick(() => {
                            this.getApplyDetail();
                            this.getVoteList();
                        })
                    }
                })
            },
            navToComment() {
                uni.navigateTo({
                    url: `comment?id=${this.params.id}`
subPackage/article/signature.vue
@@ -38,7 +38,8 @@
            }
        },
        onLoad() {
        onLoad(option) {
            this.type = option.type;
            this.getHeader()
        },
@@ -70,16 +71,20 @@
                        console.log(res);
                        let data = JSON.parse(res.data);
                        if (res.statusCode == 200 && data.code == 200) {
                            this.handleApply(data.data.name);
                            this.handleSubmit(data.data.name);
                        }
                    }
                })
            },
            handleApply(src) {
            handleSubmit(src) {
                let pages = getCurrentPages();
                let prePage = pages[pages.length - 2];
                prePage.$vm.applyRequest(src);
                if (this.type == 1) {
                    prePage.$vm.applyRequest(src);
                } else {
                    prePage.$vm.voteRequest(src);
                }
                uni.navigateBack({
                    delta: 2
                })