Commit 0ad21510 authored by wildfirecode13's avatar wildfirecode13

Merge branch 'master' of gitlab2.dui88.com:wanghongyuan/hello_taobao

parents 9c9b815b 03557b49
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/pageshou_ye/pageshou_ye"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
\ No newline at end of file
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../pages/pageshou_ye/pageshou_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagehuo_dong_ye/pagehuo_dong_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagejie_shu_ye/pagejie_shu_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pageju_xing729/pageju_xing729?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
if(!self.__appxInited) {
self.__appxInited = 1;
require('./config$');
var AFAppX = self.AFAppX.getAppContext
? self.AFAppX.getAppContext().AFAppX
: self.AFAppX;
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
function success() {
require('../../app');
require('../../pages/pageshou_ye/pageshou_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagehuo_dong_ye/pagehuo_dong_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagejie_shu_ye/pagejie_shu_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pageju_xing729/pageju_xing729?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const app = getApp();
const { tbcc, cloudName, cloud, requestType } = app;
const { utils: { generateAPI }, request: tbccRequest, capi } = tbcc;
const apicfg_1 = require("./apicfg");
const request = tbccRequest({
cloud,
cloudName,
requestType
});
// api handle 列表
const apiList = Object.assign(Object.assign({}, capi), apicfg_1.default);
// 生成API
const API = generateAPI(apiList, request);
exports.default = API;
//# sourceMappingURL=api.js.map
\ No newline at end of file
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../src/packages/jsx2taobao/template/api/api.js"],"names":[],"mappings":";;AAAA,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;AACrB,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;AAEpD,MAAM,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;AACpE,qCAA8B;AAC9B,MAAM,OAAO,GAAG,WAAW,CAAC;IAC1B,KAAK;IACL,SAAS;IACT,WAAW;CACZ,CAAC,CAAC;AAEH,gBAAgB;AAChB,MAAM,OAAO,mCACR,IAAI,GACJ,gBAAM,CACV,CAAC;AAEF,QAAQ;AACR,MAAM,GAAG,GAAG,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE1C,kBAAe,GAAG,CAAC"}
\ No newline at end of file
let projectId = window.CFG.projectId || '';
const apiCfg = {
getRule:`/projectx/${projectId}/projectRule.query`,
doJoin: {
uri: `/projectx/${projectId}/join.do`,
method: "post"
}
}
export default apiCfg;
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mp_cloud_sdk_1 = require("@tbmp/mp-cloud-sdk");
mp_cloud_sdk_1.default.init({
env: 'test' // 云函数环境 test 测试环境 online 线上环境
});
App({
requestType: 'cloud',
cloudName: '',
cloud: // 主云函数项目名
mp_cloud_sdk_1.default,
activityId: "",
onLaunch(options) {
this.handleQuery(options.query || {});
},
onShow(options) {
// 从后台被 scheme 重新打开
},
/**
* 处理链接参数
* @param {object} query 小程序链接上的参数
*/
handleQuery(query) {
const { activityId } = query;
activityId && (this.activityId = activityId);
}
});
//# sourceMappingURL=app.js.map
\ No newline at end of file
{
"pages": [
"pages/pageshou_ye/pageshou_ye",
"pages/pagehuo_dong_ye/pagehuo_dong_ye",
"pages/pagejie_shu_ye/pagejie_shu_ye",
"pages/pageju_xing729/pageju_xing729",
"pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1"
],
"window": {}
}
\ No newline at end of file
.gong_xi_huo_jiang {
top: 357rpx;
left: 33rpx;
width: 667rpx;
height: 920rpx;
display: block;
position: absolute;
}
.gong_xi_huo_jiang .cha_cha000 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 305rpx;
top: 848rpx;
position: absolute;
}
.gong_xi_huo_jiang .zu139394 {
width: 677rpx;
height: 790rpx;
opacity: 1;
position: absolute;
}
.gong_xi_huo_jiang .gong_xi_ni {
width: 263rpx;
height: 51rpx;
opacity: 1;
left: 210rpx;
top: 67rpx;
position: absolute;
font-size: 24.02943rpx;
color: #ff5835;
}
.gong_xi_huo_jiang .mai_dao_zhong_jiang_lou_ceng_huo_de_yi_xia_jiang_pin {
width: 382rpx;
height: 30rpx;
opacity: 1;
left: 156rpx;
top: 157rpx;
position: absolute;
font-size: 19.90768rpx;
color: #ffffff;
}
.gong_xi_huo_jiang .ke_yi_zai_wo_de_jiang_pin_ye_mian_cha_kan_jiang_pin {
width: 335rpx;
height: 23rpx;
opacity: 1;
left: 175rpx;
top: 574rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ff5835;
}
.gong_xi_huo_jiang .ju_xing88726 {
width: 380rpx;
height: 341rpx;
opacity: 1;
left: 152rpx;
top: 211rpx;
position: absolute;
}
.gong_xi_huo_jiang .an_niu_kao_bei3 {
width: 337rpx;
height: 104rpx;
opacity: 1;
left: 173rpx;
top: 630rpx;
position: absolute;
}
<view class="gong_xi_huo_jiang">
<image class="cha_cha000" src={{resList['3ec90532-9a2c-4fc0-8ee1-ce8477937c3e'].url}} />
<image class="zu139394" src={{resList['4e8f011b-2b06-457a-82eb-d0948aeb4587'].url}} />
<label class="gong_xi_ni">恭喜你</label>
<label class="mai_dao_zhong_jiang_lou_ceng_huo_de_yi_xia_jiang_pin">买到中奖楼层 获得以下奖品</label>
<label class="ke_yi_zai_wo_de_jiang_pin_ye_mian_cha_kan_jiang_pin">可以在「我的奖品」页面查看奖品</label>
<image class="ju_xing88726" src={{resList['c8a9cedc-70da-4d6f-8f92-c3b592e08c63'].url}} />
<image class="an_niu_kao_bei3" src={{resList['228b7afa-96aa-4091-8fc3-44dd60a72939'].url}} />
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.gou_mai_ji_lu {
top: 357rpx;
left: 0rpx;
width: 729rpx;
height: 920rpx;
display: block;
position: absolute;
}
.gou_mai_ji_lu .cha_cha102 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 338rpx;
top: 848rpx;
position: absolute;
}
.gou_mai_ji_lu .zu139123 {
width: 677rpx;
height: 790rpx;
opacity: 1;
left: 33rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 {
width: 729rpx;
height: 646rpx;
opacity: 1;
top: 69rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .ju_xing705_kao_bei45 {
width: 621rpx;
height: 580rpx;
opacity: 1;
left: 64rpx;
top: 66rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .ju_xing721 {
width: 729rpx;
height: 47rpx;
opacity: 1;
top: 92rpx;
position: absolute;
background-color: #0f395f;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .yuan_jiao_ju_xing71744 {
width: 15rpx;
height: 73rpx;
opacity: 1;
left: 675rpx;
top: 155rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 {
width: 476rpx;
height: 346rpx;
opacity: 1;
left: 126rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 {
width: 453rpx;
height: 183rpx;
opacity: 1;
top: 163rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng09_yue15_ri43 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng10012042 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 1rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng10012041 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 44rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng10012040 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 84rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng20039 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 1rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng20038 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 44rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng20037 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 84rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng09_yue15_ri36 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 41rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng09_yue15_ri35 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 81rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng100120_kao_bei4 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 124rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng200_kao_bei4 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 124rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng09_yue15_ri_kao_bei4 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 121rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng100120_kao_bei5 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 165rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng200_kao_bei5 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 165rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu13434 .tu_ceng09_yue15_ri_kao_bei5 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 162rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu133 {
width: 444rpx;
height: 22rpx;
opacity: 1;
left: 32rpx;
top: 104rpx;
position: absolute;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu133 .ri_qi {
width: 38rpx;
height: 21rpx;
opacity: 1;
top: 1rpx;
position: absolute;
font-size: 13.68653rpx;
color: #f89534;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu133 .lou_ceng {
width: 41rpx;
height: 20rpx;
opacity: 1;
left: 195rpx;
top: 1rpx;
position: absolute;
font-size: 13.68653rpx;
color: #f89534;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .zu133 .xiao_hao_ji_fen {
width: 84rpx;
height: 22rpx;
opacity: 1;
left: 360rpx;
position: absolute;
font-size: 13.68653rpx;
color: #f89534;
}
.gou_mai_ji_lu .gou_mai_ji_lu_kao_bei33 .zu135 .wo_de_gou_mai_ji_lu {
width: 270rpx;
height: 35rpx;
opacity: 1;
left: 114rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ffffff;
top: 0rpx;
transform-origin: 0rpx 0rpx 0rpx;
}
<view class="gou_mai_ji_lu">
<image class="cha_cha102" src={{resList['3ec90532-9a2c-4fc0-8ee1-ce8477937c3e'].url}} />
<image class="zu139123" src={{resList['67074958-8231-4f79-a860-454e3bfd8d04'].url}} />
<view class="gou_mai_ji_lu_kao_bei33">
<image class="ju_xing705_kao_bei45" src={{resList['dc93cdcd-b823-436f-a844-9c785b24bab5'].url}} />
<view class="ju_xing721" />
<image class="yuan_jiao_ju_xing71744" src={{resList['d2226a56-df2a-4685-b008-c284a56f75ae'].url}} />
<view class="zu135">
<view class="zu13434">
<label class="tu_ceng09_yue15_ri43">09 月 15日</label>
<label class="tu_ceng10012042">100-120</label>
<label class="tu_ceng10012041">100-120</label>
<label class="tu_ceng10012040">100-120</label>
<label class="tu_ceng20039">200</label>
<label class="tu_ceng20038">200</label>
<label class="tu_ceng20037">200</label>
<label class="tu_ceng09_yue15_ri36">09 月 15日</label>
<label class="tu_ceng09_yue15_ri35">09 月 15日</label>
<label class="tu_ceng100120_kao_bei4">100-120</label>
<label class="tu_ceng200_kao_bei4">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei4">09 月 15日</label>
<label class="tu_ceng100120_kao_bei5">100-120</label>
<label class="tu_ceng200_kao_bei5">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei5">09 月 15日</label>
</view>
<view class="zu133">
<label class="ri_qi">日期</label>
<label class="lou_ceng">楼层</label>
<label class="xiao_hao_ji_fen">消耗积分</label>
</view>
<label class="wo_de_gou_mai_ji_lu"> 我的购买记录 </label>
</view>
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.hen_yi_han {
top: 360rpx;
left: 40rpx;
width: 670rpx;
height: 829rpx;
display: block;
position: absolute;
}
.hen_yi_han .cha_cha0 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 298rpx;
top: 757rpx;
position: absolute;
}
.hen_yi_han .zu142 {
width: 670rpx;
height: 613rpx;
opacity: 1;
position: absolute;
display: block;
}
.hen_yi_han .hen_yi_han25 {
width: 157rpx;
height: 53rpx;
opacity: 1;
left: 256rpx;
top: 56rpx;
position: absolute;
font-size: 24.02943rpx;
color: #b8b8b8;
}
.hen_yi_han .ju_xing88724 {
width: 423rpx;
height: 240rpx;
opacity: 1;
left: 124rpx;
top: 162rpx;
position: absolute;
}
.hen_yi_han .lou_ceng_bu_man100_ceng_zan_bu_kai_jiang {
width: 351rpx;
height: 31rpx;
opacity: 1;
left: 159rpx;
top: 233rpx;
position: absolute;
font-size: 19.90768rpx;
color: #ffffff;
}
.hen_yi_han .xia_ci_zai_lai_ba {
width: 173rpx;
height: 30rpx;
opacity: 1;
left: 246rpx;
top: 290rpx;
position: absolute;
font-size: 19.90768rpx;
color: #ffffff;
}
.hen_yi_han .wei_mai_dao_zhong_jiang_lou_ceng {
width: 209rpx;
height: 30rpx;
opacity: 1;
left: 230rpx;
top: 233rpx;
position: absolute;
font-size: 19.90768rpx;
color: #ffffff;
}
.hen_yi_han .yu_da_jiang_ca_jian_er_guo {
width: 210rpx;
height: 30rpx;
opacity: 1;
left: 230rpx;
top: 290rpx;
position: absolute;
font-size: 19.90768rpx;
color: #ffffff;
}
.hen_yi_han .an_niu30 {
width: 337rpx;
height: 104rpx;
opacity: 1;
left: 166rpx;
top: 459rpx;
position: absolute;
}
<view class="hen_yi_han">
<image class="cha_cha0" src={{resList['3ec90532-9a2c-4fc0-8ee1-ce8477937c3e'].url}} />
<image class="zu142" src={{resList['6d2c2e85-a8f6-4c64-99a2-8a9961613478'].url}} />
<label class="hen_yi_han25">很遗憾</label>
<image class="ju_xing88724" src={{resList['8f0d0cca-228e-49f1-875a-8bf3a807508f'].url}} />
<label class="lou_ceng_bu_man100_ceng_zan_bu_kai_jiang">楼层不满100层,暂不开奖</label>
<label class="xia_ci_zai_lai_ba">下次再来吧~</label>
<label class="wei_mai_dao_zhong_jiang_lou_ceng">未买到中奖楼层</label>
<label class="yu_da_jiang_ca_jian_er_guo">与大奖擦肩而过</label>
<image class="an_niu30" src={{resList['a908581a-baba-45ea-ae03-5bfc388fe079'].url}} />
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.hui_yuan {
top: 392rpx;
left: 39rpx;
width: 670rpx;
height: 755rpx;
display: block;
position: absolute;
}
.hui_yuan .cha_cha4582 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 299rpx;
top: 683rpx;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .bei_jing1 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .nin_shi_zhu_ce_hui_yuan {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 43rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen22 {
width: 376rpx;
height: 91rpx;
opacity: 1;
left: 113rpx;
top: 159rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .ps_mei_ceng_lou50_ji_fen {
width: 192rpx;
height: 25rpx;
opacity: 1;
left: 205rpx;
top: 271rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .lan_qia_hui_yuan {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .lan_qia_hui_yuan .bei_jing2 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .lan_qia_hui_yuan .nin_shi_lan_qia_hui_yuan {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.hui_yuan .hui_yuan_deng_ji .lan_qia_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei {
width: 376rpx;
height: 91rpx;
opacity: 1;
left: 113rpx;
top: 159rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .lan_qia_hui_yuan .ps_mei_ceng_lou40_ji_fen {
width: 192rpx;
height: 25rpx;
opacity: 1;
left: 205rpx;
top: 271rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .hong_qia_hui_yuan {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .hong_qia_hui_yuan .bei_jing3 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .hong_qia_hui_yuan .nin_shi_hong_qia_hui_yuan {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.hui_yuan .hui_yuan_deng_ji .hong_qia_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei2 {
width: 376rpx;
height: 91rpx;
opacity: 1;
left: 113rpx;
top: 159rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .hong_qia_hui_yuan .ps_mei_ceng_lou30_ji_fen {
width: 192rpx;
height: 25rpx;
opacity: 1;
left: 205rpx;
top: 271rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan .bei_jing4 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan .nin_shi_bo_qia_hui_yuan {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei3 {
width: 376rpx;
height: 91rpx;
opacity: 1;
left: 113rpx;
top: 159rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan .ps_mei_ceng_lou20_ji_fen {
width: 192rpx;
height: 25rpx;
opacity: 1;
left: 205rpx;
top: 271rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffa93a;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .bei_jing5 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .nin_shi_hei_qia_hui_yuan {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen21 {
width: 376rpx;
height: 91rpx;
opacity: 1;
left: 113rpx;
top: 159rpx;
position: absolute;
font-size: 22.39614rpx;
color: #f48c37;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .ps_mei_ceng_lou10_ji_fen {
width: 192rpx;
height: 25rpx;
opacity: 1;
left: 205rpx;
top: 271rpx;
position: absolute;
font-size: 14.93076rpx;
color: #f48c37;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .xu_yao_xiao_hao10n_ge_ji_fen {
width: 237rpx;
height: 93rpx;
opacity: 1;
left: 219rpx;
top: 174rpx;
position: absolute;
font-size: 22.39614rpx;
color: #ff923a;
}
.hui_yuan .an_niu7 {
width: 563rpx;
height: 99rpx;
opacity: 1;
left: 53rpx;
top: 365rpx;
position: absolute;
}
.hui_yuan .an_niu7 .an_niu66 {
width: 267rpx;
height: 99rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .an_niu7 .an_niu_kao_bei2 {
width: 268rpx;
height: 99rpx;
opacity: 1;
left: 295rpx;
position: absolute;
}
<view class="hui_yuan">
<image class="cha_cha4582" src={{resList['3ec90532-9a2c-4fc0-8ee1-ce8477937c3e'].url}} />
<view class="hui_yuan_deng_ji">
<view class="zhu_ce_hui_yuan">
<image class="bei_jing1" src={{resList['cee7f34c-4202-4a6d-90be-91720e869515'].url}} />
<label class="nin_shi_zhu_ce_hui_yuan">- 您是注册会员 - </label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen22">
购买 XXX 个楼层 一共需要花费 XXXX 积分
</label>
<label class="ps_mei_ceng_lou50_ji_fen">(PS:每层楼50积分)</label>
</view>
<view class="lan_qia_hui_yuan">
<image class="bei_jing2" src={{resList['42ee07fd-8804-4a03-923b-ef168f4f7f61'].url}} />
<label class="nin_shi_lan_qia_hui_yuan">- 您是蓝卡会员 - </label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei">
购买 XXX 个楼层 一共需要花费 XXXX 积分
</label>
<label class="ps_mei_ceng_lou40_ji_fen">(PS:每层楼40积分)</label>
</view>
<view class="hong_qia_hui_yuan">
<image class="bei_jing3" src={{resList['99a3a97c-d183-4302-a049-f426084e1c3a'].url}} />
<label class="nin_shi_hong_qia_hui_yuan">- 您是红卡会员 - </label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei2">
购买 XXX 个楼层 一共需要花费 XXXX 积分
</label>
<label class="ps_mei_ceng_lou30_ji_fen">(PS:每层楼30积分)</label>
</view>
<view class="bo_qia_hui_yuan">
<image class="bei_jing4" src={{resList['4698ed3c-e8aa-46b9-bfaa-74d62680c611'].url}} />
<label class="nin_shi_bo_qia_hui_yuan">- 您是铂卡会员 - </label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen_kao_bei3">
购买 XXX 个楼层 一共需要花费 XXXX 积分
</label>
<label class="ps_mei_ceng_lou20_ji_fen">(PS:每层楼20积分)</label>
</view>
<view class="hei_qia_hui_yuan">
<image class="bei_jing5" src={{resList['1dc2fdae-63ee-47a3-8ebe-d62a72b2ec50'].url}} />
<label class="nin_shi_hei_qia_hui_yuan">- 您是黑卡会员 - </label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen21">
购买 XXX 个楼层 一共需要花费 XXXX 积分
</label>
<label class="ps_mei_ceng_lou10_ji_fen">(PS:每层楼10积分)</label>
<label class="xu_yao_xiao_hao10n_ge_ji_fen">需要消耗 10*N 个积分</label>
</view>
</view>
<view class="an_niu7">
<image class="an_niu66" src={{resList['15f203ae-833c-4378-98ea-597b62966f57'].url}} />
<image class="an_niu_kao_bei2" src={{resList['eb2523d2-da85-424a-9a33-ff99ef1075be'].url}} />
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.you_xi_gui_ze {
top: 357rpx;
left: 33rpx;
width: 667rpx;
height: 920rpx;
display: block;
position: absolute;
}
.you_xi_gui_ze .cha_cha123 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 305rpx;
top: 848rpx;
position: absolute;
}
.you_xi_gui_ze .zu13974 {
width: 677rpx;
height: 790rpx;
opacity: 1;
position: absolute;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 {
width: 626rpx;
height: 645rpx;
opacity: 1;
left: 31rpx;
top: 70rpx;
position: absolute;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 .ju_xing705_kao_bei31 {
width: 621rpx;
height: 580rpx;
opacity: 1;
top: 65rpx;
position: absolute;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 .yuan_jiao_ju_xing71730 {
width: 15rpx;
height: 73rpx;
opacity: 1;
left: 611rpx;
top: 91rpx;
position: absolute;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 .wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen {
width: 565rpx;
height: 491rpx;
opacity: 1;
left: 29rpx;
top: 101rpx;
position: absolute;
font-size: 24rpx;
color: #ffffff;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 .zu1357 {
width: 202rpx;
height: 34rpx;
opacity: 1;
left: 210rpx;
position: absolute;
}
.you_xi_gui_ze .gou_mai_ji_lu_kao_bei28 .zu1357 .you_xi_gui_ze29 {
width: 202rpx;
height: 34rpx;
opacity: 1;
position: absolute;
font-size: 22.39614rpx;
color: #ffffff;
}
<view class="you_xi_gui_ze">
<image class="cha_cha123" src={{resList['3ec90532-9a2c-4fc0-8ee1-ce8477937c3e'].url}} />
<image class="zu13974" src={{resList['67074958-8231-4f79-a860-454e3bfd8d04'].url}} />
<view class="gou_mai_ji_lu_kao_bei28">
<image class="ju_xing705_kao_bei31" src={{resList['dc93cdcd-b823-436f-a844-9c785b24bab5'].url}} />
<image class="yuan_jiao_ju_xing71730" src={{resList['d2226a56-df2a-4685-b008-c284a56f75ae'].url}} />
<label class="wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen_an_wen">
文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案
</label>
<view class="zu1357">
<label class="you_xi_gui_ze29">游戏规则</label>
</view>
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
export const POP_TYPE={
RULES:'rules'
}
\ No newline at end of file
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.cloud={})}(this,function(t){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function e(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}function p(t,a,s,c){return new(s=s||Promise)(function(n,e){function r(t){try{i(c.next(t))}catch(t){e(t)}}function o(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,o)}i((c=c.apply(t,a||[])).next())})}function k(n,r){var o,i,a,t,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=2&e[0]?i.return:e[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,e[1])).done)return a;switch(i=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,i=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){s.label=e[1];break}if(6===e[0]&&s.label<a[1]){s.label=a[1],a=e;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(e);break}a[2]&&s.ops.pop(),s.trys.pop();continue}e=r.call(n,s)}catch(t){e=[6,t],i=0}finally{o=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function o(){return function(t,e,n){var l=n.value;n.value=function(t){var e,n=t||{},r=n.success,o=void 0===r?null:r,i=n.fail,a=void 0===i?null:i,s=n.complete,c=void 0===s?null:s,u=!c&&!a&&!o;try{e=l.apply(this,arguments)}catch(t){return u?Promise.reject(t):(a&&a(t),void(c&&c(t)))}if(e=e.then?e:Promise.resolve(e),u)return e;e.then(function(t){try{o&&o(t),c&&c(t)}catch(t){throw t}}).catch(function(t){a&&a(t),c&&c(t)})}}}function T(t,e,n){Array.isArray(e)||(e=e.split("."));var r=e.reduce(function(t,e){return t?t[e]:null},t);return n?r||n:r}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var d,a,s=i(function(t,e){var n;t.exports=(n=n||function(l){var n=Object.create||function(t){var e;return r.prototype=t,e=new r,r.prototype=null,e};function r(){}var t={},e=t.lib={},o=e.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},p=e.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=l.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e,n=[],r=function(e){e=e;var n=987654321,r=4294967295;return function(){var t=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return t/=4294967296,(t+=.5)*(.5<l.random()?1:-1)}},o=0;o<t;o+=4){var i=r(4294967296*(e||l.random()));e=987654071*i(),n.push(4294967296*i()|0)}return new p.init(n,t)}}),i=t.enc={},a=i.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new p.init(n,e/2)}},s=i.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new p.init(n,e)}},c=i.Utf8={stringify:function(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return s.parse(unescape(encodeURIComponent(t)))}},u=e.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,r=e.sigBytes,o=this.blockSize,i=r/(4*o),a=(i=t?l.ceil(i):l.max((0|i)-this._minBufferSize,0))*o,s=l.min(4*a,r);if(a){for(var c=0;c<a;c+=o)this._doProcessBlock(n,c);var u=n.splice(0,a);e.sigBytes-=s}return new p.init(u,s)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),d=(e.Hasher=u.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(t,e){return new n.init(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return new d.HMAC.init(n,e).finalize(t)}}}),t.algo={});return t}(Math),n)}),c=(i(function(t,e){var c;t.exports=(c=s,function(o){var t=c,e=t.lib,n=e.WordArray,r=e.Hasher,i=t.algo,a=[],g=[];!function(){function t(t){for(var e=o.sqrt(t),n=2;n<=e;n++)if(!(t%n))return;return 1}function e(t){return 4294967296*(t-(0|t))|0}for(var n=2,r=0;r<64;)t(n)&&(r<8&&(a[r]=e(o.pow(n,.5))),g[r]=e(o.pow(n,1/3)),r++),n++}();var b=[],s=i.SHA256=r.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],p=0;p<64;p++){if(p<16)b[p]=0|t[e+p];else{var d=b[p-15],h=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,f=b[p-2],v=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;b[p]=h+b[p-7]+v+b[p-16]}var y=r&o^r&i^o&i,m=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=l+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&u)+g[p]+b[p];l=u,u=c,c=s,s=a+w|0,a=i,i=o,o=r,r=w+(m+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+u|0,n[7]=n[7]+l|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(64+r>>>9<<4)]=o.floor(n/4294967296),e[15+(64+r>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA256=r._createHelper(s),t.HmacSHA256=r._createHmacHelper(s)}(Math),c.SHA256)}),i(function(t,e){var n;t.exports=(n=s,void function(){var t=n.lib.Base,u=n.enc.Utf8;n.algo.HMAC=t.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=u.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),i=this._iKey=e.clone(),a=o.words,s=i.words,c=0;c<n;c++)a[c]^=1549556828,s[c]^=909522486;o.sigBytes=i.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})}())}),i(function(t,e){t.exports=s.HmacSHA256})),u=i(function(t,e){var n;t.exports=(n=s,function(){var c=n.lib.WordArray;n.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var i=n.charAt(64);if(i){var a=t.indexOf(i);-1!==a&&(e=a)}return function(t,e,n){for(var r=[],o=0,i=0;i<e;i++)if(i%4){var a=n[t.charCodeAt(i-1)]<<i%4*2,s=n[t.charCodeAt(i)]>>>6-i%4*2;r[o>>>2]|=(a|s)<<24-o%4*8,o++}return c.create(r,o)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)}),l=i(function(t,e){var a;t.exports=(a=s,function(l){var t=a,e=t.lib,n=e.WordArray,r=e.Hasher,o=t.algo,S=[];!function(){for(var t=0;t<64;t++)S[t]=4294967296*l.abs(l.sin(t+1))|0}();var i=o.MD5=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,o=t[r];t[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,a=t[e+0],s=t[e+1],c=t[e+2],u=t[e+3],l=t[e+4],p=t[e+5],d=t[e+6],h=t[e+7],f=t[e+8],v=t[e+9],y=t[e+10],m=t[e+11],w=t[e+12],g=t[e+13],b=t[e+14],_=t[e+15],A=i[0],x=i[1],q=i[2],R=i[3];A=k(A,x,q,R,a,7,S[0]),R=k(R,A,x,q,s,12,S[1]),q=k(q,R,A,x,c,17,S[2]),x=k(x,q,R,A,u,22,S[3]),A=k(A,x,q,R,l,7,S[4]),R=k(R,A,x,q,p,12,S[5]),q=k(q,R,A,x,d,17,S[6]),x=k(x,q,R,A,h,22,S[7]),A=k(A,x,q,R,f,7,S[8]),R=k(R,A,x,q,v,12,S[9]),q=k(q,R,A,x,y,17,S[10]),x=k(x,q,R,A,m,22,S[11]),A=k(A,x,q,R,w,7,S[12]),R=k(R,A,x,q,g,12,S[13]),q=k(q,R,A,x,b,17,S[14]),A=T(A,x=k(x,q,R,A,_,22,S[15]),q,R,s,5,S[16]),R=T(R,A,x,q,d,9,S[17]),q=T(q,R,A,x,m,14,S[18]),x=T(x,q,R,A,a,20,S[19]),A=T(A,x,q,R,p,5,S[20]),R=T(R,A,x,q,y,9,S[21]),q=T(q,R,A,x,_,14,S[22]),x=T(x,q,R,A,l,20,S[23]),A=T(A,x,q,R,v,5,S[24]),R=T(R,A,x,q,b,9,S[25]),q=T(q,R,A,x,u,14,S[26]),x=T(x,q,R,A,f,20,S[27]),A=T(A,x,q,R,g,5,S[28]),R=T(R,A,x,q,c,9,S[29]),q=T(q,R,A,x,h,14,S[30]),A=M(A,x=T(x,q,R,A,w,20,S[31]),q,R,p,4,S[32]),R=M(R,A,x,q,f,11,S[33]),q=M(q,R,A,x,m,16,S[34]),x=M(x,q,R,A,b,23,S[35]),A=M(A,x,q,R,s,4,S[36]),R=M(R,A,x,q,l,11,S[37]),q=M(q,R,A,x,h,16,S[38]),x=M(x,q,R,A,y,23,S[39]),A=M(A,x,q,R,g,4,S[40]),R=M(R,A,x,q,a,11,S[41]),q=M(q,R,A,x,u,16,S[42]),x=M(x,q,R,A,d,23,S[43]),A=M(A,x,q,R,v,4,S[44]),R=M(R,A,x,q,w,11,S[45]),q=M(q,R,A,x,_,16,S[46]),A=E(A,x=M(x,q,R,A,c,23,S[47]),q,R,a,6,S[48]),R=E(R,A,x,q,h,10,S[49]),q=E(q,R,A,x,b,15,S[50]),x=E(x,q,R,A,p,21,S[51]),A=E(A,x,q,R,w,6,S[52]),R=E(R,A,x,q,u,10,S[53]),q=E(q,R,A,x,y,15,S[54]),x=E(x,q,R,A,s,21,S[55]),A=E(A,x,q,R,f,6,S[56]),R=E(R,A,x,q,_,10,S[57]),q=E(q,R,A,x,d,15,S[58]),x=E(x,q,R,A,g,21,S[59]),A=E(A,x,q,R,l,6,S[60]),R=E(R,A,x,q,m,10,S[61]),q=E(q,R,A,x,c,15,S[62]),x=E(x,q,R,A,v,21,S[63]),i[0]=i[0]+A|0,i[1]=i[1]+x|0,i[2]=i[2]+q|0,i[3]=i[3]+R|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32;var o=l.floor(n/4294967296),i=n;e[15+(64+r>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[14+(64+r>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,s=a.words,c=0;c<4;c++){var u=s[c];s[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function k(t,e,n,r,o,i,a){var s=t+(e&n|~e&r)+o+a;return(s<<i|s>>>32-i)+e}function T(t,e,n,r,o,i,a){var s=t+(e&r|n&~r)+o+a;return(s<<i|s>>>32-i)+e}function M(t,e,n,r,o,i,a){var s=t+(e^n^r)+o+a;return(s<<i|s>>>32-i)+e}function E(t,e,n,r,o,i,a){var s=t+(n^(e|~r))+o+a;return(s<<i|s>>>32-i)+e}t.MD5=r._createHelper(i),t.HmacMD5=r._createHmacHelper(i)}(Math),a.MD5)});(a=d=d||{})[a.MTOP=1]="MTOP",a[a.MY=2]="MY",a[a.GATEWAY=3]="GATEWAY";var f,v=(e(y,f=Error),y);function y(){return null!==f&&f.apply(this,arguments)||this}function m(t){this.options=t||{},this.options.dataProxyGatewayUrl=this.options.dataProxyGatewayUrl||this.options.gatewayUrl}var w=(g.prototype.init=function(e,n){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return this.options=h({},e),this.proxy=n,this.tasks=[],this.inited=!0,[4,this.listenNetworkChange()];case 1:return t.sent(),this.flushGatewayRequestQueue(),this.pauseExecTask=!1,[2]}})})},g.prototype.listenNetworkChange=function(){return p(this,void 0,void 0,function(){var e,n=this;return k(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.exec({url:"my.getNetworkType"})];case 1:return e=t.sent(),this.networkType=e.networkType,window.my&&window.my.onNetworkStatusChange&&window.my.onNetworkStatusChange(function(t){t&&t.networkType&&(n.networkType=t.networkType)}),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})})},g.getRequestType=function(t){return 0===t.indexOf("mtop.")?d.MTOP:0===t.indexOf("my.")?d.MY:d.GATEWAY},g.prototype.verifyResponse=function(e,n,r){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(T(r,"mc-code")||T(e,"errCode")||T(e,"error_response.code"),n.__is_retry_task__)return this.tryThrowError(e,r),[2,e];t.label=1;case 1:return t.trys.push([1,3,,4]),this.tryThrowError(e,r),[2,e];case 2:return[2,t.sent()];case 3:throw t.sent();case 4:return[2]}})})},g.prototype.tryThrowError=function(t,e){var n=T(e,"mc-msg")||T(t,"errMsg")||T(t,"error_response.msg"),r=T(e,"mc-code")||T(t,"errCode")||T(t,"error_response.code");if(r&&"200"!=r){var o=new v(r+":::"+n);throw o.code=r,o.msg=n,o}},g.prototype.sendGatewayRequest=function(r){return p(this,void 0,void 0,function(){var e,n=this;return k(this,function(t){switch(t.label){case 0:return this.pauseExecTask?[2,new Promise(function(t,e){n.tasks.push({detail:r,success:t,fail:e})})]:[3,1];case 1:return r=this.createGatewayRequest(r),[4,this.proxy.apply(h({},r),d.GATEWAY)];case 2:return e=t.sent(),[4,this.verifyResponse(T(e,"data"),r,T(e,"headers"))];case 3:return[2,t.sent()]}})})},g.prototype.flushGatewayRequestQueue=function(o){var i=this;void 0===o&&(o=!1),this.tasks.forEach(function(t){var e=t.detail,n=t.success,r=t.fail;if(o)return r("初始化失败");i.exec(e,d.GATEWAY).then(n).catch(r)}),this.tasks=[]},g.prototype.exec=function(e,n){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(n=n||g.getRequestType(e.url),!this.inited)throw new Error("请先调用cloud.init()");return n!==d.GATEWAY?[3,2]:[4,this.sendGatewayRequest(e)];case 1:return[2,t.sent()];case 2:return[4,this.proxy.apply(e,n)];case 3:return[2,t.sent()]}})})},g.prototype.getHttpRequestSign=function(t,e,n,r,o){if(this.options.signSecret){var i=o;delete r["mc-sign"];var a=e+"\n"+u.stringify(l(i))+"\napplication/json\n"+Object.keys(r).filter(function(t){return/^mc-/.test(t)}).sort().map(function(t){return t.toLowerCase()+":"+r[t]}).join("\n")+"\n"+t+(n?"?"+n:"");return u.stringify(c(a,this.options.signSecret))}},g.prototype.createGatewayRequest=function(t){var e=this.options,n=e.sessionKey,r=e.appKey,o=e.requestId,i=e.miniappId,a=e.openId,s=e.unionId,c=e.cloudId;t.method="POST";var u=h(h({},t.headers),{"Content-Type":"application/json","mc-timestamp":""+Date.now(),"mc-session":n});a&&(u["mc-open-id"]=a),c&&(u["mc-cloud-id"]=c),s&&(u["mc-union-id"]=s),r&&(u["mc-appKey"]=r),i&&(u["mc-miniapp-id"]=i),o&&(u["mc-request-id"]=o),t.env&&(u["mc-env"]=t.env),this.networkType&&(u["mc-network"]=this.networkType),u["mc-session"]||delete u["mc-session"],t.rawData=t.rawData||t.data,"object"==typeof t.data&&(t.data=JSON.stringify(t.data));var l=this.getHttpRequestSign(t.url,t.method,"",u,t.data);return h(h({},t),{url:""+t.url,headers:h(h({},u),{sign:l,"eagleeye-traceid":o})})},g);function g(){this.inited=!1,this.pauseExecTask=!1}function b(t,e){this.request=e,this.options=t}new w;var _,A=(e(x,_=b),x.prototype.invoke=function(e,n,r,o){return void 0===r&&(r="main"),p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.fcRequest({fcName:e,handler:r,data:n,options:o})];case 1:return[2,t.sent()]}})})},x.prototype.fcRequest=function(e){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.request.exec({env:this.options.env||"online",url:"fc",data:e},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],x.prototype,"invoke",null),x);function x(){return null!==_&&_.apply(this,arguments)||this}var q,M="mtop.taobao.miniapp.cloud.store.config.v2.get",E="mtop.taobao.miniapp.cloud.store.config.v2.seller.get",O="mtop.taobao.miniapp.cloud.store.file.v2.save",P="mtop.taobao.miniapp.cloud.store.file.v2.seller.save",R="mtop.taobao.miniapp.cloud.store.file.v2.delete",S="mtop.taobao.miniapp.cloud.store.file.v2.seller.delete",I="mtop.taobao.miniapp.cloud.store.file.v2.list",B="mtop.taobao.miniapp.cloud.store.file.v2.seller.list",H="other",C=(e(D,q=b),D.prototype.parseUploadResult=function(t,e){return this.parsePostUploadResult(t,e)},D.prototype.parsePostUploadResult=function(t,e){var n,r,o;try{var i=JSON.parse(e.data);r=i.fileId,n=i.url,o=i.message}catch(t){}return{imageUrl:n,specialId:r,message:o}},D.prototype.uploadFile=function(S){return p(this,void 0,void 0,function(){var e,n,r,o,i,a,s,c,u,l,p,d,h,f,v,y,m,w,g,b,_,A,x,q,R;return k(this,function(t){switch(t.label){case 0:e=S.filePath,n=S.fileType,r=void 0===n?H:n,o=S.fileName,i=void 0===o?"miniappfile":o,a=S.seller,s=void 0!==a&&a,c=S.dirId,t.label=1;case 1:return t.trys.push([1,3,,4]),l=s?E:M,[4,this.storageRequest(l,{newContainer:!0,cloudPath:i,fileType:r,sellerSpace:s,dirId:c})];case 2:return u=t.sent(),[3,4];case 3:throw p=t.sent(),new Error("获取配置错误"+(p.message||p.toString()));case 4:return d=T(u,["data","model",r],{}),h=d.url,f=void 0===h?"":h,v=d.formData,y=void 0===v?null:v,m=d.headers,(w={url:f,fileType:r,header:void 0===m?null:m,formData:y,filePath:e,fileName:"file"}).header&&w.header.Authorization&&(w.formData.Authorization=w.header.Authorization),i&&(w.formData.localFileName=Date.now()+"-"+function(t){if(!t)return"file";var e=t.lastIndexOf("/");return 0<=e?t.substr(e+1):t}(i)),w.header?"image"!==r&&(w.header.origin=w.header.origin||"https://miniapp-cloud.taobao.com",w.header.referer=w.header.referer||"https://miniapp-cloud.taobao.com"):delete w.header,w.formData||delete w.formData,[4,this.storageRequest("my.uploadFile",w)];case 5:if(g=t.sent(),b=this.parseUploadResult(r,g),_=b.imageUrl,A=b.specialId,x=b.message,!A)throw new Error(x||"upload exception:unknown error");return q={fileType:r,specialId:A,url:_,cloudPath:i,sellerSpace:s},[4,this.storageRequest(s?P:O,q)];case 6:if(!T(R=t.sent(),"data.model.fileId"))throw new Error(T(R,["result","msgInfo"],"上传文件失败"));return[2,T(R,"data.model")]}})})},D.prototype.deleteFile=function(c){return p(this,void 0,void 0,function(){var e,n,r,o,i,a,s;return k(this,function(t){switch(t.label){case 0:return e=c.fileId,n=c.fileType,r=void 0===n?H:n,o=c.seller,i=void 0!==o&&o,a=Array.isArray(e)?e:[e],a=JSON.stringify(a),[4,this.storageRequest(i?S:R,{fileType:r,fileIds:a,sellerSpace:i})];case 1:if(T(s=t.sent(),["data","model"]))return[2,!0];throw new Error(T(s,["data","msgInfo"]))}})})},D.prototype.getTempFileURL=function(s){return p(this,void 0,void 0,function(){var e,n,r,o,i,a;return k(this,function(t){switch(t.label){case 0:if(e=s.fileId,n=s.seller,r=void 0!==n&&n,!e)throw new Error("缺少fileId,请检查参数");return o=Array.isArray(e)?e:[e],o=JSON.stringify(o),[4,this.storageRequest(r?B:I,{fileIds:o,sellerSpace:r})];case 1:if(i=t.sent(),a=T(i,["data","model"]))return[2,a];throw new Error(T(i,["data","msgInfo"]))}})})},D.prototype.downloadByFileId=function(l){return p(this,void 0,void 0,function(){var e,n,r,o,i,a,s,c,u;return k(this,function(t){switch(t.label){case 0:if(e=l.fileId,n=l.cache,!e)throw new Error("缺少fileId,请检查参数");return r=Array.isArray(e)?e:[e],[4,this.storageRequest(I,{fileIds:JSON.stringify(r)})];case 1:o=t.sent(),i=T(o,["data","model"])||[],a=[],s=0,t.label=2;case 2:return s<i.length?(c=(i[s]||{}).url,[4,this._downloadByUrl(c,n)]):[3,5];case 3:(u=t.sent())&&a.push(u),t.label=4;case 4:return s++,[3,2];case 5:return[2,a]}})})},D.prototype.storageRequest=function(n,r,o){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e="test"===this.options.env?"test":"online",(r=r||{}).env=e,[4,this.request.exec({url:n,data:r},o)];case 1:return[2,t.sent()]}})})},D.prototype._downloadByUrl=function(r,o){return p(this,void 0,void 0,function(){var e,n;return k(this,function(t){switch(t.label){case 0:return r?o?[4,this.request.proxy.apply({url:"my.getStorage",data:{key:r}})]:[3,2]:[2,null];case 1:if(e=t.sent().data)return[2,e];t.label=2;case 2:return[4,this.request.exec({url:"my.downloadFile",data:{url:r}})];case 3:return n=t.sent().apFilePath,o?[4,this.request.exec({url:"my.setStorage",data:{key:r,data:n}})]:[3,5];case 4:t.sent(),t.label=5;case 5:return[2,n]}})})},n([o()],D.prototype,"uploadFile",null),n([o()],D.prototype,"deleteFile",null),n([o()],D.prototype,"getTempFileURL",null),n([o()],D.prototype,"downloadByFileId",null),D);function D(){return null!==q&&q.apply(this,arguments)||this}var j=(Object.defineProperty(G.prototype,"name",{get:function(){return this._coll},enumerable:!0,configurable:!0}),G.prototype.aggregate=function(n){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return Array.isArray(n)||(n=[n]),e={aggregate_pipelines:n,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.aggregate",e)];case 1:return[2,t.sent()]}})})},G.prototype.count=function(n){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={filter:n,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.count",e)];case 1:return[2,t.sent()]}})})},G.prototype.deleteMany=function(n){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={filter:n,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.remove",e)];case 1:return[2,t.sent()]}})})},G.prototype.find=function(n,r){return void 0===r&&(r={}),p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={displayed_fields:r.projection,order_by:r.sort,skip:r.skip,limit:r.limit,filter:n,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.get",e)];case 1:return[2,t.sent()]}})})},G.prototype.replaceOne=function(n,r){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={filter:n,new_record:r,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.replace",e)];case 1:return[2,t.sent()]}})})},G.prototype.insertOne=function(n){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={record:n,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.add",e)];case 1:return[2,t.sent()]}})})},G.prototype.insertMany=function(n){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:if(e={records:n,collection_name:this._coll},!Array.isArray(n))throw new Error("带插入的数据只能为数组");return[4,this._db.dbRequest("miniapp.cloud.db.collection.addMany",e)];case 1:return[2,t.sent()]}})})},G.prototype.updateMany=function(n,r,o){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={filter:n,action:r,arrayFilters:o,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.collection.update",e)];case 1:return[2,t.sent()]}})})},G.prototype.createIndex=function(n,r,o){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={index_name:n,unique:r,fields:o,collection_name:this._coll},[4,this._db.dbRequest("miniapp.cloud.db.index.create",e)];case 1:return[2,t.sent()]}})})},n([o()],G.prototype,"aggregate",null),n([o()],G.prototype,"count",null),n([o()],G.prototype,"deleteMany",null),n([o()],G.prototype,"find",null),n([o()],G.prototype,"replaceOne",null),n([o()],G.prototype,"insertOne",null),n([o()],G.prototype,"insertMany",null),n([o()],G.prototype,"updateMany",null),n([o()],G.prototype,"createIndex",null),G);function G(t,e){this._db=t,this._coll=e}var U,N=(e(z,U=b),z.prototype.collection=function(t){if(!t)throw new Error("集合名称不能为空");return new j(this,t)},z.prototype.createCollection=function(n,t){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return e={collection_name:n},[4,this.dbRequest("miniapp.cloud.db.collection.create",e)];case 1:return[2,t.sent()]}})})},z.prototype.dbRequest=function(n,r){return p(this,void 0,void 0,function(){var e;return k(this,function(t){switch(t.label){case 0:return"test"!==(e=this.options.env)&&(e="online"),r=h(h({},r),{env:e}),[4,this.request.exec({env:e,url:"db/"+n,data:r},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],z.prototype,"createCollection",null),z);function z(){return null!==U&&U.apply(this,arguments)||this}var W,Y=(e(F,W=b),F.prototype.invoke=function(d){return p(this,void 0,void 0,function(){var e,i,a,s,c,u,l,p;return k(this,function(t){switch(t.label){case 0:return e=d.data,i=d.headers,a=d.authScope,s=d.api,e=e||{},Object.keys(e).forEach(function(t){e[t]="string"==typeof e[t]?e[t]:JSON.stringify(e[t])}),c={apiName:s,httpHeaders:i,data:e},[4,this.topRequest(c)];case 1:if(!T(u=t.sent(),"error_response"))return[2,u];if(l=T(u,"error_response.code"),(p=my&&my.canIUse("qn.cleanToken"))&&!a&&(a="*"),26!=l&&27!=l&&53!=l||!a)return[3,9];t.label=2;case 2:return t.trys.push([2,8,,9]),p?(console.log("call my.qn.cleanToken"),[4,my.qn.cleanToken()]):[3,4];case 3:t.sent(),t.label=4;case 4:return[4,(n=my.authorize,r={scopes:a},n?(r=r||{},new Promise(function(t,e){n.call(o||my,h(h({},r),{success:t,fail:e}))})):Promise.reject("未实现my.api"))];case 5:return[4,t.sent()];case 6:return t.sent(),[4,this.topRequest(c)];case 7:return T(u=t.sent(),"error_response")?[3,9]:[2,u];case 8:return t.sent(),[3,9];case 9:throw new Error(""+JSON.stringify(T(u,"error_response")))}var n,r,o})})},F.prototype.topRequest=function(e){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.request.exec({env:this.options.env||"online",url:"top",data:e},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],F.prototype,"invoke",null),F);function F(){return null!==W&&W.apply(this,arguments)||this}var J,K=(e(L,J=b),L.prototype.invoke=function(o){return p(this,void 0,void 0,function(){var e,n,r;return k(this,function(t){switch(t.label){case 0:return e=o.data,n=o.headers,r=o.api,[4,this.topRequest({apiName:r,httpHeaders:n,data:e})];case 1:return[2,t.sent()]}})})},L.prototype.topRequest=function(e){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.request.exec({url:"process",data:e},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],L.prototype,"invoke",null),L);function L(){return null!==J&&J.apply(this,arguments)||this}var Q,X=(e($,Q=b),$.prototype.invoke=function(i){return p(this,void 0,void 0,function(){var e,n,r,o;return k(this,function(t){switch(t.label){case 0:return e=i.data,n=i.headers,r=i.api,o=i.targetAppKey,[4,this.qimenRequest({apiName:r,httpHeaders:n,targetAppKey:o,data:e})];case 1:return[2,t.sent()]}})})},$.prototype.qimenRequest=function(e){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.request.exec({env:this.options.env||"online",url:"qimen",data:e},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],$.prototype,"invoke",null),$);function $(){return null!==Q&&Q.apply(this,arguments)||this}var V,Z=(e(tt,V=b),tt.prototype.httpRequest=function(s){return p(this,void 0,void 0,function(){var e,n,r,o,i,a;return k(this,function(t){switch(t.label){case 0:return e=s.body,n=s.params,r=s.headers,o=s.path,i=s.method,a=s.exts,[4,this.innerRequest({path:o,headers:r,body:e,queryString:n,method:i,options:a})];case 1:return[2,t.sent()]}})})},tt.prototype.innerRequest=function(e){return p(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:return[4,this.request.exec({env:this.options.env||"online",url:"cloudHttp",data:e},d.GATEWAY)];case 1:return[2,t.sent()]}})})},n([o()],tt.prototype,"httpRequest",null),tt);function tt(){return null!==V&&V.apply(this,arguments)||this}var et,nt=(e(rt,et=Error),rt.prototype.toString=function(){return(this.code||"")+" "+(this.message||"")},rt);function rt(){return null!==et&&et.apply(this,arguments)||this}var ot,it=(e(at,ot=m),at.getMtopErrorMsg=function(t){var e=new nt;if(!t)return e.code="500",e.message="mtop请求错误",e;var n,r,o=t.ret&&t.ret[0]&&t.ret[0].split("::");return t.data=t.data||T(t,["err","data"]),t.data&&t.data.errCode&&(n=t.data.errCode,r=t.data.errMessage||t.data.errMsg),t.data&&t.data.errorCode&&(n=t.data.errorCode),t.data&&t.data.errorMessage&&(r=t.data.errorMessage),t.data&&t.data.success||o&&"SUCCESS"===o[0]&&!n?void 0:(n=n||(o&&"FAIL_SYS_SESSION_EXPIRED"===o[0]?"904":"500"),r=r||o&&o[1]||"mtop请求错误",e.code=n,e.message=r,e)},at.GATEWAY_APIS={"db/miniapp.cloud.db.collection.create":"mtop.taobao.dataproxy.collection.create","db/miniapp.cloud.db.index.create":"mtop.taobao.dataproxy.index.create","db/miniapp.cloud.db.collection.aggregate":"mtop.taobao.dataproxy.record.aggregate","db/miniapp.cloud.db.collection.count":"mtop.taobao.dataproxy.record.count","db/miniapp.cloud.db.collection.remove":"mtop.taobao.dataproxy.record.delete","db/miniapp.cloud.db.collection.get":"mtop.taobao.dataproxy.record.select","db/miniapp.cloud.db.collection.replace":"mtop.taobao.dataproxy.record.replace","db/miniapp.cloud.db.collection.add":"mtop.taobao.dataproxy.record.insert","db/miniapp.cloud.db.collection.addMany":"mtop.taobao.dataproxy.record.batch.insert","db/miniapp.cloud.db.collection.update":"mtop.taobao.dataproxy.record.update",fc:"mtop.miniapp.cloud.invoke.fc",top:"mtop.miniapp.cloud.invoke.top",qimen:"mtop.miniapp.cloud.invoke.qimen.cloud",process:"mtop.miniapp.cloud.invoke.process",cloudHttp:"mtop.miniapp.cloud.application.request"},at);function at(){var t=null!==ot&&ot.apply(this,arguments)||this;return t.sendMtop=function(i,a,s){return p(t,void 0,void 0,function(){return k(this,function(t){return console.log("sendMtop",a),[2,new Promise(function(n,r){var e=1,o=function(){my.sendMtop(h(h({api:i,v:"1.0",data:a,method:"POST",needLogin:!0,sessionOption:"AutoLoginAndManualLogin"},s),{success:function(t){var e=at.getMtopErrorMsg(t);e?r(e):n(t)},fail:function(t){if(1===t.error_type&&0<e)return--e,o();r(at.getMtopErrorMsg(t))}}))};o()})]})})},t.invokeMyApi=function(n,r){return p(t,void 0,void 0,function(){return k(this,function(t){return[2,new Promise(function(t,e){return n=n.replace(/^my\./,""),my[n](h(h({},r),{success:t,fail:e}))})]})})},t.sendHttpRequest=function(r,o,i,a){return p(t,void 0,void 0,function(){var e=this;return k(this,function(t){return[2,new Promise(function(n,t){my.httpRequest({url:e.options.gatewayUrl+"/"+r,data:o,dataType:"text",method:a,headers:i,success:function(e){try{n(h(h({},e),{data:JSON.parse(e.data)}))}catch(t){n(h(h({},e),{data:e.data}))}},fail:t})})]})})},t.apply=function(u,l){return p(t,void 0,void 0,function(){var e,n,r,o,i,a,s,c;return k(this,function(t){switch(t.label){case 0:return e=u.url,n=u.data,r=u.headers,o=u.mtopOptions,i=u.method,l!==d.MTOP?[3,2]:[4,this.sendMtop(e,n,o)];case 1:return[2,t.sent()];case 2:return l!==d.GATEWAY?[3,8]:this.options.gatewayUrl?[4,this.sendHttpRequest(e,n,r,i)]:[3,4];case 3:return[2,t.sent()];case 4:return t.trys.push([4,6,,7]),u.rawData&&Object.keys(u.rawData).forEach(function(t){"object"==typeof u.rawData[t]&&(u.rawData[t]=JSON.stringify(u.rawData[t]))}),[4,this.sendMtop(at.GATEWAY_APIS[e],h(h({},u.rawData),{protocols:JSON.stringify(r)}),o)];case 5:return a=t.sent(),(s=a&&a.data||{}).errCode?[2,{headers:{"mc-code":s.errCode,"mc-msg":s.errMessage},data:{}}]:[2,{headers:{"mc-code":200,"mc-msg":"请求成功"},data:T(s,["data"])||{}}];case 6:return(c=t.sent())&&c.code?[2,{headers:{"mc-code":c.code,"mc-msg":c.message}}]:[2,{headers:{"mc-code":500,"mc-msg":c.message||c}}];case 7:return[3,10];case 8:return[4,this.invokeMyApi(e,n)];case 9:return[2,t.sent()];case 10:return[2]}})})},t}var st=(ct.prototype.init=function(i,a){return p(this,void 0,void 0,function(){var n,r,o;return k(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=i.env,n="string"==typeof(e=e||"online")?{database:e,file:e,function:e,message:e}:(e.database=e.database||"online",e.file=e.file||"online",e.function=e.function||"online",e.message=e.message||"online",e),r=new w,this.db=new N({env:n.database},r),this.function=new A({env:n.function},r),this.file=new C({env:n.file},r),this.qimenApi=new X({env:n.database},r),this.topApi=new Y({env:n.database},r),this.processApi=new K({env:n.database},r),this.application=new Z({env:n.database},r),[4,r.init(h({},i),a||new it({gatewayUrl:i.__gatewayUrl}))];case 1:return t.sent(),[2,!0];case 2:return o=t.sent(),console.error("SDK初始化失败 ",o),[3,3];case 3:return[2,!1]}var e})})},ct);function ct(){}var ut=new st;t.Cloud=st,t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})});
{
"_from": "@tbmp/mp-cloud-sdk@1.4.1",
"_id": "@tbmp/mp-cloud-sdk@1.4.1",
"_inBundle": false,
"_integrity": "sha1-2y9tanEKqWjGd2YMYtjaSjqryd0=",
"_location": "/@tbmp/mp-cloud-sdk",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@tbmp/mp-cloud-sdk@1.4.1",
"name": "@tbmp/mp-cloud-sdk",
"escapedName": "@tbmp%2fmp-cloud-sdk",
"scope": "@tbmp",
"rawSpec": "1.4.1",
"saveSpec": null,
"fetchSpec": "1.4.1"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.1.tgz",
"_shasum": "db2f6d6a710aa968c677660c62d8da4a3aabc9dd",
"_spec": "@tbmp/mp-cloud-sdk@1.4.1",
"_where": "d:\\develop\\nodejs\\sparkProject\\filaFloor\\project\\dist",
"author": "",
"bundleDependencies": false,
"deprecated": false,
"description": "",
"gitHead": "f69d455f62dcf8b82983b291a0de742bc91b3390",
"license": "ISC",
"main": "index.js",
"name": "@tbmp/mp-cloud-sdk",
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"types": "./types/platforms/mp/index.d.ts",
"version": "1.4.1"
}
import { Db } from "./db";
export interface IFindOptions {
/**
* 查询的文档数量限制
*/
limit?: number;
/**
* 跳过的文档数量
*/
skip?: number;
/**
* 排序规则
*/
sort?: object;
/**
* 查询后过滤的字段
*/
projection?: object;
}
export declare class CollectionReference {
/**
* 初始化
*
* @internal
*
* @param db - 数据库的引用
* @param coll - 集合名称
*/
private _db;
private _coll;
constructor(db: Db, coll: string);
/**
* 读取集合名字
*/
readonly name: string;
/**
* 对集合执行聚合查询
* @param pipeline 聚合查询对象
*/
aggregate(pipeline: object | object[]): Promise<any>;
/**
* 获取集合中复合条件的记录数量
* @param filter 过滤条件
*/
count(filter: object): Promise<any>;
/**
* 删除集合中的一批记录
* @param filter 过滤条件
*/
deleteMany(filter: object): Promise<any>;
/**
* 查找集合中符合条件的所有记录
* @param filter 过滤条件
* @param options 查询配置项
*/
find(filter: any, options?: IFindOptions): Promise<any>;
/**
* 替换一条数据
* @param filter 过滤条件
* @param data 新数据
*/
replaceOne(filter: object, data: object): Promise<any>;
/**
* 在集合中添加一条记录
* @param data 带插入的数据
*/
insertOne(data: object): Promise<any>;
/**
* 在集合中添加一批记录
* @param data 待插入的数据,只能为数组
*/
insertMany(data: object[]): Promise<any>;
/**
*
* @param filter 过滤条件
* @param data 更新规则
*
*/
updateMany(filter: object, data: object): Promise<any>;
}
import { CollectionReference } from "./collection";
import { IAsyncInvokeOptions } from "../../shared/types";
import { ICloudService } from "../interface/cloudService";
export declare class Db extends ICloudService {
/**
* 获取集合的引用
*
* @param collName - 集合名称
*/
collection(collName: string): CollectionReference;
/**
* 创建集合
*/
createCollection(name: string, options: {
collName: string;
} & IAsyncInvokeOptions): Promise<any>;
dbRequest(action?: string, params?: any): Promise<any>;
}
import { Db } from "./db";
export default Db;
import { IAsyncInvokeOptions } from '../../shared/types';
import { ICloudService } from '../interface/cloudService';
export interface ICallFunctionOptions extends IAsyncInvokeOptions {
name: string;
data: any;
}
export interface IInvokeMethod {
(IAsyncInvokeOptions: any): void;
}
export default class CloudFunction extends ICloudService {
invoke(name: string, data?: object, handler?: string): Promise<any>;
private fcRequest;
}
import { Request } from "../../shared/request";
export interface ICloudServiceOptions {
env?: 'test' | 'online' | 'pre';
}
export declare abstract class ICloudService {
options: ICloudServiceOptions;
request: Request;
constructor(options: ICloudServiceOptions, request: Request);
init?(): void;
}
import Powermsg from '@ali/lib-powermsg-sdk';
import { Env } from '../../shared/types';
export default class Client {
env: Env;
pmg: Powermsg;
deviceId: string;
initing: boolean;
queue: (() => void)[];
config: any;
constructor(env: Env);
init: () => Promise<any>;
onMessage: (callback: any) => Promise<() => void>;
private createPwgInstance;
}
import { ICloudService, ICloudServiceOptions } from "../interface/cloudService";
import Client from './client';
import Server from './server';
export default class Message extends ICloudService {
server: Server;
client: Client;
constructor(options: ICloudServiceOptions);
}
import { Request } from '../../shared/request';
import { Env } from "../../../packages/mp-cloud-node-sdk/types/shared/types";
interface IPushOptions {
subType: number;
deviceId?: string;
data: object;
pushType: string;
}
export default class Server {
env: Env;
request: Request;
constructor(env: Env, request: Request);
push(options: IPushOptions): Promise<any>;
}
export {};
import {ICloudService} from "../../interface/cloudService";
export default class Application extends ICloudService {
httpRequest(options: {path: string, params?: any, body?: any, headers?: any, method?: string, exts?: any}): Promise<any>;
}
import {ICloudService} from "../../interface/cloudService";
export default class Process extends ICloudService {
invoke(options: { api: string, data?: any, headers?: any }): Promise<any>;
private topRequest;
}
import {ICloudService} from "../../interface/cloudService";
export default class Qimen extends ICloudService {
invoke(options: { api: string, data?: any, targetAppKey?: any, headers?: any }): Promise<any>;
private topRequest;
}
import {ICloudService} from "../../interface/cloudService";
export default class Top extends ICloudService {
invoke(options: { api: string, data?: any, headers?: any, authScope?: string }): Promise<any>;
private topRequest;
}
import { IRequestOptions } from "../../../shared/request";
export default class Top {
client: any;
context: IRequestOptions;
constructor(context: IRequestOptions);
invoke(apiName: string, data?: any, httpHeaders?: any): Promise<any>;
}
import { IAsyncInvokeOptions } from "../../shared/types";
import { ICloudService } from "../interface/cloudService";
export interface IUploadFileOptions extends IAsyncInvokeOptions {
/**
* 选择到的本地文件路径
*/
filePath: string;
/**
* 文件类型, image/audio/video
*/
fileType: FileTypes;
/**
* 云存储文件名可带路径, 如a/xxx.jpg
*/
fileName?: string;
/**
* web环境上传 file对象
*/
file?: any;
}
export interface IDownloadFileOptions extends IAsyncInvokeOptions {
fileType?: FileTypes;
fileId: string;
}
export interface ITempFileURLOptions extends IAsyncInvokeOptions {
fileList: string[];
}
export declare type IDeleteFileOptions = IDownloadFileOptions;
export declare type FileTypes = "image" | "video" | "audio";
export default class CloudStorage extends ICloudService {
private parseUploadResult;
private parsePostUploadResult;
private parseAusUploadResult;
/**
* 文件上传
* 1.获取上传配置
* 2.调用my.api上传
* 3.建立存储关系
* @param options
*/
uploadFile(options: IUploadFileOptions): Promise<any>;
/**
* 删除文件
* @param options
*/
deleteFile(options: IDeleteFileOptions): Promise<boolean>;
/**
* 根据文件id(cloud://)获取授权的url
* @param options
*/
getTempFileURL(options: IAsyncInvokeOptions & {
fileType: string;
fileId: string | string[];
}): Promise<any>;
/**
* 从服务端获取文件并在本地读取
* @param options
*/
readRemoteFile(options: IAsyncInvokeOptions & {
url: string;
}): Promise<ArrayBuffer>;
/**
* 存储的请求代理, 统一sdk环境和存储环境
* @param action
* @param data
* @param requestType
*/
private storageRequest;
}
import { Cloud } from '../mp';
declare const cloudInstance: Cloud;
export default cloudInstance;
import { Cloud as MpCloud } from '../mp';
import { ICloudOptions } from '../../shared/types';
import Client from '../../core/message/client';
import { IProxy } from '../../shared/request';
export declare class Cloud extends MpCloud {
message: {
client: Client;
};
init(options: ICloudOptions, proxy: IProxy): Promise<boolean>;
}
declare const _default: Cloud;
export default _default;
import {IProxy} from '../../shared/request';
import {ICloudOptions} from '../../shared/types';
import CloudFunction from '../../core/functions';
import CloudStorage from '../../core/storage';
import Db from '../../core/db';
import Top from '../../core/openApi/client/top';
import Qimen from '../../core/openApi/client/qimen';
import Process from '../../core/openApi/client/process';
import Application from '../../core/openApi/client/application';
export declare class Cloud {
function: CloudFunction;
file: CloudStorage;
db: Db;
topApi: Top;
qimenApi: Qimen;
processApi: Process;
application: Application;
init(options: ICloudOptions, proxy?: IProxy): Promise<boolean>;
}
declare const _default: Cloud;
export default _default;
import { IProxy, IRequestOptions } from '../../shared/request';
import { ICloudOptions } from '../../shared/types';
import CloudFunction from '../../core/functions';
import Database from '../../core/db';
import Server from '../../core/message/server';
import Top from '../../core/openApi/server/top';
export declare class Cloud {
private _options;
db: Database;
function: CloudFunction;
message: {
server: Server;
};
private request;
topApi: Top;
setEnv(env: any): void;
init(options: ICloudOptions & IRequestOptions, proxy: IProxy): void;
}
export declare function cloud(context: any, options: ICloudOptions): Cloud;
export declare const BASE_APIS: {
GET_SESSION: string;
GET_SECRET: string;
};
export declare const STORAGE_KEYS: {
SECRET: string;
};
export declare const ENV_CONFIG: {
pre: {
gw: string;
};
online: {
gw: string;
};
};
import { IAsyncInvokeOptions } from "./types";
export declare function invokeCallback(options: IAsyncInvokeOptions, asyncTask: Promise<any>): Promise<void>;
export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise<any>;
export declare function getUserId(): Promise<string>;
export declare function noop(): void;
export declare function invokeTaskCallback(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare function safeAccess(props: any, keys: string[] | string, def?: any): any;
export declare function getValue(key: string): Promise<any>;
export declare function setValue(key: string, data: any): Promise<any>;
export interface IRequestOptions {
appKey?: string,
sourceAppKey?: string,
requestAppKey?:string,
miniappId?: string,
sourceMiniAppId?: string,
appOwnerOpenId?: string,
signSecret?: string;
sessionKey?: string;
requestId?: string;
cloudId?: string;
openId?: string;
unionId?: string;
userNick?: string,
mixNick?: string,
session?: string;
accessToken?: string;
env?: string;
}
export declare enum RequestTypes {
MTOP = 1,
MY = 2,
GATEWAY = 3
}
export interface IGatewayResponse {
error_response: {
code: string;
};
}
export interface IRequestDetail {
url: string;
data?: any;
rawData?: any;
method?: string;
headers?: any;
dataType?: string;
v?: string;
__is_retry_task__?: boolean;
env?: string;
mtopOptions?: any;
}
export interface IProxyOptions {
gatewayUrl?: string;
dataProxyGatewayUrl?: string;
}
export declare abstract class IProxy {
options: IProxyOptions;
abstract apply(task: IRequestDetail, requestType?: RequestTypes): Promise<any>;
constructor(options?: IProxyOptions);
}
export declare class Request {
networkType?: string;
options: IRequestOptions;
tasks: {
detail: IRequestDetail;
success?: (res: any) => void;
fail?: (res: any) => void;
}[];
proxy: IProxy;
inited: boolean;
pauseExecTask: boolean;
init(options: IRequestOptions, proxy: IProxy): Promise<void>;
listenNetworkChange(): Promise<void>;
static getRequestType(url: string): RequestTypes;
/**
* 验证响应结果, 特定情况下重试请求
* @param res
*/
private verifyResponse;
private tryThrowError;
private sendGatewayRequest;
flushGatewayRequestQueue(reject?: boolean): void;
exec(detail: IRequestDetail, requestType?: RequestTypes): Promise<any>;
/**
*
* @param url 网关请求
* @param method 请求方法
* @param queryString
* @param headers mc_开头的http header
* @param content json body
*/
private getHttpRequestSign;
/**
* 对网关请求签名
* @param detail
*/
private createGatewayRequest;
}
export declare const request: Request;
export interface ICallback {
(res: any): void;
}
export interface IHttpRequestOptions extends IAsyncInvokeOptions {
url: string;
method?: string;
headers?: any;
data?: any;
dataType?: string;
}
export declare type Env = 'test' | 'pre' | 'online';
export declare type Envs = {
database: Env;
file: Env;
function: Env;
message: Env;
};
export interface ICloudOptions {
env?: Env | Envs;
appKey?: string;
}
declare global {
interface Window {
}
var my: {
httpRequest: (options: IHttpRequestOptions) => void;
sendMtop: (options: any) => void;
alert: (options: {
title?: string;
content?: string;
}) => void;
};
var NODE_PLATFORM: boolean;
var SDK_VERSION: string;
}
export interface IAsyncInvokeOptions {
success?: ICallback;
fail?: ICallback;
complete?: ICallback;
}
export declare type AsyncInvokeResult = Promise<any> | void;
export declare type Constructor<T = {}> = new (...args: any[]) => T;
import { IAsyncInvokeOptions, Env, Envs } from "./types";
export declare function noop(): void;
export declare function invokeTaskCallback(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare function safeAccess(props: any, keys: string[] | string, def?: any): any;
export declare function invokeCallback(options: IAsyncInvokeOptions, asyncTask: Promise<any>): Promise<void>;
export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise<any>;
export declare function getUserId(): Promise<string>;
export declare function getEnvs(env: Env | Envs): Envs;
{
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@tbmp/mp-cloud-sdk": {
"version": "1.4.1",
"resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.1.tgz",
"integrity": "sha1-2y9tanEKqWjGd2YMYtjaSjqryd0="
}
}
}
{
"name": "",
"version": "1.0.0",
"main": "",
"license": "MIT",
"dependencies": {
"@tbmp/mp-cloud-sdk": "^1.4.1"
}
}
.huo_dong_ye {
width: 750rpx;
height: 1153rpx;
opacity: 1;
top: 303rpx;
position: absolute;
}
.huo_dong_ye .tu2 {
width: 543rpx;
height: 494rpx;
opacity: 1;
vertical-center: -463;
left: 106rpx;
top: 14rpx;
position: absolute;
}
.huo_dong_ye .an_niu2 {
width: 305rpx;
height: 80rpx;
opacity: 1;
vertical-center: -21;
left: 230rpx;
top: 663rpx;
position: absolute;
}
.huo_dong_ye .dao_ji_shi87 {
width: 440rpx;
height: 86rpx;
opacity: 1;
vertical-center: -769;
left: 156rpx;
position: absolute;
}
.huo_dong_ye .dao_ji_shi87 .di22 {
width: 440rpx;
height: 86rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng2291 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 13rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei90 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 131rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng2289 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 246rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei388 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 357rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 {
width: 750rpx;
height: 308rpx;
opacity: 1;
vertical-center: 187;
top: 757rpx;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu116 {
width: 750rpx;
height: 308rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .ju_xing67 {
width: 374rpx;
height: 51rpx;
opacity: 1;
left: 191rpx;
top: 23rpx;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .ji_fen_gai_lou_ying_qian_yuan_xin_pin_da_jiang {
width: 312rpx;
height: 25rpx;
opacity: 1;
left: 222rpx;
top: 32rpx;
position: absolute;
font-size: 16.17499rpx;
color: #f23f47;
}
.huo_dong_ye .jiang_pin78 .zu114 {
width: 680rpx;
height: 190rpx;
opacity: 1;
left: 37rpx;
top: 75rpx;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 {
width: 680rpx;
height: 190rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 {
width: 680rpx;
height: 136rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .n20_lou_ceng86 {
width: 105rpx;
height: 20rpx;
opacity: 0.70196078;
left: 17rpx;
top: 142rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .xxx_yuan_jiang_pin85 {
width: 98rpx;
height: 21rpx;
opacity: 0.70196078;
left: 17rpx;
top: 169rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .n20_lou_ceng84 {
width: 105rpx;
height: 20rpx;
opacity: 0.70196078;
left: 197rpx;
top: 142rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .xxx_yuan_jiang_pin83 {
width: 98rpx;
height: 21rpx;
opacity: 0.70196078;
left: 197rpx;
top: 169rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .n20_lou_ceng82 {
width: 105rpx;
height: 20rpx;
opacity: 0.70196078;
left: 370rpx;
top: 142rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .xxx_yuan_jiang_pin81 {
width: 98rpx;
height: 21rpx;
opacity: 0.70196078;
left: 370rpx;
top: 169rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .n20_lou_ceng80 {
width: 105rpx;
height: 20rpx;
opacity: 0.70196078;
left: 561rpx;
top: 142rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .xxx_yuan_jiang_pin79 {
width: 98rpx;
height: 21rpx;
opacity: 0.70196078;
left: 561rpx;
top: 169rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .mai_lou {
width: 585rpx;
height: 69rpx;
opacity: 1;
vertical-center: -118.5;
left: 86rpx;
top: 571rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .wo_yao_gou_mai_ge_lou_ceng {
width: 585rpx;
height: 44rpx;
opacity: 1;
top: 11rpx;
position: absolute;
font-size: 28.61729rpx;
color: #ffffff;
}
.huo_dong_ye .mai_lou .di3 {
width: 137rpx;
height: 69rpx;
opacity: 1;
left: 244rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .di_kao_bei {
width: 46rpx;
height: 42rpx;
opacity: 1;
left: 182rpx;
top: 13rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .di_kao_bei2 {
width: 46rpx;
height: 42rpx;
opacity: 1;
left: 396rpx;
top: 13rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .tu_ceng77 {
width: 24rpx;
height: 25rpx;
opacity: 1;
left: 193rpx;
top: 22rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .tu_ceng76 {
width: 25rpx;
height: 7rpx;
opacity: 1;
left: 406rpx;
top: 30rpx;
position: absolute;
background-color: #091636;
}
.huo_dong_ye .mai_lou .xxx {
width: 86rpx;
height: 34rpx;
opacity: 1;
left: 270rpx;
top: 17rpx;
position: absolute;
font-size: 28.61729rpx;
color: #f23f47;
}
.huo_dong_ye .dang_qian_zong_lou_ceng {
width: 120rpx;
height: 25rpx;
opacity: 1;
vertical-center: -600.5;
left: 315rpx;
top: 111rpx;
position: absolute;
font-size: 25.97279rpx;
color: #306faf;
}
.huo_dong_ye .xxxxxx {
width: 120rpx;
height: 24rpx;
opacity: 1;
vertical-center: -628;
left: 315rpx;
top: 84rpx;
position: absolute;
font-size: 31.96651rpx;
color: #e7210a;
}
.huo_dong_ye .ji_fen {
width: 371rpx;
height: 52rpx;
opacity: 1;
vertical-center: -206;
left: 192rpx;
top: 492rpx;
position: absolute;
}
.huo_dong_ye .ji_fen .di111 {
width: 371rpx;
height: 52rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .ji_fen .gou_mai_ji_lu75 {
width: 107rpx;
height: 27rpx;
opacity: 1;
left: 243rpx;
top: 13rpx;
position: absolute;
font-size: 15.55287rpx;
color: #64a7e4;
}
.huo_dong_ye .ji_fen .dang_qian_ji_fenxxxx {
width: 172rpx;
height: 25rpx;
opacity: 1;
left: 26rpx;
top: 13rpx;
position: absolute;
font-size: 16.17499rpx;
color: #5392cc;
}
<view class="huo_dong_ye">
<image class="tu2" src={{resList['951029d5-8a27-41cd-98db-5b7a85eab38b'].url}} />
<image class="an_niu2" src={{resList['90db162a-23ca-42b4-b4eb-1a6d4fa5f0eb'].url}} />
<view class="dao_ji_shi87">
<image class="di22" src={{resList['5bfe12e0-bbdc-4a34-8c67-5839973c1ec5'].url}} />
<label class="tu_ceng2291">22</label>
<label class="tu_ceng22_kao_bei90">22</label>
<label class="tu_ceng2289">22</label>
<label class="tu_ceng22_kao_bei388">22</label>
</view>
<view class="jiang_pin78">
<image class="zu116" src={{resList['bc8dedd7-ec86-4c02-856e-1fb1517a522b'].url}} />
<image class="ju_xing67" src={{resList['36e0d253-74d4-4696-ac2e-18fee5dcbd54'].url}} />
<label class="ji_fen_gai_lou_ying_qian_yuan_xin_pin_da_jiang">· 积分盖楼 赢千元新品大奖  ·</label>
<view class="zu114">
<view class="zu128">
<image class="ju_xing51_kao_bei2" src={{resList['d196657b-b657-4bdd-a966-6ca0e72c53e4'].url}} />
<label class="n20_lou_ceng86">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin85">XXX元奖品</label>
<label class="n20_lou_ceng84">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin83">XXX元奖品</label>
<label class="n20_lou_ceng82">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin81">XXX元奖品</label>
<label class="n20_lou_ceng80">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin79">XXX元奖品</label>
</view>
</view>
</view>
<view class="mai_lou">
<label class="wo_yao_gou_mai_ge_lou_ceng">我要购买 个楼层</label>
<image class="di3" src={{resList['b0666d8c-2ba9-4e42-b6db-dc0f54f67db8'].url}} />
<image class="di_kao_bei" src={{resList['93ee38f2-3f0a-4550-93e4-e50a5e1e29cb'].url}} />
<image class="di_kao_bei2" src={{resList['93ee38f2-3f0a-4550-93e4-e50a5e1e29cb'].url}} />
<image class="tu_ceng77" src={{resList['c064c8f7-ddd6-4db9-81be-7077d99f7053'].url}} />
<view class="tu_ceng76" />
<label class="xxx">XXX</label>
</view>
<label class="dang_qian_zong_lou_ceng">当前总楼层</label>
<label class="xxxxxx">XXXXXX</label>
<view class="ji_fen">
<image class="di111" src={{resList['789df59d-2616-41e0-8111-d8009dfd0aaf'].url}} />
<label class="gou_mai_ji_lu75">购买记录></label>
<label class="dang_qian_ji_fenxxxx">当前积分:xxxx</label>
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
Page({
data: {},
onLoad(props) {
this.setData({
resList: resList
});
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
.jie_shu_ye {
width: 623rpx;
height: 1085rpx;
opacity: 1;
left: 66rpx;
top: 303rpx;
position: absolute;
}
.jie_shu_ye .dao_ji_shi69 {
width: 440rpx;
height: 86rpx;
opacity: 1;
vertical-center: -769;
left: 90rpx;
position: absolute;
}
.jie_shu_ye .dao_ji_shi69 .di74 {
width: 440rpx;
height: 86rpx;
opacity: 1;
position: absolute;
}
.jie_shu_ye .dao_ji_shi69 .tu_ceng2273 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 13rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.jie_shu_ye .dao_ji_shi69 .tu_ceng22_kao_bei72 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 131rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.jie_shu_ye .dao_ji_shi69 .tu_ceng2271 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 246rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.jie_shu_ye .dao_ji_shi69 .tu_ceng22_kao_bei370 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 357rpx;
top: 47rpx;
position: absolute;
font-size: 14.41518rpx;
color: #ffffff;
}
.jie_shu_ye .mai_zhongn20n50n80_lou_ceng_de_yong_hu_ke_huo_de_jiang_pinn_dai_biao_gai_lou_jie_shu_shi_de_zong_lou_ceng {
width: 492rpx;
height: 51rpx;
opacity: 0.70196078;
vertical-center: 247.5;
left: 65rpx;
top: 946rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan {
width: 618rpx;
height: 488rpx;
opacity: 1;
vertical-center: -454;
top: 26rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .di953 {
width: 618rpx;
height: 488rpx;
opacity: 1;
position: absolute;
display: block;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai {
width: 458rpx;
height: 320rpx;
opacity: 1;
left: 66rpx;
top: 140rpx;
position: absolute;
display: block;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang {
width: 458rpx;
height: 320rpx;
opacity: 1;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng68 {
width: 84rpx;
height: 23rpx;
opacity: 1;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng67 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 44rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng66 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 87rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la65 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 1rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la64 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 45rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la63 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 88rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei2 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 97rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 55rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei3 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 141rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .tu_ceng62 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 43rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .tu_ceng61 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 85rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .tu_ceng60 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 129rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .jiang_pin59 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 381rpx;
top: 1rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng58 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 131rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la57 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 132rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei4 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 182rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .kao_bei {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 170rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng_kao_bei {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 172rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la_kao_bei {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 173rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei5 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 223rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .kao_bei2 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 211rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng_kao_bei2 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 213rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la_kao_bei2 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 214rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei6 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 264rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .kao_bei3 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 252rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng_kao_bei3 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 254rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la_kao_bei3 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 255rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ju_xing728_kao_bei7 {
width: 78rpx;
height: 15rpx;
opacity: 1;
left: 380rpx;
top: 305rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .kao_bei4 {
width: 10rpx;
height: 19rpx;
opacity: 1;
left: 414rpx;
top: 293rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng_kao_bei4 {
width: 84rpx;
height: 23rpx;
opacity: 1;
top: 295rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .ba_la_kao_bei4 {
width: 75rpx;
height: 23rpx;
opacity: 1;
left: 201rpx;
top: 296rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .wei_zhong_jiang {
width: 228rpx;
height: 24rpx;
opacity: 1;
left: 130rpx;
top: 1rpx;
position: absolute;
}
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .wei_zhong_jiang .zong_lou_ceng_bu_zu_wu_ren_zhong_jiang {
width: 228rpx;
height: 24rpx;
opacity: 1;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 {
width: 623rpx;
height: 377rpx;
opacity: 1;
vertical-center: 3.5;
top: 539rpx;
position: absolute;
}
.jie_shu_ye .gou_mai_ji_lu46 .di77 {
width: 618rpx;
height: 377rpx;
opacity: 1;
position: absolute;
display: block;
}
.jie_shu_ye .gou_mai_ji_lu46 .jin_du_tiao {
width: 15rpx;
height: 69rpx;
opacity: 1;
left: 608rpx;
top: 146rpx;
position: absolute;
display: block;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 {
width: 453rpx;
height: 222rpx;
opacity: 1;
left: 61rpx;
top: 147rpx;
position: absolute;
display: block;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri56 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng10012055 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 1rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng10012054 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 42rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng10012053 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 82rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng20052 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 1rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng20051 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 42rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng20050 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 82rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri49 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 40rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri48 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 80rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng100120_kao_bei {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 123rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng200_kao_bei {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 123rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri_kao_bei {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 121rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng100120_kao_bei2 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 163rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng200_kao_bei2 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 163rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri_kao_bei2 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 161rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng100120_kao_bei3 {
width: 81rpx;
height: 18rpx;
opacity: 0.70196078;
left: 208rpx;
top: 204rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng200_kao_bei3 {
width: 37rpx;
height: 18rpx;
opacity: 0.70196078;
left: 416rpx;
top: 204rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
.jie_shu_ye .gou_mai_ji_lu46 .zu13447 .tu_ceng09_yue15_ri_kao_bei3 {
width: 101rpx;
height: 21rpx;
opacity: 0.70196078;
top: 201rpx;
position: absolute;
font-size: 14.93076rpx;
color: #ffffff;
}
<view class="jie_shu_ye">
<view class="dao_ji_shi69">
<image class="di74" src={{resList['5bfe12e0-bbdc-4a34-8c67-5839973c1ec5'].url}} />
<label class="tu_ceng2273">22</label>
<label class="tu_ceng22_kao_bei72">22</label>
<label class="tu_ceng2271">22</label>
<label class="tu_ceng22_kao_bei370">22</label>
</view>
<label class="mai_zhongn20n50n80_lou_ceng_de_yong_hu_ke_huo_de_jiang_pinn_dai_biao_gai_lou_jie_shu_shi_de_zong_lou_ceng">
买中N*20%,N*50%,N*80%楼层的用户可获得奖品 N代表盖楼结束时的总楼层
</label>
<view class="zhong_jiang_ming_dan">
<image class="di953" src={{resList['53005b60-618e-4c1b-a714-1c8766d72150'].url}} />
<view class="zhong_jiang_zhuang_tai">
<view class="yi_zhong_jiang">
<label class="dixxx_ceng68">第XXX层</label>
<label class="dixxx_ceng67">第XXX层</label>
<label class="dixxx_ceng66">第XXX层</label>
<label class="ba_la65">巴***拉</label>
<label class="ba_la64">巴***拉</label>
<label class="ba_la63">巴***拉</label>
<image class="ju_xing728_kao_bei2" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<image class="ju_xing728_kao_bei" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<image class="ju_xing728_kao_bei3" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<label class="tu_ceng62">?</label>
<label class="tu_ceng61">?</label>
<label class="tu_ceng60">?</label>
<image class="jiang_pin59" src={{resList['bfc8fc7f-b756-4fba-b10b-0f8969d09b79'].url}} />
<label class="dixxx_ceng58">第XXX层</label>
<label class="ba_la57">巴***拉</label>
<image class="ju_xing728_kao_bei4" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<label class="kao_bei">?</label>
<label class="dixxx_ceng_kao_bei">第XXX层</label>
<label class="ba_la_kao_bei">巴***拉</label>
<image class="ju_xing728_kao_bei5" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<label class="kao_bei2">?</label>
<label class="dixxx_ceng_kao_bei2">第XXX层</label>
<label class="ba_la_kao_bei2">巴***拉</label>
<image class="ju_xing728_kao_bei6" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<label class="kao_bei3">?</label>
<label class="dixxx_ceng_kao_bei3">第XXX层</label>
<label class="ba_la_kao_bei3">巴***拉</label>
<image class="ju_xing728_kao_bei7" src={{resList['c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc'].url}} />
<label class="kao_bei4">?</label>
<label class="dixxx_ceng_kao_bei4">第XXX层</label>
<label class="ba_la_kao_bei4">巴***拉</label>
</view>
<view class="wei_zhong_jiang">
<label class="zong_lou_ceng_bu_zu_wu_ren_zhong_jiang">总楼层不足,无人中奖</label>
</view>
</view>
</view>
<view class="gou_mai_ji_lu46">
<image class="di77" src={{resList['3dc9a99c-83e5-4cb0-ae52-46033667889d'].url}} />
<image class="jin_du_tiao" src={{resList['b2c966d2-5515-45b8-9b1c-20a584e0fb99'].url}} />
<view class="zu13447">
<label class="tu_ceng09_yue15_ri56">09 月 15日</label>
<label class="tu_ceng10012055">100-120</label>
<label class="tu_ceng10012054">100-120</label>
<label class="tu_ceng10012053">100-120</label>
<label class="tu_ceng20052">200</label>
<label class="tu_ceng20051">200</label>
<label class="tu_ceng20050">200</label>
<label class="tu_ceng09_yue15_ri49">09 月 15日</label>
<label class="tu_ceng09_yue15_ri48">09 月 15日</label>
<label class="tu_ceng100120_kao_bei">100-120</label>
<label class="tu_ceng200_kao_bei">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei">09 月 15日</label>
<label class="tu_ceng100120_kao_bei2">100-120</label>
<label class="tu_ceng200_kao_bei2">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei2">09 月 15日</label>
<label class="tu_ceng100120_kao_bei3">100-120</label>
<label class="tu_ceng200_kao_bei3">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei3">09 月 15日</label>
</view>
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
Page({
data: {},
onLoad(props) {
this.setData({
resList: resList
});
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
.ju_xing729 {
width: 837rpx;
height: 1696rpx;
opacity: 0.70196078;
left: -35rpx;
top: -33rpx;
position: absolute;
background-color: #000000;
}
<view class="ju_xing729" />
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
Page({
data: {},
onLoad(props) {
this.setData({
resList: resList
});
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
.shou_ye {
top: 0rpx;
left: 0rpx;
width: 750rpx;
height: 1624rpx;
display: block;
position: absolute;
}
.shou_ye .bei_jing_tu {
width: 750rpx;
height: 1624rpx;
opacity: 1;
display: block;
left: 0rpx;
top: 0rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .logo {
width: 160rpx;
height: 58rpx;
opacity: 1;
display: block;
left: 295rpx;
top: 222rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .jiang_pin {
width: 136rpx;
height: 48rpx;
opacity: 1;
display: block;
left: 17rpx;
top: 221rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .gui_ze {
width: 136rpx;
height: 48rpx;
opacity: 1;
display: block;
left: 600rpx;
top: 221rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .zhu_ti {
width: 673rpx;
height: 1065rpx;
opacity: 1;
display: block;
left: 37rpx;
top: 328rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .zhu_ti .tu {
width: 673rpx;
height: 674rpx;
opacity: 1;
vertical-center: -320;
top: 67rpx;
position: absolute;
}
.shou_ye .zhu_ti .an_niu {
width: 458rpx;
height: 185rpx;
opacity: 1;
vertical-center: 160.5;
left: 108rpx;
top: 792rpx;
position: absolute;
}
.shou_ye .zhu_ti .wen_an {
width: 543rpx;
height: 830rpx;
opacity: 1;
vertical-center: -397;
left: 65rpx;
position: absolute;
}
<view class="shou_ye">
<image class="bei_jing_tu" src={{resList['a96b0452-f0f1-4ef8-b225-cfca9b511bd4'].url}} />
<image class="logo" src={{resList['76d8e1fd-36f4-4c66-af33-58ceaa885b1e'].url}} />
<image class="jiang_pin" src={{resList['da365587-7a12-4272-b05e-e042e2e6430e'].url}} />
<image class="gui_ze" src={{resList['0c977f31-f5f8-4b5a-9cc8-cdaf00f0e64c'].url}} />
<view class="zhu_ti">
<image class="tu" src={{resList['8c476736-ed81-4e91-bcb4-6b2ac884d48d'].url}} />
<image class="an_niu" onTap="handleStart" src={{resList['84e9b0a1-0e07-4324-9073-40d28008ce1f'].url}} />
<image class="wen_an" src={{resList['7622c471-422b-4f1e-8897-785c4d91aeff'].url}} />
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
Page({
data: {
},
onLoad(props) {
this.setData( {
resList: resList
});
},
handleStart(){
this.navigateToPage();
},
// 跳转页面
navigateToPage(){
my.redirectTo('/pages/pagehuo_dong_ye/pagehuo_dong_ye')
}
});
\ No newline at end of file
{
"usingComponents": {
}
}
\ No newline at end of file
.wo_de_jiang_pin_ye_mian1 {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
display: block;
}
.wo_de_jiang_pin_ye_mian1 .di45 {
width: 750rpx;
height: 1624rpx;
opacity: 1;
vertical-center: 0;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wei_zhi {
width: 704rpx;
height: 1082rpx;
opacity: 1;
vertical-center: 134;
left: 23rpx;
top: 317rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 {
width: 704rpx;
height: 165rpx;
opacity: 1;
vertical-center: -508.5;
left: 23rpx;
top: 133rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .di20 {
width: 704rpx;
height: 165rpx;
opacity: 1;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .icon19 {
width: 20rpx;
height: 20rpx;
opacity: 1;
left: 478rpx;
top: 82rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai {
width: 150rpx;
height: 41rpx;
opacity: 1;
left: 524rpx;
top: 60rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .zhi_hui17 {
width: 150rpx;
height: 41rpx;
opacity: 1;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .zhi_hui17 .zhi_hui18 {
width: 150rpx;
height: 41rpx;
opacity: 1;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .zhi_hui17 .yi_shi_xiao {
width: 70rpx;
height: 23rpx;
opacity: 1;
left: 40rpx;
top: 9rpx;
position: absolute;
font-size: 24rpx;
color: #ffffff;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .dian_liang15 {
width: 150rpx;
height: 41rpx;
opacity: 1;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .dian_liang15 .dian_liang16 {
width: 150rpx;
height: 41rpx;
opacity: 1;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .an_niu_zhuang_tai .dian_liang15 .tian_xie_di_zhi {
width: 95rpx;
height: 23rpx;
opacity: 1;
left: 27rpx;
top: 9rpx;
position: absolute;
font-size: 24rpx;
color: #ffffff;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .xian_shi_hou_tai_pei_zhi_de_jiang_pin_ming_cheng {
width: 299rpx;
height: 27rpx;
opacity: 1;
left: 169rpx;
top: 32rpx;
position: absolute;
font-size: 28rpx;
color: #333333;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .jiang_pin_yi_guo_qi_shi_xiao {
width: 139rpx;
height: 19rpx;
opacity: 1;
left: 169rpx;
top: 114rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .tu_ceng1 .jiang_pin_bian_ma202020202020202014 {
width: 291rpx;
height: 19rpx;
opacity: 1;
left: 169rpx;
top: 83rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .ju_xing1013_kao_bei {
width: 280rpx;
height: 32rpx;
opacity: 1;
vertical-center: -631;
left: 246rpx;
top: 77rpx;
position: absolute;
background-color: #ff6747;
}
.wo_de_jiang_pin_ye_mian1 .ju_xing1013 {
width: 281rpx;
height: 30rpx;
opacity: 1;
vertical-center: -634;
left: 237rpx;
top: 75rpx;
position: absolute;
background-color: #091636;
}
.wo_de_jiang_pin_ye_mian1 .biao_ti5 {
width: 209rpx;
height: 37rpx;
opacity: 1;
vertical-center: -647.5;
left: 275rpx;
top: 58rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang {
width: 750rpx;
height: 1624rpx;
opacity: 1;
vertical-center: 0;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .mask {
width: 750rpx;
height: 1624rpx;
opacity: 0.70196078;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov {
width: 655rpx;
height: 314rpx;
opacity: 1;
left: 52rpx;
top: 556rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .bei_jing13 {
width: 645rpx;
height: 244rpx;
opacity: 1;
top: 70rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .jiang_pin_tu_pian12 {
width: 146rpx;
height: 146rpx;
opacity: 1;
left: 45rpx;
top: 117rpx;
position: absolute;
background-color: #f4f4f4;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .wen_zi9 {
width: 328rpx;
height: 139rpx;
opacity: 1;
left: 213rpx;
top: 119rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .wen_zi9 .yi_ge_chang_da_shi_er_ge_zi_de_jiang_pin_ming11 {
width: 324rpx;
height: 27rpx;
opacity: 1;
left: 4rpx;
position: absolute;
font-size: 28rpx;
color: #333333;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .wen_zi9 .jiang_pin_bian_ma202020202020202010 {
width: 291rpx;
height: 20rpx;
opacity: 1;
top: 51rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .wen_zi9 .fa_huo_zhuang_tai_yi_fa_huo {
width: 159rpx;
height: 20rpx;
opacity: 1;
top: 85rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .wen_zi9 .wu_liu_dan_hao234868903238748990 {
width: 314rpx;
height: 20rpx;
opacity: 1;
top: 119rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .yi_fa_huov .an_niu_guan_bi_dan_chuang8 {
width: 50rpx;
height: 50rpx;
opacity: 0.50196078;
left: 605rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov {
width: 655rpx;
height: 314rpx;
opacity: 1;
left: 52rpx;
top: 556rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .bei_jing7 {
width: 645rpx;
height: 244rpx;
opacity: 1;
top: 70rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .jiang_pin_tu_pian6 {
width: 146rpx;
height: 146rpx;
opacity: 1;
left: 45rpx;
top: 117rpx;
position: absolute;
background-color: #f4f4f4;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .wen_zi3 {
width: 389rpx;
height: 139rpx;
opacity: 1;
left: 213rpx;
top: 119rpx;
position: absolute;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .wen_zi3 .yi_ge_chang_da_shi_er_ge_zi_de_jiang_pin_ming5 {
width: 324rpx;
height: 27rpx;
opacity: 1;
left: 4rpx;
position: absolute;
font-size: 28rpx;
color: #333333;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .wen_zi3 .jiang_pin_bian_ma20202020202020204 {
width: 291rpx;
height: 20rpx;
opacity: 1;
top: 51rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .wen_zi3 .fa_huo_zhuang_tai_dai_fa_huo {
width: 159rpx;
height: 20rpx;
opacity: 1;
top: 85rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .wen_zi3 .wen_xin_ti_xing_jiang_pin_jiang_zai_huo_dong_jie_shu7_tian_nei_lu_xu_fa_chu {
width: 388rpx;
height: 20rpx;
opacity: 1;
left: 1rpx;
top: 119rpx;
position: absolute;
font-size: 20rpx;
color: #959595;
}
.wo_de_jiang_pin_ye_mian1 .wu_liu_dan_chuang .dai_fa_huov .an_niu_guan_bi_dan_chuang2 {
width: 50rpx;
height: 50rpx;
opacity: 0.50196078;
left: 605rpx;
position: absolute;
}
<view class="wo_de_jiang_pin_ye_mian1">
<image class="di45" src={{resList['7c8eb531-2e3c-4d65-9b3f-af0ddf895a8b'].url}} />
<image class="wei_zhi" src={{resList['21a3e21f-95cf-4e74-aa04-6c2669c05f6b'].url}} />
<view class="tu_ceng1">
<image class="di20" src={{resList['06bd7555-b087-4360-b51e-d6bf7c36801f'].url}} />
<image class="icon19" src={{resList['d5abfc2b-35e2-4c17-892e-20d9ac1aff9b'].url}} />
<view class="an_niu_zhuang_tai">
<view class="zhi_hui17">
<image class="zhi_hui18" src={{resList['2655f42f-55f2-43c4-84a6-8f1c543dca87'].url}} />
<label class="yi_shi_xiao">已失效</label>
</view>
<view class="dian_liang15">
<image class="dian_liang16" src={{resList['662f2ba7-3cb4-4b78-936f-197b79e24cf3'].url}} />
<label class="tian_xie_di_zhi">填写地址</label>
</view>
</view>
<label class="xian_shi_hou_tai_pei_zhi_de_jiang_pin_ming_cheng">显示后台配置的奖品名称</label>
<label class="jiang_pin_yi_guo_qi_shi_xiao">奖品已过期失效</label>
<label class="jiang_pin_bian_ma202020202020202014">奖品编码:2020202020202020</label>
</view>
<view class="ju_xing1013_kao_bei" />
<view class="ju_xing1013" />
<image class="biao_ti5" src={{resList['b27acc5d-3e6d-4cdc-9535-187fd4048e4c'].url}} />
<view class="wu_liu_dan_chuang">
<image class="mask" src={{resList['3c938441-6a47-4aa2-a1c5-e022738ed2b4'].url}} />
<view class="yi_fa_huov">
<image class="bei_jing13" src={{resList['e59f83be-98f7-4c70-b506-f6d983eef50b'].url}} />
<view class="jiang_pin_tu_pian12" />
<view class="wen_zi9">
<label class="yi_ge_chang_da_shi_er_ge_zi_de_jiang_pin_ming11">一个长达十二个字的奖品名</label>
<label class="jiang_pin_bian_ma202020202020202010">奖品编码:2020202020202020</label>
<label class="fa_huo_zhuang_tai_yi_fa_huo">发货状态:已发货</label>
<label class="wu_liu_dan_hao234868903238748990">物流单号:234868903238748990</label>
</view>
<image class="an_niu_guan_bi_dan_chuang8" src={{resList['53942d1f-2b7f-4f33-bbbb-bf39c65f5608'].url}} />
</view>
<view class="dai_fa_huov">
<image class="bei_jing7" src={{resList['744a994b-dc9d-4c42-a988-61320f2c0ed9'].url}} />
<view class="jiang_pin_tu_pian6" />
<view class="wen_zi3">
<label class="yi_ge_chang_da_shi_er_ge_zi_de_jiang_pin_ming5">一个长达十二个字的奖品名</label>
<label class="jiang_pin_bian_ma20202020202020204">奖品编码:2020202020202020</label>
<label class="fa_huo_zhuang_tai_dai_fa_huo">发货状态:待发货</label>
<label class="wen_xin_ti_xing_jiang_pin_jiang_zai_huo_dong_jie_shu7_tian_nei_lu_xu_fa_chu">
温馨提醒:奖品将在活动结束7天内陆续发出
</label>
</view>
<image class="an_niu_guan_bi_dan_chuang2" src={{resList['53942d1f-2b7f-4f33-bbbb-bf39c65f5608'].url}} />
</view>
</view>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
Page({
data: {},
onLoad(props) {
this.setData({
resList: resList
});
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/**
* 目前没有用到
* @param {*} resList
* @param {*} uuid
*/
const getSrcByUuid = (resList, uuid) => {
resList = resList || [];
for (let i = 0; i < resList.length; i++) {
if (resList[i].uuid == uuid) {
return resList[i].url
}
}
}
module.exports = {
getSrcByUuid
}
\ No newline at end of file
const resList = {
'a96b0452-f0f1-4ef8-b225-cfca9b511bd4': {
name: '底93',
ext: '.png',
uuid: 'a96b0452-f0f1-4ef8-b225-cfca9b511bd4',
url: '//yun.duiba.com.cn/spark-dev/assets/4247a1ded5872a2acaf9312dd1aeb505cb405771.png',
},
'76d8e1fd-36f4-4c66-af33-58ceaa885b1e': {
name: 'logo',
ext: '.png',
uuid: '76d8e1fd-36f4-4c66-af33-58ceaa885b1e',
url: '//yun.duiba.com.cn/spark-dev/assets/82edaaa5640cf9b88b8c611f96231d504adb3439.png',
},
'da365587-7a12-4272-b05e-e042e2e6430e': {
name: '奖品icon',
ext: '.png',
uuid: 'da365587-7a12-4272-b05e-e042e2e6430e',
url: '//yun.duiba.com.cn/spark-dev/assets/acb26a22f7553369f68387b52df2c271b70754bb.png',
},
'0c977f31-f5f8-4b5a-9cc8-cdaf00f0e64c': {
name: '规则icon',
ext: '.png',
uuid: '0c977f31-f5f8-4b5a-9cc8-cdaf00f0e64c',
url: '//yun.duiba.com.cn/spark-dev/assets/43a646ac057cdc6ebe44d1d01ee0b3d2a0159a6c.png',
},
'8c476736-ed81-4e91-bcb4-6b2ac884d48d': {
name: '图',
ext: '.png',
uuid: '8c476736-ed81-4e91-bcb4-6b2ac884d48d',
url: '//yun.duiba.com.cn/spark-dev/assets/0a923a3f9f9f9e5955ac1725ab2caa63ac54e1cc.png',
},
'84e9b0a1-0e07-4324-9073-40d28008ce1f': {
name: '按钮',
ext: '.png',
uuid: '84e9b0a1-0e07-4324-9073-40d28008ce1f',
url: '//yun.duiba.com.cn/spark-dev/assets/81763226dd409baa2ec193430367c132461702df.png',
},
'7622c471-422b-4f1e-8897-785c4d91aeff': {
name: '文案',
ext: '.png',
uuid: '7622c471-422b-4f1e-8897-785c4d91aeff',
url: '//yun.duiba.com.cn/spark-dev/assets/52a75f02aa471da6fb04fc7e196b17f98738cbb6.png',
},
'951029d5-8a27-41cd-98db-5b7a85eab38b': {
name: '图2',
ext: '.png',
uuid: '951029d5-8a27-41cd-98db-5b7a85eab38b',
url: '//yun.duiba.com.cn/spark-dev/assets/25332ad7f16ac364bccd72d6d493822c7a68a54e.png',
},
'90db162a-23ca-42b4-b4eb-1a6d4fa5f0eb': {
name: '按钮2',
ext: '.png',
uuid: '90db162a-23ca-42b4-b4eb-1a6d4fa5f0eb',
url: '//yun.duiba.com.cn/spark-dev/assets/ce9e9912c2867b8a0f95a3539846b3742f8f2ae9.png',
},
'5bfe12e0-bbdc-4a34-8c67-5839973c1ec5': {
name: '底22',
ext: '.png',
uuid: '5bfe12e0-bbdc-4a34-8c67-5839973c1ec5',
url: '//yun.duiba.com.cn/spark-dev/assets/e984712aa55b8fe55585b17885c43b6624fe0d58.png',
},
'bc8dedd7-ec86-4c02-856e-1fb1517a522b': {
name: '组116',
ext: '.png',
uuid: 'bc8dedd7-ec86-4c02-856e-1fb1517a522b',
url: '//yun.duiba.com.cn/spark-dev/assets/80cd4db2732cfde15acba87eda93d74793b99d2a.png',
},
'36e0d253-74d4-4696-ac2e-18fee5dcbd54': {
name: '矩形67',
ext: '.png',
uuid: '36e0d253-74d4-4696-ac2e-18fee5dcbd54',
url: '//yun.duiba.com.cn/spark-dev/assets/437f3c932f5f5df3f28bb248306f447a5efe8f81.png',
},
'd196657b-b657-4bdd-a966-6ca0e72c53e4': {
name: '矩形51拷贝2',
ext: '.png',
uuid: 'd196657b-b657-4bdd-a966-6ca0e72c53e4',
url: '//yun.duiba.com.cn/spark-dev/assets/a34e72dbf9eb1d3b89f28ad27a115fac8ba2df0a.png',
},
'b0666d8c-2ba9-4e42-b6db-dc0f54f67db8': {
name: '底3',
ext: '.png',
uuid: 'b0666d8c-2ba9-4e42-b6db-dc0f54f67db8',
url: '//yun.duiba.com.cn/spark-dev/assets/14c8e1dd980ea05f39d6ff56965416fb2a00ab8f.png',
},
'93ee38f2-3f0a-4550-93e4-e50a5e1e29cb': {
name: '底拷贝',
ext: '.png',
uuid: '93ee38f2-3f0a-4550-93e4-e50a5e1e29cb',
url: '//yun.duiba.com.cn/spark-dev/assets/a3892ec1ee941070633a2af6b6d8075c143526ad.png',
},
'c064c8f7-ddd6-4db9-81be-7077d99f7053': {
name: '图层77',
ext: '.png',
uuid: 'c064c8f7-ddd6-4db9-81be-7077d99f7053',
url: '//yun.duiba.com.cn/spark-dev/assets/bd27530a5427e15b885c626d47ea94d4476be635.png',
},
'789df59d-2616-41e0-8111-d8009dfd0aaf': {
name: '底111',
ext: '.png',
uuid: '789df59d-2616-41e0-8111-d8009dfd0aaf',
url: '//yun.duiba.com.cn/spark-dev/assets/528ca1dfadeed138457d67967ed909f5ac785aa5.png',
},
'53005b60-618e-4c1b-a714-1c8766d72150': {
name: '底953',
ext: '.png',
uuid: '53005b60-618e-4c1b-a714-1c8766d72150',
url: '//yun.duiba.com.cn/spark-dev/assets/e62c56fce31d0cbe3da6d399bde9763026f9c2a3.png',
},
'c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc': {
name: '矩形728拷贝2',
ext: '.png',
uuid: 'c1c1e6fd-7dd4-42d9-86d8-688a76fe47fc',
url: '//yun.duiba.com.cn/spark-dev/assets/9181902b87a4e53675e28029979a7b2d095477e3.png',
},
'bfc8fc7f-b756-4fba-b10b-0f8969d09b79': {
name: '奖品59',
ext: '.png',
uuid: 'bfc8fc7f-b756-4fba-b10b-0f8969d09b79',
url: '//yun.duiba.com.cn/spark-dev/assets/511da1ce4a5cca75da1265d952fc9f4a999bffdc.png',
},
'3dc9a99c-83e5-4cb0-ae52-46033667889d': {
name: '底77',
ext: '.png',
uuid: '3dc9a99c-83e5-4cb0-ae52-46033667889d',
url: '//yun.duiba.com.cn/spark-dev/assets/f4d6695a714d2d993462be9e8f9cdf7420ceae37.png',
},
'b2c966d2-5515-45b8-9b1c-20a584e0fb99': {
name: '进度条',
ext: '.png',
uuid: 'b2c966d2-5515-45b8-9b1c-20a584e0fb99',
url: '//yun.duiba.com.cn/spark-dev/assets/2470bb8adc19c29e3a506186fd963faa67d245ad.png',
},
'3ec90532-9a2c-4fc0-8ee1-ce8477937c3e': {
name: '叉叉102',
ext: '.png',
uuid: '3ec90532-9a2c-4fc0-8ee1-ce8477937c3e',
url: '//yun.duiba.com.cn/spark-dev/assets/566d156048bed919737e4b115e3a0e122a5b288a.png',
},
'67074958-8231-4f79-a860-454e3bfd8d04': {
name: '组139123',
ext: '.png',
uuid: '67074958-8231-4f79-a860-454e3bfd8d04',
url: '//yun.duiba.com.cn/spark-dev/assets/eb9744503651588caa8c7f3d9ddda991f6e3eb68.png',
},
'dc93cdcd-b823-436f-a844-9c785b24bab5': {
name: '矩形705拷贝45',
ext: '.png',
uuid: 'dc93cdcd-b823-436f-a844-9c785b24bab5',
url: '//yun.duiba.com.cn/spark-dev/assets/7db7e68fc04fade30715fa2cbca5beb68d7d08c2.png',
},
'd2226a56-df2a-4685-b008-c284a56f75ae': {
name: '圆角矩形71744',
ext: '.png',
uuid: 'd2226a56-df2a-4685-b008-c284a56f75ae',
url: '//yun.duiba.com.cn/spark-dev/assets/8f1494e3cbf8641d64738fb1b8847abce4c4903e.png',
},
'4e8f011b-2b06-457a-82eb-d0948aeb4587': {
name: '组139394',
ext: '.png',
uuid: '4e8f011b-2b06-457a-82eb-d0948aeb4587',
url: '//yun.duiba.com.cn/spark-dev/assets/319c7b5491e6175d389039893bcf92e1fe76c361.png',
},
'c8a9cedc-70da-4d6f-8f92-c3b592e08c63': {
name: '矩形88726',
ext: '.png',
uuid: 'c8a9cedc-70da-4d6f-8f92-c3b592e08c63',
url: '//yun.duiba.com.cn/spark-dev/assets/d200d7b9c1ad378deed479b7f899ccebb7a8bcac.png',
},
'228b7afa-96aa-4091-8fc3-44dd60a72939': {
name: '按钮拷贝3',
ext: '.png',
uuid: '228b7afa-96aa-4091-8fc3-44dd60a72939',
url: '//yun.duiba.com.cn/spark-dev/assets/a95f70c3f2a9e3256bd2f7758e30a4847c549429.png',
},
'6d2c2e85-a8f6-4c64-99a2-8a9961613478': {
name: '组142',
ext: '.png',
uuid: '6d2c2e85-a8f6-4c64-99a2-8a9961613478',
url: '//yun.duiba.com.cn/spark-dev/assets/3bc8da9aab3a34d6ddf70ddac472d9d75448f5e8.png',
},
'8f0d0cca-228e-49f1-875a-8bf3a807508f': {
name: '矩形88724',
ext: '.png',
uuid: '8f0d0cca-228e-49f1-875a-8bf3a807508f',
url: '//yun.duiba.com.cn/spark-dev/assets/4495f3b462b388b7a6fd8db0dd4e3059f8ce20e3.png',
},
'a908581a-baba-45ea-ae03-5bfc388fe079': {
name: '按钮30',
ext: '.png',
uuid: 'a908581a-baba-45ea-ae03-5bfc388fe079',
url: '//yun.duiba.com.cn/spark-dev/assets/9e75dfbab35efdf93311c886e30037e5b98b4841.png',
},
'cee7f34c-4202-4a6d-90be-91720e869515': {
name: '背景1',
ext: '.png',
uuid: 'cee7f34c-4202-4a6d-90be-91720e869515',
url: '//yun.duiba.com.cn/spark-dev/assets/343baacfc13eb260c8845deaa2223fbbd5671bb5.png',
},
'42ee07fd-8804-4a03-923b-ef168f4f7f61': {
name: '背景2',
ext: '.png',
uuid: '42ee07fd-8804-4a03-923b-ef168f4f7f61',
url: '//yun.duiba.com.cn/spark-dev/assets/8732e1de41bb6fd58e0bc896e9eba5cd3ef16201.png',
},
'99a3a97c-d183-4302-a049-f426084e1c3a': {
name: '背景3',
ext: '.png',
uuid: '99a3a97c-d183-4302-a049-f426084e1c3a',
url: '//yun.duiba.com.cn/spark-dev/assets/bfe97d66e09012b8e89064fa6722e728e0e55aa4.png',
},
'4698ed3c-e8aa-46b9-bfaa-74d62680c611': {
name: '背景4',
ext: '.png',
uuid: '4698ed3c-e8aa-46b9-bfaa-74d62680c611',
url: '//yun.duiba.com.cn/spark-dev/assets/03fbae444d2bb25ccd165354eadf30022d11907e.png',
},
'1dc2fdae-63ee-47a3-8ebe-d62a72b2ec50': {
name: '背景5',
ext: '.png',
uuid: '1dc2fdae-63ee-47a3-8ebe-d62a72b2ec50',
url: '//yun.duiba.com.cn/spark-dev/assets/eaed2b2b75d0350d680ae10a7fab698c16ba2bdc.png',
},
'15f203ae-833c-4378-98ea-597b62966f57': {
name: '按钮66',
ext: '.png',
uuid: '15f203ae-833c-4378-98ea-597b62966f57',
url: '//yun.duiba.com.cn/spark-dev/assets/2f613dd4e3e7dd034cc292796f168370c8151428.png',
},
'eb2523d2-da85-424a-9a33-ff99ef1075be': {
name: '按钮拷贝2',
ext: '.png',
uuid: 'eb2523d2-da85-424a-9a33-ff99ef1075be',
url: '//yun.duiba.com.cn/spark-dev/assets/17484ae891d3f7bf634fc5be99f0729c0e65115e.png',
},
'7c8eb531-2e3c-4d65-9b3f-af0ddf895a8b': {
name: '底45',
ext: '.png',
uuid: '7c8eb531-2e3c-4d65-9b3f-af0ddf895a8b',
url: '//yun.duiba.com.cn/spark-dev/assets/6ae31118f95b60c3dad3936c2a1720bf85398fab.png',
},
'21a3e21f-95cf-4e74-aa04-6c2669c05f6b': {
name: '位置',
ext: '.png',
uuid: '21a3e21f-95cf-4e74-aa04-6c2669c05f6b',
url: '//yun.duiba.com.cn/spark-dev/assets/0dec5ce01c4d12d97de2e4cfca7fff45c33154d6.png',
},
'06bd7555-b087-4360-b51e-d6bf7c36801f': {
name: '底20',
ext: '.png',
uuid: '06bd7555-b087-4360-b51e-d6bf7c36801f',
url: '//yun.duiba.com.cn/spark-dev/assets/cfb3dfde523817424d52b5572d8c20100304ff3f.png',
},
'd5abfc2b-35e2-4c17-892e-20d9ac1aff9b': {
name: 'icon19',
ext: '.png',
uuid: 'd5abfc2b-35e2-4c17-892e-20d9ac1aff9b',
url: '//yun.duiba.com.cn/spark-dev/assets/0bad486e1c1444670bee37ad98aa111e5913eb1f.png',
},
'2655f42f-55f2-43c4-84a6-8f1c543dca87': {
name: '置灰18',
ext: '.png',
uuid: '2655f42f-55f2-43c4-84a6-8f1c543dca87',
url: '//yun.duiba.com.cn/spark-dev/assets/aaa849ec833bb5fc407d0d322d101b78e6203b09.png',
},
'662f2ba7-3cb4-4b78-936f-197b79e24cf3': {
name: '点亮16',
ext: '.png',
uuid: '662f2ba7-3cb4-4b78-936f-197b79e24cf3',
url: '//yun.duiba.com.cn/spark-dev/assets/2edf74a178db75180256beb6d0c959d47e8c0ff8.png',
},
'b27acc5d-3e6d-4cdc-9535-187fd4048e4c': {
name: '标题5',
ext: '.png',
uuid: 'b27acc5d-3e6d-4cdc-9535-187fd4048e4c',
url: '//yun.duiba.com.cn/spark-dev/assets/86dcb7a00970f4cdf8200a06d3290f802ec80b5a.png',
},
'3c938441-6a47-4aa2-a1c5-e022738ed2b4': {
name: 'mask',
ext: '.png',
uuid: '3c938441-6a47-4aa2-a1c5-e022738ed2b4',
url: '//yun.duiba.com.cn/spark-dev/assets/807317256624fc9e2d7aa080a5693b88a1cb0a43.png',
},
'e59f83be-98f7-4c70-b506-f6d983eef50b': {
name: '背景13',
ext: '.png',
uuid: 'e59f83be-98f7-4c70-b506-f6d983eef50b',
url: '//yun.duiba.com.cn/spark-dev/assets/d45ee5e62ff5d4949519996ab4ba602398fb4b95.png',
},
'53942d1f-2b7f-4f33-bbbb-bf39c65f5608': {
name: '按钮关闭弹窗8',
ext: '.png',
uuid: '53942d1f-2b7f-4f33-bbbb-bf39c65f5608',
url: '//yun.duiba.com.cn/spark-dev/assets/a1d01436817deb9d38198c774370ce69835fce66.png',
},
'744a994b-dc9d-4c42-a988-61320f2c0ed9': {
name: '背景7',
ext: '.png',
uuid: '744a994b-dc9d-4c42-a988-61320f2c0ed9',
url: '//yun.duiba.com.cn/spark-dev/assets/e6d483293b94e6230bb19a6de0054f45cb7c7d6d.png',
},
};
export default resList;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tb = require("./lib/tb");
const tbMock = require("./lib/tbMock");
const utils = require("./lib/utils");
const constants = require("./lib/constants");
const capi_1 = require("./lib/capi");
const request_1 = require("./lib/request");
const isH5 = 'undefined' !== typeof window;
// 如果为h5环境走mock数据
let _tb = {};
Object.entries(tb).forEach(([key, value]) => {
_tb[key] = isH5 ? tbMock[key] : value;
});
exports.default = {
capi: capi_1.default,
tb: _tb,
utils,
request: request_1.default,
constants
};
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/index.js"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,uCAAuC;AACvC,qCAAqC;AACrC,6CAA6C;AAC7C,qCAA8B;AAC9B,2CAAoC;AAEpC,MAAM,IAAI,GAAG,WAAW,KAAK,OAAO,MAAM,CAAC;AAE3C,iBAAiB;AACjB,IAAI,GAAG,GAAG,EAAE,CAAC;AACb,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IAC1C,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACxC,CAAC,CAAC,CAAC;AAEH,kBAAe;IACb,IAAI,EAAJ,cAAI;IACJ,EAAE,EAAE,GAAG;IACP,KAAK;IACL,OAAO,EAAP,iBAAO;IACP,SAAS;CACV,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const capi = {
getMyPrizeList: {
handle: 'getMyPrizeList',
isShowLoading: true
},
receiveObjectPrize: 'receiveObjectPrize',
receiveEnamePrize: 'receiveEnamePrize'
};
exports.default = capi;
//# sourceMappingURL=capi.js.map
\ No newline at end of file
{"version":3,"file":"capi.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/capi.js"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG;IACX,cAAc,EAAE;QACd,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,IAAI;KACpB;IACD,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;CACvC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
\ No newline at end of file
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const tb_1 = require("./tb");
const utils_1 = require("./utils");
// 通用API封装方法
const capiFn = (apiList, request) => {
return {
receiveObjectPrize(params) {
return __awaiter(this, void 0, void 0, function* () {
const { handle, method, ext } = utils_1.getRequestParams(apiList['receiveObjectPrize']);
const userAddress = yield tb_1.getUserAddress().catch(err => {
tb_1.commonToast(err.errorMessage);
});
if (userAddress) {
const { name, phone, address } = userAddress.duibaAddress;
commonConfirm('提示', '确认使用该收货地址:' + name + phone + address, () => __awaiter(this, void 0, void 0, function* () {
params = Object.assign({ name,
phone,
address }, params);
const result = yield request(handle, method, params, ext).catch(res => {
tb_1.commonToast(res && res.message);
});
if (result && result.success) {
return true;
}
}));
}
return false;
});
},
receiveEnamePrize(params) {
return __awaiter(this, void 0, void 0, function* () {
const { handle, method, ext } = utils_1.getRequestParams(apiList['receiveEnamePrize']);
const result = yield request(handle, method, params, ext).catch(res => {
tb_1.commonToast(res && res.message);
});
if (result && result.success) {
return true;
}
return false;
});
}
};
};
exports.default = capiFn;
//# sourceMappingURL=capiFn.js.map
\ No newline at end of file
{"version":3,"file":"capiFn.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/capiFn.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAAmD;AACnD,mCAA2C;AAE3C,YAAY;AACZ,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE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AAG,CAAC,EAAE;oBACpE,gBAAW,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;gBAClC,CAAC,CAAC,CAAC;gBACH,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;oBAC5B,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;SAAA;KACF,CAAA;AACH,CAAC,CAAC;AAGF,kBAAe,MAAM,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PRIZE_TYPE = exports.DRAW_STATUS = void 0;
// 领取奖品状态
exports.DRAW_STATUS = {
// 待领取
WAITAWARD: 1,
// 处理中
PROCESSING: 2,
// 领取成功
SUCCESS: 3,
// 领取失败
FAIL: 4,
// 已过期
EXPIRED: 5,
// 重新领取
RETRY: 6
};
// 奖品类型
exports.PRIZE_TYPE = {
ENAME: 1,
CREDITS: 2,
OBJECT: 3,
THANKS: 5
};
//# sourceMappingURL=constants.js.map
\ No newline at end of file
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/constants.js"],"names":[],"mappings":";;;AAAA,SAAS;AACI,QAAA,WAAW,GAAG;IACzB,MAAM;IACN,SAAS,EAAE,CAAC;IACZ,MAAM;IACN,UAAU,EAAE,CAAC;IACb,OAAO;IACP,OAAO,EAAE,CAAC;IACV,OAAO;IACP,IAAI,EAAE,CAAC;IACP,MAAM;IACN,OAAO,EAAE,CAAC;IACV,OAAO;IACP,KAAK,EAAE,CAAC;CACT,CAAA;AAED,OAAO;AACM,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAC"}
\ No newline at end of file
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const AMS_URL = 'https://ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri=';
const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
if (!cloud) {
console.error('请传入cloud');
return false;
}
if (!cloudName) {
console.error('请传入云函数名称');
return false;
}
return (handle, method, params, ext = {}) => __awaiter(void 0, void 0, void 0, function* () {
const { activityId } = getApp();
// 默认注入activityId
params = Object.assign({ activityId }, params);
if (!params.activityId) {
console.error(`${handle}:请传入activityId`);
return false;
}
const _cloudName = ext.cloudName || cloudName;
const { isShowLoading } = ext;
const hideMyLoading = () => {
if (isShowLoading) {
my.hideLoading();
}
};
if (isShowLoading) {
my.showLoading();
}
const requestAms = () => {
return new Promise((resolve, reject) => {
my.request({
url: AMS_URL + _cloudName + '.' + handle,
method,
data: params,
dataType: 'json'
}).then(({ data: res }) => {
hideMyLoading();
if (res && res.success) {
resolve(res);
}
else {
reject(res);
}
}).catch(() => {
hideMyLoading();
reject();
});
});
};
const requestCloud = () => {
return new Promise((resolve, reject) => {
cloud.function.invoke(_cloudName, params, handle).then(res => {
console.log(handle, params, res);
hideMyLoading();
if (res && res.success) {
resolve(res);
}
else {
reject(res);
}
return res;
}).catch(() => {
hideMyLoading();
reject();
});
});
};
return requestType === 'ams' ? requestAms() : requestCloud();
});
};
exports.default = request;
//# sourceMappingURL=request.js.map
\ No newline at end of file
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/request.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,OAAO,GAAG,iFAAiF,CAAC;AAElG,M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, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.textRiskIdentification = exports.chattingSendCard = exports.uploadImage = exports.getImageInfo = exports.chooseImage = exports.getUserAddress = exports.createAudio = exports.openDetail = exports.checkGoodsCollectedStatus = exports.collectGoods = exports.getServerTime = exports.redirectTo = exports.navigateTo = exports.navigateToOutside = exports.checkShopFavoredStatus = exports.favorShop = exports.getSystemInfo = exports.getAuthUserInfo = exports.commonConfirm = exports.simpleAlert = exports.commonToast = void 0;
/**
* 通用toast
* @param {string} content toast内容
* @param {number} duration 显示时长
* @param {function} successCb 成功回调
*/
exports.commonToast = (content, duration = 3000, successCb) => {
my.showToast({
content: content || '换个姿势再试一次~',
duration,
success: successCb
});
};
/**
* 简易alert
* @param {string} content toast内容
*/
exports.simpleAlert = content => {
my.alert({
content
});
};
/**
* 通用确认弹窗
* @param {string} title 标题
* @param {string} content 内容
* @param {function} successCb 成功回调
*/
exports.commonConfirm = (title = '提示', content, successCb) => {
my.confirm({
title,
content,
confirmButtonText: '确定',
cancelButtonText: '取消',
success: result => {
const { confirm } = result;
if (confirm) {
successCb && successCb();
}
}
});
};
/**
* 获取授权用户信息
* @returns {object} 用户登录信息
*/
exports.getAuthUserInfo = () => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
my.authorize({
scopes: 'scope.userInfo',
success: () => {
my.getAuthUserInfo({
success: userInfo => {
resolve(userInfo);
},
fail: err => {
reject(err);
}
});
},
fail: err => {
reject(err);
}
});
});
});
/**
* 获取系统信息
* @returns {object} 小程序系统信息
*/
exports.getSystemInfo = () => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
my.getSystemInfo({
success: res => {
resolve(res);
},
fail: err => {
reject(err);
}
});
});
});
/**
* 执行关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
exports.favorShop = (sellerId) => __awaiter(void 0, void 0, void 0, function* () {
if (!sellerId) {
console.error('favorShop: 请传入卖家Id');
return false;
}
return new Promise((resolve, reject) => {
my.tb.favorShop({
id: +sellerId,
success: res => {
resolve(res);
},
fail: err => {
if (err.error === 11) {
// error code 11 为用户取消操作不认作失败场景
resolve(false);
}
reject(err);
}
});
});
});
/**
* 判断是否关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
exports.checkShopFavoredStatus = (sellerId) => __awaiter(void 0, void 0, void 0, function* () {
if (!sellerId) {
console.error('checkShopFavoredStatus: 请传入卖家Id');
return false;
}
return new Promise((resolve, reject) => {
my.tb.checkShopFavoredStatus({
id: +sellerId,
success: res => {
resolve(res.isFavor);
},
fail: err => {
reject(err);
}
});
});
});
/**
* 跳转到外部链接
* @param {string} url 跳转链接
*/
exports.navigateToOutside = url => {
if (!url) {
console.error('navigateToOutside: 请传入url');
return false;
}
my.call('navigateToOutside', { url });
};
/**
* 跳转到内部链接(新开窗口)
* @param {string} url 跳转链接
*/
exports.navigateTo = url => {
if (!url) {
console.error('navigateTo: 请传入url');
return false;
}
my.navigateTo({ url });
};
/**
* 跳转到内部链接(不新开窗口)
* @param {string} url 跳转链接
*/
exports.redirectTo = url => {
if (!url) {
console.error('redirectTo: 请传入url');
return false;
}
my.redirectTo({ url });
};
/**
* 获取服务器时间
* @returns {number} 服务器时间戳
*/
exports.getServerTime = () => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
my.getServerTime({
success: res => {
resolve(res.time);
},
fail: err => {
reject(err);
}
});
});
});
/**
* 收藏商品
* @param {number} 商品id
* @returns {object} 收藏结果
*/
exports.collectGoods = (id) => __awaiter(void 0, void 0, void 0, function* () {
if (!id) {
console.error('collectGoods: 请传入商品id');
return false;
}
return new Promise((resolve, reject) => {
my.tb.collectGoods({
id: +id,
success: res => {
resolve(res);
},
fail: err => {
if (err.error === 11) {
// error code 11 为用户取消操作不认作失败场景
resolve(false);
}
reject(err);
}
});
});
});
/**
* 查询商品收藏状态
* @param {number} 商品id
* @returns {boolean} 商品收场状态
*/
exports.checkGoodsCollectedStatus = (id) => __awaiter(void 0, void 0, void 0, function* () {
if (!id) {
console.error('checkGoodsCollectedStatus: 请传入商品id');
return false;
}
return new Promise(resolve => {
my.tb.checkGoodsCollectedStatus({
id: +id,
success: res => {
resolve(res.isCollect);
}
});
});
});
/**
* 跳转到淘宝商品页
* @param {string} itemId 商品ID
*/
exports.openDetail = (itemId) => __awaiter(void 0, void 0, void 0, function* () {
if (!itemId) {
console.error('openDetail: 请传入商品id');
return false;
}
return new Promise((resolve, reject) => {
my.tb.openDetail({
itemId: itemId + '',
success: res => {
resolve(res);
},
fail: res => {
reject(res);
}
});
});
});
/**
* 创建音频类
*/
class AudioModel {
constructor(opts = {}) {
const { src } = opts;
if (!src) {
console.error('请输入音频链接');
return false;
}
try {
const innerAudioContext = my.createInnerAudioContext();
Object.keys(opts).forEach(item => {
innerAudioContext[item] = opts[item];
});
return innerAudioContext;
}
catch (e) {
console.error('当前版本不支持音频');
}
}
}
/**
* 创建音频实例
* @param {object} opts 配置对象 例 { src: '音频链接', autoplay: false }
*/
exports.createAudio = opts => {
const audioInstance = new AudioModel(opts);
return audioInstance;
};
/**
* 获取淘宝用户收货地址
*/
exports.getUserAddress = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
let defaults = {
addAddress: 'show',
searchAddress: 'hide',
locateAddress: 'hide',
joinTag: '' // 分割收货地址符号(淘宝商家有特定发货需求)
};
let _opts = Object.assign({}, defaults, opts);
return new Promise((resolve, reject) => {
my.authorize({
scopes: 'scope.addressList',
success: () => {
const { addAddress, searchAddress, locateAddress, joinTag } = _opts;
if (!my.tb.chooseAddress) {
reject({
noSupport: true,
errorMessage: '当前版本不支持选择收货地址,请升级到最新版本'
});
return false;
}
my.tb.chooseAddress({
addAddress,
searchAddress,
locateAddress
}, res => {
const { error, provinceName, countyName, cityName, streetName, detailInfo, name, telNumber } = res;
// 如果有error为用户取消操作不做操作
if (error) {
resolve(false);
}
else {
resolve(Object.assign(Object.assign({}, res), { duibaAddress: {
name,
phone: telNumber,
address: [provinceName, cityName, countyName, streetName, detailInfo].join(joinTag)
} }));
}
}, res => {
reject(res);
});
}
});
});
});
/**
* 选择图片
*/
exports.chooseImage = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
let defaults = {
count: 1,
sourceType: ['camera', 'album'],
compressLevel: 1
};
let _opts = Object.assign({}, defaults, opts);
const { count, sourceType, compressLevel } = _opts;
return new Promise((resolve, reject) => {
if (!my.chooseImage) {
reject({
noSupport: true,
errorMessage: '当前版本不支持选择收货地址,请升级到最新版本'
});
return false;
}
my.chooseImage({
count,
sourceType,
success: res => {
my.compressImage({
apFilePaths: res.apFilePaths,
level: compressLevel,
success: data => {
resolve(data);
},
fail: err => {
resolve(err);
}
});
},
fail: err => {
// error code 2001 为摄像头授权取消、ios 11为用户取消操作不认作失败场景 、安卓 为1
if (err.error !== 2001 && err.error !== 11 && err.error !== 1) {
reject(err);
}
else {
resolve(false);
}
}
});
});
});
/**
* 获取图片信息
* @param {string} src 图片地址
*/
exports.getImageInfo = (src) => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
my.getImageInfo({
src,
success: res => {
resolve(res);
},
fail: err => {
reject(err);
}
});
});
});
/**
* 获取图片信息
* @param {*} opts chooseImage配置参数
*/
exports.uploadImage = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
const { cloud } = getApp();
if (!cloud) {
console.error('chattingSendCard: 请传入app.cloud');
return false;
}
const chooseImageResult = yield exports.chooseImage(opts).catch(err => {
exports.commonToast(err && (err.errorMessage || '选择图片失败'));
});
if (chooseImageResult) {
const { apFilePaths } = chooseImageResult;
const filePath = apFilePaths[0];
const imageInfo = yield exports.getImageInfo(filePath).catch(err => {
exports.commonToast(err && err.errorMessage);
});
// 找不到图片信息
if (!imageInfo) {
return false;
}
const { path: imagePath } = imageInfo;
const { url } = yield cloud.file.uploadFile({
filePath,
fileType: 'image',
fileName: imagePath.split('/').pop()
});
return url;
}
return false;
});
/**
* 分享到群聊卡片
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
exports.chattingSendCard = (requestInfo) => __awaiter(void 0, void 0, void 0, function* () {
const { cloud } = getApp();
if (!cloud) {
console.error('chattingSendCard: 请传入app.cloud');
return false;
}
if (!requestInfo) {
console.error('chattingSendCard: 请传入卡片请求参数');
return false;
}
return new Promise((resolve, reject) => {
my.authorize({
scopes: 'scope.groupChat',
success: () => __awaiter(void 0, void 0, void 0, function* () {
const result = yield cloud.topApi
.invoke({
api: 'taobao.chatting.platform.message.sendcard',
data: { request_info: JSON.stringify(requestInfo) }
})
.catch(err => {
reject(err);
});
if (result) {
const { error } = result;
if (error) {
resolve(false);
}
else {
resolve(result);
}
}
}),
fail: err => {
if (err.error === 11) {
// error code 11 为用户取消操作不认作失败场景
resolve(false);
}
reject(err);
}
});
});
});
/**
* 分享到群聊卡片
* @param {*} cloud 小程序云
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
exports.textRiskIdentification = (text) => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
if (!my.tb.textRiskIdentification) {
reject({
noSupport: true,
errorMessage: '不支持文本校验'
});
}
my.tb.textRiskIdentification({
data: {
text
},
success: res => {
if (res.data && res.data.result) {
const { suggestion } = res.data.result;
if (suggestion === 'pass') {
resolve(true);
}
}
resolve(false);
},
fail: err => {
reject(err);
},
});
});
});
//# sourceMappingURL=tb.js.map
\ No newline at end of file
{"version":3,"file":"tb.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/tb.js"],"names":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AAC;YAC3B,IAAI,EAAC;gBACH,IAAI;aACL;YACD,OAAO,EAAE,GAAG,CAAC,EAAE;gBACb,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE;oBAC/B,MAAM,EAAE,UAAU,EAAE,GAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;oBACtC,IAAI,UAAU,KAAK,MAAM,EAAE;wBACzB,OAAO,CAAC,IAAI,CAAC,CAAC;qBACf;iBACF;gBACD,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC;YACD,IAAI,EAAE,GAAG,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,CAAA;YACb,CAAC;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA,CAAA"}
\ No newline at end of file
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.textRiskIdentification = exports.chattingSendCard = exports.uploadImage = exports.getImageInfo = exports.chooseImage = exports.getUserAddress = exports.openDetail = exports.checkGoodsCollectedStatus = exports.collectGoods = exports.getServerTime = exports.redirectTo = exports.navigateTo = exports.navigateToOutside = exports.checkShopFavoredStatus = exports.favorShop = exports.getSystemInfo = exports.getAuthUserInfo = exports.commonConfirm = exports.simpleAlert = exports.commonToast = void 0;
/**
* 通用toast
* @param {string} content toast内容
* @param {number} duration 显示时长
* @param {function} successCb 成功回调
*/
exports.commonToast = (content, duration = 3000, successCb) => {
return '暂不支持toast';
};
/**
* 简易alert
* @param {string} content toast内容
*/
exports.simpleAlert = content => {
alert(content);
};
/**
* 通用确认弹窗
* @param {string} title 标题
* @param {string} content 内容
* @param {function} successCb 成功回调
*/
exports.commonConfirm = (title = '提示', content, successCb) => {
my.confirm({
title,
content,
confirmButtonText: '确定',
cancelButtonText: '取消',
success: result => {
const { confirm } = result;
if (confirm) {
successCb && successCb();
}
}
});
};
/**
* 获取授权用户信息
* @returns {object} 用户登录信息
*/
exports.getAuthUserInfo = () => __awaiter(void 0, void 0, void 0, function* () {
return {
nickName: 'nickName',
avatar: '123',
mixNick: '1234'
};
});
/**
* 获取系统信息
* @returns {object} 小程序系统信息
*/
exports.getSystemInfo = () => __awaiter(void 0, void 0, void 0, function* () {
return {
version: '9.5.0'
};
});
/**
* 执行关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
exports.favorShop = (sellerId) => __awaiter(void 0, void 0, void 0, function* () {
if (!sellerId) {
console.error('favorShop: 请传入卖家Id');
return false;
}
return {};
});
/**
* 判断是否关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
exports.checkShopFavoredStatus = (sellerId) => __awaiter(void 0, void 0, void 0, function* () {
if (!sellerId) {
console.error('checkShopFavoredStatus: 请传入卖家Id');
return false;
}
return true;
});
/**
* 跳转到外部链接
* @param {string} url 跳转链接
*/
exports.navigateToOutside = url => {
if (!url) {
console.error('navigateToOutside: 请传入url');
return false;
}
window.location = url;
};
/**
* 跳转到内部链接(新开窗口)
* @param {string} url 跳转链接
*/
exports.navigateTo = url => {
if (!url) {
console.error('navigateTo: 请传入url');
return false;
}
window.location = url;
};
/**
* 跳转到内部链接(不新开窗口)
* @param {string} url 跳转链接
*/
exports.redirectTo = url => {
if (!url) {
console.error('redirectTo: 请传入url');
return false;
}
window.replace(url);
};
/**
* 获取服务器时间
* @returns {number} 服务器时间戳
*/
exports.getServerTime = () => __awaiter(void 0, void 0, void 0, function* () {
return +new Date();
});
/**
* 收藏商品
* @param {number} 商品id
* @returns {object} 收藏结果
*/
exports.collectGoods = (id) => __awaiter(void 0, void 0, void 0, function* () {
if (!id) {
console.error('collectGoods: 请传入商品id');
return false;
}
return {};
});
/**
* 查询商品收藏状态
* @param {number} 商品id
* @returns {boolean} 商品收场状态
*/
exports.checkGoodsCollectedStatus = (id) => __awaiter(void 0, void 0, void 0, function* () {
if (!id) {
console.error('checkGoodsCollectedStatus: 请传入商品id');
return false;
}
return true;
});
/**
* 跳转到淘宝商品页
* @param {string} itemId 商品ID
*/
exports.openDetail = (itemId) => __awaiter(void 0, void 0, void 0, function* () {
if (!itemId) {
console.error('openDetail: 请传入商品id');
return false;
}
window.location = 'https://item.taobao.com/item.htm?id=' + itemId;
});
/**
* 获取淘宝用户收货地址
*/
exports.getUserAddress = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
return {
name: 1,
phone: 1,
address: 123
};
});
/**
* 选择图片
*/
exports.chooseImage = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
let defaults = {
count: 1,
sourceType: ['camera', 'album'],
compressLevel: 1
};
let _opts = Object.assign({}, defaults, opts);
const { count, sourceType, compressLevel } = _opts;
return new Promise((resolve, reject) => {
if (!my.chooseImage) {
reject({
noSupport: true,
errorMessage: '当前版本不支持选择收货地址,请升级到最新版本'
});
return false;
}
my.chooseImage({
count,
sourceType,
success: res => {
my.compressImage({
apFilePaths: res.apFilePaths,
level: compressLevel,
success: data => {
resolve(data);
},
fail: err => {
resolve(err);
}
});
},
fail: err => {
// error code 2001 为摄像头授权取消、ios 11为用户取消操作不认作失败场景 、安卓 为1
if (err.error !== 2001 && err.error !== 11 && err.error !== 1) {
reject(err);
}
else {
resolve(false);
}
}
});
});
});
/**
* 获取图片信息
* @param {string} src 图片地址
*/
exports.getImageInfo = (src) => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
my.getImageInfo({
src,
success: res => {
resolve(res);
},
fail: err => {
reject(err);
}
});
});
});
/**
* 获取图片信息
* @param {*} opts chooseImage配置参数
*/
exports.uploadImage = (opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
const { cloud } = getApp();
if (!cloud) {
console.error('chattingSendCard: 请传入app.cloud');
return false;
}
const chooseImageResult = yield exports.chooseImage(opts).catch(err => {
exports.commonToast(err && (err.errorMessage || '选择图片失败'));
});
if (chooseImageResult) {
const { apFilePaths } = chooseImageResult;
const filePath = apFilePaths[0];
const imageInfo = yield exports.getImageInfo(filePath).catch(err => {
exports.commonToast(err && err.errorMessage);
});
// 找不到图片信息
if (!imageInfo) {
return false;
}
const { path: imagePath } = imageInfo;
const { url } = yield cloud.file.uploadFile({
filePath,
fileType: 'image',
fileName: imagePath.split('/').pop()
});
return url;
}
return false;
});
/**
* 分享到群聊卡片
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
exports.chattingSendCard = (requestInfo) => __awaiter(void 0, void 0, void 0, function* () {
alert('无法模拟');
return false;
});
/**
* 分享到群聊卡片
* @param {*} cloud 小程序云
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
exports.textRiskIdentification = (text) => __awaiter(void 0, void 0, void 0, function* () {
return true;
});
//# sourceMappingURL=tbMock.js.map
\ No newline at end of file
{"version":3,"file":"tbMock.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/tbMock.js"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;GAKG;AACU,QAAA,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,EAAE,SAAS,EAAE,EAAE;IACjE,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF;;;GAGG;AACU,QAAA,WAAW,GAAG,OAAO,CAAC,EAAE;IACnC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,aAAa,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;IAChE,EAAE,CAAC,OA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AG,WAAW,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,MAAM,oBAAY,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACzD,mBAAW,CAAC,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,UAAU;QACV,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,KAAK,CAAC;SACd;QACD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1C,QAAQ;YACR,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE;SACrC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;KACZ;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAA,CAAA;AAED;;;GAGG;AACU,QAAA,gBAAgB,GAAG,CAAO,WAAW,EAAE,EAAE;IACpD,KAAK,CAAC,MAAM,CAAC,CAAC;IACd,OAAO,KAAK,CAAC;AACf,CAAC,CAAA,CAAC;AAEF;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,CAAO,IAAI,EAAE,EAAE;IACnD,OAAO,IAAI,CAAC;AACd,CAAC,CAAA,CAAA"}
\ No newline at end of file
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateAPI = exports.getRequestParams = exports.versionCompare = exports.dateFormatter = void 0;
const capiFn_1 = require("./capiFn");
/**
* 时间格式化
* @param date 接收可以被new Date()方法转换的内容
* @param format 字符串,需要的格式例如:'yyyy/MM/dd hh:mm:ss'
* @returns {String}
*/
exports.dateFormatter = (date, format = 'yyyy/MM/dd') => {
if (!date)
return '-';
date = new Date(typeof date === 'string' && isNaN(date) ? date.replace(/-/g, '/') : date);
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
S: date.getMilliseconds()
};
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (let k in o) {
if (new RegExp('(' + k + ')').test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
}
}
return format;
};
/**
* 版本比较
* @param {string} cur 当前版本
* @param {string} compare 比较版本
*/
exports.versionCompare = (cur, compare) => {
const _cur = cur.split('.');
const _compare = compare.split('.');
if (+_cur[0] < +_compare[0]) {
return false;
}
else if (+_cur[0] === +_compare[0] && +_cur[1] < +_compare[1]) {
return false;
}
else if (+_cur[0] === +_compare[0] && +_cur[1] === +_compare[1] && +_cur[2] < +_compare[2]) {
return false;
}
return true;
};
/**
* 获取request请求所需参数
* @param {object/string} value API项配置
*/
exports.getRequestParams = value => {
if (typeof value === 'string') {
return {
handle: value,
method: 'POST',
ext: {}
};
}
else if (typeof value === 'object') {
const { handle, method = 'POST' } = value, ext = __rest(value, ["handle", "method"]);
return {
handle,
method,
ext: Object.assign({}, ext)
};
}
else {
console.error('getRequestParams: 传参有误');
}
};
/**
* 生成API
* @param {array} apiList API数据数组
* @param {function} request 请求
*/
exports.generateAPI = (apiList, request) => {
const api = {};
Object.entries(apiList).forEach(([key, value]) => {
const { handle, method, ext } = exports.getRequestParams(value);
api[key] = params => request(handle, method, params, ext);
});
api.fn = capiFn_1.default(apiList, request);
return api;
};
//# sourceMappingURL=utils.js.map
\ No newline at end of file
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/packages/jsx2taobao/template/api/tbcc-sdk/lib/utils.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8B;AAC9B;;;;;GAKG;AACU,QAAA,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,EAAE;IAC3D,IAAI,CAAC,IAAI;QAAE,OAAO,GAAG,CAAC;IAEtB,IAAI,GAAG,IAAI,IAAI,CACb,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACzE,CAAC;IACF,IAAI,CAAC,GAAG;QACN,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;QACzB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;QACrB,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;QACvB,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;QACvB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE;KAC1B,CAAC;IACF,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACvB,MAAM,GAAG,MAAM,CAAC,OAAO,CACrB,MAAM,CAAC,EAAE,EACT,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CACvD,CAAC;KACH;IACD,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE;QACf,IAAI,IAAI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AO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;GAGG;AACU,QAAA,gBAAgB,GAAG,KAAK,CAAC,EAAE;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO;YACL,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,EAAE;SACR,CAAA;KACF;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACpC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,KAAa,KAAK,EAAb,GAAG,UAAK,KAAK,EAA3C,oBAAmC,CAAQ,CAAC;QAClD,OAAO;YACL,MAAM;YACN,MAAM;YACN,GAAG,oBAAO,GAAG,CAAE;SAChB,CAAA;KACF;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;KACzC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACU,QAAA,WAAW,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IAC9C,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC/C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,wBAAgB,CAAC,KAAK,CAAC,CAAC;QACxD,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,EAAE,GAAG,gBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
\ No newline at end of file
/**
* 通用toast
* @param {string} content toast内容
* @param {number} duration 时长
*/
export const commonToast = (content, duration = 3000) => {
my.showToast({
content:content || '请稍后再试~',
duration
});
}
/**
* 跳转到内部链接(新开窗口)
* @param {string} url 跳转链接
*/
export const navigateTo = url => my.navigateTo({ url });
/**
* 跳转到内部链接(不新开窗口)
* @param {string} url 跳转链接
*/
export const redirectTo = url => my.redirectTo({ url });
/**
* 时间格式化
* @param date 接收可以被new Date()方法转换的内容
* @param format 字符串,需要的格式例如:'yyyy-MM-dd hh:mm:ss'
* @returns {String}
*/
export const dateFormatter = (date, format = 'yyyy-MM-dd') => {
if (!date) return '-';
date = new Date(typeof date === 'string' && isNaN(date) ? date.replace(/-/g, '/') : date);
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
'S': date.getMilliseconds()
};
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (let k in o) {
if (new RegExp('(' + k + ')').test(format)) {
format = format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
}
}
return format;
};
\ 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