作者 李振

commit

... ... @@ -9,6 +9,8 @@ var api = {
LocationWindow:baseUrl+"api/Index/LocationWindow",//弹窗
Ding:baseUrl+"api/Index/Ding",//预约
IsLogin:baseUrl+'api/User/IsLogin',//登录
Kill:baseUrl+"api/Index/Kill",//取消预约
IsKill:baseUrl+"api/Index/IsKill"
}
module.exports = {
... ...
... ... @@ -95,6 +95,64 @@ Page({
otherTime: type
})
},
//取消预约
bindreservation:function(e){
var that = this;
var id = e.currentTarget.dataset.id;
wx.getStorage({
key: 'token',
success:function(res){
wx.request({
url: api.IsKill,
method:"POST",
header:{
"token":res.data
},
data:{
id:id
},
success:function(res){
if(res.data.code == 1){
wx.showModal({
title:"提示",
content:'是否取消预约',
success:function(res){
if (res.confirm) {
console.log('用户点击确定')
wx.request({
url: api.Kill,
method:"POST",
header:{
"token":wx.getStorageSync('token')
},
data:{
id:id
},
success:function(res){
console.log(res);
if(res.data.code == 1){
that.tableListOnload();
}else{
wx.showToast({
title: res.data.msg,
icon:"none"
})
}
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
}
})
}
})
},
//飞机预约
bindplane: function (e) {
var that = this;
... ...
<import src="../../template/baseNavigationBar.wxml" />
<template is="navigationBar" data="{{...item}}"></template>
<view class="home" style='margin-top:{{item.statusBarHeight+46}}px' hidden="{{home}}">
<view class="header">
<view class="header" wx:if="{{userInfo.vip == 3}}">
<view class="feiji">
<image src="../images/feiji.png" mode="aspectFill"></image>
</view>
... ... @@ -10,7 +10,38 @@
<view class="headerImg">
<image style="width:100%;height:100%;border-radius:50%;" src="{{userInfo.avatar}}"></image>
</view>
<view class="userName">{{userInfo.nickname}} <image src="../images/VIP.png"></image>
<view class="userName">{{userInfo.nickname}}
<image src="../images/VIP.png"></image>
</view>
</view>
</view>
</view>
<view class="header" wx:if="{{userInfo.vip == 2}}">
<view class="feiji">
<image src="../images/feiji-2.png" mode="aspectFill"></image>
</view>
<view class="userInfo">
<view class="user">
<view class="headerImg">
<image style="width:100%;height:100%;border-radius:50%;" src="{{userInfo.avatar}}"></image>
</view>
<view class="userName">{{userInfo.nickname}}
<image src="../images/VIP.png"></image>
</view>
</view>
</view>
</view>
<view class="header" wx:if="{{userInfo.vip == 1}}">
<view class="feiji">
<image src="../images/feiji-2@2x.png" mode="aspectFill"></image>
</view>
<view class="userInfo">
<view class="user">
<view class="headerImg">
<image style="width:100%;height:100%;border-radius:50%;" src="{{userInfo.avatar}}"></image>
</view>
<view class="userName">{{userInfo.nickname}}
<image src="../images/VIP.png"></image>
</view>
</view>
</view>
... ... @@ -18,12 +49,23 @@
<!-- 时间 -->
<view class="timeList">
<view class="timeList" wx:if="{{userInfo.vip == 3}}">
<view class="timeItem {{item.date == firstDate?'activeDate':''}}" data-date="{{item.date}}" bindtap="binddate" wx:for="{{date}}" wx:key='index'>
<view>{{item.date}}</view>
<view>{{item.week}}</view>
</view>
</view>
<view class="timeList" wx:if="{{userInfo.vip == 1}}">
<view class="timeItem {{item.date == firstDate?'activeDate1':''}}" data-date="{{item.date}}" bindtap="binddate" wx:for="{{date}}" wx:key='index'>
<view>{{item.date}}</view>
<view>{{item.week}}</view>
</view>
</view>
<view class="timeList" wx:if="{{userInfo.vip == 2}}">
<view class="timeItem {{item.date == firstDate?'activeDate2':''}}" data-date="{{item.date}}" bindtap="binddate" wx:for="{{date}}" wx:key='index'>
<view>{{item.date}}</view>
<view>{{item.week}}</view>
</view>
</view>
<view class="planeList">
... ... @@ -37,7 +79,15 @@
<view class="list">{{item.title}}</view>
<view class="planeStatus" wx:if="{{item.status == 1}}" data-time="{{item.title}}" bindtap="bindplane" data-id="{{item.id}}" data-up="1" data-plane="{{item.plane_type}}">暂无预约</view>
<view class="planeStatus" wx:if="{{item.status == 3}}">
<view class="status">
<view class="status" wx:if="{{item.vip == 3}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status2" wx:if="{{item.vip == 2}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status1" wx:if="{{item.vip == 1}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
... ... @@ -45,9 +95,17 @@
<view class="planeStatus" wx:if="{{item.status == 2}}">不可预约</view>
<view class="planeStatus" wx:if="{{item.fstatus == 1}}" data-time="{{item.title}}" bindtap="bindplane" data-id="{{item.fid}}" data-up="1" data-plane="{{item.fplane_type}}">暂无预约</view>
<view class="planeStatus" wx:if="{{item.fstatus == 3}}">
<view class="status">
<view class="status" wx:if="{{item.fvip == 3}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status2" wx:if="{{item.fvip == 2}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status1" wx:if="{{item.fvip == 1}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">号预约</view>
<view class="">号预约</view>
</view>
</view>
<view class="planeStatus" wx:if="{{item.fstatus == 2}}">不可预约</view>
... ... @@ -67,7 +125,15 @@
<view class="list">{{item.title}}</view>
<view class="planeStatus" wx:if="{{item.status == 1}}" data-time="{{item.title}}" bindtap="bindplane" data-id="{{item.id}}" data-up="1" data-plane="{{item.plane_type}}">暂无预约</view>
<view class="planeStatus" wx:if="{{item.status == 3}}">
<view class="status">
<view class="status" wx:if="{{item.vip == 3}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status2" wx:if="{{item.vip == 2}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status1" wx:if="{{item.vip == 1}}" data-id="{{item.id}}" bindtap="bindreservation">
<view class="nickname">{{item.nickname}}</view>
<view class="">一号预约</view>
</view>
... ... @@ -75,9 +141,17 @@
<view class="planeStatus" wx:if="{{item.status == 2}}">不可预约</view>
<view class="planeStatus" wx:if="{{item.fstatus == 1}}" data-time="{{item.title}}" bindtap="bindplane" data-id="{{item.fid}}" data-up="1" data-plane="{{item.fplane_type}}">暂无预约</view>
<view class="planeStatus" wx:if="{{item.fstatus == 3}}">
<view class="status">
<view class="status" wx:if="{{item.fvip == 3}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">二号预约</view>
<view class="">一号预约</view>
</view>
<view class="status2" wx:if="{{item.fvip == 2}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">一号预约</view>
</view>
<view class="status1" wx:if="{{item.fvip == 1}}" data-id="{{item.fid}}" bindtap="bindreservation">
<view class="nickname">{{item.fnickname}}</view>
<view class="">一号预约</view>
</view>
</view>
<view class="planeStatus" wx:if="{{item.fstatus == 2}}">不可预约</view>
... ... @@ -104,13 +178,13 @@
</view>
<view class="mark" hidden="{{hidden}}"></view>
<!-- 审核未通过 -->
<view class="erro" hidden="{{Failed}}" style='margin-top:{{item.statusBarHeight+46}}px'>
<view class="erro" hidden="{{Failed}}" style='margin-top:{{item.statusBarHeight+46}}px'>
<image src="../images/empty-image-error@2x.png"></image>
<view class="errobiref">审核未通过,请再次提交审核</view>
</view>
<!-- 审核中 -->
<view class="erro" hidden="{{review}}" style='margin-top:{{item.statusBarHeight+46}}px'>
<view class="erro" hidden="{{review}}" style='margin-top:{{item.statusBarHeight+46}}px'>
<image src="../images/empty-image.png"></image>
<view class="errobiref">正在审核中,请耐心等候</view>
</view>
\ No newline at end of file
... ...
... ... @@ -151,7 +151,7 @@ page {
flex-flow: column;
padding: 10rpx 0;
width: 144rpx;
height: 60rpx;
/* height: 60rpx; */
font-size: 24rpx;
color: #ffffff;
background: linear-gradient(132deg, #75c9ff 13%, #3297ff 90%);
... ... @@ -159,6 +159,34 @@ page {
box-shadow: 0px 10rpx 20rpx 0px rgba(42, 164, 255, 0.4);
margin: auto;
}
.status2 {
text-align: center;
display: flex;
flex-flow: column;
padding: 10rpx 0;
width: 144rpx;
/* height: 60rpx; */
font-size: 24rpx;
color: #ffffff;
background: linear-gradient(132deg,#ffc75e 6%, #ffb51b);
border-radius: 22rpx;
box-shadow: 0px 10rpx 20rpx 0px rgba(248,173,20,0.53);
margin: auto;
}
.status1 {
text-align: center;
display: flex;
flex-flow: column;
padding: 10rpx 0;
width: 144rpx;
/* height: 60rpx; */
font-size: 24rpx;
color: #ffffff;
background: linear-gradient(132deg,#ff9c6c 6%, #ff5e3a);
border-radius: 22rpx;
box-shadow: 0px 10rpx 20rpx 0px rgba(255,124,95,0.4);
margin: auto;
}
.erro {
text-align: center;
... ... @@ -262,7 +290,17 @@ page {
background-color: #4190FF;
background: linear-gradient(132deg, #77c6ff 6%, #369fff);
}
.activeDate1 {
color: #ffffff;
background: linear-gradient(132deg,#ff9c6c 6%, #ff5e3a);
}
.activeDate2 {
color: #ffffff;
background: linear-gradient(132deg,#ffc75e 6%, #ffb51b);
}
.iconfont {
margin-right: 8rpx;
}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.12.2",
"appid": "wx243943911c16fbfc",
"appid": "wxa7a9912415b69ce9",
"projectname": "PlaneMiniClient",
"debugOptions": {
"hidedInDevtools": []
... ...