|
|
@ -1,6 +1,8 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view style="padding-bottom: 50px;background-color: #C5121B;"> |
|
|
|
<view style="padding-bottom: 50px;background-color: #C5121B;"> |
|
|
|
<image class="wp100 img" mode="widthFix" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E5%8A%A9%E5%8A%9B%E4%B8%BB%E5%9B%BE.jpg"></image> |
|
|
|
<image class="wp100 img" mode="widthFix" |
|
|
|
|
|
|
|
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E5%8A%A9%E5%8A%9B%E4%B8%BB%E5%9B%BE.jpg"> |
|
|
|
|
|
|
|
</image> |
|
|
|
<view class="relative tip">邀请好友帮助你进行助力即可有机会领取奖品</view> |
|
|
|
<view class="relative tip">邀请好友帮助你进行助力即可有机会领取奖品</view> |
|
|
|
<view class="relative help_div"> |
|
|
|
<view class="relative help_div"> |
|
|
|
<!-- --> |
|
|
|
<!-- --> |
|
|
@ -11,17 +13,17 @@ |
|
|
|
<view v-if="winnerInfo.awards != undefined" class="relative help_tip" style="font-size: 40rpx;"> |
|
|
|
<view v-if="winnerInfo.awards != undefined" class="relative help_tip" style="font-size: 40rpx;"> |
|
|
|
{{winnerInfo.awards}} |
|
|
|
{{winnerInfo.awards}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="help_list"> |
|
|
|
<view class="p20"> |
|
|
|
<view v-for="item in helpUserList" class="help_item"> |
|
|
|
<u-grid :border="false" col="3"> |
|
|
|
<u-avatar class="help_item_avatar" :src="item.avatarUrl"></u-avatar> |
|
|
|
<u-grid-item v-for="(item, index) in helpUserList" :key="index"> |
|
|
|
|
|
|
|
<u-avatar v-if="item.id" class="p10tb border" size="120rpx" :src="item.avatarUrl"></u-avatar> |
|
|
|
<!-- <view class="help_item_2_yao"> |
|
|
|
<view v-else class="p10tb"> |
|
|
|
<image :src="item.avatarUrl"></image> |
|
|
|
<view class="avatar-text"> |
|
|
|
</view> --> |
|
|
|
<u-avatar bg-color="#fff" color="#ccc" size="120rpx" text="邀"></u-avatar> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-for="item in diffNum" class="help_item_2"> |
|
|
|
|
|
|
|
<view class="help_item_2_yao">邀</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</u-grid-item> |
|
|
|
|
|
|
|
</u-grid> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="help_btn"> |
|
|
|
<view class="help_btn"> |
|
|
|
<button open-type="share" class="help_btn_font"> 邀请好友助力</button> |
|
|
|
<button open-type="share" class="help_btn_font"> 邀请好友助力</button> |
|
|
@ -30,8 +32,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="type == 2" class="relative help_card"> |
|
|
|
<view v-if="type == 2" class="relative help_card"> |
|
|
|
<view class="relative help_list" style="top: 200rpx;"> |
|
|
|
<view class="relative help_list" style="top: 200rpx;"> |
|
|
|
<view v-if="winnerInfo.activityName != undefined" class="help_tip" style="font-size: 40rpx; margin: 25rpx 0rpx;"> |
|
|
|
<view v-if="winnerInfo?.activityName" class="help_tip" |
|
|
|
{{winnerInfo.activityName}} |
|
|
|
style="font-size: 40rpx; margin: 25rpx 0rpx;"> |
|
|
|
|
|
|
|
{{winnerInfo?.activityName}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="winnerInfo.schoolName != undefined" class="help_tip"> |
|
|
|
<view v-if="winnerInfo.schoolName != undefined" class="help_tip"> |
|
|
|
举办单位:{{winnerInfo.schoolName}} |
|
|
|
举办单位:{{winnerInfo.schoolName}} |
|
|
@ -42,7 +45,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="help_btn"> |
|
|
|
<view class="help_btn"> |
|
|
|
<button class="help_btn_font" open-type="chooseAvatar" @chooseavatar="handleHelp" :disabled="disBtn">帮好友助力</button> |
|
|
|
<button class="help_btn_font" open-type="chooseAvatar" @chooseavatar="handleHelp" |
|
|
|
|
|
|
|
:disabled="disBtn">帮好友助力</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -51,16 +55,18 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
import { queryActivityDetail,queryHelpInfo, saveHelpInfo, queryWinnerInfo } from '@/jtools/api/activity' |
|
|
|
import { |
|
|
|
|
|
|
|
queryActivityDetail, |
|
|
|
|
|
|
|
queryHelpInfo, |
|
|
|
|
|
|
|
saveHelpInfo, |
|
|
|
|
|
|
|
queryWinnerInfo |
|
|
|
|
|
|
|
} from '@/jtools/api/activity' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
winnerId: undefined, |
|
|
|
winnerId: undefined, |
|
|
|
btnText: '点我刮奖', |
|
|
|
|
|
|
|
showBtn: true, |
|
|
|
|
|
|
|
helpUserList: [], |
|
|
|
helpUserList: [], |
|
|
|
drawNum: 0, |
|
|
|
drawNum: 0, |
|
|
|
diffNum: 3, |
|
|
|
|
|
|
|
phone: undefined, |
|
|
|
phone: undefined, |
|
|
|
type: 2, |
|
|
|
type: 2, |
|
|
|
winnerInfo: undefined, |
|
|
|
winnerInfo: undefined, |
|
|
@ -68,7 +74,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(op) { |
|
|
|
onLoad(op) { |
|
|
|
|
|
|
|
|
|
|
|
this.winnerId = op.id |
|
|
|
this.winnerId = op.id |
|
|
|
// this.type = op.type ? Number(op.type) : 1 |
|
|
|
// this.type = op.type ? Number(op.type) : 1 |
|
|
|
this.phone = useUserStore().userInfo?.phone || undefined |
|
|
|
this.phone = useUserStore().userInfo?.phone || undefined |
|
|
@ -91,18 +96,9 @@ |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//查询中奖信息 |
|
|
|
//查询中奖信息 |
|
|
|
getWinnerInfo() { |
|
|
|
getWinnerInfo() { |
|
|
|
// uni.request({ |
|
|
|
queryWinnerInfo({ |
|
|
|
// url: 'http://192.168.1.6:8089/applet/activity/winner/info?winnerId='+this.winnerId |
|
|
|
winnerId: this.winnerId |
|
|
|
// }).then(resp => { |
|
|
|
}).then(resp => { |
|
|
|
// if(resp.data.code == 200) { |
|
|
|
|
|
|
|
// console.log(resp) |
|
|
|
|
|
|
|
// this.winnerInfo = resp.data.data; |
|
|
|
|
|
|
|
// if(this.phone && this.winnerInfo.phone == this.phone){ |
|
|
|
|
|
|
|
// this.type == 1 |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
queryWinnerInfo({winnerId : this.winnerId}).then(resp => { |
|
|
|
|
|
|
|
if (resp.code == 200) { |
|
|
|
if (resp.code == 200) { |
|
|
|
console.log(resp) |
|
|
|
console.log(resp) |
|
|
|
this.winnerInfo = resp.data; |
|
|
|
this.winnerInfo = resp.data; |
|
|
@ -117,34 +113,24 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//查询助力信息 |
|
|
|
//查询助力信息 |
|
|
|
getHelpInfo() { |
|
|
|
getHelpInfo() { |
|
|
|
// uni.request({ |
|
|
|
queryHelpInfo({ |
|
|
|
// url: 'http://192.168.1.6:8089/applet/activity/help/info?winnerId='+this.winnerId |
|
|
|
winnerId: this.winnerId |
|
|
|
// }).then(resp => { |
|
|
|
}).then(resp => { |
|
|
|
// if(resp.data.code == 200) { |
|
|
|
|
|
|
|
// console.log(resp) |
|
|
|
|
|
|
|
// this.drawNum = resp.data.data.helpNum; |
|
|
|
|
|
|
|
// this.helpUserList = resp.data.data.helpUsers |
|
|
|
|
|
|
|
// this.diffNum = (this.drawNum - this.helpUserList.length) < 0 ? 0 : (this.drawNum - this.helpUserList.length); |
|
|
|
|
|
|
|
// console.log(this.drawNum) |
|
|
|
|
|
|
|
// console.log(this.diffNum) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
queryHelpInfo({winnerId : this.winnerId}).then(resp => { |
|
|
|
|
|
|
|
if (resp.code == 200) { |
|
|
|
if (resp.code == 200) { |
|
|
|
console.log(resp) |
|
|
|
|
|
|
|
this.drawNum = resp.data.helpNum; |
|
|
|
this.drawNum = resp.data.helpNum; |
|
|
|
this.helpUserList = resp.data.helpUsers.map(item => ({ |
|
|
|
const list = resp.data.helpUsers.map(item => ({ |
|
|
|
...item, |
|
|
|
...item, |
|
|
|
avatarUrl: 'https://jwl.ahduima.com' + item.avatarUrl |
|
|
|
avatarUrl: 'https://jwl.ahduima.com' + item.avatarUrl |
|
|
|
})); |
|
|
|
})); |
|
|
|
this.diffNum = (this.drawNum - this.helpUserList.length) < 0 ? 0 : (this.drawNum - this.helpUserList.length); |
|
|
|
this.diffNum = (this.drawNum - list.length) < 0 ? 0 : (this.drawNum - list.length); |
|
|
|
|
|
|
|
const arr = new Array(this.diffNum).fill({}) |
|
|
|
|
|
|
|
this.helpUserList = [...list,...arr] |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//点击助力 |
|
|
|
//点击助力 |
|
|
|
handleHelp(e) { |
|
|
|
handleHelp(e) { |
|
|
|
this.disBtn = false |
|
|
|
this.disBtn = false |
|
|
|
console.log(e) |
|
|
|
|
|
|
|
uni.login({ |
|
|
|
uni.login({ |
|
|
|
provider: 'weixin', //使用微信登录 |
|
|
|
provider: 'weixin', //使用微信登录 |
|
|
|
success: (loginRes) => { |
|
|
|
success: (loginRes) => { |
|
|
@ -191,6 +177,7 @@ |
|
|
|
.img { |
|
|
|
.img { |
|
|
|
top: -130rpx !important; |
|
|
|
top: -130rpx !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tip { |
|
|
|
.tip { |
|
|
|
height: 75px; |
|
|
|
height: 75px; |
|
|
|
font-family: PingFang SC; |
|
|
|
font-family: PingFang SC; |
|
|
@ -201,6 +188,13 @@ |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
font-size: 35rpx; |
|
|
|
font-size: 35rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.avatar-text { |
|
|
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
|
|
border: 1px dashed #ccc; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.help_div { |
|
|
|
.help_div { |
|
|
|
width: 710rpx; |
|
|
|
width: 710rpx; |
|
|
|
height: 996rpx; |
|
|
|
height: 996rpx; |
|
|
@ -233,51 +227,6 @@ |
|
|
|
margin: 68rpx 25rpx 25rpx 20rpx; |
|
|
|
margin: 68rpx 25rpx 25rpx 20rpx; |
|
|
|
height: 580rpx; |
|
|
|
height: 580rpx; |
|
|
|
|
|
|
|
|
|
|
|
.help_item{ |
|
|
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
|
|
padding: 35rpx; |
|
|
|
|
|
|
|
width: 194rpx; |
|
|
|
|
|
|
|
height: 194rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.help_item_avatar{ |
|
|
|
|
|
|
|
margin: auto; |
|
|
|
|
|
|
|
width: 56rpx; |
|
|
|
|
|
|
|
height: 56rpx; |
|
|
|
|
|
|
|
color: #CCCCCC; |
|
|
|
|
|
|
|
background: #C42E13; |
|
|
|
|
|
|
|
border: 4px solid #C42E13; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image{ |
|
|
|
|
|
|
|
height: 45px; |
|
|
|
|
|
|
|
width: 45px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.help_item_2{ |
|
|
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
|
|
margin: 35rpx; |
|
|
|
|
|
|
|
width: 124rpx; |
|
|
|
|
|
|
|
height: 124rpx; |
|
|
|
|
|
|
|
border: 2px dotted #CCCCCC; |
|
|
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.help_item_2_yao{ |
|
|
|
|
|
|
|
margin: 34rpx 33rpx; |
|
|
|
|
|
|
|
width: 56rpx; |
|
|
|
|
|
|
|
height: 56rpx; |
|
|
|
|
|
|
|
font-size: 60rpx; |
|
|
|
|
|
|
|
font-family: PingFang SC; |
|
|
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
|
|
color: #CCCCCC; |
|
|
|
|
|
|
|
line-height: 48rpx; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.help_btn { |
|
|
|
.help_btn { |
|
|
|