...
|
...
|
@@ -25,7 +25,7 @@ |
|
|
<view class='frame_item frame_item0' :style='{"opacity":color[0].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/jichange.png" mode=""></image>
|
|
|
<image :src="color[0].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[0].name}}
|
...
|
...
|
@@ -34,7 +34,7 @@ |
|
|
<view class='frame_item frame_item1' :style='{"opacity":color[1].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presenty.png" mode=""></image>
|
|
|
<image :src="color[1].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[1].name}}
|
...
|
...
|
@@ -43,7 +43,7 @@ |
|
|
<view class='frame_item frame_item2' :style='{"opacity":color[2].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentkai.png" mode=""></image>
|
|
|
<image :src="color[2].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[2].name}}
|
...
|
...
|
@@ -55,7 +55,7 @@ |
|
|
<view class='frame_item frame_item7' :style='{"opacity":color[7].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentm.png" mode=""></image>
|
|
|
<image :src="color[7].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[7].name}}
|
...
|
...
|
@@ -69,7 +69,7 @@ |
|
|
<view class='frame_item frame_item3' :style='{"opacity":color[3].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentxin.png" mode=""></image>
|
|
|
<image :src="color[3].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[3].name}}
|
...
|
...
|
@@ -81,7 +81,7 @@ |
|
|
<view class='frame_item frame_item6' :style='{"opacity":color[6].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentf.png" mode=""></image>
|
|
|
<image :src="color[6].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[6].name}}
|
...
|
...
|
@@ -90,7 +90,7 @@ |
|
|
<view class='frame_item frame_item5' :style='{"opacity":color[5].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentred.png" mode=""></image>
|
|
|
<image :src="color[5].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[5].name}}
|
...
|
...
|
@@ -99,7 +99,7 @@ |
|
|
<view class='frame_item frame_item4' :style='{"opacity":color[4].opa}'>
|
|
|
|
|
|
<view class="img">
|
|
|
<image src="../../static/presentf.png" mode=""></image>
|
|
|
<image :src="color[4].image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
{{color[4].name}}
|
...
|
...
|
@@ -110,10 +110,11 @@ |
|
|
<!-- 砸金蛋 -->
|
|
|
<view class="eggcontent" v-if="tab==2">
|
|
|
<view class='egglist flexone'>
|
|
|
<view class="eggimg">
|
|
|
<image src="../../static/zhengdan.png" mode=""></image>
|
|
|
<view class="eggimg" v-for="(item,index) in color" :key="index" @click="zadan(item,index)">
|
|
|
<image src="../../static/bandan.png" mode="" v-if="item.chose==true"></image>
|
|
|
<image src="../../static/zhengdan.png" mode="" v-else></image>
|
|
|
</view>
|
|
|
<view class="eggimg">
|
|
|
<!-- <view class="eggimg">
|
|
|
<image src="../../static/zhengdan.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="eggimg">
|
...
|
...
|
@@ -133,7 +134,7 @@ |
|
|
</view>
|
|
|
<view class="eggimg">
|
|
|
<image src="../../static/zhengdan.png" mode=""></image>
|
|
|
</view>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
<view class="everytime">每次砸金蛋将消耗5积分</view>
|
|
|
|
...
|
...
|
@@ -152,7 +153,7 @@ |
|
|
<view class="gifimg">
|
|
|
<image src="../../static/imggift.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="giftname">零食大礼包</view>
|
|
|
<view class="giftname">{{text}}</view>
|
|
|
<view class="containue" @click="clickLucks()">继续抽奖</view>
|
|
|
</view>
|
|
|
<view class="chahao" @click="hidegift">
|
...
|
...
|
@@ -213,7 +214,8 @@ |
|
|
btnconfirm: '../../static/dianjichoujiangd.png',
|
|
|
clickLuck: 'clickLuck',
|
|
|
luckPosition: 0,
|
|
|
giftshow:false
|
|
|
giftshow:false,
|
|
|
text:''
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -246,7 +248,7 @@ |
|
|
// 获取抽奖列表
|
|
|
getdrawlist(){
|
|
|
let that = this;
|
|
|
var url = 'gift/extract';
|
|
|
var url = 'gift/get_gift';
|
|
|
console.log('获取的参数', that.seldata)
|
|
|
var params = {
|
|
|
extract_model_id:that.tab
|
...
|
...
|
@@ -254,12 +256,46 @@ |
|
|
console.log(params)
|
|
|
app.post(url, params, "post").then((res) => {
|
|
|
console.log(res);
|
|
|
|
|
|
let gift=res.data.data;
|
|
|
|
|
|
gift.forEach(function(value,index,array){
|
|
|
value.opa=0.5;
|
|
|
value.chose=false
|
|
|
})
|
|
|
that.color=gift;
|
|
|
|
|
|
|
|
|
|
|
|
// that.goodinfo=res.data.data;
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
})
|
|
|
},
|
|
|
// 砸蛋
|
|
|
zadan(item,index){
|
|
|
let that = this;
|
|
|
item.chose=true;
|
|
|
var url = 'gift/extract';
|
|
|
var params = {
|
|
|
extract_model_id:that.tab
|
|
|
}
|
|
|
console.log('123456',item.name)
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res);
|
|
|
uni.showToast({
|
|
|
title:'恭喜砸中'+item.name,
|
|
|
icon:'none'
|
|
|
})
|
|
|
// uni.showToast({
|
|
|
// title:'恭喜砸中'+item.name,
|
|
|
// icon:none
|
|
|
// })
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//点击抽奖按钮
|
|
|
clickLucks: function() {
|
|
|
|
...
|
...
|
@@ -346,6 +382,8 @@ |
|
|
//1秒后显示弹窗
|
|
|
setTimeout(function() {
|
|
|
if (which == 0) {
|
|
|
e.text= e.color[which].name
|
|
|
console.log( e.color[which].name)
|
|
|
e.giftshow=true;
|
|
|
e.clickLuck = 'clickLuck';
|
|
|
//中奖
|
...
|
...
|
|