Commit a37e1adb authored by 任建锋's avatar 任建锋

--

parent 1afefc08
......@@ -25,8 +25,8 @@
</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:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" src="{{task.image.hasGetBtn}}" />
<!-- 优惠券去使用 -->
<image a:else onTap="handleTouse" data-item="{{item}}" src="{{task.image.useBtn}}" />
</block>
......
......@@ -148,6 +148,11 @@ const apiList = {
method: 'get',
isShowLoading: false
},
doCompleteTask: {
handle: 'doCompleteTask',
method: 'get',
isShowLoading: false
},
/**获取用户信息 */
getUserInfo: {
handle: 'getUserInfo',
......
......@@ -8,13 +8,13 @@ cloud.init({
App({
env,
requestType: 'yapi', // yapi,cloud: 云函数
requestType: 'cloud', // cloud,cloud: 云函数
// requestType: 'local', // yapi,cloud: 云函数
cloudName: 'collectCard', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud,
tbcc,
sellerId:"628189716",
sellerId:"2207623078795",
onLaunch(options) {
this.handleQuery(options.query || {});
var pages = getCurrentPages()
......@@ -32,7 +32,7 @@ App({
const { activityId } = query;
// this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
// this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1
this.activityId = activityId || '5f8d47218e6a0888fc426fad'; //小婷2
this.activityId = activityId || '5fd03fd63075d9784dbcd7ac'; //小婷2
}
});
.indexpage{
position: fixed !important;
top:0 !important;
left:0 !important;
right:0 !important;
bottom:0 !important;
margin: auto;
position: fixed !important;
top:0 !important;
left:0 !important;
right:0 !important;
bottom:0 !important;
margin: auto;
}
/*文字垂直居中*/
.fontVerticalCenter{
......
......@@ -5,16 +5,7 @@
}
.mycardpanel .mycardbody .mycardcontent{
overflow-y:scroll;
}
#canvas{
position:fixed;
top:0;
left:0;
bottom:0;
margin:auto;
width:750rpx;
height:1624rpx;
pointer-events: none;
z-index:10;
}
.getcardpanel {
height: 1094rpx !important;
......
......@@ -10,6 +10,7 @@ Component({
this.props.onTapHiddenPanelEvent(e);
},
onTapGetGivingCardAlsoBtn(e){
//埋点
BuriedClick(BuriedType.GIVING_CARD_PRIZE_BTN)
this.props.onTapHiddenPanelEvent(e);
}
......
......@@ -13,6 +13,7 @@ Component({
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
},
//从卡片库中找到对应的图片根据type
async setCardUrl(){
const { activityId } = getApp();
let MyCardsInfo = await API.getMyCardsInfo({ activityId }).catch(res => {
......@@ -28,6 +29,7 @@ Component({
}
}
},
//点击获取好友赠送的卡片
async onTapGetGivingCardBtn(e){
events.emit("doDisibleAll",true)
const { activityId } = getApp();
......@@ -37,11 +39,11 @@ Component({
inviteId:DataCenter.givingCardData.cardId
}).catch(res => {
if(res&&res.code=="430008"){
//非店铺会员
//不能领取自己的卡片
DataCenter.joinmemberpanelText="不能领取自己的卡牌哦~"
this.showPanel("joinmemberpanel");
}else if(res&&res.code=="430011"){
//只有新会员才能助力哦
//卡片已被领取
DataCenter.sorryMsgText="手速太慢啦\n该卡牌已被其他好友截胡领走啦..."
this.showPanel("sorrypanel");
}else{
......
......@@ -10,6 +10,7 @@ Component({
this.props.onTapHiddenPanelEvent(e);
},
onTapHelpPrizeAlsoJoinBtn(e){
//埋点
BuriedClick(BuriedType.HELP_PRIZE_BTN)
this.props.onTapHiddenPanelEvent(e);
}
......
......@@ -10,6 +10,7 @@ Component({
this.props.onTapHiddenPanelEvent(e);
},
onTapJoinMemberBtn(e){
//跳转加入会员地址
my.navigateTo({
url: DataCenter.vipInfo.url
});
......
......@@ -9,18 +9,17 @@ Component({
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
},
//点击赠送卡片按钮
onTapMcGivingBtn(e){
DataCenter.cardType=e.target.dataset.value;
this.props.onGivingCard()
}
},
didMount(props) {
console.log("this.props.CollectCardInfo",this.props.CollectCardInfo)
let {
giftCardStatus,
taskOpenStatus
} = this.props.CollectCardInfo.data;
console.log("giftCardStatus",giftCardStatus)
this.setData({
resList: resList,
MyCardsInfo:DataCenter.MyCardsInfo,
......
......@@ -5,6 +5,6 @@
<text class="gong_xi_huo_de_yi_xia_jiang_li ">恭喜获得以下奖励</text>
<text class="jiang_pin_yi_fa_fang_ke_zai_jiang_pin_zhong_cha_kan95 ">奖品已发放,可在【奖品】中查看</text>
</view>
<image class="prizeimg " src={{resList['944dc7c0-cd64-4901-a9aa-e85f3d8e97a8'].url}} />
<image class="prizeimg " src={{drawLotteryPrizeData.image}} />
<image class="prizeclosebtn " onTap="hiddenPanelEvent" data-value="prizepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view>
\ No newline at end of file
<view class="rulepanel">
<image class="dim1131 " src={{resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url}} />
<view class="ruletext ">
{{rule}}
<view class="ruletext " style="width: 432rpx;height: 565rpx;" scroll-y="{{true}}">
<view style="min-height: calc(100% + 1px);">{{rule}}</view>
</view>
<image class="ruleclosebtn " onTap="hiddenPanelEvent" data-value="rulepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view>
.ruletext{
-webkit-overflow-scrolling: touch;
overflow-y:scroll;
z-index:10;
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ Component({
didMount(props) {
this.setData({
resList: resList,
sorryMsgText:DataCenter.sorryMsgText
sorryMsgText:DataCenter.sorryMsgText //错误文案
});
},
......
......@@ -9,24 +9,25 @@
<!-- 去购买 -->
<image class="tasknonebuybtn "
a:if={{(item.taskType==="orderGoods")}}
onTap="onTapTaskNoneGotoBtn"
data-value={{item}}
onTap="onTapTaskNoneGotoBtn"
data-value={{item}}
src={{resList['befa9414-7e21-4e4a-a4d6-d42324525cd2'].url}} />
<!-- 去购买 -->
<image class="tasknonebuybtn "
a:elif={{(item.taskType==="orderDepositGoods")}}
onTap="onTapTaskNoneGotoBtn"
data-value={{item}}
onTap="onTapTaskNoneGotoBtn"
data-value={{item}}
src={{resList['befa9414-7e21-4e4a-a4d6-d42324525cd2'].url}} />
<!-- 去关注 -->
<image class="tasknonetofocusbtn "
onTap="onTapTaskNoneToFocusbtn"
data-value={{item.taskType}}
a:elif={{(item.taskType==="follow")}}
src={{resList['ba2793d6-94cd-4fe1-ae3d-11278e0a66f8'].url}} />
<!-- 去浏览 -->
<image class="tasknonetobrowsebtn "
a:elif={{(item.taskType==="jumpLink")}}
onTap="onTapTaskNoneGotoBtn"
onTap="onTapTaskNoneGotoBtn"
data-value={{item}}
src={{resList['8473ab9f-df8e-4c4e-b249-8d1cad9f04ae'].url}} />
<!-- 去完成 -->
......@@ -38,7 +39,7 @@
</view>
<!-- 待领取 -->
<image a:if={{(item.status=="2")}} class="taskreadybtn " onTap="onTapTaskReadyBtn" data-value=item.taskType src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} />
<image a:if={{(item.status=="2")}} class="taskreadybtn " onTap="onTapTaskReadyBtn" data-value={{item.taskType}} src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} />
<view a:if={{(item.status=="3")}}>
<!-- 已完成 -->
......
......@@ -7,8 +7,6 @@ const { tbcc } = app;
import API from '../../api';
import events from '../../events';
const { commonToast, getAuthUserInfo, navigateToOutside,favorShop} = tbcc.tb;
Component({
props: {},
data: {
......@@ -49,7 +47,7 @@ Component({
text:"每邀请一位,翻牌次数",
},
//跳转页面
jumpLink:{
browseGoods:{
icon:"//yun.duiba.com.cn/spark/assets/cd21972ddfd45755dddd76ff2990755dd03cfadb.png",
text:"翻牌次数",
},
......@@ -60,23 +58,27 @@ Component({
this.props.onTapHiddenPanelEvent(e);
events.emit("updateIndex");
},
//领取奖励
async onTapTaskReadyBtn(e){
//获取活动基础信息
const { activityId } = getApp();
//获取活动基础信息
let taskType=e.target.dataset.value;
let receiveTaskRewards = await API.receiveTaskRewards({ activityId,taskType }).catch(res => {
let receiveTaskRewards = await API.receiveTaskRewards({ activityId,taskType,rewardsKey:"gameTimes" }).catch(res => {
commonToast(res && res.message);
}) || {};
if(receiveTaskRewards&&receiveTaskRewards.success){
commonToast(`任务完成,翻牌次数+${receiveTaskRewards.data.rewards}`);
await this.updateData()
}
},
async onTapTaskNoneToFocusbtn(){
const favorStatus = await favorShop(sellerId).catch(err => {
//关注店铺
async onTapTaskNoneToFocusbtn(e){
const { activityId } = getApp();
console.log("app.sellerId",app.sellerId)
const favorStatus = await favorShop(app.sellerId).catch(err => {
console.log('关注店铺失败', err);
});
if(favorStatus){
const { activityId } = getApp();
let taskType=e.target.dataset.value;
let doCompleteTask = await API.doCompleteTask({ activityId,taskType }).catch(res => {
commonToast(res && res.message);
......@@ -87,71 +89,87 @@ Component({
}
}
},
//其他去完成按钮
onTapTaskNoneGotoBtn(e){
let taskType=e.target.dataset.value.taskType;
if(taskType=="invites"){
//邀请
this.inviteTask()
}else if(taskType=="groupChat"){
//加群
this.groupChatTask(taskType,e.target.dataset.value.url)
}else if(taskType=="member"){
//加入会员
this.memberTask(taskType,e.target.dataset.value.url)
}else if(taskType=="jumpLink"){
}else if(taskType=="browseGoods"){
//浏览页面
this.jumpLinkTask(taskType,e.target.dataset.value.url)
}else if(taskType=="collectGoods"){
//收藏商品
BuriedClick(BuriedType.COLLECT_GOODS_BTN)
my.navigateTo({
url:"/pages/collectGoods/collectGoods?itemIds="+e.target.dataset.value.itemIds
});
}else if(taskType=="orderGoods"){
//下单商品
//埋点
BuriedClick(BuriedType.ORDER_GOODS_BTN)
my.navigateTo({
url:"/pages/orderGoods/orderGoods?itemIds="+e.target.dataset.value.itemIds
});
}else if(taskType=="orderDepositGoods"){
//下单定金
my.navigateTo({
url:"/pages/orderDepositGoods/orderDepositGoods?itemIds="+e.target.dataset.value.itemIds
});
}
},
//加群任务
async groupChatTask(taskType,url){
const { activityId } = getApp();
let doCompleteTask = await API.doCompleteTask({ activityId,taskType }).catch(res => {
commonToast(res && res.message);
}) || {};
await this.updateData()
if(doCompleteTask&&doCompleteTask.success){
my.navigateTo({
url:url
url
});
}
},
//跳转任务
async jumpLinkTask(taskType,url){
const { activityId } = getApp();
let doCompleteTask = await API.doCompleteTask({ activityId,taskType }).catch(res => {
commonToast(res && res.message);
}) || {};
await this.updateData()
if(doCompleteTask&&doCompleteTask.success){
my.navigateTo({
url:url
url
});
}
},
//加入会员
async memberTask(taskType,url){
const { activityId } = getApp();
let doCompleteTask = await API.doCompleteTask({ activityId,taskType }).catch(res => {
commonToast(res && res.message);
}) || {};
await this.updateData()
if(doCompleteTask&&doCompleteTask.success){
my.navigateTo({
url:url
url
});
}
},
//邀请会员
inviteTask(){
this.props.onInviteTask()
},
//更新任务列表
async updateData(){
const { activityId } = getApp();
//获取中奖轮播
let TaskList = await API.getTaskList({ activityId }).catch(res => {
commonToast(res && res.message);
}) || {};
......
......@@ -20,4 +20,6 @@
}
.taskpanel .taskbody{
overflow-y:scroll;
height: 678rpx!important;
z-index:10;
}
\ No newline at end of file
.win_bg {
position: fixed;
position: absolute;
top: 0;
left: 0;
width: 100%;
......@@ -7,7 +7,7 @@
background: rgba(0, 0, 0, 0.5);
}
.win_bg > * {
position: fixed;
position: absolute;
top: 0;
bottom: 0;
left: 0;
......
......@@ -57,7 +57,7 @@ Page({
res && commonToast(res)
}) || {}
if(success) {
this.setData({ goodsList: data || [] })
this.setData({ goodsList: data.list || [] })
}
},
//任务完成 616444374083
......
......@@ -20,7 +20,7 @@ Page({
copyIcon: '//yun.duiba.com.cn/spark/assets/7ac9b1ca4bdea23b5f8b69b46e373900d56562e2.png', //复制
addressBth: '//yun.duiba.com.cn/spark/assets/a1f0d3f252236a599d0dc37d04f9abf1167b0afd.png', //填写地址(实物奖品)
getBth: '//yun.duiba.com.cn/spark/assets/f710c4170feac9e38992c7b79df8b20dffa151d6.png', //立即领取(除实物奖品外)
logisticsBth: '//yun.duiba.com.cn/spark/assets/743acdfa0d596a0d2d04b989e84b756a587a8235.png', //查看物流
hasGetBtn: '//yun.duiba.com.cn/spark/assets/54b4d0638d4da4a438a5fee5cbf826f4cb832883.png', //查看物流
useBtn: '//yun.duiba.com.cn/spark/assets/1f00b5a8dd5a24529eb3e11227b0d661e7bc5cf9.png', //去使用(除实物奖品外)
getAgainBtn: ' //yun.duiba.com.cn/aurora/assets/7730b53739e8b0e4a723088ee0dc2cf7d8a71874.png', //重新领取
invalidBtn: '//yun.duiba.com.cn/spark/assets/cfc0a1ecb5f5fc1465058861102430a708d75f34.png', //已失效
......
......@@ -58,7 +58,7 @@ Page({
res && commonToast(res)
}) || {}
if(success) {
this.setData({ goodsList: data || [] })
this.setData({ goodsList: data.list || [] })
}
},
});
......@@ -58,7 +58,7 @@ Page({
res && commonToast(res)
}) || {}
if(success) {
this.setData({ goodsList: data || [] })
this.setData({ goodsList: data.list || [] })
}
},
});
......@@ -5,7 +5,18 @@
/* 程序样式 */
@import './your.acss';
.testSC{
/* position:fixed;
top:0;
left:0;
bottom:0;
right:0;
margin:auto;
width: 300rpx;
height: 300rpx;
overflow-y:scroll;
z-index:10; */
}
/* 以下是编辑器导出样式,可从编辑器直接覆盖 */
.indexpage {
top: -2rpx;
......
<view class="indexpage ">
<view class="indexpage " disableScroll={{false}}>
<view class="indexcontent ">
<view class="indexbgcontent ">
<image class="indexbg " src={{resList['9a441973-a87c-4723-a797-1d18622ba791'].url}} />
......@@ -20,16 +20,16 @@
>
<image a:if={{item.status == 3}} class="unlockover " src={{resList['26336845-54c5-4a6f-a97e-f3f13d3fef27'].url}} />
<view a:if={{item.status == 2}} class="unlockready "
onTap="onTapUnlockPrizesItem" data-value={{item.needCardTypes}}
onTap="onTapUnlockPrizesItem" data-value={{item.needCards}}
>
<image class="unlockreadyicon " src={{resList['a2bdbf64-229d-46a1-89df-43b3537ab255'].url}} />
<image class="unlockreadynumbg " src={{resList['cbed0e02-fb26-4b19-a121-8b7d24310652'].url}} />
<view class="unlockreadynum fontVerticalCenter">{{item.needCardTypes}}</view>
<view class="unlockreadynum fontVerticalCenter">{{item.needCards}}</view>
</view>
<view a:if={{item.status == 1}} class="unlocknone ">
<image class="unlocknoneicon " src={{resList['ba1b637e-d3e6-444d-b065-f1793f1ed520'].url}} />
<image class="unlocknonenumbg " src={{resList['111beab6-495a-49ab-9802-757ef04da86a'].url}} />
<view class="unlocknonenum fontVerticalCenter">{{item.needCardTypes}}</view>
<view class="unlocknonenum fontVerticalCenter">{{item.needCards}}</view>
</view>
<image a:if={{item.status == 3||item.status == 2}} class="unlocknextget " src={{resList['416ab4f7-4021-4a1c-be41-a48b6cfa8a3d'].url}} />
<image a:if={{item.status == 1}} class="unlocknextnone " src={{resList['9bf3875b-78f1-4dd0-b04d-5f565b6e20b8'].url}} />
......@@ -81,6 +81,7 @@
</view>
<image class="indexrulebtn " onTap="showPanelEvent" data-value="{{'rulepanel'}}" src={{resList['abc5f112-fa04-42fa-bfec-f633567807c8'].url}} />
<image class="indexrecordbtn " onTap="onTapIndexRecordBtn" src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
<image class="loadImg" a:for={{assets}} src={{item}} />
</view>
<panel
showWinLists={{showWinLists}}
......
......@@ -16,7 +16,7 @@ let time1,time2
let disableEvent;
let updateIndexEvent;
//读取云存储资源
async function loadCloud(url, onLoad, onError) {
if (url.indexOf("cloud://") == 0) {
//@ts-ignore
......@@ -59,12 +59,21 @@ Page({
this.cardId = query.cardId;
this.cardType = query.cardType;
DataCenter.doDisibleAll=this.doDisibleAll;
//缓存全局资源
let assets=[]
for(let item in resList){
assets.push(resList[item].url)
}
this.setData({
resList: resList,
assets: assets,
showPanel:this.showPanel
});
// //初始化首页信息
this.getAuth();
//禁用点击事件
if(disableEvent){
events.removeListener("doDisibleAll",disableEvent)
}
......@@ -74,16 +83,15 @@ Page({
})
})
//全局更新首页
if(updateIndexEvent){
events.removeListener("updateIndex",updateIndexEvent)
}
events.on("updateIndex",updateIndexEvent=(state)=>{
this.updateData()
})
},
/**
/**
* 获取用户授权信息
*/
async getAuth() {
......@@ -102,6 +110,7 @@ Page({
* 登录接口
*/
async login() {
my.showLoading();
const { nickName, avatar ,activityId} = app;
let inviteId=this.inviteId||this.cardId;
let isFollow= await checkShopFavoredStatus(app.sellerId).catch(err => {
......@@ -117,16 +126,22 @@ Page({
const { openId } = data;
app.openId = openId;
this.getIndex();
}else{
my.hideLoading();
}
},
//canvas就绪
onCanvasReady() {
my.createCanvas({
id: 'canvas',
success: (canvas) => {
let dpi=my.getSystemInfoSync().pixelRatio/(750/my.getSystemInfoSync().windowWidth)
console.log("手机基础信息", my.getSystemInfoSync(),my.getSystemInfoSync().windowWidth * my.getSystemInfoSync().windowHeight,750 / my.getSystemInfoSync().windowWidth * my.getSystemInfoSync().windowHeight)
loadCloud("cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json", (data)=>{
lottie.setup(canvas);
let context = canvas.getContext('2d')
canvas.width=750*dpi;
canvas.height=1624*dpi;
let context = canvas.getContext('2d');
this.ani = lottie.loadAnimation({
loop: false, autoplay: false,
animationData: data,
......@@ -136,6 +151,7 @@ Page({
},
});
},
//执行助力
async indexDoHelp(){
//如果是首页弹出助力弹窗
if (this.inviteId) {
......@@ -171,17 +187,16 @@ Page({
}
events.emit("doDisibleAll",false)
}else{
//commonToast('首页助力类型,这是邀请人页面')
}
},
//页面如果邀请行为则弹出助力弹出
isHelp(){
if (this.inviteId) {
this.showPanel("helppanel")
}else{
//commonToast('首页助力类型,这是邀请人页面')
}
},
//页面如果包含赠卡行为则弹出赠卡弹窗
isGivingCard(){
if (this.cardId&&this.cardType) {
DataCenter.givingCardData={
......@@ -189,16 +204,15 @@ Page({
cardType:this.cardType
}
this.showPanel("givingcardpanel")
}else{
//commonToast('首页助力类型,这是邀请人页面')
}
},
//跳转我的奖品
onTapIndexRecordBtn(){
my.navigateTo({
url:"/pages/myprize/myprize"
});
},
//是否结束
//活动是否结束
isEnd(){
if(Date.now()>DataCenter.BaseInfo.endTime){
commonToast("活动已结束");
......@@ -207,7 +221,7 @@ Page({
return false;
}
},
//是否未开始
//活动是否未开始
isNotBegin(){
if(Date.now()<DataCenter.BaseInfo.startTime){
commonToast("活动未开始");
......@@ -216,8 +230,8 @@ Page({
return false;
}
},
//更新首页
async updateData(){
my.showLoading();
events.emit("doDisibleAll",true)
const { activityId } = getApp();
//获取活动基础信息
......@@ -228,7 +242,6 @@ Page({
let { rule }=BaseInfo.data;
DataCenter.rule=rule;
DataCenter.BaseInfo=BaseInfo.data;
//获取首页基础信息
let CollectCardInfo = await API.getCollectCardInfo({ activityId }).catch(res => {
commonToast(res && res.message);
......@@ -240,7 +253,6 @@ Page({
}) || {};
DataCenter.vipInfo=vipInfo.data;
events.emit("doDisibleAll",false)
my.hideLoading();
let {
joinedTimesPrizeList,
collectedCardTypePrizeList,
......@@ -253,7 +265,6 @@ Page({
} = CollectCardInfo.data;
DataCenter.CollectCardInfo = CollectCardInfo.data;
this.setData({
BaseInfo,
CollectCardInfo,
......@@ -266,7 +277,6 @@ Page({
giftCardStatus,
taskOpenStatus
})
this.setCarouselList()
},
/**
......@@ -283,36 +293,36 @@ Page({
commonToast(res && res.message);
}) || {};
DataCenter.ShareInfo=ShareInfo.data;
events.emit("doDisibleAll",false)
my.hideLoading();
if(DataCenter.ShareInfo&&DataCenter.ShareInfo.rewards>0){
this.showPanel("invitesuccesspanel")
}
},
//需要卡牌种类的数量
onTapUnlockPrizesItem(e){
let needCardTypes = e.target.dataset.value;
this.drawLotteryPrize(7,needCardTypes)
let needCards = e.target.dataset.value;
this.drawLotteryPrize(7,needCards)
},
//需要的抽卡次数
onTapIndexDrawItem(e){
let needTimes = e.target.dataset.value;
this.drawLotteryPrize(8,needTimes)
},
//点击开卡弹窗下的【立即开盒】
doBoxDraw(){
let {
joinedTimesPrizeList,
collectedCardTypePrizeList,
} = DataCenter.CollectCardInfo;
//先查找种类奖池
//先查找抽卡种类奖池
for(let item of collectedCardTypePrizeList.reverse()){
if(item.status==2){
this.drawLotteryPrize(7,item.needCardTypes)
this.drawLotteryPrize(7,item.needCards)
return false;
}
}
//再查找次数解锁奖池
//再查找抽卡次数解锁奖池
for(let item of joinedTimesPrizeList.reverse()){
if(item.status==2){
this.drawLotteryPrize(8,item.needTimes)
......@@ -320,6 +330,7 @@ Page({
}
}
},
//邀请唤起分享面板
inviteTask(){
BuriedClick(BuriedType.INVITE_BTN)
DataCenter.shareType="invite";
......@@ -330,6 +341,7 @@ Page({
}
my.showSharePanel();
},
//赠卡唤起分享面板
givingCard(){
//如果活动结束或者为开始就中断点击事件
if(this.isNotBegin()||this.isEnd()){
......@@ -344,6 +356,7 @@ Page({
}
my.showSharePanel();
},
//阶梯奖励抽奖
async drawLotteryPrize(prizeDataType,need){
//如果活动结束或者为开始就中断点击事件
if(this.isNotBegin()||this.isEnd()){
......@@ -363,7 +376,6 @@ Page({
}) || {};
DataCenter.drawLotteryPrizeData=drawLotteryPrizeData.data;
if(drawLotteryPrizeData&&drawLotteryPrizeData.data){
let {type}=drawLotteryPrizeData.data;
if(type==5){
......@@ -495,9 +507,14 @@ Page({
if(doJoin&&doJoin.success){
DataCenter.doJoinData=doJoin;
this.ani&&this.ani.goToAndStop(0);
this.ani&&this.ani.play();
this.showPanel("getcardpanel");
if(doJoin.data.type==5){
this.showPanel("noneprizepanel")
}else{
//打开开卡弹窗前先播放动画
this.ani&&this.ani.goToAndStop(0);
this.ani&&this.ani.play();
this.showPanel("getcardpanel");
}
}
events.emit("updateIndex");
events.emit("doDisibleAll",false)
......@@ -544,11 +561,12 @@ Page({
...rest
} = SHARE_CONFIG;
if (app.openId&&DataCenter.shareType=="invite") {
//如果是分享行为
path += '?inviteId=' + app.openId;
}else if(app.openId&&DataCenter.shareType=="givingCard") {
//如果是赠卡行为
path += '?cardId=' + app.openId+'&cardType='+DataCenter.cardType;
}
console.log('path', path)
return {
...rest,
title: DataCenter.shareData.shareTitle,
......
......@@ -6,6 +6,11 @@
position: relative !important;
display: inline-block !important;
}
.loadImg{
opacity:0;
width:0rpx;
height:0rpx;
}
#canvas{
position:fixed;
top:0;
......@@ -26,6 +31,12 @@
transition: 0.5s;
}
.indexpage .indexcontent .indextips .indextipstext {
width: 500rpx!important;
left: -76rpx !important;
text-align: center!important;
}
.indexpage .indexcontent .indexpropbody .indexpropavatar{
border-radius:50%
}
......
......@@ -30,6 +30,12 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const requestAms = () => {
return new Promise((resolve, reject) => {
console.log("请求参数详情",{
url: AMS_URL + _cloudName + '.' + handle,
method,
data: params,
dataType: 'json'
})
my.request({
url: AMS_URL + _cloudName + '.' + handle,
method,
......@@ -84,6 +90,13 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const requestCloud = () => {
return new Promise((resolve, reject) => {
console.log("请求参数详情",{
_cloudName,
params,
handle
})
cloud.function.invoke(_cloudName, params, handle).then(res => {
console.log('request Cloud callback=>', handle, res, JSON.stringify(res));
// console.log('requestCloud', handle, params, res);
......
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