Commit 00d2df14 authored by 吴江涛's avatar 吴江涛

Merge branch 'dev' of gitlab2.dui88.com:sparkprojects/20240425_jianchun_singer into dev

parents 962a4f14 3b170d43
......@@ -23,6 +23,13 @@
"pages": [
"db_jump/index"
]
},
{
"root": "packages/wm-cloud-db_load",
"name": "wm-cloud-db_load",
"pages": [
"loading/index"
]
}
],
"window": {
......
......@@ -12,25 +12,26 @@ Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
"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");
/* harmony import */ var _utils_db_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp();
Component({
data: {
lastScanTimes: 0
},
data: {},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(22);
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(23);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'actRule');
},
onModalClose_btn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(23);
this.triggerEvent("onModalClose", 'actRule');
}
}
});
......
......@@ -5,7 +5,7 @@
<view class="actrulelogo"></view>
<view class="actruleip"></view>
<view class="actrulelab"></view>
<view class="actrulebtn" catch:tap="onModalClose"></view>
<view class="actrulebtn" catch:tap="onModalClose_btn"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistFailModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/assistFailModal/index.js":
/*!***************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/assistFailModal/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");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
const app = getApp();
Component({
data: {
isloading: false
},
properties: {
isBindPhone: Boolean,
assistErrorMsg: String
},
attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'assistFail');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
<view class="assistFailModal">
<view class="assistFailModalContainer">
<view class="assistFailModalIKnowBtn" catch:tap="onModalClose"></view>
<!-- <button wx:if="{{!isBindPhone}}" class="assistFailModalBg" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button> -->
<view class="assistFailModalCloseBtn" catch:tap="onModalClose"></view>
<text class="assistFailModalTip">{{assistErrorMsg}}</text>
<!-- <text class="assistFailModalTip">无法为自己助力</text> -->
<!-- <text class="assistFailModalTip">活动已结束</text> -->
<view class="assistFailModalBg"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.assistFailModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.assistFailModalContainer {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.assistFailModalIKnowBtn {
width: 395rpx;
height: 92rpx;
left: 178rpx;
top: 677rpx;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/58b7c6ab9b871f8fc5de8a0c21c25c5a0d65494a.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.assistFailModalBg {
width: 746rpx;
height: 1236rpx;
left: 4rpx;
pointer-events: none;
top: 273rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/daaf7cee9b82fea07aba4b89eaa4f97e915fc8a2.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.assistFailModalTip {
width: 500rpx;
height: 31rpx;
left: 124rpx;
top: 620rpx;
font-size: 28rpx;
white-space: nowrap;
text-align: center;
color: #977050;
position: absolute;
z-index: 10;
}
.assistFailModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 350rpx;
top: 897rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/assistModal/index.js":
/*!***********************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/assistModal/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");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
const app = getApp();
Component({
data: {
isloading: false,
nickname: "",
avatar: ""
},
properties: {
isBindPhone: Boolean,
shareCode: String,
isAuthUserInfo: Boolean
},
async attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
const getShareUserInfoResp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiGetShareUserInfo"])({
inviteCode: this.data.shareCode
});
if (getShareUserInfoResp.success) {
this.setData({
nickname: getShareUserInfoResp.data.nickname,
avatar: getShareUserInfoResp.data.avatar
});
}
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'assist');
},
assistFunc() {
wx.showLoading();
console.warn("助力");
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDoAssist"])({
inviteCode: this.data.shareCode
}).then(res => {
wx.hideLoading();
this.triggerEvent("onAssistResult", res);
});
},
checkAuthPhone(e) {
wx.showLoading();
this.triggerEvent("onAuthPhone", e);
},
checkAuthUser(e) {
// wx.showLoading()
this.triggerEvent("onAuthUser", e);
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
<view class="assistModal">
<view class="assistModalContainer">
<!-- wx:if="{{isBindPhone}}" -->
<view class="assistModalBg"></view>
<view class="assistModalAvatarBg"></view>
<image class="assistModalAvatarImg" src="{{avatar}}"></image>
<text class="assistModalNickname">{{nickname}}</text>
<view wx:if="{{isBindPhone && isAuthUserInfo}}" class="assistModalAssistBtn" bind:tap="assistFunc"></view>
<view wx:if="{{isBindPhone && !isAuthUserInfo}}" class="assistModalAssistBtn" bind:tap="checkAuthUser"></view>
<button wx:if="{{!isBindPhone}}" class="assistModalAssistBtn" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuthPhone"></button>
<view class="assistModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistReflctModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/assistReflctModal/index.js":
/*!*****************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/assistReflctModal/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");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
const app = getApp();
Component({
data: {
isloading: false
},
properties: {
isBindPhone: Boolean,
friends: Number,
tickets: Number
},
attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'assistReflct');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
<view class="assistReflctModal">
<view class="assistReflctModalContainer">
<!-- wx:if="{{isBindPhone}}" -->
<!-- <view class="assistReflctModalAvatarBg"></view> -->
<view class="assistReflctModalIKnowBtn" catch:tap="onModalClose"></view>
<!-- <button wx:if="{{!isBindPhone}}" class="assistReflctModalBg" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button> -->
<view class="assistReflctModalCloseBtn" catch:tap="onModalClose"></view>
<text class="assistReflctModalTextFriend">一共有 {{friends}} 位好友助力</text>
<text class="assistReflctModalTextTicket">获得 {{tickets}} 张悦龙门门票</text>
<view class="assistReflctModalBg"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.assistReflctModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.assistReflctModalContainer {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.assistReflctModalTextFriend {
width: 480rpx;
height: 50rpx;
left: 136rpx;
top: 545rpx;
font-size: 40rpx;
color: #bf4e00;
text-align: center;
font-weight: 500;
white-space: nowrap;
position: absolute;
z-index: 10;
}
.assistReflctModalTextTicket {
width: 480rpx;
height: 50rpx;
left: 136rpx;
top: 605rpx;
font-size: 40rpx;
text-align: center;
color: #bf4e00;
font-weight: 500;
white-space: nowrap;
position: absolute;
z-index: 10;
}
.assistReflctModalIKnowBtn {
width: 395rpx;
height: 92rpx;
left: 179rpx;
top: 677rpx;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/58b7c6ab9b871f8fc5de8a0c21c25c5a0d65494a.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.assistReflctModalBg {
width: 746rpx;
height: 1236rpx;
left: 4rpx;
pointer-events: none;
top: 273rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/0f4db47cb224fcbc452fd07da17a828c5b784760.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.assistReflctModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 350rpx;
top: 897rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
<view class="assistSucModal">
<view class="assistSucModalContainer">
<!-- wx:if="{{isBindPhone}}" -->
<view class="assistSucModalJoinBtn" catch:tap="onModalClose"></view>
<!-- <button wx:if="{{!isBindPhone}}" class="assistSucModalBg" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button> -->
<view class="assistSucModalCloseBtn" catch:tap="onModalClose"></view>
<view class="assistSucModalBg"></view>
</view>
</view>
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/clickGiftModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/clickGiftModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/clickGiftModal/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");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
const app = getApp();
Component({
data: {
isloading: false
},
properties: {
isBindPhone: Boolean
},
attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'clickGift');
},
checkAuth(e) {
/**未绑定手机号,先绑定 */
wx.login({
success: res => {
if (res.code) {
const param = {
code: res.code,
phoneEncryptedData: e.detail.encryptedData,
phoneIv: e.detail.iv
};
this.login_db(param);
} else {
console.log('获取用户登录态失败!' + res.errMsg);
}
}
});
},
openAward() {
/**已绑定的话直接走扫码逻辑 */
this.triggerEvent("onOpenAward");
},
/**登陆逻辑 */
login_db(param) {
if (this.data.isloading) return;
this.setData({
isloading: true
});
wx.showLoading();
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbLogin"])({
...param
}).then(res => {
wx.hideLoading();
this.setData({
isloading: false
});
if (res.success) {
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].loginToken = encodeURIComponent(res.data.loginToken);
// wx.setStorageSync('db_loginToken', data.loginToken)
/** 绑定好后走扫码逻辑*/
this.openAward();
} else {
console.log("获取兑吧免登失败", res);
}
});
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
<view class="clickGiftModal">
<view class="clickGiftModalContainer">
<view wx:if="{{isBindPhone}}" class="clickGiftModalBg" catch:tap="openAward"></view>
<button wx:if="{{!isBindPhone}}" class="clickGiftModalBg" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button>
<view class="clickGiftModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.clickGiftModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.clickGiftModalContainer {
width: 750rpx;
height: 1317rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.clickGiftModalBg {
width: 750rpx;
height: 1624rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/d497714b59eb6b2fa53dfa888ddc7245cd522c70.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.clickGiftModalCloseBtn {
width: 50rpx;
height: 50rpx;
right: 120rpx;
top: 520rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
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__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__ = __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;
isTurn = false;
Component({
data: {
list: ["top:0rpx", "top:0rpx", "top:0rpx"],
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"],
getprize: {}
},
properties: {
drawTime: Number
},
attached() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(16);
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(17);
isTurn = false;
this.getPrizeInfo();
// console.log(this)
// console.error("看看文案", this.data)
// this.setData({
// lastScanTimes: globalData.indexInfo.lastScanTimes
// })
},
methods: {
async getPrizeInfo() {
const resp = await Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["apiDbQueryOption"])({
wid: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__["globalData"].wid
});
if (resp.success) {
this.setData({
prizeList: resp.data
});
}
},
onModalClose() {
if (isTurn) {
return;
}
this.triggerEvent("onModalClose", 'draw');
},
async onClickBtn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(17);
if (isTurn) {
return;
}
if (this.data.drawTime <= 0) {
wx.showToast({
title: '抽奖机会已用完,快去参与活动赢取吧~',
icon: "none"
});
return;
}
isTurn = true;
const resp = await Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["apiDbDraw"])({
wid: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__["globalData"].wid
});
if (resp.success) {
this.setData({
getprize: resp.data
});
speed = 150;
rate0 = 1;
rate1 = 1;
rate2 = 1;
round0 = 0;
round2 = 0;
round1 = 0;
let item1 = 0;
let item2 = 1;
let item3 = 2;
if (resp.data.prizeId == "thanks") {
// 未中奖
let arr = Array.from({
length: this.data.prizeList.length
}, (_, index) => index);
console.log(arr);
for (let i = 0; i < 3; i++) {
var _num = Math.floor(Math.random() * arr.length);
if (i == 0) {
item1 = arr[_num];
} else if (i == 1) {
item2 = arr[_num];
} else {
item3 = arr[_num];
}
arr.splice(_num, 1);
}
} else {
// 中奖了
for (let i = 0; i < this.data.prizeList.length; i++) {
if (this.data.prizeList[i].prizeId == resp.data.prizeId) {
item1 = item2 = item3 = i;
}
}
}
this.itemMove(0, item1);
setTimeout(() => {
this.itemMove(1, item2);
}, 500);
setTimeout(() => {
this.itemMove(2, item3);
}, 1000);
} else {
isTurn = false;
}
},
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');
if (this.data.getprize.prizeId != "thanks") {
this.triggerEvent("onModalPrize", {
...this.data.getprize
});
} else {
this.triggerEvent("onModalNoPrize");
}
isTurn = false;
}, 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">剩余抽奖次数:{{drawTime}}</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="id">
<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';
.gameGuideModal {
.drawModal {
width: 100%;
height: 100%;
z-index: 10;
......@@ -8,87 +8,107 @@
}
.gameGuideModalContainer {
width: 746rpx;
height: 1362rpx;
.drawContainer {
width: 750rpx;
height: 1278rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
top: 0rpx;
position: absolute;
margin: auto;
position: absolute;
}
/* .gameGuideModalBgRule {
width: 746rpx;
height: 1362rpx;
top: 0rpx;
.drawlight {
width: 750rpx;
height: 1278rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/bg.672c5b94d938762e48c46cce4397d454300be15d.png") no-repeat;
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;
}
} */
.gameGuideModalBg {
top: 0rpx;
left: 0rpx;
width: 746rpx;
height: 1362rpx;
background: url("https://yun.duiba.com.cn/polaris/bg6.ea8784c815c6acbc162629f5096e6469d209f4f5.png") no-repeat;
.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;
}
.gameGuideModalTomorrowBtn {
width: 395rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
border: none !important;
top: 845rpx;
background: url("https://yun.duiba.com.cn/polaris/ok_btn.d616c598b796599729494c6e1c1fc4fd9e60cb46.png") no-repeat;
.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;
}
.gameGuideModalCloseBtn {
width: 50rpx;
height: 50rpx;
.drawNum {
width: 100%;
height: 40rpx;
left: 0rpx;
right: 0rpx;
top: 1050rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
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;
}
.gameGuideModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
.itembg {
width: 115rpx;
height: 117rpx;
display: block;
position: relative;
left: 0rpx;
right: 0rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
top: 0rpx;
margin-top: 131rpx;
}
.itemImg {
width: 115rpx;
height: 117rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
}
.gameGuideModalBgText {
width: 460rpx;
font-size: 24rpx;
.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;
color: #000000;
text-indent: 2em;
}
var webpackRequire = require("./../../../../webpack-require");
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, {
/***/ "./src/packages/wm-cloud-db_index/component/scanTipModal/index.js":
/*!************************************************************************!*\
!*** ./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/drawNoPrizeModal/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");
/* harmony import */ var _utils_db_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp();
Component({
data: {
lastScanTimes: 0
},
data: {},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(20);
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(21);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'scanTip');
this.triggerEvent("onModalClose", 'drawNoPrize');
},
scanRightNow() {
this.triggerEvent("scanRightNow");
onModalClose_btn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(21);
this.triggerEvent("onModalClose", 'drawNoPrize');
}
}
});
......
<view class="drawNoPrizeModal">
<view class="drawNoPrizeContainer">
<view class="drawNoPrizelogo"></view>
<view class="drawNoPrizebg"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose_btn"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.firstInModal {
.drawNoPrizeModal {
width: 100%;
height: 100%;
z-index: 10;
......@@ -8,9 +8,9 @@
}
.firstInModalContainer {
.drawNoPrizeContainer {
width: 750rpx;
height: 1317rpx;
height: 825rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
......@@ -19,47 +19,44 @@
position: absolute;
}
.firstInModalBg {
width: 750rpx;
height: 1317rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/08f2e348b90fa2eac6ffe3b46afc1b377e59be38.png") no-repeat;
.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;
}
.firstInModalBgRuleBtn {
width: 130rpx;
height: 50rpx;
left: 0rpx;
.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;
right: 0rpx;
top: 733rpx;
margin: auto !important;
}
.firstInModalTomorrowBtn {
width: 395rpx;
.darwNoPrizebtn {
width: 359rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
border: none !important;
top: 795rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/8efa5086ead256f9b4b3801c536f51254a260d2e.png") no-repeat;
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;
}
.firstInModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 980rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
.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;
......
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistSucModal/index.js",
"./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/assistSucModal/index.js":
/***/ "./src/packages/wm-cloud-db_index/component/drawPrizeModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/assistSucModal/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");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
/* harmony import */ var _utils_db_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_1__ = __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: {
isloading: false
},
data: {},
properties: {
isBindPhone: Boolean
prizeInfo: Object
},
attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(18);
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logExposure"])(19);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'assistSuc');
this.triggerEvent("onModalClose", 'drawPrize');
},
onModalClose_btn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(19);
this.triggerEvent("onModalClose", 'drawPrize');
}
}
});
......
<view class="drawprizeModal">
<view class="drawprizeContainer">
<view class="drawprizelight"></view>
<view class="drawprizebg"></view>
<view class="darwprizebtn" bind:tap="onModalClose_btn"></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';
.assistModal {
.drawprizeModal {
width: 100%;
height: 100%;
z-index: 10;
......@@ -8,9 +8,9 @@
}
.assistModalContainer {
.drawprizeContainer {
width: 750rpx;
height: 1624rpx;
height: 934rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
......@@ -18,75 +18,85 @@
margin: auto;
position: absolute;
}
.assistModalAvatarBg {
width: 116rpx;
height: 115rpx;
left: 317rpx;
top: 422rpx;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/d425f0f0e64e61418d2aae050b60a81007f88ab7.png") no-repeat;
.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;
}
.assistModalAvatarImg {
width: 108rpx;
height: 108rpx;
border-radius: 50%;
left: 321rpx;
top: 427rpx;
z-index: 10;
position: absolute;
}
.assistModalNickname {
width: 331rpx;
height: 30rpx;
text-align: center;
font-size: 20rpx;
color: #977050;
left: 209rpx;
top: 553rpx;
.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;
}
.assistModalAssistBtn {
width: 395rpx;
.darwprizebtn {
width: 359rpx;
height: 92rpx;
left: 178rpx;
top: 677rpx;
border: none !important;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/7ff1b540fa7651fd4aa8953f59fbbcff76770fbf.png") no-repeat;
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;
}
.assistModalBg {
width: 746rpx;
height: 1236rpx;
left: 4rpx;
pointer-events: none;
top: 273rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/970b193822b7972a84e67ad1b5e246222bbd0a3a.png") no-repeat;
.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;
}
.assistModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 350rpx;
top: 897rpx;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
.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;
......
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/firstInShowModal/index.js",
{
/***/ "./src/packages/wm-cloud-db_index/component/firstInShowModal/index.js":
/*!****************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/firstInShowModal/index.js ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
const app = getApp();
Component({
data: {},
properties: {
isBindPhone: Boolean
},
attached() {
console.log(this);
console.error("看看文案", this.data);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'firstIn');
},
onModalAuthClose(e) {
this.triggerEvent("onModalClose", 'firstIn-auth');
},
onModalPhoneClose(e) {
this.triggerEvent("onModalPhoneClose", e);
},
onModalCloseShowRule(e) {
this.triggerEvent("onModalCloseShowRule", e);
}
}
});
/***/ })
/******/ });
\ No newline at end of file
<view class="firstInModal">
<view class="firstInModalContainer">
<view class="firstInModalBg"></view>
<view class="firstInModalBgRuleBtn" catch:tap="onModalCloseShowRule"></view>
<view wx:if="{{isBindPhone}}" class="firstInModalTomorrowBtn" catch:tap="onModalAuthClose"></view>
<button wx:if="{{!isBindPhone}}" class="firstInModalTomorrowBtn" plain="true" open-type="getPhoneNumber" bindgetphonenumber="onModalPhoneClose"></button>
<view class="firstInModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/gameGuideModal/index.js",
{
/***/ "./src/packages/wm-cloud-db_index/component/gameGuideModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/gameGuideModal/index.js ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
const app = getApp();
Component({
data: {
ruleText: ""
},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
// this.setData({
// ruleText: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.rule,
// });
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", "gameGuide");
},
onModalClose2() {
this.triggerEvent("onModalClose2", "gameGuide");
}
}
});
/***/ })
/******/ });
\ No newline at end of file
<view class="gameGuideModal">
<view class="gameGuideModalContainer">
<view class="gameGuideModalBg"></view>
<view class="gameGuideModalTomorrowBtn" catch:tap="onModalClose2"></view>
<!-- <view class="gameGuideModalBgTextContainer">
<view class="gameGuideModalBgRule"></view>
</view> -->
<view class="gameGuideModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/openAwardModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/openAwardModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/openAwardModal/index.js ***!
\**************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
const app = getApp();
Component({
data: {
firstPrize: {},
lastPrize: []
},
properties: {
prizeInfoVO: Array
},
attached() {
this.time = 0;
console.log(this);
console.error("看看文案3123123", this.data);
const firstPrize = this.data.prizeInfoVO.filter(item => {
return item.type == 1 || item.type == 2;
})[0];
const lastPrize = this.data.prizeInfoVO.filter(item => {
return item.type != 1 && item.type != 2;
});
this.setData({
firstPrize,
lastPrize
});
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'openAward');
},
checkAuth() {
this.triggerEvent("checkAuth");
},
async happyAccept() {
console.warn("happyAccept");
if (this.data.firstPrize.type == 1) {
wx.showLoading({
mask: true
});
this.getorderIddd(no => {
wx.hideLoading();
//微信红包
this.triggerEvent("onModalClose", {
type: 'openWxMoneyAward',
projectOrderNo: no,
recordId: this.data.firstPrize.recordId
});
});
} else {
this.triggerEvent("onModalClose", 'openAward');
}
},
//轮询projectOrderNo
// async getProjectOrderNo() {
// return new Promise(async (r) => {
// const projectOrderNo = await this.getorderIddd()
// if (projectOrderNo) {
// r()
// } else {
// }
// })
// },
async getorderIddd(cb) {
if (this.time >= 5) {
cb && cb(null);
return;
}
this.time++;
const apiQueryOrderIdResp = await Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["apiQueryOrderId"])({
orderId: this.data.firstPrize.recordId
});
if (apiQueryOrderIdResp.success && apiQueryOrderIdResp.data) {
cb && cb(apiQueryOrderIdResp.data);
} else {
setTimeout(() => {
this.getorderIddd();
}, 500);
}
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="openAwardModal">
<view class="openAwardModalContainer">
<view class="openAwardModalTitle"></view>
<view wx:if="{{firstPrize.type == 1 }}" class="openAwardModalTip">微信红包将自动发放至您账户</view>
<view wx:if="{{firstPrize.type == 2 }}" class="openAwardModalTip">优惠券将自动发放至您账户</view>
<view class="openAwardModalHappyGetBtn" bind:tap="happyAccept"></view>
<image class="openAwardModalPic" src="{{firstPrize.prizeImg}}"></image>
<view class="openAwardModalPicSmallContainer">
<image wx:for="{{lastPrize}}" class="openAwardModalPicSmall" src="{{item.prizeImg}}">
<!-- <image class="openAwardModalPicSmallImg" src="{{item.prizeImg}}"></image>
<text class="openAwardModalPicSmallName">{{item.prizeName}}</text> -->
</image>
</view>
<!-- <view class="openAwardModalCloseBtn" catch:tap="onModalClose"></view> -->
</view>
</view>
\ No newline at end of file
......@@ -19,13 +19,16 @@ Component({
data: {
ruleText: ""
},
properties: {},
properties: {
activityRule: String
},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
ruleText: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.rule
ruleText: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.activityRule
});
console.error("看看文案", this.data);
},
methods: {
onModalClose() {
......
......@@ -2,11 +2,11 @@
<view class="ruleModalContainer">
<view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view>
<!-- <text class="ruleModalBgText"> -->
<!-- {{ruleText}} -->
<!-- </text> -->
<!-- <text class="ruleModalBgText">
{{ruleText}}
</text> -->
<rich-text class="ruleModalBgText" nodes="{{activityRule}}"/>
</view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
......@@ -9,59 +9,33 @@
}
.ruleModalContainer {
width: 543rpx;
height: 896rpx;
width: 560rpx;
height: 897rpx;
left: 0rpx;
right: 0rpx;
top: 200rpx;
top: 0rpx;
bottom: 0rpx;
position: absolute;
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 {
width: 543rpx;
height: 796rpx;
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;
width: 560rpx;
height: 781rpx;
left: 0rpx;
right: 0rpx;
top: 770rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/rulebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
left: 0rpx;
right: 0rpx;
width: 488rpx;
height: 583rpx;
top: 108rpx;
left: 48rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
......@@ -70,9 +44,22 @@
}
.ruleModalBgText {
width: 460rpx;
width: 468rpx;
font-size: 24rpx;
position: absolute;
color: #000000;
color: #915a16;
text-indent: 2em;
word-wrap:break-word;
white-space: normal;
}
.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
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/scanLimitModal/index.js",
{
/***/ "./src/packages/wm-cloud-db_index/component/scanLimitModal/index.js":
/*!**************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/scanLimitModal/index.js ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
const app = getApp();
Component({
data: {},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'scanLimit');
}
}
});
/***/ })
/******/ });
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="scanLimitModal">
<view class="scanLimitModalContainer">
<view class="scanLimitModalBg"></view>
<view class="scanLimitModalTomorrowBtn" catch:tap="onModalClose"></view>
<view class="scanLimitModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.scanLimitModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.scanLimitModalContainer {
width: 746rpx;
height: 1036rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.scanLimitModalBg {
width: 746rpx;
height: 1236rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/69abf8f70b6b6ebe7f339b2e7b057fdc4a666da2.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanLimitModalTomorrowBtn {
width: 395rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
top: 410rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/cf95bf0b22e74f26e3277194819b9164e6755b14.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanLimitModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 570rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ 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
@import '/cloud-reset-app.wxss';
.scanTipModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.scanTipModalContainer {
width: 746rpx;
height: 1036rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.scanTipModalBg {
width: 746rpx;
height: 1236rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/9c3409e9dffc1a2372a418142a9ca154ded64293.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalText {
width: 450rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 280rpx;
margin: auto;
color: #b33800;
font-size: 40rpx;
text-align: center;
font-weight: 500;
position: absolute;
}
.scanTipModalRightNow {
width: 395rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
top: 410rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/7090d52c41f5e0fac35064a301b0c0aaf8cef803.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 670rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/task/task.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/task/task.js":
/*!***************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/task/task.js ***!
\***************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
// packages/wm-cloud-db_index/component/task/task.js
Component({
/**
* 组件的属性列表
*/
properties: {},
lifetimes: {
attached() {
this.getTaskList();
}
},
/**
* 组件的初始数据
*/
data: {
taskList: []
},
/**
* 组件的方法列表
*/
methods: {
/** 关闭弹窗 */
closeDialog() {
this.triggerEvent("onModalClose", 'task');
},
/** 获取任务列表 */
async getTaskList() {
// const res = await getTaskInfo();
// if (res && res.success) {
// this.setData({
// taskList: res.data.item || []
// })
// }
// return
this.setData({
taskList: Array.from({
length: 7
}).fill({
buttonText: "去完成",
code: "invite",
completedSize: 0,
desc: null,
extra: '{"answerTimes":1,"drawTimes":0}',
icon: "//yun.duiba.com.cn/polaris/Image2.b9419702802eff6ec5ba50ac072086df45409bfd.jpg",
id: "0l0cha7n",
index: null,
indexes: null,
intervalLimitSize: 1,
intervalType: 4,
jumpUrl: "/",
options: [{
degree: null,
icon: null,
icon2: null,
id: "sp_draw_times",
index: null,
name: "完成任务发放答题次数占位道具",
prizeId: "sp_draw_times",
prizeType: null,
refId: null,
refType: null,
sendCount: 1
}],
playwayId: "task_1",
prizePendingCode: null,
prizePendingCodeList: null,
ruleId: "spPrize@sp_draw_times@1",
sendPrize: null,
subTitle: "抽奖次数+1",
taskStatus: 0,
title: "完成首购任务"
})
});
},
/** 点击去完成 */
async handleClickDoComplete(e) {
const index = e.currentTarget.dataset.value || e.target.dataset.index;
const item = this.data.taskList[index] || {};
switch (true) {
/** 跳转积分商城任务 */
case item.code.startsWith("order"):
{
wx.navigateTo({
url: 'url'
});
break;
}
/** 每日登录 */
case item.code.startsWith("sign"):
{
wx.navigateTo({
url: 'url'
});
break;
}
/** 分享任务 */
case item.code.startsWith("share"):
{
this.triggerEvent("select", {
type: "normal"
});
break;
}
/** 邀请任务 */
case item.code.startsWith("invite"):
{
this.triggerEvent("select", {
type: "share"
});
break;
}
}
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="task_mask"></view>
<view class="task pop_scroll_ani">
<view class="task_bg"></view>
<view class="close_btn" bind:tap="closeDialog"></view>
<view class="task_list">
<view wx:for="{{taskList}}" class="task_item" wx:key="*this">
<!-- 待领取 -->
<button wx:if="{{item.taskStatus == 1}}" class="reveive_btn" hover-class="none"></button>
<!-- 去完成 -->
<button wx:if="{{item.taskStatus == 0}}" open-type="{{item.code == 'invite'? 'share': ''}}" class="doComplete_btn" hover-class="none" bind:tap="handleClickDoComplete" data-index="{{index}}"></button>
<!-- 已完成 -->
<button wx:if="{{item.taskStatus == 2}}" class="completed_btn" hover-class="none"></button>
<view class="task_sub_box">
<view class="task_icon"></view>
<view class="task_sub_title">{{item.subTitle}}</view>
</view>
<view class="task_title">{{item.title}}</view>
</view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.task_mask {
width: 100%;
height: 100%;
left: 0;
top: 0;
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
}
.task {
width: 750rpx;
height: 895rpx;
left: 0rpx;
bottom: 0;
position: fixed;
}
.task .task_bg {
width: 750rpx;
height: 795rpx;
left: 0rpx;
top: 100rpx;
position: absolute;
background-image: url("https://yun.duiba.com.cn/aurora/assets/28851014d89856dfb822a1565e8cce4384deed7c.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.task .close_btn {
width: 66rpx;
height: 67rpx;
left: 658rpx;
top: 0rpx;
position: absolute;
background-image: url("https://yun.duiba.com.cn/aurora/assets/283ad6cca268acb2385b8283ef21f01244f0f8b8.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.task .task_list {
width: 670rpx;
height: auto;
left: 55rpx;
top: 277rpx;
bottom: 0;
position: absolute;
overflow-y: auto;
overflow-x: hidden;
}
.task .task_list .task_item {
width: 641rpx;
height: 100rpx;
left: 0rpx;
top: 0rpx;
margin-bottom: 20rpx;
position: relative;
}
.task .task_list .task_item .reveive_btn {
width: 125rpx;
height: 49rpx;
left: 516rpx;
top: 11rpx;
position: absolute;
background-image: url("https://yun.duiba.com.cn/aurora/assets/ae32f7ab4dbc2929778c75def30d8313107ba5f7.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.task .task_list .task_item .completed_btn {
width: 125rpx;
height: 49rpx;
left: 516rpx;
top: 11rpx;
position: absolute;
background-image: url("https://yun.duiba.com.cn/aurora/assets/8430cefdfa860d74443f62d3e840f9bcb4458d6f.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.task .task_list .task_item .doComplete_btn {
width: 125rpx;
height: 49rpx;
left: 516rpx;
top: 11rpx;
position: absolute;
background-image: url("https://yun.duiba.com.cn/aurora/assets/b058248f7d43e611133ed15b61e93f151e2ec9cf.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.task .task_list .task_item .task_sub_box {
width: 480rpx;
height: 25rpx;
left: 1rpx;
top: 47rpx;
position: absolute;
display: flex;
justify-content: flex-start;
align-items: center;
}
.task .task_list .task_item .task_sub_box .task_sub_title {
width: 450rpx;
height: 30rpx;
left: 10rpx;
top: 0;
position: relative;
font-size: 21rpx;
line-height: 30rpx;
color: #9e9e9e;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.task .task_list .task_item .task_sub_box .task_icon {
width: 25rpx;
height: 25rpx;
left: 0rpx;
top: 0rpx;
position: relative;
background-image: url("https://yun.duiba.com.cn/aurora/assets/573e8f658ecdeda4eeb6d20ac312d9d7aa0f2ab0.png");
background-repeat: no-repeat;
background-size: 100% 100%;
flex-shrink: 0;
flex-basis: 25rpx;
}
.task .task_list .task_item .task_title {
width: 480rpx;
height: 32rpx;
left: 0rpx;
top: 0rpx;
position: absolute;
font-size: 32rpx;
line-height: 32rpx;
color: #292929;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.pop_scroll_ani {
animation: pop_scroll_ani 500ms ease-out forwards;
}
@keyframes pop_scroll_ani {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}
}
button {
background-color: transparent;
outline: none;
border: none;
}
\ No newline at end of file
......@@ -17,10 +17,11 @@ __webpack_require__.r(__webpack_exports__);
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';
let shareType = "normal";
Page({
data: {
guideIndex: -1,
showModalType: "actRule",
showModalType: "",
isBindPhone: false,
ticket: "",
inviteNum: 0,
......@@ -33,9 +34,30 @@ Page({
nickName: "",
activityStatus: 0,
isPlayMusic: true,
assistErrorMsg: ""
assistErrorMsg: "",
prizeInfo: {},
shareCode: null,
// index数据
actStatus: 1,
credits: 0,
activityRule: "",
drawTime: 0,
showactRuleType: ""
},
onLoad: async function (options) {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(1);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(2);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(3);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(4);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(5);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(6);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(7);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(8);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(9);
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logExposure"])(10);
/** 获取邀请码 */
// this.getShareCode();
// const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
// const scancode_time = parseInt(options.scancode_time) // 获取用户扫码时间 UNIX 时间戳
......@@ -64,7 +86,7 @@ Page({
// complete: (res) => {},
// })
// const wid = await this.getWid()
const wid = await this.getWid();
// apiUserRecord({
// wid,
......@@ -84,47 +106,35 @@ Page({
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
// const isBindPhone = await this.getBindPhone(wid)
// if (isBindPhone) {
// /**已绑定的老用户直接拿loginToken */
// await this.login(wid)
// const resp = await apiDbIndexInfo({
// wid
// })
// if (resp.success) {
// this.setData({
// authAvatar: resp.data.authAvatar,
// inviteNum: resp.data.inviteNum,
// inviteTicketNum: resp.data.inviteTicketNum
// })
// if (resp.data.authAvatar && !options.shareCode && !options.q) {
// if (wx.getStorageSync('db_firstIn_pop') == '1') {
// //已经授权的情况下走新手引导
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0
// })
// } else {
// //看是否有人帮忙助力
// // resp.data.inviteNum > 0
// if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
// this.setData({
// showModalType: "assistReflct"
// })
// }else{
// this.openGameModal()
// }
// }
// }
// }
// /**首页接口存储 */
// globalData.indexInfo = resp.data
// }
// }
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].wid = wid;
const isBindPhone = await this.getBindPhone({
wid
});
if (isBindPhone) {
/**已绑定的老用户直接拿loginToken */
await this.login(wid);
const resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({
wid: wid
});
if (resp.success) {
this.setData({
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
});
if (resp.data.firstIn) {
this.setData({
showactRuleType: "actRule"
});
}
if (resp.data.musicPop) {
this.showDrawPop();
}
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = resp.data;
}
}
// // console.warn("isBindPhone", isBindPhone)
// this.setData({
// isBindPhone
......@@ -341,123 +351,6 @@ Page({
guideIndex: this.data.guideIndex + 1
});
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: 'rule'
});
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail);
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
});
return;
}
this.setData({
showModalType: ''
});
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo)
});
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId)
});
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
return;
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
} else {
this.setData({
showModalType: ''
});
}
}
return;
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1');
this.setData({
showModalType: 'firstIn'
});
return;
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
return;
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
});
return;
}
this.setData({
showModalType: ""
});
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal();
}
this.setData({
showModalType: ''
});
},
openGameModal() {
if (!!wx.getStorageSync("gameGuide")) {
return;
......@@ -566,62 +459,6 @@ Page({
// }
});
},
async onOpenAward() {
this.setData({
isBindPhone: true
});
let resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbScan"])({
ticket: this.data.ticket,
qrcodeSign: this.data.qrcodeSign
});
//mock
// let resp = {
// code: null,
// message: null,
// success: true,
// timeStamp: 1702902817178,
// data: {
// prizeInfoVO: [{
// prizeName: "任务获得门票",
// prizeImg: "//yun.duiba.com.cn/polaris/悦龙门门票.3e5353da026b89b1656686bd95323cf533ff9e6f.png",
// sendCount: 2,
// type: 4,
// url: null
// }, {
// prizeName: "第4次-5元立减金腾讯视频周卡-线上测试",
// prizeImg: "//yun.duiba.com.cn/polaris/5元优惠券.1ca8f08fb363d846e45ab206b9621af3ebe04a83.png",
// sendCount: 1,
// type: 1,
// url: "/aaw/projectx/takePrize?projectOrderNo=1431534976"
// }, {
// prizeName: "能量币",
// prizeImg: "//yun.duiba.com.cn/polaris/能量币.99fc40a82c66b4393f8d63fcfe20883bc149987e.png",
// sendCount: 50,
// type: 3,
// url: null
// }]
// }
// }
if (resp.success) {
// wx.setStorageSync("ticket", this.data.ticket)
// wx.setStorageSync("qrcodeSign", this.data.qrcodeSign)
const homeResp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({});
if (homeResp.success) {
this.setData({
authAvatar: homeResp.data.authAvatar
});
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = homeResp.data;
}
this.setData({
prizeInfoVO: resp.data.prizeInfoVO,
showModalType: 'openAward'
});
console.warn('123', resp);
}
},
checkAuth(e, noShow = false) {
wx.login({
success: res => {
......@@ -841,16 +678,291 @@ Page({
isPlayMusic: index == '0'
});
},
/** 赚负担值 */
handleClickTask() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(8);
this.setData({
showModalType: 'task'
});
},
/** 任务分享类型选择回调 */
onSelectShareType(e) {
const type = e.detail.type;
console.log("执行了");
shareType = type;
},
/** 获取邀请码 */
async getShareCode() {
const res = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["getShareCode"])();
if (res && res.success) {
this.setData({
shareCode: res.data.inviteCode
});
}
},
onHide() {
this.innerAudioContext.stop();
// this.innerAudioContext.stop()
},
onShow() {
if (this.innerAudioContext && this.data.isPlayMusic) {
this.innerAudioContext.play();
}
},
/** 分享 */
onShareAppMessage() {
const param = {
title: "测试标题",
path: '/packages/wm-cloud-db_index/db_index/index',
imageUrl: "https://yun.duiba.com.cn/polaris/task_icon.573e8f658ecdeda4eeb6d20ac312d9d7aa0f2ab0.png"
};
console.log("shareType", shareType);
if (shareType == "share") {
param.path = `${param.path}?shareCode=${this.data.shareCode}`;
}
console.log("param", param);
return param;
},
onUnload() {
this.innerAudioContext.stop();
},
showRuleModal() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(2);
if (!this.checkTime()) {
return;
}
this.setData({
showModalType: 'rule'
});
},
showDrawPop() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(9);
if (!this.checkTime()) {
return;
}
this.setData({
showModalType: 'draw'
});
},
showNoPrizePop() {
this.setData({
showModalType: 'drawNoPrize'
});
this.getIndex();
},
showPrizePop(e) {
console.log(e);
this.setData({
prizeInfo: e.detail,
showModalType: 'drawPrize'
});
this.getIndex();
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail);
if (e.detail.type && e.detail.type == 'actRule') {
this.setData({
showactRuleType: ""
});
return;
}
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
});
return;
}
this.setData({
showModalType: ''
});
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo)
});
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId)
});
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
return;
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
} else {
this.setData({
showModalType: ''
});
}
}
return;
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1');
this.setData({
showModalType: 'firstIn'
});
return;
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
return;
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
});
return;
}
this.setData({
showModalType: ""
});
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal();
}
this.setData({
showModalType: ''
});
},
async getIndex() {
const resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({
wid: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].wid
});
if (resp.success) {
this.setData({
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
});
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = resp.data;
}
},
checkTime() {
if (_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.actStatus == 1) {
wx.showToast({
title: "活动未开始",
icon: "none"
});
return false;
}
if (_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.actStatus == 3) {
wx.showToast({
title: "活动已结束,感谢您的关注~",
icon: "none"
});
return false;
}
return true;
},
go_jingcai() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(4);
if (!this.checkTime()) {
return;
}
wx.showToast({
title: '还没有链接竞猜',
icon: "none",
mask: true
});
},
go_ai() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(5);
if (!this.checkTime()) {
return;
}
wx.showToast({
title: '请前往网易云参加活动',
icon: "none",
mask: true
});
},
go_shop() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(6);
if (!this.checkTime()) {
return;
}
wx.showToast({
title: '还没有链接积分商城',
icon: "none",
mask: true
});
},
go_game() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(7);
if (!this.checkTime()) {
return;
}
wx.showToast({
title: '还没有链接节奏大师',
icon: "none",
mask: true
});
},
go_credits() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(10);
if (!this.checkTime()) {
return;
}
wx.showToast({
title: '还没有链接积分明细',
icon: "none",
mask: true
});
},
go_prizeurl() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(3);
wx.showToast({
title: '还没有链接我的奖品页',
icon: "none",
mask: true
});
}
});
......
{
"navigationBarTitleText": "首页",
"usingComponents": {
"rule-modal": "./../component/ruleModal/index",
"scan-limit-modal": "./../component/scanLimitModal/index",
"first-in-show-modal": "./../component/firstInShowModal/index",
"click-gift-modal": "./../component/clickGiftModal/index",
"open-award-modal": "./../component/openAwardModal/index",
"assist-modal": "./../component/assistModal/index",
"assist-suc-modal": "./../component/assistSucModal/index",
"assist-fail-modal": "./../component/assistFailModal/index",
"assist-reflct-modal": "./../component/assistReflctModal/index",
"auth-userinfo": "./../component/authUserInfo/index",
"game-guide-modal": "./../component/gameGuideModal/index",
"rule-modal": "./../component/ruleModal/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",
"task": "./../component/task/task"
}
}
\ No newline at end of file
......@@ -3,16 +3,18 @@
<view class="bg"></view>
<view class="top">
<view class="rulebtn" bind:tap="showRuleModal"></view>
<view class="prizebtn"></view>
<view class="prizebtn" bind:tap="go_prizeurl"></view>
<view class="logo"></view>
<view class="title"></view>
<view class="taskicon"></view>
<view class="drawicon"></view>
<view class="drawicon" bind:tap="showDrawPop"></view>
<view class="taskicon" bind:tap="handleClickTask"></view>
<view class="creditsbg"></view>
<text class="creditslab"></text>
<text class="creditsnum"></text>
<view class="gocredits"></view>
<view class="creditsBox">
<text class="creditslab">我的积分:</text>
<text class="creditsnum">{{credits}}</text>
</view>
<view class="gocredits" bind:tap="go_credits"></view>
</view>
<view class="car"></view>
<view class="build1"></view>
......@@ -20,15 +22,15 @@
<view class="build3"></view>
<view class="build4"></view>
<view class="build5"></view>
<view class="aibtn"></view>
<view class="gamebtn"></view>
<view class="guessbtn"></view>
<view class="shopbtn"></view>
<view class="aibtn" bind:tap="go_ai"></view>
<view class="gamebtn" bind:tap="go_game"></view>
<view class="guessbtn" bind:tap="go_jingcai"></view>
<view class="shopbtn" bind:tap="go_shop"></view>
</view>
<view wx:if="{{!authAvatar && !isShowAuth}}" class="db_index-container3" bind:tap="showAuth"></view>
<!-- <button wx:if="{{!isBindPhone}}" class="db_index-container3" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button> -->
<game-guide-modal wx:if="{{showModalType == 'gameGuide'}}" catch:onModalClose="onModalClose" catch:onModalClose2="showChallange"></game-guide-modal>
<rule-modal wx:if="{{showModalType == 'rule'}}" catch:onModalClose="onModalClose"></rule-modal>
<button wx:if="{{!isBindPhone}}" class="db_index-container3" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button>
<!-- <game-guide-modal wx:if="{{showModalType == 'gameGuide'}}" catch:onModalClose="onModalClose" catch:onModalClose2="showChallange"></game-guide-modal>
<scan-limit-modal wx:if="{{showModalType == 'scanLimit'}}" catch:onModalClose="onModalClose"></scan-limit-modal>
<scan-tip-modal wx:if="{{showModalType == 'scanTip'}}" catch:scanRightNow="scanRightNow" catch:onModalClose="onModalClose"></scan-tip-modal>
<first-in-show-modal wx:if="{{showModalType == 'firstIn'}}" isBindPhone="{{isBindPhone}}" catch:onModalClose="onModalClose" catch:onModalPhoneClose="onModalPhoneClose" catch:onModalCloseShowRule="onModalCloseShowRule"></first-in-show-modal>
......@@ -37,7 +39,13 @@
<assist-modal wx:if="{{showModalType == 'assist'}}" catch:onAssistResult="onAssistResult" catch:onAuthPhone="onAuthPhone" catch:onAuthUser="onAuthUser" isBindPhone="{{isBindPhone}}" isAuthUserInfo="{{authAvatar}}" shareCode="{{shareCode}}" catch:onModalClose="onModalClose"></assist-modal>
<assist-fail-modal wx:if="{{showModalType == 'assistFail'}}" assistErrorMsg="{{assistErrorMsg}}" catch:onModalClose="onModalClose"></assist-fail-modal>
<assist-reflct-modal wx:if="{{showModalType == 'assistReflct'}}" catch:onModalClose="onModalClose" friends="{{inviteNum}}" tickets="{{inviteTicketNum}}"></assist-reflct-modal>
<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>
<act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<act-rule-modal wx:if="{{showactRuleType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<rule-modal wx:if="{{showModalType == 'rule'}}" activityRule="{{activityRule}}" catch:onModalClose="onModalClose"></rule-modal>
<draw-modal wx:if="{{showModalType == 'draw'}}" drawTime="{{drawTime}}" 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>
<task wx:if="{{showModalType == 'task'}}" catch:onModalClose="onModalClose" bindselect="onSelectShareType"></task>
</view>
\ No newline at end of file
......@@ -2,7 +2,7 @@
.db_index-container {
width: 750rpx;
height: 100vh;
overflow: hidden;
overflow: scroll;
position: absolute;
}
......@@ -10,8 +10,6 @@
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
margin: auto;
position: absolute;
}
......@@ -109,25 +107,30 @@
background-size: 100% 100%;
position: absolute;
}
.creditsBox {
width:368rpx;
height: 48rpx;
left: 187rpx;
top: 275rpx;
color: #80481b;
position: absolute;
text-align: center;
}
.creditslab {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #80481b;
font-size: 15rpx;
position: absolute;
font-size: 34rpx;
position: relative;
}
.creditsnum {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #ff4d49;
font-size: 15rpx;
position: absolute;
font-size: 34rpx;
position: relative;
}
.gocredits {
......
var webpackRequire = require("./../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_load/loading/index.js",
{
/***/ "./src/packages/wm-cloud-db_load/loading/index.js":
/*!********************************************************!*\
!*** ./src/packages/wm-cloud-db_load/loading/index.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
Page({
data: {},
onLoad: function (options) {
setTimeout(() => {
wx.redirectTo({
url: `/packages/wm-cloud-db_index/db_index/index`
});
}, 3000);
}
});
/***/ })
/******/ });
\ No newline at end of file
{
"navigationBarTitleText": "loading",
"usingComponents": {
}
}
\ No newline at end of file
<view class="loadbox">
<view class="loadbg"></view>
<view class="logo"></view>
<view class="ip"></view>
<view class="loadbardown"></view>
<view class="laodbarbox">
<view class="loadbaron"></view>
</view>
<view class="loadtip"></view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.loadbox {
width: 750rpx;
height: 1624rpx;
left: 0rpx;
top: 0rpx;
position: absolute;
overflow-y: hidden;
}
.loadbox .loadbg {
width: 750rpx;
height: 1624rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .laodbarbox {
width: 582rpx;
height: 40rpx;
position: absolute;
left: 84rpx;
top: 1166rpx;
overflow: hidden;
border-radius: 45rpx;
}
.loadbox .laodbarbox .loadbaron{
width: 582rpx;
height: 40rpx;
position: absolute;
left: -582rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/baron.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadbarAni 3s linear 1 forwards;
}
.loadbox .loadbardown {
width: 582rpx;
height: 40rpx;
position: absolute;
left: 84rpx;
top: 1166rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/bardown.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .loadtip {
width: 122rpx;
height: 33rpx;
left: 315rpx;
top: 1224rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadtip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadtipAni 1s linear infinite;
}
.loadbox .logo {
width: 249rpx;
height: 167rpx;
left: 249rpx;
top: 251rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/logo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .ip {
width: 638rpx;
height: 1088rpx;
left: 82rpx;
top: 524rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/ip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .loadtip {
width: 122rpx;
height: 33rpx;
left: 315rpx;
top: 1224rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadtip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadtipAni 1s linear infinite;
}
@keyframes loadtipAni {
0% {
transform: translateY(0rpx);
}
50% {
transform: translateY(15rpx);
}
100% {
transform: translateY(0rpx);
}
}
@keyframes loadbarAni {
0% {
transform: translateX(0rpx);
}
100% {
transform: translateX(582rpx);
}
}
\ No newline at end of file
......@@ -5,16 +5,20 @@ exports.modules = {
/*!******************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/utils/db_api/dbrequest.js ***!
\******************************************************************/
/*! exports provided: dbLoginParam, dbCheckHavePower, apiCoopIndex, apiScan, uploadFile, authAvatar, getTicketStatus, getShareUserInfo, doAssist, getActivityStatus, queryOrderId, userRecord */
/*! exports provided: dbDomain, mdDomain, dbLogExposure, dbLogClick, dbLoginParam, dbCheckHavePower, apiCoopIndex, apiDraw, apiQueryOptions, authAvatar, getTicketStatus, getShareUserInfo, doAssist, getActivityStatus, queryOrderId, userRecord, getTaskInfoParam, getShareCodeParam */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbDomain", function() { return dbDomain; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mdDomain", function() { return mdDomain; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbLogExposure", function() { return dbLogExposure; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbLogClick", function() { return dbLogClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbLoginParam", function() { return dbLoginParam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbCheckHavePower", function() { return dbCheckHavePower; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiCoopIndex", function() { return apiCoopIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiScan", function() { return apiScan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uploadFile", function() { return uploadFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDraw", function() { return apiDraw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiQueryOptions", function() { return apiQueryOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "authAvatar", function() { return authAvatar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTicketStatus", function() { return getTicketStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShareUserInfo", function() { return getShareUserInfo; });
......@@ -22,16 +26,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActivityStatus", function() { return getActivityStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryOrderId", function() { return queryOrderId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userRecord", function() { return userRecord; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTaskInfoParam", function() { return getTaskInfoParam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShareCodeParam", function() { return getShareCodeParam; });
// 线上测试 pre 线上正式online
// TODO 上线前检查
const app = getApp();
// const __env__ = 'pre'
// const dbDomains = {
// 'online': "https://95721.activity-18.m.duiba.com.cn",
// 'pre': "https://activity-pre.m.duiba.com.cn",
// 'test': "https://activity.m.duibatest.com.cn"
// }
const __env__ = 'test';
const dbDomains = {
'online': "https://95721.activity-18.m.duiba.com.cn",
'pre': "https://activity-pre.m.duiba.com.cn",
'test': "https://activity.m.duibatest.com.cn"
};
// const dbDomainPaths = {
// 'online': dbDomains['online'] + "/projectx/p764e268d",
......@@ -40,10 +45,24 @@ const app = getApp();
// }
// /**小程序接口 */
// export const dbDomain = dbDomains[__env__]
const dbDomain = dbDomains[__env__];
// /**活动接口 */
// export const apiDbDomain = dbDomainPaths[__env__]
const exposurePaths = {
'online': 'https://embedlog.duiba.com.cn/exposure/standard',
'pre': 'https://embedlog.duiba.com.cn/exposure/standard',
'test': 'https://embedlog.duibatest.com.cn/exposure/standard',
'dev': 'https://embedlog.duibadev.com.cn/exposure/standard'
};
const mdDomain = exposurePaths[__env__];
const dbLogExposure = {
url: mdDomain
};
/** 点击埋点 */
const dbLogClick = {
url: dbDomain + '/log/click'
};
// 小程序授权登陆
const dbLoginParam = {
url: "/weimocloud/wechat/autoLogin",
......@@ -62,24 +81,24 @@ const dbCheckHavePower = {
/** 活动首页*/
const apiCoopIndex = {
url: "/weimocloud/projectx/index",
url: "/duiba/projectx/index",
//apiDbDomain +
header: {},
method: "GET"
};
/** 扫码*/
const apiScan = {
url: "/weimocloud/projectx/scan",
/** 转盘抽奖*/
const apiDraw = {
url: "/duiba/projectx/draw",
//apiDbDomain +
header: {},
method: "GET"
};
// 上传头像数据
const uploadFile = {
url: "/weimocloud/customActivity/imgUploadUrl",
method: "POST",
// 转盘奖品信息
const apiQueryOptions = {
url: "/duiba/projectx/queryOptions",
method: "GET",
header: {}
};
......@@ -132,6 +151,20 @@ const userRecord = {
header: {}
};
// 任务接口
const getTaskInfoParam = {
url: "/weimocloud/projectx/taskInfo",
method: "GET",
header: {}
};
// 获取邀请码
const getShareCodeParam = {
url: "/weimocloud/projectx/getShareCode",
method: "GET",
header: {}
};
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js":
......@@ -158,7 +191,9 @@ __webpack_require__.r(__webpack_exports__);
const globalData = {
loginToken: "",
indexInfo: {},
wid: ""
wid: "",
projectxID: "1",
appID: "1"
};
//正式项目 pc98b8da4
//线上测试 pb4c53264
......@@ -179,16 +214,18 @@ function getUrlParam(name, search) {
/*!**************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/utils/db_api/index.js ***!
\**************************************************************/
/*! exports provided: reqDbLogin, reqDbCheckHavePower, apiDbIndexInfo, apiDbScan, apiUploadFile, apiAuthAvatar, apiGetTicketStatus, apiGetShareUserInfo, apiDoAssist, apiGetActivityStatus, apiQueryOrderId, apiUserRecord */
/*! exports provided: logExposure, logClick, reqDbLogin, reqDbCheckHavePower, apiDbIndexInfo, apiDbDraw, apiDbQueryOption, apiAuthAvatar, apiGetTicketStatus, apiGetShareUserInfo, apiDoAssist, apiGetActivityStatus, apiQueryOrderId, apiUserRecord, getTaskInfo, getShareCode */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logExposure", function() { return logExposure; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logClick", function() { return logClick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reqDbLogin", function() { return reqDbLogin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reqDbCheckHavePower", function() { return reqDbCheckHavePower; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDbIndexInfo", function() { return apiDbIndexInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDbScan", function() { return apiDbScan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiUploadFile", function() { return apiUploadFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDbDraw", function() { return apiDbDraw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDbQueryOption", function() { return apiDbQueryOption; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiAuthAvatar", function() { return apiAuthAvatar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiGetTicketStatus", function() { return apiGetTicketStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiGetShareUserInfo", function() { return apiGetShareUserInfo; });
......@@ -196,6 +233,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiGetActivityStatus", function() { return apiGetActivityStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiQueryOrderId", function() { return apiQueryOrderId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiUserRecord", function() { return apiUserRecord; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTaskInfo", function() { return getTaskInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShareCode", function() { return getShareCode; });
/* harmony import */ var _requestFun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./requestFun */ "./src/packages/wm-cloud-db_index/utils/db_api/requestFun.js");
/* harmony import */ var _dbrequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dbrequest */ "./src/packages/wm-cloud-db_index/utils/db_api/dbrequest.js");
/* harmony import */ var _globalData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
......@@ -203,6 +242,32 @@ __webpack_require__.r(__webpack_exports__);
/** 埋点曝光 */
const logExposure = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
data: {
dpm: `${_globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].appID}.110.${param}.1`,
dcm: '202.' + _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].projectxID + '.0.0',
domain: `//embedlog.duiba.com.cn`,
appId: _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].appID
},
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["dbLogExposure"]
});
};
/** 埋点点击 */
const logClick = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
data: {
// ...param,
dpm: `${_globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].appID}.110.${param}.1`,
dcm: '202.' + _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].projectxID + '.0.0',
domain: '//embedlog.duiba.com.cn',
appId: _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].appID
},
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["dbLogClick"]
});
};
// 小程序授权登陆
const reqDbLogin = param => {
console.warn("reqDbLogin");
......@@ -232,22 +297,23 @@ const apiDbIndexInfo = param => {
});
};
//扫码
const apiDbScan = param => {
//抽奖
const apiDbDraw = param => {
param.loginToken = _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].loginToken;
console.log(param);
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["apiScan"],
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["apiDraw"],
data: param
});
};
//上传头像
const apiUploadFile = param => {
//转盘奖品信息
const apiDbQueryOption = param => {
console.log(param, "#$#$$$#$#$");
param.loginToken = _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].loginToken;
console.log(param);
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["uploadFile"],
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["apiQueryOptions"],
data: param
});
};
......@@ -313,6 +379,22 @@ const apiUserRecord = param => {
});
};
// 任务接口
const getTaskInfo = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["getTaskInfoParam"],
data: param
});
};
// 获取邀请码
const getShareCode = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["getShareCodeParam"],
data: param
});
};
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/requestFun.js":
......
......@@ -23,6 +23,13 @@
"pages": [
"db_jump/index"
]
},
{
"root": "packages/wm-cloud-db_load",
"name": "wm-cloud-db_load",
"pages": [
"loading/index"
]
}
],
"window": {
......
import { logClick, logExposure } from "../../utils/db_api"
import {
globalData
} from "../../utils/db_api/globalData"
......@@ -6,7 +7,6 @@ const app = getApp()
Component({
data: {
lastScanTimes: 0
},
properties: {
......@@ -14,17 +14,17 @@ Component({
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
logExposure(22)
logExposure(23)
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'actRule');
},
onModalClose_btn() {
logClick(23)
this.triggerEvent("onModalClose", 'actRule');
},
}
})
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view class="actrulelogo"></view>
<view class="actruleip"></view>
<view class="actrulelab"></view>
<view class="actrulebtn" catch:tap="onModalClose"></view>
<view class="actrulebtn" catch:tap="onModalClose_btn"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
import { apiDbDraw, apiDbQueryOption, logClick, logExposure } from "../../utils/db_api"
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
isTurn = false
Component({
data: {
list: ["top:0rpx", "top:0rpx", "top:0rpx"],
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"
],
getprize: {}
},
properties: {
drawTime: Number
},
attached() {
logExposure(16)
logExposure(17)
isTurn = false
this.getPrizeInfo()
// console.log(this)
// console.error("看看文案", this.data)
// this.setData({
// lastScanTimes: globalData.indexInfo.lastScanTimes
// })
},
methods: {
async getPrizeInfo() {
const resp = await apiDbQueryOption({ wid:globalData.wid })
if (resp.success) {
this.setData({
prizeList: resp.data
})
}
},
onModalClose() {
if(isTurn){
return
}
this.triggerEvent("onModalClose", 'draw');
},
async onClickBtn() {
logClick(17)
if(isTurn){
return
}
if (this.data.drawTime <= 0) {
wx.showToast({
title: '抽奖机会已用完,快去参与活动赢取吧~',
icon: "none"
})
return
}
isTurn = true
const resp = await apiDbDraw({ wid:globalData.wid })
if (resp.success) {
this.setData({
getprize: resp.data
})
speed = 150
rate0 = 1
rate1 = 1
rate2 = 1
round0 = 0
round2 = 0
round1 = 0
let item1 = 0;
let item2 = 1;
let item3 = 2;
if (resp.data.prizeId == "thanks") {
// 未中奖
let arr = Array.from({ length: this.data.prizeList.length }, (_, index) => index)
console.log(arr)
for (let i = 0; i < 3; i++) {
var _num = Math.floor(Math.random() * arr.length)
if (i == 0) {
item1 = arr[_num];
} else if (i == 1) {
item2 = arr[_num];
} else {
item3 = arr[_num];
}
arr.splice(_num, 1)
}
} else {
// 中奖了
for (let i = 0; i < this.data.prizeList.length; i++) {
if (this.data.prizeList[i].prizeId == resp.data.prizeId) {
item1 = item2 = item3 = i
}
}
}
this.itemMove(0, item1)
setTimeout(() => {
this.itemMove(1, item2)
}, 500)
setTimeout(() => {
this.itemMove(2, item3)
}, 1000)
}else{
isTurn = false
}
},
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');
if (this.data.getprize.prizeId != "thanks") {
this.triggerEvent("onModalPrize", { ...this.data.getprize })
} else {
this.triggerEvent("onModalNoPrize")
}
isTurn = false
}, 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">剩余抽奖次数:{{drawTime}}</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="id">
<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 { logClick, logExposure } from "../../utils/db_api"
import {
globalData
} from "../../utils/db_api/globalData"
// 活动攻略
const app = getApp()
Component({
data: {
},
properties: {
},
attached() {
logExposure(20)
logExposure(21)
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'drawNoPrize');
},
onModalClose_btn() {
logClick(21)
this.triggerEvent("onModalClose", 'drawNoPrize');
},
}
})
\ 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_btn"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.assistSucModal {
.drawNoPrizeModal {
width: 100%;
height: 100%;
z-index: 10;
......@@ -8,9 +7,9 @@
}
.assistSucModalContainer {
.drawNoPrizeContainer {
width: 750rpx;
height: 1624rpx;
height: 825rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
......@@ -19,38 +18,44 @@
position: absolute;
}
.assistSucModalJoinBtn {
width: 395rpx;
height: 92rpx;
left: 179rpx;
top: 677rpx;
z-index: 4;
background: url("https://yun.duiba.com.cn/aurora/assets/251437e38a042f316b8117379c2df423102e5494.png") no-repeat;
.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;
}
.assistSucModalBg {
width: 746rpx;
height: 1463rpx;
pointer-events: none;
left: 4rpx;
top: 46rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/35ec7509457086cf5ea528f42d9a31939d82c829.png") no-repeat;
.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;
}
.assistSucModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 350rpx;
top: 897rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
.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 { logClick, logExposure } from "../../utils/db_api"
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
},
attached() {
logExposure(18)
logExposure(19)
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'drawPrize');
},
onModalClose_btn() {
logClick(19)
this.triggerEvent("onModalClose", 'drawPrize');
},
}
})
\ 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_btn"></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';
.openAwardModal {
.drawprizeModal {
width: 100%;
height: 100%;
z-index: 10;
......@@ -8,9 +7,9 @@
}
.openAwardModalContainer {
.drawprizeContainer {
width: 750rpx;
height: 1517rpx;
height: 934rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
......@@ -18,108 +17,85 @@
margin: auto;
position: absolute;
}
.openAwardModalTitle {
width: 349rpx;
height: 43rpx;
left: 200rpx;
top: 289rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/6780502182388034f4b211c0c16b8f07ee788292.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.openAwardModalTip {
.drawprizelight {
width: 750rpx;
height: 23rpx;
top: 687rpx;
height: 934rpx;
left: 0rpx;
text-align: center;
font-size: 24rpx;
color: #ffffff;
/* background: url("https://yun.duiba.com.cn/aurora/assets/fe00e959850eb425d44c1bca5f5b778041f711e9.png") no-repeat;
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%; */
background-size: 100% 100%;
position: absolute;
}
.openAwardModalHappyGetBtn {
width: 526rpx;
height: 138rpx;
left: 111rpx;
top: 1014rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/a221191f050c69bba55989bf97da2121227e849e.png") no-repeat;
.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;
}
.openAwardModalPic {
width: 271rpx;
height: 304rpx;
left: 240rpx;
top: 362rpx;
/* background: url("https://yun.duiba.com.cn/aurora/assets/fd1119b5dadc7aa189870a58486579e071de5a48.png") no-repeat; */
.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;
}
.openAwardModalPicSmallContainer {
width: 750rpx;
height: 226rpx;
top: 765rpx;
display: flex;
flex-direction: row;
justify-content: space-around;
.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;
}
.openAwardModalPicSmall {
width: 192rpx;
height: 226rpx;
/* background: url("https://yun.duiba.com.cn/aurora/assets/bbb90de2788e91a5e6a59de9db817cb3d33bb3a0.png") no-repeat;
.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: relative;
background-size: 100% 100%;
position: absolute;
left: 281rpx;
top: 285rpx;
}
.openAwardModalPicSmallImg {
width: 160rpx;
height: 160rpx;
left: 0rpx;
.itemImg {
width: 188rpx;
height: 189rpx;
position: absolute;
right: 0rpx;
margin: auto;
left: 0rpx;
top: 0rpx;
border-radius: 20rpx;
}
.openAwardModalPicSmallName {
width: 160rpx;
height: 30rpx;
.drawTip {
width: 100%;
height: 40rpx;
left: 0rpx;
top: 678rpx;
text-align: center;
font-size: 24rpx;
color: #c2432a;
position: absolute;
overflow: hidden;
right: 0rpx;
margin: auto;
top: 170rpx;
font-size: 20rpx;
color: #989796;
}
.openAwardModalCloseBtn {
width: 50rpx;
height: 50rpx;
right: 120rpx;
top: 520rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
.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;
......
import {
globalData
} from "../../utils/db_api/globalData"
Component({
data: {
},
properties: {
},
ready(){
setTimeout(()=>{
this.triggerEvent("onModalClose", 'loading');
},3000)
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'loading');
},
}
})
\ No newline at end of file
<view class="loadbox">
<view class="loadbg"></view>
<view class="loadbardown"></view>
<view class="laodbarbox">
<view class="loadbaron"></view>
</view>
<view class="loadtip"></view>
</view>
\ No newline at end of file
/* packageDB_chocolate/pages/loadPage/loadPage.wxss */
.loadbox {
width: 750rpx;
height: 1624rpx;
left: 0rpx;
top: 0rpx;
position: absolute;
overflow-y: hidden;
}
.loadbox .loadbg {
width: 750rpx;
height: 1624rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/qiaolezi/loadpage/loadbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .laodbarbox {
width: 618rpx;
height: 68rpx;
position: absolute;
left: 92rpx;
top: 882rpx;
overflow: hidden;
border-radius: 45rpx;
}
.loadbox .laodbarbox .loadbaron{
width: 592rpx;
height: 55rpx;
position: absolute;
left: -592rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/qiaolezi/loadpage/baron.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadbarAni 3s linear 1 forwards;
}
.loadbox .loadbardown {
width: 618rpx;
height: 67rpx;
position: absolute;
left: 78rpx;
top: 883rpx;
background: url("https://yun.duiba.com.cn/db_games/qiaolezi/loadpage/bardown.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .loadtip {
width: 185rpx;
height: 31rpx;
left: 315rpx;
top: 993rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/qiaolezi/loadpage/loadtip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadtipAni 1s linear infinite;
}
@keyframes loadtipAni {
0% {
transform: translateY(0rpx);
}
50% {
transform: translateY(15rpx);
}
100% {
transform: translateY(0rpx);
}
}
@keyframes loadbarAni {
0% {
transform: translateX(0rpx);
}
100% {
transform: translateX(592rpx);
}
}
\ No newline at end of file
......@@ -10,15 +10,16 @@ Component({
},
properties: {
activityRule:String
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
ruleText: globalData.indexInfo.rule
ruleText: globalData.indexInfo.activityRule
})
console.error("看看文案", this.data)
},
methods: {
......
......@@ -2,11 +2,11 @@
<view class="ruleModalContainer">
<view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view>
<!-- <text class="ruleModalBgText"> -->
<!-- {{ruleText}} -->
<!-- </text> -->
<!-- <text class="ruleModalBgText">
{{ruleText}}
</text> -->
<rich-text class="ruleModalBgText" nodes="{{activityRule}}"/>
</view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
......@@ -8,59 +8,33 @@
}
.ruleModalContainer {
width: 543rpx;
height: 896rpx;
width: 560rpx;
height: 897rpx;
left: 0rpx;
right: 0rpx;
top: 200rpx;
top: 0rpx;
bottom: 0rpx;
position: absolute;
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 {
width: 543rpx;
height: 796rpx;
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;
width: 560rpx;
height: 781rpx;
left: 0rpx;
right: 0rpx;
top: 770rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/rulebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
left: 0rpx;
right: 0rpx;
width: 488rpx;
height: 583rpx;
top: 108rpx;
left: 48rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
......@@ -69,9 +43,22 @@
}
.ruleModalBgText {
width: 460rpx;
width: 468rpx;
font-size: 24rpx;
position: absolute;
color: #000000;
color: #915a16;
text-indent: 2em;
word-wrap:break-word;
white-space: normal;
}
.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
......@@ -10,14 +10,14 @@ import {
import {
apiAuthAvatar,
apiDbIndexInfo,
apiDbScan,
apiGetActivityStatus,
apiGetTicketStatus,
apiUploadFile,
apiUserRecord,
reqDbCheckHavePower,
reqDbLogin,
getShareCode
getShareCode,
logExposure,
logClick
} from "../utils/db_api/index";
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
......@@ -26,7 +26,7 @@ let shareType = "normal";
Page({
data: {
guideIndex: -1,
showModalType: "actRule",
showModalType: "",
isBindPhone: false,
ticket: "",
inviteNum: 0,
......@@ -40,11 +40,29 @@ Page({
activityStatus: 0,
isPlayMusic: true,
assistErrorMsg: "",
shareCode: null
prizeInfo: {},
shareCode: null,
// index数据
actStatus: 1,
credits: 0,
activityRule: "",
drawTime: 0,
showactRuleType:""
},
onLoad: async function (options) {
logExposure(1)
logExposure(2)
logExposure(3)
logExposure(4)
logExposure(5)
logExposure(6)
logExposure(7)
logExposure(8)
logExposure(9)
logExposure(10)
/** 获取邀请码 */
this.getShareCode();
......@@ -81,7 +99,7 @@ Page({
// const wid = await this.getWid()
const wid = await this.getWid()
// apiUserRecord({
// wid,
......@@ -102,47 +120,32 @@ Page({
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
// const isBindPhone = await this.getBindPhone(wid)
// if (isBindPhone) {
// /**已绑定的老用户直接拿loginToken */
// await this.login(wid)
// const resp = await apiDbIndexInfo({
// wid
// })
// if (resp.success) {
// this.setData({
// authAvatar: resp.data.authAvatar,
// inviteNum: resp.data.inviteNum,
// inviteTicketNum: resp.data.inviteTicketNum
// })
// if (resp.data.authAvatar && !options.shareCode && !options.q) {
// if (wx.getStorageSync('db_firstIn_pop') == '1') {
// //已经授权的情况下走新手引导
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0
// })
// } else {
// //看是否有人帮忙助力
// // resp.data.inviteNum > 0
// if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
// this.setData({
// showModalType: "assistReflct"
// })
// }else{
// this.openGameModal()
// }
globalData.wid = wid
const isBindPhone = await this.getBindPhone({wid})
if (isBindPhone) {
/**已绑定的老用户直接拿loginToken */
await this.login(wid)
const resp = await apiDbIndexInfo({wid:wid})
if (resp.success) {
this.setData({
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
})
// }
// }
// }
// /**首页接口存储 */
// globalData.indexInfo = resp.data
// }
// }
if(resp.data.firstIn){
this.setData({
showactRuleType:"actRule"
})
}
if(resp.data.musicPop){
this.showDrawPop()
}
/**首页接口存储 */
globalData.indexInfo = resp.data
}
}
// // console.warn("isBindPhone", isBindPhone)
// this.setData({
// isBindPhone
......@@ -359,8 +362,8 @@ Page({
showModalType: "assistReflct"
})
return
}else{
console.warn("进游戏引导弹窗了", )
} else {
console.warn("进游戏引导弹窗了",)
this.openGameModal()
}
console.warn("完成引导")
......@@ -369,137 +372,13 @@ Page({
guideIndex: this.data.guideIndex + 1
})
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: 'rule'
})
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail)
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
})
return
}
this.setData({
showModalType: ''
})
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo),
})
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId),
})
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
return
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
} else {
this.setData({
showModalType: ''
})
}
}
return
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1')
this.setData({
showModalType: 'firstIn'
})
return
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
return
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
})
return
}
this.setData({
showModalType: ""
})
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal()
}
this.setData({
showModalType: ''
})
},
openGameModal(){
if(!!wx.getStorageSync("gameGuide")){
openGameModal() {
if (!!wx.getStorageSync("gameGuide")) {
return
}
wx.setStorageSync("gameGuide", true);
this.setData({showModalType:"gameGuide"})
this.setData({ showModalType: "gameGuide" })
},
onModalPhoneClose(e) {
console.warn("onModalPhoneClose,e", e.detail)
......@@ -593,7 +472,7 @@ Page({
// duration: 3000,
// })
},
fail: () => {}
fail: () => { }
// complete: (res) => {
// wx.navigateBack({
// delta: 1
......@@ -602,62 +481,7 @@ Page({
});
},
async onOpenAward() {
this.setData({
isBindPhone: true
})
let resp = await apiDbScan({
ticket: this.data.ticket,
qrcodeSign: this.data.qrcodeSign
})
//mock
// let resp = {
// code: null,
// message: null,
// success: true,
// timeStamp: 1702902817178,
// data: {
// prizeInfoVO: [{
// prizeName: "任务获得门票",
// prizeImg: "//yun.duiba.com.cn/polaris/悦龙门门票.3e5353da026b89b1656686bd95323cf533ff9e6f.png",
// sendCount: 2,
// type: 4,
// url: null
// }, {
// prizeName: "第4次-5元立减金腾讯视频周卡-线上测试",
// prizeImg: "//yun.duiba.com.cn/polaris/5元优惠券.1ca8f08fb363d846e45ab206b9621af3ebe04a83.png",
// sendCount: 1,
// type: 1,
// url: "/aaw/projectx/takePrize?projectOrderNo=1431534976"
// }, {
// prizeName: "能量币",
// prizeImg: "//yun.duiba.com.cn/polaris/能量币.99fc40a82c66b4393f8d63fcfe20883bc149987e.png",
// sendCount: 50,
// type: 3,
// url: null
// }]
// }
// }
if (resp.success) {
// wx.setStorageSync("ticket", this.data.ticket)
// wx.setStorageSync("qrcodeSign", this.data.qrcodeSign)
const homeResp = await apiDbIndexInfo({})
if (homeResp.success) {
this.setData({
authAvatar: homeResp.data.authAvatar
})
/**首页接口存储 */
globalData.indexInfo = homeResp.data
}
this.setData({
prizeInfoVO: resp.data.prizeInfoVO,
showModalType: 'openAward'
})
console.warn('123', resp)
}
},
checkAuth(e, noShow = false) {
wx.login({
success: res => {
......@@ -842,7 +666,7 @@ Page({
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(chanllageUrl),
})
this.setData({showModalType:""})
this.setData({ showModalType: "" })
},
showShop() {
wx.navigateTo({
......@@ -881,18 +705,19 @@ Page({
},
/** 赚负担值 */
handleClickTask() {
logClick(8)
this.setData({
showModalType: 'task'
})
},
/** 任务分享类型选择回调 */
onSelectShareType (e) {
onSelectShareType(e) {
const type = e.detail.type;
console.log("执行了")
shareType = type;
},
/** 获取邀请码 */
async getShareCode () {
async getShareCode() {
const res = await getShareCode();
if (res && res.success) {
this.setData({
......@@ -924,5 +749,253 @@ Page({
},
onUnload() {
this.innerAudioContext.stop()
},
showRuleModal() {
logClick(2)
if(!this.checkTime()){
return
}
this.setData({
showModalType: 'rule'
})
},
showDrawPop() {
logClick(9)
if(!this.checkTime()){
return
}
this.setData({
showModalType: 'draw'
})
},
showNoPrizePop() {
this.setData({
showModalType: 'drawNoPrize'
})
this.getIndex()
},
showPrizePop(e) {
console.log(e)
this.setData({
prizeInfo: e.detail,
showModalType: 'drawPrize'
})
this.getIndex()
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail)
if(e.detail.type && e.detail.type == 'actRule'){
this.setData({
showactRuleType:""
})
return
}
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
})
return
}
this.setData({
showModalType: ''
})
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo),
})
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId),
})
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
return
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
} else {
this.setData({
showModalType: ''
})
}
}
return
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1')
this.setData({
showModalType: 'firstIn'
})
return
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
return
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
})
return
}
this.setData({
showModalType: ""
})
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal()
}
this.setData({
showModalType: ''
})
},
async getIndex() {
const resp = await apiDbIndexInfo({wid:globalData.wid})
if (resp.success) {
this.setData({
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
})
/**首页接口存储 */
globalData.indexInfo = resp.data
}
},
checkTime(){
if(globalData.indexInfo.actStatus == 1){
wx.showToast({
title:"活动未开始",
icon:"none"
})
return false
}
if(globalData.indexInfo.actStatus == 3){
wx.showToast({
title:"活动已结束,感谢您的关注~",
icon:"none"
})
return false
}
return true
},
go_jingcai(){
logClick(4)
if(!this.checkTime()){
return
}
wx.showToast({
title: '还没有链接竞猜',
icon: "none",
mask: true,
})
},
go_ai(){
logClick(5)
if(!this.checkTime()){
return
}
wx.showToast({
title: '请前往网易云参加活动',
icon: "none",
mask: true,
})
},
go_shop(){
logClick(6)
if(!this.checkTime()){
return
}
wx.showToast({
title: '还没有链接积分商城',
icon: "none",
mask: true,
})
},
go_game(){
logClick(7)
if(!this.checkTime()){
return
}
wx.showToast({
title: '还没有链接节奏大师',
icon: "none",
mask: true,
})
},
go_credits(){
logClick(10)
if(!this.checkTime()){
return
}
wx.showToast({
title: '还没有链接积分明细',
icon: "none",
mask: true,
})
},
go_prizeurl(){
logClick(3)
wx.showToast({
title: '还没有链接我的奖品页',
icon: "none",
mask: true,
})
}
});
\ No newline at end of file
{
"navigationBarTitleText": "首页",
"usingComponents": {
"rule-modal": "../component/ruleModal/index",
"scan-limit-modal": "../component/scanLimitModal/index",
"first-in-show-modal": "../component/firstInShowModal/index",
"click-gift-modal": "../component/clickGiftModal/index",
"open-award-modal": "../component/openAwardModal/index",
"assist-modal": "../component/assistModal/index",
"assist-suc-modal": "../component/assistSucModal/index",
"assist-fail-modal": "../component/assistFailModal/index",
"assist-reflct-modal": "../component/assistReflctModal/index",
"auth-userinfo": "../component/authUserInfo/index",
"game-guide-modal": "../component/gameGuideModal/index",
"rule-modal": "../component/ruleModal/index",
"act-rule-modal":"../component/actRuleModal/index",
"draw-modal":"../component/drawModal/index",
"draw-no-prize":"../component/drawNoPrizeModal/index",
"draw-prize":"../component/drawPrizeModal/index",
"task": "../component/task/task"
}
}
\ No newline at end of file
......@@ -3,16 +3,18 @@
<view class="bg"></view>
<view class="top">
<view class="rulebtn" bind:tap="showRuleModal"></view>
<view class="prizebtn"></view>
<view class="prizebtn" bind:tap="go_prizeurl"></view>
<view class="logo"></view>
<view class="title"></view>
<view class="drawicon" bind:tap="showDrawPop"></view>
<view class="taskicon" bind:tap="handleClickTask"></view>
<view class="drawicon"></view>
<view class="creditsbg"></view>
<text class="creditslab"></text>
<text class="creditsnum"></text>
<view class="gocredits"></view>
<view class="creditsBox">
<text class="creditslab">我的积分:</text>
<text class="creditsnum">{{credits}}</text>
</view>
<view class="gocredits" bind:tap="go_credits"></view>
</view>
<view class="car"></view>
<view class="build1"></view>
......@@ -20,15 +22,15 @@
<view class="build3"></view>
<view class="build4"></view>
<view class="build5"></view>
<view class="aibtn"></view>
<view class="gamebtn"></view>
<view class="guessbtn"></view>
<view class="shopbtn"></view>
<view class="aibtn" bind:tap="go_ai"></view>
<view class="gamebtn" bind:tap="go_game"></view>
<view class="guessbtn" bind:tap="go_jingcai"></view>
<view class="shopbtn" bind:tap="go_shop"></view>
</view>
<view wx:if="{{!authAvatar && !isShowAuth}}" class="db_index-container3" bind:tap="showAuth"></view>
<!-- <button wx:if="{{!isBindPhone}}" class="db_index-container3" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button> -->
<game-guide-modal wx:if="{{showModalType == 'gameGuide'}}" catch:onModalClose="onModalClose" catch:onModalClose2="showChallange"></game-guide-modal>
<rule-modal wx:if="{{showModalType == 'rule'}}" catch:onModalClose="onModalClose"></rule-modal>
<button wx:if="{{!isBindPhone}}" class="db_index-container3" plain="true" open-type="getPhoneNumber" bindgetphonenumber="checkAuth"></button>
<!-- <game-guide-modal wx:if="{{showModalType == 'gameGuide'}}" catch:onModalClose="onModalClose" catch:onModalClose2="showChallange"></game-guide-modal>
<scan-limit-modal wx:if="{{showModalType == 'scanLimit'}}" catch:onModalClose="onModalClose"></scan-limit-modal>
<scan-tip-modal wx:if="{{showModalType == 'scanTip'}}" catch:scanRightNow="scanRightNow" catch:onModalClose="onModalClose"></scan-tip-modal>
<first-in-show-modal wx:if="{{showModalType == 'firstIn'}}" isBindPhone="{{isBindPhone}}" catch:onModalClose="onModalClose" catch:onModalPhoneClose="onModalPhoneClose" catch:onModalCloseShowRule="onModalCloseShowRule"></first-in-show-modal>
......@@ -37,8 +39,13 @@
<assist-modal wx:if="{{showModalType == 'assist'}}" catch:onAssistResult="onAssistResult" catch:onAuthPhone="onAuthPhone" catch:onAuthUser="onAuthUser" isBindPhone="{{isBindPhone}}" isAuthUserInfo="{{authAvatar}}" shareCode="{{shareCode}}" catch:onModalClose="onModalClose"></assist-modal>
<assist-fail-modal wx:if="{{showModalType == 'assistFail'}}" assistErrorMsg="{{assistErrorMsg}}" catch:onModalClose="onModalClose"></assist-fail-modal>
<assist-reflct-modal wx:if="{{showModalType == 'assistReflct'}}" catch:onModalClose="onModalClose" friends="{{inviteNum}}" tickets="{{inviteTicketNum}}"></assist-reflct-modal>
<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>
<act-rule-modal wx:if="{{showModalType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<act-rule-modal wx:if="{{showactRuleType == 'actRule'}}" catch:onModalClose="onModalClose"></act-rule-modal>
<rule-modal wx:if="{{showModalType == 'rule'}}" activityRule="{{activityRule}}" catch:onModalClose="onModalClose"></rule-modal>
<draw-modal wx:if="{{showModalType == 'draw'}}" drawTime="{{drawTime}}" 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>
<task wx:if="{{showModalType == 'task'}}" catch:onModalClose="onModalClose" bindselect="onSelectShareType"></task>
</view>
\ No newline at end of file
.db_index-container {
width: 750rpx;
height: 100vh;
overflow: hidden;
overflow: scroll;
position: absolute;
}
......@@ -9,8 +9,6 @@
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
margin: auto;
position: absolute;
}
......@@ -108,25 +106,30 @@
background-size: 100% 100%;
position: absolute;
}
.creditsBox {
width:368rpx;
height: 48rpx;
left: 187rpx;
top: 275rpx;
color: #80481b;
position: absolute;
text-align: center;
}
.creditslab {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #80481b;
font-size: 15rpx;
position: absolute;
font-size: 34rpx;
position: relative;
}
.creditsnum {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #ff4d49;
font-size: 15rpx;
position: absolute;
font-size: 34rpx;
position: relative;
}
.gocredits {
......
// 线上测试 pre 线上正式online
// TODO 上线前检查
const app = getApp()
// const __env__ = 'pre'
const __env__ = 'test'
// const dbDomains = {
// 'online': "https://95721.activity-18.m.duiba.com.cn",
// 'pre': "https://activity-pre.m.duiba.com.cn",
// 'test': "https://activity.m.duibatest.com.cn"
// }
const dbDomains = {
'online': "https://95721.activity-18.m.duiba.com.cn",
'pre': "https://activity-pre.m.duiba.com.cn",
'test': "https://activity.m.duibatest.com.cn"
}
// const dbDomainPaths = {
// 'online': dbDomains['online'] + "/projectx/p764e268d",
......@@ -16,11 +16,25 @@ const app = getApp()
// }
// /**小程序接口 */
// export const dbDomain = dbDomains[__env__]
export const dbDomain = dbDomains[__env__]
// /**活动接口 */
// export const apiDbDomain = dbDomainPaths[__env__]
const exposurePaths = {
'online': 'https://embedlog.duiba.com.cn/exposure/standard',
'pre': 'https://embedlog.duiba.com.cn/exposure/standard',
'test': 'https://embedlog.duibatest.com.cn/exposure/standard',
'dev': 'https://embedlog.duibadev.com.cn/exposure/standard',
}
export const mdDomain = exposurePaths[__env__]
export const dbLogExposure = {
url: mdDomain,
}
/** 点击埋点 */
export const dbLogClick = {
url: dbDomain + '/log/click'
}
// 小程序授权登陆
export const dbLoginParam = {
url: "/weimocloud/wechat/autoLogin", //dbDomain +
......@@ -37,23 +51,23 @@ export const dbCheckHavePower = {
/** 活动首页*/
export const apiCoopIndex = {
url: "/weimocloud/projectx/index", //apiDbDomain +
url: "/duiba/projectx/index", //apiDbDomain +
header: {},
method: "GET"
}
/** 扫码*/
export const apiScan = {
url: "/weimocloud/projectx/scan", //apiDbDomain +
/** 转盘抽奖*/
export const apiDraw = {
url: "/duiba/projectx/draw", //apiDbDomain +
header: {},
method: "GET"
}
// 上传头像数据
export const uploadFile = {
url: "/weimocloud/customActivity/imgUploadUrl",
method: "POST",
// 转盘奖品信息
export const apiQueryOptions = {
url: "/duiba/projectx/queryOptions",
method: "GET",
header: {
}
......
......@@ -6,7 +6,9 @@
export const globalData = {
loginToken: "",
indexInfo: {},
wid: ""
wid: "",
projectxID:"1",
appID:"1"
}
//正式项目 pc98b8da4
//线上测试 pb4c53264
......
......@@ -3,8 +3,8 @@ import {
dbLoginParam,
dbCheckHavePower,
apiCoopIndex,
apiScan,
uploadFile,
apiDraw,
apiQueryOptions,
authAvatar,
getShareUserInfo,
getTicketStatus,
......@@ -13,13 +13,40 @@ import {
queryOrderId,
userRecord,
getTaskInfoParam,
getShareCodeParam
getShareCodeParam,
dbLogExposure,
dbLogClick
} from "./dbrequest";
import {
globalData
} from "./globalData";
/** 埋点曝光 */
export const logExposure = (param) => {
return requestFun({
data: {
dpm: `${globalData.appID}.110.${param}.1`,
dcm: '202.' + globalData.projectxID + '.0.0',
domain: `//embedlog.duiba.com.cn`,
appId: globalData.appID
},
...dbLogExposure
})
}
/** 埋点点击 */
export const logClick = (param) => {
return requestFun({
data: {
// ...param,
dpm: `${globalData.appID}.110.${param}.1`,
dcm: '202.' + globalData.projectxID + '.0.0',
domain: '//embedlog.duiba.com.cn',
appId: globalData.appID
},
...dbLogClick
})
}
// 小程序授权登陆
export const reqDbLogin = (param) => {
console.warn("reqDbLogin")
......@@ -49,22 +76,23 @@ export const apiDbIndexInfo = (param) => {
})
}
//扫码
export const apiDbScan = (param) => {
//抽奖
export const apiDbDraw = (param) => {
param.loginToken = globalData.loginToken
console.log(param)
return requestFun({
...apiScan,
...apiDraw,
data: param
})
}
//上传头像
export const apiUploadFile = (param) => {
//转盘奖品信息
export const apiDbQueryOption = (param) => {
console.log(param,"#$#$$$#$#$")
param.loginToken = globalData.loginToken
console.log(param)
return requestFun({
...uploadFile,
...apiQueryOptions,
data: param
})
}
......
Page({
data: {},
onLoad: function (options) {
setTimeout(()=>{
wx.redirectTo({
url: `/packages/wm-cloud-db_index/db_index/index`,
})
},3000)
}
});
\ No newline at end of file
{
"navigationBarTitleText": "loading",
"usingComponents": {
}
}
\ No newline at end of file
<view class="loadbox">
<view class="loadbg"></view>
<view class="logo"></view>
<view class="ip"></view>
<view class="loadbardown"></view>
<view class="laodbarbox">
<view class="loadbaron"></view>
</view>
<view class="loadtip"></view>
</view>
\ No newline at end of file
.loadbox {
width: 750rpx;
height: 1624rpx;
left: 0rpx;
top: 0rpx;
position: absolute;
overflow-y: hidden;
}
.loadbox .loadbg {
width: 750rpx;
height: 1624rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .laodbarbox {
width: 582rpx;
height: 40rpx;
position: absolute;
left: 84rpx;
top: 1166rpx;
overflow: hidden;
border-radius: 45rpx;
}
.loadbox .laodbarbox .loadbaron{
width: 582rpx;
height: 40rpx;
position: absolute;
left: -582rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/baron.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadbarAni 3s linear 1 forwards;
}
.loadbox .loadbardown {
width: 582rpx;
height: 40rpx;
position: absolute;
left: 84rpx;
top: 1166rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/bardown.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .loadtip {
width: 122rpx;
height: 33rpx;
left: 315rpx;
top: 1224rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadtip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadtipAni 1s linear infinite;
}
.loadbox .logo {
width: 249rpx;
height: 167rpx;
left: 249rpx;
top: 251rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/logo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .ip {
width: 638rpx;
height: 1088rpx;
left: 82rpx;
top: 524rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/ip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
}
.loadbox .loadtip {
width: 122rpx;
height: 33rpx;
left: 315rpx;
top: 1224rpx;
position: absolute;
background: url("https://yun.duiba.com.cn/db_games/jianchun/load/loadtip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
animation: loadtipAni 1s linear infinite;
}
@keyframes loadtipAni {
0% {
transform: translateY(0rpx);
}
50% {
transform: translateY(15rpx);
}
100% {
transform: translateY(0rpx);
}
}
@keyframes loadbarAni {
0% {
transform: translateX(0rpx);
}
100% {
transform: translateX(582rpx);
}
}
\ 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