Commit ddf981d9 authored by wangzhujun's avatar wangzhujun

tanchuang

parent 5929d98d
...@@ -17,17 +17,8 @@ __webpack_require__.r(__webpack_exports__); ...@@ -17,17 +17,8 @@ __webpack_require__.r(__webpack_exports__);
// 活动攻略 // 活动攻略
const app = getApp(); const app = getApp();
Component({ Component({
data: { data: {},
lastScanTimes: 0
},
properties: {}, properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
},
methods: { methods: {
onModalClose() { onModalClose() {
this.triggerEvent("onModalClose", 'actRule'); this.triggerEvent("onModalClose", 'actRule');
......
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/drawModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/drawModal/index.js":
/*!*********************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/drawModal/index.js ***!
\*********************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp();
let speed = 150;
let rate0 = 1;
let rate1 = 1;
let rate2 = 1;
let round0 = 0;
let round2 = 0;
let round1 = 0;
Component({
data: {
list: ["top:0rpx", "top:-248rpx", "top:-496rpx"],
prizeList: ["//yun.duiba.com.cn/aurora/assets/df01955f333b67a439987511b5f63ab930c2972c.png", "//yun.duiba.com.cn/aurora/assets/53b167835b33463fcafae884df1e334397c0976d.png", "//yun.duiba.com.cn/aurora/assets/67eca6d481505b413e61ec6ff38ade2076dc2ab0.png", "//yun.duiba.com.cn/aurora/assets/12fbdd91059aba8cbf27a78725cac9ff6b8d29d1.png", "//yun.duiba.com.cn/aurora/assets/16f3321f51561eecaaec9a15baeb9aff251530ac.png", "//yun.duiba.com.cn/aurora/assets/7c3a2642cbecd4a006baf4d0fc67a8fb059c303a.png"]
},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'draw');
},
onClickBtn() {
speed = 150;
rate0 = 1;
rate1 = 1;
rate2 = 1;
round0 = 0;
round2 = 0;
round1 = 0;
this.itemMove(0, 3);
setTimeout(() => {
this.itemMove(1, 2);
}, 500);
setTimeout(() => {
this.itemMove(2, 5);
}, 1000);
// this.itemMove(2, 5)
},
itemMove(id, index) {
let roundNum = 0;
if (id == 0) {
roundNum = round0;
} else if (id == 1) {
roundNum = round1;
} else if (id == 2) {
roundNum = round2;
}
let rateList = [rate0, rate1, rate2];
if (roundNum == 3) {
rateList[id] -= 0.05;
if (rateList[id] < 0.1) {
rateList[id] = 0.1;
}
let hightTop = Number(this.data.list[id].replace(/[^\d.-]/g, "")) - speed * rateList[id];
let hightLab = "top:" + hightTop + "rpx";
if (hightTop <= -248 * index) {
hightLab = "top:" + -248 * index + "rpx";
let listInfo = this.data.list;
listInfo[id] = hightLab;
// console.log("listInfo3", id, listInfo)
setTimeout(() => {
this.setData({
list: listInfo
});
}, 100);
if (id == 2) {
setTimeout(() => {
this.triggerEvent("onModalClose", 'draw');
this.triggerEvent("onModalPrize", {
prizeId: "thanks",
optionName: "地方BNSF扣税的备份库",
optionImg: "//yun.duiba.com.cn/polaris/arshare.edd28926120dd3b64679dcaf5e648ee5cd03f493.png"
});
// if (this.prizeData.prizeId != "thanks") {
// modalStore.pushPop("Lh_prizepop", this.prizeData)
// } else {
// modalStore.pushPop("Lh_noprizepop")
// }
}, 1000);
}
} else {
let listInfo = this.data.list;
listInfo[id] = hightLab;
// console.log("listInfo2", id, listInfo)
this.setData({
list: listInfo
}, () => {
setTimeout(() => {
this.itemMove(id, index);
}, 20);
});
// window.requestAnimationFrame(() => this.itemMove(id, index))
}
} else {
let hightTop = Number(this.data.list[id].replace(/[^\d.-]/g, "")) - speed;
// console.log(hightTop, Number(this.data.list[id].replace(/[^\d.-]/g, "")))
let hightLab = "top:" + hightTop + "rpx";
// console.log(hightTop)
if (hightTop <= -248 * this.data.prizeList.length) {
if (id == 0) {
round0++;
} else if (id == 1) {
round1++;
} else if (id == 2) {
round2++;
}
// this["round" + id]++
hightLab = "top:0rpx";
}
let listInfo = this.data.list;
listInfo[id] = hightLab;
// console.log("listInfo1", id, listInfo)
this.setData({
list: listInfo
}, () => {
setTimeout(() => {
this.itemMove(id, index);
}, 20);
});
// window.requestAnimationFrame(() => this.itemMove(id, index))
}
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
<view class="drawModal">
<view class="drawContainer">
<view class="drawlight"></view>
<view class="drawbg"></view>
<view class="darwbtn" bind:tap="onClickBtn"></view>
<text class="drawNum">剩余抽奖次数:2</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="*this">
<view class="drawList pos{{index+1}}" style="{{item}}">
<view wx:for="{{prizeList}}" class="itembg" wx:key="*this">
<image class="itemImg" src="{{item}}"></image>
</view>
</view>
</view>
</view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.drawModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.drawContainer {
width: 750rpx;
height: 1278rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.drawlight {
width: 750rpx;
height: 1278rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawlight.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawbg {
width: 723rpx;
height: 730rpx;
left: 12rpx;
top: 289rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.darwbtn {
width: 292rpx;
height: 88rpx;
left: 226rpx;
top: 837rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/darwbtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawNum {
width: 100%;
height: 40rpx;
left: 0rpx;
top: 929rpx;
text-align: center;
position: absolute;
font-size: 21rpx;
color: #893c21;
}
.drawArea {
width: 390rpx;
height: 380rpx;
position: absolute;
left: 187rpx;
top: 432rpx;
overflow:hidden;
}
.drawList {
width: 115rpx;
height: 380rpx;
position: absolute;
}
.pos1 {
left: 0rpx;
top: 0rpx;
}
.pos2 {
left: 138rpx;
top: 0rpx;
}
.pos3 {
left: 276rpx;
top: 0rpx;
}
.itembg {
width: 115rpx;
height: 117rpx;
display: block;
position: relative;
left: 0rpx;
top: 0rpx;
margin-top: 131rpx;
}
.itemImg {
width: 115rpx;
height: 117rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 1042rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
var webpackRequire = require("./../../../../webpack-require"); var webpackRequire = require("./../../../../webpack-require");
webpackRequire( webpackRequire(
"./src/packages/wm-cloud-db_index/component/scanTipModal/index.js", "./src/packages/wm-cloud-db_index/component/drawNoPrizeModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, { Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/scanTipModal/index.js": /***/ "./src/packages/wm-cloud-db_index/component/drawNoPrizeModal/index.js":
/*!************************************************************************!*\ /*!****************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/scanTipModal/index.js ***! !*** ./src/packages/wm-cloud-db_index/component/drawNoPrizeModal/index.js ***!
\************************************************************************/ \****************************************************************************/
/*! no exports provided */ /*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
...@@ -14,25 +14,14 @@ Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, { ...@@ -14,25 +14,14 @@ Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js"); /* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp(); const app = getApp();
Component({ Component({
data: { data: {},
lastScanTimes: 0
},
properties: {}, properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
},
methods: { methods: {
onModalClose() { onModalClose() {
this.triggerEvent("onModalClose", 'scanTip'); this.triggerEvent("onModalClose", 'drawNoPrize');
},
scanRightNow() {
this.triggerEvent("scanRightNow");
} }
} }
}); });
......
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="drawNoPrizeModal">
<view class="drawNoPrizeContainer">
<view class="drawNoPrizelogo"></view>
<view class="drawNoPrizebg"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss'; @import '/cloud-reset-app.wxss';
.scanTipModal { .drawNoPrizeModal {
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 10; z-index: 10;
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
} }
.scanTipModalContainer { .drawNoPrizeContainer {
width: 746rpx; width: 750rpx;
height: 1036rpx; height: 825rpx;
top: 0rpx; top: 0rpx;
bottom: 0rpx; bottom: 0rpx;
left: 0rpx; left: 0rpx;
...@@ -19,51 +19,45 @@ ...@@ -19,51 +19,45 @@
position: absolute; position: absolute;
} }
.scanTipModalBg { .drawNoPrizelogo {
width: 746rpx; width: 147rpx;
height: 1236rpx; height: 147rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/9c3409e9dffc1a2372a418142a9ca154ded64293.png") no-repeat; left: 302rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizelogo.png") no-repeat;
background-position: top left; background-position: top left;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
} }
.scanTipModalText { .drawNoPrizebg {
width: 450rpx; width: 560rpx;
height: 50rpx; height: 445rpx;
left: 0rpx; left: 95rpx;
right: 0rpx; top: 264rpx;
top: 280rpx; background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizebg.png") no-repeat;
margin: auto; background-position: top left;
color: #b33800; background-size: 100% 100%;
font-size: 40rpx;
text-align: center;
font-weight: 500;
position: absolute; position: absolute;
} }
.darwNoPrizebtn {
.scanTipModalRightNow { width: 359rpx;
width: 395rpx;
height: 92rpx; height: 92rpx;
left: 0rpx; left: 196rpx;
right: 0rpx; top: 550rpx;
margin: auto; background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizebtn.png") no-repeat;
top: 410rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/7090d52c41f5e0fac35064a301b0c0aaf8cef803.png") no-repeat;
background-position: top left; background-position: top left;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
} }
.scanTipModalCloseBtn { .close{
width: 50rpx; width: 67rpx;
height: 50rpx; height: 67rpx;
left: 0rpx; left: 342rpx;
right: 0rpx; top: 760rpx;
top: 670rpx; background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left; background-position: top left;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
} }
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/drawPrizeModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/drawPrizeModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/drawPrizeModal/index.js ***!
\**************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp();
let speed = 150;
let rate0 = 1;
let rate1 = 1;
let rate2 = 1;
let round0 = 0;
let round2 = 0;
let round1 = 0;
Component({
data: {},
properties: {
prizeInfo: Object
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'drawPrize');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="drawprizeModal">
<view class="drawprizeContainer">
<view class="drawprizelight"></view>
<view class="drawprizebg"></view>
<view class="darwprizebtn" bind:tap="onModalClose"></view>
<text class="drawName">{{prizeInfo.optionName}}</text>
<view class="drawprizeimgbg">
<image class="itemImg" src="{{prizeInfo.optionImg}}"></image>
</view>
<text class="drawTip">奖品可在首页「我的奖品」中查看</text>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.drawprizeModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.drawprizeContainer {
width: 750rpx;
height: 934rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.drawprizelight {
width: 750rpx;
height: 934rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizelight.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawprizebg {
width: 560rpx;
height: 749rpx;
left: 93rpx;
top: 5rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.darwprizebtn {
width: 359rpx;
height: 92rpx;
left: 194rpx;
top: 569rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawName {
width: 540rpx;
height: 50rpx;
left: 103rpx;
top: 492rpx;
text-align: center;
position: absolute;
font-size: 30rpx;
color: #915a16;
overflow-x:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.drawprizeimgbg {
width: 188rpx;
height: 189rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizeimgbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
left: 281rpx;
top: 285rpx;
}
.itemImg {
width: 188rpx;
height: 189rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
border-radius: 20rpx;
}
.drawTip {
width: 100%;
height: 40rpx;
left: 0rpx;
top: 678rpx;
text-align: center;
position: absolute;
font-size: 20rpx;
color: #989796;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 804rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<view class="ruleModalContainer"> <view class="ruleModalContainer">
<view class="ruleModalBg"></view> <view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer"> <view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view> <!-- <text class="ruleModalBgText">
<!-- <text class="ruleModalBgText"> --> {{ruleText}}
<!-- {{ruleText}} --> </text> -->
<!-- </text> --> <rich-text class="ruleModalBgText" nodes="{{ruleText}}"/>
</view> </view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view> <view class="close" catch:tap="onModalClose"></view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -9,59 +9,33 @@ ...@@ -9,59 +9,33 @@
} }
.ruleModalContainer { .ruleModalContainer {
width: 543rpx; width: 560rpx;
height: 896rpx; height: 897rpx;
left: 0rpx; left: 0rpx;
right: 0rpx; right: 0rpx;
top: 200rpx; top: 0rpx;
bottom: 0rpx;
position: absolute; position: absolute;
margin: auto; margin: auto;
} }
.ruleModalBgRule {
width: 508rpx;
height: 7787rpx;
top: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/rule.06cc4edbcde034bd5ad7ff7a456a155c2a09583c.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBg { .ruleModalBg {
width: 543rpx; width: 560rpx;
height: 796rpx; height: 781rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f83daf181f71cc9549b1a7a69039b772b9b7bed4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx; left: 0rpx;
right: 0rpx; top: 0rpx;
top: 770rpx; background: url("https://yun.duiba.com.cn/db_games/jianchun/rulebg.png") no-repeat;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left; background-position: top left;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
} }
.ruleModalBgTextContainer { .ruleModalBgTextContainer {
width: 543rpx; width: 468rpx;
height: 546rpx; height: 583rpx;
top: 145rpx; top: 108rpx;
left: 0rpx; left: 48rpx;
right: 0rpx;
margin: auto; margin: auto;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
...@@ -70,9 +44,20 @@ ...@@ -70,9 +44,20 @@
} }
.ruleModalBgText { .ruleModalBgText {
width: 460rpx; width: 468rpx;
font-size: 24rpx; font-size: 24rpx;
position: absolute; position: absolute;
color: #000000; color: #915a16;
text-indent: 2em; text-indent: 2em;
}
.close {
width: 67rpx;
height: 67rpx;
left: 249rpx;
top: 831rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
} }
\ No newline at end of file
<view class="scanTipModal">
<view class="scanTipModalContainer">
<view class="scanTipModalBg"></view>
<view class="scanTipModalRightNow" catch:tap="scanRightNow"></view>
<text class="scanTipModalText">今日剩余扫码次数:{{lastScanTimes}}</text>
<view class="scanTipModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
...@@ -33,7 +33,8 @@ Page({ ...@@ -33,7 +33,8 @@ Page({
nickName: "", nickName: "",
activityStatus: 0, activityStatus: 0,
isPlayMusic: true, isPlayMusic: true,
assistErrorMsg: "" assistErrorMsg: "",
prizeInfo: {}
}, },
onLoad: async function (options) { onLoad: async function (options) {
// const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容 // const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
...@@ -353,6 +354,30 @@ Page({ ...@@ -353,6 +354,30 @@ Page({
showModalType: 'rule' showModalType: 'rule'
}); });
}, },
showDrawPop() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: 'draw'
});
},
showNoPrizePop() {
this.setData({
showModalType: 'drawNoPrize'
});
},
showPrizePop(e) {
console.log(e);
this.setData({
prizeInfo: e.detail,
showModalType: 'drawPrize'
});
},
onModalClose(e) { onModalClose(e) {
//暂不考虑两个弹窗 //暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail); console.warn("onModalClose,e", e.detail);
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
"auth-userinfo": "./../component/authUserInfo/index", "auth-userinfo": "./../component/authUserInfo/index",
"game-guide-modal": "./../component/gameGuideModal/index", "game-guide-modal": "./../component/gameGuideModal/index",
"act-rule-modal": "./../component/actRuleModal/index", "act-rule-modal": "./../component/actRuleModal/index",
"scan-tip-modal": "./../component/scanTipModal/index" "draw-modal": "./../component/drawModal/index",
"draw-no-prize": "./../component/drawNoPrizeModal/index",
"draw-prize": "./../component/drawPrizeModal/index"
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="logo"></view> <view class="logo"></view>
<view class="title"></view> <view class="title"></view>
<view class="taskicon"></view> <view class="taskicon"></view>
<view class="drawicon"></view> <view class="drawicon" bind:tap="showDrawPop"></view>
<view class="creditsbg"></view> <view class="creditsbg"></view>
<text class="creditslab"></text> <text class="creditslab"></text>
...@@ -40,4 +40,7 @@ ...@@ -40,4 +40,7 @@
<assist-suc-modal wx:if="{{showModalType == 'assistSuc'}}" catch:onModalClose="onModalClose"></assist-suc-modal> <assist-suc-modal wx:if="{{showModalType == 'assistSuc'}}" catch:onModalClose="onModalClose"></assist-suc-modal>
<auth-userinfo wx:if="{{isShowAuth}}" catch:onCancelFunc="cancelFunc" catch:onSaveFunc="saveFunc"></auth-userinfo> <auth-userinfo wx:if="{{isShowAuth}}" catch:onCancelFunc="cancelFunc" catch:onSaveFunc="saveFunc"></auth-userinfo>
<act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal> <act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<draw-modal wx:if="{{showModalType == 'draw'}}" catch:onModalClose="onModalClose" catch:onModalPrize="showPrizePop" catch:onModalNoPrize="showNoPrizePop"></draw-modal>
<draw-no-prize wx:if="{{showModalType == 'drawNoPrize'}}" catch:onModalClose="onModalClose" ></draw-no-prize>
<draw-prize wx:if="{{showModalType == 'drawPrize'}}" prizeInfo="{{prizeInfo}}" catch:onModalClose="onModalClose" ></draw-prize>
</view> </view>
\ No newline at end of file
...@@ -6,21 +6,12 @@ const app = getApp() ...@@ -6,21 +6,12 @@ const app = getApp()
Component({ Component({
data: { data: {
lastScanTimes: 0
}, },
properties: { properties: {
}, },
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
},
methods: { methods: {
onModalClose() { onModalClose() {
this.triggerEvent("onModalClose", 'actRule'); this.triggerEvent("onModalClose", 'actRule');
......
import {
globalData
} from "../../utils/db_api/globalData"
// 活动攻略
const app = getApp()
let speed = 150
let rate0 = 1
let rate1 = 1
let rate2 = 1
let round0 = 0
let round2 = 0
let round1 = 0
Component({
data: {
list: ["top:0rpx", "top:-248rpx", "top:-496rpx"],
prizeList: [
"//yun.duiba.com.cn/aurora/assets/df01955f333b67a439987511b5f63ab930c2972c.png",
"//yun.duiba.com.cn/aurora/assets/53b167835b33463fcafae884df1e334397c0976d.png",
"//yun.duiba.com.cn/aurora/assets/67eca6d481505b413e61ec6ff38ade2076dc2ab0.png",
"//yun.duiba.com.cn/aurora/assets/12fbdd91059aba8cbf27a78725cac9ff6b8d29d1.png",
"//yun.duiba.com.cn/aurora/assets/16f3321f51561eecaaec9a15baeb9aff251530ac.png",
"//yun.duiba.com.cn/aurora/assets/7c3a2642cbecd4a006baf4d0fc67a8fb059c303a.png"
]
},
properties: {
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'draw');
},
onClickBtn() {
speed = 150
rate0 = 1
rate1 = 1
rate2 = 1
round0 = 0
round2 = 0
round1 = 0
this.itemMove(0, 3)
setTimeout(() => {
this.itemMove(1, 2)
}, 500)
setTimeout(() => {
this.itemMove(2, 5)
}, 1000)
// this.itemMove(2, 5)
},
itemMove(id, index) {
let roundNum = 0
if (id == 0) {
roundNum = round0
} else if (id == 1) {
roundNum = round1
} else if (id == 2) {
roundNum = round2
}
let rateList = [rate0, rate1, rate2]
if (roundNum == 3) {
rateList[id] -= 0.05
if (rateList[id] < 0.1) {
rateList[id] = 0.1
}
let hightTop = Number(this.data.list[id].replace(/[^\d.-]/g, "")) - speed * rateList[id]
let hightLab = "top:" + hightTop + "rpx"
if (hightTop <= -248 * index) {
hightLab = "top:" + (-248 * index) + "rpx"
let listInfo = this.data.list
listInfo[id] = hightLab
// console.log("listInfo3", id, listInfo)
setTimeout(() => {
this.setData({
list: listInfo
})
}, 100)
if (id == 2) {
setTimeout(() => {
this.triggerEvent("onModalClose", 'draw');
this.triggerEvent("onModalPrize", { prizeId: "thanks",optionName:"地方BNSF扣税的备份库",optionImg:"//yun.duiba.com.cn/polaris/arshare.edd28926120dd3b64679dcaf5e648ee5cd03f493.png" })
// if (this.prizeData.prizeId != "thanks") {
// modalStore.pushPop("Lh_prizepop", this.prizeData)
// } else {
// modalStore.pushPop("Lh_noprizepop")
// }
}, 1000)
}
} else {
let listInfo = this.data.list
listInfo[id] = hightLab
// console.log("listInfo2", id, listInfo)
this.setData({
list: listInfo
}, () => {
setTimeout(() => {
this.itemMove(id, index)
}, 20)
})
// window.requestAnimationFrame(() => this.itemMove(id, index))
}
} else {
let hightTop = Number(this.data.list[id].replace(/[^\d.-]/g, "")) - speed
// console.log(hightTop, Number(this.data.list[id].replace(/[^\d.-]/g, "")))
let hightLab = "top:" + hightTop + "rpx"
// console.log(hightTop)
if (hightTop <= -248 * (this.data.prizeList.length)) {
if (id == 0) {
round0++
} else if (id == 1) {
round1++
} else if (id == 2) {
round2++
}
// this["round" + id]++
hightLab = "top:0rpx"
}
let listInfo = this.data.list
listInfo[id] = hightLab
// console.log("listInfo1", id, listInfo)
this.setData({
list: listInfo
}, () => {
setTimeout(() => {
this.itemMove(id, index)
}, 20)
})
// window.requestAnimationFrame(() => this.itemMove(id, index))
}
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="drawModal">
<view class="drawContainer">
<view class="drawlight"></view>
<view class="drawbg"></view>
<view class="darwbtn" bind:tap="onClickBtn"></view>
<text class="drawNum">剩余抽奖次数:2</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="*this">
<view class="drawList pos{{index+1}}" style="{{item}}">
<view wx:for="{{prizeList}}" class="itembg" wx:key="*this">
<image class="itemImg" src="{{item}}"></image>
</view>
</view>
</view>
</view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.drawModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.drawContainer {
width: 750rpx;
height: 1278rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.drawlight {
width: 750rpx;
height: 1278rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawlight.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawbg {
width: 723rpx;
height: 730rpx;
left: 12rpx;
top: 289rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.darwbtn {
width: 292rpx;
height: 88rpx;
left: 226rpx;
top: 837rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/darwbtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawNum {
width: 100%;
height: 40rpx;
left: 0rpx;
top: 929rpx;
text-align: center;
position: absolute;
font-size: 21rpx;
color: #893c21;
}
.drawArea {
width: 390rpx;
height: 380rpx;
position: absolute;
left: 187rpx;
top: 432rpx;
overflow:hidden;
}
.drawList {
width: 115rpx;
height: 380rpx;
position: absolute;
}
.pos1 {
left: 0rpx;
top: 0rpx;
}
.pos2 {
left: 138rpx;
top: 0rpx;
}
.pos3 {
left: 276rpx;
top: 0rpx;
}
.itembg {
width: 115rpx;
height: 117rpx;
display: block;
position: relative;
left: 0rpx;
top: 0rpx;
margin-top: 131rpx;
}
.itemImg {
width: 115rpx;
height: 117rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 1042rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
import {
globalData
} from "../../utils/db_api/globalData"
// 活动攻略
const app = getApp()
Component({
data: {
},
properties: {
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'drawNoPrize');
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="drawNoPrizeModal">
<view class="drawNoPrizeContainer">
<view class="drawNoPrizelogo"></view>
<view class="drawNoPrizebg"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.drawNoPrizeModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.drawNoPrizeContainer {
width: 750rpx;
height: 825rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.drawNoPrizelogo {
width: 147rpx;
height: 147rpx;
left: 302rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizelogo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawNoPrizebg {
width: 560rpx;
height: 445rpx;
left: 95rpx;
top: 264rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.darwNoPrizebtn {
width: 359rpx;
height: 92rpx;
left: 196rpx;
top: 550rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/noprizebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 760rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
import {
globalData
} from "../../utils/db_api/globalData"
// 活动攻略
const app = getApp()
let speed = 150
let rate0 = 1
let rate1 = 1
let rate2 = 1
let round0 = 0
let round2 = 0
let round1 = 0
Component({
data: {
},
properties: {
prizeInfo:Object
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'drawPrize');
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="drawprizeModal">
<view class="drawprizeContainer">
<view class="drawprizelight"></view>
<view class="drawprizebg"></view>
<view class="darwprizebtn" bind:tap="onModalClose"></view>
<text class="drawName">{{prizeInfo.optionName}}</text>
<view class="drawprizeimgbg">
<image class="itemImg" src="{{prizeInfo.optionImg}}"></image>
</view>
<text class="drawTip">奖品可在首页「我的奖品」中查看</text>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.drawprizeModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.drawprizeContainer {
width: 750rpx;
height: 934rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.drawprizelight {
width: 750rpx;
height: 934rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizelight.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawprizebg {
width: 560rpx;
height: 749rpx;
left: 93rpx;
top: 5rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.darwprizebtn {
width: 359rpx;
height: 92rpx;
left: 194rpx;
top: 569rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawName {
width: 540rpx;
height: 50rpx;
left: 103rpx;
top: 492rpx;
text-align: center;
position: absolute;
font-size: 30rpx;
color: #915a16;
overflow-x:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.drawprizeimgbg {
width: 188rpx;
height: 189rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/drawpop/drawprizeimgbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
left: 281rpx;
top: 285rpx;
}
.itemImg {
width: 188rpx;
height: 189rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
border-radius: 20rpx;
}
.drawTip {
width: 100%;
height: 40rpx;
left: 0rpx;
top: 678rpx;
text-align: center;
position: absolute;
font-size: 20rpx;
color: #989796;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 804rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<view class="ruleModalContainer"> <view class="ruleModalContainer">
<view class="ruleModalBg"></view> <view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer"> <view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view> <!-- <text class="ruleModalBgText">
<!-- <text class="ruleModalBgText"> --> {{ruleText}}
<!-- {{ruleText}} --> </text> -->
<!-- </text> --> <rich-text class="ruleModalBgText" nodes="{{ruleText}}"/>
</view> </view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view> <view class="close" catch:tap="onModalClose"></view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -8,59 +8,33 @@ ...@@ -8,59 +8,33 @@
} }
.ruleModalContainer { .ruleModalContainer {
width: 543rpx; width: 560rpx;
height: 896rpx; height: 897rpx;
left: 0rpx; left: 0rpx;
right: 0rpx; right: 0rpx;
top: 200rpx; top: 0rpx;
bottom: 0rpx;
position: absolute; position: absolute;
margin: auto; margin: auto;
} }
.ruleModalBgRule {
width: 508rpx;
height: 7787rpx;
top: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/rule.06cc4edbcde034bd5ad7ff7a456a155c2a09583c.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBg { .ruleModalBg {
width: 543rpx; width: 560rpx;
height: 796rpx; height: 781rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f83daf181f71cc9549b1a7a69039b772b9b7bed4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx; left: 0rpx;
right: 0rpx; top: 0rpx;
top: 770rpx; background: url("https://yun.duiba.com.cn/db_games/jianchun/rulebg.png") no-repeat;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left; background-position: top left;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
} }
.ruleModalBgTextContainer { .ruleModalBgTextContainer {
width: 543rpx; width: 468rpx;
height: 546rpx; height: 583rpx;
top: 145rpx; top: 108rpx;
left: 0rpx; left: 48rpx;
right: 0rpx;
margin: auto; margin: auto;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
...@@ -69,9 +43,20 @@ ...@@ -69,9 +43,20 @@
} }
.ruleModalBgText { .ruleModalBgText {
width: 460rpx; width: 468rpx;
font-size: 24rpx; font-size: 24rpx;
position: absolute; position: absolute;
color: #000000; color: #915a16;
text-indent: 2em; text-indent: 2em;
}
.close {
width: 67rpx;
height: 67rpx;
left: 249rpx;
top: 831rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
} }
\ No newline at end of file
...@@ -36,7 +36,9 @@ Page({ ...@@ -36,7 +36,9 @@ Page({
nickName: "", nickName: "",
activityStatus: 0, activityStatus: 0,
isPlayMusic: true, isPlayMusic: true,
assistErrorMsg: "" assistErrorMsg: "",
prizeInfo:{}
}, },
onLoad: async function (options) { onLoad: async function (options) {
...@@ -375,6 +377,30 @@ Page({ ...@@ -375,6 +377,30 @@ Page({
showModalType: 'rule' showModalType: 'rule'
}) })
}, },
showDrawPop(){
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: 'draw'
})
},
showNoPrizePop(){
this.setData({
showModalType: 'drawNoPrize'
})
},
showPrizePop(e){
console.log(e)
this.setData({
prizeInfo:e.detail,
showModalType: 'drawPrize'
})
},
onModalClose(e) { onModalClose(e) {
//暂不考虑两个弹窗 //暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail) console.warn("onModalClose,e", e.detail)
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
"assist-reflct-modal": "../component/assistReflctModal/index", "assist-reflct-modal": "../component/assistReflctModal/index",
"auth-userinfo": "../component/authUserInfo/index", "auth-userinfo": "../component/authUserInfo/index",
"game-guide-modal": "../component/gameGuideModal/index", "game-guide-modal": "../component/gameGuideModal/index",
"act-rule-modal":"../component/actRuleModal/index" "act-rule-modal":"../component/actRuleModal/index",
"draw-modal":"../component/drawModal/index",
"draw-no-prize":"../component/drawNoPrizeModal/index",
"draw-prize":"../component/drawPrizeModal/index"
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="logo"></view> <view class="logo"></view>
<view class="title"></view> <view class="title"></view>
<view class="taskicon"></view> <view class="taskicon"></view>
<view class="drawicon"></view> <view class="drawicon" bind:tap="showDrawPop"></view>
<view class="creditsbg"></view> <view class="creditsbg"></view>
<text class="creditslab"></text> <text class="creditslab"></text>
...@@ -40,4 +40,7 @@ ...@@ -40,4 +40,7 @@
<assist-suc-modal wx:if="{{showModalType == 'assistSuc'}}" catch:onModalClose="onModalClose"></assist-suc-modal> <assist-suc-modal wx:if="{{showModalType == 'assistSuc'}}" catch:onModalClose="onModalClose"></assist-suc-modal>
<auth-userinfo wx:if="{{isShowAuth}}" catch:onCancelFunc="cancelFunc" catch:onSaveFunc="saveFunc"></auth-userinfo> <auth-userinfo wx:if="{{isShowAuth}}" catch:onCancelFunc="cancelFunc" catch:onSaveFunc="saveFunc"></auth-userinfo>
<act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal> <act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<draw-modal wx:if="{{showModalType == 'draw'}}" catch:onModalClose="onModalClose" catch:onModalPrize="showPrizePop" catch:onModalNoPrize="showNoPrizePop"></draw-modal>
<draw-no-prize wx:if="{{showModalType == 'drawNoPrize'}}" catch:onModalClose="onModalClose" ></draw-no-prize>
<draw-prize wx:if="{{showModalType == 'drawPrize'}}" prizeInfo="{{prizeInfo}}" catch:onModalClose="onModalClose" ></draw-prize>
</view> </view>
\ No newline at end of file
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