lilei 4 lat temu
rodzic
commit
79c4a5846a
4 zmienionych plików z 23 dodań i 9 usunięć
  1. 2 2
      App.vue
  2. 5 1
      pages/index/index.vue
  3. 8 2
      pagesA/luckDraw/myJp.vue
  4. 8 4
      pagesA/taskList/taskList.vue

+ 2 - 2
App.vue

@@ -1,6 +1,6 @@
 <script>
-	// const uat_domain = 'https://lese.test.sxzxyj.net' // 预发布
-	const uat_domain = 'http://192.168.16.105:8302' // 本地
+	const uat_domain = 'https://lese.test.sxzxyj.net' // 预发布
+	// const uat_domain = 'http://192.168.16.105:8302' // 本地
 	const pro_domain = 'https://lese.sxzxyj.net' // 生产
 	const uat_URL = uat_domain+'/gc-shop/' // 预发布
 	const pro_URL = pro_domain+'/gc-shop/'  // 生产

+ 5 - 1
pages/index/index.vue

@@ -60,7 +60,7 @@
 			 </view>
 		</view>
 		<!-- 转盘浮动图片 -->
-		<view class="luckwheel-fixed" @click="toLuckDraw()">
+		<view class="luckwheel-fixed" v-if="showFixedLottery" @click="toLuckDraw()">
 			<u-image width="100rpx" height="100rpx" src="/static/luckwheel-fixed1.gif"></u-image>
 		</view>
 		<!-- 抽奖活动弹框 -->
@@ -102,6 +102,7 @@
 				hasLogin: false,
 				userData: null,
 				showLottery: false, // 是否显示抽奖弹框
+				showFixedLottery: false
 			}
 		},
 		onLoad() {
@@ -195,6 +196,7 @@
 						// 判断活动是否过期
 						let a = moment().isBetween(res.data.activeStartTime,res.data.activeEndTime,'days','[]')
 						if(a){
+							this.showFixedLottery = true
 							// 判断是否有免费抽奖次数
 							findCustomerTimes({id:res.data.luckyDrawNo}).then(res => {
 								let reTimes = 0
@@ -204,6 +206,8 @@
 								this.$u.vuex('vuex_LuckDrawTimes',reTimes)
 								this.showLottery = reTimes > 0
 							})
+						}else{
+							this.showFixedLottery = false
 						}
 					}else{
 						this.$u.vuex('vuex_LuckDraw',null)

+ 8 - 2
pagesA/luckDraw/myJp.vue

@@ -6,8 +6,11 @@
 			<view class="lingjiang" v-if="item.state == 'WAIT_RECEIVE'" @click="lingjiang(item)">领奖</view>
 			<view class="viewsDetail" v-else @click="viewsDetail(item)">查看详情</view>
 		</view>
-		<view v-if="list.length == 0">
-			<u-empty text="还未中奖" :icon-size="50" mode="list"></u-empty>
+		<view style="padding:150rpx 30rpx 0;" v-if="list.length == 0">
+			<u-empty text="还未中奖" :icon-size="80" mode="list"></u-empty>
+			<view style="text-align: center;">
+				<u-button size="mini" @click="goBack">去抽奖</u-button>
+			</view>
 		</view>
 		
 		<!-- 查看详情弹框 -->
@@ -130,6 +133,9 @@ export default {
 		}
 	},
 	methods: {
+		goBack(){
+			uni.navigateBack()
+		},
 		// 电话客服
 		callPhone () {
 			uni.makePhoneCall({

+ 8 - 4
pagesA/taskList/taskList.vue

@@ -35,19 +35,23 @@
 			return {
 				showYd: false,
 				list: [], // 任务列表
-				luckDraw: null
+				luckDraw: null,
+				id:''
 			}
 		},
 		onLoad(option) {
 			if(option.id) {
-				this.getTaskList(option.id)
+				this.id = option.id
 			}
 			this.luckDraw = this.$store.state.vuex_LuckDraw
 		},
+		onShow() {
+			this.getTaskList()
+		},
 		methods: {
 			// 获取任务列表
-			getTaskList (id) {
-				findCustomerTask({id:id}).then(res =>{
+			getTaskList () {
+				findCustomerTask({id:this.id}).then(res =>{
 					if(res.status == 200) {
 						console.log(res)
 						this.list = res.data