Commit 39db8b73 authored by wildfirecode13's avatar wildfirecode13

1

parent fa9bc429
.DS_Store
node_modules/
.tea/
server/
const app = getApp();
const { tbcc, cloudName, cloud, requestType } = app;
const { utils: { generateAPI }, request: tbccRequest, capi } = tbcc;
const request = tbccRequest({
cloud,
cloudName,
requestType
});
// api handle 列表
const apiList = {
...capi,
getIndex: {
handle: 'index',
isShowLoading: false
},
receiveObjectPrize: {
handle: 'receiveObjectPrize',
method:'get',
isShowLoading: false
},
receiveEnamePrize: {
handle: 'receiveEnamePrize',
method:'get',
isShowLoading: false
},
getMyPrizeList: {
handle: 'getMyPrizeList',
method:'get',
isShowLoading: false
},
getActivityBaseInfoById: {
handle: 'getActivityBaseInfoById',
method:'get',
isShowLoading: false
},
submit: {
handle: 'submit',
method:'get',
isShowLoading: false
},
getBuyFloorList: {
handle: 'getBuyFloorList',
method:'get',
isShowLoading: false
},
getFloorPrize: {
handle: 'getFloorPrize',
method:'get',
isShowLoading: false
},
getCredits: {
handle: 'getCredits',
method:'get',
isShowLoading: false
},
getVipInfo: {
handle: 'getVipInfo',
method:'get',
isShowLoading: false
},
login: {
handle: 'login',
method:'get',
isShowLoading: false
}
};
// 生成API
const API = generateAPI(apiList, request);
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';
import tbcc from './tbcc-sdk';
cloud.init({
env: 'test' // 云函数环境 test 测试环境 online 线上环境
});
App({
requestType: 'cloud', // yapi,cloud: 云函数
// requestType: 'yapi', // yapi,cloud: 云函数
cloudName: 'floor', // 主云函数项目名 base clientTemplate2C
cloud,
tbcc,
onLaunch(options) {
this.handleQuery(options.query || {});
},
onShow(options) {
// 从后台被 scheme 重新打开
console.log('执行了app onshow')
},
/**
* 处理链接参数
* @param {object} query 小程序链接上的参数
*/
handleQuery(query) {
const { activityId } = query;
// this.activityId = activityId || '5f505873738989c8b356e284';
this.activityId = activityId || '5f5759b2114fbb8f6d91245c';//商家创建的测试环境活
}
});
{
"pages": [
"pages/pageshou_ye/pageshou_ye",
"pages/pagehuo_dong_ye/pagehuo_dong_ye",
"pages/pagejie_shu_ye/pagejie_shu_ye",
"pages/myprize/myprize",
"pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1"
],
"window": {
"allowsBounceVertical":"NO"
}
}
\ No newline at end of file
.gong_xi_huo_jiang {
width: 677rpx;
height: 920rpx;
opacity: 1;
left: 34rpx;
top: 357rpx;
position: absolute;
z-index: 999;
}
.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 .zu8 {
width: 263rpx;
height: 51rpx;
opacity: 1;
left: 210rpx;
top: 67rpx;
position: absolute;
}
.gong_xi_huo_jiang .mai_dao_zhong_jiang_lou_ceng_huo_de_yi_xia_jiang_pin {
width: 390rpx;
height: 30rpx;
opacity: 1;
left: 156rpx;
top: 157rpx;
position: absolute;
font-size: 30rpx;
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: 22rpx;
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" onTap="handleClose" src={{resList['b8bc26de-51ac-457f-bd3f-348e7df0af34'].url}} />
<image class="zu139394" src={{resList['b0315ae3-2e86-4260-ae04-8e2cb2c70b99'].url}} />
<image class="zu8" src={{resList['44e9bb99-836b-4612-afd1-c2eb400d0eca'].url}} />
<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['d9283186-3e0a-4875-bd28-e296e22d1139'].url}} />
<image class="ju_xing88726" src={{myPrize.image}} />
<image class="an_niu_kao_bei3" onTap="gotoPrizePage" src={{resList['38aa87d7-c85e-497c-85a2-f5a980bc742f'].url}} />
</view>
\ No newline at end of file
'use strict';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {
resList: resList
},
methods: {
handleClose() {
const { onPrizeModalClose } = this.props;
onPrizeModalClose && onPrizeModalClose();
},
gotoPrizePage() {
my.navigateTo({
url: '/pages/myprize/myprize',
success: () => {
},
fail: () => {
},
complete: () => {
}
});
this.handleClose();
}
},
onInit(props) {
// this.setData({
// resList: resList
// });
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.gou_mai_ji_lu32 {
width: 677rpx;
height: 920rpx;
opacity: 1;
left: 34rpx;
top: 357rpx;
position: absolute;
z-index: 999;
}
.gou_mai_ji_lu32 .cha_cha102 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 305rpx;
top: 848rpx;
position: absolute;
}
.gou_mai_ji_lu32 .zu139123 {
width: 677rpx;
height: 790rpx;
opacity: 1;
position: absolute;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 {
width: 624rpx;
height: 645rpx;
opacity: 1;
left: 33rpx;
top: 69rpx;
position: absolute;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu7 {
width: 618rpx;
height: 577rpx;
opacity: 1;
top: 68rpx;
position: absolute;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .yuan_jiao_ju_xing71744 {
width: 16rpx;
height: 74rpx;
opacity: 1;
left: 608rpx;
top: 154rpx;
position: absolute;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 {
width: 500rpx;
height: 646rpx;
opacity: 1;
left: 60rpx;
position: absolute;
/* overflow-y: auto; */
overflow-x: hidden;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 .list {
/* width: 453rpx; */
width: 540rpx;
height: 400rpx;
opacity: 1;
top: 150rpx;
position: absolute;
overflow-y: auto;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 .no_order{
width: 453rpx;
height: 383rpx;
opacity: 1;
top: 180rpx;
left: 10rpx;
position: absolute;
text-align: center;
color: white;
font-size: 24rpx;
}
/*
*/
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 .list .zu13434 {
width: 500rpx;
height: 183rpx;
opacity: 1;
/* top: 10rpx; */
top: 15rpx;
position: absolute;
}
.gou_mai_ji_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .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_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 .zu133 {
width: 444rpx;
height: 22rpx;
opacity: 1;
left: 32rpx;
top: 104rpx;
position: absolute;
}
.gou_mai_ji_lu32 .gou_mai_ji_lu_kao_bei33 .zu135 .zu6 {
width: 270rpx;
height: 35rpx;
opacity: 1;
left: 114rpx;
position: absolute;
}
<view class="gou_mai_ji_lu32">
<image class="cha_cha102" onTap="onOrderModalClose" src={{resList['b8bc26de-51ac-457f-bd3f-348e7df0af34'].url}} />
<image class="zu139123" src={{resList['7b5dab10-64dd-462c-bf41-3699e0df9a9e'].url}} />
<view class="gou_mai_ji_lu_kao_bei33">
<image class="zu7" src={{resList['ae013a3c-875a-461d-9273-1f58dd01eca2'].url}} />
<!-- <image class="yuan_jiao_ju_xing71744" src={{resList['1a960b92-d4b6-40fe-8e31-9658a5d904ec'].url}} /> -->
<view class="zu135">
<view class="list" a:if="{{orderList != null}}">
<view class="zu13434" a:for="{{orderList}}" a:key="index" a:for-item="item">
<label class="day1" style="{{item.order.orderDay}}">{{item.monthDate}}</label>
<label class="floor1" style="{{item.order.orderFloor}}">{{item.floorRange}}</label>
<label class="credits1" style="{{item.order.orderCredits}}">{{item.credits}}</label>
</view>
</view>
<view class="no_order" a:elif="{{orderList == null}}">暂无购买记录</view>
<!-- <text >{{JSON.stringify(orderList)}}</text> -->
<!-- <view class="item" a:for="{{orderList}}" a:for-index="index" a:for-item="item">
<label style="{{item.order.orderDay}}">{{item.createTime}}</label>
<label style="{{item.order.orderFloor}}">{{item.floorRange}}</label>
<label style="{{item.order.orderCredits}}">{{item.credits}}</label>
</view> -->
<image class="zu133" src={{resList['1f5ca224-337a-4abb-8a5c-6fbd20e30ea4'].url}} />
<image class="zu6" src={{resList['1e1c23db-27ce-4914-aaf2-62554f91e101'].url}} />
</view>
</view>
</view>
'use strict';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList';
import API from '../../api'
Component({
props: {
},
data: {
resList: resList,
},
methods: {
onOrderModalClose() {
const { onOrderModalClose } = this.props
onOrderModalClose && onOrderModalClose();
},
getOrderListProps(){
let {orderList} = this.props;
console.log(this.props,'props');
}
// async getOrderList(){
// let {data} = await API.getBuyFloorList() || {};
// console.log('buy',data);
// // 购买时间
// let createTime = data.list.cteateTime;
// let lens = data.length;
// for(let i=0;i<lens;i++){
// let orderStyle = {
// orderDay:{
// left: 0,
// top: 40*i+'rpx',
// position:'absolute',
// color:'white'
// },
// orderFloor:{
// left: 200+'rpx',
// top: 40*i + 'rpx',
// position:'absolute',
// color:'white'
// },
// orderCredits:{
// left:400 + 'rpx',
// top: 40 * i + 'rpx',
// position:'absolute',
// color:'white'
// }
// }
// data[i].order = orderStyle;
// }
// this.setData({
// orderList:data,
// // orderStyle:orderStyleArr
// })
// },
},
onInit(props) {
// this.getOrderList();
},
didMount(){
this.getOrderListProps();
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.hen_yi_han23 {
width: 670rpx;
height: 829rpx;
opacity: 1;
left: 41rpx;
top: 448rpx;
position: absolute;
z-index: 999;
}
.hen_yi_han23 .cha_cha0 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 298rpx;
top: 757rpx;
position: absolute;
}
.hen_yi_han23 .zu142 {
width: 670rpx;
height: 613rpx;
opacity: 1;
position: absolute;
}
.hen_yi_han23 .zu9 {
width: 157rpx;
height: 53rpx;
opacity: 1;
left: 256rpx;
top: 56rpx;
position: absolute;
}
.hen_yi_han23 .ju_xing88724 {
width: 423rpx;
height: 240rpx;
opacity: 1;
left: 124rpx;
top: 162rpx;
position: absolute;
}
.hen_yi_han23 .wei_man100_ceng {
width: 351rpx;
height: 31rpx;
opacity: 1;
left: 159rpx;
top: 233rpx;
position: absolute;
}
.hen_yi_han23 .xia_ci_zai_lai {
width: 173rpx;
height: 30rpx;
opacity: 1;
left: 246rpx;
top: 290rpx;
position: absolute;
}
.hen_yi_han23 .biao_qian {
width: 351rpx;
height: 31rpx;
opacity: 1;
display: block;
left: 159rpx;
top: 233rpx;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30rpx;
font-weight: 550;
color: rgba(255, 255, 255, 1);
}
.hen_yi_han23 .wei_mai_dao_tu_ceng {
width: 209rpx;
height: 30rpx;
opacity: 1;
left: 230rpx;
top: 233rpx;
position: absolute;
}
.hen_yi_han23 .zu77127 {
width: 210rpx;
height: 30rpx;
opacity: 1;
left: 230rpx;
top: 290rpx;
position: absolute;
}
.hen_yi_han23 .zu77127 .ca_jian_er_guo {
width: 210rpx;
height: 30rpx;
opacity: 1;
position: absolute;
}
.hen_yi_han23 .an_niu30 {
width: 337rpx;
height: 104rpx;
opacity: 1;
left: 166rpx;
top: 459rpx;
position: absolute;
}
<view class="hen_yi_han23">
<image class="cha_cha0" onTap="handleNoprizeClose" src={{resList['b8bc26de-51ac-457f-bd3f-348e7df0af34'].url}} />
<image class="zu142" src={{resList['d473d55e-e93b-4473-ae6f-065e3ba2e853'].url}} />
<image class="zu9" src={{resList['519cfe3c-5920-4f09-906e-53c44890ead3'].url}} />
<image class="ju_xing88724" src={{resList['7ec9f5ea-9e4e-4ba9-bd1d-4ad6a7e03a4e'].url}} />
<!-- 未满100层 -->
<!-- <view a:if="{{openPrizeStatus==OPEN_PRIZE_STATUS.NOT_OPEN}}"> -->
<view a:if="{{openPrizeStatus== 'noprize'}}">
<!-- <image class="wei_man100_ceng" src={{resList['ef34aaa7-7fd4-4d52-9ddc-c78432a86938'].url}} /> -->
<view class="biao_qian">楼层不满{{myPrize}}层,暂不开奖</view>
<image class="xia_ci_zai_lai" src={{resList['90ff7278-1912-4d62-a34d-1b84cb99bcee'].url}} />
</view>
<!-- 未中奖 -->
<!-- <view a:if="{{openPrizeStatus!=OPEN_PRIZE_STATUS.NOT_OPEN}}"> -->
<view a:if="{{openPrizeStatus == 'miss'}}">
<image class="wei_mai_dao_tu_ceng" src={{resList['79ecfd4f-f4dd-47cd-9f04-fac24d652c94'].url}} />
<view class="zu77127">
<image class="ca_jian_er_guo" src={{resList['bbeaaf95-4954-46ad-b1aa-e8ae55c9e2b1'].url}} />
</view>
</view>
<image class="an_niu30" onTap="handleNoprizeClose" src={{resList['92e51b4c-be5e-4459-8379-6a2bc1f2a3b2'].url}} />
<!--<text a:if="{{openPrizeStatus==OPEN_PRIZE_STATUS.NOT_OPEN}}">不开奖</text><text a:if="{{openPrizeStatus!=OPEN_PRIZE_STATUS.NOT_OPEN}}">未中奖</text> -->
</view>
\ No newline at end of file
'use strict';
import OPEN_PRIZE_STATUS from '/utils/OPEN_PRIZE_STATUS';
import resList from '../../resconfig/resList';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
Component({
props: {},
data: {
resList: resList,
OPEN_PRIZE_STATUS:OPEN_PRIZE_STATUS
},
methods: {
handleNoprizeClose(){
let {onHandleNoPrizeClose} = this.props;
onHandleNoPrizeClose && onHandleNoPrizeClose();
}
},
didMount(props) {
console.log('fuck onInit',this.props)
// this.setData({
// resList: resList
// });
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.hui_yuan {
width: 670rpx;
height: 755rpx;
opacity: 1;
left: 40rpx;
top: 482rpx;
position: absolute;
z-index: 999;
}
.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 .zu012 {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 43rpx;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen22 {
width: 500rpx;
height: 60rpx;
opacity: 1;
left: 50rpx;
top: 159rpx;
position: absolute;
font-size: 36rpx;
color: #ffa93a;
text-align: center;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .cost {
width: 500rpx;
height: 60rpx;
opacity: 1;
left: 50rpx;
top: 210rpx;
position: absolute;
font-size: 36rpx;
color: #ffa93a;
text-align: center;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .ps_mei_ceng_lou50_ji_fen {
width: 500rpx;
height: 40rpx;
opacity: 1;
left: 65rpx;
top: 271rpx;
position: absolute;
font-size: 24rpx;
color: #ffa93a;
text-align: center;
}
.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 .zu723 {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
}
.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 .zu126834 {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
}
.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 .zhu_ce_hui_yuan .bei_jing4 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .zhu_ce_hui_yuan .bei_jing5 {
width: 670rpx;
height: 508rpx;
opacity: 1;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .bo_qia_hui_yuan .zu1245 {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
}
.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 .zhu_ce_hui_yuan .grade_name {
width:670rpx;
opacity: 1;
top: 20rpx;
left: 0rpx;
color: white;
font-size: 50rpx;
text-align: center;
position: absolute;
}
.hui_yuan .hui_yuan_deng_ji .hei_qia_hui_yuan .zu926 {
width: 309rpx;
height: 44rpx;
opacity: 1;
left: 178rpx;
top: 42rpx;
position: absolute;
}
.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_niu66 {
width: 267rpx;
height: 99rpx;
opacity: 1;
left: 53rpx;
top: 365rpx;
position: absolute;
}
.hui_yuan .an_niu_kao_bei2 {
width: 268rpx;
height: 99rpx;
opacity: 1;
left: 348rpx;
top: 365rpx;
position: absolute;
}
.click{
pointer-events: none;
}
<view class="hui_yuan">
<image class="cha_cha4582" onTap="onOrderNowModalClose" src={{resList['b8bc26de-51ac-457f-bd3f-348e7df0af34'].url}} />
<view class="hui_yuan_deng_ji">
<view class="zhu_ce_hui_yuan">
<!--<image class="bei_jing1" src={{resList['26ff41d0-0891-4573-a557-1a0bb7881405'].url}} /> -->
<image class="bei_jing5" a:if="{{vipCredits.grade == 5}}" src={{resList['c46f1953-53df-4fdd-aaab-b5e8252b84ce'].url}} />
<image class="bei_jing4" a:else src={{resList['fcb78ed4-6a1a-4a00-9a63-14359b9c44ae'].url}} />
<!--<image class="zu012" src={{resList['948928c1-e583-449d-baca-77db2e213fe1'].url}} /> -->
<!-- 会员标签 -->
<label class="grade_name">您是{{vipCredits.gradeName}}</label>
<label class="gou_maixxx_ge_lou_ceng_yi_gong_xu_yao_hua_feixxxx_ji_fen22">
购买 {{vipCredits.canBuyFloor}} 个楼层
</label>
<label class="cost">一共需要花费 {{vipCredits.gradeCredits * vipCredits.canBuyFloor}} 积分</label>
<label class="ps_mei_ceng_lou50_ji_fen">(PS:每层楼{{vipCredits.gradeCredits}}积分)</label>
</view>
<!--<view class="lan_qia_hui_yuan"><image class="bei_jing2" src={{resList['1d470c7d-b99b-4fe1-a78e-319c6113a4f1'].url}} /><image class="zu723" src={{resList['491038ac-7976-4827-855c-c6693713e94d'].url}} /><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['dddf56e4-6008-4b88-8210-c1a3b27e9f5d'].url}} /><image class="zu126834" src={{resList['157eceb5-639a-4d55-b237-3537a103254b'].url}} /><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['fcb78ed4-6a1a-4a00-9a63-14359b9c44ae'].url}} /><image class="zu1245" src={{resList['eb2403f1-7711-4aea-89b5-afe57b30b344'].url}} /><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['c46f1953-53df-4fdd-aaab-b5e8252b84ce'].url}} /><image class="zu926" src={{resList['53ff1056-22d3-48ad-8f55-3e8a459073b2'].url}} /><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>
<image class="an_niu66 {{enableTap ? 'click' : ''}}" onTap="consumeCredits" src={{resList['3cd0f2ce-f2e0-42c6-be49-52b3177164c5'].url}} />
<image class="an_niu_kao_bei2" onTap="onOrderNowModalClose" src={{resList['0eba7d77-43f9-4127-8976-ebf54e0b84be'].url}} />
</view>
\ No newline at end of file
'use strict';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList';
import API from '../../api'
const app = getApp();
const { tbcc } = app;
const { commonToast, getAuthUserInfo, navigateToOutside } = tbcc.tb;
Component({
props: {
onUserCredit: () => { }
},
data: {
resList: resList,
enableTap: false,
clickTap:false
},
methods: {
// 关闭
onOrderNowModalClose() {
const { onOrderNowModalClose } = this.props;
onOrderNowModalClose && onOrderNowModalClose();
},
// 购买判断
async consumeCredits() {
let vipCredits = this.props.vipCredits;
this.setData({
enableTap: true
})
// API.submit({ floor: vipCredits.canBuyFloor, grade: vipCredits.grade }).catch((res) => {
// console.log(res, 'res');
// this.onOrderNowModalClose();
// this.props.onUserCredit();
// commonToast(res && res.message);
// });
this.onOrderNowModalClose();
API.submit({ floor: vipCredits.canBuyFloor, grade: vipCredits.grade }).then((resp) => {
if (resp.success && resp.data) {
this.setData({
enableTap: false
})
this.props.onUserCredit();
// commonToast(resp.message);
commonToast("购买成功");
setTimeout(() => {
this.props.onUserCredit();
}, 500);
setTimeout(() => {
this.props.onUserCredit();
}, 1000);
}else{
commonToast(resp.message)
}
},(rej)=>{
this.onOrderNowModalClose();
// this.props.onUserCredit();
commonToast(rej.message);
})
}
},
onInit(props) {
// this.setData({
// resList: resList
// });
},
didMount() {
let { vipCredits } = this.props;
console.log(this.props, 'huiyuan')
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.wu_liu_dan_chuang {
width: 655rpx;
height: 315rpx;
opacity: 1;
left: 52rpx;
top: 555rpx;
position: absolute;
}
.wu_liu_dan_chuang .yi_fa_huov {
width: 655rpx;
height: 315rpx;
opacity: 1;
position: absolute;
}
.wu_liu_dan_chuang .yi_fa_huov .bei_jing13 {
width: 645rpx;
height: 244rpx;
opacity: 1;
top: 71rpx;
position: absolute;
}
.wu_liu_dan_chuang .yi_fa_huov .jiang_pin_tu_pian12 {
width: 147rpx;
height: 147rpx;
opacity: 1;
left: 44rpx;
top: 117rpx;
position: absolute;
background-color: #f4f4f4;
}
.wu_liu_dan_chuang .yi_fa_huov .wen_zi9 {
width: 328rpx;
height: 139rpx;
opacity: 1;
left: 213rpx;
top: 120rpx;
position: absolute;
}
.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;
}
.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;
}
.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;
}
.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;
}
.wu_liu_dan_chuang .yi_fa_huov .an_niu_guan_bi_dan_chuang8 {
width: 51rpx;
height: 51rpx;
opacity: 0.50196078;
left: 604rpx;
position: absolute;
}
.wu_liu_dan_chuang .dai_fa_huov {
width: 655rpx;
height: 315rpx;
opacity: 1;
position: absolute;
display: block;
}
.wu_liu_dan_chuang .dai_fa_huov .bei_jing7 {
width: 645rpx;
height: 244rpx;
opacity: 1;
top: 71rpx;
position: absolute;
}
.wu_liu_dan_chuang .dai_fa_huov .jiang_pin_tu_pian6 {
width: 147rpx;
height: 147rpx;
opacity: 1;
left: 44rpx;
top: 117rpx;
position: absolute;
background-color: #f4f4f4;
}
.wu_liu_dan_chuang .dai_fa_huov .wen_zi3 {
width: 389rpx;
height: 139rpx;
opacity: 1;
left: 213rpx;
top: 120rpx;
position: absolute;
}
.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;
}
.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;
}
.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;
}
.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;
}
.wu_liu_dan_chuang .dai_fa_huov .an_niu_guan_bi_dan_chuang2 {
width: 51rpx;
height: 51rpx;
opacity: 0.50196078;
left: 604rpx;
position: absolute;
}
<view class="wu_liu_dan_chuang">
<view class="yi_fa_huov">
<image class="bei_jing13" src={{resList['b0e50983-8ffd-4fa5-a385-11d774137496'].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['e134ccad-bec8-4f73-aa9c-c6e928c2008b'].url}} />
</view>
<view class="dai_fa_huov">
<image class="bei_jing7" src={{resList['9d90e98e-c087-46b6-8286-4e22872872d5'].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['e134ccad-bec8-4f73-aa9c-c6e928c2008b'].url}} />
</view>
</view>
\ No newline at end of file
'use strict';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData({
resList: resList
});
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.you_xi_gui_ze27 {
width: 677rpx;
height: 920rpx;
opacity: 1;
left: 34rpx;
top: 357rpx;
position: absolute;
z-index: 999;
}
.you_xi_gui_ze27 .cha_cha123 {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 305rpx;
top: 848rpx;
position: absolute;
}
.you_xi_gui_ze27 .zu13974 {
width: 677rpx;
height: 790rpx;
opacity: 1;
position: absolute;
}
.you_xi_gui_ze27 .gou_mai_ji_lu_kao_bei28 {
width: 626rpx;
height: 645rpx;
opacity: 1;
left: 31rpx;
top: 70rpx;
position: absolute;
}
.you_xi_gui_ze27 .gou_mai_ji_lu_kao_bei28 .ju_xing705_kao_bei31 {
width: 621rpx;
height: 580rpx;
opacity: 1;
top: 65rpx;
position: absolute;
}
.you_xi_gui_ze27 .gou_mai_ji_lu_kao_bei28 .yuan_jiao_ju_xing71730 {
width: 16rpx;
height: 74rpx;
opacity: 1;
left: 610rpx;
top: 90rpx;
position: absolute;
}
.you_xi_gui_ze27 .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;
overflow-y: auto;
}
.you_xi_gui_ze27 .gou_mai_ji_lu_kao_bei28 .zu1357 {
width: 202rpx;
height: 34rpx;
opacity: 1;
left: 210rpx;
position: absolute;
}
<view class="you_xi_gui_ze27">
<image class="cha_cha123" onTap="onModalClose" src={{resList['b8bc26de-51ac-457f-bd3f-348e7df0af34'].url}} />
<image class="zu13974" src={{resList['7b5dab10-64dd-462c-bf41-3699e0df9a9e'].url}} />
<view class="gou_mai_ji_lu_kao_bei28">
<image class="ju_xing705_kao_bei31" src={{resList['034783f1-bea0-4475-9103-5c579bc36c9b'].url}} />
<!-- <image class="yuan_jiao_ju_xing71730" src={{resList['1a960b92-d4b6-40fe-8e31-9658a5d904ec'].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">
<slot />
</label>
<image class="zu1357" src={{resList['967f7e20-7b3a-40a4-9ed6-dcf93c9a327e'].url}} />
</view>
</view>
\ No newline at end of file
'use strict';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {
resList: resList
},
methods: {
onModalClose() {
const { onModalClose } = this.props;
onModalClose && onModalClose();
}
},
onInit(props) {
// this.setData({
// resList: resList
// });
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
@keyframes modalAnimation {
to {
opacity: 1;
}
}
.logistics-modal-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 20;
opacity: 0;
animation: modalAnimation .3s forwards;
}
@keyframes containerAnimation {
to {
transform: scale(1)
}
}
.logistics-modal-container__content {
width: 646rpx;
height: 244rpx;
padding: 0 46rpx;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
margin: auto;
display: flex;
align-items: center;
transform: scale(0);
animation: containerAnimation .3s forwards;
}
.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 {
border-radius: 10rpx;
display: flex;
}
.logistics-modal-container__content-left {
width: 144rpx;
height: 144rpx;
background: rgba(244, 244, 244, 1);
}
.logistics-modal-container__content-left image {
width: 100%;
height: 100%;
}
.logistics-modal-container__content-right {
height: 144rpx;
margin-left: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 20rpx;
color: #959595;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.logistics-modal-container__content-name {
font-size: 28rpx;
color: rgba(51, 51, 51, 1);
}
.logistics-modal-container__content-desc {
font-size: 20rpx;
}
.logistics-modal-container__content-ids {
margin-bottom: 20rpx;
}
.logistics-modal-container__content-copy {
display: flex;
align-items: center;
height: 30rpx;
}
.logistics-modal-container__content-copy__code {
font-size: 20rpx;
}
.logistics-modal-container__content-copy__img {
width: 20rpx;
height: 20rpx;
background-size: 100% 100%;
margin-left: 20rpx;
}
\ No newline at end of file
<view class="logistics-modal-container">
<view class="logistics-modal-container__content"
style="{{prizeItem.shipStatus == 3 ?`background: url(${task.shipped}) no-repeat;background-size: 100% 100%;`
:`background: url(${task.notShipped}) no-repeat;background-size: 100% 100%;`}}">
<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-copy">
<view class="logistics-modal-container__content-copy__code">奖品编码:{{prizeItem._id}}</view>
<view class="logistics-modal-container__content-copy__img" onTap="copyPrizeId" style="{{`background: url(${task.copyIcon}) no-repeat;background-size: 100% 100%;`}}"></view>
</view> -->
<view class="logistics-modal-container__content-desc">{{prizeItem.shipStatus== 3?'发货状态:已发货':'发货状态:待发货'}}</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" style="{{`background: url(${task.copyIcon}) no-repeat;background-size: 100% 100%;`}}" onTap="copyCode"></view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
const app = getApp();
const { tbcc } = app;
const { commonToast } = tbcc.tb;
Component({
mixins: [],
data: {},
props: {
prizeItem: {},
onCloseModal: () => { },
task: {
shipped: '',
notShipped: '',
}
},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {
closeModal() {
this.props.onCloseModal()
},
//复制运单号
copyCode() {
console.log('fuck copyCode')
let { shipNum } = this.props.prizeItem
my.setClipboard({
text: shipNum + '',
success: () => {
commonToast('复制成功')
}
});
},
copyPrizeId() {
let { _id } = this.props.prizeItem
my.setClipboard({
text: _id + '',
success: () => {
commonToast('复制成功')
}
});
}
},
onShareAppMessage() {
return SHARE_CONFIG;
},
});
{
"component": true
}
\ No newline at end of file
.my-prize-page {
width: 100vw;
height: 100vh;
opacity: 1;
position: absolute;
top: 0;
left: 0;
overflow: hidden;
/* background: url('') no-repeat center top/cover; */
}
.my-prize-page .my-prize-wrap {
width: 100%;
height: 100%;
/* overflow: auto; */
overflow-x: auto;
}
.my-prize-page .my-prize-label {
width: 286rpx;
height: 49rpx;
margin: 140rpx auto 40rpx;
background: url('//yun.duiba.com.cn/aurora/assets/a15fe07a819f3f6deb271725b37468030523dc05.png') no-repeat;
background-size: 100% 100%;
}
.my-prize-page .my-prize-list {
width: 100%;
height: auto;
}
.my-prize-page .my-prize-empty {
text-align: center;
color: #fff;
margin-top: 30rpx;
}
.my-prize-page .my-prize-item {
display: flex;
justify-content: center;
align-items: center;
padding: 0 28rpx 0 26rpx;
margin: 0 auto 24rpx;
position: relative;
box-sizing: border-box;
width: 700rpx;
height: 161rpx;
background-color: #ffffff;
border-color:rgb(255, 63, 38);
border-width: 1rpx;
border-style: solid;
/* box-shadow: 2rpx 3rpx 18rpx 0 rgb(255, 63, 38); */
border-radius: 10rpx;
box-sizing: border-box;
}
.my-prize-page .my-prize-item .my-prize-avatar {
width: 120rpx;
height: 120rpx;
}
.my-prize-page .my-prize-item .my-prize-content {
flex: 1;
min-width: 0;
padding: 10rpx 20rpx 0;
display: flex;
flex-direction: column;
height: 130rpx;
}
.my-prize-page .my-prize-item .my-prize-subtitle {
display: flex;
justify-content: center;
align-items: center;
}
.my-prize-page .my-prize-item .my-prize-copy {
width: 20rpx;
height: 20rpx;
margin-left: 18rpx;
}
.my-prize-page .my-prize-item .prize-status {
width: 150rpx;
height: 41rpx;
}
.prize-status>image {
width: 100%;
height: 100%;
}
.my-prize-page .my-prize-item .my-prize-name {
width: 100%;
font-size: 28rpx;
color: #2d2d2d;
letter-spacing: -1rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.my-prize-page .my-prize-item .my-prize-tip {
margin-top: 16rpx;
font-size: 20rpx;
line-height: 20rpx;
letter-spacing: 0;
color: #8a8a8a;
}
.my-prize-page .my-prize-item .my-prize-code {
width: 290rpx;
font-family: PingFangSC-Regular;
font-size: 20rpx;
color: #8a8a8a;
letter-spacing: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file
<view class="my-prize-page" style="{{{'background':`url(${task.image.bg}) no-repeat center top/cover`}}}">
<view class="my-prize-wrap">
<view class="my-prize-label"></view>
<view class="my-prize-list" a:if="{{myPrizeList && myPrizeList.length > 0}}">
<view class="my-prize-item" a:for="{{myPrizeList}}">
<image class="my-prize-avatar" src="{{item.image}}"/>
<view class="my-prize-content">
<label class="my-prize-name">{{item.name}}</label>
<!-- <view class="my-prize-subtitle"> -->
<!-- <label class="my-prize-code">奖品编码:{{item._id}}</label> -->
<!-- 复制按钮 -->
<!-- <image class="my-prize-copy" data-text="{{item._id}}" onTap="handleCopyId" src="{{task.image.copyIcon}}" /> -->
<!-- </view> -->
<view class="my-prize-tip" a:if="{{item.drawStatus === PRIZE_DRAW_STATUS_MAP.FAILURE}}">{{item.remark}}</view>
<view class="my-prize-tip" a:if="{{item.drawStatus === PRIZE_DRAW_STATUS_MAP.REPEAT || (item.drawStatus === PRIZE_DRAW_STATUS_MAP.RECEIVE)}}">请于{{endTime}}前领取</view>
<view class="my-prize-tip" a:if="{{item.drawStatus === PRIZE_DRAW_STATUS_MAP.FINISHED }}">奖品已过期失效</view>
</view>
<view class="prize-status" style="{{task.btnStyle}}">
<!-- 未领取 -->
<block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.RECEIVE}}">
<!-- 实物填写地址 -->
<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" onTap="handleClick" data-item="{{item}}" src="{{task.image.addressBth}}" />
<!-- 优惠券立即领取 -->
<image a:else onTap="handleClick" data-item="{{item}}" src="{{task.image.getBth}}" />
</block>
<!-- 已领取 -->
<block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.SUCCESS}}">
<!-- 实物查看物流 -->
<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" onTap="handleView" data-item="{{item}}" src="{{task.image.logisticsBth}}" />
<!-- 优惠券去使用 -->
<image a:else data-item="{{item}}" src="{{task.image.gotBtn}}" />
<!-- <image a:else onTap="handleTouse" data-item="{{item}}" src="{{task.image.useBtn}}" /> -->
</block>
<!-- 重新领取 -->
<image a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.REPEAT}}" onTap="handleClick" data-item="{{item}}" src="{{task.image.getAgainBtn}}" />
<!-- 已失效 -->
<image a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.FINISHED}}" src="{{task.image.invalidBtn}}" />
<!-- 领取失败 -->
<image a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.FAILURE}}" src="{{task.image.failBth}}" />
</view>
</view>
</view>
<view a:if="{{myPrizeList && myPrizeList.length === 0}}" class="my-prize-empty">暂无奖品</view>
</view>
<logistics-modal a:if="{{isLogistic}}" prizeItem="{{currentPrize}}" onCloseModal="closeLogisticModal" task="{{task.logisticsImage}}"/>
</view>
\ No newline at end of file
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
const app = getApp();
const { tbcc } = app;
const { commonToast, navigateToOutside, getUserAddress, setClipboard } = tbcc.tb;
const { PRIZE_TYPE_MAP, PRIZE_DRAW_STATUS_MAP } = tbcc.constants;
Component({
mixins: [],
data: {
PRIZE_TYPE_MAP,
PRIZE_DRAW_STATUS_MAP,
currentPrize: {},
isLogistic: false,
},
props: {
myPrizeList: null, //我的奖品
endTime: null,//到期时间
task: {
image: {},
logisticsImage: {},
btnStyle: {}
}
},
didMount() { },
didUpdate() { },
didUnmount() { },
onShareAppMessage() {
return SHARE_CONFIG;
},
methods: {
//领取奖品
handleClick(e) {
this.props.onHandleClick(e)
},
// 复制编码
handleCopyId(e) {
const { text } = e.target.dataset || {}
setClipboard({ text })
console.log(text)
commonToast('复制成功')
},
// 去使用
handleTouse(e) {
const { item } = e.target.dataset;
navigateToOutside(item.useUrl)
},
//查看物流
handleView(e) {
let { item } = e.target.dataset
this.setData({ currentPrize: item, isLogistic: true })
},
/**
* 关闭物流弹窗
*/
closeLogisticModal() {
this.setData({ isLogistic: false })
},
},
});
{
"component": true,
"usingComponents": {
"logistics-modal": "/components/logisticsModal/logisticsModal"
}
}
\ No newline at end of file
export const POP_TYPE={
RULES:'rules'
}
\ No newline at end of file
{
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@tbmp/mp-cloud-sdk": {
"version": "1.4.2",
"resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.2.tgz",
"integrity": "sha1-/49BtdDaNJ6H9+f9DDBMPgt/BbQ="
}
}
}
{
"name": "",
"version": "1.0.0",
"main": "",
"license": "MIT",
"dependencies": {
"@tbmp/mp-cloud-sdk": "^1.4.1"
}
}
.index-page {
min-height: 100vh;
}
.index-page .bg {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
}
\ No newline at end of file
<view class="index-page">
<image class="bg" src={{resList['66f2b76f-7265-4cb2-9b4d-7e8207ab1d74'].url}} />
</view>
\ No newline at end of file
const app = getApp();
const { tbcc } = app;
const { SHARE_CONFIG, REDIRECT_URL } = tbcc.constants;
import resList from '../../resconfig/resList';
import API from '../../api';
const { commonToast, getAuthUserInfo, navigateToOutside } = tbcc.tb;
Page({
data: {
title: '',
content: '',
rule: '',
commonModalData: {
content: '',
btnText: ''
},
commonModalConfirm: null,
commonModalVisible: false,
ruleModalVisible: false
},
onLoad(query) {
this.setData({
resList: resList
});
// 页面加载
this.getAuth();
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
async init() {
const [activity, vipInfo] = await Promise.all([
API.getActivityBaseInfoById(),
API.getVipInfo(),
]);
// vipInfo.isVip=true;
if (vipInfo.isVip && activity.data.isUserJoin) {
my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye' });
} else {
my.redirectTo({ url: '/pages/pageshou_ye/pageshou_ye' });
}
},
async onReady() {
// 页面加载完成
//取图片链接
const result1 = await getApp().cloud.file.getTempFileURL({ fileId: 'cloud://2291129AC27E68610B8DFDA7F139E34A//D2B4599F-878D-402A-8101-5465AE571FB9.png' });
if (result1[0]) SHARE_CONFIG.imageUrl = result1[0].url
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
/**
* 获取用户授权信息
*/
async getAuth() {
const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err);
});
if (userInfo) {
console.log('授权成功,userInfo=>', userInfo);
const { nickName, avatar } = userInfo;
app.nickName = nickName;
app.avatar = avatar;
this.login();
}
},
/**
* 获取主接口
*/
async getIndex() {
const { success, data } = await API.getIndex().catch(res => {
commonToast(res && res.message);
}) || {};
if (success && data) {
const { title, content, rule } = data;
this.setData({ title, content, rule });
}
},
/**
* 登录接口
*/
async login() {
const { nickName, avatar } = app;
const { success } = await API.login({ userNick: nickName, avatar }).catch(res => {
console.log('登录失败..')
commonToast(res && res.message);
}) || {};
if (success) {
console.log('登录成功,正在初始化')
this.init();
}
},
/**
* 显示规则弹层
*/
showRuleModal() {
this.setData({
ruleModalVisible: true
});
},
/**
* 通用弹出确认按钮回调
*/
confirmCommonModal() {
const { commonModalConfirm } = this.data;
commonModalConfirm && commonModalConfirm();
},
/**
* 执行开始
*/
doStart() {
this.showCommonModal({
content: '活动还未开始\n请稍后',
btnText: '我知道了',
commonModalVisible: true,
confirmCallback: () => {
this.closeCommonModal();
}
});
},
/**
* 显示通用弹层
* @param {object} options content: 通用弹层内容 btnText:按钮文案 confirmCallback: 按钮确认回调
*/
showCommonModal({ content, btnText, confirmCallback }) {
this.setData({
commonModalConfirm: confirmCallback || null,
commonModalVisible: true,
commonModalData: { content, btnText }
});
},
/**
* 跳转到天猫页面
*/
goTmallPage() {
navigateToOutside(REDIRECT_URL['tmall']);
},
/**
* 关闭通用弹层
*/
closeCommonModal() {
this.setData({
commonModalVisible: false
});
},
/**
* 关闭活动规则弹层
*/
closeRuleModal() {
this.setData({
ruleModalVisible: false
});
},
onShareAppMessage() {
// 返回自定义分享信息
// export const SHARE_CONFIG = {
// title: '分享测试标题',
// desc: '分享测试描述',
// imageUrl: '', // 分享图片URL
// path: 'pages/index/index'
// };
// my.alert({content:JSON.stringify(SHARE_CONFIG)})
// console.log(SHARE_CONFIG)
return SHARE_CONFIG;
},
});
{
"usingComponents": {
}
}
\ No newline at end of file
<view class="my-prize">
<prize-modal
myPrizeList="{{myPrizeList}}"
task="{{task}}"
endTime="{{endTime}}"
onHandleClick="handleClick"/>
</view>
\ No newline at end of file
'use strict';
import API from "/api";
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
const app = getApp();
const { tbcc } = app;
const { commonToast, navigateToOutside, getUserAddress, setClipboard } = tbcc.tb;
const { PRIZE_TYPE_MAP, PRIZE_DRAW_STATUS_MAP } = tbcc.constants;
let flag = false;
Page({
data: {
PRIZE_TYPE_MAP,
PRIZE_DRAW_STATUS_MAP,
myPrizeList: null, //我的奖品
endTime: null,//到期时间
task: {
image: {
bg: '//yun.duiba.com.cn/aurora/assets/7283d715cc5c7d13a5f498d15f5f5b9f4d9c29e5.jpg', //背景图
copyIcon: '//yun.dui88.com/duiba-components-c-myprizemyprize_copy_code.png', //复制
addressBth: '//yun.duiba.com.cn/aurora/assets/82cc3c6d8861334ebaf128c98e3341b687bdc007.png', //填写地址(实物奖品)
getBth: '//yun.dui88.com/duiba-components-c-myprizeget_now.png', //立即领取(除实物奖品外)
logisticsBth: '//yun.duiba.com.cn/aurora/assets/661f86ff3392cb3b56922b048acf74bebc07bb23.png', //查看物流
useBtn: '//yun.duiba.com.cn/aurora/assets/0829f92f771c5e9fdb05a258a46b2d038d3a9997.png', //去使用(除实物奖品外)
gotBtn: '//yun.duiba.com.cn/aurora/assets/1120dd6b6ce4abe2666e877e3ae33eb99a778009.png', //已领取(优惠券)
getAgainBtn: '//yun.duiba.com.cn/aurora/assets/716f0a388144945b169554a30ff4a16f7bcb95ab.png', //重新领取
invalidBtn: '//yun.duiba.com.cn/spark/assets/914ba8643c8abb8d710a3126ec312aecf6c4daf0.png', //已失效
failBth: '//yun.duiba.com.cn/spark/assets/8267375232058a6d0140270b1594427fb08d6ae3.png', //领取失败
},
logisticsImage: {
shipped: '//yun.duiba.com.cn/aurora/assets/3a7b68ec171ee339ce619d19f6ae3f9c1e6d801a.png', // 已发货物理弹窗
notShipped: '//yun.duiba.com.cn/aurora/assets/ee0300d7b472c555ecf0b7b8d582fcf9189c2d19.png', // 待发货物流弹窗
copyIcon: '//yun.dui88.com/duiba-components-c-myprizemyprize_copy_code.png', //复制
},
btnStyle: { // 按钮自定义样式
width: '150rpx',
height: '41rpx',
}
}
},
onShow() {
flag = false
this.getMyPrize();
},
onShareAppMessage() {
return SHARE_CONFIG;
},
// 到期时间
getEndTime(prizeList = []) {
if (!prizeList || !prizeList.length) return null
const endTime = prizeList[0].expiredTime
if (!endTime) return null;
const yy = new Date(endTime).getFullYear();
const mm = new Date(endTime).getMonth() + 1;
const dd = new Date(endTime).getDate();
const t1 = `${yy}${mm}${dd}日`;
// console.log(new Date(endTime).toLocaleDateString())
// const t1 = new Date(endTime).toLocaleDateString() + '';//获取年月日
const t2 = new Date(endTime).getHours() + '';//获取时
const t3 = new Date(endTime).getMinutes() + '';//获取分
const t4 = new Date(endTime).getMilliseconds() + '';//获取秒
console.log(endTime, new Date(endTime + 48 * 60 * 60 * 1000).toLocaleString(), 'endTime');
this.setData({
endTime: t1 + "" + t2.padStart(2, '0') + ":" + t3.padStart(2, '0') + ":" + t4.padStart(2, '0')
})
},
/**
* 获取奖品列表
* @param {string} type 是否展示loading
*/
async getMyPrize(type) {
const { activityId } = app;
if (type != 'noLoading') {
my.showLoading();
}
const { success, data, message } = await API.getMyPrizeList({ activityId }).catch(res => {
this.setData({
myPrizeList: []
})
}) || {};
if (success && data) {
this.setData({
myPrizeList: data
})
this.getEndTime(data)
}
if (type != 'noLoading') {
my.hideLoading();
}
},
//领取奖品
async handleClick(e) {
const { item } = e.target.dataset;
// 领取权益
if (item.type === PRIZE_TYPE_MAP.EQUITY) return this.handleGetEquity(e)
// 领取实物
if (item.type === PRIZE_TYPE_MAP.ENTITY) return this.handleGetEntity(e)
// 领取积分
if (item.type === PRIZE_TYPE_MAP.INTEGRATION) return this.handleGetIntergation(e)
},
// 优惠券
async handleGetEquity(e) {
if (flag) {
return
}
flag = true;
const { activityId } = app;
const { item } = e.target.dataset;
console.log(item, '领取权益')
const { success, data, message } = await API.receiveEnamePrize({ activityId, _id: item._id }).catch(res => {
this.getMyPrize('noLoading')
commonToast(res && res.message)
}) || {};
if (success && data) {
commonToast('领取成功')
this.getMyPrize()
}
setTimeout(() => {
flag = false
}, 500)
},
// 领取实物前询问
async handleGetEntity(e) {
if (flag) {
return
}
// my.showLoading();
flag = true;
const { activityId } = app;
const { item } = e.target.dataset;
const userAddress = await getUserAddress({ joinTag: " " }).catch((data)=>{
flag = false
console.log('getUserAddress出错了,错误信息是',data);
})
// my.hideLoading();
if (!userAddress) return
// commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
const params = {
activityId,
area:countyName,
addressdetail:detailInfo,
name,
phone: telNumber,
detailInfo,
cityCode,
cityName,
city:cityName,
province:provinceName,
provinceName,
countyName,
streetName,
_id: item._id
}
my.confirm({
title: '提示',
content: '确认使用该收货地址:' + name + telNumber + userAddress.duibaAddress.address,
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (result) => {
console.log(result)
const { confirm } = result;
if (confirm) {
this.receiveObjectPrize(params);
}
},
});
flag = false
},
// 领取实物
async receiveObjectPrize(params) {
// commonToast('正在调用receiveObjectPrize'+JSON.stringify(params))
API.receiveObjectPrize(params).then((res) => {
// setTimeout(() => {
// commonToast(JSON.stringify(res))
// }, 5000);
const { success, data, message } = res;
if (success && data) {
commonToast('领取成功')
} else {
commonToast(message)
}
this.getMyPrize()
},(rej)=>{
commonToast(rej.message)
});
},
// 积分
async handleGetIntergation(e) {
if (flag) {
return
}
flag = true;
// 判断是否为会员
await this.getUserInfo()
const { isVip, vipLink } = app;
if (!isVip) {
commonToast('立即加入会员,即可领取奖品', 2000);
setTimeout(() => {
navigateToOutside(vipLink)
}, 1000)
flag = false
return
}
const { activityId } = app;
const { item } = e.target.dataset;
console.log(item, '领取积分')
const { success, data, message } = await API.receiveEnamePrize({ activityId, _id: item._id }) || {};
if (success && data) {
commonToast('领取成功')
} else {
commonToast(message)
}
flag = false
this.getMyPrize()
},
//获取用户vip信息
async getUserInfo() {
const { activityId } = app;
const { success, data, message } = await API.getVipInfo({ activityId }) || {};
console.log(data, '用户vip信息');
if (success && data) {
app.isVip = (data && data.isVip) || false;
app.vipLink = (data && data.url) || '';
} else {
commonToast(message)
}
},
});
\ No newline at end of file
{
"usingComponents": {
"prize-modal": "/components/prizeModal/prizeModal"
}
}
\ No newline at end of file
.huo_dong_ye {
top: 50%;
left: 0rpx;
width: 750rpx;
height: 1624rpx;
margin-top: -812rpx;
display: block;
position: fixed;
}
.mask {
position: fixed;
width: 750rpx;
height: 1624rpx;
z-index: 99;
background-color: #000;
opacity: 0.7;
}
.huo_dong_ye .logo {
width: 160rpx;
height: 58rpx;
opacity: 1;
left: 295rpx;
top: 230rpx;
position: absolute;
}
.huo_dong_ye .music {
z-index: 90;
width: 56rpx;
height: 56rpx;
opacity: 1;
left: 524rpx;
top: 262rpx;
position: absolute;
}
.huo_dong_ye .di_kao_bei2 {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
transform:translateY(-50%);
top:50%;
overflow: hidden;
}
.huo_dong_ye .jiang_pinicon {
width: 136rpx;
height: 48rpx;
opacity: 1;
left: 613rpx;
top: 340rpx;
position: absolute;
}
.huo_dong_ye .gui_zeicon {
width: 136rpx;
height: 48rpx;
opacity: 1;
left: 0rpx;
top: 340rpx;
position: absolute;
}
.huo_dong_ye .tu2 {
width: 543rpx;
height: 494rpx;
opacity: 1;
left: 106rpx;
top: 405rpx;
position: absolute;
}
.huo_dong_ye .an_niu2 {
width: 305rpx;
height: 80rpx;
opacity: 1;
left: 230rpx;
top: 1054rpx;
position: absolute;
}
.huo_dong_ye .dao_ji_shi87 {
width: 440rpx;
height: 86rpx;
opacity: 1;
left: 156rpx;
top: 303rpx;
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: 50rpx;
height: 40rpx;
opacity: 1;
left: 5rpx;
top: 40rpx;
text-align: center;
position: absolute;
font-size: 25rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei90 {
width: 50rpx;
height: 40rpx;
opacity: 1;
left: 125rpx;
top: 40rpx;
text-align: center;
position: absolute;
font-size: 25rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng2289 {
width: 50rpx;
height: 40rpx;
opacity: 1;
left: 240rpx;
top: 40rpx;
text-align: center;
position: absolute;
font-size: 25rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei388 {
width: 50rpx;
height: 40rpx;
opacity: 1;
left: 350rpx;
top: 40rpx;
text-align: center;
position: absolute;
font-size: 25rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 {
width: 750rpx;
height: 308rpx;
opacity: 1;
top: 1148rpx;
position: absolute;
display: block;
}
.huo_dong_ye .jiang_pin78 .zu116 {
width: 750rpx;
height: 308rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu010 {
width: 423rpx;
height: 25rpx;
opacity: 1;
left: 164rpx;
top: 32rpx;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu5 {
width: 312rpx;
height: 25rpx;
opacity: 1;
left: 222rpx;
top: 32rpx;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 {
width: 681rpx;
height: 191rpx;
opacity: 1;
left: 36rpx;
top: 74rpx;
position: absolute;
overflow-y: auto;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 {
/* width: 681rpx; */
width: 100%;
height: 191rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 {
width: 681rpx;
height: 137rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .n20_lou_ceng86 {
width: 105rpx;
height: 20rpx;
opacity: 0.70196078;
left: 18rpx;
top: 143rpx;
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: 18rpx;
top: 170rpx;
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: 198rpx;
top: 143rpx;
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: 198rpx;
top: 170rpx;
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: 371rpx;
top: 143rpx;
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: 371rpx;
top: 170rpx;
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: 562rpx;
top: 143rpx;
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: 562rpx;
top: 170rpx;
position: absolute;
font-size: 13.68653rpx;
color: #ffffff;
}
.huo_dong_ye .mai_lou {
width: 585rpx;
height: 70rpx;
opacity: 1;
left: 86rpx;
top: 961rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .zu111 {
width: 585rpx;
height: 44rpx;
opacity: 1;
top: 12rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .di3 {
width: 137rpx;
height: 70rpx;
opacity: 1;
left: 244rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .zu1 {
width: 43rpx;
height: 39rpx;
opacity: 1;
left: 183rpx;
top: 16rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .zu2 {
width: 43rpx;
height: 39rpx;
opacity: 1;
left: 397rpx;
top: 16rpx;
position: absolute;
}
.huo_dong_ye .mai_lou .xxx {
width: 86rpx;
height: 34rpx;
opacity: 1;
left: 270rpx;
top: 12rpx;
position: absolute;
font-size: 30rpx;
color: #f23f47;
text-align: center;
}
.huo_dong_ye .zu4 {
width: 120rpx;
height: 25rpx;
opacity: 1;
left: 315rpx;
top: 502rpx;
position: absolute;
}
.huo_dong_ye .xxxxxx {
width: 120rpx;
height: 40rpx;
opacity: 1;
left: 315rpx;
top: 455rpx;
position: absolute;
font-size: 32rpx;
color: #e7210a;
font-weight: 600;
text-align: center;
}
.huo_dong_ye .ji_fen {
width: 371rpx;
height: 52rpx;
opacity: 1;
left: 192rpx;
top: 883rpx;
position: absolute;
}
.huo_dong_ye .ji_fen .di111 {
width: 371rpx;
height: 52rpx;
opacity: 1;
position: absolute;
}
.huo_dong_ye .ji_fen .zu3 {
width: 107rpx;
height: 27rpx;
opacity: 1;
left: 243rpx;
top: 13rpx;
position: absolute;
}
.huo_dong_ye .ji_fen .dang_qian_ji_fenxxxx {
width: 110rpx;
height: 25rpx;
opacity: 1;
left: 30rpx;
top: 5rpx;
position: absolute;
font-size: 24rpx;
color: #5392cc;
}
.huo_dong_ye .ji_fen .current_credits {
width: 80rpx;
height: 25rpx;
opacity: 1;
left: 140rpx;
top: 5rpx;
text-align: center;
position: absolute;
font-size: 24rpx;
color: #5392cc;
}
<view class="huo_dong_ye">
<view class="{{maskVisible ? 'mask' : ''}}"></view>
<image class="music" a:if="{{musicSwitch}}" onTap="onmusicSwitch" src={{resList['0c115480-d22e-4902-a745-e55eadf7bf91'].url}} />
<image class="music" a:if="{{!musicSwitch}}" onTap="onmusicSwitch" src={{resList['ddd2f68b-0059-4eb1-8667-4b7471b11ddd'].url}} />
<image class="di_kao_bei2" src={{resList['66f2b76f-7265-4cb2-9b4d-7e8207ab1d74'].url}} />
<view class="container">
<image class="logo" src={{resList['dd7d3a3b-6fcb-427d-8353-da169708bbab'].url}} />
<image onTap="onPrizeBtnClick" class="jiang_pinicon" src={{resList['b7517eae-3bc2-4456-935a-e6e3e1fe995e'].url}} />
<image class="gui_zeicon" onTap="showRuleModal" src={{resList['d826a2f1-a3ec-4764-aad2-f6cacc43cfce'].url}} />
<image class="tu2" src={{resList['d2cd8191-8fbd-423a-8c36-5bd52659317e'].url}} />
<!-- 立即购买 -->
<image class="an_niu2" onTap="buyFloors" src={{resList['34e91d1d-6c84-45f5-ab77-870939ca7b12'].url}} />
<view class="dao_ji_shi87">
<image class="di22" src={{resList['ad6e754e-6243-4acf-9ffd-9a7aeb3f4971'].url}} />
<label class="tu_ceng2291" style="color:'white'">{{endingTime.d}}</label>
<label class="tu_ceng22_kao_bei90">{{endingTime.h}}</label>
<label class="tu_ceng2289">{{endingTime.m}}</label>
<label class="tu_ceng22_kao_bei388">{{endingTime.s}}</label>
</view>
<view class="jiang_pin78">
<image class="zu116" src={{resList['51ca8493-ed2a-4273-a6b6-300bd9b2eb93'].url}} />
<!-- <image class="zu5" src={{resList['e7baa6fe-46fd-422f-ac6a-3298fb965e6f'].url}} /> -->
<image class="zu010" src={{resList['4a77139f-59e4-4683-8234-0c8160d80eff'].url}} />
<view class="zu114">
<view class="zu128" a:for="{{prizeList}}" a:key="index" a:for-item="item" style="{{item.liststyle}}">
<!-- <image class="ju_xing51_kao_bei2" src={{resList['6b68feb2-7c84-473e-8f2c-b6571e7659e3'].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> -->
<!-- bianli -->
<image style="width:100rpx;height:100rpx;display:block;marginLeft:25rpx" src={{item.image}}></image>
<!-- <view style="width:100rpx;height:100rpx;background:white;marginLeft:25rpx"></view> -->
<view style="fontSize:22rpx;marginTop:10rpx">N*{{item.probability}}楼层</view>
<label style="fontSize:22rpx;height:40rpx;width:128rpx;overflow:hidden;letter-spacing:-1rpx;text-overflow:ellipsis;white-space:nowrap">{{item.name}}</label>
</view>
</view>
</view>
<view class="mai_lou">
<image class="zu111" src={{resList['319a2947-7f73-498c-8f60-7247fd9d732b'].url}} />
<image class="di3" src={{resList['6f1f6ea3-0410-4343-8154-bdbefc1a8916'].url}} />
<image class="zu1" onTap="addFloor" src={{resList['95d608f3-23b4-47b6-9b49-1537bc28246d'].url}} />
<image class="zu2" onTap="reduceFloor" src={{resList['e0d58f52-c85d-47e4-9792-a32a6888eb66'].url}} />
<label class="xxx">{{canBuyFloor}}</label>
</view>
<image class="zu4" src={{resList['cc3cb693-26d3-4f09-ac99-b709ca49af74'].url}} />
<label class="xxxxxx">{{totalFloor}}</label>
<view class="ji_fen">
<image class="di111" src={{resList['8cb47bc2-bc31-4713-86ba-c8738367cb82'].url}} />
<image class="zu3" onTap="orderRecord" src={{resList['0c7c2470-690e-43df-aa7e-ed9aa99fb859'].url}} />
<label class="dang_qian_ji_fenxxxx">当前积分:</label>
<label class="current_credits">{{userCredits}}</label>
</view>
</view>
<order-record a:if="{{orderModalVisible}}" orderList="{{orderList}}" onOrderModalClose="orderModalClose"></order-record>
<order-now a:if="{{orderNowModalVisible}}" onUserCredit="onUserCredit" vipCredits="{{vipCredits}}" onOrderNowModalClose="orderNowModalClose"></order-now>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="ruleModalClose"><text>{{ruleData}}</text></rule-modal>
</view>
\ No newline at end of file
This diff is collapsed.
{
"usingComponents": {
"order-record":"/components/comgou_mai_ji_lu32/comgou_mai_ji_lu32",
"order-now":"/components/comhui_yuan/comhui_yuan",
"rule-modal": "/components/comyou_xi_gui_ze27/comyou_xi_gui_ze27"
}
}
\ No newline at end of file
This diff is collapsed.
<view class="jie_shu_ye">
<view class="{{maskVisible ? 'mask' : ''}}"></view>
<image class="music" a:if="{{musicSwitch}}" onTap="onmusicSwitch" src={{resList['0c115480-d22e-4902-a745-e55eadf7bf91'].url}} />
<image class="music" a:if="{{!musicSwitch}}" onTap="onmusicSwitch" src={{resList['ddd2f68b-0059-4eb1-8667-4b7471b11ddd'].url}} />
<image class="di_kao_bei3" src={{resList['66f2b76f-7265-4cb2-9b4d-7e8207ab1d74'].url}} />
<image class="logo" src={{resList['dd7d3a3b-6fcb-427d-8353-da169708bbab'].url}} />
<image onTap="onPrizeBtnClick" class="jiang_pinicon" src={{resList['b7517eae-3bc2-4456-935a-e6e3e1fe995e'].url}} />
<image class="gui_zeicon" onTap="showRuleModal" src={{resList['d826a2f1-a3ec-4764-aad2-f6cacc43cfce'].url}} />
<view class="dao_ji_shi69">
<image class="di74" src={{resList['ad6e754e-6243-4acf-9ffd-9a7aeb3f4971'].url}} />
<label class="tu_ceng2273">00</label>
<label class="tu_ceng22_kao_bei72">00</label>
<label class="tu_ceng2271">00</label>
<label class="tu_ceng22_kao_bei370">00</label>
</view>
<view 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 a:for="{{list}}" a:key="i" a:for-index="indes" a:for-item="items"> N*{{items.probability}}%{{indes !== listlength-1 ? ',' : ''}}</label>楼层的用户可获得奖品 N代表盖楼结束时的总楼层
</view>
<view class="zhong_jiang_ming_dan">
<image class="di953" src={{resList['e701381d-fb5a-4b6a-8fc1-71aedea9416d'].url}} />
<view class="zhong_jiang_zhuang_tai">
<!-- 已中奖名单列表 -->
<view class="yi_zhong_jiang">
<!-- 有中奖用户 -->
<view style="position:absolute" a:if="{{prizeMenu.length != 0}}" a:for="{{prizeMenu}}" a:key="idx" a:for-item="prizeItem">
<view style="height:40rpx;position:absolute">
<label style="{{prizeItem.prizestyle.prizefloor}}">第{{prizeItem.floor}}层</label>
<label style="{{prizeItem.prizestyle.prizeuser}}">{{prizeItem.username}}</label>
<image style="{{prizeItem.prizestyle.prizeimage}}" src={{prizeItem.image}}></image>
</view>
</view>
<view class="no_prize" a:if="{{prizeMenu.length == 0}}">总楼层不足,无人中奖</view>
</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['79d3561c-5c4c-47b8-b4f9-51e7f82fcd7c'].url}} />
<!--<image class="jin_du_tiao" src={{resList['40b73efe-19b8-41af-be83-17dc9b933e52'].url}} /> -->
<view class="zu13447">
<view class="item" a:for="{{orderList}}" a:key="index" a:for-item="item">
<label style="{{item.order.orderDay}}">{{item.monthDate}}</label>
<label style="{{item.order.orderFloor}}">{{item.floorRange}}</label>
<label style="{{item.order.orderCredits}}">{{item.credits}}</label>
</view>
</view>
</view>
<prize-modal a:if="{{prizeVisible}}" onPrizeModalClose="onPrizeModalClose" myPrize="{{myPrize}}"></prize-modal>
<noprize-modal a:if="{{noprizeVisible}}" openPrizeStatus="{{openPrizeStatus}}" onHandleNoPrizeClose="onHandleNoPrizeClose" myPrize="{{myPrize}}"></noprize-modal>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="ruleModalClose">
<text>{{ruleData}}</text></rule-modal>
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
import API from '../../api';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import playBgMusic from '/utils/playBgMusic';
const app = getApp();
let musicUrl = null;
Page({
data: {
prizeVisible: false,
noprizeVisible: false,
openPrizeStatus: 0,
// 购买记录列表
orderList: [],
// 中奖名单
prizeMenu: {},
// 购买列表渲染
orderStyle: [],
ruleModalVisible: false,
// myPrizeBtnVisible: false,
ruleData: '',
myPrize: '',
maskVisible: false,
list: '',
totalFloor: '',
listlength: '',
musicSwitch: true
},
onLoad(props) {
// console.log('fuck', JSON.parse(props.data));
const datstr = decodeURIComponent(props.data);
const dat = JSON.parse(datstr);
const { prize, openPrizeStatus, isShowPrize, openPrizeLimit, totalFloor } = dat;
// isShowPrize只展示一次
if (isShowPrize) {
// 有奖品 中奖
if (Object.keys(prize).length != 0) {
this.setData({
prizeVisible: true,
myPrize: prize,
maskVisible: true,
})
} else {
// 没有奖品 未中奖
if (totalFloor >= openPrizeLimit) {
this.setData({
noprizeVisible: true,
openPrizeStatus: 'miss',
myPrize: prize,
maskVisible: true
})
} else {
// 楼层不足100层
this.setData({
noprizeVisible: true,
openPrizeStatus: 'noprize',
myPrize: openPrizeLimit,
maskVisible: true
})
}
}
}
this.getRuleSource();
this.setData({
resList: resList
});
// const {prize,openPrizeStatus,isShowPrize} = JSON.parse(props.data)
// if(isShowPrize){
// if(prize){
// this.setData({prizeVisible:true})
// } else {
// this.setData({
// noprizeVisible:true,
// openPrizeStatus:openPrizeStatus
// })
// }
// }
this.getOrderList();
this.getPrizeMenu();
this.onmusicSwitch();
},
onShareAppMessage() {
return SHARE_CONFIG;
},
onmusicSwitch() {
let { musicSwitch } = this.data;
this.addMusic(musicSwitch);
this.setData({
musicSwitch: !musicSwitch
})
console.log('music点击后', musicSwitch);
},
onPrizeBtnClick() {
my.navigateTo({
url: '/pages/myprize/myprize'
});
},
showRuleModal() {
this.setData({
ruleModalVisible: true,
maskVisible: true
})
},
ruleModalClose() {
this.setData({
ruleModalVisible: false,
maskVisible: false
})
},
// 获取购买记录
async getOrderList() {
let { data } = await API.getBuyFloorList() || {};
console.log('buy', data);
// 购买时间
if (data.length !== 0) {
for (let item of data) {
let createTime = item.createTime;
console.log(createTime, 'create')
// let formatCreateTime = new Date(parseInt(createTime)).toLocaleDateString();
let month = new Date(parseInt(createTime)).getMonth() + 1;
let date = new Date(parseInt(createTime)).getDate();
month = month < 10 ? ('0' + month) : month;
date = date < 10 ? ('0' + date) : date;
item.monthDate = month + '月' + date + '日';
console.log(item.monthDate, 'time')
}
let lens = data.length;
for (let i = 0; i < lens; i++) {
let orderStyle = {
orderDay: {
left: 0,
top: 50 * i + 'rpx',
position: 'absolute',
color: 'white'
},
orderFloor: {
left: 120 + 'rpx',
top: 50 * i + 'rpx',
position: 'absolute',
color: 'white',
width: 260 + 'rpx',
textAlign: 'center'
},
orderCredits: {
left: 370 + 'rpx',
top: 50 * i + 'rpx',
position: 'absolute',
color: 'white',
width: 140 + 'rpx',
textAlign: 'center',
overflow: 'hidden'
}
}
data[i].order = orderStyle;
}
this.setData({
orderList: data,
// orderStyle:orderStyleArr
})
} else {
// 购买记录为空
console.log('购买记录为空');
this.setData({
orderList: null
})
}
},
async getPrizeMenu() {
// await API.getFloorPrize().then((res) => {
// if (res.success && res.data.legnth != 0) {
// let data = res.data;
// // if (data != null) {
// // 用户名单处理
// let floorPrize = data;
// var personMenuArr = [];
// for (let i = 0; i < floorPrize.length; i++) {
// let userName = floorPrize[i].userNick;
// console.log(userName, 'userName');
// if (userName.length == 1) {
// userName = '***';
// }
// if (userName.length >= 2) {
// console.log(userName.length);
// let length = userName.length;
// let f = userName.toString().substr(0, 1);
// // console.log('f',f);
// let last = userName.toString().substr(length - 1, 1)
// // console.log('last',last)
// userName = f + "***" + last;
// // console.log('22222',userName)
// }
// floorPrize[i].username = userName;
// let prizeStyle = {
// prizefloor: {
// left: 0,
// top: 40 * i + 'rpx',
// position: 'absolute',
// color: 'white',
// },
// prizeuser: {
// left: 180 + 'rpx',
// top: 40 * i + 'rpx',
// position: 'absolute',
// color: 'white',
// width: 120 + 'rpx',
// textAlign: 'center'
// },
// prizeimage: {
// left: 400 + 'rpx',
// position: 'absolute',
// verticalAlign: 'middle',
// top: 40 * i + 10 + 'rpx',
// color: 'white',
// width: 40 + 'rpx',
// height: 30 + 'rpx'
// }
// }
// floorPrize[i].prizestyle = prizeStyle;
// }
// console.log(floorPrize, 'arr')
// this.setData({
// prizeMenu: floorPrize
// })
// // } else {
// // 无中奖
// // }
// }else{
// this.setData({
// // prizeMenu: null
// prizeMenu: []
// })
// }
// })
let { data } = await API.getFloorPrize() || {};
console.log(data, 'prizemenu')
if (data != null) {
// 用户名单处理
let floorPrize = data;
var personMenuArr = [];
for (let i = 0; i < floorPrize.length; i++) {
let userName = floorPrize[i].userNick;
console.log(userName, 'userName');
if (userName.length == 1) {
userName = '***';
}
if (userName.length >= 2) {
console.log(userName.length);
let length = userName.length;
let f = userName.toString().substr(0, 1);
// console.log('f',f);
let last = userName.toString().substr(length - 1, 1)
// console.log('last',last)
userName = f + "***" + last;
// console.log('22222',userName)
}
floorPrize[i].username = userName;
let prizeStyle = {
prizefloor: {
left: 0,
top: 50 * i + 'rpx',
position: 'absolute',
color: 'white',
},
prizeuser: {
left: 180 + 'rpx',
top: 50 * i + 'rpx',
position: 'absolute',
color: 'white',
width: 120 + 'rpx',
textAlign: 'center'
},
prizeimage: {
left: 400 + 'rpx',
position: 'absolute',
verticalAlign: 'middle',
top: 50 * i + 10 + 'rpx',
color: 'white',
width: 40 + 'rpx',
height: 30 + 'rpx'
}
}
floorPrize[i].prizestyle = prizeStyle;
}
console.log(floorPrize, 'arr')
this.setData({
prizeMenu: floorPrize
})
} else {
// 无中奖
this.setData({
prizeMenu: []
})
}
},
// 获取规则接口
async getRuleSource() {
API.getActivityBaseInfoById().then((res) => {
if (res.success && res.data) {
let data = res.data;
let list = data.list;
let listlength = list.length;
let totalFloor = res.totalFloor;
this.setData({
ruleData: res.data.rule,
list,
totalFloor,
listlength
})
}
})
},
onPrizeModalClose() {
this.setData({
prizeVisible: false,
maskVisible: false
})
},
onHandleNoPrizeClose() {
this.setData({
noprizeVisible: false,
maskVisible: false
})
},
async addMusic(musicSwitch) {
if (!musicUrl) {
const resultSrc = await app.cloud.file.getTempFileURL({
fileId: 'cloud://C7A066C702682E94326284DF8A2975CC//FILA_building_loop.mp3'
});
if (resultSrc[0]) musicUrl = resultSrc[0].url;
}
// let {musicSwitch} = this.data;
// playBgMusic(true,musicUrl)
playBgMusic(musicSwitch, musicUrl);
console.log('fuck music')
}
});
\ No newline at end of file
{
"usingComponents": {
"prize-modal": "/components/comgong_xi_huo_jiang/comgong_xi_huo_jiang",
"noprize-modal": "/components/comhen_yi_han23/comhen_yi_han23",
"rule-modal": "/components/comyou_xi_gui_ze27/comyou_xi_gui_ze27"
}
}
\ 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: 50%;
left: 0rpx;
width: 750rpx;
height: 1624rpx;
margin-top: -812rpx;
display: block;
position: fixed;
}
.mask {
position: fixed;
width: 750rpx;
height: 1624rpx;
z-index: 99;
background-color: #000;
opacity: 0.7;
}
.shou_ye .di_kao_bei {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
}
.shou_ye .logo {
width: 160rpx;
height: 58rpx;
opacity: 1;
left: 295rpx;
top: 230rpx;
position: absolute;
}
.shou_ye .tu {
width: 673rpx;
height: 674rpx;
opacity: 1;
left: 37rpx;
top: 483rpx;
position: absolute;
}
.shou_ye .an_niu {
width: 458rpx;
height: 138rpx;
opacity: 1;
left: 145rpx;
top: 1208rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .wen_an {
width: 543rpx;
height: 830rpx;
opacity: 1;
left: 102rpx;
top: 328rpx;
position: absolute;
}
.shou_ye .can_yu_ren_shu {
width: 300rpx;
height: 40rpx;
opacity: 1;
display: block;
left: 224rpx;
top: 1364rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 30rpx;
text-align: center;
color: white;
}
.shou_ye .jiang_pinicon {
width: 136rpx;
height: 48rpx;
opacity: 1;
left: 613rpx;
top: 340rpx;
position: absolute;
}
.shou_ye .gui_zeicon {
width: 136rpx;
height: 48rpx;
opacity: 1;
left: 0rpx;
top: 340rpx;
position: absolute;
}
<view class="shou_ye">
<view class="{{maskVisible ? 'mask' : ''}}"></view>
<image class="di_kao_bei" src={{resList['66f2b76f-7265-4cb2-9b4d-7e8207ab1d74'].url}} />
<image class="logo" src={{resList['dd7d3a3b-6fcb-427d-8353-da169708bbab'].url}} />
<image class="tu" src={{resList['41567d28-d1c4-454f-8bb4-4bcb6a103be0'].url}} />
<image a:if="{{startBtnVisible}}" class="an_niu" onTap="gotoVipPage" src={{resList['9720b3cc-2faa-4bac-8244-d5f0d018a6e7'].url}} />
<image class="wen_an" src={{resList['2a026ac4-0a9c-497b-9469-2da99f935821'].url}} />
<image onTap="onPrizeBtnClick" a:if="{{myPrizeBtnVisible}}" class="jiang_pinicon" src={{resList['b7517eae-3bc2-4456-935a-e6e3e1fe995e'].url}} />
<image a:if="{{ruleModalBtnVisible}}" class="gui_zeicon" onTap="showRuleModal" src={{resList['d826a2f1-a3ec-4764-aad2-f6cacc43cfce'].url}} />
<text a:if="{{ruleModalBtnVisible}}" class="can_yu_ren_shu">已有{{joinCount}}人参与</text>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="ruleModalClose"><text>{{ruleData}}</text></rule-modal>
</view>
'use strict';
import resList from '../../resconfig/resList'; //import API from '../../api';
import API from '../../api';
import isEnd from '/utils/isEnd';
import OPEN_PRIZE_STATUS from '/utils/OPEN_PRIZE_STATUS';
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
let isAuth = 0;
const app = getApp();
const { tbcc } = app;
const { commonToast, getAuthUserInfo, navigateToOutside } = tbcc.tb;
Page({
data: {
ruleModalVisible: false,
myPrizeBtnVisible: false,
startBtnVisible: false,
ruleModalBtnVisible: false,
ruleData: '',
joinCount: '',
endTime: '',
startTime: '',
maskVisible:false
},
onLoad(query) {
this.setData({
resList: resList
});
// 页面加载
this.getAuth();
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
onShareAppMessage() {
return SHARE_CONFIG;
},
gotoVipPage() {
console.log('isAuth', isAuth);
if (isAuth === 0) {
this.getAuth();
return;
}
let { endTime, startTime } = this.data;
// 判断活动时间
let currentTime = new Date().getTime();
if (currentTime < startTime) {
commonToast('活动未开始');
return;
};
API.getVipInfo().then(res => {
if (!res.data.isVip) {
commonToast('立即加入会员,即可开始盖楼')
setTimeout(() => {
navigateToOutside(res.data.url)
}, 1000);
}
else
my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye' });
// my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye?data=' + JSON.stringify({endTime}) });
})
},
handleStart() {
console.log('change')
my.redirectTo({
url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye'
});
},
showRuleModal() {
this.setData({
ruleModalVisible: true,
maskVisible:true
})
},
onPrizeBtnClick() {
my.navigateTo({
url: '/pages/myprize/myprize'
});
},
ruleModalClose() {
this.setData({
ruleModalVisible: false,
maskVisible:false
})
},
async init() {
const [{ data: { isUserJoin, startTime, endTime, openPrizeStatus, openPrizeLimit, totalFloor, prize, isShowPrize, rule, joinCount } }, vipInfo] = await Promise.all([
API.getActivityBaseInfoById(),
API.getVipInfo(),
]);
this.setData({
endTime,
startTime
})
console.log('fuck');
let currentTime = new Date().getTime();
if (vipInfo.data.isVip && isUserJoin) {
// vipInfo..data.isVip = true;
if (isEnd(endTime) &&
(openPrizeStatus == OPEN_PRIZE_STATUS.SUCCESS || openPrizeStatus == OPEN_PRIZE_STATUS.NOT_OPEN)) {//活动结束,开奖成功or不开奖(楼层不足,楼层有但没中奖)
// let datstr = JSON.stringify({ prize:prize, openPrizeStatus:prize, isShowPrize:isShowPrize });
let datstr = JSON.stringify({ prize:prize, openPrizeStatus:openPrizeStatus, isShowPrize:isShowPrize, openPrizeLimit:openPrizeLimit,totalFloor });
datstr = encodeURIComponent(datstr);
my.redirectTo({ url: '/pages/pagejie_shu_ye/pagejie_shu_ye?data=' + datstr});
} else {
my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye' });
// my.redirectTo({ url: '/pages/pagehuo_dong_ye/pagehuo_dong_ye?data=' + JSON.stringify({endTime,openPrizeStatus}) });
}
} else {
if (isEnd(endTime) &&
(openPrizeStatus == OPEN_PRIZE_STATUS.SUCCESS || openPrizeStatus == OPEN_PRIZE_STATUS.NOT_OPEN)) {//活动结束,开奖成功or不开奖
my.redirectTo({ url: '/pages/pagejie_shu_ye/pagejie_shu_ye?data=' + JSON.stringify({ isShowPrize: false }) });
} else {
//设置状态
this.setData({
myPrizeBtnVisible: true,
startBtnVisible: true,
ruleModalBtnVisible: true
})
}
};
this.setData({
ruleData: rule,
joinCount: joinCount
})
},
/**
* 登录接口
*/
async login() {
const { nickName, avatar } = app;
const { success } = await API.login({ userNick: nickName, avatar }).catch(res => {
console.log('登录失败..')
commonToast(res && res.message);
}) || {};
if (success) {
console.log('登录成功,正在初始化')
this.init();
}
},
/**
* 获取用户授权信息
*/
async getAuth() {
const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err);
this.setData({
startBtnVisible: true,
})
});
if (userInfo) {
isAuth = true;
console.log('授权成功,userInfo=>', userInfo);
const { nickName, avatar } = userInfo;
app.nickName = nickName;
app.avatar = avatar;
this.login();
this.setData({
startBtnVisible: false,
})
}
},
});
\ No newline at end of file
{
"usingComponents": {
"rule-modal": "/components/comyou_xi_gui_ze27/comyou_xi_gui_ze27"
}
}
\ No newline at end of file
<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(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
This diff is collapsed.
import * as tb from './lib/tb';
import * as tbMock from './lib/tbMock';
import * as utils from './lib/utils';
import * as constants from './lib/constants';
import capi from './lib/capi';
import request from './lib/request';
const isH5 = 'undefined' !== typeof window;
// 如果为h5环境走mock数据
let _tb = {};
Object.entries(tb).forEach(([key, value]) => {
_tb[key] = isH5 ? tbMock[key] : value;
});
export default {
capi,
tb: _tb,
utils,
request,
constants
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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