Commit 28318b3a authored by ziyu's avatar ziyu

improvement: 合并master

parent 7bb7f92b
......@@ -337,7 +337,7 @@
},
toRaffle() {
wx.navigateTo({
url: '/pages/raffle'
url: '/pages/raffle?id=1&progress=70&chance=1/780&corn=50000&imgsrc=/static/images/test2.png&goods=Nintendo Switch任天堂游戏机任天堂游戏机'
});
},
touchStart (event) {
......
......@@ -118,12 +118,12 @@
<template>
<view class="raffle-wrapper">
<view class="raffle-content">
<image class="img" src="/static/images/test2.png"></image>
<image class="img" src="{{goodsimg}}"></image>
<view class="goodsinfo">
<text class="text">Nintendo Switch任天堂游戏机任天堂游戏机</text>
<text class="money">30000克币</text>
<text class="text">{{goods}}</text>
<text class="money">{{corn}}克币</text>
</view>
<view class="raffle-chance">中奖概率: 1/300</view>
<view class="raffle-chance">中奖概率: {{chance}}</view>
<view class="raffle-progress">中奖进度:
<view class="progress">
<view class="orange" style="{{progressStyle}}"></view>
......@@ -144,9 +144,14 @@
import Dialog from '../components/vant/dialog/dialog';
wepy.page({
data: {
progress:40,
progressStyle:'width:40%',
progress:0,
progressStyle:'',
isCheck:false,
id:null,
corn:'',
goods:'',
chance:'',
goodsimg:'',
},
methods: {
check() {
......@@ -194,7 +199,18 @@
}
}
},
onLoad () {
onLoad (query) {
console.log(query);
let {id,corn,goods,chance,imgsrc,progress} = query;
if(progress) {
this.progress = progress;
this.progressStyle = 'width:'+progress+'%';
}
this.id = id;
this.corn = corn;
this.goods = goods;
this.chance = chance;
this.goodsimg = imgsrc;
},
});
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment