lilei 4 år sedan
förälder
incheckning
6354d06fda
3 ändrade filer med 39 tillägg och 32 borttagningar
  1. 5 3
      pages/userCenter/index.vue
  2. 17 20
      pagesA/luckDraw/luckDraw.vue
  3. 17 9
      pagesA/luckDraw/myJp.vue

+ 5 - 3
pages/userCenter/index.vue

@@ -27,8 +27,9 @@
 		<view class="user-list">
 			<u-cell-group>
 				<u-cell-item v-if="hasLogin" icon="order" icon-size="38" :icon-style="{color:'#ff5500'}" index="0" @click="toPage" title="我的订单"></u-cell-item>
-				<u-cell-item v-if="hasLogin" icon="gift" icon-size="40" :icon-style="{color:'#00aaff'}" index="1" @click="toPage" title="投递记录"></u-cell-item>
-				<u-cell-item icon="question-circle" icon-size="40" :icon-style="{color:'#19be6b'}" index="2" @click="toPage" title="常见问题"></u-cell-item>
+				<u-cell-item v-if="hasLogin" icon="gift" icon-size="40" :icon-style="{color:'#aa55ff'}" index="5" @click="toPage" title="我的奖品"></u-cell-item>
+				<u-cell-item v-if="hasLogin" icon="list-dot" icon-size="36" :icon-style="{color:'#00aaff'}" index="1" @click="toPage" title="投递记录"></u-cell-item>
+				<u-cell-item icon="question-circle" icon-size="39" :icon-style="{color:'#19be6b'}" index="2" @click="toPage" title="常见问题"></u-cell-item>
 				<u-cell-item icon="phone" icon-size="40" :icon-style="{color:'#f00'}" @click="callPhone" title="联系客服"></u-cell-item>
 				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="3" @click="toPage" title="服务协议"></u-cell-item>
 				<u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="4" @click="toPage" title="关于我们"></u-cell-item>
@@ -84,7 +85,8 @@
 					'/pages/userCenter/deliveryRecord',
 					'/pages/userCenter/question',
 					'/pages/agreement/agreement?fromPage=usercenter',
