|
@@ -56,13 +56,13 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 一等奖 -->
|
|
|
- <view v-for="(item,index) in awardsList" :key="index">
|
|
|
+ <view v-for="(item,index) in awardsList" :key="item.id">
|
|
|
<view class="wrap-fixed" v-for="(itemTwo,index1) in item.prizeList" :key="index1"
|
|
|
v-if="item.name == '一等奖'">
|
|
|
<view class="wrap-fixed-effectstwo">
|
|
|
<view class="effectsthree">
|
|
|
<navigator
|
|
|
- :url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
|
|
|
+ :url="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
|
|
|
hover-class="none">
|
|
|
<view class="effectsthree-width">
|
|
|
<image src="../static/activity/effectsthree.png" mode="aspectFit"></image>
|
|
@@ -127,7 +127,7 @@
|
|
|
</navigator>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
|
|
|
+ <view v-if="item.prizeList && item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -137,7 +137,7 @@
|
|
|
<!-- 抽奖码 -->
|
|
|
<view class="wrap-description">
|
|
|
<view class="wrap-description-code"> 我的抽奖码</view>
|
|
|
- <view v-if="info.codeList.length > 0" class="wrap-description-codetwo">
|
|
|
+ <view v-if="info.codeList && info.codeList.length > 0" class="wrap-description-codetwo">
|
|
|
<view class="codeList" v-for="(item,index) in info.codeList" :key="index">
|
|
|
<view class="codeList-bottom">{{item}}</view>
|
|
|
</view>
|
|
@@ -198,8 +198,8 @@
|
|
|
<view class="footer-fixed">
|
|
|
<view class="flex btn">
|
|
|
<button type="default" v-if="info.codeType == 1 && info.codeList.length < 1"
|
|
|
- @click="exChangeCode">立即参与抽奖</button>
|
|
|
- <button type="default" class="buttoncol" v-else>请在微信“码上快购”小程序分享助力</button>
|
|
|
+ @click="exChangeCodeH5">立即参与抽奖</button>
|
|
|
+ <button type="default" @click="toWeChatProgram" class="buttoncol" v-else>请在微信“码上快购”小程序分享助力</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
@@ -389,6 +389,16 @@
|
|
|
})
|
|
|
this.exChange()
|
|
|
},
|
|
|
+ exChangeCodeH5() {
|
|
|
+ $http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, {}).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.getDetail()
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.$u.toast('参与成功,您已获得1个抽奖码');
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
close() {
|
|
|
//弹出层收起
|
|
|
// this.popupShow = false
|
|
@@ -403,6 +413,11 @@
|
|
|
url: `/packageOperate/activity/wxofficial`
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ //跳转微信小程序
|
|
|
+ toWeChatProgram() {
|
|
|
+ // location.href = 'weixin://dl/business/?t=xxxxxx'
|
|
|
+ },
|
|
|
|
|
|
getBaseInfo() {
|
|
|
$http.post('/api/v1/mp/user/getLoginUserinfo', {
|