DELL 3 роки тому
батько
коміт
fecc9940a1

+ 12 - 11
packageOperate/activity/index.vue

@@ -50,7 +50,7 @@
 									<image :src="itemTwo.picUrl" mode="aspectFit"></image>
 								</view>
 								<view class="textone"> {{itemTwo.title}} </view>
-								<view class="texttwo"> ¥{{itemTwo.value / 100}} </view>
+								<view class="texttwo"> ¥{{$numberFormat(itemTwo.value)}} </view>
 							</view>
 						</view>
 						<view class="effectstwo"></view>
@@ -76,7 +76,7 @@
 									</view>
 									<image src="../static/activity/effectssix.png" mode="" class="imgone"></image>
 									<view class="textone"> {{itemTwo.title}} </view>
-									<view class="texttwo"> ¥{{itemTwo.value / 100}} </view>
+									<view class="texttwo"> ¥{{$numberFormat(itemTwo.value)}} </view>
 
 								</view>
 							</view>
@@ -120,7 +120,7 @@
 		<view class="footer-fixed">
 			<view class="flex btn">
 				<button v-if="info.status && JSON.parse(info.status).value == 3" type="default"
-					@click="exChange">获取抽奖码</button>
+					@click="exChange" open-type="share">获取抽奖码</button>
 				<u-count-down v-else :time="activityTimeTwo" format="DD:HH:mm:ss" autoStart millisecond
 					@change="onChange">
 					<button style="background-color: #555;" type="default">
@@ -130,7 +130,7 @@
 			</view>
 		</view>
 
-		<u-popup :show="popupShow" mode="bottom" @close="close" closeable>
+<!-- 		<u-popup :show="popupShow" mode="bottom" @close="close" closeable>
 			<view class="popupcode">获取抽奖码</view>
 			<view class="popupcodetwo">
 				<view class="popupcodetwo-view">邀请好友助力,获取抽奖码</view>
@@ -139,7 +139,7 @@
 			<view class="popupcodethree" style="">
 				<button type="default" class="popupcodethree-default" open-type="share">立即邀请好友助力</button>
 			</view>
-		</u-popup>
+		</u-popup> -->
 	</view>
 </template>
 
@@ -196,18 +196,19 @@
 				}).catch(() => {
 					uni.hideLoading();
 				})
+				$http.post('/api/v1/mp/user/marketing/inviteCode', {}).then(res => {
+					if (res.code == 0) {
+						this.inviteCode = res.data
+					}
+				})
 			},
 			onChange(e) {
 				this.timeData = e
 			},
 			exChange() {
 				//弹出层打开
-				this.popupShow = true
-				$http.post('/api/v1/mp/user/marketing/inviteCode', {}).then(res => {
-					if (res.code == 0) {
-						this.inviteCode = res.data
-					}
-				})
+				// this.popupShow = true
+
 				uni.requestSubscribeMessage({
 					tmplIds: ['3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI',
 						'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',

+ 66 - 17
packageOperate/activity/record.vue

@@ -3,10 +3,11 @@
 		<u-navbar title="获奖名单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<view class="list">
 			<view v-for="(item,index) in list" :key="index" class="list-view">
-				<view class="award">
+				<view class="award flex">
 					<view class="award-avatar">
 						<image :src="item.avatar" mode=""></image>
 					</view>
+
 					<view class="award-nickNames">
 						<view class="nickName"><text>{{item.nickName}}</text>
 							<view v-if="item.awardName == '一等奖'" class="awardName">
@@ -25,21 +26,35 @@
 							</view>
 						</view>
 						<view style="line-height: 46rpx; color: #666666;">中奖码:{{item.code}}</view>
-						<view style="line-height: 46rpx; color: #666666;">{{item.prizeTitle}}</view>
+						<view style="line-height: 46rpx; color: #666666; " class="ells-one">{{item.prizeTitle}}</view>
 					</view>
 				</view>
 			</view>
 		</view>
 
 		<!-- 中奖 -->
-		<u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
+		<u-popup :show="activityShow" mode="center" round="11" @close="close" :closeable="true" overlayOpacity="0.5"
 			@touchmove.prevent.stop>
-			<view class="choiceShow-wrap">
-				<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
-					恭喜你获得一等奖
+			<view class="activityShow-wrap">
+				<view class="activityShow-wrap-award">
+					<view class="award">恭喜你 获得{{listData.awardName}}</view>
+					<view class="award-name">{{listData.prizeTitle}}title名字</view>
+				</view>
+				<view style="position: relative;">
+					<!-- <image :src="listData.prizePicUrl" mode="aspectFit"></image> -->
+					<image src="../static/activity/effectstwo.png" mode="aspectFit"
+						style="position: absolute;top: -260rpx;left: 170rpx; width: 350rpx;"></image>
+				</view>
+				<view style="text-align: center;margin-top: 120rpx;font-size: 24rpx;color: #999;line-height: 80rpx;">
+					奖品已放入我的奖品库</view>
+				<view class="flex" style="padding-bottom: 40rpx;">
+					<button @click="toPrize()"
+						style="width: 288rpx;height: 100rpx;font-size: 30rpx; line-height: 90rpx; background-color: #fff;color: #F8832C;border: 2rpx solid #F8832C;">前往查看</button><button
+						@click="close()"
+						style="width: 288rpx;height: 100rpx;font-size: 30rpx; line-height: 90rpx; background-color: #F8832C;color: #fff;border: 2rpx solid #F8832C;">关闭</button>
+
 				</view>
-				<button @click="toPrize()">前往查看</button>
-				<button @click="close()">关闭</button>
+
 			</view>
 		</u-popup>
 
@@ -50,7 +65,7 @@
 				<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
 					很遗憾你未中奖,欢迎继续参与其他抽奖,好运就在你身边
 				</view>
-				<button @click="close()">取消</button>
+				<button @click="close()">确定</button>
 			</view>
 		</u-popup>
 	</view>
@@ -64,9 +79,9 @@
 			return {
 				list: [],
 				marketingId: '',
-				total: '',
 				closeShow: false,
-				activityShow: false,
+				activityShow: true,
+				listData: {}
 			}
 		},
 		onLoad(opthios) {
@@ -96,19 +111,18 @@
 							item.prizePicUrl = env.filePublic + prizePicUrlArr[0] + '?imageView2/2/w/170'
 							item.avatar = env.filePublic + item.avatar + '?imageView2/2/w/170'
 						})
-						this.total = res.total
 						this.list = this.list.concat(res.rows)
 					}
 				}).catch(() => {
 					uni.hideLoading();
 					this.loading = false
 				});
