Commit df8cc7bb authored by AU-Pro-mac's avatar AU-Pro-mac

code update

parent 2fad7955
......@@ -2,7 +2,7 @@ import cloud from '@tbmp/mp-cloud-sdk';
import tbcc from './tbcc-sdk';
cloud.init({
env: 'test' // 云函数环境 test 测试环境 online 线上环境
env: 'online' // 云函数环境 test 测试环境 online 线上环境
});
App({
......@@ -45,8 +45,9 @@ App({
// this.activityId = activityId || '5f73f1b09da6718132be23d1';
// this.activityId = activityId || '5f7a893575cfb6f3d500933c';
this.activityId = activityId || '5f7d49259da671f3b6cf5dc6';
// this.activityId = activityId || '5f7d49259da671f3b6cf5dc6';
// this.activityId = activityId || '5f7a893575cfb6f3d500933c' // ZR
this.activityId = activityId || '5f86756f964f976c7085759a';
// this.activityId = activityId || '5f7d49259da671f3b6cf5dc6';
// this.activityId = activityId || '5f7c0c3c8e6a08f0821df465';
......
......@@ -17,11 +17,14 @@
<!-- </view> -->
<!-- 复制按钮 -->
<image class="my-prize-copy" data-text="{{item._id}}" onTap="handleCopyId" src="{{task.image.copyIcon}}" />
<view class="my-prize-tip" a:if="{{item.drawStatus !== PRIZE_DRAW_STATUS_MAP.FINISHED}}">请于{{item.endTime}}前领取</view>
<view class="my-prize-tip" a:else>奖品编码:{{item._id}}</view>
<view class="my-prize-tip" a:if="{{item.drawStatus === PRIZE_DRAW_STATUS_MAP.FINISHED }}">奖品已过期失效</view>
<image a:if="{{item.drawStatus != PRIZE_DRAW_STATUS_MAP.RECEIVE && item.drawStatus != PRIZE_DRAW_STATUS_MAP.REPEAT && item.drawStatus != PRIZE_DRAW_STATUS_MAP.FINISHED}}" class="my-prize-copy" data-text="{{item._id}}" onTap="handleCopyId" src="{{task.image.copyIcon}}" />
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.RECEIVE}}">请于{{item.endTime}}前领取</view>
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.DEALING}}">编码:{{item._id}}</view>
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.SUCCESS}}">编码:{{item._id}}</view>
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.FAILURE}}">编码:{{item._id}}</view>
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.FINISHED }}">奖品已过期失效</view>
<view class="my-prize-tip" a:if="{{item.drawStatus == PRIZE_DRAW_STATUS_MAP.REPEAT}}">请于{{item.endTime}}前领取</view>
<!--
<view class="my-prize-tip" a:if="{{item.drawStatus === PRIZE_DRAW_STATUS_MAP.FAILURE}}">{{item.remark}}</view>
......
......@@ -37,8 +37,8 @@
.rule-modal__bd {
position: absolute;
top: 40rpx;
left: 40rpx;
right: 40rpx;
left: 30rpx;
right: 30rpx;
bottom: 40rpx;
overflow-x: hidden;
font-size: 24rpx;
......@@ -66,6 +66,8 @@
line-height: 1.26em;
height: 330rpx;
overflow: scroll;
padding-bottom: 20rpx;
box-sizing: border-box;
}
......
......@@ -51,7 +51,7 @@ Page({
itemId,
taskType: taskType,
image: {
bg: '//yun.duiba.com.cn/spark/assets/bg1.d818f787351875b0982937d8bb68b0655febec3c.png',
bg: '//yun.duiba.com.cn/spark/assets/bgbgbgbg.5a5ded75150e6135704a73573196bf21714c3f7d.png',
banner: banner,
// title: '//yun.dui88.com/taobaomini/clientCTest/goods_title@2x.png',
collect: '//yun.dui88.com/taobaomini/clientCTest/goods_collection@2x.png',
......
......@@ -80,6 +80,16 @@
overflow: hidden;
}
.homepage_waitingMask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background-color: #fff;
z-index: 999;
}
.homepage_back {
width: 100%;
height: 1624rpx;
......@@ -90,11 +100,18 @@
.bei_jing80 {
width: 750rpx;
height: 1624rpx;
height: 812rpx;
left: 0;
top: 0;
position: absolute;
}
.bei_jing81 {
width: 750rpx;
height: 812rpx;
left: 0;
top: 812rpx;
position: absolute;
}
.head {
width: 710rpx;
......@@ -467,11 +484,11 @@
position: absolute;
}
.biao_ti75 {
width: 632rpx;
height: 260rpx;
width: 661rpx;
height: 283rpx;
opacity: 1;
left: 110rpx;
top: 279rpx;
left: 81rpx;
top: 266rpx;
position: absolute;
}
......@@ -3,8 +3,9 @@
<!-- 主页 -->
<view class="homepage_mian">
<view class="homepage_back">
<image class="bei_jing80" src="{{resList['abe2084e-ff0b-454d-ad6e-a9117e44bdaa'].url}}" />
<image class="biao_ti75" src="{{resList['3e2471e2-f271-4931-8665-0c2d7fe332b4'].url}}" />
<image class="bei_jing80" src="{{resList['5541c174-562f-46a1-9b8c-4b2003ce7708'].url}}" />
<image class="bei_jing81" src="{{resList['04a1f453-b65a-4dee-b899-6e3b4a1e6c8a'].url}}" />
<!-- <image class="biao_ti75" src="{{resList['3b0a5f5f-8922-4eec-bfd1-e240460b1ea4'].url}}" /> -->
</view>
......@@ -56,7 +57,7 @@
<image class="video_replay_img" src="{{resList['1a37baca-db9c-4e06-8bd3-e8bd78c72b1d'].url}}" mode="aspectFill" />
</view>
<!-- 视频部分 -->
<!-- 视频提示 -->
<view hidden="{{videoBottom_timeout}}" class="video_block {{ videoBottom ? 'block_opciaty0' : ''}}">
<view class="video_block_wrapper" onTap="videoShowFunc" >
<!-- 视频播放按钮 -->
......@@ -119,9 +120,11 @@
</view>
</view>
<view class='homepage_waitingMask' a:if="{{!getAnimationMsg}}"></view>
<!-- 动画 - 游戏部分 -->
<pagecanvas
a:if="{{animationFlag}}"
class="homepage_pagecanvas"
onBackPage="backToPage"
gameType="{{gameType}}"
......
......@@ -36,6 +36,7 @@ Page({
startTime: 0,
endTime: 0,
data: {
getAnimationMsg: false,
noStartToast: false,
noStart: true,
lowToast: false,
......@@ -92,41 +93,25 @@ Page({
ticketNum: 0,
drawNum: 0,
todayFirstLogin: true,
headTop: 10
headTop: 10,
animationFlag: false
},
async onLoad (query) {
console.info(`%cPage onLoad with query: ${JSON.stringify(query)}`, ConsoleStyle)
// let queryArr = Object.keys(query)
// this.queryArr = queryArr.join('----')
// console.log(this.queryArr)
// commonToast(JSON.stringify(query))
// if (typeof query === 'string') {
// commonToast(query)
// let str = decodeURI(query)
// let str1 = decodeURIComponent(str)
// this.refresh = this.getQueryVariable('refresh')
// this.inviteId = this.getQueryVariable('inviteId')
// this.query = {
// refresh: this.refresh,
// inviteId: this.inviteId
// }
// } else {
// this.query = query
// if (this.query && this.query.inviteId) this.inviteId = this.query.inviteId
// if (this.query && this.query.refresh) this.refresh = this.query.refresh
// }
this.query = query
if (this.query && this.query.inviteId) this.inviteId = this.query.inviteId
if (this.query && this.query.refresh) this.refresh = this.query.refresh
this.getAuth()
// 页面加载
// 开场动画
this.setData({ gameType: 3, gameZindex: -1 })
this.setData({ gameType: 0, gameZindex: -1 })
// 开场动画 => 业务页面 监听
// cover: getAuth login init checkDohelp
this.onAnimationLoadOver()
// this.onAnimationLoadOver()
let sysInfo = await getSystemInfo()
this.setData({
......@@ -145,33 +130,54 @@ Page({
openAnimationTimeout: null,
onAnimationLoadFlag: false,
// 收到 canvas lottie 加载结束的 信息 -- 且等待 开场动画 5s
lottieReadyMsg: false,
onAnimationLoadOver (msg = '') {
if (msg === 'lottieReady') {
console.log('%creceive canvas lottie ready, onAnimationLoadOver', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
console.log(`%c${msg}`, 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
this.lottieReadyMsg = true
if (this.noAnimationMsg) {
this.setData({ gameType: 3 })
setTimeout(() => {
this.setData({getAnimationMsg: true})
}, 300)
}
if (this.onAnimationLoadFlag) return
clearTimeout(this.openAnimationTimeout)
this.openAnimationTimeout = setTimeout(() => {
this.setData({ gameShow_timeout: false, gameType: 0 })
// setTimeout(() => { this.setData({ gameShow: false }) }, 350)
this.setData({ gameZindex: 2 })
if (this.isNewUser) this.showNewUserModal()
this.mainDoHelp()
// 主要的 授权 => 登陆 => 获取基本信息 开始
this.getAuth()
// this.getAuth()
}, 5000)
} else if (msg === 'noAnimation') {
console.log(`%c${msg}`, 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
this.onAnimationLoadFlag = true
this.setData({ gameShow_timeout: false, gameType: 0 })
this.setData({ gameZindex: 2 })
if (this.isNewUser) this.showNewUserModal()
this.mainDoHelp()
} else if (!this.openAnimationTimeout) {
console.log('%conAnimationLoadOver timeout run', 'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;')
if (this.onAnimationLoadFlag) return
this.openAnimationTimeout = setTimeout(() => {
this.setData({ gameShow_timeout: false, gameType: 0 })
// setTimeout(() => { this.setData({ gameShow: false }) }, 350)
this.setData({ gameZindex: 2 })
this.onAnimationLoadFlag = true
if (this.isNewUser) this.showNewUserModal()
this.mainDoHelp()
// 主要的 授权 => 登陆 => 获取基本信息 开始
this.getAuth()
// this.getAuth()
}, 8000)
}, 5000)
}
},
......@@ -201,6 +207,7 @@ Page({
}
},
noAnimationMsg: false,
// 登录接口
async login() {
const { nickName, avatar } = app;
......@@ -216,9 +223,18 @@ Page({
console.log('%c-----用户登陆信息\n' + '-----yd.login\n', ConsoleStyle, data)
app.openId = data.openId
this.isNewUser = data.isNewUser
this.noAnimationMsg = true
if (data.noAnimation) {
this.onAnimationLoadOver('noAnimation')
this.setData({ getAnimationMsg: true })
} else {
if (this.lottieReadyMsg) this.onAnimationLoadOver('lottieReadyMsg')
else this.onAnimationLoadOver()
this.setData({animationFlag: true})
}
// 首次进入 弹出活动规则
if (this.isNewUser) this.showNewUserModal()
// if (this.isNewUser) this.showNewUserModal()
// this.checkNewUserInGame()
this.getGameInfo()
......@@ -226,6 +242,7 @@ Page({
this.init();
})
.catch(res => {
this.setData({ getAnimationMsg: true })
console.warn(res)
this.init()
if (res.code == '220002') {
......@@ -327,7 +344,10 @@ Page({
commonToast(res && res.message)
}
}) || {};
},
mainDoHelp () {
// 检查是否是vip
this.checkVip()
......@@ -353,13 +373,6 @@ Page({
},
btnImg: '//yun.duiba.com.cn/spark/assets/我也要赢大奖_np.cbfefdc57213392216846dd07bbb4248e24e683a.png' })
}
// 新用户 不是助力链接
// else if (this.isNewUser && !this.query.inviteId) console.log('%cisNewUser', 'color:blue;')
// // 老用户 助力链接
// else if (!this.isNewUser && this.query.inviteId) {
// }
}
},
......@@ -559,7 +572,7 @@ Page({
// 去转盘
gotoTurnTable () { my.navigateTo({url: '../turnTablePage/turnTablePage'}) },
// video - turn left
// video - turn left - 外部
videoTurnLeft () {
// TODO: 切换到末尾或者开头,左右按钮消失
let i = this.data.videoActiveIndex
......@@ -581,7 +594,7 @@ Page({
}
},
// video - turn right
// video - turn right - 外部
videoTurnRight () {
// TODO: 切换到末尾或者开头,左右按钮消失
let i = this.data.videoActiveIndex
......@@ -603,7 +616,7 @@ Page({
}
},
// video - change to another video
// video - change to another video - 记录视频播放时常
videoRecord (index) {
this.videoSrcArr[index].timeStamp = this.timeStamp
// if (this.timeStamp) return
......@@ -634,6 +647,7 @@ Page({
}
},
// video - 自定义 重播
onVideoReplay (e) {
console.log(e)
// this.videoCtx.seek(1)
......@@ -658,7 +672,7 @@ Page({
}
},
// video - hide
// video - 自定义 hide
videoHideFunc() {
this.videoRecord(this.data.videoActiveIndex)
console.log('videoHideFunc', this.videoSrcArr)
......@@ -708,7 +722,7 @@ Page({
})
},
// video - 展示视频
// video - 自定义 展示视频
videoShowFunc() {
this.videoCtx = my.createVideoContext('videoCtx')
this.setData({ videoShow: true })
......
......@@ -17,7 +17,7 @@ Page({
endTime: null,//到期时间
task: {
image: {
bg: '//yun.duiba.com.cn/spark/assets/bg1.d818f787351875b0982937d8bb68b0655febec3c.png', //背景图
bg: '//yun.duiba.com.cn/spark/assets/bgbgbgbg.5a5ded75150e6135704a73573196bf21714c3f7d.png', //背景图
copyIcon: '//yun.duiba.com.cn/spark/assets/copyicon.4017db37e6be807f8b864c962beafdfeeaeb26f0.png', //复制
logisticsBth: '//yun.duiba.com.cn/spark/assets/mybtn查看物流.03ea3cdd889c8f09885b24a56dc99460734bc8a6.png', //查看物流
useBtn: '//yun.duiba.com.cn/spark/assets/mybtn去使用.c0276af13ecf949f4624244458dad57128641a54.png', //去使用(除实物奖品外)
......@@ -65,10 +65,12 @@ Page({
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() + '';//获取分
let t2 = new Date(endTime).getHours() + '';//获取时
let t3 = new Date(endTime).getMinutes() + '';//获取分
const t4 = new Date(endTime).getMilliseconds() + '';//获取秒
if (parseInt(t2) < 10) t2 = '0'+t2
if (parseInt(t3) < 10) t3 = '0'+t3
item.endTime = t1 + ' ' + t2 + ':' + t3
console.log('endTime', endTime, t1 + ' ' + t2 + ':' + t3);
})
......
......@@ -18,11 +18,17 @@ Page({
prizesModalVisible: false,
missionModalVisible: false,
prizeInfo: `一等奖:清空购物车大奖,上限5000元,每日1个名额
二等奖:时空焕活透亮润泽胶囊精华液约30粒(VC胶囊)
三等奖:时空焕活胶囊精华液约30粒(金胶)
四等奖:时空焕活透亮润泽胶囊精华液约7粒(VC胶囊7粒)
五等奖:面额为1100-150的雅顿店铺优惠券`,
prizeInfo: `一等奖:清空购物车大奖
(上限4999元,每日仅限1个名额)
* 仅限清空于 伊丽莎白雅顿官方旗舰店 所购商品\n
二等奖:雅顿小鲜胶约30粒
(时空焕活透亮润泽胶囊精华液\n
三等奖:雅顿小金胶约30粒
(时空焕活胶囊精华液\n
四等奖:雅顿小鲜胶约7粒
(时空焕活透亮润泽胶囊精华液\n
五等奖:雅顿店铺优惠券
(面额为满1100元减150元\n`,
prizeInfoTitle: '奖品介绍',
......
......@@ -5,17 +5,29 @@ const resList = {
uuid: '79ba268e-ab55-477b-a5c0-0f4a2d77d36c',
url: '//yun.duiba.com.cn/spark/assets/bc2c1b9bca981d0675688619e1352cac23b95f41.png'
},
'abe2084e-ff0b-454d-ad6e-a9117e44bdaa': {
name: '背景80',
ext: '.png',
uuid: 'abe2084e-ff0b-454d-ad6e-a9117e44bdaa',
url: '//yun.duiba.com.cn/spark/assets/598bc8df75f3942dfadc148c4a4d64077c075e52.png'
// 'abe2084e-ff0b-454d-ad6e-a9117e44bdaa': {
// name: '背景80',
// ext: '.png',
// uuid: 'abe2084e-ff0b-454d-ad6e-a9117e44bdaa',
// url: '//yun.duiba.com.cn/spark/assets/主页面.db85541e76bfe17e2a2b22f36e2acb26d526be5e.jpg'
// },
'5541c174-562f-46a1-9b8c-4b2003ce7708': {
name: '主页面上',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/主页面上.44610e56f69fb3c8918cdf2832593e32c4cb60ef.jpg',
uuid: '5541c174-562f-46a1-9b8c-4b2003ce7708'
},
'04a1f453-b65a-4dee-b899-6e3b4a1e6c8a': {
name: '主页面下',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/主页面下.9fa29d05aa4a572ff1a0a32e40e38829c6aa41cf.jpg',
uuid: '04a1f453-b65a-4dee-b899-6e3b4a1e6c8a'
},
'44b8923b-c9f9-4246-a4ff-4093ff97ca33': {
name: '抽奖中心',
ext: '.png',
uuid: '44b8923b-c9f9-4246-a4ff-4093ff97ca33',
url: '//yun.duiba.com.cn/spark/assets/9e012c2481e713152b6930ba8ac38390417c0610.png'
url: '//yun.duiba.com.cn/spark/assets/抽奖中心new.a20a057526b2680639e23eb6e60fda06efbb6031.png'
},
'e41e5558-4943-4e71-a19d-3e97018b7111': {
name: '圆角矩形539',
......@@ -33,7 +45,7 @@ const resList = {
name: '门票补给站',
ext: '.png',
uuid: 'db8bff60-3223-428b-81a8-27c4742a6469',
url: '//yun.duiba.com.cn/spark/assets/e4b83d67ec5451b9a2a6ce6aa1698d587152ad8e.png'
url: '//yun.duiba.com.cn/spark/assets/门票补给站new.b1752dd906fd57aec3d7d723d2f8d317a232c206.png'
},
'23bc505e-54ee-4c28-8d9f-66b2041ff579': {
name: '圆角矩形479',
......@@ -81,7 +93,7 @@ const resList = {
name: '多边形578',
ext: '.png',
uuid: '22c949b8-84af-4a22-bb21-70088d1eafad',
url: '//yun.duiba.com.cn/spark/assets/dbaf4d67234b7c4589a66e764db7aeed9f07b357.png'
url: '//yun.duiba.com.cn/spark/assets/popbacknew.9707a8ce1ed8fce32cd555b46a716007a143d1c1.png'
},
'f2915694-4e09-4776-8f38-9ddb285e4d17': {
name: '雅顿生产线二级',
......@@ -392,7 +404,7 @@ const resList = {
'81a085b2-ce9c-4a8f-bdcc-d08f10083134': {
name: 'yd_happypark_new',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/yd_happypark_new.9c828c4054ba32b97937fd955b93d73029cc315e.png',
url: '//yun.duiba.com.cn/spark/assets/雅顿乐园new.04e537917cac509f29d20a3c46efd18ccaeba3a1.png',
uuid: '81a085b2-ce9c-4a8f-bdcc-d08f10083134'
},
'334aff33-1a9e-4277-aafe-3d9f22eab3d5': {
......@@ -644,13 +656,13 @@ const resList = {
'ffe6b4b2-3401-44b6-b090-11005d2fd5d7': {
name: '胶囊消消',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/胶囊消消.898555668d65ae277a2db5f6541615e4ed6336be.png',
url: '//yun.duiba.com.cn/spark/assets/胶囊消new.8afbcc64f045ee6d8f0cbbebc620146515a5524d.png',
uuid: 'ffe6b4b2-3401-44b6-b090-11005d2fd5d7'
},
'b23ce750-11e2-45f9-b3af-a0a7dedddcfd': {
name: '时空传送',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/时空传送.53c4af1a66a461812b8f3a502b14cddf4daed9b3.png',
url: '//yun.duiba.com.cn/spark/assets/时空传new.56178dfa1f98b615679c52bdeb9ea3bcc99673ee.png',
uuid: 'b23ce750-11e2-45f9-b3af-a0a7dedddcfd'
},
'70d07de0-4fc3-4802-bc56-c5cb57a28b91': {
......@@ -812,7 +824,7 @@ const resList = {
'd8ae79e1-971e-4e78-a365-553656128915': {
name: '赢清空购物车气泡',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/赢清空购物车气泡.3789e50cf354d457ff87b93ee1772a52337a5b66.png',
url: '//yun.duiba.com.cn/spark/assets/赢清空购物车气new.ce7494ed67c46d32cc60a21a891e1056bf543f5d.png',
uuid: 'd8ae79e1-971e-4e78-a365-553656128915'
},
'1410be2a-7ab5-4c3b-bada-3541bdeeeb0a': {
......@@ -820,6 +832,12 @@ const resList = {
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/关闭视频新.79bbc2ff9ec51c07cfb3fcb9bc1af26bb71f2231.png',
uuid: '1410be2a-7ab5-4c3b-bada-3541bdeeeb0a'
},
'3b0a5f5f-8922-4eec-bfd1-e240460b1ea4': {
name: '标题标题new',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/标题标题new__.5119864fc8268232b2dccdd82ca19a2d99d18a67.png',
uuid: '3b0a5f5f-8922-4eec-bfd1-e240460b1ea4'
}
};
export default resList;
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