-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
165 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
export default { | ||
pages: [ | ||
'pages/index/index', | ||
'pages/turntable/index', | ||
'pages/marquee/index', | ||
'pages/squarenine/index', | ||
'pages/luckshake/index', | ||
'pages/giftbox/index', | ||
'pages/lottoroll/index', | ||
'pages/guessgift/index', | ||
'pages/scratchcard/index', | ||
'pages/shakedice/index', | ||
'pages/giftrain/index', | ||
"pages/index/index", | ||
"pages/turntable/index", | ||
"pages/marquee/index", | ||
"pages/squarenine/index", | ||
"pages/luckshake/index", | ||
"pages/giftbox/index", | ||
"pages/lottoroll/index", | ||
"pages/guessgift/index", | ||
"pages/scratchcard/index", | ||
"pages/shakedice/index", | ||
"pages/giftrain/index", | ||
"pages/dollmachine/index", | ||
], | ||
window: { | ||
backgroundTextStyle: 'light', | ||
navigationBarBackgroundColor: '#fff', | ||
navigationBarTitleText: 'NutUI-Bingo', | ||
navigationBarTextStyle: 'black' | ||
backgroundTextStyle: "light", | ||
navigationBarBackgroundColor: "#fff", | ||
navigationBarTitleText: "NutUI-Bingo", | ||
navigationBarTextStyle: "black", | ||
}, | ||
}; |
3 changes: 3 additions & 0 deletions
3
src/sites/mobile-taro/vue/src/pages/dollmachine/index.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
navigationBarTitleText: "Dollmachine", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
<div class="demo"> | ||
<h2>基础用法</h2> | ||
<div class="show-demo"> | ||
<nutbig-doll-machine | ||
ref="lottoRollDom" | ||
:prize-list="prizeList" | ||
:prize-index="prizeIndex" | ||
@start-turns="startTurns" | ||
@end-turns="endTurns" | ||
> | ||
</nutbig-doll-machine> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { reactive, ref } from "vue"; | ||
export default { | ||
props: {}, | ||
setup() { | ||
const lottoRollDom: any = ref(null); | ||
const prizeList = reactive([ | ||
{ | ||
imagePath: | ||
"https://img11.360buyimg.com/imagetools/jfs/t1/147182/12/2440/6194/5f06cde6Ead240fe8/31082e30a182a5ce.png", | ||
text: "大鸡腿", | ||
}, | ||
{ | ||
imagePath: | ||
"https://img12.360buyimg.com/imagetools/jfs/t1/221361/4/7410/16458/61c9261eE45802396/27b64caa9e7c9bac.png", | ||
text: "JOY", | ||
}, | ||
{ | ||
imagePath: | ||
"https://img11.360buyimg.com/imagetools/jfs/t1/128607/26/6643/6790/5f06cd27E9b5e15f7/7509bc7ce2da66b8.png", | ||
text: "VIP", | ||
}, | ||
{ | ||
imagePath: | ||
"https://img12.360buyimg.com/imagetools/jfs/t1/221361/4/7410/16458/61c9261eE45802396/27b64caa9e7c9bac.png", | ||
text: "JOY", | ||
}, | ||
]); | ||
// 中奖的奖品的index(此数据可根据后台返回的值重新赋值) | ||
const prizeIndex = ref(3); | ||
const startTurns = () => { | ||
console.log("开始抽奖"); | ||
}; | ||
const endTurns = () => { | ||
console.log("抽奖结束"); | ||
setTimeout(() => { | ||
setTimeout(() => { | ||
lottoRollDom.value.init(); | ||
}, 300); | ||
}, 4500); | ||
}; | ||
return { | ||
lottoRollDom, | ||
prizeList, | ||
prizeIndex, | ||
startTurns, | ||
endTurns, | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
#app .demo { | ||
padding: 57px 0 0 0; | ||
} | ||
.show-demo { | ||
background: #ffffff; | ||
} | ||
h2 { | ||
padding: 0 20px; | ||
} | ||
</style> |