Commit 99f207106864dacbc26f38c9e01dcb90e95dea5b

Authored by vking
1 parent d9992816

一起瓜分百万红包:订包间,消费抵现金

... ... @@ -7,8 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
activity:null,
count:0,
},
/**
... ... @@ -29,7 +28,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.GetTaskInfos()
},
/**
... ... @@ -59,55 +57,4 @@ Page({
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title:this.data.activity.title,
path:'/pages/reserve/index',
imageUrl:this.data.activity.bgurl,
}
},
GetTaskInfos(){
App.Task.GetTaskInfos({
aid:this.options.aid,
}).then(res=>{
let activity=res.data.activity
activity.list=res.data.task
let count=0
activity.list.forEach(t=>{
if(t.status==2){
count+=(t.price*1)
}
})
this.setData({
count:count.toFixed(2),
activity:activity
})
})
},
taskNextDo(e){
let index=util.attr(e,'index')
let task=this.data.activity.list[index]
let tid=task.id
,path=util.http_build_query({aid:this.data.activity.id,tid:tid},task.task_url||'pack-activity/pages/demo')
if(task.status==0){
App.Task.SetTaskInfo({//领取任务
aid:this.data.activity.id,
tid:tid,
}).then(()=>{
this.GetTaskInfos()
})
}else if(task.status==1){
wx.navigateTo({
url: path
})
}else{
wx.navigateTo({
url: 'pack-activity/pages/money'
})
}
},
})
\ No newline at end of file
... ...
<!--pack-activity/pages/index.wxml-->
<nav hasHome>周到安排</nav>
<view class="pages" style="background-color: {{activity.element}}">
<view class="content">
<view class="share-but">
<button class="button-none" open-type="share">D E M O</button>
<view class="pages">
<image src="http://qn.colorcun.com/activity/images/yuding.png" style="width: 100%;" mode="widthFix"></image>
<navigator url="/pages/reserve/index" open-type="switchTab" hover-class="other-navigator-hover">
<view class="content flex-cc">
<view class="share-but">
<button class="button-none">去订包间</button>
</view>
</view>
</view>
</navigator>
</view>
... ...
... ... @@ -3,24 +3,22 @@
}
.content{
padding-top: 840rpx;
height: 1020rpx;
width: calc(100% - 40rpx);
margin: 0 20rpx 0;
position: fixed;
bottom: 80rpx;
width: 100%;
}
.share-but{
width:400rpx;
height:80rpx;
background:linear-gradient(180deg,rgba(252,190,38,1) 0%,rgba(255,233,128,1) 100%);
box-shadow:0rpx 4rpx 8rpx 0rpx rgba(182,43,68,1);
background:linear-gradient(360deg,rgba(220,44,75,1) 0%,rgba(244,143,161,1) 100%);
border-radius:40rpx;
font-size:32rpx;
font-weight:600;
color:rgba(230,34,57,1);
line-height:80rpx;
color:rgba(255,255,255,1);
line-height:44rpx;
letter-spacing:1rpx;
text-align: center;
margin-left: calc(50% - 200rpx);
width: calc(100% - 76rpx);
}
.share-but .button-none{
height: 80rpx;
... ...
... ... @@ -625,6 +625,13 @@
"pathName": "pack-activity/pages/kefu",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pack-activity/pages/yuding",
"pathName": "pack-activity/pages/yuding",
"query": "id=9994&fromid=test&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
}
]
}
... ...