lizhenhao 2 سال پیش
والد
کامیت
03b895a70d
3فایلهای تغییر یافته به همراه37 افزوده شده و 3 حذف شده
  1. 3 1
      colorui/components/cu-custom.vue
  2. 17 1
      pages/test/luckyDraw/LuckyDrawEvents.vue
  3. 17 1
      pages/test/luckyDraw/LuckyDrawEvents_pc.vue

+ 3 - 1
colorui/components/cu-custom.vue

@@ -9,7 +9,9 @@
 				<view class="content" :style="[{top:StatusBar + 'px'}]">
 					<slot name="content"></slot>
 				</view>
-				<slot name="right"></slot>
+				<view class="action">
+					<slot name="right"></slot>
+				</view>
 			</view>
 		</view>
 	</view>

+ 17 - 1
pages/test/luckyDraw/LuckyDrawEvents.vue

@@ -1,6 +1,14 @@
 <template>
 	<view>
-		<cu-custom bgColor="bg-gradual-blue" ><block slot="content">活动中心</block></cu-custom>
+		<cu-custom :backUrl="'/pages/test/luckyDraw/LuckyDrawEvents'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="backText">返回</block>
+			<block slot="content">活动中心</block>
+			<block slot="right" >
+				<view  @click="back()">
+					刷新
+				</view>
+			</block>
+		</cu-custom>
 
 		<view class="cu-card article">
 			<view class="cu-item shadow" v-for="item in dataList" @click="detail(item.id, item.switchFlag)">
@@ -50,6 +58,9 @@ import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
 			this.luckyDrawEventsService = new LuckyDrawEventsService()
 			this.refreshList()
 		},
+		onShow() {
+			this.refreshList()
+		},
 		methods: {
 			refreshList() {
 			  this.loading = true
@@ -80,6 +91,11 @@ import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
 					})
 				}
 				
+			},
+			back () {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawEvents'
+				})
 			}
 		}
 	}

+ 17 - 1
pages/test/luckyDraw/LuckyDrawEvents_pc.vue

@@ -1,6 +1,14 @@
 <template>
 	<view>
-		<cu-custom bgColor="bg-gradual-blue" ><block slot="content">活动中心</block></cu-custom>
+		<cu-custom :backUrl="'/pages/test/luckyDraw/LuckyDrawEvents'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="backText">返回</block>
+			<block slot="content">活动中心</block>
+			<block slot="right" >
+				<view  @click="back()">
+					刷新
+				</view>
+			</block>
+		</cu-custom>
 
 		<view class="cu-card article">
 			<view class="cu-item shadow" v-for="item in dataList" @click="detail(item.id, item.switchFlag)">
@@ -50,6 +58,9 @@ import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
 			this.luckyDrawEventsService = new LuckyDrawEventsService()
 			this.refreshList()
 		},
+		onShow() {
+			this.refreshList()
+		},
 		methods: {
 			refreshList() {
 			  this.loading = true
@@ -80,6 +91,11 @@ import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
 					})
 				}
 				
+			},
+			back () {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawEvents'
+				})
 			}
 		}
 	}