浏览代码

20221213 10:57 投票修正

yfso 3 年之前
父节点
当前提交
a38d483089
共有 4 个文件被更改,包括 41 次插入61 次删除
  1. 20 18
      pages/index/active-list/index.vue
  2. 13 11
      pages/index/index.vue
  3. 6 30
      pages/index/vote-detail/index.vue
  4. 2 2
      setting.js

+ 20 - 18
pages/index/active-list/index.vue

@@ -20,27 +20,29 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="List">
 		<view class="List">
-			<view class="ListItem" v-for="(item,index) in List" :key="index"  @click="activeDetail(item.id)">
-				<image :src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'" style="width: 640rpx;height:420rpx;border-radius: 12rpx;"></image>
-				<view class="kudosicon" @click.stop="kudosActive(item.id,index)">
-					<image src="/static/icon/Kudos.png" v-if="item.is_like==0"></image>
-					<image src="/static/icon/Kudos(1).png" v-if="item.is_like==1"></image>
-				</view>
-				<view class="nav">
-					<view class="events">
-						<text>{{item.title}}</text>
+			<template v-for="(item,index) in List" >
+				<view class="ListItem" v-if="item.show_status" :key="index"  @click="activeDetail(item.id)">
+					<image :src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'" style="width: 640rpx;height:420rpx;border-radius: 12rpx;"></image>
+					<view class="kudosicon" @click.stop="kudosActive(item.id,index)">
+						<image src="/static/icon/Kudos.png" v-if="item.is_like==0"></image>
+						<image src="/static/icon/Kudos(1).png" v-if="item.is_like==1"></image>
 					</view>
 					</view>
-					<view class="voteStatus" style="width: 100rpx;">
-						<text style="font-size: 30rpx;color: #999;" v-if="item.activity_status==1">未开始</text>
-						<text style="font-size: 30rpx;color: #FF6503;" v-if="item.activity_status==2">进行中</text>
-						<text style="font-size: 30rpx;color: #999;" v-if="item.activity_status==3">已结束</text>
+					<view class="nav">
+						<view class="events">
+							<text>{{item.title}}</text>
+						</view>
+						<view class="voteStatus" style="width: 100rpx;">
+							<text style="font-size: 30rpx;color: #999;" v-if="item.activity_status==1">未开始</text>
+							<text style="font-size: 30rpx;color: #FF6503;" v-if="item.activity_status==2">进行中</text>
+							<text style="font-size: 30rpx;color: #999;" v-if="item.activity_status==3">已结束</text>
+						</view>
+					</view>
+					<view class="foot">
+						<image src="/static/icon/data.png"></image>
+						<text>{{item.end_time}} 结束</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="foot">
-					<image src="/static/icon/data.png"></image>
-					<text>{{item.end_time}} 结束</text>
-				</view>
-			</view>
+			</template>
 		</view>
 		</view>
 
 
 		<!-- 触底 -->
 		<!-- 触底 -->

+ 13 - 11
pages/index/index.vue

@@ -46,17 +46,19 @@
 
 
 		<!-- 活动图片 -->
 		<!-- 活动图片 -->
 		<view class="home-special-img">
 		<view class="home-special-img">
-			<view class="ListItem" v-for="(item,index) in specialList" :key="index" @click="activeDetail(item.id)">
-				<image style="width: 312rpx;height: 200rpx; border-radius: 12rpx; "
-					:src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'" mode=""></image>
-				<view class="kudosicon" @click.stop="kudosActive(item.id,index)">
-					<image style="width:24rpx;height: 24rpx;" src="/static/icon/Kudos.png" v-if="item.is_like==0">
-					</image>
-					<image style="width:24rpx;height: 24rpx;" src="/static/icon/Kudos(1).png" v-if="item.is_like==1">
-					</image>
-				</view>
-				<text style="color: #333;font-weight: bold;font-size: 28rpx;">{{item.title}}</text>
-			</view> 
+			<template v-for="(item,index) in specialList" >
+				<view class="ListItem" v-if="item.show_status" :key="index" @click="activeDetail(item.id)">
+					<image style="width: 312rpx;height: 200rpx; border-radius: 12rpx; "
+						:src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'" mode=""></image>
+					<view class="kudosicon" @click.stop="kudosActive(item.id,index)">
+						<image style="width:24rpx;height: 24rpx;" src="/static/icon/Kudos.png" v-if="item.is_like==0">
+						</image>
+						<image style="width:24rpx;height: 24rpx;" src="/static/icon/Kudos(1).png" v-if="item.is_like==1">
+						</image>
+					</view>
+					<text style="color: #333;font-weight: bold;font-size: 28rpx;">{{item.title}}</text>
+				</view> 
+			</template>	
 		</view>
 		</view>
 
 
 		<!-- 广告图 -->
 		<!-- 广告图 -->

