From 1e2ad8ed685b589ffa3317692ae3dde5e3bed6ca Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 10 Jan 2024 17:39:04 +0800
Subject: [PATCH] 更新
---
components/noticeList/noticeList.vue | 36 ++++++++---
subPackage/article/signature.vue | 13 +++-
pages/home/index.vue | 2
subPackage/article/communityList.vue | 5 +
subPackage/article/detail.vue | 94 +++++++++++++++++++------------
5 files changed, 96 insertions(+), 54 deletions(-)
diff --git a/components/noticeList/noticeList.vue b/components/noticeList/noticeList.vue
index b6a7e57..83f0b58 100644
--- a/components/noticeList/noticeList.vue
+++ b/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}`
+ // })
+ // }
}
}
}
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 7da6c2f..639655b 100644
--- a/pages/home/index.vue
+++ b/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"
}
]
diff --git a/subPackage/article/communityList.vue b/subPackage/article/communityList.vue
index 8ce70b2..cfa5376 100644
--- a/subPackage/article/communityList.vue
+++ b/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>
\ No newline at end of file
diff --git a/subPackage/article/detail.vue b/subPackage/article/detail.vue
index afd1b04..6fc58d8 100644
--- a/subPackage/article/detail.vue
+++ b/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}`
diff --git a/subPackage/article/signature.vue b/subPackage/article/signature.vue
index 3ae8189..7443bd3 100644
--- a/subPackage/article/signature.vue
+++ b/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
})
--
Gitblit v1.9.3