-					'/pages/userCenter/aboutUs'
+					'/pages/userCenter/aboutUs',
+					'/pagesA/luckDraw/myJp?fromPage=usercenter'
 					]
 				uni.navigateTo({
 					url: pageUrl[index]

+ 17 - 20
pagesA/luckDraw/luckDraw.vue

@@ -31,7 +31,7 @@
 					做任务赚抽奖
 				</view>
 				<view v-else @click="showPayWin('win_1')">
-					支付{{luckDraw.purchaseTimesGold}}乐豆继续抽奖 >
+					支付{{luckDraw.purchaseTimesGold||''}}乐豆继续抽奖 >
 				</view>
 			</view>
 		</view>
@@ -241,12 +241,9 @@ export default {
 		},
 		// 获取奖品列表
 		getPrizeList() {
-			if(!this.isFirstLoad){
-				uni.showLoading({
-					title: '奖品准备中...'
-				});
-			}
-			
+			uni.showLoading({
+				title: '奖品准备中...'
+			});
 			findEnable().then(res => {
 				if(res.status == 200 && res.data){
 					this.$u.vuex('vuex_LuckDraw',res.data)
@@ -299,11 +296,13 @@ export default {
 		},
 		// 获取免费抽奖次数
 		getCustomerTimes(){
-			findCustomerTimes({id:this.luckDraw.luckyDrawNo}).then(res => {
-				if(res.status == 200){
-					this.reTimes = res.data.timesSurplus || 0
-				}
-			})
+			if(this.luckDraw){
+				findCustomerTimes({id:this.luckDraw.luckyDrawNo}).then(res => {
+					if(res.status == 200){
+						this.reTimes = res.data.timesSurplus || 0
+					}
+				})
+			}
 		},
 		// 抽奖次数用完了
 		showPayWin(winTypes){
@@ -385,14 +384,12 @@ export default {
 		// 抽奖转盘绘制完成
 		handleDrawFinish(res) {
 			console.log('抽奖转盘绘制完成', res);
-			if(!this.isFirstLoad){
-				uni.showToast({
-					title: res.msg,
-					duration: 2000,
-					mask: true,
-					icon: 'none'
-				});
-			}
+			uni.showToast({
+				title: res.msg,
+				duration: 2000,
+				mask: true,
+				icon: 'none'
+			});
 		},
 		// 支付确定
 		toPaySubmit(){

+ 17 - 9
pagesA/luckDraw/myJp.vue

@@ -7,10 +7,10 @@
 			<view class="viewsDetail" v-else @click="viewsDetail(item)">查看详情</view>
 		</view>
 		<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-empty text="还没有奖品记录" :icon-size="80" mode="list"></u-empty>
+			<!-- <view style="text-align: center;">
 				<u-button size="mini" @click="goBack">去抽奖</u-button>
-			</view>
+			</view> -->
 		</view>
 		
 		<!-- 查看详情弹框 -->
@@ -35,7 +35,7 @@
 						<view>
 							<view v-if="curRevice.state == 'WAIT_SEND_EXPRESS'">暂未发货,如收货信息有误, 请联系客服电话<text class="tell" @click="callPhone">{{kfPhone}}</text></view>
 							<view v-else>
-								中国邮政 <text class="tell">(单号:16546464645)</text> <u-button @click="copyWlCode" size="mini">复制</u-button>
+								{{curRevice.expressName}} <text class="tell">(单号:{{curRevice.expressNum}})</text> <u-button @click="copyWlCode" size="mini">复制</u-button>
 							</view>
 						</view>
 					</view>
@@ -47,7 +47,7 @@
 		</u-popup>
 		
 		<!-- 乐豆领取详情弹框 -->
-		<u-popup v-model="showLjLd" mode="center" close-icon-color="#ffffff" closeable :border-radius="30" width="500rpx" height="450rpx">
+		<u-popup v-model="showLjLd" mode="center" close-icon-color="#ffffff" closeable :border-radius="30" width="500rpx">
 			<view class="lottery-content">
 				<view class="lottery-title">欢迎领取</view>
 				<view class="lottery-msg">
@@ -75,7 +75,7 @@
 					 		<u-input v-model="areaInfo.label" placeholder="请选择省市区" @click="openAddress" type="select" />
 					 		<Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
 					 	</u-form-item>
-					 	<u-form-item label="详细地址" required prop="receiveAddress">
+					 	<u-form-item label="详细地址" :border-bottom="false" required prop="receiveAddress">
 					 		<u-input type="textarea" :height="100" auto-height placeholder="请输入收货详细地址(最多100个字符)" :maxlength="100" v-model="form.receiveAddress" class="receiveAddress"/>
 					 	</u-form-item>
 					 </u-form>
@@ -113,7 +113,8 @@ export default {
 			areaInfo: {},  //  省市区
 			areaIdArr: [],  //  省市区id数组
 			list: [],
-			curRevice: null
+			curRevice: null,
+			fromPage: ''
 		}
 	},
 	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
@@ -124,6 +125,7 @@ export default {
 		console.log(option,'option')
 		this.getfindWinPrize()
 		this.kfPhone = this.$store.state.vuex_kfMobile
+		this.fromPage = option.fromPage
 	},
 	onUnload() {
 		this.form = {
@@ -134,7 +136,13 @@ export default {
 	},
 	methods: {
 		goBack(){
-			uni.navigateBack()
+			if(this.fromPage == 'usercenter'){
+				uni.redirectTo({
+					url: '/pagesA/luckDraw/luckDraw'
+				})
+			}else{
+				uni.navigateBack()
+			}
 		},
 		// 电话客服
 		callPhone () {
@@ -204,7 +212,7 @@ export default {
 		// 复制单号
 		copyWlCode(){
 			uni.setClipboardData({
-			    data: 'hello',
+			    data: this.curRevice.expressNum,
 			    success: function () {
 			        console.log('success');
 			    }