+ 6 - 30
pages/index/vote-detail/index.vue

@@ -1,7 +1,5 @@
 <template>
 <template>
 	<view class="vote-detail">
 	<view class="vote-detail">
-		<!-- 分享海报 -->
-		<!-- <hch-poster ref="hchPoster" @cancel="handleCancel" :posterData.sync="posterData" @previewImage='previewImage' /> -->
 		<!-- 活动查询 -->
 		<!-- 活动查询 -->
 		<view class="title">
 		<view class="title">
 			<image style="width: 158rpx;height: 158rpx;border-radius: 50%; " :src="voteDetail.logo" mode="">
 			<image style="width: 158rpx;height: 158rpx;border-radius: 50%; " :src="voteDetail.logo" mode="">
@@ -151,23 +149,6 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</uni-popup>
 		</uni-popup>
-
-
-		<!-- <canvas :style="{height: pupopHeight + 'px',width: pupopWidth + 'px'}" canvas-id="myCanvas"></canvas>
-		<uni-popup ref="popup" type="center">
-			<view class="popup-wrap">
-				<view class="popup-head">
-					生成海报
-					<view @click="close_popup()" class="close_icon"></view>
-				</view>
-				<image :src="posterImg" mode=""></image>
-				<view class="popup-footer">
-					<button class="save-btn" @click="saveToLocal()" type="default">保存到相册</button>
-					<view class="tips">保存图片到相册,你就可以分享啦!</view>
-				</view>
-			</view>
-		</uni-popup>
- -->
 		
 		
 		<Poster ref="poster" :name="voteDetail.project_name" :title="voteDetail.activity.title"/>
 		<Poster ref="poster" :name="voteDetail.project_name" :title="voteDetail.activity.title"/>
 		
 		
@@ -388,16 +369,11 @@
 					})
 					})
 				} else if (this.jump_type == 4) {
 				} else if (this.jump_type == 4) {
 					let obj = this.jump_config
 					let obj = this.jump_config
-					uni.redirectTo({
-						url: `${obj}`,
-						success: function(e) { //跳转成功后刷新页面
-							var page = getCurrentPages().pop();
-							if (page == undefined || page == null) return;
-							page.onLoad();
-						},
-						fail:()=>{
-							uni.reLaunch({
-								url: obj,
+					uni.reLaunch({
+						url: obj,
+						fail:(err)=>{
+							uni.navigateTo({
+								url: obj
 							})
 							})
 						}
 						}
 					})
 					})
@@ -631,7 +607,7 @@
 		.introduce-text {
 		.introduce-text {
 			margin-top: 44rpx;
 			margin-top: 44rpx;
 			// line-height: 40rpx;
 			// line-height: 40rpx;
-			color: #333333;
+			// color: #333333;
 			// font-size: 28rpx;
 			// font-size: 28rpx;
 		}
 		}
 	}
 	}

+ 2 - 2
setting.js

@@ -3,8 +3,8 @@
  */
  */
 const IS_DEV = process.env.NODE_ENV === 'development'
 const IS_DEV = process.env.NODE_ENV === 'development'
 // const URL = 'https://zhangsiye.9026.com'
 // const URL = 'https://zhangsiye.9026.com'
-// const URL = 'https://t9.9026.com'
-const URL = 'https://ihg.9026.com'
+const URL = 'https://t9.9026.com'
+// const URL = 'https://ihg.9026.com'
 
 
 module.exports = {
 module.exports = {
   // 版本
   // 版本