Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

edit #37

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13,925 changes: 7,918 additions & 6,007 deletions package-lock.json

Large diffs are not rendered by default.

Binary file modified src/assets/img/congratulation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/congratulation_origin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/gaodian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/huoguo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/kuaican.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/miantiao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/shitang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/shuiguo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/suiji.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/waimai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions src/components/config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
export const prizeList = [
{
icon: require("../assets/img/bean_500.png"), // 奖品图片
name: "奖品1", // 奖品名称
icon: require("../assets/img/huoguo.png"), // 奖品图片
name: "火锅", // 奖品名称
isPrize: 1 // 该奖项是否为奖品
},
{
icon: require("../assets/img/bean_five.png"),
name: "奖品2",
icon: require("../assets/img/kuaican.png"),
name: "快餐",
isPrize: 1
},
{
icon: require("../assets/img/bean_one.png"),
name: "奖品3",
icon: require("../assets/img/shuiguo.png"),
name: "水果甜品",
isPrize: 1
},
{
icon: require("../assets/img/point_five.png"),
name: "奖品4",
icon: require("../assets/img/gaodian.png"),
name: "糕点",
isPrize: 1
},
{
icon: require("../assets/img/point_ten.png"),
name: "奖品5",
icon: require("../assets/img/miantiao.png"),
name: "面条",
isPrize: 1
},
{
icon: require("../assets/img/bean_500.png"),
name: "奖品6",
icon: require("../assets/img/waimai.png"),
name: "外卖",
isPrize: 1
},
{
icon: require("../assets/img/give_up.png"),
name: "奖品7",
icon: require("../assets/img/shitang.png"),
name: "食堂",
isPrize: 0
},
{
icon: require("../assets/img/bean_500.png"),
name: "奖品8",
icon: require("../assets/img/suiji.png"),
name: "随机",
isPrize: 1
}
]
16 changes: 7 additions & 9 deletions src/components/luckywheel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
<div class="main-bg"></div>
<div class="bg-p"></div>
<div class="content">
<div class="count">今日免费抽奖次数: {{ count}}</div>
<div class="count">剩余抽取次数: {{ count}}</div>
</div>
<div class="tip">
<div class="tip-title">活动规则</div>
<div class="tip-title">抽奖说明</div>
<div class="tip-content">
<p>1.每日签到后,即可获得一次幸运大转盘的机会,仅限当天有效,过期作废。 2.金币抽奖,每10个金豆可兑换一次大转盘机会。</p>
<p>2.金币抽奖,每10个金豆可以兑换一次大转盘抽奖机会</p>
<p>3.所中金豆或积分到【我的账户】中查询。累计达到100金豆及以上,可以兑换相应奖品</p>
<p>1.告别吃饭选择困难。</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -64,7 +62,7 @@ const config = {
export default {
data() {
return {
count: 10, // 剩余抽奖次数
count:99, // 剩余抽奖次数
duration: 3000, // 转盘旋转时间
prizeList: [], // 奖品列表
rotateAngle: 0, // 旋转角度
Expand Down Expand Up @@ -93,8 +91,8 @@ export default {
},
toastTitle () {
return this.prize && this.prize.isPrize === 1
? "恭喜您,获得" +
this.prize.name
? "系统推荐您今天吃" +
this.prize.name + "!"
: "未中奖";
},
toastIcon() {
Expand Down Expand Up @@ -141,7 +139,7 @@ export default {
beginRotate() {
// 添加次数校验

if(this.count === 0) return
// if(this.count === 0) return

// 开始抽奖
// 这里这里向服务端发起请求,得到要获得的奖
Expand Down