Commit 159b852e1a3efd5462b1a18a18e36e6522680326

Authored by wangfan
1 parent 1e53089c

reserve index

... ... @@ -29,7 +29,7 @@
<view class="gps-icon">
<image src="/pages/image/gps-icon.png"></image>
</view>
<view>
<view style="line-height: 40rpx;">
{{seller.map_address}}
</view>
</view>
... ...
... ... @@ -88,6 +88,7 @@ Page({
detail.customers.forEach(item=>{
if(openid==item.openid){
detail.hasCanSuccess=true;
detail.remindtime=item.remind_date;
return true;
}
})
... ...
... ... @@ -13,7 +13,7 @@
<formids bindclick="reserveCancel">
<view class="opt-button">取消</view>
</formids>
<formids url="./remind?id={{detail.id}}&rdate={{detail.rdate}}">
<formids url="./remind?id={{detail.id}}&rdate={{detail.rdate}}&remindtime={{detail.remindtime}}">
<view class="opt-button">提醒</view>
</formids>
<userinfo-share
... ...
... ... @@ -16,10 +16,12 @@ Page({
{val:24*60,label:'1天前'},
{val:48*60,label:'2天前'},
],
remindtime:0,
},
remind_date:0,
id:null,
rdate:0,
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -27,6 +29,18 @@ Page({
console.log('onLoad',options);
this.id=options.id;
this.rdate=options.rdate;
if(new Date()/1000+1800>options.rdate){
this.setData({
reminds:[{val:0,label:'不提醒'}]
})
}else{
if(options.remindtime>0){
this.setData({
remindtime:(options.rdate-options.remindtime)/60
})
}
}
},
/**
... ... @@ -71,6 +85,10 @@ Page({
remind_date:this.remind_date,
is_agree:1
}).then(res=>{
App.Reserve.Detail({
openid: getApp().openid,
rid: this.id
},'clear')
wx.navigateBack()
})
}
... ...
<!--pages/customer/remind.wxml-->
<nav hasHome>设置提醒</nav>
<view class="page">
<view class="page" wx:if="{{reminds.length>1}}">
<view class="reminds">
<radio-group class="radio-group" bindchange="radioChange" >
<label class="radio" wx:for="{{reminds}}" wx:key="reminds.key">
<radio value="{{item.val}}" color="#262628"/>{{item.label}}
<radio value="{{item.val}}" checked="{{remindtime==item.val?true:false}}" color="#262628"/>{{item.label}}
</label>
</radio-group>
</view>
... ... @@ -12,3 +12,13 @@
<view class="share-but">确定</view>
</formids>
</view>
<view class="page" wx:else="">
<view class="reminds">
<radio-group class="radio-group" bindchange="radioChange" >
<label class="radio" wx:for="{{reminds}}" wx:key="reminds.key">
<radio value="{{item.val}}" color="#262628"/>{{item.label}}
</label>
</radio-group>
</view>
<view style="color:#666666; font-size: 26rpx; text-align: center;">已接近开始时间,无法设置提醒</view>
</view>
... ...