|
@@ -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>
|