Commit b91211ab authored by wildfirecode13's avatar wildfirecode13

1

parent b4cb02cc
No preview for this file type
.DS_Store
node_modules/
.tea/
\ No newline at end of file
import request from './utils/request'; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const API = { const app = getApp();
// 获取首页接口 const { tbcc, cloudName, cloud, requestType } = app;
getCollectItemList: params => request('getCollectItemList', 'POST', params), const { utils: { generateAPI }, request: tbccRequest, capi } = tbcc;
const apicfg_1 = require("./apicfg");
doTaskComplete: params => request('doTaskComplete', 'POST', params), const request = tbccRequest({
cloud,
// 经验排行榜 cloudName,
getExpRankList: params => request('getExpRankList', 'POST', params, { isShowLoading: true }), requestType
});
// 登录接口 // api handle 列表
login: params => request('login', 'POST', params, { cloudName: 'bubbleSurviva' }), const apiList = Object.assign(Object.assign({}, capi), apicfg_1.default);
// 生成API
//领取任务奖励 takeTaskPrize const API = generateAPI(apiList, request);
takeTaskPrize: params => request('takeTaskPrize', 'POST', params), exports.default = API;
//# sourceMappingURL=api.js.map1
// 获取我的奖品 \ No newline at end of file
getMyPrizeList: params => request('getMyPrizeList', 'POST', params, { cloudName: 'bubbleSurviva' }),
// 购买商品
getGoodsList: params => request('getGoodsList', 'POST', params, { cloudName: 'bubbleSurviva' }),
// 实物领取
receiveObjectPrize: params => request('receiveObjectPrize', 'POST', params, { cloudName: 'bubbleSurviva' }),
// 非实物领取
receivePrize: params => request('receiveEnamePrize', 'POST', params, { cloudName: 'bubbleSurviva' }),
//是否可助力
canAssist: params => request('canAssist', 'POST', params, { cloudName: 'bubbleSurviva' }),
//邮费标识
postageMark: params => request('postageMark', 'POST', params, { cloudName: 'bubbleSurviva' }),
//是否可助力
canAssist: params => request('canAssist', 'POST', params, { cloudName: 'bubbleSurviva' }),
//助力
assist: params => request('assist', 'POST', params, { cloudName: 'bubbleSurviva' }),
//小样奖品弹框提示
samplePop: params => request('samplePop', 'POST', params, { cloudName: 'bubbleSurviva' }),
//数据埋点
addDataUv: params => request('addDataUv', 'POST', params, { cloudName: 'bubbleSurviva' }),
};
export default API;
{"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
page {
background: #f7f7f7;
font-family: 'Helvetica Neue', Helvetica, Hiragino Sans GB, 'Microsoft Yahei', STHeiTi, Arial, sans-serif;
}
* {
box-sizing: border-box;
}
.d-flex {
display: flex
}
.d-flex__item {
flex: 1;
}
.d-flex--aligncenter {
align-items: center;
}
.modal-animate-fade-in {
opacity: 0;
animation: modalAnimateFadeIn .3s forwards;
}
.modal-animate-zoom-in {
transform: scale(0);
animation: modalAnimateZoomIn .3s forwards;
}
.modal-animate-fly-in {
transform: translateY(100%);
animation: modalAnimateFlyIn .3s forwards;
}
.btn-animate-pulse {
animation: btnAnimatePulse .8s infinite;
}
@keyframes modalAnimateFadeIn {
to {
opacity: 1;
}
}
@keyframes modalAnimateZoomIn {
to {
transform: scale(1);
}
}
@keyframes modalAnimateFlyIn {
to {
transform: translateY(0);
}
}
@keyframes btnAnimatePulse {
from {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
to {
transform: scale(1);
}
}
\ No newline at end of file
import cloud from '@tbmp/mp-cloud-sdk'; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
cloud.init({ const mp_cloud_sdk_1 = require("@tbmp/mp-cloud-sdk");
env: 'online' // 云函数环境 test 测试环境 online 线上环境 const tbcc_sdk_1 = require("./tbcc-sdk");
mp_cloud_sdk_1.default.init({
env: 'test' // 云函数环境 test 测试环境 online 线上环境
}); });
App({ App({
requestType: 'cloud', // ams:ams接口,cloud: 云函数 requestType: 'cloud',
cloudName: 'bubbleSurviva', // 主云函数项目名 duiba cloudName: '',
cloud, cloud: // 主云函数项目名
sellerId: 880734502,//固定 mp_cloud_sdk_1.default,
smallKidItemId: '625760427170',//小样商品ID tbcc: tbcc_sdk_1.default,
onLaunch(options) { activityId: "",
this.handleQuery(options.query || {}); onLaunch(options) {
console.log('onLaunch') this.handleQuery(options.query || {});
}, console.log('onLauch')
onShow(options) { },
// 从后台被 scheme 重新打开 onShow(options) {
// 从后台被 scheme 重新打开
}, },
/** /**
* 处理链接参数 * 处理链接参数
* @param {object} query 小程序链接上的参数 * @param {object} query 小程序链接上的参数
*/ */
handleQuery(query) { handleQuery(query) {
const { activityId,isAssist,inviteId } = query; const { activityId } = query;
this.activityId = activityId || '5f34e1c4964f9706aa7d803c';//5ef1903a9897b43b31bb651a activityId && (this.activityId = activityId);
this.isAssist=isAssist; }
this.inviteId=inviteId;
}
}); });
//# sourceMappingURL=app.js.map
\ No newline at end of file
{ {
"pages": [ "pages": ["pages/pagecanvas/pagecanvas", "pages/pagemycanvaspage/pagemycanvaspage"],
"pages/index/index", "window": {
"pages/myPrize/myPrize", "enableSkia": "true",
"pages/goodsPage/goodsPage", "allowsBounceVertical":"NO"
"pages/helpPage/helpPage" }
], }
"window": { \ No newline at end of file
"navigationBarForceEnable": true,
"defaultTitle": "",
"enableSkia": "true"
}
}
.adopt-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
}
.adopt-modal__shade {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.75);
}
.adopt-modal__container {
position: absolute;
top: 50%;
left: 50%;
margin-left: -325rpx;
margin-top: -324rpx;
width: 650rpx;
height: 648rpx;
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/adoptBg.png") no-repeat;
background-size: 100%;
}
.adopt_xj {
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/adopt_xj.png") no-repeat;
background-size: 100%;
}
.adopt_xm {
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/adopt_xm.png") no-repeat;
background-size: 100%;
}
.adopt_xk {
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/adopt_xk.png") no-repeat;
background-size: 100%;
}
.adopt-modal__bd {
font-size: 28rpx;
text-align: center;
color: #fff;
padding: 50rpx 0;
}
.adopt-modal__close {
position: absolute;
right: -20rpx;
top: -80rpx;
height: 75rpx;
width: 85rpx;
/* background: url('../../assets/modal_close_btn.png') center center no-repeat; */
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/close.png") no-repeat;
background-size: 100%;
z-index: 9;
}
.adopt-modal_introduce{
position: absolute;
left: 0;
top: 378rpx;
width: 100%;
color: #4d2716;
font-size: 29rpx;
text-align: center;
}
.adopt-modal_input{
border:0;
position: absolute;
left: 78rpx;
top: 300rpx;
/* margin-left: -225rpx; */
width: 450rpx;
height: 66rpx;
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/inputBg.png") no-repeat;
background-size: 100%;
}
.adopt-modal_input input {
/* position: absolute;
top: 0;
width: 631px;
height: 91px; */
width: 450rpx;
height: 66rpx;
border: 0;
background-color: rgba(0, 0, 0, 0);
font-size: 12px;
text-align: left;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
color: #4d2716;
}
input::-webkit-input-placeholder {
color: #4d2716;
font-size: 12px;
text-align: center;
}
.adopt-modal_resetBtn{
position: absolute;
left: 0;
bottom: 34rpx;
width: 100%;
color: #4d2716;
font-size: 32rpx;
text-align: center;
}
.adopt-modal__tz {
position: absolute;
left: 545rpx;
top: 291rpx;
width: 68rpx;
height: 77rpx;
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/tz.png") no-repeat;
background-size: 100%;
}
.adopt-modal__confirm-btn {
position: absolute;
left: 50%;
margin-left: -165rpx;
bottom: 84rpx;
width: 330rpx;
height: 104rpx;
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/adoptBtn.png") no-repeat;
background-size: 100%;
}
<view class="adopt-modal">
<view class="adopt-modal__shade modal-animate-fade-in" />
<view class="adopt-modal__container modal-animate-zoom-in {{type==1?'adopt_xj':type==2?'adopt_xm':'adopt_xk'}} ">
<view class="adopt-modal__close" onTap="onModalClose" />
<view class="adopt-modal_input">
<input placeholder="给你的松鼠取个名字吧!(6字以内)" value="{{randomName}}" maxlength="6" onInput="onChangeInput" />
</view>
<view class="adopt-modal_introduce">快快领它回家,陪它长大吧!</view>
<view class="adopt-modal__tz" onTap="handelRandomName"></view>
<view onTap="onModalConfirm" class="adopt-modal__confirm-btn"></view>
<view class="adopt-modal_resetBtn" onTap="onModalClose">重新选择</view>
</view>
</view>
import { commonToast } from "../../utils/utils";
const SYSTEMNAME = [
"鼠苹果",
"鼠蜜桃",
"鼠木瓜",
"鼠香橙",
"鼠葡萄",
"鼠冻梨",
"鼠狮子",
"鼠猴子",
"鼠悟空",
"鼠八戒",
"鼠白雪",
"鼠雪花",
"鼠吐吐",
"鼠典典",
"鼠璐璐",
"鼠奔奔",
"鼠蜡烛",
"鼠宁宁",
"鼠卡卡",
"鼠艾西",
"鼠蓝宝",
"鼠麒麟",
"鼠淘淘",
"鼠泰山",
"鼠帅哥",
"鼠西瓜",
"鼠瑞拉",
"鼠妞妞",
"鼠圆圆",
"鼠盐盐",
"鼠太子",
"鼠恺撒",
"鼠哈哈",
"鼠公子",
"鼠洛忧",
"鼠迪尔",
"鼠洛洛",
"鼠七喜",
"鼠四傻",
"鼠乖乖",
"鼠米奇",
"鼠柯基",
"鼠跳跳",
"鼠淘气",
"鼠豹子",
"鼠扑扑",
"鼠麻团",
"鼠来福",
"鼠波利",
"鼠安琪",
"鼠瑞瑞",
"鼠洛克",
"鼠基诺",
"鼠莎莉",
"鼠绵绵",
"鼠仙缔",
"鼠长毛",
"鼠米菲",
"鼠公爵",
"鼠宝马",
"鼠柯弟",
"鼠贝贝",
"鼠金金",
"鼠导弹",
"鼠西西",
"鼠阿郎",
"鼠本伟",
"鼠彦祖",
"鼠棉花",
"鼠丝丝",
"鼠安娜",
"鼠玛吉",
"鼠优卡",
"鼠耐克",
"鼠尼卡",
"鼠元帅",
"鼠懒懒",
"鼠兰兰",
"鼠艾米",
"鼠团团",
"鼠贝塔",
"鼠雪郎",
"鼠罗杰",
"鼠伯通",
"鼠满意",
"鼠大象",
"鼠天天",
"鼠妖妖",
"鼠小杰",
"鼠傻傻",
"鼠鼎鼎",
"鼠钢炮",
"鼠果冻",
"鼠依恋",
"鼠思诺",
"鼠白宫",
"鼠萨萨",
"鼠贝茜",
"鼠苏拉",
"鼠黑虎",
"鼠格格",
"鼠梅西",
"鼠肥肥",
"鼠饭团",
"鼠米莉",
"鼠绅士",
"鼠旋风",
"鼠白龙",
"鼠泪恩",
"鼠多多",
"鼠彼利",
"鼠巴特",
"鼠丸子",
"鼠拉索",
"鼠苏苏",
"鼠灵宝",
"鼠卡索",
"鼠晨晨",
"鼠露露",
"鼠黑狼",
"鼠盒子",
"鼠大款",
"鼠大海",
"鼠正男",
"鼠咪咪",
"鼠肉肉",
"鼠莱多",
"鼠棒棒",
"鼠乐乐",
"鼠康熙",
"鼠米可",
"鼠辛缔",
"鼠白虎",
"鼠路路",
"鼠巴顿"
];
Component({
data: {
inputVal: "",
randomName: "",
type:1
},
didMount() {
// 页面显示
let { type } = this.props
console.log("typetypetype-=-=-",type)
// this.type = type;
this.setData({
type
});
},
methods: {
onModalClose() {
const { onModalClose } = this.props;
onModalClose && onModalClose();
},
randNum(a, b) {
return Math.floor(Math.random() * (b - a) + a);
},
onModalConfirm() {
const { onModalConfirm, onModalClose } = this.props;
var reg = /^\s*$/g;
if (
reg.test(this.data.inputVal) ||
this.data.inputVal == null ||
this.data.inputVal == ""
) {
commonToast("松鼠名字不能为空");
} else {
onModalConfirm && onModalConfirm(this.data.inputVal);
// onModalClose && onModalClose();
}
},
onChangeInput(e) {
console.log(e);
let { value } = e.detail;
this.setData({
inputVal: value
});
console.log(this.data.inputVal);
},
handelRandomName() {
let numRand = Math.floor((Math.random() * 999)) + 1;
let str = SYSTEMNAME[this.randNum(0, 135)] + numRand;
this.setData({
randomName: str,
inputVal: str
});
console.log(str)
}
}
});
{
"component": true
}
\ No newline at end of file
.exp-rank-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
background-color: rgba(0, 0, 0, 0.75);
}
.exp-rank-wrap {
width: 100%;
/* height: 900rpx; */
position: fixed;
bottom: 0;
left: 0;
background-color: #e9dab6;
border-top-right-radius: 20rpx;
border-top-left-radius: 20rpx;
padding: 0 25rpx;
animation: mallmodalIn 0.5s ease-out;
}
.exp-rank-title {
font-size: 48rpx;
line-height: 1;
color: #4d2716;
text-align: center;
padding-top: 50rpx;
padding-bottom: 30rpx;
font-weight: bold;
}
.exp-rank-content {
background-color: #fff;
border-top-right-radius: 20rpx;
border-top-left-radius: 20rpx;
height: 784rpx;
}
.exp-rank-header {
width: 100%;
height: 70rpx;
line-height: 70rpx;
font-size: 24rpx;
color: #4d2716;
display: flex;
justify-content: space-around;
text-align: center;
border-bottom: 1rpx solid #e9dab6;
}
.exp-rank-list {
height: 713rpx;
}
.exp-rank-list .exp-rank-item {
width: 100%;
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
color: #4d2716;
display: flex;
justify-content: space-around;
text-align: center;
border-bottom: 1rpx solid #e9dab6;
}
.exp-rank-list .exp-rank-item:nth-child(1) .exp-rank-item-rank {
font-size: 0;
background: url('//yun.duiba.com.cn/taobaomini/squirrelAdopt/exp-rank1.png') no-repeat;
background-size: 37rpx 42rpx;
background-position: 32rpx 23rpx;
}
.exp-rank-list .exp-rank-item:nth-child(2) .exp-rank-item-rank {
font-size: 0;
background: url('//yun.duiba.com.cn/taobaomini/squirrelAdopt/exp-rank2.png') no-repeat;
background-size: 37rpx 42rpx;
background-position: 32rpx 23rpx;
}
.exp-rank-list .exp-rank-item:nth-child(3) .exp-rank-item-rank {
font-size: 0;
background: url('//yun.duiba.com.cn/taobaomini/squirrelAdopt/exp-rank3.png') no-repeat;
background-size: 37rpx 42rpx;
background-position: 32rpx 23rpx;
}
.exp-rank-list .exp-rank-item-rank {
font-weight: bold;
}
.exp-rank-item-rank {
width: 100rpx;
display: inline-block;
}
.exp-rank-item-name {
width: 200rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: inline-block;
}
.exp-rank-item-level {
width: 100rpx;
display: inline-block;
}
.exp-rank-item-exp {
width: 150rpx;
display: inline-block;
}
.exp-rank-content .exp-rank-nodata {
color: #4d2716;
font-size: 28rpx;
text-align: center;
padding-top: 240rpx;
}
.exp-rank-modal .close {
position: absolute;
right: 25rpx;
top: -92rpx;
height: 75rpx;
width: 85rpx;
background: url("//yun.duiba.com.cn/duiba-h5/tb/adopt/close.png") no-repeat;
background-size: 100% 100%;
z-index: 9;
}
@keyframes mallmodalIn {
from {
transform: translateY(100%)
}
to {
transform: translateY(0)
}
}
\ No newline at end of file
<view class="exp-rank-modal">
<view class="exp-rank-wrap">
<view class="close" onTap="onModalClose"></view>
<view class="exp-rank-title">等级排行榜</view>
<view class="exp-rank-content">
<view class="exp-rank-header">
<text class="exp-rank-item-rank">排名</text>
<text class="exp-rank-item-name">昵称</text>
<text class="exp-rank-item-level">等级</text>
<text class="exp-rank-item-exp">经验值</text>
</view>
<view class="exp-rank-list" a:if="{{list && list.length>0}}">
<scroll-view scroll-y="{{true}}" style="height: 100%">
<view class="exp-rank-item" a:for="{{list}}">
<text class="exp-rank-item-rank">{{item.rank}}</text>
<text class="exp-rank-item-name">{{item.squirrelName}}</text>
<text class="exp-rank-item-level">{{item.level}}</text>
<text class="exp-rank-item-exp">{{item.exp}}</text>
</scroll-view>
</view>
<view class="exp-rank-nodata" a:else>暂无人上榜</view>
</view>
</view>
</view>
\ No newline at end of file
import API from '../../api';
import { commonToast } from '../../utils/utils';
const app = getApp();
Component({
mixins: [],
data: {
},
props: {},
didMount() {
this.getExpRankList();
},
didUpdate() {},
didUnmount() {},
methods: {
onModalClose() {
const { onExpModalClose } = this.props;
console.log('onExpModalClose', onExpModalClose)
onExpModalClose && onExpModalClose();
},
async getExpRankList(){
const { activityId } = app;
const { success, data } = await API.getExpRankList({ activityId }).catch(res => {
commonToast(res && res.message);
}) || {};
if (success && data){
const { list = [] } = data;
this.setData({
list
})
console.log(list)
}
}
},
});
{
"component": true
}
\ No newline at end of file
.get-small-modal-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 20;
}
.get-small-modal-container__content {
position: absolute;
width:703rpx;
height:445rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/samplePanelBg.png") no-repeat;
background-size: 100%;
position: absolute;
top: 50%;
left: 50%;
margin-left: -352rpx;
margin-top: -222rpx;
}
.get-small-modal-container__close {
position: absolute;
right: 30rpx;
top: -60rpx;
height: 48rpx;
width: 48rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/tc_close.png") no-repeat;
background-size: 100% 100%;
}
.get-small-modal-container__btn {
position: absolute;
bottom: 60rpx;
width: 436rpx;
height: 86rpx;
left: 50%;
margin-left: -218rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/samplePanelBtn.png") no-repeat;
background-size: 100% 100%;
}
\ No newline at end of file
<view class="get-small-modal-container">
<view class="get-small-modal-container__content">
<view class="get-small-modal-container__close" onTap="closeModal"></view>
<view class="get-small-modal-container__btn" onTap="closeModal"></view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {
onCloseModal: () => {}
},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {
closeModal() {
this.props.onCloseModal()
}
},
});
{
"component": true
}
\ No newline at end of file
.logistics-modal-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 20;
}
.logistics-modal-container__content {
width:645rpx;
height:243rpx;
border:2rpx solid rgba(239,234,255,1);
border-radius:20rpx;
padding: 11rpx 10rpx;
background: #B09BFF;
position: absolute;
left: 50%;
top: 50%;
margin-left: -322rpx;
margin-top: -121rpx;
}
.logistics-modal-container__close {
position: absolute;
right: -10rpx;
top: -70rpx;
height: 48rpx;
width: 48rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/tc_close.png") no-repeat;
background-size: 100% 100%;
}
.logistics-modal-container__content-item {
width:621rpx;
height:217rpx;
background:rgba(255,255,255,1);
border-radius:10rpx;
padding: 34rpx 0 0 34rpx;
display: flex;
}
.logistics-modal-container__content-left {
width: 120rpx;
height:120rpx;
background:rgba(244,244,244,1);
}
.logistics-modal-container__content-left image {
width: 100%;
height: 100%;
}
.logistics-modal-container__content-right {
margin-left: 40rpx;
display: flex;
flex-direction: column;
}
.logistics-modal-container__content-name view{
font-size:28rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(51,51,51,1);
}
.logistics-modal-container__content-desc {
font-size:20rpx;
margin-top: 15rpx;
}
.logistics-modal-container__content-copy {
display: flex;
align-items: center;
height: 30rpx;
margin-top: 15rpx;
}
.logistics-modal-container__content-copy__code {
font-size:20rpx;
}
.logistics-modal-container__content-copy__img {
width: 20rpx;
height: 20rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/icon_copy_1.png") no-repeat;
background-size: 100% 100%;
margin-left: 20rpx;
}
\ No newline at end of file
<view class="logistics-modal-container">
<view class="logistics-modal-container__content">
<view class="logistics-modal-container__close" onTap="closeModal"></view>
<view class="logistics-modal-container__content-item">
<view class="logistics-modal-container__content-left">
<image mode="scaleToFill" src="{{prizeItem.image}}"/>
</view>
<view class="logistics-modal-container__content-right">
<view class="logistics-modal-container__content-name">{{prizeItem.name}}</view>
<view class="logistics-modal-container__content-desc">{{(prizeItem.shipStatus - 0) == 2?'发货状态:已发货':'发货状态:未发货'}}</view>
<view class="logistics-modal-container__content-desc" a:if="{{prizeItem.shipStatus != 2}}">温馨提示:奖品将在活动结束7天内陆续发出</view>
<view class="logistics-modal-container__content-copy" a:else>
<view class="logistics-modal-container__content-copy__code">{{'物流单号:'+prizeItem.shipNum}}</view>
<view class="logistics-modal-container__content-copy__img" onTap="copyCode"></view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
import { commonToast } from '../../utils/utils';
Component({
mixins: [],
data: {},
props: {
prizeItem: {},
onCloseModal: () => {}
},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {
closeModal() {
this.props.onCloseModal()
},
//复制运单号
copyCode() {
let { shipNum } = this.props.prizeItem
my.setClipboard({
text: shipNum+'',
success: () =>{
commonToast('复制成功')
}
});
}
},
});
.small-kid-modal-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 20;
}
.small-kid-modal-container__content {
width:750rpx;
height:762rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/tc_xy_icon.png") no-repeat;
background-size: 100%;
position: absolute;
top: 50%;
margin-top: -431rpx;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.small-kid-modal-container__close {
position: absolute;
right: 40rpx;
top: 0;
height: 48rpx;
width: 48rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/tc_close.png") no-repeat;
background-size: 100% 100%;
}
.small-kid-modal-container__title {
margin-top: 140rpx;
}
.small-kid-modal-container__title view {
font-size:24rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(92,89,177,1);
line-height:36rpx;
text-align: center;
}
.small-kid-modal-container__prize {
width:220rpx;
height:219rpx;
background:rgba(255,255,255,1);
border:1rpx solid rgba(92,89,177,1);
margin: 20rpx 0 60rpx;
}
.small-kid-modal-container__prize image{
width: 100%;
height: 100%;
}
.small-kid-modal-container__desc {
font-size:24rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(92,89,177,1);
line-height:36rpx;
text-align: center;
}
.small-kid-modal-container__btn {
margin-top: 20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.small-kid-modal-container__btn-left,.small-kid-modal-container__btn-right {
width:256rpx;
height:85rpx;
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/kid_btn_01.png") no-repeat;
background-size: 100% 100%;
font-size:36rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(255,255,255,1);
text-shadow:0px 3rpx 8rpx rgba(245,154,71,0.67);
display: flex;
justify-content: center;
align-items: center;
line-height: 86rpx;
}
.small-kid-modal-container__btn-right {
background: url("//yun.duiba.com.cn/taobaomini/aupresViva/kid_icon_02.png") no-repeat;
background-size: 100% 100%;
}
\ No newline at end of file
<view class="small-kid-modal-container">
<view class="small-kid-modal-container__content">
<view class="small-kid-modal-container__close" onTap="closeModal"></view>
<view class="small-kid-modal-container__title">
<view>您的好友赠送了你一份84元小样, </view>
<view>现在购买88元及以上商品即可随单包邮寄送,</view>
<view>或支付14.9元邮费即可带回家~ </view>
</view>
<view class="small-kid-modal-container__prize">
<image mode="scaleToFill" src="//yun.duiba.com.cn/aurora/assets/c5f66927bb6fb83b832bb5fbed106c72c63b4967.png"/>
</view>
<view class="small-kid-modal-container__desc">图片仅供参考,具体以收到的实物为准</view>
<view class="small-kid-modal-container__btn">
<view class="small-kid-modal-container__btn-left" onTap="goToBuy">去下单</view>
<view class="small-kid-modal-container__btn-right" onTap="goToPay">支付邮费</view>
</view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {
onCloseModal: () => {},
onGoToBuy: () => {},
onGoToPay: () => {},
},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {
closeModal() {
this.props.onCloseModal()
},
//去下单
goToBuy() {
this.props.onGoToBuy()
},
//支付邮费
goToPay() {
this.props.onGoToPay()
},
},
});
{
"component": true
}
\ No newline at end of file
// 分享配置
export const SHARE_CONFIG = {
title: '分享测试标题',
desc: '分享测试描述',
imageUrl: '', // 分享图片URL
path: 'pages/index/index'
};
// 链接配置
export const REDIRECT_URL = {
'testpage': '/pages/testPage/testPage',
'tmall': 'https://www.tmall.com'
};
// 领取状态 (1待领取,2处理中,3领取成功,4领取失败,5已过期,6重新领取) 针对小样奖品:(0待解锁,7:淘宝查看)
export const DRAW_STATUS_PARAMS = {
'stock': 0,
'wait': 1,
'processing': 2,
'done': 3,
'fail': 4,
'expired': 5,
'retry': 6,
'view': 7
};
// 我的奖品页-领取按钮状态 (1待领取,2处理中,3领取成功,4领取失败,5已过期,6重新领取)
export const DRAW_STATUS_MAP = {
[DRAW_STATUS_PARAMS.stock]: {
btnText: '领取奖品',
},
[DRAW_STATUS_PARAMS.wait]: {
btnText: '立即领取',
},
[DRAW_STATUS_PARAMS.processing]: {
btnText: '处理中',
btnDisabled: 'myprize-btn-status-disabled'
},
[DRAW_STATUS_PARAMS.done]: {
btnText: '已领取',
btnDisabled: 'myprize-btn-status-get'
},
[DRAW_STATUS_PARAMS.fail]: {
btnText: '领取失败',
btnDisabled: 'myprize-btn-status-disabled'
},
[DRAW_STATUS_PARAMS.expired]: {
btnText: '已失效',
btnDisabled: 'myprize-btn-status-disabled'
},
[DRAW_STATUS_PARAMS.retry]: {
btnText: '重新领取',
btnUse: 'myprize-btn-status-use'
},
[DRAW_STATUS_PARAMS.view]: {
btnText: '淘宝查看',
btnDisabled: 'myprize-btn-status-disabled'
},
};
// 奖品类型(1 权益(优惠券/红包),2积分,3实物,5谢谢参与)
export const PRIZE_TYPE = {
1: 'coupon',
2: 'credits',
3: 'object',
5: 'thanks'
};
{ {
"_args": [ "_args": [
[ [
"@tbmp/mp-cloud-sdk@1.4.1", "@tbmp/mp-cloud-sdk@1.4.2",
"/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client" "/Users/wanghongyuan/hello_canvas/dist"
] ]
], ],
"_from": "@tbmp/mp-cloud-sdk@1.4.1", "_from": "@tbmp/mp-cloud-sdk@1.4.2",
"_id": "@tbmp/mp-cloud-sdk@1.4.1", "_id": "@tbmp/mp-cloud-sdk@1.4.2",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-h3xz4q22WGgxlSe5kqkaHK3C1fjWVlXHRQWKbIiecRJQPPoa5jok0LAkZlsLxvfa24ub4Pi34+a8Xjja2hlFTw==", "_integrity": "sha1-/49BtdDaNJ6H9+f9DDBMPgt/BbQ=",
"_location": "/@tbmp/mp-cloud-sdk", "_location": "/@tbmp/mp-cloud-sdk",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "version", "type": "version",
"registry": true, "registry": true,
"raw": "@tbmp/mp-cloud-sdk@1.4.1", "raw": "@tbmp/mp-cloud-sdk@1.4.2",
"name": "@tbmp/mp-cloud-sdk", "name": "@tbmp/mp-cloud-sdk",
"escapedName": "@tbmp%2fmp-cloud-sdk", "escapedName": "@tbmp%2fmp-cloud-sdk",
"scope": "@tbmp", "scope": "@tbmp",
"rawSpec": "1.4.1", "rawSpec": "1.4.2",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "1.4.1" "fetchSpec": "1.4.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/@tbmp/mp-cloud-sdk/-/mp-cloud-sdk-1.4.1.tgz", "_resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.2.tgz",
"_spec": "1.4.1", "_spec": "1.4.2",
"_where": "/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client", "_where": "/Users/wanghongyuan/hello_canvas/dist",
"author": "", "author": "",
"description": "", "description": "",
"gitHead": "f69d455f62dcf8b82983b291a0de742bc91b3390", "gitHead": "c074f811312aea20c97a289aa9ac785e72de2368",
"license": "ISC", "license": "ISC",
"main": "index.js", "main": "index.js",
"name": "@tbmp/mp-cloud-sdk", "name": "@tbmp/mp-cloud-sdk",
...@@ -41,5 +41,5 @@ ...@@ -41,5 +41,5 @@
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"types": "./types/platforms/mp/index.d.ts", "types": "./types/platforms/mp/index.d.ts",
"version": "1.4.1" "version": "1.4.2"
} }
{ {
"_args": [ "_from": "fyge-tbmini@^1.3.7",
[ "_id": "fyge-tbmini@1.3.7",
"fyge-tbmini@1.2.8",
"/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client"
]
],
"_from": "fyge-tbmini@1.2.8",
"_id": "fyge-tbmini@1.2.8",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-Gf/RRC7qNZ0fMkb1xL9Rl+y8isK1noGoDrm2UVdAQsxCa+Mn8o7CMHaf+AkNvJcitsh0kgXqI/bQVioSF3PQIg==", "_integrity": "sha1-zp/KWSj+rRCGDOTrfo0BQxQxYqQ=",
"_location": "/fyge-tbmini", "_location": "/fyge-tbmini",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "version", "type": "range",
"registry": true, "registry": true,
"raw": "fyge-tbmini@1.2.8", "raw": "fyge-tbmini@^1.3.7",
"name": "fyge-tbmini", "name": "fyge-tbmini",
"escapedName": "fyge-tbmini", "escapedName": "fyge-tbmini",
"rawSpec": "1.2.8", "rawSpec": "^1.3.7",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "1.2.8" "fetchSpec": "^1.3.7"
}, },
"_requiredBy": [ "_requiredBy": [
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/fyge-tbmini/-/fyge-tbmini-1.2.8.tgz", "_resolved": "https://registry.npm.taobao.org/fyge-tbmini/download/fyge-tbmini-1.3.7.tgz",
"_spec": "1.2.8", "_shasum": "ce9fca5928fead10860ce4eb7e8d0143143162a4",
"_where": "/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client", "_spec": "fyge-tbmini@^1.3.7",
"_where": "/Users/wanghongyuan/hello_canvas/dist",
"author": { "author": {
"name": "MrKwon" "name": "MrKwon"
}, },
"bundleDependencies": false,
"dependencies": {}, "dependencies": {},
"deprecated": false,
"description": "淘宝小程序canvas渲染引擎", "description": "淘宝小程序canvas渲染引擎",
"devDependencies": { "devDependencies": {
"dts-bundle": "^0.7.3", "dts-bundle": "^0.7.3",
...@@ -62,5 +59,5 @@ ...@@ -62,5 +59,5 @@
"watch": "webpack --watch" "watch": "webpack --watch"
}, },
"types": "./build/FYGE.d.ts", "types": "./build/FYGE.d.ts",
"version": "1.2.8" "version": "1.3.7"
} }
# SvgaParser
1.0.2版本支持web版本解析,包体小,web应用尽量用这个
1.1.0及以后版本同时支持web和微信小程序及淘宝小程序解析
(淘宝小程序使用,链接必须使用阿里系的白名单域名,或者云存储cloud://链接)
其他版本都是坏的
单纯将svga文件解析成动画图片及动画数据。
### 网页使用
```html
<script type="text/javascript" src="../build/svgaParser.min.js"></script>
<script>
SvgaParser.loadSvga("./svga/step1-1.svga", (v) => {
console.log(v)
}, (err) => { console.log(err) })
</script>
```
### npm使用
```js
npm install svga-parser
import { loadSvga } from "svga-parser";
loadSvga("./svga/step1-1.svga", (v) => {
console.log(v)
}, (err) => { console.log(err) })
```
declare module SvgaParser {
/**
* 加载方法
* @param url 资源路径
* @param success
* @param failure
*/
export function loadSvga(url: string, success: (videoItem: VideoEntity) => void, failure: (err: string) => void): void;
/**
* 导出只是当作类型接口用
*/
export interface VideoEntity {
/**
* SVGA 文件版本
*/
version: string;
/**
* 影片尺寸
*/
videoSize: {
width: number;
height: number;
};
/**
* 帧率,60,30等每秒
*/
FPS: number;
/**
* 总帧数
*/
frames: number;
/**
* base64图片数据记录
*/
images: {
[key: string]: string
};
/**
* 图片是否已被缓存,缓存全局,注意名字覆盖
*/
hasBeenCached: boolean;
/**
* sprite对象数据
*/
sprites: SpriteEntity[];
}
interface SpriteEntity {
/**
* 标识
*/
matteKey: string;
/**
* 图片key值
*/
imageKey: string;
/**
* 帧数据数组
*/
frames: FrameEntity[];
}
/**
* 还有很多其他数据,暂不需要,比如矢量路径和遮罩路径暂时都无
*/
interface FrameEntity {
/**
* 透明度
*/
alpha: number;
/**
* 2维矩阵数据
*/
transform: {
a: number,
b: number,
c: number,
d: number,
tx: number,
ty: number,
};
}
}
declare module "svga-parser" { export = SvgaParser; }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"_args": [
[
"svga-parser@1.1.0",
"/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client"
]
],
"_from": "svga-parser@1.1.0",
"_id": "svga-parser@1.1.0",
"_inBundle": false,
"_integrity": "sha512-OjjtzPGC1ZdCWSWvldhXcB0CAz4ZOeoWEp0P9l4Lz7UtLM9f+DAYAYXKCXBWnRZvJevgkY/gniO/Bt89X0cKKw==",
"_location": "/svga-parser",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "svga-parser@1.1.0",
"name": "svga-parser",
"escapedName": "svga-parser",
"rawSpec": "1.1.0",
"saveSpec": null,
"fetchSpec": "1.1.0"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/svga-parser/-/svga-parser-1.1.0.tgz",
"_spec": "1.1.0",
"_where": "/Users/wanghongyuan/taobao_mini/aupres_bubbleSurviva/aupres_c_client/client",
"author": {
"name": "MrKwon"
},
"dependencies": {},
"description": "1.0.2版本支持web版本解析,包体小,web应用尽量用这个",
"devDependencies": {
"eval5": "^1.4.5",
"protobufjs": "^6.8.0",
"ts-loader": "^4.0.0",
"typescript": "^2.7.2",
"uglifyjs-webpack-plugin": "^2.1.2",
"webpack": "^4.1.0",
"webpack-cli": "^3.3.2"
},
"keywords": [
"svga"
],
"license": "ISC",
"main": "build/svgaParser.min.js",
"name": "svga-parser",
"scripts": {
"build": "webpack",
"dev": "webpack -w",
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "webpack --watch"
},
"types": "build/SvgaParser.d.ts",
"version": "1.1.0"
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!-- <meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no"> -->
<style>
html,
body {
padding: 0;
margin: 0;
border: 0;
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
background-color: white;
}
/* .top {
width: 100%;
height: 100px;
} */
</style>
</head>
<body>
<script type="text/javascript" src="../build/svgaParser.min.js"></script>
<script>
SvgaParser.loadSvga("./svga/step1-1.svga", (v) => {
console.log(v)
}, (err) => { console.log(err) })
</script>
</body>
</html>
\ No newline at end of file
{ {
"name": "threeSquirrel", "version": "1.0.0",
"version": "1.0.0", "lockfileVersion": 1,
"lockfileVersion": 1, "requires": true,
"requires": true, "dependencies": {
"dependencies": { "@tbmp/mp-cloud-sdk": {
"@tbmp/mp-cloud-sdk": { "version": "1.4.2",
"version": "1.4.1", "resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.2.tgz",
"resolved": "https://registry.npmjs.org/@tbmp/mp-cloud-sdk/-/mp-cloud-sdk-1.4.1.tgz", "integrity": "sha1-/49BtdDaNJ6H9+f9DDBMPgt/BbQ="
"integrity": "sha512-h3xz4q22WGgxlSe5kqkaHK3C1fjWVlXHRQWKbIiecRJQPPoa5jok0LAkZlsLxvfa24ub4Pi34+a8Xjja2hlFTw==" }
},
"fyge-tbmini": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/fyge-tbmini/-/fyge-tbmini-1.2.8.tgz",
"integrity": "sha512-Gf/RRC7qNZ0fMkb1xL9Rl+y8isK1noGoDrm2UVdAQsxCa+Mn8o7CMHaf+AkNvJcitsh0kgXqI/bQVioSF3PQIg=="
},
"svga-parser": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/svga-parser/-/svga-parser-1.1.0.tgz",
"integrity": "sha512-OjjtzPGC1ZdCWSWvldhXcB0CAz4ZOeoWEp0P9l4Lz7UtLM9f+DAYAYXKCXBWnRZvJevgkY/gniO/Bt89X0cKKw=="
} }
}
} }
{ {
"name": "threeSquirrel", "name": "",
"version": "1.0.0", "version": "1.0.0",
"main": "", "main": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@tbmp/mp-cloud-sdk": "*", "@tbmp/mp-cloud-sdk": "*",
"fyge-tbmini": "^1.2.8", "fyge-tbmini": "^1.3.7"
"svga-parser": "^1.1.0"
} }
} }
.goods-page-container {
width: 100%;
min-height: 100vh;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/page_bg.png') no-repeat;
background-size: 100% 1624rpx;
overflow: hidden;
}
.goods-page-container__title {
width: 750rpx;
height: 103rpx;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/goods_bg.png') no-repeat;
background-size: 100% 100%;
display: table-cell;
text-align: center;
vertical-align: middle;
}
.goods-page-container__title text {
display: inline-block;
font-size:40rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(92,89,177,1);
}
.goods-page-container-scroll {
width: 100%;
height: 90vh;
}
.goods-page-container__content {
width: 100%;
padding: 0 32rpx;
display: flex;
flex-wrap: wrap;
}
.goods-page-container__content-item {
width:326rpx;
height:410rpx;
background: #F7F5FF;
border-radius:14rpx 13rpx 14rpx 14rpx;
margin-bottom: 37rpx;
}
.goods-page-container__content-item:nth-child(even) {
margin-left: 16rpx;
}
.goods-page-container__content-item__img {
width:326rpx;
height: 281rpx;
}
.goods-page-container__content-item__img image {
width: 100%;
height: 100%;
}
.goods-page-container__content-item__desc {
width: 100%;
height: 129rpx;
background:rgba(243,240,255,1);
padding: 20rpx 0 0 20rpx;
}
.goods-page-container__content-item__desc-name {
width: 100%;
font-size:24rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(107,107,107,1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.goods-page-container__content-item__desc-prize {
margin-top: 22rpx;
font-size:36rpx;
font-family:SourceHanSansSC;
font-weight:bold;
color:rgba(239,82,95,1);
}
\ No newline at end of file
<view class="goods-page-container">
<view class="goods-page-container__title"><text>购买商品得游戏次数</text></view>
<scroll-view scroll-y="{{true}}" class="goods-page-container-scroll">
<view class="goods-page-container__content">
<view class="goods-page-container__content-item" a:for="{{goodsList}}" data-item="{{item}}" onTap="goToBuy">
<view class="goods-page-container__content-item__img">
<image mode="scaleToFill" src="{{item.image}}"/>
</view>
<view class="goods-page-container__content-item__desc">
<view class="goods-page-container__content-item__desc-name">{{item.name}}</view>
<view class="goods-page-container__content-item__desc-prize">{{'¥'+item.price || 0.00}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
import {
commonToast,
openDetail,
navigateToOutside,
navigateTo, } from '../../utils/utils';
import API from '../../api'
const app = getApp();
Page({
data: {
goodsList: []
},
onLoad() {
this.initPage()
},
async initPage() {
let { activityId } = app
let { success, data } = await API.getGoodsList({ activityId }).catch(res => {
res && commonToast(res)
}) || {}
if(success) {
this.setData({ goodsList: data })
}
},
/**跳转购买商品页 */
async goToBuy(e) {
let { item: { id, url } } = e.target.dataset
let { success } = await openDetail(id+'')
}
});
{
"window": {
"defaultTitle": "商品详情"
}
}
\ No newline at end of file
.help-page-container {
width: 100%;
min-height: 100vh;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/help_bg.png') no-repeat;
background-size: 100% 1624rpx;
overflow: hidden;
}
.help-page-blank{
position: absolute;
width: 100%;
height: 100vh;
overflow: hidden;
}
.help-page-content {
position: absolute;
top: -208rpx;
left: 0;
right: 0;
bottom: -208rpx;
width: 100%;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/help_content_bg.png') no-repeat;
background-size: 100% 1664rpx;
}
.help-page-content__card {
width: 672rpx;
height: 580rpx;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/card_bg_05.png') no-repeat;
background-size: 100% 100%;
position: absolute;
left: 50%;
margin-left: -336rpx;
top: 632rpx;
display: flex;
justify-content: flex-start;
flex-direction: column;
align-items: center;
}
.help-page-content__card-title {
height: 40rpx;
width: 100%;
text-align: center;
font-size:40rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(92,89,177,1);
margin: 74rpx auto 48rpx;
}
.help-page-content__card-content {
width:455rpx;
height:76rpx;
font-size:30rpx;
margin: 0 auto;
font-family:SourceHanSansSC;
font-weight:300;
line-height: 48rpx;
color:rgba(92,89,177,1);
text-align: center;
}
.help-page-content__card-btn {
width: 100%;
position: absolute;
bottom: 72rpx;
left: 0;
}
.help-page-content__card-btn-succes,.help-page-content__card-btn-fails {
display: flex;
justify-content: center;
align-content: center;
}
.help-page-content__card-btn-left,.help-page-content__card-btn-right,.help-page-content__card-btn-box {
width:251rpx;
height:79rpx;
background:#C386FF;
border-radius:40rpx;
border: 3rpx solid #ffffff;
display: flex;
justify-content: center;
align-content: center;
font-size:30rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(255,255,255,1);
text-shadow:0px 3px 8px rgba(245,154,71,0.67);
line-height: 73rpx;
}
.help-page-content__card-btn-right {
background: #F3A867;
margin-left: 37rpx;
}
.help-page-content__card-btn-box {
width: 436rpx;
background: #F3A867;
}
\ No newline at end of file
<view class="help-page-container">
<view class="help-page-blank">
<view class="help-page-content">
<view class="help-page-content__card">
<view class="help-page-content__card-title">{{isMember?'助力成功!':''}}</view>
<view class="help-page-content__card-content">{{isMember?'精美小样已收入~':'你的集美为你准备了一份精美小样,领取就可助力成功哦~'}}</view>
<view class="help-page-content__card-btn">
<view a:if="{{isMember}}" class="help-page-content__card-btn-succes">
<view class="help-page-content__card-btn-left" onTap="getMyPrize">查看奖励</view>
<view class="help-page-content__card-btn-right" onTap="goToIndex">我也要赢大奖</view>
</view>
<view a:if="{{!isMember}}" class="help-page-content__card-btn-fails">
<view class="help-page-content__card-btn-box" onTap="getSmallKid">领取助力小样</view>
</view>
</view>
</view>
</view>
</view>
<!-- 获取小样 -->
<small-kid-modal a:if="{{isSmallKid}}" onGoToBuy="onGoToBuy" onGoToPay="onGoToPay" onCloseModal="onCloseModal" />
</view>
\ No newline at end of file
import {
commonToast,
navigateToOutside,
navigateTo,
openDetail,
getAuthUserInfo } from '../../utils/utils';
import API from '../../api'
const app = getApp();
Page({
inviteId: '',
isStock: false,
data: {
isInvite: false,
isSmallKid: false,
isMember: false,
inviteId: '',
objText: {}
},
async onLoad(query) {
let { inviteId } = query
if(inviteId) this.inviteId = inviteId;
await this.login()
await this.canAssistHandle()
},
onShow() {
if(this.isInvite) {
this.initPage()
}
if(this.isStock) {
this.getSamplePop()
}
},
//登陆
async login() {
const { activityId } = app
const userInfo = await getAuthUserInfo().catch(() => {
commonToast('未授权成功');
})
if (!userInfo) return
const { nickName, avatar } = userInfo
let result = await API.login({ activityId, userNick: nickName, avatar, inviteId: this.inviteId })
},
//是否可助力
async canAssistHandle() {
let { activityId } = app
let { success, data, message } = await API.canAssist({ activityId, inviteId: this.inviteId }).catch(res => {
my.showToast({
content: res.message,
success: () => {
navigateTo(`/pages/index/index?inviteId=${this.inviteId}`)
}
});
}) || {}
if(success) {
let { isvip, url } = data || {}
this.setData({ isMember: isvip || false, url })
if(isvip) {
this.initPage()
}
}
},
//小样奖品弹框提示
async getSamplePop() {
let { activityId } = app
let { success, data } = await API.samplePop({ activityId }).catch(res => {
}) || {}
if(success) {
let { sampleStatus} = data
if(sampleStatus == 2 || sampleStatus == 3) {
this.isStock = false
navigateTo(`/pages/index/index?page=help`)
}
}
},
async initPage() {
let { activityId } = app
let { success, data } = await API.assist({ activityId, inviteId: this.inviteId }).catch(res => {
}) || {}
if(success) {
this.setData({ isMember: true })
}
let objText = {
0: {
titile: '',
content: '你的集美为你准备了一份精美小样领取就可助力成功哦~',
leftText: '',
rightText: '领取助力小样',
},
1: {
titile: '助力成功!',
content: '精美小样已收入~',
leftText: '查看奖励',
rightText: '我也要赢大奖',
},
2: {
titile: '',
content: '你的集美为你准备了一份精美小样领取就可助力成功哦~',
leftText: '',
rightText: '领取助力小样',
}
}
},
//查看奖励
getMyPrize() {
this.setData({ isSmallKid: true })
this.addDataUv(1010)
},
onCloseModal() {
this.setData({ isSmallKid: false })
},
//我也要赢大奖
goToIndex() {
this.addDataUv(1011)
navigateTo(`/pages/index/index?inviteId=${this.inviteId}`)
},
//会员判断
async getSmallKid() {
this.isInvite = true
my.showToast({
content: '加入会员才能完成助力哦~',
success: () => {
navigateToOutside(this.data.url)
}
});
this.addDataUv(1008)
},
//去下单
onGoToBuy() {
this.setData({ isSmallKid: false })
this.isStock = true
navigateTo('/pages/goodsPage/goodsPage')
this.addDataUv(1012)
},
//支付邮票
async onGoToPay() {
let { activityId, smallKidItemId } = app
let { success, data } = await API.postageMark({ activityId, itemId:smallKidItemId }) || {}
if(success) {
this.isStock = true
this.setData({ isSmallKid: false })
let result = await openDetail(smallKidItemId)
}
this.addDataUv(1013)
},
//数据埋点
async addDataUv(type) {
let { activityId } = app
await API.addDataUv({ activityId, type })
}
});
{
"usingComponents": {
"small-kid-modal": "/components/smallKidModal/smallKidModal"
}
}
\ No newline at end of file
<view disable-scroll="true" class="page-game">
<canvas disable-scroll="true" id="canvas" type="2d" class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
</canvas>
</view>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
.my-prize-container {
width: 100%;
min-height: 100vh;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/page_bg.png') no-repeat;
background-size: 100% 1624rpx;
overflow: hidden;
padding-top: 40rpx;
}
.my-prize-container__title {
width: 750rpx;
height: 68rpx;
background: url('//yun.duiba.com.cn/taobaomini/aupresViva/titile_bg.png') no-repeat;
background-size: 100% 100%;
display: table-cell;
text-align: center;
vertical-align: middle;
}
.my-prize-container__title text {
display: inline-block;
font-size:40rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(92,89,177,1);
}
.my-prize-container-scroll {
margin-top: 30rpx;
width: 100%;
height: 90vh;
}
.my-prize-container__content {
width: 100%;
padding: 0 25rpx;
}
.my-prize-container__content-item {
width:100%;
height:160rpx;
background:rgba(255,255,255,1);
border-radius:10px;
margin-bottom: 24rpx;
padding: 20rpx 27rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.my-prize-container__content-item-left {
display: flex;
max-width: 470rpx;
}
.my-prize-container__content-item__img {
width:120rpx;
height:120rpx;
background:rgba(244,244,244,1);
}
.my-prize-container__content-item__img image {
width: 100%;
height: 100%;
}
.my-prize-container__content-item__desc {
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
.my-prize-container__content-item__name {
font-size:28rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(51,51,51,1);
margin-bottom: 15rpx;
}
.my-prize-container__content-item__code {
font-size:18rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(51,51,51,1);
}
.my-prize-container__content-item__time {
font-size:18rpx;
font-family:SourceHanSansSC;
font-weight:300;
color:rgba(51,51,51,1);
margin-top: 5rpx;
width: 310rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.my-prize-container__content-item__btn {
width:150rpx;
height:40rpx;
background:linear-gradient(90deg,rgba(255,101,174,1) 0%,rgba(255,152,208,1) 100%);
border-radius:20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.myprize-btn-status-disabled {
width:150rpx;
height:40rpx;
background:#E9E9E9;
border-radius:20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.my-prize-container__content-item__btn text{
font-size:24rpx;
font-family:SourceHanSansSC;
font-weight:400;
color:rgba(255,255,255,1);
}
\ No newline at end of file
<view class="my-prize-container">
<view class="my-prize-container__title"><text>我的奖品</text></view>
<scroll-view scroll-y="{{true}}" class="my-prize-container-scroll">
<view class="my-prize-container__content">
<view class="my-prize-container__content-item" a:for="{{myPrizeList}}">
<view class="my-prize-container__content-item-left">
<view class="my-prize-container__content-item__img">
<image mode="scaleToFill" src="{{item.image}}"/>
</view>
<view class="my-prize-container__content-item__desc">
<view class="my-prize-container__content-item__name">{{item.name}}</view>
<view class="my-prize-container__content-item__code" a:if="{{item.endPrizeDesc}}">{{item.endPrizeDesc}}</view>
<view class="my-prize-container__content-item__time" a:if="{{item.remark}}">{{item.remark}}</view>
</view>
</view>
<view class="my-prize-container__content-item__btn {{item.btnDisabled}}" data-item="{{item}}" onTap="prizeHandle"><text>{{item.btnText}}</text></view>
</view>
</view>
</scroll-view>
<!-- 物流信息 -->
<logistic-modal a:if="{{isLogistic}}" prizeItem="{{currentPrize}}" onCloseModal="closeLogisticModal" />
<!-- 领取小样 -->
<small-kid-modal a:if="{{isSmallKid}}" onCloseModal="closeSmallModal" onGoToBuy="onGoToBuy" onGoToPay="onGoToPay" />
<!-- 获得小样 -->
<get-small-modal a:if="{{isGetSmallModal}}" onCloseModal="closeGetSmallModal" />
</view>
\ No newline at end of file
import {
getSystemInfo,
versionCompare,
commonToast,
dateFormatter,
getServerTime,
navigateToOutside,
navigateTo,
openDetail,
getUserAddress } from '../../utils/utils';
import { DRAW_STATUS_MAP } from '../../constants'
import API from '../../api'
const app = getApp();
Page({
data: {
isGetSmall: false,
myPrizeList: [],
isLogistic: false,
isSmallKid: false,
isGetSmallModal: false
},
onLoad() {
this.initPage()
},
onShow() {
if(this.isGetSmall) {
this.getSamplePop()
}
},
//小样奖品弹框提示
async getSamplePop() {
let { activityId } = app
let { success, data } = await API.samplePop({ activityId }).catch(res => {
}) || {}
if(success) {
let { sampleStatus} = data
if(sampleStatus == 2 || sampleStatus == 3) {
this.setData({ isGetSmallModal: true })
this.initPage()
this.isGetSmall = false
}
}
},
//关闭获得小样弹窗
closeGetSmallModal() {
this.setData({ isGetSmallModal: false })
},
//初始化页面数据
async initPage() {
let { activityId } = app
let { success, data: { endPrizeTime, list } } = await API.getMyPrizeList({ activityId }).catch( res => {
res && commonToast(res)
}) || {}
if(success) {
let nowTime = await getServerTime()
let myPrizeList = list && list.map(el => {
el.btnText = DRAW_STATUS_MAP[el.drawStatus].btnText
if(el.drawStatus == 1 && (el.type == 3 || el.type == 6)) {
el.btnText = '填写地址'
}
if(el.drawStatus == 3 && el.type == 3) {
el.btnText = '查看物流'
}
if(el.type !== 3) {
el.btnText = DRAW_STATUS_MAP[el.drawStatus].btnText
if(el.type == 6 && el.drawStatus == 0) {
el.btnText = '领取奖品'
}
if(el.type == 6 && el.drawStatus == 1) {
el.btnText = '填写地址'
}
if(el.type == 6 && el.drawStatus == 3) {
el.btnText = '查看物流'
}
}
if((el.drawStatus == 1 || el.drawStatus == 5) && nowTime > endPrizeTime) {
el.endPrizeDesc = '奖品已过期'
}
else {
el.endPrizeDesc = el.drawStatus == 1 ? `请于${dateFormatter(endPrizeTime,'yyyy-MM-dd hh:mm:ss')}前领取`:''
}
el.btnDisabled = DRAW_STATUS_MAP[el.drawStatus].btnDisabled
if(el.drawStatus == 3) {
if(el.type == 1) {
el.btnDisabled = 'myprize-btn-status-disabled'
}
}
el.remark = el.remark ? el.remark : ''
return el
})
console.warn(myPrizeList)
this.setData({
myPrizeList,
endPrizeTime
})
}
},
/**
* 关闭物流弹窗
*/
closeLogisticModal() {
this.setData({ isLogistic: false })
},
//奖品操作
async prizeHandle(e) {
let { item } = e.target.dataset
let { type,drawStatus } = item
this.setData({ currentPrize:item })
switch(drawStatus) {
case 0: this.setData({ isSmallKid:true });break;
case 6:
case 1: this.receivePrize(item);break;
case 3: this.handleStatus(type);break;
case 7: commonToast('请前往淘宝查看');break;
}
},
//已领取奖品操作
handleStatus(type) {
switch(type) {
case 6:
case 3: this.setData({ isLogistic: true });break;
case 1: this.couponsHandle();
}
},
//使用优惠券
couponsHandle() {
//navigateToOutside()
},
/**
* 奖品领取
*/
async receivePrize() {
const { activityId } = app;
const { type, _id } = this.data.currentPrize;
switch(+type) {
// 实物
case 6:
case 3:
const isValid = await this.checkSystem()
if (!isValid) {
commonToast('请升级淘宝版本');
return;
}
const userAddress = await getUserAddress().catch(res => {
commonToast(res && res.errorMessage);
});
if (userAddress) {
const { name, phone, address } = userAddress.duibaAddress;
this.setData({ userAddress })
my.confirm({
title: '温馨提示',
content: `确认使用该地址:${name},${phone},${address}`,
confirmButtonText: '确认',
cancelButtonText: '取消',
success: (result) => {
this.receiveObject()
},
});
}
break;
// 优惠券
case 1:
const {success} = await API.receivePrize({_id, activityId}).catch(res => {
commonToast(res && res.message);
this.initPage()
}) || {};
if (success) {
commonToast('奖品领取成功,已发放至我的卡包');
this.initPage()
}
break;
default:
break;
}
},
// TODO: 确认天猫是否也是9.3.0以下有问题
async checkSystem() {
const { version, app } = await getSystemInfo();
return versionCompare(version, '9.3.0');
},
async receiveObject() {
const { activityId } = app;
const { _id } = this.data.currentPrize;
const { name, phone, address } = this.data.userAddress.duibaAddress;
let { provinceName, cityName, countyName, cityCode, streetName } = this.data.userAddress
const {success} = await API.receiveObjectPrize({name, phone, detailInfo:address, cityCode, provinceName, cityName, countyName, streetName, _id, activityId}).catch(res => {
commonToast(res && res.message);
this.initPage()
}) || {};
if (success) {
commonToast('领取成功');
this.initPage();
}
},
/**关闭小样弹窗 */
closeSmallModal() {
this.setData({ isSmallKid:false })
},
//去下单
onGoToBuy() {
this.isGetSmall = true
this.setData({ isSmallKid:false })
navigateTo('/pages/goodsPage/goodsPage')
this.addDataUv(1012)
},
//支付邮票
async onGoToPay() {
let { activityId, smallKidItemId } = app
let { success, data } = await API.postageMark({ activityId, itemId:smallKidItemId })
if(success) {
this.isGetSmall = true
this.setData({ isSmallKid:false })
let result = await openDetail(smallKidItemId)
}
this.addDataUv(1013)
},
//数据埋点
async addDataUv(type) {
let { activityId } = app
await API.addDataUv({ activityId, type })
}
});
{
"usingComponents": {
"logistic-modal": "/components/logisticsModal/logisticsModal",
"small-kid-modal": "/components/smallKidModal/smallKidModal",
"get-small-modal": "/components/getSmallModal/getSmallModal"
}
}
\ No newline at end of file
This diff is collapsed.
<view disable-scroll="true" class="page-game">
<canvas disable-scroll="true" id="canvas" type="2d" class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
</canvas>
</view>
\ No newline at end of file
'use strict';
import { Main } from './output';
//import API from '../../api';
Page({
data: {},
onLoad(props) {
this.setData(this.data || {});
},
onReady() {
console.log('on ready')
// let main = this.spark_startEngine(); //main.addEventListener....
},
spark_startEngine() {
console.log('spark_startEngine')
var self = this;
my.createCanvas({
id: 'canvas',
success: ccc => {
const dpr = my.getSystemInfoSync().pixelRatio;
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr + dpr; //重新修改会有误差
ccc.height = windowHeight * dpr + dpr;
if (!this.main) {
this.main = new Main(ccc); //添加事件,为了和main里的通信
this.main.addGlobalEvent("onMessage", self.onMessage, self);
}
}
});
},
onCanvasReady() {
console.log('onCanvasReady')
this.spark_startEngine();
},
postMessage(netName, data) {
this.main.dispatchGlobalEvent({
type: netName
}, data); //以防复用事件event串了,就用这种方式
},
//和main通信的方法,接收main的信息
onMessage(e) {
//接口名字
let netName = e.data.netName; //接口参数
let parameter = e.data.parameter; //暂时发现3个需要用户操作的接口
//定制的授权
if (netName.indexOf("mine") == 0) {
var data = {
success: true
};
switch (netName) {
case "mine.getAppData":
//获取信息
let tmpApp = getApp();
console.log('app信息', tmpApp);
data = {
success: true,
data: {
activityId: tmpApp.activityId,
//|| "5e7c40e98564b57d7fb95812",
nickName: tmpApp.nickName,
avatar: tmpApp.avatar,
openId: tmpApp.openId,
isFocusShop: tmpApp.isFollow || false
}
};
break;
case 'test':
console.log('测试一下', parameter.hint);
break;
}
this.postMessage(netName, data);
} else {
var app = getApp(); //获取后端接口
const {
function: fc
} = app.cloud;
const [myCloudName, handler] = netName.split("."); //待写,
fc.invoke(myCloudName, parameter, handler).then(res => {
this.postMessage(netName, res);
});
}
},
//鼠标事件
onMouseEvent(e) {
if (this.main) this.main.stage.onMouseEvent(e);
},
onShow() {
// 页面显示
if (this.main) {
this.main.run();
this.main.dispatchGlobalEvent("onShow");
}
},
onHide() {
// 页面隐藏
if (this.main) {
this.main.pause();
this.main.dispatchGlobalEvent("onHide");
}
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
.mycanvaspage {
top: 0rpx;
left: 0rpx;
width: 750rpx;
height: 1624rpx;
display: block;
position: absolute;
}
.mycanvaspage .canvas {
width: 300rpx;
height: 300rpx;
opacity: 1;
display: block;
left: 0rpx;
top: 0rpx;
position: absolute;
}
<view class="mycanvaspage">
<view>
<canvas id="canvas" type="2d" class="canvas" disable-scroll="true" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady"></canvas>
</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(this.data || {
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 = {
'4ee17a9c-5deb-43be-b205-16fb7593d172': {
name: 'spark',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
}
};
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,OAAO,EAAE,EAAE;IAClC,OAAO;QACC,kBAAkB,CAAC,MAAM;;gBAC7B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,wBAAgB,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBAChF,MAAM,WAAW,GAAG,MAAM,mBAAc,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;oBACrD,gBAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAChC,CAAC,CAAC,CAAC;gBACH,IAAI,WAAW,EAAE;oBACf,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,CAAC;oBAC1D,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,EAAE,GAAS,EAAE;wBACpE,MAAM,mBACJ,IAAI;4BACJ,KAAK;4BACL,OAAO,IACJ,MAAM,CACV,CAAA;wBACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;4BACpE,gBAAW,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;wBAClC,CAAC,CAAC,CAAC;wBACH,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;4BAC5B,OAAO,IAAI,CAAC;yBACb;oBACH,CAAC,CAAA,CAAC,CAAC;iBACJ;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;SAAA;QACK,iBAAiB,CAAC,MAAM;;gBAC5B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,wBAAgB,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBAC/E,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,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,MAAM,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,GAAG,OAAO,EAAE,EAAE,EAAE;IAC9D,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAO,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE;QAChD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;QAChC,iBAAiB;QACjB,MAAM,mBAAK,UAAU,IAAK,MAAM,CAAE,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,gBAAgB,CAAC,CAAC;YACzC,OAAO,KAAK,CAAC;SACd;QACD,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC;QAC9C,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC;QAC9B,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,aAAa,EAAE;gBACjB,EAAE,CAAC,WAAW,EAAE,CAAC;aAClB;QACH,CAAC,CAAC;QACF,IAAI,aAAa,EAAE;YACjB,EAAE,CAAC,WAAW,EAAE,CAAC;SAClB;QAED,MAAM,UAAU,GAAG,GAAG,EAAE;YACtB,OAAO,IAAI,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CAAC,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,CAAC,CAAA,CAAC;AAEJ,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"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,OAAO,CAAC;QACT,KAAK;QACL,OAAO;QACP,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,MAAM,CAAC,EAAE;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;YAC3B,IAAI,OAAO,EAAE;gBACX,SAAS,IAAI,SAAS,EAAE,CAAC;aAC1B;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACU,QAAA,eAAe,GAAG,GAAS,EAAE;IACxC,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,MAAM;KAChB,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF;;;GAGG;AACU,QAAA,aAAa,GAAG,GAAS,EAAE;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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
This diff is collapsed.
{"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,CAA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G,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
This diff is collapsed.
This diff is collapsed.
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