添加新文件
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
lightImages: ["/static/turntable/zz.png", "/static/turntable/turntable.png"],
|
||||
prizes: [
|
||||
{
|
||||
name: "积分",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "50积分"
|
||||
},
|
||||
{
|
||||
name: "积分",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "100积分"
|
||||
},
|
||||
{
|
||||
name: "优惠券",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "15元优惠券"
|
||||
},
|
||||
{
|
||||
name: "家用电器",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "微波炉"
|
||||
},
|
||||
{
|
||||
name: "谢谢参与",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "15元优惠券"
|
||||
},
|
||||
{
|
||||
name: "办公用品",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "机械键盘"
|
||||
},
|
||||
{
|
||||
name: "生活用品",
|
||||
image: "/static/turntable/record.png",
|
||||
pro: "化妆刷"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
startWheel() {
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
Click() {
|
||||
common_vendor.index.__f__("log", "at pages/LuckyWheel/LuckyWheel.vue:68", "用户点击了转盘");
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
Done(prize) {
|
||||
common_vendor.index.__f__("log", "at pages/LuckyWheel/LuckyWheel.vue:72", "抽奖结束,中奖奖品:", prize);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_dengbo_lotteryWheel2 = common_vendor.resolveComponent("dengbo-lotteryWheel");
|
||||
(_easycom_up_image2 + _easycom_dengbo_lotteryWheel2)();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_dengbo_lotteryWheel = () => "../../uni_modules/dengbo-lotteryWheel/components/dengbo-lotteryWheel/dengbo-lotteryWheel.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_image + _easycom_dengbo_lotteryWheel)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_assets._imports_0,
|
||||
b: common_vendor.o($options.startWheel),
|
||||
c: common_vendor.p({
|
||||
src: "/static/turntable/zz.png",
|
||||
width: "40",
|
||||
height: "40",
|
||||
mode: "widthFix"
|
||||
}),
|
||||
d: common_vendor.sr("luckyWheel", "664c6c6b-0"),
|
||||
e: common_vendor.o($options.Click),
|
||||
f: common_vendor.o($options.Done),
|
||||
g: common_vendor.p({
|
||||
prizes: $data.prizes,
|
||||
size: 626,
|
||||
duration: 5e3,
|
||||
lightImgs: $data.lightImages,
|
||||
customStyle: "borderRadius: 50%;"
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/LuckyWheel/LuckyWheel.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"dengbo-lottery-wheel": "../../uni_modules/dengbo-lotteryWheel/components/dengbo-lotteryWheel/dengbo-lotteryWheel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="content"><view class="lottery"><dengbo-lottery-wheel wx:if="{{g}}" class="r" u-s="{{['bg','pointer']}}" bindrun="{{e}}" binddone="{{f}}" u-r="luckyWheel" u-i="664c6c6b-0" bind:__l="__l" u-p="{{g}}"><image src="{{a}}" style="width:100%;height:100%" slot="bg"/><up-image bindclick="{{b}}" u-i="664c6c6b-1,664c6c6b-0" bind:__l="__l" u-p="{{c}}" slot="pointer"></up-image></dengbo-lottery-wheel></view></view>
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
.content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lottery {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 626rpx;
|
||||
height: 626rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user