Commit 3b170d43 authored by wangzhujun's avatar wangzhujun

1

parent ea499b8d
......@@ -12,16 +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: {},
properties: {},
attached() {
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
{
"component": true,
"usingComponents": {
}
}
\ 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
{
"component": true,
"usingComponents": {
}
}
\ 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
@import '/cloud-reset-app.wxss';
.assistModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.assistModalContainer {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
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;
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;
position: absolute;
}
.assistModalAssistBtn {
width: 395rpx;
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;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.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;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.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;
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/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
{
"component": true,
"usingComponents": {
}
}
\ 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
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistSucModal/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/assistSucModal/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", 'assistSuc');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ 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
@import '/cloud-reset-app.wxss';
.assistSucModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.assistSucModalContainer {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
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;
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;
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;
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/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
{
"component": true,
"usingComponents": {
}
}
\ 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
......@@ -12,7 +12,9 @@ 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();
......@@ -23,24 +25,64 @@ let rate2 = 1;
let round0 = 0;
let round2 = 0;
let round1 = 0;
isTurn = false;
Component({
data: {
list: ["top:0rpx", "top:-248rpx", "top:-496rpx"],
prizeList: ["//yun.duiba.com.cn/aurora/assets/df01955f333b67a439987511b5f63ab930c2972c.png", "//yun.duiba.com.cn/aurora/assets/53b167835b33463fcafae884df1e334397c0976d.png", "//yun.duiba.com.cn/aurora/assets/67eca6d481505b413e61ec6ff38ade2076dc2ab0.png", "//yun.duiba.com.cn/aurora/assets/12fbdd91059aba8cbf27a78725cac9ff6b8d29d1.png", "//yun.duiba.com.cn/aurora/assets/16f3321f51561eecaaec9a15baeb9aff251530ac.png", "//yun.duiba.com.cn/aurora/assets/7c3a2642cbecd4a006baf4d0fc67a8fb059c303a.png"]
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
},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
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({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
prizeList: resp.data
});
}
},
methods: {
onModalClose() {
if (isTurn) {
return;
}
this.triggerEvent("onModalClose", 'draw');
},
onClickBtn() {
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;
......@@ -48,14 +90,44 @@ Component({
round0 = 0;
round2 = 0;
round1 = 0;
this.itemMove(0, 3);
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, 2);
this.itemMove(1, item2);
}, 500);
setTimeout(() => {
this.itemMove(2, 5);
this.itemMove(2, item3);
}, 1000);
// this.itemMove(2, 5)
} else {
isTurn = false;
}
},
itemMove(id, index) {
let roundNum = 0;
......@@ -87,16 +159,14 @@ Component({
if (id == 2) {
setTimeout(() => {
this.triggerEvent("onModalClose", 'draw');
if (this.data.getprize.prizeId != "thanks") {
this.triggerEvent("onModalPrize", {
prizeId: "thanks",
optionName: "地方BNSF扣税的备份库",
optionImg: "//yun.duiba.com.cn/polaris/arshare.edd28926120dd3b64679dcaf5e648ee5cd03f493.png"
...this.data.getprize
});
// if (this.prizeData.prizeId != "thanks") {
// modalStore.pushPop("Lh_prizepop", this.prizeData)
// } else {
// modalStore.pushPop("Lh_noprizepop")
// }
} else {
this.triggerEvent("onModalNoPrize");
}
isTurn = false;
}, 1000);
}
} else {
......
......@@ -3,9 +3,9 @@
<view class="drawlight"></view>
<view class="drawbg"></view>
<view class="darwbtn" bind:tap="onClickBtn"></view>
<text class="drawNum">剩余抽奖次数:2</text>
<text class="drawNum">剩余抽奖次数:{{drawTime}}</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="*this">
<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>
......
......@@ -12,16 +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: {},
properties: {},
attached() {
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", 'drawNoPrize');
},
onModalClose_btn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(21);
this.triggerEvent("onModalClose", 'drawNoPrize');
}
}
});
......
......@@ -2,7 +2,7 @@
<view class="drawNoPrizeContainer">
<view class="drawNoPrizelogo"></view>
<view class="drawNoPrizebg"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose_btn"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
......@@ -12,7 +12,9 @@ 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();
......@@ -28,9 +30,17 @@ Component({
properties: {
prizeInfo: Object
},
attached() {
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", 'drawPrize');
},
onModalClose_btn() {
Object(_utils_db_api__WEBPACK_IMPORTED_MODULE_0__["logClick"])(19);
this.triggerEvent("onModalClose", 'drawPrize');
}
}
});
......
......@@ -2,7 +2,7 @@
<view class="drawprizeContainer">
<view class="drawprizelight"></view>
<view class="drawprizebg"></view>
<view class="darwprizebtn" bind:tap="onModalClose"></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>
......
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
{
"component": true,
"usingComponents": {
}
}
\ 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
@import '/cloud-reset-app.wxss';
.firstInModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.firstInModalContainer {
width: 750rpx;
height: 1317rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.firstInModalBg {
width: 750rpx;
height: 1317rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/08f2e348b90fa2eac6ffe3b46afc1b377e59be38.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.firstInModalBgRuleBtn {
width: 130rpx;
height: 50rpx;
left: 0rpx;
position: absolute;
right: 0rpx;
top: 733rpx;
margin: auto !important;
}
.firstInModalTomorrowBtn {
width: 395rpx;
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;
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;
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/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
{
"component": true,
"usingComponents": {
}
}
\ 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
@import '/cloud-reset-app.wxss';
.gameGuideModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.gameGuideModalContainer {
width: 746rpx;
height: 1362rpx;
left: 0rpx;
right: 0rpx;
top: 0rpx;
position: absolute;
margin: auto;
}
/* .gameGuideModalBgRule {
width: 746rpx;
height: 1362rpx;
top: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/bg.672c5b94d938762e48c46cce4397d454300be15d.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;
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;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.gameGuideModalCloseBtn {
width: 50rpx;
height: 50rpx;
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%;
position: absolute;
}
.gameGuideModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
}
.gameGuideModalBgText {
width: 460rpx;
font-size: 24rpx;
position: absolute;
color: #000000;
text-indent: 2em;
}
\ 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
@import '/cloud-reset-app.wxss';
.openAwardModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.openAwardModalContainer {
width: 750rpx;
height: 1517rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
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 {
width: 750rpx;
height: 23rpx;
top: 687rpx;
left: 0rpx;
text-align: center;
font-size: 24rpx;
color: #ffffff;
/* background: url("https://yun.duiba.com.cn/aurora/assets/fe00e959850eb425d44c1bca5f5b778041f711e9.png") no-repeat;
background-position: top left;
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;
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; */
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;
position: absolute;
}
.openAwardModalPicSmall {
width: 192rpx;
height: 226rpx;
/* background: url("https://yun.duiba.com.cn/aurora/assets/bbb90de2788e91a5e6a59de9db817cb3d33bb3a0.png") no-repeat;
background-position: top left;
background-size: 100% 100%; */
position: relative;
}
.openAwardModalPicSmallImg {
width: 160rpx;
height: 160rpx;
left: 0rpx;
position: absolute;
right: 0rpx;
margin: auto;
}
.openAwardModalPicSmallName {
width: 160rpx;
height: 30rpx;
left: 0rpx;
text-align: center;
font-size: 24rpx;
color: #c2432a;
position: absolute;
overflow: hidden;
right: 0rpx;
margin: auto;
top: 170rpx;
}
.openAwardModalCloseBtn {
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
......@@ -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() {
......
......@@ -5,7 +5,7 @@
<!-- <text class="ruleModalBgText">
{{ruleText}}
</text> -->
<rich-text class="ruleModalBgText" nodes="{{ruleText}}"/>
<rich-text class="ruleModalBgText" nodes="{{activityRule}}"/>
</view>
<view class="close" catch:tap="onModalClose"></view>
</view>
......
......@@ -32,7 +32,7 @@
}
.ruleModalBgTextContainer {
width: 468rpx;
width: 488rpx;
height: 583rpx;
top: 108rpx;
left: 48rpx;
......@@ -49,6 +49,8 @@
position: absolute;
color: #915a16;
text-indent: 2em;
word-wrap:break-word;
white-space: normal;
}
.close {
......
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
......@@ -36,9 +36,25 @@ Page({
isPlayMusic: true,
assistErrorMsg: "",
prizeInfo: {},
shareCode: null
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();
......@@ -70,7 +86,7 @@ Page({
// complete: (res) => {},
// })
// const wid = await this.getWid()
const wid = await this.getWid();
// apiUserRecord({
// wid,
......@@ -90,41 +106,30 @@ Page({
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
const isBindPhone = await this.getBindPhone();
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].wid = wid;
const isBindPhone = await this.getBindPhone({
wid
});
if (isBindPhone) {
/**已绑定的老用户直接拿loginToken */
await this.login();
await this.login(wid);
const resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({
wid
wid: 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
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
});
} else {
//看是否有人帮忙助力
// resp.data.inviteNum > 0
if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
if (resp.data.firstIn) {
this.setData({
showModalType: "assistReflct"
showactRuleType: "actRule"
});
} else {
this.openGameModal();
}
}
}
if (resp.data.musicPop) {
this.showDrawPop();
}
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = resp.data;
......@@ -346,147 +351,6 @@ Page({
guideIndex: this.data.guideIndex + 1
});
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: 'rule'
});
},
showDrawPop() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: 'draw'
});
},
showNoPrizePop() {
this.setData({
showModalType: 'drawNoPrize'
});
},
showPrizePop(e) {
console.log(e);
this.setData({
prizeInfo: e.detail,
showModalType: 'drawPrize'
});
},
onModalClose(e) {
//暂不考虑两个弹窗
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;
......@@ -595,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 => {
......@@ -872,6 +680,7 @@ Page({
},
/** 赚负担值 */
handleClickTask() {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["logClick"])(8);
this.setData({
showModalType: 'task'
});
......@@ -915,6 +724,245 @@ Page({
},
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",
"draw-modal": "./../component/drawModal/index",
"draw-no-prize": "./../component/drawNoPrizeModal/index",
......
......@@ -3,15 +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="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>
......@@ -19,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>
......@@ -36,10 +39,12 @@
<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>
<draw-modal wx:if="{{showModalType == 'draw'}}" catch:onModalClose="onModalClose" catch:onModalPrize="showPrizePop" catch:onModalNoPrize="showNoPrizePop"></draw-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>
......
......@@ -107,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 {
......
// packages/wm-cloud-db_load/db_load/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--packages/wm-cloud-db_load/db_load/index.wxml-->
<text>packages/wm-cloud-db_load/db_load/index.wxml</text>
\ No newline at end of file
/* packages/wm-cloud-db_load/db_load/index.wxss */
\ No newline at end of file
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"name": "db_load",
"pathName": "packages/wm-cloud-db_load/loading/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "db_index",
"pathName": "packages/wm-cloud-db_index/db_index/index",
"query": "",
"scene": null
},
{
"name": "db_webview",
"pathName": "packages/wm-cloud-db_index/db_webview/index",
"query": "",
"scene": null
},
{
"name": "购物车页",
"pathName": "ec_cart/index",
"query": "",
"scene": null
},
{
"name": "webview",
"pathName": "packages/wm-cloud-db_webview/db_webview/index",
"query": "",
"scene": null
},
{
"name": "db_jump",
"pathName": "packages/wm-cloud-db_jump/db_jump/index",
"query": "",
"scene": null
}
]
}
}
}
\ No newline at end of file
exports.ids = ["weimob-cloud-commons"];
exports.modules = {
/***/ "./src/app.wxss":
/*!**********************!*\
!*** ./src/app.wxss ***!
\**********************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.p + "app.wxss");
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/dbrequest.js":
/*!******************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/utils/db_api/dbrequest.js ***!
\******************************************************************/
/*! exports provided: dbLoginParam, dbCheckHavePower, apiCoopIndex, apiDraw, apiQueryOptions, authAvatar, getTicketStatus, getShareUserInfo, doAssist, getActivityStatus, queryOrderId, userRecord, getTaskInfoParam, getShareCodeParam */
/*! 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; });
......@@ -40,13 +31,12 @@ __webpack_require__.r(__webpack_exports__);
// 线上测试 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",
......@@ -55,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",
......@@ -187,7 +191,9 @@ __webpack_require__.r(__webpack_exports__);
const globalData = {
loginToken: "",
indexInfo: {},
wid: ""
wid: "",
projectxID: "1",
appID: "1"
};
//正式项目 pc98b8da4
//线上测试 pb4c53264
......@@ -208,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, getTaskInfo, getShareCode */
/*! 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; });
......@@ -234,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");
......@@ -263,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
});
};
......@@ -426,18 +461,6 @@ const login = async wid => {
});
};
/***/ }),
/***/ 0:
/*!****************************!*\
!*** multi ./src/app.wxss ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! F:\2024\20240424简醇我是歌手\src\app.wxss */"./src/app.wxss");
/***/ })
};;
\ No newline at end of file
import { logClick, logExposure } from "../../utils/db_api"
import {
globalData
} from "../../utils/db_api/globalData"
......@@ -12,10 +13,18 @@ Component({
},
attached() {
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"
......@@ -10,10 +11,11 @@ let rate2 = 1
let round0 = 0
let round2 = 0
let round1 = 0
isTurn = false
Component({
data: {
list: ["top:0rpx", "top:-248rpx", "top:-496rpx"],
list: ["top:0rpx", "top:0rpx", "top:0rpx"],
prizeList: [
"//yun.duiba.com.cn/aurora/assets/df01955f333b67a439987511b5f63ab930c2972c.png",
"//yun.duiba.com.cn/aurora/assets/53b167835b33463fcafae884df1e334397c0976d.png",
......@@ -21,27 +23,60 @@ Component({
"//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() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
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');
},
onClickBtn() {
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
......@@ -49,14 +84,45 @@ Component({
round0 = 0
round2 = 0
round1 = 0
this.itemMove(0, 3)
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, 2)
this.itemMove(1, item2)
}, 500)
setTimeout(() => {
this.itemMove(2, 5)
this.itemMove(2, item3)
}, 1000)
// this.itemMove(2, 5)
}else{
isTurn = false
}
},
itemMove(id, index) {
......@@ -91,12 +157,13 @@ Component({
if (id == 2) {
setTimeout(() => {
this.triggerEvent("onModalClose", 'draw');
this.triggerEvent("onModalPrize", { prizeId: "thanks",optionName:"地方BNSF扣税的备份库",optionImg:"//yun.duiba.com.cn/polaris/arshare.edd28926120dd3b64679dcaf5e648ee5cd03f493.png" })
// if (this.prizeData.prizeId != "thanks") {
// modalStore.pushPop("Lh_prizepop", this.prizeData)
// } else {
// modalStore.pushPop("Lh_noprizepop")
// }
if (this.data.getprize.prizeId != "thanks") {
this.triggerEvent("onModalPrize", { ...this.data.getprize })
} else {
this.triggerEvent("onModalNoPrize")
}
isTurn = false
}, 1000)
}
......
......@@ -3,9 +3,9 @@
<view class="drawlight"></view>
<view class="drawbg"></view>
<view class="darwbtn" bind:tap="onClickBtn"></view>
<text class="drawNum">剩余抽奖次数:2</text>
<text class="drawNum">剩余抽奖次数:{{drawTime}}</text>
<view class="drawArea">
<view wx:for="{{list}}" wx:key="*this">
<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>
......
import { logClick, logExposure } from "../../utils/db_api"
import {
globalData
} from "../../utils/db_api/globalData"
......@@ -12,11 +13,18 @@ Component({
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
......@@ -2,7 +2,7 @@
<view class="drawNoPrizeContainer">
<view class="drawNoPrizelogo"></view>
<view class="drawNoPrizebg"></view>
<view class="darwNoPrizebtn" catch:tap="onModalClose"></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 { logClick, logExposure } from "../../utils/db_api"
import {
globalData
} from "../../utils/db_api/globalData"
......@@ -20,12 +21,20 @@ Component({
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
......@@ -2,7 +2,7 @@
<view class="drawprizeContainer">
<view class="drawprizelight"></view>
<view class="drawprizebg"></view>
<view class="darwprizebtn" bind:tap="onModalClose"></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>
......
......@@ -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: {
......
......@@ -5,7 +5,7 @@
<!-- <text class="ruleModalBgText">
{{ruleText}}
</text> -->
<rich-text class="ruleModalBgText" nodes="{{ruleText}}"/>
<rich-text class="ruleModalBgText" nodes="{{activityRule}}"/>
</view>
<view class="close" catch:tap="onModalClose"></view>
</view>
......
......@@ -31,7 +31,7 @@
}
.ruleModalBgTextContainer {
width: 468rpx;
width: 488rpx;
height: 583rpx;
top: 108rpx;
left: 48rpx;
......@@ -48,6 +48,8 @@
position: absolute;
color: #915a16;
text-indent: 2em;
word-wrap:break-word;
white-space: normal;
}
.close {
......
......@@ -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'
......@@ -41,12 +41,28 @@ Page({
isPlayMusic: true,
assistErrorMsg: "",
prizeInfo:{},
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();
......@@ -83,7 +99,7 @@ Page({
// const wid = await this.getWid()
const wid = await this.getWid()
// apiUserRecord({
// wid,
......@@ -104,42 +120,27 @@ Page({
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
const isBindPhone = await this.getBindPhone()
globalData.wid = wid
const isBindPhone = await this.getBindPhone({wid})
if (isBindPhone) {
/**已绑定的老用户直接拿loginToken */
await this.login()
const resp = await apiDbIndexInfo({
wid
})
await this.login(wid)
const resp = await apiDbIndexInfo({wid: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
actStatus: resp.data.actStatus,
credits: resp.data.credits,
activityRule: resp.data.activityRule,
drawTime: resp.data.drawTime
})
} else {
//看是否有人帮忙助力
// resp.data.inviteNum > 0
if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
if(resp.data.firstIn){
this.setData({
showModalType: "assistReflct"
showactRuleType:"actRule"
})
}else{
this.openGameModal()
}
}
}
if(resp.data.musicPop){
this.showDrawPop()
}
/**首页接口存储 */
globalData.indexInfo = resp.data
......@@ -361,8 +362,8 @@ Page({
showModalType: "assistReflct"
})
return
}else{
console.warn("进游戏引导弹窗了", )
} else {
console.warn("进游戏引导弹窗了",)
this.openGameModal()
}
console.warn("完成引导")
......@@ -371,161 +372,13 @@ Page({
guideIndex: this.data.guideIndex + 1
})
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: 'rule'
})
},
showDrawPop(){
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: 'draw'
})
},
showNoPrizePop(){
this.setData({
showModalType: 'drawNoPrize'
})
},
showPrizePop(e){
console.log(e)
this.setData({
prizeInfo:e.detail,
showModalType: 'drawPrize'
})
},
onModalClose(e) {
//暂不考虑两个弹窗
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)
......@@ -619,7 +472,7 @@ Page({
// duration: 3000,
// })
},
fail: () => {}
fail: () => { }
// complete: (res) => {
// wx.navigateBack({
// delta: 1
......@@ -628,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 => {
......@@ -868,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({
......@@ -907,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({
......@@ -950,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",
......
......@@ -3,15 +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="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>
......@@ -19,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>
......@@ -36,10 +39,12 @@
<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>
<draw-modal wx:if="{{showModalType == 'draw'}}" catch:onModalClose="onModalClose" catch:onModalPrize="showPrizePop" catch:onModalNoPrize="showNoPrizePop"></draw-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>
......
......@@ -106,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 +
......
......@@ -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
})
}
......
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