-				
+
 				try {
 					const value = uni.getStorageSync(this.marketingId);
 					if (value) {
-						
-					}else {
+
+					} else {
 						this.successFail()
 						uni.setStorageSync(this.marketingId, this.marketingId);
 					}
@@ -128,9 +142,13 @@
 				})
 			},
 			successFail() {
+				this.listData = {}
 				$http.post(`/api/v1/mp/user/marketing/hit/prize/isHit/${this.marketingId}`, {}).then(
 					res => {
+						console.log(res)
 						if (res.code == 0 && res.data && res.data.isHit == 1) {
+							res.data.prizePicUrl = env.filePublic + res.data.prizePicUrl + '?imageView2/2/w/170'
+							this.listData = res.data
 							this.activityShow = true
 						}
 						if (res.code == 0 && res.data && res.data.isHit == 0) {
@@ -149,6 +167,7 @@
 			padding: 10rpx 20rpx;
 
 			.award {
+				justify-content: flex-start;
 				border-radius: 22rpx;
 				width: 100%;
 				height: 108px;
@@ -156,7 +175,6 @@
 				overflow: hidden;
 
 				&-avatar {
-					float: left;
 					padding: 50rpx 32rpx;
 
 					image {
@@ -167,7 +185,7 @@
 				}
 
 				&-nickNames {
-					float: left;
+					flex: 1;
 					padding: 30rpx 0;
 
 					.nickName {
@@ -200,4 +218,35 @@
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);
 	}
+
+	.activityShow-wrap {
+		border-radius: 22rpx;
+		overflow: hidden;
+		width: 700rpx;
+
+		&-award {
+			width: 100%;
+			height: 350rpx;
+			text-align: center;
+			background-image: radial-gradient(#FFAE64, #FF866B);
+			text-align: center;
+
+			.award {
+				font-size: 40rpx;
+				color: #fff;
+				font-weight: bold;
+				line-height: 80rpx;
+				padding-top: 50rpx;
+
+				&-name {
+					font-size: 30rpx;
+					color: #fff;
+					font-weight: bold;
+				}
+			}
+		}
+
+	}
+
+	.choiceShow-wrap {}
 </style>

+ 11 - 5
pages/activity/index.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="activity">
 		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
-			<view class="u-nav-slot" slot="left" style="font-size: 32rpx;">免费抽奖</view>
+			<view slot="left" style="font-size: 32rpx;">免费抽奖</view>
 		</u-navbar>
-		<view class="u-nav-slot" slot="left" style="background-color: #ffffff;width: 100%;">
-			<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="30" lineHeight="1"
+		<view class="status" slot="left">
+			<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="30" lineHeight="3"
 				lineColor="#E96737" :activeStyle="{
 									color: '#E96737',
 									transform: 'scale(1)',
@@ -111,7 +111,6 @@
 						})
 						this.total = res.total
 						this.list = this.list.concat(res.rows)
-						console.log(this.list);
 					}
 				}).catch(() => {
 					uni.hideLoading();
@@ -131,8 +130,15 @@
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);
 	}
+	.status {
+		width: 100%;
+		position: fixed;
+		z-index: 100;
+		background-color: #FFFFFF;
+		box-shadow: 0 5rpx 5rpx #ececec;
+	}
 	.list {
-		padding: 0 20rpx;
+		padding: 120rpx 20rpx 100rpx;
 		&-view {
 			text-align: center;
 			height: 530rpx;