Commit f750f45976230f846a7913c1c7d9b55d33a5f4e3

Authored by wangfan
1 parent 2025f457

v2 book

... ... @@ -14,7 +14,8 @@
"pages/me/index",
"pages/reservr/index",
"pages/me/setting",
"pages/me/list"
"pages/me/list",
"pages/book/b_addnew"
],
"window": {
"navigationStyle": "custom",
... ...
// components/book/tabBar/tabBar.js
import util from '../../../utils/util'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
pi:0,
},
attached(){
let pages=getCurrentPages();
let p=pages[pages.length-1];
let pi=['/pages/book/b_addnew','/pages/book/b_index','/pages/book/b_setting'];
for(let x in pi){
console.log('tabBar',pi[x],p);
if(pi[x].indexOf(p.route)>-1){
this.setData({
pi:x
})
break;
}
}
},
/**
* 组件的方法列表
*/
methods: {
redirectTo(e){
let url=util.attr(e,'url');
let pages=getCurrentPages();
let p=pages[pages.length-1];
if(url.indexOf(p.route)<0){
wx.redirectTo({
url:url,
})
}
}
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/book/tabBar/tabBar.wxml-->
<view class="tabBar flex-cc">
<view class="item flex-vc {{pi==0?'checked':''}}" bindtap="redirectTo" data-url="/pages/book/b_addnew">
<view class="icon reserve"></view>
<view class="text">
订座
</view>
</view>
<view class="item flex-vc {{pi==1?'checked':''}}" bindtap="redirectTo" data-url="/pages/book/b_index">
<view class="icon book"></view>
<view class="text">
预定本
</view>
</view>
<view class="item flex-vc {{pi==2?'checked':''}}" bindtap="redirectTo" data-url="/pages/book/b_setting">
<view class="icon setting"></view>
<view class="text">
设置
</view>
</view>
</view>
... ...
/* components/book/tabBar/tabBar.wxss */
@import "../../../app.wxss";
.tabBar{
height: 118rpx;
background-color: #FEFEFE;
width:100%;
position: fixed;
bottom: 0;
border-top: 2rpx solid #ccc;
font-size: 24rpx;
color:#999999;
z-index: 9;
}
.tabBar .checked{
color: #353535;
}
.tabBar .item{
width: 33%;
}
.tabBar .icon{
width: 40rpx;
height: 40rpx;
margin-bottom: 10rpx;
background-size: 100%;
}
.tabBar .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-reserve.png");
}
.tabBar .checked .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-reserve-checked.png");
}
.tabBar .book{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-book.png");
}
.tabBar .book .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-book-checked.png");
}
.tabBar .setting{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-setting.png");
}
.tabBar .setting .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs-setting-checked.png");
}
... ...
// pages/book/b_addnew.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"black",
"usingComponents": {
"nothingBook":"/components/book/nothing/nothing",
"bookList":"/components/book/list/list",
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar"
}
}
\ No newline at end of file
... ...
<!--pages/book/b_addnew.wxml-->
<nav>录入订座信息</nav>
<view class="page">
<form bindsubmit="formSubmit" bindreset="formReset">
<view class="base-info">
<view class="section flex-ll">
<view class="label Medium">日期</view>
<view class="date">
7月13日 周一
</view>
</view>
<view class="section flex-ll">
<view class="label Medium">时段</view>
<view class="tab">
<item class="item">
早市
</item>
<item class="item">
午市
</item>
<item class="item">
晚市
</item>
</view>
</view>
<view class="section flex-ll">
<view class="label Medium">人数</view>
<view class="tab">
<item class="item">
4人以下
</item>
<item class="item">
5~9人
</item>
<item class="item">
10人以上
</item>
</view>
</view>
<view class="section flex-ll">
<view class="label Medium">类型</view>
<view class="tab">
<item class="item">
包间
</item>
<item class="item">
散座
</item>
</view>
</view>
</view>
<view class="page-full tables">
</view>
<view class="book-info">
<view class="book-info-single flex-lr" style="align-items:flex-start;">
<input placeholder="请输入预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="5" style="width:450rpx;" value="{{name}}" bindinput="changename" bindblur="ifAll"/>
<view class="book-info-grand flex-rr font28r gray-deep-font">
<block wx:for="{{grand}}">
<view class="book-grand flex-cc {{index==0 ? 'book-grand-border' : ''}} {{item.isselect==true ? 'book-grand-active white-font' : ''}}" bindtap="selectgrand" data-sex="{{item.sex}}">{{item.grand_title}}</view>
</block>
</view>
</view>
<view class="book-info-single flex-lr" style="align-items:flex-start;">
<input placeholder="请输入预订人手机号码(必填)" placeholder-class="gray-font font34r" class="black-font font34r" type="number" maxlength="11" bindblur="condition" bindinput="changephone" value="{{phone}}" style="color:{{reminder ? '#E14553' : '#353535'}};width:{{reminder ? 400 : 680}}rpx;"/>
<block wx:if="{{reminder}}">
<view class="flex-rr" style="height:100rpx;">
<view style="color:#E14553;" class="font28r">{{reminder}}</view>
<image src="../image/name-have.png" class="phone-reminder"></image>
</view>
</block>
</view>
<view class="book-info-single">
<input placeholder="请输入顾客要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{remark}}" bindinput="changeremark"/>
</view>
</view>
<view class="page-full submit">
<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
</view>
</form>
</view>
<tabBar></tabBar>
... ...
/* pages/book/b_addnew.wxss */
.page{
width: 90%;
margin: 0 5%;
}
.base-info{
}
.section{
height: 92rpx;
line-height: 92rpx;
}
.section .label{
width: 60rpx;
font-size: 30rpx;
margin-right: 38rpx;
}
.section .date{
color: #199095;
}
.section .tab{
font-size: 34rpx;
color: #199095;
}
.section .tab .item{
height: 50rpx;
line-height: 50rpx;
width: 150rpx !important;
min-width: 150rpx !important;
border-radius: 10rpx;
border: 2rpx solid #199095;
margin-right: 26rpx;
text-align: center;
display: inline-block;
}
/**
可定桌位
*/
.page-full{
width: 112%;
margin-left: -6%;
background-color: #F5F5F5;
}
.tables{
height: 314rpx;
margin-top: 10rpx;
}
.book-info{
width:100%;
padding-top:20rpx;
margin:0 auto;
}
.book-info-single{
width:100%;
height:120rpx;
padding-top:80rpx;
border-bottom:1px solid #efeef3;
}
.book-info-single>input{
width:100%;
height:100rpx;
}
.book-info-grand{
height:50rpx;
border:1px solid #199095;
margin-top:20rpx;
}
.book-grand{
width:90rpx;
height:100%;
box-sizing:border-box;
}
.book-grand-active{
background:rgba(25,153,149,.8);
}
.book-grand-border{
border-right:1px solid #199095;
}
.phone-reminder{
width:32rpx;
height:32rpx;
margin-left:20rpx;
}
/**
提交按钮
*/
.submit{
padding-top: 18rpx;
padding-bottom: 174rpx;
}
.confirm-button{
width:680rpx;
height:85rpx;
background:#199095;
margin:42rpx auto 0;
border-radius:10rpx;
opacity:.6;
}
.confirm-button-active{
opacity:1;
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
"usingComponents": {
"nothingBook":"/components/book/nothing/nothing",
"bookList":"/components/book/list/list",
"actButton":"/components/book/action/action",
"nav":"/components/nav/nav"
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar"
}
}
\ No newline at end of file
... ...
... ... @@ -35,5 +35,4 @@
</view>
</block>
</block>
<actButton></actButton>
\ No newline at end of file
<tabBar></tabBar>
\ No newline at end of file
... ...
... ... @@ -30,7 +30,7 @@
"list": []
},
"miniprogram": {
"current": 13,
"current": 14,
"list": [
{
"id": 0,
... ... @@ -143,6 +143,13 @@
"shareName": "8DEbIRpK4pa9mH_QY2vU4ZUKYPuI97WoQ4BQoFej-Q8@cr4dev",
"shareKey": "PZhnqMlY2TnRuHhATyGeSamVmBQUDXXr_WtjRSddeeFK17UAiOP-HNOdhxiEN7PFub5S1DjAeUl0IXOdW-VDqg~~"
}
},
{
"id": -1,
"name": "预定本-添加预定",
"pathName": "pages/book/b_addnew",
"query": "seller_id=1&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
"scene": "1001"
}
]
}
... ...