Commit 5929d98d authored by wangzhujun's avatar wangzhujun

init

parent 8a0c1973
node_modules
node_modules
var webpackRequire = require("./webpack-require");
webpackRequire(
"./src/app.js",
{
/***/ "./src/app.js":
/*!********************!*\
!*** ./src/app.js ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
//app.js
const WeimobJsSdk = __webpack_require__(/*! ./utils/weimob-js-sdk/index */ "./src/utils/weimob-js-sdk/index.js");
const weimobJsSdk = new WeimobJsSdk();
App({
onLaunch: function () {
var logs = wx.getStorageSync('logs') || [];
logs.unshift(Date.now());
wx.setStorageSync('logs', logs);
wx.getSystemInfo({
success: result => {
console.log(result);
this.globalData.systemInfo = result;
}
});
wx.customTheme = {
"color": "color:#86B902;",
"bgc": "background-color: #86B902;",
"bdc": "border-color: #86B902;",
"bgCart": "background-color: #454552;",
"bgcOpacity": "background-color: rgba(134,185,2,0.7);",
"colorStr": "#86B902"
};
wx.currency = {
"symbol": "¥",
"name": "元",
"unit": "元"
};
},
getSdkSync() {
return Promise.resolve(weimobJsSdk);
},
getSdk() {
return weimobJsSdk;
},
globalData: {
userInfo: null
}
});
/***/ }),
/***/ "./src/utils/weimob-js-sdk/index.js":
/*!******************************************!*\
!*** ./src/utils/weimob-js-sdk/index.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// import retailApi from './utils/retail.api'
const EXTENDS_PAGE_LIST = ['pages/goods/detail', 'pages/goods/searchResult/index', 'pages/shop/cart', 'pages/order/create/index', 'pages/order/detail/paidstatus', 'pages/order/detail/detail', 'pages/user/guide/myguide', 'pages/user/membership/index', 'pages/tabbar/goods/list', 'pages/tabbar/goods/classify', 'pages/tabbar/user/center'];
const {
login,
loginByPhone
} = __webpack_require__(/*! ./utils/auth */ "./src/utils/weimob-js-sdk/utils/auth.js");
const WeimobCore = __webpack_require__(/*! ./utils/core */ "./src/utils/weimob-js-sdk/utils/core.js");
const request = __webpack_require__(/*! ./utils/request */ "./src/utils/weimob-js-sdk/utils/request.js");
const {
relationChain,
userPhone
} = __webpack_require__(/*! ./utils/paas */ "./src/utils/weimob-js-sdk/utils/paas.js");
const navigator = __webpack_require__(/*! ./utils/navigator */ "./src/utils/weimob-js-sdk/utils/navigator.js");
const retailApi = __webpack_require__(/*! ./utils/retail.api */ "./src/utils/weimob-js-sdk/utils/retail.api.js");
const {
downloadFile
} = __webpack_require__(/*! ./utils/file */ "./src/utils/weimob-js-sdk/utils/file.js");
class WeimobJsSdk {
constructor() {
this.login = login;
this.loginByPhone = loginByPhone;
this.pages = {};
this.request = request;
this.toPage = navigator;
this._globalData = {};
this.getRetailData = retailApi; // 此处暴露公共数据获取接口
this.relationChain = relationChain; // 导购存关系链
this.userPhone = userPhone; // 会员注册手机号
this.downloadFile = downloadFile;
this.getStoreId = () => 123456; // 获取storeId
this.setStoreId = () => {}; // 设置storeId
this.recommendStoreId = () => Promise.resolve({
errcode: '0',
errmsg: '处理成功',
data: {
url: 'https://100000199446.retail.n.weimob.com/saas/retail/100000199446/26051446/shop/store/preprocess',
isNewRetailMode: true,
recommendStoreResultInfo: '',
storeId: 26051446
}
}); // 简易版门店推荐
this.jumpToStoreList = url => console.log('真实环境会跳转到门店列表'); // 跳转门店列表, url为回跳地址
Object.defineProperty(this, 'page', {
get() {
return this.$getCurrentPage();
}
});
}
$getCurrentPage() {
const pages = getCurrentPages();
const page = pages[pages.length - 1];
if (page) {
if (EXTENDS_PAGE_LIST.indexOf(page.route) >= 0 && !page.core) {
page.core = new WeimobCore(page);
}
return page.core;
}
}
$setGlobalData(key, value) {
this._globalData[key] = value;
}
$getGlobalData(key) {
return this._globalData[key];
}
}
module.exports = WeimobJsSdk;
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/auth.js":
/*!***********************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/auth.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function login() {
return Promise.resolve(true);
}
function loginByPhone() {
return Promise.resolve(true);
}
module.exports = {
login,
loginByPhone
};
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/core.js":
/*!***********************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/core.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
class Core {
constructor(page) {
this.functions = {};
this.data = {};
this._watchers = {}; // 数据监听集合
this._depends = []; // 页面内的所有自定义组件实例
this._dependsIds = []; // 页面内的自定义组件实例ID。
this.pageId = page.__wxExparserNodeId__;
this.allReady = true;
}
events() {
return {};
}
emit(event, args) {
try {
const {
pageId
} = this;
return new Promise((resolve, reject) => {
if (this.events()[pageId] && this.events()[pageId][event]) {
return this.events()[pageId][event](args, resolve);
} else {
resolve(args);
}
});
} catch (e) {
return Promise.resolve();
}
}
on(event, args) {
const {
pageId
} = this;
const data = this.events()[pageId] || {};
if (data[event]) {
console.error('该事件已注册,请选择其他事件');
return;
}
data[event] = args;
this.events = function () {
return {
[pageId]: data
};
};
}
setFunction(funcName, funcBody) {
if (typeof funcName !== 'string') {
console.error('函数名称类型只能为string');
return;
}
if (typeof funcBody !== 'function') {
console.error('函数体类型只能为function');
return;
}
this.functions[funcName] = funcBody;
}
getFunction(functionName) {
if (this.functions[functionName]) {
return this.functions[functionName];
} else {
console.error('无此方法,请检查方法名');
return null;
}
}
setData(key, value) {
if (typeof key !== 'string' && typeof key !== 'number') {
console.error('字段key类型只能为string或者number。异常的key:', key);
return;
}
if (key.indexOf('_') === 0) {
console.error('设置数据失败:setData 的 key 不可以以下划线开头。异常的key:', key);
return false;
}
// 内部字段不允许设置。
if (['data', 'pageId', 'functions', 'allReady'].includes(key)) {
console.error('设置数据失败:setData 的 key 违法,请使用其他的key。异常的key: ', key);
return false;
}
const oldValue = this[key];
this.data[key] = value;
// 直接将数据代理到顶级
Object.defineProperty(this, key, {
get() {
return value;
}
});
this._update(key, value, oldValue); // 通知观察者去更新数据
}
// 通知回调
_update(key, value, oldValue) {
// 监听数据的事件们回调处理。
this._watchers[key] && this._watchers[key].forEach(cb => {
cb(value, oldValue);
});
// 通知本页面的各个自定义组件,数据更新。
this._depends.forEach(wx_cxt => {
wx_cxt.setData({
[key]: value
});
});
}
/**
* 观察数据。依赖收集
* @param {string} name 数据的标识
* @param {function} cb 数据变化时的回调
* @returns {function} 返回取消观察的函数。执行一下即取消了cb的订阅
*/
watch(name, cb) {
if (typeof cb !== 'function') {
console.error('订阅数据变化的回调函数类型异常!', name);
return false;
}
this._watchers[name] = this._watchers[name] || [];
this._watchers[name].push(cb);
return this._unwatchWait(name, cb);
}
/**
* 取消对 name 数据的 cb 回调观察
* @param {string} name 数据的标识
* @param {function} cb 数据变化时的回调
*/
unwatch(name, cb) {
if (typeof cb === 'function') {
// 忽略除了 function 类型之外的第二个参数。
if (this._watchers[name].includes(cb)) {
this._watchers[name].splice(this._watchers[name].indexOf(cb), 1);
} else {
console.error('没有此回调函数,取消订阅数据失败');
}
} else {
this._watchers[name] = []; // 一次性清空全部
}
}
// 取消数据观察的准备器。
_unwatchWait(name, cb) {
return () => {
this.unwatch(name, cb);
};
}
/**
* 收集开发者的所有自定义组件实例
* @param {微信自定义组件实例} wx_cxt
*/
dependsPush(wx_cxt) {
// 判断实例是否已收藏过,只push一次
if (!this._dependsIds.includes(wx_cxt.__wxExparserNodeId__)) {
this._dependsIds.push(wx_cxt.__wxExparserNodeId__);
this._depends.push(wx_cxt);
this.bandDataOnece(wx_cxt); // 立即处理数据
} else {
console.warn('该组件已存在', wx_cxt.__wxExparserNodeId__);
}
}
// 给自定义组件实例添加数据。
bandDataOnece(wx_cxt) {
for (const key in this.data) {
wx_cxt.setData({
[key]: this.data[key]
});
}
}
checkReady(cb) {
// let me = this
return new Promise(resolve => {
if (!this.allReady) {
setTimeout(this.checkReady.bind(this, cb || resolve), 0);
} else {
if (cb) {
cb();
} else {
resolve();
}
}
});
}
}
module.exports = Core;
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/file.js":
/*!***********************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/file.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
const _HOST = 'http://xxx.appdev.weimobcloud.com';
module.exports = {
downloadFile(ops) {
wx.downloadFile({
...ops,
header: {
...ops.header
},
url: _HOST + ops.url
});
}
};
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/navigate.js":
/*!***************************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/navigate.js ***!
\***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
class Navigate {
cleanArray(actual) {
const newArray = [];
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i]);
}
}
return newArray;
}
/**
* 转换queryString
* @returns {*}
*/
toQueryString(params) {
return this.cleanArray(Object.keys(params).map(key => {
if (params[key] === undefined) return '';
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
})).join('&');
}
/**
* 跳转
* @param option
*/
jump(option) {
let url = option.url;
if (option.queryString) {
url += '?';
url += option.queryString;
}
wx[option.method]({
url: url,
fail() {
if (option.method === 'navigateTo') {
wx.redirectTo({
url: url
});
}
}
});
}
/**
* 商详页
* @param {String} method 跳转方式
* @param {Object } query
* @param {String } query.goodsId 商品Id
*/
goodsDetail(method = 'navigateTo', query) {
if (!query) {
console.error('缺少必要参数!');
return;
}
if (!query.goodsId) {
console.error('缺少商品Id!');
return;
}
const option = {
url: '/pages/goods/detail',
queryString: this.toQueryString(query),
method
};
this.jump(option);
}
/**
* 购物车
* @param {String} method 跳转方式
*/
shopCart(method = 'navigateTo') {
const option = {
url: '/pages/shop/cart',
method
};
this.jump(option);
}
/**
* 个人中心
* @param {String} method 跳转方式
*/
userCenter(method = 'navigateTo') {
console.log('跳转至个人中心,真实环境会跳转');
}
/**
* 订单列表
* @param {String} method 跳转方式
* @param {Object } query
*/
orderList(method = 'navigateTo', query) {
console.log('跳转至订单列表,真实环境会跳转');
}
/**
* 订单详情
* @param {String} method 跳转方式
* @param {Object } query
*/
orderDetail(method = 'navigateTo', query) {
if (!query) {
console.error('缺少必要参数!');
return;
}
if (!query.orderNo) {
console.error('缺少orderNo');
return;
}
console.log('跳转至订单详情,真实环境会跳转');
}
/**
* 物流详情
* @param {String} method 跳转方式
* @param {Object } query
*/
orderExpress(method = 'navigateTo', query) {
console.log('跳转至物流详情,真实环境会跳转');
}
/**
* 个人信息
* @param {String} method 跳转方式
*/
userSettings(method = 'navigateTo') {
const option = {
url: '/pages/user/member/info',
method
};
this.jump(option);
console.log('跳转至个人信息,真实环境会跳转');
}
/**
* 帐号设置
* @param {String} method 跳转方式
*/
accountSettings(method = 'navigateTo') {
console.log('跳转至帐号设置,真实环境会跳转');
}
/**
* 我的优惠券
* @param {String} method 跳转方式
*/
userCouponList(method = 'navigateTo') {
console.log('跳转至我的优惠券,真实环境会跳转');
}
/**
* 积分商城
* @param {String} method 跳转方式
*/
pointMall(method = 'navigateTo') {
console.log('跳转至积分商城,真实环境会跳转');
}
/**
* 分销中心
* @param {String} method 跳转方式
*/
salesCenter(method = 'navigateTo') {
console.log('跳转至分销中心,真实环境会跳转');
}
/**
* 退款/售后列表
* @param {String} method 跳转方式
*/
refundList(method = 'navigateTo') {
console.log('跳转至退款/售后列表,真实环境会跳转');
}
}
module.exports = new Navigate();
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/navigator.js":
/*!****************************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/navigator.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
const SYSTEM_PAGE_PATH_LIST = ['goodsDetail', 'shopCart', 'userCenter', 'orderList', 'orderDetail', 'orderExpress', 'userSettings', 'accountSettings', 'cardPackages', 'userCouponList', 'pointMall', 'salesmanCenter', 'refundList'];
const navigate = __webpack_require__(/*! ./navigate */ "./src/utils/weimob-js-sdk/utils/navigate.js");
/**
*
* @param {Object} option 跳转参数
* @param {string} option.url 跳转地址
* @param {Object} option.query 跳转携带参数
* @param {string} option.method [navigateTo,redirectTo,reLaunch,navigateBack]
*/
module.exports = function (option) {
if (SYSTEM_PAGE_PATH_LIST.indexOf(option.url) < 0) {
console.error('请传入正确的页面标识,支持跳转的页面请参考文档');
return;
}
navigate[option.url](option.method, option.query);
};
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/paas.js":
/*!***********************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/paas.js ***!
\***********************************************/
/*! exports provided: relationChain, userPhone */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationChain", function() { return relationChain; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userPhone", function() { return userPhone; });
/**
* 导购-写入导购与用户的关系链
* @options [Object] { "pid":10, "wid":xxxx, "ecBizType":"xxxx", "ecBizTicket":"xxxx" }
* pid 店铺
* wid 用户
* ecBizType 对页面分享链接URL解析后的参数之一
* ecBizTicket 对页面分享链接URL解析后的参数之一
*
* @returns [Promise] {success: true} 返回写入结果
* success [Boolean] true: 写入成功。false:写入失败。
**/
const relationChain = function (options) {
return new Promise((resolve, reject) => {
if (options) {
return resolve({
success: true
});
} else {
return reject({
success: false
});
}
});
};
/**
* 会员注册 - 解析微信加密数据的真实手机号
* @options [Object] { encryptedData: 'xxxx', iv:'xxxx' }
* encryptedData 微信授权手机号按钮button组件点击后的回调值。
* iv 微信授权手机号按钮button组件点击后的回调值。
*
* @returns [Promise] {success: true, phone: 123456}
**/
const userPhone = function ({
encryptedData,
iv
}) {
return new Promise((resolve, reject) => {
if (encryptedData && iv) {
return resolve({
success: true,
phone: 123456
});
} else {
return reject({
success: false
});
}
});
};
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/request.js":
/*!**************************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/request.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
const __baseURL = 'https://612072719085-yxh-login.app.weimobcloud.com';
//const __baseURL = 'https://612072719085-yxh-login.appdev.weimobcloud.com'
/**
* @method 发送请求
*
* @param {Object} option - 请求配置参数
* @param {string} option.url - 请求路径
* @param {Object} option.data - 请求参数
* @param {Object} option.requestOption - 请求配置(参考wx.request 官方文档 https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html)
*
* @returns {Promise}
*/
module.exports = function (option) {
return new Promise((resolve, reject) => {
option.requestOption = option.requestOption || {};
wx.request({
url: __baseURL + option.url,
method: option.requestOption.method || 'POST',
...option.requestOption,
data: {
wid: '{{wid}}',
...option.data
},
header: {
'content-type': 'application/json',
Accept: 'application/json',
...option.requestOption.header
},
success: res => {
if (res.statusCode === 200) {
resolve(res.data);
} else {
reject(res);
}
},
fail: res => {
reject(res);
}
});
});
};
/***/ }),
/***/ "./src/utils/weimob-js-sdk/utils/retail.api.js":
/*!*****************************************************!*\
!*** ./src/utils/weimob-js-sdk/utils/retail.api.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
let apiMaps;
apiMaps = {
user_base_info: '***',
user_asset_info: '***',
user_card_info: '***',
user_guider_info: '***',
user_coupon_list: '***',
user_coupon_detail: '***',
user_coupon_packagelist: '***',
user_coupon_get: '***',
user_sdp_info: '***',
user_purchase_list: '****',
user_purchase_receive: '****',
wm_app_session: '***'
};
const mockdata = {};
mockdata.user_base_info = {
headurl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epfglCQ1t6rNl6QykTf5nYHQYMcHichHDDxPKhzNrtKIdfEicGbia2h9mRoXKNVNIHb9sHwx1wUicqI7g/132',
homeStoreId: null,
homeStoreName: null,
isMember: false,
nickname: '微大盟',
wid: 10896867013,
appId: 'wxea5b8710073235fd',
openId: 'ok3hN5av9sf97Rb-fIJ5e0t0X_jw'
};
mockdata.user_base_info.sourceObjectList = [{
source: 2,
sourceAppId: 'wxea5b8710073235fd',
sourceOpenId: 'user-unionId'
}, {
source: 4,
sourceAppId: 'wxea5b8710073235fd',
sourceOpenId: '17766778877'
}];
mockdata.user_asset_info = {
availableAmount: 100,
availablePoint: 10,
currentAmount: 100,
currentPoint: 10
};
mockdata.user_card_info = {};
mockdata.user_guider_info = {};
mockdata.user_coupon_list = {};
mockdata.user_coupon_detail = {};
mockdata.user_coupon_packagelist = {
pageList: [{
couponOrigin: 1,
couponPackageId: 1012606,
couponPackageName: '福袋2号',
description: '描述',
sendType: 1,
status: 1,
statusDesc: null,
stock: 0,
useNotice: '嘤嘤嘤',
couponList: [{
acceptGoodsType: 1,
adaptCurrentStore: true,
alipayCouponTemplateId: null,
alipayMerchantCouponRecommendStatus: null,
applyTradeScene: null,
authWechatMerchant: null,
availableTimeEnd: null,
availableTimeStart: null,
canCashTicket: null,
canGiveFriend: null,
canGoodsNumber: null,
canReceive: null,
canShare: null,
canUseDeductions: null,
canUseDiscounts: null,
canWeimobEdit: null,
cardTemplateId: 1016685,
cashTicketAmt: 11.0,
cashTicketCondition: 1.0,
codeGenerateType: 0,
colorType: null,
condition: null,
couponChannel: null,
couponCost: null,
couponCostType: null,
couponDesc: '',
couponExtraInfo: null,
couponOrigin: 1,
couponScopeList: null,
couponTagList: null,
createAreaCode: null,
createAreaId: null,
createDate: null,
createStoreId: null,
createType: null,
customCodeSetting: null,
detail: '价值11元代金券,满足门槛即可使用',
discount: null,
excludeGoodsIds: null,
existExcludeGoods: false,
expDayCount: null,
expireDate: 1617206399000,
expireDateType: 1,
fromPaas: false,
iconUrl: null,
importGoodsFileName: null,
importGoodsFlag: null,
isAvailable: null,
isEnable: null,
isExpired: null,
isFocusFollow: null,
isSyncWechat: null,
issueChannel: null,
left: 1000,
limitedType: null,
logoUrl: null,
maxCashTicketAmt: null,
maxDiscount: null,
maxDiscountAmount: null,
maxGoodsAmount: null,
maxGoodsNumber: null,
memberTagList: null,
merchantIssueChannels: null,
merchantIssueFlag: null,
merchantName: null,
minCashTicketAmt: null,
minDiscount: null,
minGoodsNumber: null,
name: 'C型1区域',
number: 4,
operatorId: null,
pid: null,
pricingType: null,
publishChannelType: null,
publishChannels: null,
publishCount: 0,
receiveDesc: '每人限领11张',
recommendEndTime: null,
recommendStartTime: null,
redirectType: 0,
scanBuyIssueFlag: null,
sceneList: null,
selectAreaIds: null,
selectStoreIdList: null,
selectStoreRangeType: null,
selectStoreType: 1,
servicePhone: null,
settingVersion: null,
share: null,
sourceMerchantName: null,
startDate: 1616515200000,
startDayCount: null,
status: 6,
stockId: null,
storeId: null,
storeLaunchFlag: null,
storeLimitNum: null,
subCouponType: 1,
subName: null,
syncStatus: null,
textImageList: null,
thirdId: null,
totalCount: 1000,
type: 0,
useChannels: null,
useNotice: '满1元且仅1件可用,'
}]
}],
pageNum: 1,
pageSize: 20,
totalCount: 3
};
mockdata.user_coupon_get = {
canReceive: 1,
// 用户能否领取 1可领取 2已领取 3已领完)
code: '91904041586615409',
// 优惠券券码
state: 1 // 是否领取成功
};
mockdata.user_sdp_info = {};
mockdata.user_purchase_list = {
status: 0,
// 0 未领取; 1 已领取; 2 已使用
memberUsedCount: 0,
// 会员使用总数
activityId: 12,
purchaseUpper: 2,
purchaseCodeGoodsDTOList: [{
goodsId: 22,
goodsTitle: '商品标题',
defaultImageUrl: 'https://image-c-dev.weimobwmc.com/dev-Omr9/68a90ddf57dd410582a9acca889bcea5.png'
}]
};
mockdata.user_purchase_receive = {
codeValues: ['hN5av3bV97Rb', 'bV97RbhN5av3']
};
mockdata.wm_app_session = {
pid: '3400',
wid: 6353261854,
appid: 'wxea5b8710079835fd',
openid: 'ok3hN5av3bV97Rb-fF9SC7t0X_jw'
};
const init = function (dataflag, option = {}) {
if (!apiMaps[dataflag]) {
console.error('您所查询的接口不存在,请核对后再调用!');
}
return Promise.resolve(mockdata[dataflag]);
};
module.exports = init;
// export default init;
/***/ })
/******/ });
\ No newline at end of file
{
"pages": [
"pages/home/home"
],
"subPackages": [
{
"root": "packages/wm-cloud-db_index",
"name": "wm-cloud-db_index",
"pages": [
"db_index/index"
]
},
{
"root": "packages/wm-cloud-db_webview",
"name": "wm-cloud-db_webview",
"pages": [
"db_webview/index"
]
},
{
"root": "packages/wm-cloud-db_jump",
"name": "wm-cloud-db_jump",
"pages": [
"db_jump/index"
]
}
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
@import '/cloud-reset-app.wxss';
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
/**app.wxss**/
page {
height: 100%;
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
background-color: #f8f8f8;
font-weight: 400;
}
view,
image,
icon,
scroll-view,
text,
button,
checkbox,
form,
input,
label,
navigator,
audio,
video,
canvas {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
scroll-view {
height: 100%;
}
form,
image {
display: block;
}
button {
padding: 0;
margin: 0;
border-radius: 0;
height: 100%;
display: block;
line-height: inherit;
font-size: inherit;
color: inherit;
background: none;
-webkit-appearance: none;
border: none;
}
button::after {
content: none;
}
input,
textarea {
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
z-index: 0;
}
/* 用于view当成text标签是使用 */
.text {
display: inline-block;
}
.text-inline {
display: inline;
}
.minHeight {
min-height: 101%;
}
.f0 {
font-size: 0;
}
/*背景图片*/
.imgCover {
width: 100%;
padding-bottom: 100%;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.imgCover-list {
width: 195rpx;
height: 260rpx;
padding-bottom: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.circular {
border-radius: 50%;
}
/**显示**/
.ovh {
overflow: hidden;
}
.hidden {
display: none;
}
.show {
display: block;
}
.inline {
display: inline;
}
/**文本超出**/
.text-line1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
.text-line-1 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
/**弹性盒子布局**/
.flex,
.box {
display: flex;
display: -webkit-flex;
}
.flex-v-center {
align-items: center;
-webkit-align-items: center;
}
.flex-center {
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
}
.flex-between {
justify-content: space-between;
-webkit-justify-content: space-between;
}
.flex-v-between {
align-content: space-between;
-webkit-align-content: space-between;
}
.flex-col {
flex-direction: column;
-webkit-flex-direction: column;
}
.flex1 {
flex: 1;
-webkit-flex: 1;
}
.flex0 {
flex: none;
-webkit-flex: none;
}
.flex-start {
justify-content: flex-start;
-webkit-justify-content: flex-start;
}
/*边框设置*/
.border-around,
.border-bottom-1px,
.border-left-1px,
.border-right-1px,
.border-top-1px {
position: relative;
}
.border-around {
border: 1rpx solid #ededed;
}
.border-top-1px {
border-top: 1rpx solid #ededed;
}
.border-right-1px {
border-right: 1rpx solid #ededed;
}
.border-bottom-1px {
border-bottom: 1rpx solid #ededed;
}
.border-left-1px {
border-left: 1rpx solid #ededed;
}
/*
* 使用方法: 将对应类名加入对应的节点上
* 注意:
* 1. border1rpx的容器padding最少设置1rpx
* 2. 如果添加的节点已有::after,避免覆盖,需改成.border1rpx_before
* 3. 容器如果设置圆角,需要手动设置 .容器::after{border-raduis * 2},
* 4. 边框和内容区域有0.5rpx间隙,如果内容需要全部填充的话,需要在填充的节点上添加.border1rpx-full
*/
.border1rpx,
.border1rpx_before {
position: relative;
border-width: 0rpx !important;
padding: 0.1rpx;
z-index: 0;
}
.border1rpx::after,
.border1rpx_before::before {
content: '';
border-style: inherit;
border-color: inherit;
border-radius: inherit;
box-sizing: border-box !important;
position: absolute;
border-width: 2rpx !important;
left: 0;
top: 0;
width: 200% !important;
height: 200% !important;
transform-origin: 0 0;
transform: scale(0.5) !important;
z-index: -1;
}
.border1rpx-full {
margin: -1rpx;
}
/*箭头*/
.arrows {
position: relative;
}
.arrows.arrows-up::after {
transform: rotate(-45deg);
}
.arrows.arrows-down::after {
transform: rotate(135deg);
}
.arrows::after {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border: 2px solid #c3c3c3;
border-width: 2px 2px 0 0;
position: absolute;
top: 50%;
right: 26rpx;
margin-top: -3px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrows-inline::after {
position: relative;
left: auto;
top: auto;
right: auto;
bottom: auto;
margin-top: -4px;
margin-left: 5px;
}
/**padding距离**/
.pt-16,
.pt-8 {
padding-top: 16rpx;
}
.pb-16,
.pb-8 {
padding-bottom: 16rpx;
}
.pt-20,
.pt-10 {
padding-top: 20rpx;
}
.pb-20,
.pb-10 {
padding-bottom: 20rpx;
}
.pl-16,
.pl-8 {
padding-left: 16rpx;
}
.pr-16,
.pr-8 {
padding-right: 16rpx;
}
.pl-20,
.pl-10 {
padding-left: 20rpx;
}
.pr-20,
.pr-10 {
padding-right: 20rpx;
}
.pl-32,
.pl-15 {
padding-left: 32rpx;
}
.pr-32,
.pr-15 {
padding-right: 32rpx;
}
.pb360 {
padding-bottom: 360rpx;
}
/*价格设置*/
.PriceSwitch {
line-height: 21px;
font-size: 24rpx;
padding: 0 8rpx;
}
.PriceSwitch .i {
font-size: 30rpx;
}
.Original {
font-style: normal;
font-size: 24rpx;
color: #9a9a9a;
text-decoration: line-through;
margin-left: 16rpx;
display: inline-block;
}
/*文字颜色*/
.color1,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
color: #1a1a1a;
margin: 0;
padding: 0;
}
.color-3 {
color: #333;
}
.color-6 {
color: #666;
}
.color-9 {
color: #999;
}
.color-e9 {
color: #e9e9e9;
}
.color-64 {
color: #646464;
}
.color-b4 {
color: #b4b4b4;
}
.color-97 {
color: #979797;
}
.color-white {
color: #fff;
}
.color-black {
color: #000;
}
.color-c {
color: #ccc;
}
.bkg-white {
background-color: #fff;
}
/*文字大小*/
.font10 {
font-size: 20rpx;
}
.font11 {
font-size: 22rpx;
}
.font12 {
font-size: 24rpx;
}
.font13 {
font-size: 26rpx;
}
.font14 {
font-size: 28rpx;
}
.font15 {
font-size: 30rpx;
}
.font16 {
font-size: 32rpx;
}
.font17 {
font-size: 34rpx;
}
.font18 {
font-size: 36rpx;
}
.font19 {
font-size: 38rpx;
}
.font20 {
font-size: 20rpx;
}
.font22 {
font-size: 22rpx;
}
.font24 {
font-size: 24rpx;
}
.font26 {
font-size: 26rpx;
}
.font28 {
font-size: 28rpx;
}
.font30 {
font-size: 30rpx;
}
.font32 {
font-size: 32rpx;
}
.font34 {
font-size: 34rpx;
}
.font36 {
font-size: 36rpx;
}
.font38 {
font-size: 38rpx;
}
.font40 {
font-size: 40rpx;
}
.font46 {
font-size: 46rpx;
}
.font50 {
font-size: 50rpx;
}
.font56 {
font-size: 56rpx;
}
.font60 {
font-size: 60rpx;
}
.font82 {
font-size: 82rpx;
}
.bkg-white {
background-color: #fff;
}
.fontWeight-l {
/*large*/
font-weight: 500;
}
.fontWeight-n {
/*normal*/
font-weight: 300;
}
.fontWeight-nor {
font-weight: normal;
}
/*文字间距*/
.line-height1 {
line-height: 1;
}
/*按钮*/
.btn-active {
width: 40rpx;
display: inline-block;
text-align: center;
height: 40rpx;
background: #ff2e45;
border-radius: 8rpx;
color: #fff;
line-height: 40rpx;
font-size: 24rpx;
font-weight: normal;
font-style: normal;
overflow: hidden;
}
.btn-auto {
display: inline-block;
font-size: 20rpx;
border: 1px solid #ff2e45;
border-radius: 8rpx;
height: 36rpx;
line-height: 36rpx;
color: #ff2e45;
padding: 0 12rpx;
margin-right: 16rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs {
text-align: center;
width: 100%;
border-radius: 8rpx;
color: #fff;
line-height: 88rpx;
font-size: 30rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs::after {
border-radius: 16rpx;
}
.btn-lg,
.btn-md {
background-color: #ff2e45;
}
.btn-sm {
border: 1px solid #999;
color: #666;
height: 60rpx;
line-height: 60rpx;
}
.btn-xs {
width: 100%;
height: 68rpx;
line-height: 68rpx;
border: 1px solid #e2e2e2;
color: #666;
}
.btn-dashed,
.btn-md-dashed {
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
color: #ff2e45;
border-radius: 8rpx;
border: 1px solid #ff2e45;
font-size: 26rpx;
}
.btn-md-dashed {
height: 50rpx;
line-height: 50rpx;
border-radius: 8rpx;
}
.btn-bj1 {
background-color: #ff2e45;
}
.btn-bj2 {
background-color: #ff8522;
}
.btn-dis {
background-color: #999;
color: #bbb;
}
.btn-dashed-dis {
border: 1px solid #c8c8c8;
color: #bbbbbb;
border-radius: 8rpx;
}
/*商品活动标签*/
.goodsTag {
text-align: left;
color: #fff;
line-height: 26rpx;
height: 28rpx;
position: absolute;
top: 16rpx;
padding: 0 8rpx;
padding-top: 2rpx;
font-size: 20rpx;
left: 0;
border-radius: 0 4rpx 4rpx 0;
z-index: 2;
}
.titleTag {
line-height: 28rpx;
height: 28rpx;
margin-right: 8rpx;
color: #fff;
padding: 0 8rpx;
font-size: 18rpx;
border-radius: 4rpx;
font-weight: bold;
display: inline-block;
}
.titleTag.memberTag {
margin-top: 2rpx;
}
.activityTag {
font-style: normal;
display: inline-block;
vertical-align: top;
height: 28rpx;
min-width: 28rpx;
padding: 0 6rpx;
border-radius: 4rpx;
color: #fff;
text-align: center;
font-size: 18rpx;
line-height: 26rpx;
color: #de0022;
border: 1rpx solid #de0022;
border-width: 1rpx;
margin-right: 6rpx;
font-weight: normal;
}
.activityTag::after {
border-radius: 8rpx;
}
/*数量显示*/
.amounts {
font-style: normal;
display: inline-block;
height: 24rpx;
min-width: 24rpx;
padding: 0 6rpx;
border-radius: 24rpx;
background-color: #fd1d45 !important;
color: #fff;
text-align: center;
font-size: 20rpx;
font-weight: 600;
position: absolute;
top: 6rpx;
line-height: 24rpx;
box-sizing: border-box;
}
.goodsTag:empty,
.amounts:empty,
.titleTag:empty {
display: none;
}
/*加载更多*/
.loadMore {
font-size: 26rpx;
color: #c1c1c1;
text-align: center;
height: 80rpx;
line-height: 58rpx;
margin-top: 20rpx;
}
.loadings {
width: 50rpx;
height: 50rpx;
display: inline-block;
vertical-align: middle;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/public/loading.png) no-repeat center center;
background-size: 50rpx;
-webkit-animation: cirle-loadings 1s linear infinite;
animation: cirle-loadings 1s linear infinite;
}
@-webkit-keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/*推荐*/
.grooms {
margin: 0 16rpx;
overflow: hidden;
text-align: center;
height: 52rpx;
}
.grooms label {
display: inline-block;
padding: 0 20rpx;
height: 52rpx;
line-height: 52rpx;
position: relative;
color: #3e3e3e;
font-size: 26rpx;
}
.grooms label > p {
overflow: hidden;
max-width: 400rpx;
min-width: 120rpx;
white-space: nowrap;
text-overflow: ellipsis;
}
.grooms label > p::before {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 1px 0 0 0;
}
.grooms label > p::after {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
left: inherit;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 0 0 1px 0;
right: 0;
margin-right: -1000rpx;
}
/*菜单距离*/
.navHeight {
height: 100rpx;
}
/*遮罩层*/
.widget-mask,
.widget_mask {
position: fixed;
left: 0;
top: 0px;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
}
.widget_mask.hidden {
opacity: 0;
}
.widget_mask.visibble {
opacity: 1;
}
/* 主题 */
.theme1 .theme-color {
color: #f12e24;
}
.theme1 .theme-bgc {
background-color: #f12e24;
}
.theme1 .theme-bgcart {
background-color: #ffb56c;
}
.theme1 .theme-bdc {
border-color: #f12e24;
}
.theme2 .theme-color {
color: #f56fa6;
}
.theme2 .theme-bgc {
background-color: #f56fa6;
}
.theme2 .theme-bgcart {
background-color: #454552;
}
.theme2 .theme-bdc {
border-color: #f56fa6;
}
.theme3 .theme-color {
color: #e85a71;
}
.theme3 .theme-bgc {
background-color: #e85a71;
}
.theme3 .theme-bgcart {
background-color: #454552;
}
.theme3 .theme-bdc {
border-color: #e85a71;
}
.theme4 .theme-color {
color: #86b902;
}
.theme4 .theme-bgc {
background-color: #86b902;
}
.theme4 .theme-bgcart {
background-color: #454552;
}
.theme4 .theme-bdc {
border-color: #86b902;
}
.theme5 .theme-color {
color: #40baff;
}
.theme5 .theme-bgc {
background-color: #40baff;
}
.theme5 .theme-bgcart {
background-color: #454552;
}
.theme5 .theme-bdc {
border-color: #40baff;
}
/*底部导航*/
.wrap-navbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
text-align: center;
background-color: #fff;
color: #646464;
font-size: 18rpx;
height: 98rpx;
z-index: 20;
}
.nav-item {
align-items: center;
position: relative;
height: 100%;
}
.nav-icon {
display: block;
font-size: 40rpx;
line-height: 45rpx;
display: flex;
display: -webkit-flex;
flex-direction: column;
-webkit-flex-direction: column;
}
/* .on.nav-item{color: #F56FA6;} */
.cartnum-cell {
display: block;
position: absolute;
left: 50%;
margin-left: 8rpx;
right: auto;
top: 8rpx;
color: #fff;
}
/* Copyright */
.copyright {
height: 146rpx;
margin: 0 auto;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/copyright/copyrights.png) no-repeat center/contain;
}
/* Een Copyright */
/* Een Copyright */
/* iphonex */
.IphoneX {
padding-bottom: 68rpx !important;
}
.fixIphonex {
bottom: 68rpx !important;
}
.fixIphonex::after {
content: ' ';
position: fixed;
bottom: 0 !important;
height: 68rpx !important;
width: 100%;
background: #ffffff;
left: 0;
}
.iphonexMenus {
bottom: 198rpx !important;
}
.Iphonexshare {
bottom: 168rpx !important;
}
.IphonexMB {
margin-bottom: 68rpx !important;
}
/*文字大小*/
/* 商品长图设置*/
.imgCover-oblong-sm .imgCover {
width: 195rpx;
height: 260rpx;
}
.imgCover-oblong-lg .imgCover {
padding-bottom: 133%;
}
/* 字体粗细规格 请参照标注使用*/
.fw-Light {
font-weight: 300;
}
.fw-Regular {
font-weight: 400;
}
.fw-Semibold {
font-weight: 700;
}
/* .fw-Semibold{
font-weight:800;
} */
/* 节点占位 */
.node_seize {
width: 100%;
height: 1rpx;
}
.color-main {
color: #212121;
}
.color-content {
color: #757575;
}
.color-sub {
color: #9e9e9e;
}
.border-radius10 {
border-top-right-radius: 10rpx;
border-top-left-radius: 10rpx;
}
page {
height: 100%;
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
background-color: #f8f8f8;
font-weight: 400;
}
view,
image,
icon,
scroll-view,
text,
button,
checkbox,
form,
input,
label,
navigator,
audio,
video,
canvas {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
scroll-view {
height: 100%;
}
form,
image {
display: block;
}
button {
padding: 0;
margin: 0;
border-radius: 0;
height: 100%;
display: block;
line-height: inherit;
font-size: inherit;
color: inherit;
background: none;
-webkit-appearance: none;
border: none;
}
button::after {
content: none;
}
input,
textarea {
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
z-index: 0;
}
.text {
display: inline-block;
}
.text-inline {
display: inline;
}
.minHeight {
min-height: 101%;
}
.f0 {
font-size: 0;
}
.imgCover {
width: 100%;
padding-bottom: 100%;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.imgCover-list {
width: 195rpx;
height: 260rpx;
padding-bottom: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.circular {
border-radius: 50%;
}
.ovh {
overflow: hidden;
}
.hidden {
display: none;
}
.show {
display: block;
}
.inline {
display: inline;
}
.text-line1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
.text-line-1 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
.flex,
.box {
display: flex;
display: -webkit-flex;
}
.flex-v-center {
align-items: center;
-webkit-align-items: center;
}
.flex-center {
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
}
.flex-between {
justify-content: space-between;
-webkit-justify-content: space-between;
}
.flex-v-between {
align-content: space-between;
-webkit-align-content: space-between;
}
.flex-col {
flex-direction: column;
-webkit-flex-direction: column;
}
.flex1 {
flex: 1;
-webkit-flex: 1;
}
.flex0 {
flex: none;
-webkit-flex: none;
}
.flex-start {
justify-content: flex-start;
-webkit-justify-content: flex-start;
}
.border-around,
.border-bottom-1px,
.border-left-1px,
.border-right-1px,
.border-top-1px {
position: relative;
}
.border-around {
border: 1rpx solid #ededed;
}
.border-top-1px {
border-top: 1rpx solid #ededed;
}
.border-right-1px {
border-right: 1rpx solid #ededed;
}
.border-bottom-1px {
border-bottom: 1rpx solid #ededed;
}
.border-left-1px {
border-left: 1rpx solid #ededed;
}
.border1rpx,
.border1rpx_before {
position: relative;
border-width: 0rpx !important;
padding: 0.1rpx;
z-index: 0;
}
.border1rpx::after,
.border1rpx_before::before {
content: '';
border-style: inherit;
border-color: inherit;
border-radius: inherit;
box-sizing: border-box !important;
position: absolute;
border-width: 2rpx !important;
left: 0;
top: 0;
width: 200% !important;
height: 200% !important;
transform-origin: 0 0;
transform: scale(0.5) !important;
z-index: -1;
}
.border1rpx-full {
margin: -1rpx;
}
.arrows {
position: relative;
}
.arrows.arrows-up::after {
transform: rotate(-45deg);
}
.arrows.arrows-down::after {
transform: rotate(135deg);
}
.arrows::after {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border: 2px solid #c3c3c3;
border-width: 2px 2px 0 0;
position: absolute;
top: 50%;
right: 26rpx;
margin-top: -3px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrows-inline::after {
position: relative;
left: auto;
top: auto;
right: auto;
bottom: auto;
margin-top: -4px;
margin-left: 5px;
}
.pt-16,
.pt-8 {
padding-top: 16rpx;
}
.pb-16,
.pb-8 {
padding-bottom: 16rpx;
}
.pt-20,
.pt-10 {
padding-top: 20rpx;
}
.pb-20,
.pb-10 {
padding-bottom: 20rpx;
}
.pl-16,
.pl-8 {
padding-left: 16rpx;
}
.pr-16,
.pr-8 {
padding-right: 16rpx;
}
.pl-20,
.pl-10 {
padding-left: 20rpx;
}
.pr-20,
.pr-10 {
padding-right: 20rpx;
}
.pl-32,
.pl-15 {
padding-left: 32rpx;
}
.pr-32,
.pr-15 {
padding-right: 32rpx;
}
.pb360 {
padding-bottom: 360rpx;
}
.PriceSwitch {
line-height: 21px;
font-size: 24rpx;
padding: 0 8rpx;
}
.PriceSwitch .i {
font-size: 30rpx;
}
.Original {
font-style: normal;
font-size: 24rpx;
color: #9a9a9a;
text-decoration: line-through;
margin-left: 16rpx;
display: inline-block;
}
.color1,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
color: #1a1a1a;
margin: 0;
padding: 0;
}
.color-3 {
color: #333;
}
.color-6 {
color: #666;
}
.color-9 {
color: #999;
}
.color-e9 {
color: #e9e9e9;
}
.color-64 {
color: #646464;
}
.color-b4 {
color: #b4b4b4;
}
.color-97 {
color: #979797;
}
.color-white {
color: #fff;
}
.color-black {
color: #000;
}
.color-c {
color: #ccc;
}
.bkg-white {
background-color: #fff;
}
.font10 {
font-size: 20rpx;
}
.font11 {
font-size: 22rpx;
}
.font12 {
font-size: 24rpx;
}
.font13 {
font-size: 26rpx;
}
.font14 {
font-size: 28rpx;
}
.font15 {
font-size: 30rpx;
}
.font16 {
font-size: 32rpx;
}
.font17 {
font-size: 34rpx;
}
.font18 {
font-size: 36rpx;
}
.font19 {
font-size: 38rpx;
}
.font20 {
font-size: 20rpx;
}
.font22 {
font-size: 22rpx;
}
.font24 {
font-size: 24rpx;
}
.font26 {
font-size: 26rpx;
}
.font28 {
font-size: 28rpx;
}
.font30 {
font-size: 30rpx;
}
.font32 {
font-size: 32rpx;
}
.font34 {
font-size: 34rpx;
}
.font36 {
font-size: 36rpx;
}
.font38 {
font-size: 38rpx;
}
.font40 {
font-size: 40rpx;
}
.font46 {
font-size: 46rpx;
}
.font50 {
font-size: 50rpx;
}
.font56 {
font-size: 56rpx;
}
.font60 {
font-size: 60rpx;
}
.font82 {
font-size: 82rpx;
}
.bkg-white {
background-color: #fff;
}
.fontWeight-l {
font-weight: 500;
}
.fontWeight-n {
font-weight: 300;
}
.fontWeight-nor {
font-weight: normal;
}
.line-height1 {
line-height: 1;
}
.btn-active {
width: 40rpx;
display: inline-block;
text-align: center;
height: 40rpx;
background: #ff2e45;
border-radius: 8rpx;
color: #fff;
line-height: 40rpx;
font-size: 24rpx;
font-weight: normal;
font-style: normal;
overflow: hidden;
}
.btn-auto {
display: inline-block;
font-size: 20rpx;
border: 1px solid #ff2e45;
border-radius: 8rpx;
height: 36rpx;
line-height: 36rpx;
color: #ff2e45;
padding: 0 12rpx;
margin-right: 16rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs {
text-align: center;
width: 100%;
border-radius: 8rpx;
color: #fff;
line-height: 88rpx;
font-size: 30rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs::after {
border-radius: 16rpx;
}
.btn-lg,
.btn-md {
background-color: #ff2e45;
}
.btn-sm {
border: 1px solid #999;
color: #666;
height: 60rpx;
line-height: 60rpx;
}
.btn-xs {
width: 100%;
height: 68rpx;
line-height: 68rpx;
border: 1px solid #e2e2e2;
color: #666;
}
.btn-dashed,
.btn-md-dashed {
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
color: #ff2e45;
border-radius: 8rpx;
border: 1px solid #ff2e45;
font-size: 26rpx;
}
.btn-md-dashed {
height: 50rpx;
line-height: 50rpx;
border-radius: 8rpx;
}
.btn-bj1 {
background-color: #ff2e45;
}
.btn-bj2 {
background-color: #ff8522;
}
.btn-dis {
background-color: #999;
color: #bbb;
}
.btn-dashed-dis {
border: 1px solid #c8c8c8;
color: #bbbbbb;
border-radius: 8rpx;
}
.goodsTag {
text-align: left;
color: #fff;
line-height: 26rpx;
height: 28rpx;
position: absolute;
top: 16rpx;
padding: 0 8rpx;
padding-top: 2rpx;
font-size: 20rpx;
left: 0;
border-radius: 0 4rpx 4rpx 0;
z-index: 2;
}
.titleTag {
line-height: 28rpx;
height: 28rpx;
margin-right: 8rpx;
color: #fff;
padding: 0 8rpx;
font-size: 18rpx;
border-radius: 4rpx;
font-weight: bold;
display: inline-block;
}
.titleTag.memberTag {
margin-top: 2rpx;
}
.activityTag {
font-style: normal;
display: inline-block;
vertical-align: top;
height: 28rpx;
min-width: 28rpx;
padding: 0 6rpx;
border-radius: 4rpx;
color: #fff;
text-align: center;
font-size: 18rpx;
line-height: 26rpx;
color: #de0022;
border: 1rpx solid #de0022;
border-width: 1rpx;
margin-right: 6rpx;
font-weight: normal;
}
.activityTag::after {
border-radius: 8rpx;
}
.amounts {
font-style: normal;
display: inline-block;
height: 24rpx;
min-width: 24rpx;
padding: 0 6rpx;
border-radius: 24rpx;
background-color: #fd1d45 !important;
color: #fff;
text-align: center;
font-size: 20rpx;
font-weight: 600;
position: absolute;
top: 6rpx;
line-height: 24rpx;
box-sizing: border-box;
}
.goodsTag:empty,
.amounts:empty,
.titleTag:empty {
display: none;
}
.loadMore {
font-size: 26rpx;
color: #c1c1c1;
text-align: center;
height: 80rpx;
line-height: 58rpx;
margin-top: 20rpx;
}
.loadings {
width: 50rpx;
height: 50rpx;
display: inline-block;
vertical-align: middle;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/public/loading.png) no-repeat center center;
background-size: 50rpx;
-webkit-animation: cirle-loadings 1s linear infinite;
animation: cirle-loadings 1s linear infinite;
}
@-webkit-keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.grooms {
margin: 0 16rpx;
overflow: hidden;
text-align: center;
height: 52rpx;
}
.grooms label {
display: inline-block;
padding: 0 20rpx;
height: 52rpx;
line-height: 52rpx;
position: relative;
color: #3e3e3e;
font-size: 26rpx;
}
.grooms label > p {
overflow: hidden;
max-width: 400rpx;
min-width: 120rpx;
white-space: nowrap;
text-overflow: ellipsis;
}
.grooms label > p::before {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 1px 0 0 0;
}
.grooms label > p::after {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
left: inherit;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 0 0 1px 0;
right: 0;
margin-right: -1000rpx;
}
.navHeight {
height: 100rpx;
}
.widget-mask,
.widget_mask {
position: fixed;
left: 0;
top: 0px;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
}
.widget_mask.hidden {
opacity: 0;
}
.widget_mask.visibble {
opacity: 1;
}
.theme1 .theme-color {
color: #f12e24;
}
.theme1 .theme-bgc {
background-color: #f12e24;
}
.theme1 .theme-bgcart {
background-color: #ffb56c;
}
.theme1 .theme-bdc {
border-color: #f12e24;
}
.theme2 .theme-color {
color: #f56fa6;
}
.theme2 .theme-bgc {
background-color: #f56fa6;
}
.theme2 .theme-bgcart {
background-color: #454552;
}
.theme2 .theme-bdc {
border-color: #f56fa6;
}
.theme3 .theme-color {
color: #e85a71;
}
.theme3 .theme-bgc {
background-color: #e85a71;
}
.theme3 .theme-bgcart {
background-color: #454552;
}
.theme3 .theme-bdc {
border-color: #e85a71;
}
.theme4 .theme-color {
color: #86b902;
}
.theme4 .theme-bgc {
background-color: #86b902;
}
.theme4 .theme-bgcart {
background-color: #454552;
}
.theme4 .theme-bdc {
border-color: #86b902;
}
.theme5 .theme-color {
color: #40baff;
}
.theme5 .theme-bgc {
background-color: #40baff;
}
.theme5 .theme-bgcart {
background-color: #454552;
}
.theme5 .theme-bdc {
border-color: #40baff;
}
.wrap-navbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
text-align: center;
background-color: #fff;
color: #646464;
font-size: 18rpx;
height: 98rpx;
z-index: 20;
}
.nav-item {
align-items: center;
position: relative;
height: 100%;
}
.nav-icon {
display: block;
font-size: 40rpx;
line-height: 45rpx;
display: flex;
display: -webkit-flex;
flex-direction: column;
-webkit-flex-direction: column;
}
.cartnum-cell {
display: block;
position: absolute;
left: 50%;
margin-left: 8rpx;
right: auto;
top: 8rpx;
color: #fff;
}
.copyright {
height: 146rpx;
margin: 0 auto;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/copyright/copyrights.png) no-repeat center/contain;
}
.IphoneX {
padding-bottom: 68rpx !important;
}
.fixIphonex {
bottom: 68rpx !important;
}
.fixIphonex::after {
content: ' ';
position: fixed;
bottom: 0 !important;
height: 68rpx !important;
width: 100%;
background: #ffffff;
left: 0;
}
.iphonexMenus {
bottom: 198rpx !important;
}
.Iphonexshare {
bottom: 168rpx !important;
}
.IphonexMB {
margin-bottom: 68rpx !important;
}
.imgCover-oblong-sm .imgCover {
width: 195rpx;
height: 260rpx;
}
.imgCover-oblong-lg .imgCover {
padding-bottom: 133%;
}
.fw-Light {
font-weight: 300;
}
.fw-Regular {
font-weight: 400;
}
.fw-Semibold {
font-weight: 700;
}
.node_seize {
width: 100%;
height: 1rpx;
}
.color-main {
color: #212121;
}
.color-content {
color: #757575;
}
.color-sub {
color: #9e9e9e;
}
.border-radius10 {
border-top-right-radius: 10rpx;
border-top-left-radius: 10rpx;
}
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/actRuleModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/actRuleModal/index.js":
/*!************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/actRuleModal/index.js ***!
\************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 活动攻略
const app = getApp();
Component({
data: {
lastScanTimes: 0
},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'actRule');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="actRuleModal">
<view class="actRuleModalContainer">
<view class="actrulelgiht"></view>
<view class="actrulebg"></view>
<view class="actrulelogo"></view>
<view class="actruleip"></view>
<view class="actrulelab"></view>
<view class="actrulebtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.actRuleModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.actRuleModalContainer {
width: 750rpx;
height: 1209rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.actrulelgiht {
width: 746rpx;
height: 1236rpx;
left: 0rpx;
top: 193rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelgiht.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulebg {
width: 560rpx;
height: 615rpx;
left: 93rpx;
top: 332rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actruleip{
width: 657rpx;
height: 712rpx;
left: 64rpx;
top: 111rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actruleip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulelogo {
width: 93rpx;
height: 106rpx;
left: 324rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelogo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulelab{
width: 474rpx;
height: 142rpx;
left: 138rpx;
top: 766rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelab.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulebtn{
width: 359rpx;
height: 93rpx;
left: 194rpx;
top: 1001rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 1142rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/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/authUserInfo/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/authUserInfo/index.js":
/*!************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/authUserInfo/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 defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';
const app = getApp();
Component({
data: {
isloading: false,
avatarUrl: defaultAvatarUrl,
nickName: ""
},
properties: {
isBindPhone: Boolean
},
attached() {
console.log(this);
console.error("看看文案", this.data, this.data.isBindPhone);
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'clickGift');
},
onChooseAvatar(e) {
console.warn("eee", e);
const {
avatarUrl
} = e.detail;
console.log(e, "头像");
// this.setData({
// avatar: avatarUrl,
// })
wx.getFileSystemManager().readFile({
filePath: e.detail.avatarUrl,
//地址
encoding: 'base64',
//编码格式
success: res => {
let base64 = 'data:image/png;base64,' + res.data;
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiUploadFile"])({
img64: base64
}).then((res = {}) => {
console.warn(JSON.stringify(res), "resttts");
this.setData({
avatarUrl: res.data
});
});
}
});
},
onInputChange(e) {
console.warn("nickName", e.detail.value);
this.setData({
nickName: e.detail.value
});
},
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);
}
}
});
},
saveFunc(e) {
this.triggerEvent("onSaveFunc", {
nickName: this.data.nickName,
avatarUrl: this.data.avatarUrl
});
},
cancelFunc(e) {
this.triggerEvent("onCancelFunc", e);
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="getUserInfoContainer">
<view class="getUserInfoContainerBg" bind:tap="cancelFunc"></view>
<view class="getUserInfo">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
<image class="avatar" src="{{avatarUrl}}"></image>
</button>
<input type="nickname" class="nickname" bindinput="onInputChange" placeholder="请输入昵称" />
<view wx:if="{{!nickName}}" class="saveBtn"></view>
<view wx:if="{{nickName}}" class="saveBtnLight" bind:tap="saveFunc"></view>
<view class="cancelBtn" bind:tap="cancelFunc"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.getUserInfoContainer {
width: 100vw;
height: 100vh;
top: 0rpx;
left: 0rpx;
z-index: 100;
position: fixed;
}
.getUserInfoContainerBg {
width: 100vw;
height: 100vh;
background-color: #000;
opacity: .7;
top: 0rpx;
left: 0rpx;
position: absolute;
}
.getUserInfo {
width: 750rpx;
height: 722rpx;
bottom: 0rpx;
left: 0rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/47ffc796692e24a855d993f9b150fe27c1f5842f.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.avatar-wrapper {
width: 750rpx;
height: 80rpx;
position: absolute;
left: 0rpx;
right: 0rpx;
top: 245rpx;
margin: auto;
z-index: 20;
}
.avatar {
width: 80rpx;
height: 80rpx;
left: 125rpx;
position: absolute;
}
.nickname {
width: 500rpx;
height: 60rpx;
left: 0rpx;
right: 0rpx;
font-size: 30rpx;
position: absolute;
color: #000;
margin: auto;
top: 385rpx;
}
.saveBtn {
width: 369rpx;
height: 95rpx;
text-align: center;
font-size: 20rpx;
left: 0rpx;
right: 0rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/3f9e1082241f73629cadcb88d421475e1996de72.png') no-repeat;
background-position: top left;
background-size: 100% 100%;
top: 540rpx;
position: absolute;
margin: auto;
}
.saveBtnLight {
width: 369rpx;
height: 95rpx;
text-align: center;
font-size: 20rpx;
left: 0rpx;
right: 0rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/be4bf7ffa569124368bef5b35d9158aee2f2f99e.png') no-repeat;
background-position: top left;
background-size: 100% 100%;
top: 540rpx;
position: absolute;
margin: auto;
}
.cancelBtn {
width: 40rpx;
height: 40rpx;
text-align: center;
font-size: 20rpx;
right: 50rpx;
top: 40rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/cc6f7eacd837c15b86ea5d7e1eeaa4aeb0c6382b.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
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
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/ruleModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/ruleModal/index.js":
/*!*********************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/ruleModal/index.js ***!
\*********************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
const app = getApp();
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", 'rule');
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="ruleModal">
<view class="ruleModalContainer">
<view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view>
<!-- <text class="ruleModalBgText"> -->
<!-- {{ruleText}} -->
<!-- </text> -->
</view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.ruleModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.ruleModalContainer {
width: 543rpx;
height: 896rpx;
left: 0rpx;
right: 0rpx;
top: 200rpx;
position: absolute;
margin: auto;
}
.ruleModalBgRule {
width: 508rpx;
height: 7787rpx;
top: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/rule.06cc4edbcde034bd5ad7ff7a456a155c2a09583c.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBg {
width: 543rpx;
height: 796rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f83daf181f71cc9549b1a7a69039b772b9b7bed4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 770rpx;
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;
}
.ruleModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
}
.ruleModalBgText {
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/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
var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/scanTipModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/component/scanTipModal/index.js":
/*!************************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/component/scanTipModal/index.js ***!
\************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
const app = getApp();
Component({
data: {
lastScanTimes: 0
},
properties: {},
attached() {
console.log(this);
console.error("看看文案", this.data);
this.setData({
lastScanTimes: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes
});
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'scanTip');
},
scanRightNow() {
this.triggerEvent("scanRightNow");
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="scanTipModal">
<view class="scanTipModalContainer">
<view class="scanTipModalBg"></view>
<view class="scanTipModalRightNow" catch:tap="scanRightNow"></view>
<text class="scanTipModalText">今日剩余扫码次数:{{lastScanTimes}}</text>
<view class="scanTipModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.scanTipModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.scanTipModalContainer {
width: 746rpx;
height: 1036rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.scanTipModalBg {
width: 746rpx;
height: 1236rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/9c3409e9dffc1a2372a418142a9ca154ded64293.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalText {
width: 450rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 280rpx;
margin: auto;
color: #b33800;
font-size: 40rpx;
text-align: center;
font-weight: 500;
position: absolute;
}
.scanTipModalRightNow {
width: 395rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
top: 410rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/7090d52c41f5e0fac35064a301b0c0aaf8cef803.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 670rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
var webpackRequire = require("./../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/db_index/index.js",
Object.assign({}, require("./../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_index/db_index/index.js":
/*!**********************************************************!*\
!*** ./src/packages/wm-cloud-db_index/db_index/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 defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';
Page({
data: {
guideIndex: -1,
showModalType: "actRule",
isBindPhone: false,
ticket: "",
inviteNum: 0,
inviteTicketNum: 0,
qrcodeSign: "",
prizeInfoVO: [],
authAvatar: false,
avatarUrl: defaultAvatarUrl,
isShowAuth: false,
nickName: "",
activityStatus: 0,
isPlayMusic: true,
assistErrorMsg: ""
},
onLoad: async function (options) {
// const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
// const scancode_time = parseInt(options.scancode_time) // 获取用户扫码时间 UNIX 时间戳
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// this.innerAudioContext = wx.createInnerAudioContext({
// useWebAudioImplement: false, // 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项
// loop: true,
// })
// this.innerAudioContext.src = 'https://yun.duiba.com.cn/aurora/assets/9cd54c2107760e0adbe826843990ab966b149e5b.mp3'
// this.innerAudioContext.play() // 播放
// // innerAudioContext.pause() // 暂停
// // innerAudioContext.stop() // 停止
// wx.showLoading({
// mask: true,
// success: (res) => {},
// fail: (res) => {},
// complete: (res) => {},
// })
// const wid = await this.getWid()
// apiUserRecord({
// wid,
// data: q + "|scancode_time=" + scancode_time
// })
// const activityStatusResp = await apiGetActivityStatus({
// wid
// })
// /**
// * 未开始:1,进行中:2,已结束:3
// */
// if (activityStatusResp.success) {
// this.setData({
// activityStatus: activityStatusResp.data
// })
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
// const isBindPhone = await this.getBindPhone(wid)
// if (isBindPhone) {
// /**已绑定的老用户直接拿loginToken */
// await this.login(wid)
// const resp = await apiDbIndexInfo({
// wid
// })
// if (resp.success) {
// this.setData({
// authAvatar: resp.data.authAvatar,
// inviteNum: resp.data.inviteNum,
// inviteTicketNum: resp.data.inviteTicketNum
// })
// if (resp.data.authAvatar && !options.shareCode && !options.q) {
// if (wx.getStorageSync('db_firstIn_pop') == '1') {
// //已经授权的情况下走新手引导
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0
// })
// } else {
// //看是否有人帮忙助力
// // resp.data.inviteNum > 0
// if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
// this.setData({
// showModalType: "assistReflct"
// })
// }else{
// this.openGameModal()
// }
// }
// }
// }
// /**首页接口存储 */
// globalData.indexInfo = resp.data
// }
// }
// // console.warn("isBindPhone", isBindPhone)
// this.setData({
// isBindPhone
// })
// // options.shareCode和options.q链路互斥不会同时
// if (options.shareCode && activityStatusResp.data == 2) {
// //助力逻辑
// this.setData({
// showModalType: 'assist',
// shareCode: options.shareCode
// })
// wx.hideLoading()
// return
// }
// if (options.q && activityStatusResp.data == 2) {
// if (isBindPhone && globalData.indexInfo.lastScanTimes <= 0) {
// wx.hideLoading()
// wx.showToast({
// title: '今日扫码次数已达上限',
// icon: 'none',
// duration: 3000
// })
// return
// }
// const db_qrcodeInfo = getUrlParam('q', decodeURIComponent(options.q))
// const params = db_qrcodeInfo.split("_")
// let ticket = params[1]
// let qrcodeSign = params[2]
// // const oldTicket = wx.getStorageSync("ticket")
// // const oldQrcodeSign = wx.getStorageSync("qrcodeSign")
// // if (!(oldTicket == ticket && oldQrcodeSign == qrcodeSign)) {
// //已经使用过则置空
// let apiGetTicketStatusResp = await apiGetTicketStatus({
// wid,
// ticket,
// qrcodeSign
// })
// if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 1) {
// wx.hideLoading()
// //已使用
// wx.showToast({
// title: '此瓶盖已被核奖~',
// icon: 'none',
// duration: 3000
// })
// if (wx.getStorageSync('db_firstIn_pop') != '1') {
// wx.setStorageSync('db_firstIn_pop', '1')
// this.setData({
// showModalType: 'firstIn'
// })
// } else {
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0,
// showModalType: ''
// })
// }
// }
// return
// }
// if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 0) {
// // wx.showToast({
// // title: '',
// // icon: 'none'
// // })
// this.setData({
// showModalType: 'clickGift',
// ticket,
// qrcodeSign
// })
// }
// // }
// } else {
// if (wx.getStorageSync('db_firstIn_pop') != '1') {
// wx.setStorageSync('db_firstIn_pop', '1')
// this.setData({
// showModalType: 'firstIn'
// })
// } else {
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0,
// showModalType: ''
// })
// }
// }
// }
// if (options.isFromH5Scan) {
// //如果来自h5的话必然是免登
// this.scan()
// }
wx.hideLoading();
// console.warn("options:", options, wid)
// wx.showToast({
// title: '' + JSON.stringify(options),
// icon: 'none'
// })
},
async getBindPhone(wid) {
const isBindPhone = await new Promise(r => {
wx.login({
success: res => {
if (res.code) {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbCheckHavePower"])({
code: res.code,
wid
}).then(resp => {
console.warn("resp:", resp, resp.success, resp.data);
if (resp.success) {
r(resp.data.bindPhone);
} else {
r(false);
}
});
}
}
});
});
return isBindPhone;
},
async login(wid) {
await new Promise(r => {
wx.login({
success: ress => {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbLogin"])({
code: ress.code,
wid
}).then(respp => {
if (respp) {
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].loginToken = encodeURIComponent(respp.data.loginToken);
r(1);
}
});
}
});
});
},
async getWid() {
const wid = await new Promise(r => {
getApp().getSdk().getRetailData('user_base_info').then(data => {
r(data.wid);
});
});
console.warn("wid", wid);
if (wid != -1) {
return wid;
} else {
return await this.getWid();
}
},
async getAuthLogin(wid) {
await new Promise(r => {
wx.login({
success: ress => {
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbLogin"])({
code: ress.code,
wid
}).then(respp => {
if (respp) {
r(respp.data);
}
});
}
});
});
},
async showAward() {
// const resp = await this.getAuthLogin(globalData.wid)
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["awardUrl"])
});
},
scanFunc() {
if (_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo.lastScanTimes > 0) {
this.setData({
showModalType: "scanTip"
});
} else {
this.setData({
showModalType: "scanLimit"
});
}
},
nextGuide(e) {
// const {
// index
// } = e.target.dataset
// console.warn("引导:" + (index * 1 + 1))
if (this.data.guideIndex == 2) {
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
});
return;
} else {
console.warn("进游戏引导弹窗了");
this.openGameModal();
}
console.warn("完成引导");
}
this.setData({
guideIndex: this.data.guideIndex + 1
});
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: 'rule'
});
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail);
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
});
return;
}
this.setData({
showModalType: ''
});
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo)
});
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId)
});
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
return;
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
});
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
} else {
this.setData({
showModalType: ''
});
}
}
return;
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1');
this.setData({
showModalType: 'firstIn'
});
return;
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0,
showModalType: ''
});
return;
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
});
return;
}
this.setData({
showModalType: ""
});
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal();
}
this.setData({
showModalType: ''
});
},
openGameModal() {
if (!!wx.getStorageSync("gameGuide")) {
return;
}
wx.setStorageSync("gameGuide", true);
this.setData({
showModalType: "gameGuide"
});
},
onModalPhoneClose(e) {
console.warn("onModalPhoneClose,e", e.detail);
this.checkAuth(e.detail);
this.setData({
showModalType: ''
});
},
onModalCloseShowRule(e = {}) {
this.setData({
showModalType: 'rule'
});
},
onAuthPhone(e) {
this.checkAuth(e.detail, true);
},
onAuthUser() {
this.showAuth();
},
onAssistResult(e) {
const res = e.detail;
if (res.success) {
//助力成功
this.setData({
showModalType: "assistSuc"
});
} else {
//助力失败
this.setData({
showModalType: "assistFail",
assistErrorMsg: res.message
});
}
},
/**立即扫码 */
scanRightNow() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
this.setData({
showModalType: ''
});
this.scan();
},
scan() {
wx.scanCode({
onlyFromCamera: true,
success: async res => {
console.warn("res", res);
const db_qrcodeInfo = Object(_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["getUrlParam"])('q', decodeURIComponent(res.result));
const params = db_qrcodeInfo.split("_");
const ticket = params[1];
const qrcodeSign = params[2];
// const ticket = getUrlParam('ticket', res.path)
// const qrcodeSign = getUrlParam('qrcodeSign', res.path)
const apiGetTicketStatusResp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiGetTicketStatus"])({
ticket,
qrcodeSign
});
if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 1) {
//已使用
wx.showToast({
title: '此瓶盖已被核奖~',
icon: 'none'
});
return;
}
if (!apiGetTicketStatusResp.success) {
// wx.showToast({
// title: '',
// icon: 'none'
// })
return;
}
console.warn("qrcode", qrcodeSign, ticket);
this.setData({
showModalType: 'clickGift',
ticket,
qrcodeSign
});
// wx.navigateBack()
// wx.showToast({
// title: JSON.stringify(res.result),
// icon: 'none',
// duration: 3000,
// })
},
fail: () => {}
// complete: (res) => {
// wx.navigateBack({
// delta: 1
// });
// }
});
},
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 => {
if (res.code) {
const param = {
code: res.code,
phoneEncryptedData: e.detail.encryptedData,
phoneIv: e.detail.iv
};
this.login_db(param, noShow);
} else {
console.log('获取用户登录态失败!' + res.errMsg);
}
}
});
},
/**登陆逻辑 */
login_db(param, noShow) {
console.warn("param", param);
if (this.data.isloading) return;
this.setData({
isloading: true
});
wx.showLoading();
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbLogin"])({
...param
}).then(async res => {
wx.hideLoading();
this.setData({
isloading: false
});
if (res.success) {
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].loginToken = encodeURIComponent(res.data.loginToken);
const isBindPhone = await this.getBindPhone(_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].wid);
this.setData({
isBindPhone
});
const resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({});
if (resp.success) {
this.setData({
authAvatar: resp.data.authAvatar
});
if (resp.data.authAvatar && !noShow) {
//已经授权的情况下走新手引导
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0
});
}
}
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = resp.data;
}
} else {
console.log("获取兑吧免登失败", res);
}
wx.hideLoading();
});
},
// onChooseAvatar(e) {
// console.warn("eee", e)
// const {
// avatarUrl
// } = e.detail;
// console.log(e, "头像")
// // this.setData({
// // avatar: avatarUrl,
// // })
// wx.getFileSystemManager().readFile({
// filePath: e.detail.avatarUrl, //地址
// encoding: 'base64', //编码格式
// success: res => {
// let base64 = 'data:image/png;base64,' + res.data
// apiUploadFile({
// img64: base64,
// }).then((res = {}) => {
// console.warn(JSON.stringify(res), "resttts");
// this.setData({
// avatarUrl: res.data
// })
// })
// }
// })
// },
// onInputChange(e) {
// console.warn("nickName", e.detail.value)
// this.setData({
// nickName: e.detail.value
// })
// },
saveFunc(e) {
console.warn("保存");
if (!e.detail.nickName) {
wx.showToast({
title: '昵称不能为空~',
icon: 'none'
});
return;
}
Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiAuthAvatar"])({
nickname: e.detail.nickName,
avatar: e.detail.avatarUrl
}).then(async res => {
if (res.success) {
this.setData({
isShowAuth: false
});
}
const resp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDbIndexInfo"])({});
if (resp.success) {
this.setData({
authAvatar: resp.data.authAvatar
});
//助力逻辑下不走新手引导
if (resp.data.authAvatar && this.data.showModalType != 'assist') {
//已经授权的情况下走新手引导
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1');
this.setData({
guideIndex: 0
});
}
}
/**首页接口存储 */
_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].indexInfo = resp.data;
//如果是开心收下处的授权
if (this.data.awardInfo) {
const awardInfo = this.data.awardInfo;
if (awardInfo.projectOrderNo) {
this.setData({
awardInfo: null
});
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + awardInfo.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=' + awardInfo.recordId)
});
}
}
}
wx.hideLoading();
});
},
cancelFunc() {
console.warn("取消");
this.setData({
isShowAuth: false
});
},
showAuth() {
this.setData({
isShowAuth: true
});
},
showExchange() {
wx.navigateTo({
url: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["exchangeUrl"]
});
},
showChallange() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["chanllageUrl"])
});
this.setData({
showModalType: ""
});
},
showShop() {
wx.navigateTo({
url: _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["shopUrl"]
});
// wx.navigateTo({
// url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(shopUrl),
// })
},
showRank() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
});
return;
}
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["rankUrl"])
});
},
switchMusic(e) {
const {
index
} = e.target.dataset;
if (index == '1') {
//关闭音乐
this.innerAudioContext.pause();
} else {
this.innerAudioContext.play();
}
console.warn("index", index, this.data.isPlayMusic);
this.setData({
isPlayMusic: index == '0'
});
},
onHide() {
this.innerAudioContext.stop();
},
onShow() {
if (this.innerAudioContext && this.data.isPlayMusic) {
this.innerAudioContext.play();
}
},
onUnload() {
this.innerAudioContext.stop();
}
});
/***/ })
/******/ }));
\ 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",
"act-rule-modal": "./../component/actRuleModal/index",
"scan-tip-modal": "./../component/scanTipModal/index"
}
}
\ No newline at end of file
<view class="db_index-container">
<view class="db_index-container2">
<view class="bg"></view>
<view class="top">
<view class="rulebtn" bind:tap="showRuleModal"></view>
<view class="prizebtn"></view>
<view class="logo"></view>
<view class="title"></view>
<view class="taskicon"></view>
<view class="drawicon"></view>
<view class="creditsbg"></view>
<text class="creditslab"></text>
<text class="creditsnum"></text>
<view class="gocredits"></view>
</view>
<view class="car"></view>
<view class="build1"></view>
<view class="build2"></view>
<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>
<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>
<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>
<click-gift-modal wx:if="{{showModalType == 'clickGift'}}" isBindPhone="{{isBindPhone}}" catch:onOpenAward="onOpenAward" catch:onModalClose="onModalClose"></click-gift-modal>
<open-award-modal wx:if="{{showModalType == 'openAward'}}" prizeInfoVO="{{prizeInfoVO}}" catch:onModalClose="onModalClose"></open-award-modal>
<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>
<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>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.db_index-container {
width: 750rpx;
height: 100vh;
overflow: hidden;
position: absolute;
}
.db_index-container2 {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
margin: auto;
position: absolute;
}
.bg {
width: 750rpx;
height: 1624rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/bg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.top {
width: 750rpx;
height: 48rpx;
left: 0rpx;
top: 137rpx;
position: absolute;
}
.rulebtn {
width: 116rpx;
height: 48rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/rule.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.prizebtn {
width: 118rpx;
height: 48rpx;
right: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/prize.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.logo {
width: 93rpx;
height: 106rpx;
left: 317rpx;
top: -29rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/logo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.title {
width: 421rpx;
height: 130rpx;
left: 165rpx;
top: 89rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/title.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.taskicon {
width: 104rpx;
height: 102rpx;
left: 11rpx;
top: 118rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/taskicon.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawicon {
width: 101rpx;
height: 123rpx;
left: 13rpx;
top: 251rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/drawicon.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.creditsbg {
width: 468rpx;
height: 145rpx;
left: 137rpx;
top: 230rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/creditsbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.creditslab {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #80481b;
font-size: 15rpx;
position: absolute;
}
.creditsnum {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #ff4d49;
font-size: 15rpx;
position: absolute;
}
.gocredits {
width: 23rpx;
height: 23rpx;
left: 523rpx;
top: 288rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/gocredits.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.car {
width: 130rpx;
height: 109rpx;
left: 33rpx;
top: 856rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/car.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build1 {
width: 227rpx;
height: 396rpx;
left: 0rpx;
top: 546rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build1.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build2 {
width: 290rpx;
height: 364rpx;
left: 460rpx;
top: 432rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build2.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build3 {
width: 601rpx;
height: 714rpx;
left: 132rpx;
top: 583rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build3.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build4 {
width: 332rpx;
height: 308rpx;
left: 19rpx;
top: 1061rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build5 {
width: 283rpx;
height: 349rpx;
right: 0rpx;
top: 1100rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build5.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.aibtn {
width: 217rpx;
height: 120rpx;
left: 276rpx;
top: 1101rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/aibtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.gamebtn {
width: 217rpx;
height: 120rpx;
left: 517rpx;
top: 1400rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/gamebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.guessbtn {
width: 217rpx;
height: 120rpx;
left: 522rpx;
top: 718rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/guessbtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.shopbtn {
width: 217rpx;
height: 120rpx;
left: 11rpx;
top: 1323rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/shopbtn.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_jump/db_jump/index.js",
{
/***/ "./src/packages/wm-cloud-db_jump/db_jump/index.js":
/*!********************************************************!*\
!*** ./src/packages/wm-cloud-db_jump/db_jump/index.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
Page({
data: {
activityId: "",
code: ""
},
onLoad: function (options) {
// // 线上环境使用立减金小程序
// prod: {
// appId: 'wxaff903c88607b2c6',
// ghId: 'gh_04e5a6a3271d',
// path: 'pages/wxCouponWebview/index',
// // 开发:develop 体验:trial 正式版:release
// envVersion: 'release'
// }
const {
url
} = options;
this.setData({
url
});
// console.warn("activityId", activityId, code)
// wx.navigateTo({
// url: "/packages/wm-cloud-db_jump/db_jump/index"
// })
},
jump() {
if (this.data.url) {
wx.navigateToMiniProgram({
appId: 'wxaff903c88607b2c6',
path: `/pages/pureWebview/webview?url=${this.data.url}`,
envVersion: 'release',
success(res) {
// 打开成功
console.warn('0', res);
},
fail(res) {
console.warn('1', res);
}
});
}
}
});
/***/ })
/******/ });
\ No newline at end of file
{
"navigationBarTitleText": "db_jump",
"usingComponents": {
}
}
\ No newline at end of file
<view class="db_jump-container">
<view class="getAwardBtn" bind:tap="jump">前往领取</view>
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
.db_jump-container {}
.getAwardBtn {
width: 300rpx;
height: 30rpx;
text-align: center;
left: 0rpx;
right: 0rpx;
top: 400rpx;
margin: auto;
position: absolute;
}
\ No newline at end of file
var webpackRequire = require("./../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_webview/db_webview/index.js",
Object.assign({}, require("./../../../weimob-cloud-commons.js").modules, {
/***/ "./src/packages/wm-cloud-db_webview/db_webview/index.js":
/*!**************************************************************!*\
!*** ./src/packages/wm-cloud-db_webview/db_webview/index.js ***!
\**************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wm_cloud_db_index_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../wm-cloud-db_index/utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
/* harmony import */ var _wm_cloud_db_index_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../wm-cloud-db_index/utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");
// webLogin.js
// 获取应用实例
const app = getApp();
Page({
data: {
shareInfo: {},
isShowBtn: false
},
onLoad(options) {
this.initWebView(options);
},
async initWebView(options) {
const isNeedLogin = options.isNeedLogin;
let redirectUrl = decodeURIComponent(options.redirect);
console.warn("options.redirect:", redirectUrl);
if (isNeedLogin) {
await new Promise(r => {
wx.login({
success: res => {
console.warn("code:", res.code);
Object(_wm_cloud_db_index_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["reqDbLogin"])({
code: res.code,
redirect: redirectUrl,
wid: _wm_cloud_db_index_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].wid
}).then(res => {
if (res.success) {
_wm_cloud_db_index_utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].loginToken = res.data.loginToken;
// wx.setStorageSync('db_loginToken', res.data.loginToken)
redirectUrl = res.data.redirectUrl;
r(1);
}
}).catch(() => {
r(1);
});
}
});
});
}
if (redirectUrl) {
this.setData({
path: redirectUrl
});
}
},
getMessage(e) {
const {
data
} = e.detail;
console.log(data, "data");
if (data) {
this.setData({
share: data[data.length - 1]
});
}
},
onShareAppMessage: function (options) {
//分享
const {
share
} = this.data;
console.warn(share.link, "share.link--------", JSON.stringify(options));
// const shareurl = '/pages/webview/index?redirect=' + encodeURIComponent(share.link);
if (share) {
const shareurl = share.link;
return {
title: share.title,
path: shareurl,
imageUrl: share.imgUrl,
success: function (res) {
console.log(res, '成功');
console.info(res + '成功');
// wx.showToast({
// title: '分享成功',
// icon: 'none'
// })
// 转发成功
},
fail: function (res) {
console.log(res + '失败');
// 转发失败
},
complete: function (res) {
// 不管成功失败都会执行
console.log(res, '成功或失败');
}
};
} else {
return {
title: "",
path: "/packages/wm-cloud-db_index/db_index/index",
imageUrl: "https://yun.duiba.com.cn/aurora/assets/bcce6f784bb575d94e9fec4e5ee98f2e7fa1cd85.png",
success: function (res) {
console.log(res, '成功');
console.info(res + '成功');
// wx.showToast({
// title: '分享成功',
// icon: 'none'
// })
// 转发成功
},
fail: function (res) {
console.log(res + '失败');
// 转发失败
},
complete: function (res) {
// 不管成功失败都会执行
console.log(res, '成功或失败');
}
};
}
}
});
/***/ })
/******/ }));
\ No newline at end of file
{
"navigationBarTitleText": "",
"usingComponents": {
}
}
\ No newline at end of file
<!-- index.wxml -->
<view class="webcontainer">
<view class="webview">
<web-view src="{{path}}" bindmessage="getMessage"></web-view>
</view>
<!-- <view class="tabContainer">
<tab></tab>
</view> -->
</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
/**index.wxss**/
.webcontainer {}
.webcontainer .tabContainer {
width: 750rpx;
height: 207rpx;
bottom: 0rpx;
z-index: 10;
position: fixed;
}
\ No newline at end of file
var webpackRequire = require("./../../webpack-require");
webpackRequire(
"./src/pages/home/home.js",
{
/***/ "./src/pages/home/home.js":
/*!********************************!*\
!*** ./src/pages/home/home.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports) {
Page({});
/***/ })
/******/ });
\ No newline at end of file
{
}
\ No newline at end of file
<view>欢迎使用微盟云小程序定制</view>
\ No newline at end of file
@import '/cloud-reset-app.wxss';
{
"description": "项目配置文件",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"projectname": "test-mini",
"libVersion": "2.11.3",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"miniprogram": {
"list": [
{
"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
}
]
}
},
"bizType": "2",
"appid": "wxed8b470e1f70c476",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
var _0x1a0c=['call','prototype','undefined','Module','__esModule','create','default','被加载两次','exports','defineProperty','toStringTag','bind'];(function(_0x3c235a,_0x1a0c1b){var _0x547ad1=function(_0x35ec01){while(--_0x35ec01){_0x3c235a['push'](_0x3c235a['shift']());}};_0x547ad1(++_0x1a0c1b);}(_0x1a0c,0x160));var _0x547a=function(_0x3c235a,_0x1a0c1b){_0x3c235a=_0x3c235a-0x0;var _0x547ad1=_0x1a0c[_0x3c235a];return _0x547ad1;};var installedModules={};module[_0x547a('0x4')]=function(_0x5b62bd,_0x537828,_0x220a23=!0x0){var _0x52a4ee=null;function _0x2480e7(_0x368378){if(_0x368378===_0x5b62bd&&_0x52a4ee)throw new Error('入口文件'+_0x368378+_0x547a('0x3'));if(_0x368378!==_0x5b62bd&&installedModules[_0x368378])return installedModules[_0x368378][_0x547a('0x4')];var _0x1c83ca=installedModules[_0x368378]={'i':_0x368378,'l':!0x1,'exports':{}};return _0x368378===_0x5b62bd&&(_0x52a4ee=_0x1c83ca),_0x537828[_0x368378][_0x547a('0x8')](_0x1c83ca['exports'],_0x1c83ca,_0x1c83ca['exports'],_0x2480e7),_0x1c83ca['l']=!0x0,_0x1c83ca[_0x547a('0x4')];}return _0x2480e7['m']=_0x537828,_0x2480e7['c']=installedModules,_0x2480e7['d']=function(_0x264136,_0x57f87a,_0x3f3a83){_0x2480e7['o'](_0x264136,_0x57f87a)||Object[_0x547a('0x5')](_0x264136,_0x57f87a,{'enumerable':!0x0,'get':_0x3f3a83});},_0x2480e7['r']=function(_0xcb72b2){_0x547a('0xa')!=typeof Symbol&&Symbol[_0x547a('0x6')]&&Object['defineProperty'](_0xcb72b2,Symbol['toStringTag'],{'value':_0x547a('0xb')}),Object[_0x547a('0x5')](_0xcb72b2,_0x547a('0x0'),{'value':!0x0});},_0x2480e7['t']=function(_0x73fb0e,_0x101b18){if(0x1&_0x101b18&&(_0x73fb0e=_0x2480e7(_0x73fb0e)),0x8&_0x101b18)return _0x73fb0e;if(0x4&_0x101b18&&'object'==typeof _0x73fb0e&&_0x73fb0e&&_0x73fb0e[_0x547a('0x0')])return _0x73fb0e;var _0x2f005c=Object[_0x547a('0x1')](null);if(_0x2480e7['r'](_0x2f005c),Object[_0x547a('0x5')](_0x2f005c,'default',{'enumerable':!0x0,'value':_0x73fb0e}),0x2&_0x101b18&&'string'!=typeof _0x73fb0e)for(var _0x1c6afe in _0x73fb0e)_0x2480e7['d'](_0x2f005c,_0x1c6afe,function(_0x24221e){return _0x73fb0e[_0x24221e];}[_0x547a('0x7')](null,_0x1c6afe));return _0x2f005c;},_0x2480e7['n']=function(_0x4154f7){var _0xb099a6=_0x4154f7&&_0x4154f7[_0x547a('0x0')]?function(){return _0x4154f7[_0x547a('0x2')];}:function(){return _0x4154f7;};return _0x2480e7['d'](_0xb099a6,'a',_0xb099a6),_0xb099a6;},_0x2480e7['o']=function(_0x25a5af,_0x55e70f){return Object[_0x547a('0x9')]['hasOwnProperty'][_0x547a('0x8')](_0x25a5af,_0x55e70f);},_0x2480e7['p']='',_0x2480e7(_0x2480e7['s']=_0x5b62bd);};
\ No newline at end of file
exports.ids = ["weimob-cloud-commons"];
exports.modules = {
/***/ "./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, apiScan, uploadFile, authAvatar, getTicketStatus, getShareUserInfo, doAssist, getActivityStatus, queryOrderId, userRecord */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbLoginParam", function() { return dbLoginParam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dbCheckHavePower", function() { return dbCheckHavePower; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiCoopIndex", function() { return apiCoopIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiScan", function() { return apiScan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uploadFile", function() { return uploadFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "authAvatar", function() { return authAvatar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTicketStatus", function() { return getTicketStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShareUserInfo", function() { return getShareUserInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doAssist", function() { return doAssist; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActivityStatus", function() { return getActivityStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryOrderId", function() { return queryOrderId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userRecord", function() { return userRecord; });
// 线上测试 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 dbDomainPaths = {
// 'online': dbDomains['online'] + "/projectx/p764e268d",
// 'pre': dbDomains['pre'] + "/projectx/p764e268d",
// 'test': dbDomains['test'] + "/projectx/pfebb155c"
// }
// /**小程序接口 */
// export const dbDomain = dbDomains[__env__]
// /**活动接口 */
// export const apiDbDomain = dbDomainPaths[__env__]
// 小程序授权登陆
const dbLoginParam = {
url: "/weimocloud/wechat/autoLogin",
//dbDomain +
method: "POST",
header: {}
};
// 验证用户是否授权过
const dbCheckHavePower = {
url: "/weimocloud/wechat/loginCheck",
//dbDomain +
method: "POST",
header: {}
};
/** 活动首页*/
const apiCoopIndex = {
url: "/weimocloud/projectx/index",
//apiDbDomain +
header: {},
method: "GET"
};
/** 扫码*/
const apiScan = {
url: "/weimocloud/projectx/scan",
//apiDbDomain +
header: {},
method: "GET"
};
// 上传头像数据
const uploadFile = {
url: "/weimocloud/customActivity/imgUploadUrl",
method: "POST",
header: {}
};
//保存头像昵称
const authAvatar = {
url: "/weimocloud/projectx/authAvatar",
method: "GET",
header: {}
};
// weimocloud/projectx/getTicketStatus?ticket=xx&qrcodeSign=xxx
//查询瓶盖码有没有过期
const getTicketStatus = {
url: "/weimocloud/projectx/getTicketStatus",
method: "GET",
header: {}
};
//获取邀请者头像昵称
const getShareUserInfo = {
url: "/weimocloud/projectx/getShareUserInfo",
method: "GET",
header: {}
};
//助力
const doAssist = {
url: "/weimocloud/projectx/doAssist",
method: "GET",
header: {}
};
//获取活动状态
const getActivityStatus = {
url: "/weimocloud/projectx/getActivityStatus",
method: "GET",
header: {}
};
//轮训查询奖品orderId
const queryOrderId = {
url: "/weimocloud/projectx/getOrderId",
method: "GET",
header: {}
};
const userRecord = {
url: "/weimocloud/projectx/userRecord",
method: "GET",
header: {}
};
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js":
/*!*******************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/utils/db_api/globalData.js ***!
\*******************************************************************/
/*! exports provided: globalData, awardUrl, rankUrl, chanllageUrl, shopUrl, exchangeUrl, getUrlParam */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "globalData", function() { return globalData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "awardUrl", function() { return awardUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rankUrl", function() { return rankUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chanllageUrl", function() { return chanllageUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shopUrl", function() { return shopUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exchangeUrl", function() { return exchangeUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUrlParam", function() { return getUrlParam; });
// // 线上测试
// export const preEnv = "https://95721.activity-18.m.duiba.com.cn/projectx/p03805f35/index.html?appID=95721"
// export const prodEnv = "https://95721.activity-18.m.duiba.com.cn/projectx/pf892b6a1/index.html?appID=95721"
const globalData = {
loginToken: "",
indexInfo: {},
wid: ""
};
//正式项目 pc98b8da4
//线上测试 pb4c53264
const awardUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/myPrize.html?appID=96109";
const rankUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/rank.html?appID=96109";
const chanllageUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/index.html?appID=96109";
const shopUrl = "/cms_design/index?productInstanceId=13068633342&vid=0&pageid=57840295342";
const exchangeUrl = "/cms_design/design?productInstanceId=13068633342&vid=0&pageid=58011845342";
function getUrlParam(name, search) {
let matched = search.split('?')[1].match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'));
return search.length ? matched && matched[2] : null;
}
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/index.js":
/*!**************************************************************!*\
!*** ./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 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* 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__, "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; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiDoAssist", function() { return apiDoAssist; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiGetActivityStatus", function() { return apiGetActivityStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiQueryOrderId", function() { return apiQueryOrderId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiUserRecord", function() { return apiUserRecord; });
/* harmony import */ var _requestFun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./requestFun */ "./src/packages/wm-cloud-db_index/utils/db_api/requestFun.js");
/* harmony import */ var _dbrequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dbrequest */ "./src/packages/wm-cloud-db_index/utils/db_api/dbrequest.js");
/* harmony import */ var _globalData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
// 小程序授权登陆
const reqDbLogin = param => {
console.warn("reqDbLogin");
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["dbLoginParam"],
data: param
});
};
//查看是否绑定手机号
const reqDbCheckHavePower = param => {
console.log(param);
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["dbCheckHavePower"],
// url: `${dbCheckHavePower.url}`,
data: param
});
};
//首页
const apiDbIndexInfo = 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__["apiCoopIndex"],
data: param
});
};
//扫码
const apiDbScan = 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"],
data: param
});
};
//上传头像
const apiUploadFile = 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"],
data: param
});
};
//授权头像
const apiAuthAvatar = param => {
param.loginToken = _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].loginToken;
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["authAvatar"],
data: param
});
};
//查询瓶盖码是否生效
const apiGetTicketStatus = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["getTicketStatus"],
data: param
});
};
//查询邀请者头像昵称
const apiGetShareUserInfo = param => {
// param.loginToken = globalData.loginToken
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["getShareUserInfo"],
data: param
});
};
//助力
const apiDoAssist = param => {
param.loginToken = _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].loginToken;
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["doAssist"],
data: param
});
};
//查询活动状态
const apiGetActivityStatus = param => {
// param.loginToken = globalData.loginToken
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["getActivityStatus"],
data: param
});
};
//轮训查询奖品orderId
const apiQueryOrderId = param => {
param.loginToken = _globalData__WEBPACK_IMPORTED_MODULE_2__["globalData"].loginToken;
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["queryOrderId"],
data: param
});
};
//记录用户进入数据
const apiUserRecord = param => {
return Object(_requestFun__WEBPACK_IMPORTED_MODULE_0__["default"])({
..._dbrequest__WEBPACK_IMPORTED_MODULE_1__["userRecord"],
data: param
});
};
/***/ }),
/***/ "./src/packages/wm-cloud-db_index/utils/db_api/requestFun.js":
/*!*******************************************************************!*\
!*** ./src/packages/wm-cloud-db_index/utils/db_api/requestFun.js ***!
\*******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
const requestFun = async dataSouce => {
// wx.showLoading({
// mask: true
// })
console.log(dataSouce, "dataSouce");
return await new Promise((resolve, reject) => {
getApp().getSdk().request({
url: dataSouce.url,
// 接口名称相对地址
data: {
...dataSouce.data
},
// 接口所需数据
requestOption: {
header: {
...dataSouce.header,
"cloud-app-id": "612072719085-yxh-login" // 开发者接口所在容器应用的环境域名前缀。配置错误会导致HTTP请求404。
},
method: dataSouce.method
}
}).then(res => {
if (res.code == '90002') {
/**token失效,重新登陆 */
// await login(globalData.wid)
wx.showToast({
title: '获取数据失败,请重新进入吧~',
icon: "none"
});
}
console.warn('收到接口返回值:' + dataSouce.url, res);
resolve(res);
});
});
};
/* harmony default export */ __webpack_exports__["default"] = (requestFun);
const login = async wid => {
await new Promise(r => {
wx.login({
success: ress => {
reqDbLogin({
code: ress.code,
wid
}).then(respp => {
if (respp) {
_globalData__WEBPACK_IMPORTED_MODULE_0__["globalData"].loginToken = encodeURIComponent(respp.data.loginToken);
r(1);
}
});
}
});
});
};
/***/ })
};;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "weimob-cloud",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"dev": " node ./webpack-config/run.js && webpack --mode development --watch --config ./webpack-config/webpack.config.js",
"build": " node ./webpack-config/run.js && webpack --mode development --config ./webpack-config/webpack.config.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.10.3",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.10.5",
"@babel/preset-env": "^7.10.4",
"babel-loader": "^8.1.0",
"cache-loader": "^4.1.0",
"copy-webpack-plugin": "^6.0.2",
"file-loader": "^6.0.0",
"fs-extra": "^9.0.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.9.1",
"webpack-cli": "^3.3.12",
"xapp-webpack-loader": "^1.0.2"
},
"dependencies": {}
}
{
"appid": "wxed8b470e1f70c476",
"compileType": "miniprogram",
"libVersion": "3.4.2",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
\ No newline at end of file
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "test-mini",
"setting": {
"compileHotReLoad": true
}
}
\ No newline at end of file
//app.js
const WeimobJsSdk = require('./utils/weimob-js-sdk/index')
const weimobJsSdk = new WeimobJsSdk();
App({
onLaunch: function () {
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
wx.getSystemInfo({
success: (result) => {
console.log(result)
this.globalData.systemInfo=result;
},
})
wx.customTheme = {
"color":"color:#86B902;",
"bgc":"background-color: #86B902;",
"bdc":"border-color: #86B902;",
"bgCart":"background-color: #454552;",
"bgcOpacity":"background-color: rgba(134,185,2,0.7);",
"colorStr":"#86B902"
}
wx.currency = {"symbol":"¥","name":"元","unit":"元"}
},
getSdkSync() {
return Promise.resolve(weimobJsSdk)
},
getSdk() {
return weimobJsSdk
},
globalData: {
userInfo: null
}
})
\ No newline at end of file
{
"pages": [
"pages/home/home"
],
"subPackages": [
{
"root": "packages/wm-cloud-db_index",
"name": "wm-cloud-db_index",
"pages": [
"db_index/index"
]
},
{
"root": "packages/wm-cloud-db_webview",
"name": "wm-cloud-db_webview",
"pages": [
"db_webview/index"
]
},
{
"root": "packages/wm-cloud-db_jump",
"name": "wm-cloud-db_jump",
"pages": [
"db_jump/index"
]
}
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
/**app.wxss**/
page {
height: 100%;
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
background-color: #f8f8f8;
font-weight: 400;
}
view,
image,
icon,
scroll-view,
text,
button,
checkbox,
form,
input,
label,
navigator,
audio,
video,
canvas {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
scroll-view {
height: 100%;
}
form,
image {
display: block;
}
button {
padding: 0;
margin: 0;
border-radius: 0;
height: 100%;
display: block;
line-height: inherit;
font-size: inherit;
color: inherit;
background: none;
-webkit-appearance: none;
border: none;
}
button::after {
content: none;
}
input,
textarea {
font-family: Microsoft YaHei, '微软雅黑', MicrosoftJhengHei, '华文细黑', Helvetica, Arial, 'sans-serif';
font-size: 26rpx;
z-index: 0;
}
/* 用于view当成text标签是使用 */
.text {
display: inline-block;
}
.text-inline {
display: inline;
}
.minHeight {
min-height: 101%;
}
.f0 {
font-size: 0;
}
/*背景图片*/
.imgCover {
width: 100%;
padding-bottom: 100%;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.imgCover-list {
width: 195rpx;
height: 260rpx;
padding-bottom: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
position: relative;
}
.circular {
border-radius: 50%;
}
/**显示**/
.ovh {
overflow: hidden;
}
.hidden {
display: none;
}
.show {
display: block;
}
.inline {
display: inline;
}
/**文本超出**/
.text-line1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
.text-line-1 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.text-line3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
/**弹性盒子布局**/
.flex,
.box {
display: flex;
display: -webkit-flex;
}
.flex-v-center {
align-items: center;
-webkit-align-items: center;
}
.flex-center {
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
}
.flex-between {
justify-content: space-between;
-webkit-justify-content: space-between;
}
.flex-v-between {
align-content: space-between;
-webkit-align-content: space-between;
}
.flex-col {
flex-direction: column;
-webkit-flex-direction: column;
}
.flex1 {
flex: 1;
-webkit-flex: 1;
}
.flex0 {
flex: none;
-webkit-flex: none;
}
.flex-start {
justify-content: flex-start;
-webkit-justify-content: flex-start;
}
/*边框设置*/
.border-around,
.border-bottom-1px,
.border-left-1px,
.border-right-1px,
.border-top-1px {
position: relative;
}
.border-around {
border: 1rpx solid #ededed;
}
.border-top-1px {
border-top: 1rpx solid #ededed;
}
.border-right-1px {
border-right: 1rpx solid #ededed;
}
.border-bottom-1px {
border-bottom: 1rpx solid #ededed;
}
.border-left-1px {
border-left: 1rpx solid #ededed;
}
/*
* 使用方法: 将对应类名加入对应的节点上
* 注意:
* 1. border1rpx的容器padding最少设置1rpx
* 2. 如果添加的节点已有::after,避免覆盖,需改成.border1rpx_before
* 3. 容器如果设置圆角,需要手动设置 .容器::after{border-raduis * 2},
* 4. 边框和内容区域有0.5rpx间隙,如果内容需要全部填充的话,需要在填充的节点上添加.border1rpx-full
*/
.border1rpx,
.border1rpx_before {
position: relative;
border-width: 0rpx !important;
padding: 0.1rpx;
z-index: 0;
}
.border1rpx::after,
.border1rpx_before::before {
content: '';
border-style: inherit;
border-color: inherit;
border-radius: inherit;
box-sizing: border-box !important;
position: absolute;
border-width: 2rpx !important;
left: 0;
top: 0;
width: 200% !important;
height: 200% !important;
transform-origin: 0 0;
transform: scale(0.5) !important;
z-index: -1;
}
.border1rpx-full {
margin: -1rpx;
}
/*箭头*/
.arrows {
position: relative;
}
.arrows.arrows-up::after {
transform: rotate(-45deg);
}
.arrows.arrows-down::after {
transform: rotate(135deg);
}
.arrows::after {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border: 2px solid #c3c3c3;
border-width: 2px 2px 0 0;
position: absolute;
top: 50%;
right: 26rpx;
margin-top: -3px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrows-inline::after {
position: relative;
left: auto;
top: auto;
right: auto;
bottom: auto;
margin-top: -4px;
margin-left: 5px;
}
/**padding距离**/
.pt-16,
.pt-8 {
padding-top: 16rpx;
}
.pb-16,
.pb-8 {
padding-bottom: 16rpx;
}
.pt-20,
.pt-10 {
padding-top: 20rpx;
}
.pb-20,
.pb-10 {
padding-bottom: 20rpx;
}
.pl-16,
.pl-8 {
padding-left: 16rpx;
}
.pr-16,
.pr-8 {
padding-right: 16rpx;
}
.pl-20,
.pl-10 {
padding-left: 20rpx;
}
.pr-20,
.pr-10 {
padding-right: 20rpx;
}
.pl-32,
.pl-15 {
padding-left: 32rpx;
}
.pr-32,
.pr-15 {
padding-right: 32rpx;
}
.pb360 {
padding-bottom: 360rpx;
}
/*价格设置*/
.PriceSwitch {
line-height: 21px;
font-size: 24rpx;
padding: 0 8rpx;
}
.PriceSwitch .i {
font-size: 30rpx;
}
.Original {
font-style: normal;
font-size: 24rpx;
color: #9a9a9a;
text-decoration: line-through;
margin-left: 16rpx;
display: inline-block;
}
/*文字颜色*/
.color1,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
color: #1a1a1a;
margin: 0;
padding: 0;
}
.color-3 {
color: #333;
}
.color-6 {
color: #666;
}
.color-9 {
color: #999;
}
.color-e9 {
color: #e9e9e9;
}
.color-64 {
color: #646464;
}
.color-b4 {
color: #b4b4b4;
}
.color-97 {
color: #979797;
}
.color-white {
color: #fff;
}
.color-black {
color: #000;
}
.color-c {
color: #ccc;
}
.bkg-white {
background-color: #fff;
}
/*文字大小*/
.font10 {
font-size: 20rpx;
}
.font11 {
font-size: 22rpx;
}
.font12 {
font-size: 24rpx;
}
.font13 {
font-size: 26rpx;
}
.font14 {
font-size: 28rpx;
}
.font15 {
font-size: 30rpx;
}
.font16 {
font-size: 32rpx;
}
.font17 {
font-size: 34rpx;
}
.font18 {
font-size: 36rpx;
}
.font19 {
font-size: 38rpx;
}
.font20 {
font-size: 20rpx;
}
.font22 {
font-size: 22rpx;
}
.font24 {
font-size: 24rpx;
}
.font26 {
font-size: 26rpx;
}
.font28 {
font-size: 28rpx;
}
.font30 {
font-size: 30rpx;
}
.font32 {
font-size: 32rpx;
}
.font34 {
font-size: 34rpx;
}
.font36 {
font-size: 36rpx;
}
.font38 {
font-size: 38rpx;
}
.font40 {
font-size: 40rpx;
}
.font46 {
font-size: 46rpx;
}
.font50 {
font-size: 50rpx;
}
.font56 {
font-size: 56rpx;
}
.font60 {
font-size: 60rpx;
}
.font82 {
font-size: 82rpx;
}
.bkg-white {
background-color: #fff;
}
.fontWeight-l {
/*large*/
font-weight: 500;
}
.fontWeight-n {
/*normal*/
font-weight: 300;
}
.fontWeight-nor {
font-weight: normal;
}
/*文字间距*/
.line-height1 {
line-height: 1;
}
/*按钮*/
.btn-active {
width: 40rpx;
display: inline-block;
text-align: center;
height: 40rpx;
background: #ff2e45;
border-radius: 8rpx;
color: #fff;
line-height: 40rpx;
font-size: 24rpx;
font-weight: normal;
font-style: normal;
overflow: hidden;
}
.btn-auto {
display: inline-block;
font-size: 20rpx;
border: 1px solid #ff2e45;
border-radius: 8rpx;
height: 36rpx;
line-height: 36rpx;
color: #ff2e45;
padding: 0 12rpx;
margin-right: 16rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs {
text-align: center;
width: 100%;
border-radius: 8rpx;
color: #fff;
line-height: 88rpx;
font-size: 30rpx;
}
.btn-lg,
.btn-md,
.btn-sm,
.btn-xs::after {
border-radius: 16rpx;
}
.btn-lg,
.btn-md {
background-color: #ff2e45;
}
.btn-sm {
border: 1px solid #999;
color: #666;
height: 60rpx;
line-height: 60rpx;
}
.btn-xs {
width: 100%;
height: 68rpx;
line-height: 68rpx;
border: 1px solid #e2e2e2;
color: #666;
}
.btn-dashed,
.btn-md-dashed {
width: 100%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
color: #ff2e45;
border-radius: 8rpx;
border: 1px solid #ff2e45;
font-size: 26rpx;
}
.btn-md-dashed {
height: 50rpx;
line-height: 50rpx;
border-radius: 8rpx;
}
.btn-bj1 {
background-color: #ff2e45;
}
.btn-bj2 {
background-color: #ff8522;
}
.btn-dis {
background-color: #999;
color: #bbb;
}
.btn-dashed-dis {
border: 1px solid #c8c8c8;
color: #bbbbbb;
border-radius: 8rpx;
}
/*商品活动标签*/
.goodsTag {
text-align: left;
color: #fff;
line-height: 26rpx;
height: 28rpx;
position: absolute;
top: 16rpx;
padding: 0 8rpx;
padding-top: 2rpx;
font-size: 20rpx;
left: 0;
border-radius: 0 4rpx 4rpx 0;
z-index: 2;
}
.titleTag {
line-height: 28rpx;
height: 28rpx;
margin-right: 8rpx;
color: #fff;
padding: 0 8rpx;
font-size: 18rpx;
border-radius: 4rpx;
font-weight: bold;
display: inline-block;
}
.titleTag.memberTag {
margin-top: 2rpx;
}
.activityTag {
font-style: normal;
display: inline-block;
vertical-align: top;
height: 28rpx;
min-width: 28rpx;
padding: 0 6rpx;
border-radius: 4rpx;
color: #fff;
text-align: center;
font-size: 18rpx;
line-height: 26rpx;
color: #de0022;
border: 1rpx solid #de0022;
border-width: 1rpx;
margin-right: 6rpx;
font-weight: normal;
}
.activityTag::after {
border-radius: 8rpx;
}
/*数量显示*/
.amounts {
font-style: normal;
display: inline-block;
height: 24rpx;
min-width: 24rpx;
padding: 0 6rpx;
border-radius: 24rpx;
background-color: #fd1d45 !important;
color: #fff;
text-align: center;
font-size: 20rpx;
font-weight: 600;
position: absolute;
top: 6rpx;
line-height: 24rpx;
box-sizing: border-box;
}
.goodsTag:empty,
.amounts:empty,
.titleTag:empty {
display: none;
}
/*加载更多*/
.loadMore {
font-size: 26rpx;
color: #c1c1c1;
text-align: center;
height: 80rpx;
line-height: 58rpx;
margin-top: 20rpx;
}
.loadings {
width: 50rpx;
height: 50rpx;
display: inline-block;
vertical-align: middle;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/public/loading.png) no-repeat center center;
background-size: 50rpx;
-webkit-animation: cirle-loadings 1s linear infinite;
animation: cirle-loadings 1s linear infinite;
}
@-webkit-keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes cirle-loadings {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/*推荐*/
.grooms {
margin: 0 16rpx;
overflow: hidden;
text-align: center;
height: 52rpx;
}
.grooms label {
display: inline-block;
padding: 0 20rpx;
height: 52rpx;
line-height: 52rpx;
position: relative;
color: #3e3e3e;
font-size: 26rpx;
}
.grooms label > p {
overflow: hidden;
max-width: 400rpx;
min-width: 120rpx;
white-space: nowrap;
text-overflow: ellipsis;
}
.grooms label > p::before {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 1px 0 0 0;
}
.grooms label > p::after {
content: '';
display: inline-block;
position: absolute;
width: 1000rpx;
margin-left: -1000rpx;
height: 0;
left: 0;
left: inherit;
top: 50%;
border: 1px solid #e9e9e9;
border-width: 0 0 1px 0;
right: 0;
margin-right: -1000rpx;
}
/*菜单距离*/
.navHeight {
height: 100rpx;
}
/*遮罩层*/
.widget-mask,
.widget_mask {
position: fixed;
left: 0;
top: 0px;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
}
.widget_mask.hidden {
opacity: 0;
}
.widget_mask.visibble {
opacity: 1;
}
/* 主题 */
.theme1 .theme-color {
color: #f12e24;
}
.theme1 .theme-bgc {
background-color: #f12e24;
}
.theme1 .theme-bgcart {
background-color: #ffb56c;
}
.theme1 .theme-bdc {
border-color: #f12e24;
}
.theme2 .theme-color {
color: #f56fa6;
}
.theme2 .theme-bgc {
background-color: #f56fa6;
}
.theme2 .theme-bgcart {
background-color: #454552;
}
.theme2 .theme-bdc {
border-color: #f56fa6;
}
.theme3 .theme-color {
color: #e85a71;
}
.theme3 .theme-bgc {
background-color: #e85a71;
}
.theme3 .theme-bgcart {
background-color: #454552;
}
.theme3 .theme-bdc {
border-color: #e85a71;
}
.theme4 .theme-color {
color: #86b902;
}
.theme4 .theme-bgc {
background-color: #86b902;
}
.theme4 .theme-bgcart {
background-color: #454552;
}
.theme4 .theme-bdc {
border-color: #86b902;
}
.theme5 .theme-color {
color: #40baff;
}
.theme5 .theme-bgc {
background-color: #40baff;
}
.theme5 .theme-bgcart {
background-color: #454552;
}
.theme5 .theme-bdc {
border-color: #40baff;
}
/*底部导航*/
.wrap-navbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
text-align: center;
background-color: #fff;
color: #646464;
font-size: 18rpx;
height: 98rpx;
z-index: 20;
}
.nav-item {
align-items: center;
position: relative;
height: 100%;
}
.nav-icon {
display: block;
font-size: 40rpx;
line-height: 45rpx;
display: flex;
display: -webkit-flex;
flex-direction: column;
-webkit-flex-direction: column;
}
/* .on.nav-item{color: #F56FA6;} */
.cartnum-cell {
display: block;
position: absolute;
left: 50%;
margin-left: 8rpx;
right: auto;
top: 8rpx;
color: #fff;
}
/* Copyright */
.copyright {
height: 146rpx;
margin: 0 auto;
background: url(https://cdn2.weimob.com/saas/@assets/saas-fe-retail-h5-stc/image/shop/copyright/copyrights.png) no-repeat center/contain;
}
/* Een Copyright */
/* Een Copyright */
/* iphonex */
.IphoneX {
padding-bottom: 68rpx !important;
}
.fixIphonex {
bottom: 68rpx !important;
}
.fixIphonex::after {
content: ' ';
position: fixed;
bottom: 0 !important;
height: 68rpx !important;
width: 100%;
background: #ffffff;
left: 0;
}
.iphonexMenus {
bottom: 198rpx !important;
}
.Iphonexshare {
bottom: 168rpx !important;
}
.IphonexMB {
margin-bottom: 68rpx !important;
}
/*文字大小*/
/* 商品长图设置*/
.imgCover-oblong-sm .imgCover {
width: 195rpx;
height: 260rpx;
}
.imgCover-oblong-lg .imgCover {
padding-bottom: 133%;
}
/* 字体粗细规格 请参照标注使用*/
.fw-Light {
font-weight: 300;
}
.fw-Regular {
font-weight: 400;
}
.fw-Semibold {
font-weight: 700;
}
/* .fw-Semibold{
font-weight:800;
} */
/* 节点占位 */
.node_seize {
width: 100%;
height: 1rpx;
}
.color-main {
color: #212121;
}
.color-content {
color: #757575;
}
.color-sub {
color: #9e9e9e;
}
.border-radius10 {
border-top-right-radius: 10rpx;
border-top-left-radius: 10rpx;
}
import {
globalData
} from "../../utils/db_api/globalData"
// 活动攻略
const app = getApp()
Component({
data: {
lastScanTimes: 0
},
properties: {
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'actRule');
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="actRuleModal">
<view class="actRuleModalContainer">
<view class="actrulelgiht"></view>
<view class="actrulebg"></view>
<view class="actrulelogo"></view>
<view class="actruleip"></view>
<view class="actrulelab"></view>
<view class="actrulebtn" catch:tap="onModalClose"></view>
<view class="close" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.actRuleModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.actRuleModalContainer {
width: 750rpx;
height: 1209rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.actrulelgiht {
width: 746rpx;
height: 1236rpx;
left: 0rpx;
top: 193rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelgiht.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulebg {
width: 560rpx;
height: 615rpx;
left: 93rpx;
top: 332rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulebg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actruleip{
width: 657rpx;
height: 712rpx;
left: 64rpx;
top: 111rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actruleip.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulelogo {
width: 93rpx;
height: 106rpx;
left: 324rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelogo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulelab{
width: 474rpx;
height: 142rpx;
left: 138rpx;
top: 766rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulelab.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.actrulebtn{
width: 359rpx;
height: 93rpx;
left: 194rpx;
top: 1001rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/actrulepop/actrulebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.close{
width: 67rpx;
height: 67rpx;
left: 342rpx;
top: 1142rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/close.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
import {
globalData
} from "../../utils/db_api/globalData";
import {
reqDbLogin
} from "../../utils/db_api/index";
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
.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
import {
globalData
} from "../../utils/db_api/globalData";
import {
apiDoAssist,
apiGetShareUserInfo,
reqDbLogin
} from "../../utils/db_api/index";
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 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("助力")
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
.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
import {
globalData
} from "../../utils/db_api/globalData";
import {
reqDbLogin
} from "../../utils/db_api/index";
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
.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
import {
globalData
} from "../../utils/db_api/globalData";
import {
reqDbLogin
} from "../../utils/db_api/index";
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
.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
import {
globalData
} from "../../utils/db_api/globalData";
import {
apiUploadFile,
reqDbLogin
} from "../../utils/db_api/index";
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
const app = getApp()
Component({
data: {
isloading: false,
avatarUrl: defaultAvatarUrl,
nickName: "",
},
properties: {
isBindPhone: Boolean
},
attached() {
console.log(this)
console.error("看看文案", this.data, this.data.isBindPhone)
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'clickGift');
},
onChooseAvatar(e) {
console.warn("eee", e)
const {
avatarUrl
} = e.detail;
console.log(e, "头像")
// this.setData({
// avatar: avatarUrl,
// })
wx.getFileSystemManager().readFile({
filePath: e.detail.avatarUrl, //地址
encoding: 'base64', //编码格式
success: res => {
let base64 = 'data:image/png;base64,' + res.data
apiUploadFile({
img64: base64,
}).then((res = {}) => {
console.warn(JSON.stringify(res), "resttts");
this.setData({
avatarUrl: res.data
})
})
}
})
},
onInputChange(e) {
console.warn("nickName", e.detail.value)
this.setData({
nickName: e.detail.value
})
},
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)
}
}
})
},
saveFunc(e) {
this.triggerEvent("onSaveFunc", {
nickName: this.data.nickName,
avatarUrl: this.data.avatarUrl
})
},
cancelFunc(e) {
this.triggerEvent("onCancelFunc", e)
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="getUserInfoContainer">
<view class="getUserInfoContainerBg" bind:tap="cancelFunc"></view>
<view class="getUserInfo">
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
<image class="avatar" src="{{avatarUrl}}"></image>
</button>
<input type="nickname" class="nickname" bindinput="onInputChange" placeholder="请输入昵称" />
<view wx:if="{{!nickName}}" class="saveBtn"></view>
<view wx:if="{{nickName}}" class="saveBtnLight" bind:tap="saveFunc"></view>
<view class="cancelBtn" bind:tap="cancelFunc"></view>
</view>
</view>
\ No newline at end of file
.getUserInfoContainer {
width: 100vw;
height: 100vh;
top: 0rpx;
left: 0rpx;
z-index: 100;
position: fixed;
}
.getUserInfoContainerBg {
width: 100vw;
height: 100vh;
background-color: #000;
opacity: .7;
top: 0rpx;
left: 0rpx;
position: absolute;
}
.getUserInfo {
width: 750rpx;
height: 722rpx;
bottom: 0rpx;
left: 0rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/47ffc796692e24a855d993f9b150fe27c1f5842f.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.avatar-wrapper {
width: 750rpx;
height: 80rpx;
position: absolute;
left: 0rpx;
right: 0rpx;
top: 245rpx;
margin: auto;
z-index: 20;
}
.avatar {
width: 80rpx;
height: 80rpx;
left: 125rpx;
position: absolute;
}
.nickname {
width: 500rpx;
height: 60rpx;
left: 0rpx;
right: 0rpx;
font-size: 30rpx;
position: absolute;
color: #000;
margin: auto;
top: 385rpx;
}
.saveBtn {
width: 369rpx;
height: 95rpx;
text-align: center;
font-size: 20rpx;
left: 0rpx;
right: 0rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/3f9e1082241f73629cadcb88d421475e1996de72.png') no-repeat;
background-position: top left;
background-size: 100% 100%;
top: 540rpx;
position: absolute;
margin: auto;
}
.saveBtnLight {
width: 369rpx;
height: 95rpx;
text-align: center;
font-size: 20rpx;
left: 0rpx;
right: 0rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/be4bf7ffa569124368bef5b35d9158aee2f2f99e.png') no-repeat;
background-position: top left;
background-size: 100% 100%;
top: 540rpx;
position: absolute;
margin: auto;
}
.cancelBtn {
width: 40rpx;
height: 40rpx;
text-align: center;
font-size: 20rpx;
right: 50rpx;
top: 40rpx;
background: url('https://yun.duiba.com.cn/aurora/assets/cc6f7eacd837c15b86ea5d7e1eeaa4aeb0c6382b.png') no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
import {
globalData
} from "../../utils/db_api/globalData";
import {
reqDbLogin
} from "../../utils/db_api/index";
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();
reqDbLogin({
...param,
}).then((res) => {
wx.hideLoading();
this.setData({
isloading: false
});
if (res.success) {
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
.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
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
.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
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");
},
},
});
{
"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
.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
import {
apiQueryOrderId
} from "../../utils/db_api"
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 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
.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
import {
globalData
} from "../../utils/db_api/globalData"
const app = getApp()
Component({
data: {
ruleText: ""
},
properties: {
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
ruleText: globalData.indexInfo.rule
})
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'rule');
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="ruleModal">
<view class="ruleModalContainer">
<view class="ruleModalBg"></view>
<view class="ruleModalBgTextContainer">
<view class="ruleModalBgRule"></view>
<!-- <text class="ruleModalBgText"> -->
<!-- {{ruleText}} -->
<!-- </text> -->
</view>
<view class="ruleModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.ruleModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.ruleModalContainer {
width: 543rpx;
height: 896rpx;
left: 0rpx;
right: 0rpx;
top: 200rpx;
position: absolute;
margin: auto;
}
.ruleModalBgRule {
width: 508rpx;
height: 7787rpx;
top: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/polaris/rule.06cc4edbcde034bd5ad7ff7a456a155c2a09583c.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalBg {
width: 543rpx;
height: 796rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/f83daf181f71cc9549b1a7a69039b772b9b7bed4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.ruleModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 770rpx;
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;
}
.ruleModalBgTextContainer {
width: 543rpx;
height: 546rpx;
top: 145rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
}
.ruleModalBgText {
width: 460rpx;
font-size: 24rpx;
position: absolute;
color: #000000;
text-indent: 2em;
}
\ No newline at end of file
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
.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
import {
globalData
} from "../../utils/db_api/globalData"
const app = getApp()
Component({
data: {
lastScanTimes: 0
},
properties: {
},
attached() {
console.log(this)
console.error("看看文案", this.data)
this.setData({
lastScanTimes: globalData.indexInfo.lastScanTimes
})
},
methods: {
onModalClose() {
this.triggerEvent("onModalClose", 'scanTip');
},
scanRightNow() {
this.triggerEvent("scanRightNow");
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<view class="scanTipModal">
<view class="scanTipModalContainer">
<view class="scanTipModalBg"></view>
<view class="scanTipModalRightNow" catch:tap="scanRightNow"></view>
<text class="scanTipModalText">今日剩余扫码次数:{{lastScanTimes}}</text>
<view class="scanTipModalCloseBtn" catch:tap="onModalClose"></view>
</view>
</view>
\ No newline at end of file
.scanTipModal {
width: 100%;
height: 100%;
z-index: 10;
position: fixed;
background: rgba(0, 0, 0, 0.7);
}
.scanTipModalContainer {
width: 746rpx;
height: 1036rpx;
top: 0rpx;
bottom: 0rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
position: absolute;
}
.scanTipModalBg {
width: 746rpx;
height: 1236rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/9c3409e9dffc1a2372a418142a9ca154ded64293.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalText {
width: 450rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 280rpx;
margin: auto;
color: #b33800;
font-size: 40rpx;
text-align: center;
font-weight: 500;
position: absolute;
}
.scanTipModalRightNow {
width: 395rpx;
height: 92rpx;
left: 0rpx;
right: 0rpx;
margin: auto;
top: 410rpx;
background: url("https://yun.duiba.com.cn/aurora/assets/7090d52c41f5e0fac35064a301b0c0aaf8cef803.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.scanTipModalCloseBtn {
width: 50rpx;
height: 50rpx;
left: 0rpx;
right: 0rpx;
top: 670rpx;
margin: auto;
background: url("https://yun.duiba.com.cn/aurora/assets/f6dac20123ba49f08d58c07a35be408c845cdecd.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
import {
awardUrl,
chanllageUrl,
exchangeUrl,
getUrlParam,
globalData,
rankUrl,
shopUrl
} from "../utils/db_api/globalData";
import {
apiAuthAvatar,
apiDbIndexInfo,
apiDbScan,
apiGetActivityStatus,
apiGetTicketStatus,
apiUploadFile,
apiUserRecord,
reqDbCheckHavePower,
reqDbLogin
} from "../utils/db_api/index";
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
Page({
data: {
guideIndex: -1,
showModalType: "actRule",
isBindPhone: false,
ticket: "",
inviteNum: 0,
inviteTicketNum: 0,
qrcodeSign: "",
prizeInfoVO: [],
authAvatar: false,
avatarUrl: defaultAvatarUrl,
isShowAuth: false,
nickName: "",
activityStatus: 0,
isPlayMusic: true,
assistErrorMsg: ""
},
onLoad: async function (options) {
// const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
// const scancode_time = parseInt(options.scancode_time) // 获取用户扫码时间 UNIX 时间戳
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// // console.warn("q_scancode_time", q, scancode_time)
// this.innerAudioContext = wx.createInnerAudioContext({
// useWebAudioImplement: false, // 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项
// loop: true,
// })
// this.innerAudioContext.src = 'https://yun.duiba.com.cn/aurora/assets/9cd54c2107760e0adbe826843990ab966b149e5b.mp3'
// this.innerAudioContext.play() // 播放
// // innerAudioContext.pause() // 暂停
// // innerAudioContext.stop() // 停止
// wx.showLoading({
// mask: true,
// success: (res) => {},
// fail: (res) => {},
// complete: (res) => {},
// })
// const wid = await this.getWid()
// apiUserRecord({
// wid,
// data: q + "|scancode_time=" + scancode_time
// })
// const activityStatusResp = await apiGetActivityStatus({
// wid
// })
// /**
// * 未开始:1,进行中:2,已结束:3
// */
// if (activityStatusResp.success) {
// this.setData({
// activityStatus: activityStatusResp.data
// })
// }
// console.warn("activityStatusResp", activityStatusResp.data)
// console.warn("wid", wid)
// globalData.wid = wid
// const isBindPhone = await this.getBindPhone(wid)
// if (isBindPhone) {
// /**已绑定的老用户直接拿loginToken */
// await this.login(wid)
// const resp = await apiDbIndexInfo({
// wid
// })
// if (resp.success) {
// this.setData({
// authAvatar: resp.data.authAvatar,
// inviteNum: resp.data.inviteNum,
// inviteTicketNum: resp.data.inviteTicketNum
// })
// if (resp.data.authAvatar && !options.shareCode && !options.q) {
// if (wx.getStorageSync('db_firstIn_pop') == '1') {
// //已经授权的情况下走新手引导
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0
// })
// } else {
// //看是否有人帮忙助力
// // resp.data.inviteNum > 0
// if (resp.data.inviteNum > 0 && activityStatusResp.data == 2) {
// this.setData({
// showModalType: "assistReflct"
// })
// }else{
// this.openGameModal()
// }
// }
// }
// }
// /**首页接口存储 */
// globalData.indexInfo = resp.data
// }
// }
// // console.warn("isBindPhone", isBindPhone)
// this.setData({
// isBindPhone
// })
// // options.shareCode和options.q链路互斥不会同时
// if (options.shareCode && activityStatusResp.data == 2) {
// //助力逻辑
// this.setData({
// showModalType: 'assist',
// shareCode: options.shareCode
// })
// wx.hideLoading()
// return
// }
// if (options.q && activityStatusResp.data == 2) {
// if (isBindPhone && globalData.indexInfo.lastScanTimes <= 0) {
// wx.hideLoading()
// wx.showToast({
// title: '今日扫码次数已达上限',
// icon: 'none',
// duration: 3000
// })
// return
// }
// const db_qrcodeInfo = getUrlParam('q', decodeURIComponent(options.q))
// const params = db_qrcodeInfo.split("_")
// let ticket = params[1]
// let qrcodeSign = params[2]
// // const oldTicket = wx.getStorageSync("ticket")
// // const oldQrcodeSign = wx.getStorageSync("qrcodeSign")
// // if (!(oldTicket == ticket && oldQrcodeSign == qrcodeSign)) {
// //已经使用过则置空
// let apiGetTicketStatusResp = await apiGetTicketStatus({
// wid,
// ticket,
// qrcodeSign
// })
// if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 1) {
// wx.hideLoading()
// //已使用
// wx.showToast({
// title: '此瓶盖已被核奖~',
// icon: 'none',
// duration: 3000
// })
// if (wx.getStorageSync('db_firstIn_pop') != '1') {
// wx.setStorageSync('db_firstIn_pop', '1')
// this.setData({
// showModalType: 'firstIn'
// })
// } else {
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0,
// showModalType: ''
// })
// }
// }
// return
// }
// if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 0) {
// // wx.showToast({
// // title: '',
// // icon: 'none'
// // })
// this.setData({
// showModalType: 'clickGift',
// ticket,
// qrcodeSign
// })
// }
// // }
// } else {
// if (wx.getStorageSync('db_firstIn_pop') != '1') {
// wx.setStorageSync('db_firstIn_pop', '1')
// this.setData({
// showModalType: 'firstIn'
// })
// } else {
// if (wx.getStorageSync('db_guide') != '1') {
// /**新手引导 */
// wx.setStorageSync('db_guide', '1')
// this.setData({
// guideIndex: 0,
// showModalType: ''
// })
// }
// }
// }
// if (options.isFromH5Scan) {
// //如果来自h5的话必然是免登
// this.scan()
// }
wx.hideLoading()
// console.warn("options:", options, wid)
// wx.showToast({
// title: '' + JSON.stringify(options),
// icon: 'none'
// })
},
async getBindPhone(wid) {
const isBindPhone = await new Promise((r) => {
wx.login({
success: res => {
if (res.code) {
reqDbCheckHavePower({
code: res.code,
wid
}).then((resp) => {
console.warn("resp:", resp, resp.success, resp.data)
if (resp.success) {
r(resp.data.bindPhone)
} else {
r(false)
}
})
}
}
})
})
return isBindPhone;
},
async login(wid) {
await new Promise((r) => {
wx.login({
success: ress => {
reqDbLogin({
code: ress.code,
wid
}).then((respp) => {
if (respp) {
globalData.loginToken = encodeURIComponent(respp.data.loginToken)
r(1)
}
})
}
})
})
},
async getWid() {
const wid = await new Promise((r) => {
getApp().getSdk().getRetailData('user_base_info').then(data => {
r(data.wid)
})
})
console.warn("wid", wid)
if (wid != -1) {
return wid
} else {
return await this.getWid()
}
},
async getAuthLogin(wid) {
await new Promise((r) => {
wx.login({
success: ress => {
reqDbLogin({
code: ress.code,
wid
}).then((respp) => {
if (respp) {
r(respp.data)
}
})
}
})
})
},
async showAward() {
// const resp = await this.getAuthLogin(globalData.wid)
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(awardUrl)
})
},
scanFunc() {
if (globalData.indexInfo.lastScanTimes > 0) {
this.setData({
showModalType: "scanTip"
})
} else {
this.setData({
showModalType: "scanLimit"
})
}
},
nextGuide(e) {
// const {
// index
// } = e.target.dataset
// console.warn("引导:" + (index * 1 + 1))
if (this.data.guideIndex == 2) {
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
})
return
}else{
console.warn("进游戏引导弹窗了", )
this.openGameModal()
}
console.warn("完成引导")
}
this.setData({
guideIndex: this.data.guideIndex + 1
})
},
showRuleModal() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: 'rule'
})
},
onModalClose(e) {
//暂不考虑两个弹窗
console.warn("onModalClose,e", e.detail)
if (e.detail.type && e.detail.type == 'openWxMoneyAward') {
if (!this.data.authAvatar) {
//如果没有授权
this.setData({
isShowAuth: true,
showModalType: '',
awardInfo: e.detail
})
return
}
this.setData({
showModalType: ''
})
if (e.detail.projectOrderNo) {
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + e.detail.projectOrderNo),
})
} else {
//兜底
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=' + e.detail.recordId),
})
}
//详情页
// https://duiba.ioutu.cn/aaw/projectx/takePrize?projectOrderNo=
//红包页
// https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=
}
if (e.detail == 'openAward' && !this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
return
}
if (e.detail == 'firstIn-auth') {
if (!this.data.authAvatar) {
this.setData({
isShowAuth: true,
showModalType: ''
})
} else {
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
} else {
this.setData({
showModalType: ''
})
}
}
return
}
//如果都授权了,关闭
if (e.detail == 'firstIn' && this.data.isBindPhone && this.data.authAvatar && wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
}
if (e.detail == 'assistSuc' || e.detail == 'assistFail' || e.detail == 'assist') {
if (wx.getStorageSync('db_firstIn_pop') != '1') {
wx.setStorageSync('db_firstIn_pop', '1')
this.setData({
showModalType: 'firstIn'
})
return
}
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0,
showModalType: ''
})
return
}
if (this.data.inviteNum > 0) {
this.setData({
showModalType: "assistReflct"
})
return
}
this.setData({
showModalType: ""
})
}
//助力反馈弹窗之后再检查一遍
if (e.detail == "assistReflct") {
this.openGameModal()
}
this.setData({
showModalType: ''
})
},
openGameModal(){
if(!!wx.getStorageSync("gameGuide")){
return
}
wx.setStorageSync("gameGuide", true);
this.setData({showModalType:"gameGuide"})
},
onModalPhoneClose(e) {
console.warn("onModalPhoneClose,e", e.detail)
this.checkAuth(e.detail)
this.setData({
showModalType: ''
})
},
onModalCloseShowRule(e = {}) {
this.setData({
showModalType: 'rule'
})
},
onAuthPhone(e) {
this.checkAuth(e.detail, true)
},
onAuthUser() {
this.showAuth()
},
onAssistResult(e) {
const res = e.detail
if (res.success) {
//助力成功
this.setData({
showModalType: "assistSuc"
})
} else {
//助力失败
this.setData({
showModalType: "assistFail",
assistErrorMsg: res.message
})
}
},
/**立即扫码 */
scanRightNow() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
this.setData({
showModalType: ''
})
this.scan()
},
scan() {
wx.scanCode({
onlyFromCamera: true,
success: async (res) => {
console.warn("res", res)
const db_qrcodeInfo = getUrlParam('q', decodeURIComponent(res.result))
const params = db_qrcodeInfo.split("_")
const ticket = params[1]
const qrcodeSign = params[2]
// const ticket = getUrlParam('ticket', res.path)
// const qrcodeSign = getUrlParam('qrcodeSign', res.path)
const apiGetTicketStatusResp = await apiGetTicketStatus({
ticket,
qrcodeSign
})
if (apiGetTicketStatusResp.success && apiGetTicketStatusResp.data == 1) {
//已使用
wx.showToast({
title: '此瓶盖已被核奖~',
icon: 'none'
})
return
}
if (!apiGetTicketStatusResp.success) {
// wx.showToast({
// title: '',
// icon: 'none'
// })
return
}
console.warn("qrcode", qrcodeSign, ticket)
this.setData({
showModalType: 'clickGift',
ticket,
qrcodeSign
})
// wx.navigateBack()
// wx.showToast({
// title: JSON.stringify(res.result),
// icon: 'none',
// duration: 3000,
// })
},
fail: () => {}
// complete: (res) => {
// wx.navigateBack({
// delta: 1
// });
// }
});
},
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 => {
if (res.code) {
const param = {
code: res.code,
phoneEncryptedData: e.detail.encryptedData,
phoneIv: e.detail.iv,
}
this.login_db(param, noShow)
} else {
console.log('获取用户登录态失败!' + res.errMsg)
}
}
})
},
/**登陆逻辑 */
login_db(param, noShow) {
console.warn("param", param)
if (this.data.isloading) return;
this.setData({
isloading: true
});
wx.showLoading();
reqDbLogin({
...param,
}).then(async (res) => {
wx.hideLoading();
this.setData({
isloading: false
});
if (res.success) {
globalData.loginToken = encodeURIComponent(res.data.loginToken)
const isBindPhone = await this.getBindPhone(globalData.wid)
this.setData({
isBindPhone
})
const resp = await apiDbIndexInfo({})
if (resp.success) {
this.setData({
authAvatar: resp.data.authAvatar
})
if (resp.data.authAvatar && !noShow) {
//已经授权的情况下走新手引导
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0
})
}
}
/**首页接口存储 */
globalData.indexInfo = resp.data
}
} else {
console.log("获取兑吧免登失败", res);
}
wx.hideLoading();
})
},
// onChooseAvatar(e) {
// console.warn("eee", e)
// const {
// avatarUrl
// } = e.detail;
// console.log(e, "头像")
// // this.setData({
// // avatar: avatarUrl,
// // })
// wx.getFileSystemManager().readFile({
// filePath: e.detail.avatarUrl, //地址
// encoding: 'base64', //编码格式
// success: res => {
// let base64 = 'data:image/png;base64,' + res.data
// apiUploadFile({
// img64: base64,
// }).then((res = {}) => {
// console.warn(JSON.stringify(res), "resttts");
// this.setData({
// avatarUrl: res.data
// })
// })
// }
// })
// },
// onInputChange(e) {
// console.warn("nickName", e.detail.value)
// this.setData({
// nickName: e.detail.value
// })
// },
saveFunc(e) {
console.warn("保存")
if (!e.detail.nickName) {
wx.showToast({
title: '昵称不能为空~',
icon: 'none'
})
return
}
apiAuthAvatar({
nickname: e.detail.nickName,
avatar: e.detail.avatarUrl
}).then(async (res) => {
if (res.success) {
this.setData({
isShowAuth: false
})
}
const resp = await apiDbIndexInfo({})
if (resp.success) {
this.setData({
authAvatar: resp.data.authAvatar
})
//助力逻辑下不走新手引导
if (resp.data.authAvatar && this.data.showModalType != 'assist') {
//已经授权的情况下走新手引导
if (wx.getStorageSync('db_guide') != '1') {
/**新手引导 */
wx.setStorageSync('db_guide', '1')
this.setData({
guideIndex: 0
})
}
}
/**首页接口存储 */
globalData.indexInfo = resp.data
//如果是开心收下处的授权
if (this.data.awardInfo) {
const awardInfo = this.data.awardInfo
if (awardInfo.projectOrderNo) {
this.setData({
awardInfo: null
})
//直接跳转领取页
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent('https://duiba.ioutu.cn/customActivity/weimocloud/redPage?orderId=' + awardInfo.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=' + awardInfo.recordId),
})
}
}
}
wx.hideLoading()
})
},
cancelFunc() {
console.warn("取消")
this.setData({
isShowAuth: false
})
},
showAuth() {
this.setData({
isShowAuth: true
})
},
showExchange() {
wx.navigateTo({
url: exchangeUrl
})
},
showChallange() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(chanllageUrl),
})
this.setData({showModalType:""})
},
showShop() {
wx.navigateTo({
url: shopUrl
})
// wx.navigateTo({
// url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(shopUrl),
// })
},
showRank() {
if (this.data.activityStatus == 3) {
wx.showToast({
title: "抱歉,活动已结束~",
icon: "none"
})
return
}
wx.navigateTo({
url: '/packages/wm-cloud-db_webview/db_webview/index?isNeedLogin=true&redirect=' + encodeURIComponent(rankUrl),
})
},
switchMusic(e) {
const {
index
} = e.target.dataset
if (index == '1') {
//关闭音乐
this.innerAudioContext.pause()
} else {
this.innerAudioContext.play()
}
console.warn("index", index, this.data.isPlayMusic)
this.setData({
isPlayMusic: index == '0'
})
},
onHide() {
this.innerAudioContext.stop()
},
onShow() {
if (this.innerAudioContext && this.data.isPlayMusic) {
this.innerAudioContext.play()
}
},
onUnload() {
this.innerAudioContext.stop()
}
});
\ 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",
"act-rule-modal":"../component/actRuleModal/index"
}
}
\ No newline at end of file
<view class="db_index-container">
<view class="db_index-container2">
<view class="bg"></view>
<view class="top">
<view class="rulebtn" bind:tap="showRuleModal"></view>
<view class="prizebtn"></view>
<view class="logo"></view>
<view class="title"></view>
<view class="taskicon"></view>
<view class="drawicon"></view>
<view class="creditsbg"></view>
<text class="creditslab"></text>
<text class="creditsnum"></text>
<view class="gocredits"></view>
</view>
<view class="car"></view>
<view class="build1"></view>
<view class="build2"></view>
<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>
<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>
<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>
<click-gift-modal wx:if="{{showModalType == 'clickGift'}}" isBindPhone="{{isBindPhone}}" catch:onOpenAward="onOpenAward" catch:onModalClose="onModalClose"></click-gift-modal>
<open-award-modal wx:if="{{showModalType == 'openAward'}}" prizeInfoVO="{{prizeInfoVO}}" catch:onModalClose="onModalClose"></open-award-modal>
<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>
<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>
</view>
\ No newline at end of file
.db_index-container {
width: 750rpx;
height: 100vh;
overflow: hidden;
position: absolute;
}
.db_index-container2 {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
margin: auto;
position: absolute;
}
.bg {
width: 750rpx;
height: 1624rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/bg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.top {
width: 750rpx;
height: 48rpx;
left: 0rpx;
top: 137rpx;
position: absolute;
}
.rulebtn {
width: 116rpx;
height: 48rpx;
left: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/rule.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.prizebtn {
width: 118rpx;
height: 48rpx;
right: 0rpx;
top: 0rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/prize.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.logo {
width: 93rpx;
height: 106rpx;
left: 317rpx;
top: -29rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/logo.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.title {
width: 421rpx;
height: 130rpx;
left: 165rpx;
top: 89rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/title.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.taskicon {
width: 104rpx;
height: 102rpx;
left: 11rpx;
top: 118rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/taskicon.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.drawicon {
width: 101rpx;
height: 123rpx;
left: 13rpx;
top: 251rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/drawicon.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.creditsbg {
width: 468rpx;
height: 145rpx;
left: 137rpx;
top: 230rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/creditsbg.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.creditslab {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #80481b;
font-size: 15rpx;
position: absolute;
}
.creditsnum {
width: 116rpx;
height: 48rpx;
left: 500rpx;
top: 0rpx;
color: #ff4d49;
font-size: 15rpx;
position: absolute;
}
.gocredits {
width: 23rpx;
height: 23rpx;
left: 523rpx;
top: 288rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/gocredits.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.car {
width: 130rpx;
height: 109rpx;
left: 33rpx;
top: 856rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/car.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build1 {
width: 227rpx;
height: 396rpx;
left: 0rpx;
top: 546rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build1.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build2 {
width: 290rpx;
height: 364rpx;
left: 460rpx;
top: 432rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build2.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build3 {
width: 601rpx;
height: 714rpx;
left: 132rpx;
top: 583rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build3.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build4 {
width: 332rpx;
height: 308rpx;
left: 19rpx;
top: 1061rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build4.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.build5 {
width: 283rpx;
height: 349rpx;
right: 0rpx;
top: 1100rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/build5.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.aibtn {
width: 217rpx;
height: 120rpx;
left: 276rpx;
top: 1101rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/aibtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.gamebtn {
width: 217rpx;
height: 120rpx;
left: 517rpx;
top: 1400rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/gamebtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.guessbtn {
width: 217rpx;
height: 120rpx;
left: 522rpx;
top: 718rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/guessbtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
.shopbtn {
width: 217rpx;
height: 120rpx;
left: 11rpx;
top: 1323rpx;
background: url("https://yun.duiba.com.cn/db_games/jianchun/index/shopbtn.png") no-repeat;
background-position: top left;
background-size: 100% 100%;
position: absolute;
}
\ No newline at end of file
// 线上测试 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 dbDomainPaths = {
// 'online': dbDomains['online'] + "/projectx/p764e268d",
// 'pre': dbDomains['pre'] + "/projectx/p764e268d",
// 'test': dbDomains['test'] + "/projectx/pfebb155c"
// }
// /**小程序接口 */
// export const dbDomain = dbDomains[__env__]
// /**活动接口 */
// export const apiDbDomain = dbDomainPaths[__env__]
// 小程序授权登陆
export const dbLoginParam = {
url: "/weimocloud/wechat/autoLogin", //dbDomain +
method: "POST",
header: {}
}
// 验证用户是否授权过
export const dbCheckHavePower = {
url: "/weimocloud/wechat/loginCheck", //dbDomain +
method: "POST",
header: {}
}
/** 活动首页*/
export const apiCoopIndex = {
url: "/weimocloud/projectx/index", //apiDbDomain +
header: {},
method: "GET"
}
/** 扫码*/
export const apiScan = {
url: "/weimocloud/projectx/scan", //apiDbDomain +
header: {},
method: "GET"
}
// 上传头像数据
export const uploadFile = {
url: "/weimocloud/customActivity/imgUploadUrl",
method: "POST",
header: {
}
}
//保存头像昵称
export const authAvatar = {
url: "/weimocloud/projectx/authAvatar",
method: "GET",
header: {}
}
// weimocloud/projectx/getTicketStatus?ticket=xx&qrcodeSign=xxx
//查询瓶盖码有没有过期
export const getTicketStatus = {
url: "/weimocloud/projectx/getTicketStatus",
method: "GET",
header: {}
}
//获取邀请者头像昵称
export const getShareUserInfo = {
url: "/weimocloud/projectx/getShareUserInfo",
method: "GET",
header: {}
}
//助力
export const doAssist = {
url: "/weimocloud/projectx/doAssist",
method: "GET",
header: {}
}
//获取活动状态
export const getActivityStatus = {
url: "/weimocloud/projectx/getActivityStatus",
method: "GET",
header: {}
}
//轮训查询奖品orderId
export const queryOrderId = {
url: "/weimocloud/projectx/getOrderId",
method: "GET",
header: {}
}
export const userRecord = {
url: "/weimocloud/projectx/userRecord",
method: "GET",
header: {}
}
\ No newline at end of file
// // 线上测试
// export const preEnv = "https://95721.activity-18.m.duiba.com.cn/projectx/p03805f35/index.html?appID=95721"
// export const prodEnv = "https://95721.activity-18.m.duiba.com.cn/projectx/pf892b6a1/index.html?appID=95721"
export const globalData = {
loginToken: "",
indexInfo: {},
wid: ""
}
//正式项目 pc98b8da4
//线上测试 pb4c53264
export const awardUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/myPrize.html?appID=96109"
export const rankUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/rank.html?appID=96109"
export const chanllageUrl = "https://duiba.ioutu.cn/projectx/pc98b8da4/index.html?appID=96109"
export const shopUrl = "/cms_design/index?productInstanceId=13068633342&vid=0&pageid=57840295342"
export const exchangeUrl = "/cms_design/design?productInstanceId=13068633342&vid=0&pageid=58011845342"
export function getUrlParam(name, search) {
let matched = search.split('?')[1]
.match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'));
return search.length ? matched && matched[2] : null;
}
\ No newline at end of file
import requestFun from "./requestFun";
import {
dbLoginParam,
dbCheckHavePower,
apiCoopIndex,
apiScan,
uploadFile,
authAvatar,
getShareUserInfo,
getTicketStatus,
doAssist,
getActivityStatus,
queryOrderId,
userRecord
} from "./dbrequest";
import {
globalData
} from "./globalData";
// 小程序授权登陆
export const reqDbLogin = (param) => {
console.warn("reqDbLogin")
return requestFun({
...dbLoginParam,
data: param
})
};
//查看是否绑定手机号
export const reqDbCheckHavePower = (param) => {
console.log(param)
return requestFun({
...dbCheckHavePower,
// url: `${dbCheckHavePower.url}`,
data: param
})
}
//首页
export const apiDbIndexInfo = (param) => {
param.loginToken = globalData.loginToken
console.log(param)
return requestFun({
...apiCoopIndex,
data: param
})
}
//扫码
export const apiDbScan = (param) => {
param.loginToken = globalData.loginToken
console.log(param)
return requestFun({
...apiScan,
data: param
})
}
//上传头像
export const apiUploadFile = (param) => {
param.loginToken = globalData.loginToken
console.log(param)
return requestFun({
...uploadFile,
data: param
})
}
//授权头像
export const apiAuthAvatar = (param) => {
param.loginToken = globalData.loginToken
return requestFun({
...authAvatar,
data: param
})
}
//查询瓶盖码是否生效
export const apiGetTicketStatus = (param) => {
return requestFun({
...getTicketStatus,
data: param
})
}
//查询邀请者头像昵称
export const apiGetShareUserInfo = (param) => {
// param.loginToken = globalData.loginToken
return requestFun({
...getShareUserInfo,
data: param
})
}
//助力
export const apiDoAssist = (param) => {
param.loginToken = globalData.loginToken
return requestFun({
...doAssist,
data: param
})
}
//查询活动状态
export const apiGetActivityStatus = (param) => {
// param.loginToken = globalData.loginToken
return requestFun({
...getActivityStatus,
data: param
})
}
//轮训查询奖品orderId
export const apiQueryOrderId = (param) => {
param.loginToken = globalData.loginToken
return requestFun({
...queryOrderId,
data: param
})
}
//记录用户进入数据
export const apiUserRecord = (param) => {
return requestFun({
...userRecord,
data: param
})
}
\ No newline at end of file
export const myInfoResp = {
"success": true,
"message": "",
"data": {
"nickName": "xxxxxxx",
"sex": "男",
"avatar": "https://yun.duiba.com.cn/aurora/assets/50c71b9d1f64dc784ab05d310d6308e6da9f6e43.png",
"birthday": "2020-09-30",
"province": "浙江",
"city": "杭州市",
"area": "临安区",
"mobile": "18888888888"
},
"code": ""
}
import {
globalData
} from "./globalData"
const requestFun = async (dataSouce) => {
// wx.showLoading({
// mask: true
// })
console.log(dataSouce, "dataSouce")
return await new Promise((resolve, reject) => {
getApp().getSdk().request({
url: dataSouce.url, // 接口名称相对地址
data: {
...dataSouce.data
}, // 接口所需数据
requestOption: {
header: {
...dataSouce.header,
"cloud-app-id": "612072719085-yxh-login", // 开发者接口所在容器应用的环境域名前缀。配置错误会导致HTTP请求404。
},
method: dataSouce.method
}
}).then(res => {
if (res.code == '90002') {
/**token失效,重新登陆 */
// await login(globalData.wid)
wx.showToast({
title: '获取数据失败,请重新进入吧~',
icon: "none"
})
}
console.warn('收到接口返回值:' + dataSouce.url, res)
resolve(res);
})
})
}
export default requestFun;
const login = async (wid) => {
await new Promise((r) => {
wx.login({
success: ress => {
reqDbLogin({
code: ress.code,
wid
}).then((respp) => {
if (respp) {
globalData.loginToken = encodeURIComponent(respp.data.loginToken)
r(1)
}
})
}
})
})
}
\ No newline at end of file
Page({
data: {
activityId: "",
code: ""
},
onLoad: function (options) {
// // 线上环境使用立减金小程序
// prod: {
// appId: 'wxaff903c88607b2c6',
// ghId: 'gh_04e5a6a3271d',
// path: 'pages/wxCouponWebview/index',
// // 开发:develop 体验:trial 正式版:release
// envVersion: 'release'
// }
const {
url
} = options;
this.setData({
url
})
// console.warn("activityId", activityId, code)
// wx.navigateTo({
// url: "/packages/wm-cloud-db_jump/db_jump/index"
// })
},
jump() {
if (this.data.url) {
wx.navigateToMiniProgram({
appId: 'wxaff903c88607b2c6',
path: `/pages/pureWebview/webview?url=${this.data.url}`,
envVersion: 'release',
success(res) {
// 打开成功
console.warn('0', res)
},
fail(res) {
console.warn('1', res)
}
})
}
},
});
\ No newline at end of file
{
"navigationBarTitleText": "db_jump",
"usingComponents": {
}
}
\ No newline at end of file
<view class="db_jump-container">
<view class="getAwardBtn" bind:tap="jump">前往领取</view>
</view>
\ No newline at end of file
.db_jump-container {}
.getAwardBtn {
width: 300rpx;
height: 30rpx;
text-align: center;
left: 0rpx;
right: 0rpx;
top: 400rpx;
margin: auto;
position: absolute;
}
\ No newline at end of file
// webLogin.js
// 获取应用实例
import {
globalData
} from "../../wm-cloud-db_index/utils/db_api/globalData";
import {
reqDbLogin
} from "../../wm-cloud-db_index/utils/db_api/index";
const app = getApp();
Page({
data: {
shareInfo: {},
isShowBtn: false,
},
onLoad(options) {
this.initWebView(options)
},
async initWebView(options) {
const isNeedLogin = options.isNeedLogin;
let redirectUrl = decodeURIComponent(options.redirect);
console.warn("options.redirect:", redirectUrl)
if (isNeedLogin) {
await new Promise((r) => {
wx.login({
success: res => {
console.warn("code:", res.code)
reqDbLogin({
code: res.code,
redirect: redirectUrl,
wid: globalData.wid
}).then((res) => {
if (res.success) {
globalData.loginToken = res.data.loginToken
// wx.setStorageSync('db_loginToken', res.data.loginToken)
redirectUrl = res.data.redirectUrl
r(1)
}
}).catch(() => {
r(1)
})
}
})
})
}
if (redirectUrl) {
this.setData({
path: redirectUrl,
})
}
},
getMessage(e) {
const {
data
} = e.detail;
console.log(data, "data")
if (data) {
this.setData({
share: data[data.length - 1]
})
}
},
onShareAppMessage: function (options) { //分享
const {
share
} = this.data;
console.warn(share.link, "share.link--------", JSON.stringify(options))
// const shareurl = '/pages/webview/index?redirect=' + encodeURIComponent(share.link);
if (share) {
const shareurl = share.link
return {
title: share.title,
path: shareurl,
imageUrl: share.imgUrl,
success: function (res) {
console.log(res, '成功')
console.info(res + '成功');
// wx.showToast({
// title: '分享成功',
// icon: 'none'
// })
// 转发成功
},
fail: function (res) {
console.log(res + '失败');
// 转发失败
},
complete: function (res) {
// 不管成功失败都会执行
console.log(res, '成功或失败');
}
}
} else {
return {
title: "",
path: "/packages/wm-cloud-db_index/db_index/index",
imageUrl: "https://yun.duiba.com.cn/aurora/assets/bcce6f784bb575d94e9fec4e5ee98f2e7fa1cd85.png",
success: function (res) {
console.log(res, '成功')
console.info(res + '成功');
// wx.showToast({
// title: '分享成功',
// icon: 'none'
// })
// 转发成功
},
fail: function (res) {
console.log(res + '失败');
// 转发失败
},
complete: function (res) {
// 不管成功失败都会执行
console.log(res, '成功或失败');
}
}
}
},
})
\ No newline at end of file
{
"navigationBarTitleText": "",
"usingComponents": {
}
}
\ No newline at end of file
<!-- index.wxml -->
<view class="webcontainer">
<view class="webview">
<web-view src="{{path}}" bindmessage="getMessage"></web-view>
</view>
<!-- <view class="tabContainer">
<tab></tab>
</view> -->
</view>
\ No newline at end of file
/**index.wxss**/
.webcontainer {}
.webcontainer .tabContainer {
width: 750rpx;
height: 207rpx;
bottom: 0rpx;
z-index: 10;
position: fixed;
}
\ No newline at end of file
Page({
})
\ No newline at end of file
{
}
\ No newline at end of file
<view>欢迎使用微盟云小程序定制</view>
\ No newline at end of file
{
"description": "项目配置文件",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"projectname": "test-mini",
"libVersion": "2.11.3",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"miniprogram": {
"list": [
{
"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
}
]
}
},
"bizType": "2",
"appid": "wxed8b470e1f70c476",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
\ No newline at end of file
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "test-mini",
"setting": {
"compileHotReLoad": true
}
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
// import retailApi from './utils/retail.api'
const EXTENDS_PAGE_LIST = [
'pages/goods/detail',
'pages/goods/searchResult/index',
'pages/shop/cart',
'pages/order/create/index',
'pages/order/detail/paidstatus',
'pages/order/detail/detail',
'pages/user/guide/myguide',
'pages/user/membership/index',
'pages/tabbar/goods/list',
'pages/tabbar/goods/classify',
'pages/tabbar/user/center'
]
const { login, loginByPhone } = require('./utils/auth')
const WeimobCore = require('./utils/core')
const request = require('./utils/request')
const { relationChain, userPhone } = require('./utils/paas')
const navigator = require('./utils/navigator')
const retailApi = require('./utils/retail.api')
const { downloadFile } = require('./utils/file')
class WeimobJsSdk {
constructor () {
this.login = login
this.loginByPhone = loginByPhone
this.pages = {}
this.request = request
this.toPage = navigator
this._globalData = {}
this.getRetailData = retailApi // 此处暴露公共数据获取接口
this.relationChain = relationChain // 导购存关系链
this.userPhone = userPhone // 会员注册手机号
this.downloadFile = downloadFile
this.getStoreId = () => 123456 // 获取storeId
this.setStoreId = () => { } // 设置storeId
this.recommendStoreId = () => Promise.resolve({
errcode: '0',
errmsg: '处理成功',
data: {
url: 'https://100000199446.retail.n.weimob.com/saas/retail/100000199446/26051446/shop/store/preprocess',
isNewRetailMode: true,
recommendStoreResultInfo: '',
storeId: 26051446
}
}) // 简易版门店推荐
this.jumpToStoreList = (url) => console.log('真实环境会跳转到门店列表') // 跳转门店列表, url为回跳地址
Object.defineProperty(this, 'page', {
get () {
return this.$getCurrentPage()
}
})
}
$getCurrentPage () {
const pages = getCurrentPages()
const page = pages[pages.length - 1]
if (page) {
if (EXTENDS_PAGE_LIST.indexOf(page.route) >= 0 && !page.core) {
page.core = new WeimobCore(page)
}
return page.core
}
}
$setGlobalData (key, value) {
this._globalData[key] = value
}
$getGlobalData (key) {
return this._globalData[key]
}
}
module.exports = WeimobJsSdk
const tmpComponent = Component
const baseComponent = (option) => {
option = dealLifeTime(option)
option.lifetimes = dealLifeTime(option.lifetimes || {})
if (option.isCreatedAppendData === false && option.lifetimes.isCreatedAppendData === false) {
option.lifetimes.created = function () {
getApp().getSdkSync().then(sdk => {
// 数据传递给自定义组件
getApp().getSdk().page.dependsPush(this)
})
}
}
tmpComponent({ ...option })
}
function dealLifeTime (option) {
option.isCreatedAppendData = false
for (const lifetime in option) {
if (['attached', 'created', 'ready'].includes(lifetime)) {
if (lifetime === 'created') {
option.isCreatedAppendData = true
}
const fnTemp = option[lifetime]
option[lifetime] = function () {
getApp().getSdkSync().then(sdk => {
if (lifetime === 'created') {
getApp().getSdk().page.dependsPush(this)
}
fnTemp.call(this, arguments)
})
}
}
}
return option
}
export default baseComponent
function login () {
return Promise.resolve(true)
}
function loginByPhone () {
return Promise.resolve(true)
}
module.exports = { login, loginByPhone }
class Core {
constructor (page) {
this.functions = {}
this.data = {}
this._watchers = {} // 数据监听集合
this._depends = [] // 页面内的所有自定义组件实例
this._dependsIds = [] // 页面内的自定义组件实例ID。
this.pageId = page.__wxExparserNodeId__
this.allReady = true
}
events () {
return {}
}
emit (event, args) {
try {
const { pageId } = this
return new Promise((resolve, reject) => {
if (this.events()[pageId] && this.events()[pageId][event]) {
return this.events()[pageId][event](args, resolve)
} else {
resolve(args)
}
})
} catch (e) {
return Promise.resolve()
}
}
on (event, args) {
const { pageId } = this
const data = this.events()[pageId] || {}
if (data[event]) {
console.error('该事件已注册,请选择其他事件')
return
}
data[event] = args
this.events = function () {
return {
[pageId]: data
}
}
}
setFunction (funcName, funcBody) {
if (typeof funcName !== 'string') {
console.error('函数名称类型只能为string')
return
}
if (typeof funcBody !== 'function') {
console.error('函数体类型只能为function')
return
}
this.functions[funcName] = funcBody
}
getFunction (functionName) {
if (this.functions[functionName]) { return this.functions[functionName] } else {
console.error('无此方法,请检查方法名')
return null
}
}
setData (key, value) {
if (typeof key !== 'string' && typeof key !== 'number') {
console.error('字段key类型只能为string或者number。异常的key:', key)
return
}
if (key.indexOf('_') === 0) {
console.error('设置数据失败:setData 的 key 不可以以下划线开头。异常的key:', key)
return false
}
// 内部字段不允许设置。
if (['data', 'pageId', 'functions', 'allReady'].includes(key)) {
console.error('设置数据失败:setData 的 key 违法,请使用其他的key。异常的key: ', key)
return false
}
const oldValue = this[key]
this.data[key] = value
// 直接将数据代理到顶级
Object.defineProperty(this, key, {
get () {
return value
}
})
this._update(key, value, oldValue) // 通知观察者去更新数据
}
// 通知回调
_update (key, value, oldValue) {
// 监听数据的事件们回调处理。
this._watchers[key] && this._watchers[key].forEach((cb) => {
cb(value, oldValue)
})
// 通知本页面的各个自定义组件,数据更新。
this._depends.forEach((wx_cxt) => {
wx_cxt.setData({
[key]: value
})
})
}
/**
* 观察数据。依赖收集
* @param {string} name 数据的标识
* @param {function} cb 数据变化时的回调
* @returns {function} 返回取消观察的函数。执行一下即取消了cb的订阅
*/
watch (name, cb) {
if (typeof cb !== 'function') {
console.error('订阅数据变化的回调函数类型异常!', name)
return false
}
this._watchers[name] = this._watchers[name] || []
this._watchers[name].push(cb)
return this._unwatchWait(name, cb)
}
/**
* 取消对 name 数据的 cb 回调观察
* @param {string} name 数据的标识
* @param {function} cb 数据变化时的回调
*/
unwatch (name, cb) {
if (typeof cb === 'function') { // 忽略除了 function 类型之外的第二个参数。
if (this._watchers[name].includes(cb)) {
this._watchers[name].splice(this._watchers[name].indexOf(cb), 1)
} else {
console.error('没有此回调函数,取消订阅数据失败')
}
} else {
this._watchers[name] = [] // 一次性清空全部
}
}
// 取消数据观察的准备器。
_unwatchWait (name, cb) {
return () => {
this.unwatch(name, cb)
}
}
/**
* 收集开发者的所有自定义组件实例
* @param {微信自定义组件实例} wx_cxt
*/
dependsPush (wx_cxt) {
// 判断实例是否已收藏过,只push一次
if (!this._dependsIds.includes(wx_cxt.__wxExparserNodeId__)) {
this._dependsIds.push(wx_cxt.__wxExparserNodeId__)
this._depends.push(wx_cxt)
this.bandDataOnece(wx_cxt) // 立即处理数据
} else {
console.warn('该组件已存在', wx_cxt.__wxExparserNodeId__)
}
}
// 给自定义组件实例添加数据。
bandDataOnece (wx_cxt) {
for (const key in this.data) {
wx_cxt.setData({ [key]: this.data[key] })
}
}
checkReady (cb) {
// let me = this
return new Promise(resolve => {
if (!this.allReady) {
setTimeout(this.checkReady.bind(this, cb || resolve), 0)
} else {
if (cb) {
cb()
} else {
resolve()
}
}
})
}
}
module.exports = Core
const _HOST = 'http://xxx.appdev.weimobcloud.com'
module.exports = {
downloadFile (ops) {
wx.downloadFile({
...ops,
header: {
...ops.header
},
url: _HOST + ops.url
})
}
}
class Navigate {
cleanArray (actual) {
const newArray = []
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i])
}
}
return newArray
}
/**
* 转换queryString
* @returns {*}
*/
toQueryString (params) {
return this.cleanArray(Object.keys(params).map(key => {
if (params[key] === undefined) return ''
return encodeURIComponent(key) + '=' +
encodeURIComponent(params[key])
})).join('&')
}
/**
* 跳转
* @param option
*/
jump (option) {
let url = option.url
if (option.queryString) {
url += '?'
url += option.queryString
}
wx[option.method]({
url: url,
fail () {
if (option.method === 'navigateTo') {
wx.redirectTo({ url: url })
}
}
})
}
/**
* 商详页
* @param {String} method 跳转方式
* @param {Object } query
* @param {String } query.goodsId 商品Id
*/
goodsDetail (method = 'navigateTo', query) {
if (!query) {
console.error('缺少必要参数!')
return
}
if (!query.goodsId) {
console.error('缺少商品Id!')
return
}
const option = {
url: '/pages/goods/detail',
queryString: this.toQueryString(query),
method
}
this.jump(option)
}
/**
* 购物车
* @param {String} method 跳转方式
*/
shopCart (method = 'navigateTo') {
const option = {
url: '/pages/shop/cart',
method
}
this.jump(option)
}
/**
* 个人中心
* @param {String} method 跳转方式
*/
userCenter (method = 'navigateTo') {
console.log('跳转至个人中心,真实环境会跳转')
}
/**
* 订单列表
* @param {String} method 跳转方式
* @param {Object } query
*/
orderList (method = 'navigateTo', query) {
console.log('跳转至订单列表,真实环境会跳转')
}
/**
* 订单详情
* @param {String} method 跳转方式
* @param {Object } query
*/
orderDetail (method = 'navigateTo', query) {
if (!query) {
console.error('缺少必要参数!')
return
}
if (!query.orderNo) {
console.error('缺少orderNo')
return
}
console.log('跳转至订单详情,真实环境会跳转')
}
/**
* 物流详情
* @param {String} method 跳转方式
* @param {Object } query
*/
orderExpress (method = 'navigateTo', query) {
console.log('跳转至物流详情,真实环境会跳转')
}
/**
* 个人信息
* @param {String} method 跳转方式
*/
userSettings (method = 'navigateTo') {
const option = {
url: '/pages/user/member/info',
method
}
this.jump(option)
console.log('跳转至个人信息,真实环境会跳转')
}
/**
* 帐号设置
* @param {String} method 跳转方式
*/
accountSettings (method = 'navigateTo') {
console.log('跳转至帐号设置,真实环境会跳转')
}
/**
* 我的优惠券
* @param {String} method 跳转方式
*/
userCouponList (method = 'navigateTo') {
console.log('跳转至我的优惠券,真实环境会跳转')
}
/**
* 积分商城
* @param {String} method 跳转方式
*/
pointMall (method = 'navigateTo') {
console.log('跳转至积分商城,真实环境会跳转')
}
/**
* 分销中心
* @param {String} method 跳转方式
*/
salesCenter (method = 'navigateTo') {
console.log('跳转至分销中心,真实环境会跳转')
}
/**
* 退款/售后列表
* @param {String} method 跳转方式
*/
refundList (method = 'navigateTo') {
console.log('跳转至退款/售后列表,真实环境会跳转')
}
}
module.exports = new Navigate()
const SYSTEM_PAGE_PATH_LIST = [
'goodsDetail',
'shopCart',
'userCenter',
'orderList',
'orderDetail',
'orderExpress',
'userSettings',
'accountSettings',
'cardPackages',
'userCouponList',
'pointMall',
'salesmanCenter',
'refundList'
]
const navigate = require('./navigate')
/**
*
* @param {Object} option 跳转参数
* @param {string} option.url 跳转地址
* @param {Object} option.query 跳转携带参数
* @param {string} option.method [navigateTo,redirectTo,reLaunch,navigateBack]
*/
module.exports = function (option) {
if (SYSTEM_PAGE_PATH_LIST.indexOf(option.url) < 0) {
console.error('请传入正确的页面标识,支持跳转的页面请参考文档')
return
}
navigate[option.url](option.method, option.query)
}
/**
* 导购-写入导购与用户的关系链
* @options [Object] { "pid":10, "wid":xxxx, "ecBizType":"xxxx", "ecBizTicket":"xxxx" }
* pid 店铺
* wid 用户
* ecBizType 对页面分享链接URL解析后的参数之一
* ecBizTicket 对页面分享链接URL解析后的参数之一
*
* @returns [Promise] {success: true} 返回写入结果
* success [Boolean] true: 写入成功。false:写入失败。
**/
export const relationChain = function (options) {
return new Promise((resolve, reject) => {
if (options) {
return resolve({ success: true })
} else {
return reject({ success: false })
}
})
}
/**
* 会员注册 - 解析微信加密数据的真实手机号
* @options [Object] { encryptedData: 'xxxx', iv:'xxxx' }
* encryptedData 微信授权手机号按钮button组件点击后的回调值。
* iv 微信授权手机号按钮button组件点击后的回调值。
*
* @returns [Promise] {success: true, phone: 123456}
**/
export const userPhone = function ({ encryptedData, iv }) {
return new Promise((resolve, reject) => {
if (encryptedData && iv) {
return resolve({ success: true, phone: 123456 })
} else {
return reject({ success: false })
}
})
}
const __baseURL = 'https://612072719085-yxh-login.app.weimobcloud.com'
//const __baseURL = 'https://612072719085-yxh-login.appdev.weimobcloud.com'
/**
* @method 发送请求
*
* @param {Object} option - 请求配置参数
* @param {string} option.url - 请求路径
* @param {Object} option.data - 请求参数
* @param {Object} option.requestOption - 请求配置(参考wx.request 官方文档 https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html)
*
* @returns {Promise}
*/
module.exports = function (option) {
return new Promise((resolve, reject) => {
option.requestOption = option.requestOption || {}
wx.request({
url: __baseURL + option.url,
method: option.requestOption.method || 'POST',
...option.requestOption,
data: {
wid: '{{wid}}',
...option.data
},
header: {
'content-type': 'application/json',
Accept: 'application/json',
...option.requestOption.header
},
success: (res) => {
if (res.statusCode === 200) {
resolve(res.data)
} else {
reject(res)
}
},
fail: res => {
reject(res)
}
})
})
}
let apiMaps
apiMaps = {
user_base_info: '***',
user_asset_info: '***',
user_card_info: '***',
user_guider_info: '***',
user_coupon_list: '***',
user_coupon_detail: '***',
user_coupon_packagelist: '***',
user_coupon_get: '***',
user_sdp_info: '***',
user_purchase_list: '****',
user_purchase_receive: '****',
wm_app_session: '***'
}
const mockdata = {}
mockdata.user_base_info = {
headurl:
'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epfglCQ1t6rNl6QykTf5nYHQYMcHichHDDxPKhzNrtKIdfEicGbia2h9mRoXKNVNIHb9sHwx1wUicqI7g/132',
homeStoreId: null,
homeStoreName: null,
isMember: false,
nickname: '微大盟',
wid: 10896867013,
appId: 'wxea5b8710073235fd',
openId: 'ok3hN5av9sf97Rb-fIJ5e0t0X_jw'
}
mockdata.user_base_info.sourceObjectList = [{ source: 2, sourceAppId: 'wxea5b8710073235fd', sourceOpenId: 'user-unionId' }, { source: 4, sourceAppId: 'wxea5b8710073235fd', sourceOpenId: '17766778877' }]
mockdata.user_asset_info = {
availableAmount: 100,
availablePoint: 10,
currentAmount: 100,
currentPoint: 10
}
mockdata.user_card_info = {}
mockdata.user_guider_info = {}
mockdata.user_coupon_list = {}
mockdata.user_coupon_detail = {}
mockdata.user_coupon_packagelist = {
pageList: [
{
couponOrigin: 1,
couponPackageId: 1012606,
couponPackageName: '福袋2号',
description: '描述',
sendType: 1,
status: 1,
statusDesc: null,
stock: 0,
useNotice: '嘤嘤嘤',
couponList: [
{
acceptGoodsType: 1,
adaptCurrentStore: true,
alipayCouponTemplateId: null,
alipayMerchantCouponRecommendStatus: null,
applyTradeScene: null,
authWechatMerchant: null,
availableTimeEnd: null,
availableTimeStart: null,
canCashTicket: null,
canGiveFriend: null,
canGoodsNumber: null,
canReceive: null,
canShare: null,
canUseDeductions: null,
canUseDiscounts: null,
canWeimobEdit: null,
cardTemplateId: 1016685,
cashTicketAmt: 11.0,
cashTicketCondition: 1.0,
codeGenerateType: 0,
colorType: null,
condition: null,
couponChannel: null,
couponCost: null,
couponCostType: null,
couponDesc: '',
couponExtraInfo: null,
couponOrigin: 1,
couponScopeList: null,
couponTagList: null,
createAreaCode: null,
createAreaId: null,
createDate: null,
createStoreId: null,
createType: null,
customCodeSetting: null,
detail: '价值11元代金券,满足门槛即可使用',
discount: null,
excludeGoodsIds: null,
existExcludeGoods: false,
expDayCount: null,
expireDate: 1617206399000,
expireDateType: 1,
fromPaas: false,
iconUrl: null,
importGoodsFileName: null,
importGoodsFlag: null,
isAvailable: null,
isEnable: null,
isExpired: null,
isFocusFollow: null,
isSyncWechat: null,
issueChannel: null,
left: 1000,
limitedType: null,
logoUrl: null,
maxCashTicketAmt: null,
maxDiscount: null,
maxDiscountAmount: null,
maxGoodsAmount: null,
maxGoodsNumber: null,
memberTagList: null,
merchantIssueChannels: null,
merchantIssueFlag: null,
merchantName: null,
minCashTicketAmt: null,
minDiscount: null,
minGoodsNumber: null,
name: 'C型1区域',
number: 4,
operatorId: null,
pid: null,
pricingType: null,
publishChannelType: null,
publishChannels: null,
publishCount: 0,
receiveDesc: '每人限领11张',
recommendEndTime: null,
recommendStartTime: null,
redirectType: 0,
scanBuyIssueFlag: null,
sceneList: null,
selectAreaIds: null,
selectStoreIdList: null,
selectStoreRangeType: null,
selectStoreType: 1,
servicePhone: null,
settingVersion: null,
share: null,
sourceMerchantName: null,
startDate: 1616515200000,
startDayCount: null,
status: 6,
stockId: null,
storeId: null,
storeLaunchFlag: null,
storeLimitNum: null,
subCouponType: 1,
subName: null,
syncStatus: null,
textImageList: null,
thirdId: null,
totalCount: 1000,
type: 0,
useChannels: null,
useNotice: '满1元且仅1件可用,'
}
]
}
],
pageNum: 1,
pageSize: 20,
totalCount: 3
}
mockdata.user_coupon_get = {
canReceive: 1, // 用户能否领取 1可领取 2已领取 3已领完)
code: '91904041586615409', // 优惠券券码
state: 1 // 是否领取成功
}
mockdata.user_sdp_info = {}
mockdata.user_purchase_list = {
status: 0, // 0 未领取; 1 已领取; 2 已使用
memberUsedCount: 0, // 会员使用总数
activityId: 12,
purchaseUpper: 2,
purchaseCodeGoodsDTOList: [{
goodsId: 22,
goodsTitle: '商品标题',
defaultImageUrl: 'https://image-c-dev.weimobwmc.com/dev-Omr9/68a90ddf57dd410582a9acca889bcea5.png'
}]
}
mockdata.user_purchase_receive = {
codeValues: ['hN5av3bV97Rb', 'bV97RbhN5av3']
}
mockdata.wm_app_session = {
pid: '3400',
wid: 6353261854,
appid: 'wxea5b8710079835fd',
openid: 'ok3hN5av3bV97Rb-fF9SC7t0X_jw'
}
const init = function (dataflag, option = {}) {
if (!apiMaps[dataflag]) {
console.error('您所查询的接口不存在,请核对后再调用!')
}
return Promise.resolve(mockdata[dataflag])
}
module.exports = init
// export default init;
const sax = require('sax');
const { isUrlRequest, urlToRequest } = require('loader-utils');
const ROOT_TAG_NAME = 'xxx-wxml-root-xxx';
const ROOT_TAG_START = `<${ROOT_TAG_NAME}>`;
const ROOT_TAG_END = `</${ROOT_TAG_NAME}>`;
const isSrc = (name) => name === 'src';
module.exports = function(content) {
const xmlContent = `${ROOT_TAG_START}${content}${ROOT_TAG_END}`;
const parser = sax.parser(false, { lowercase: true });
const requests = [];
const callback = this.async();
const loadModule = (request) =>
new Promise((resolve, reject) => {
this.addDependency(request);
this.loadModule(request, (err, src) => {
if (err) {
reject(err);
}
else {
resolve(src);
}
});
});
parser.onattribute = ({ name, value }) => {
if (
!value ||
!isSrc(name) ||
!isUrlRequest(value) ) {
return
}
const request = urlToRequest(value);
requests.unshift(request);
};
parser.onend = async () => {
try {
for (const req of requests) {
await loadModule(req);
}
callback(null, content);
} catch (err) {
callback(err, content);
}
};
parser.write(xmlContent).close();
return content
};
const fs = require('fs-extra');
const path = require('path');
process.env.NODE_ENV = 'development';
process.env.APP_NAME = 'wsc';
const deleteFolder = function (p) {
fs.removeSync(p);
};
deleteFolder(path.resolve(__dirname, '..', 'dist'));
const path = require("path");
const webpack = require("webpack");
const XappWebpackPlugin = require("xapp-webpack-loader").plugin
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const CopyPlugin = require('copy-webpack-plugin');
const basePath = process.cwd()
console.log('b', basePath)
module.exports = {
mode: 'development',
target: 'node',
devtool: false,
watchOptions: {
ignored: /node_modules/,
poll: 1000
},
entry: path.resolve(basePath, './src/app.json'),
output: {
path: path.resolve(basePath, './dist')
},
resolve: {
alias: {
src: path.resolve(basePath, './src'),
}
},
resolveLoader: {
alias: {
'cache-loader': path.resolve(__dirname, '../node_modules/cache-loader'),
'babel-loader': path.resolve(__dirname, '../node_modules/babel-loader'),
'file-loader': path.resolve(__dirname, '../node_modules/file-loader'),
'xapp-webpack-loader': path.resolve(__dirname, '../node_modules/xapp-webpack-loader'),
}
},
module: {
rules: [
{
test: /\.js$/,
include: path.resolve(basePath, './src'),
exclude: path.resolve(basePath, './node_modules'),
use: [
'cache-loader',
'babel-loader',
],
},
{
test: /.wxml/,
use: [
{
loader: 'file-loader',
options: {
publicPath: '',
context: path.resolve(basePath, './src'),
name: '[path][name].[ext]'
}
},
'xapp-webpack-loader',
]
},
{
test: /\.wxss$/,
use: [
{
loader: 'file-loader',
options: {
publicPath: '',
context: path.resolve(basePath, './src'),
name: '[path][name].[ext]'
}
},
'xapp-webpack-loader',
]
},
{
test: /.wxs$/,
use: [
{
loader: 'file-loader',
options: {
publicPath: '',
context: path.resolve(basePath, './src'),
name: '[path][name].[ext]'
}
},
'babel-loader',
'xapp-webpack-loader',
]
},
{
test: /\.json/,
type: 'javascript/auto',
use: [
{
loader: 'file-loader',
options: {
publicPath: '',
context: path.resolve(basePath, './src'),
name: '[path][name].[ext]'
}
},
'xapp-webpack-loader'
]
},
{
test: /\.(png|jpg|jpeg|gif)$/,
include: /src/,
use: [
{
loader: 'file-loader',
options: {
publicPath: '',
context: path.resolve(basePath, './src'),
name: '[path][name].[ext]'
}
}
]
}
]
},
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
compress: {
drop_console: true
},
output: {
comments: false
}
}
})
],
// minimize: false,
concatenateModules: false,
splitChunks: {
cacheGroups: {
commons: {
test: (module) => !/[\\/]mock[\\/]/.test(module.resource),
name: 'weimob-cloud-commons',
chunks: 'initial',
minSize: 0,
minChunks: 2,
priority: 1,
maxInitialRequests: 10
},
vendors: {
test: module => !module.isEntryModule() && /\.js$/.test(module.resource) && /[\\/]node_modules[\\/]/.test(module.resource),
name: 'weimob-cloud-vendors',
chunks: 'all',
maxInitialRequests: 10,
priority: 1
}
}
}
},
plugins: [
new webpack.DefinePlugin({
PRODUCTION: JSON.stringify(process.env.NODE_ENV === 'production')
}),
new CopyPlugin({
patterns: [
{
from: path.resolve(basePath, './src/sitemap.json'),
to: path.resolve(basePath, './dist/sitemap.json')
}
],
}),
new XappWebpackPlugin({
mainComponentDirs: [
'cloud-components',
'components'
]
})
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment