Commit e356025ba15e52a25b76ef7d9ace33cddf5d2b93

Authored by vking
1 parent af3c56b8

new 2.0

... ... @@ -91,7 +91,7 @@ page {
}
.radius {
border-radius: 6rpx;
border-radius: 20rpx;
}
/* ==================
... ...
// components/2.0/reserve/card.js
import util from '../../../utils/util';
import RS from '../../../utils/reserveStatus'
Component({
/**
* 组件的属性列表
*/
properties: {
detail:Object,
},
/**
* 组件的初始数据
*/
data: {
},
attached(){
this.init()
},
/**
* 组件的方法列表
*/
methods: {
init(){
let detail=RS.reserve(this.data.detail)
console.log('detail.init',detail)
let tableSubInfo = ''
let tableFirst = '';
if (detail.tableFirst) {
tableSubInfo = (detail.tableFirst || '') + ' ' + (detail.tableSubInfo || '');
tableFirst = detail.tableFirst
} else if(detail.tables && detail.tables.length>0) {
tableFirst = detail.tables[0].name
tableSubInfo = detail.tables[0].name;
if (detail.tables.length > 1) {
tableSubInfo += ' 等' + (detail.tables.length) + '个'
+ (detail.tables[0].tid == 2 ? '包间' : '');
tableFirst += '等';
}
}
detail.tableFirst=tableFirst
detail.tableSubInfo=tableSubInfo
this.setData({
detail:detail,
})
}
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/2.0/reserve/card.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="view margin-lr-lg margin-top-sm solid radius padding padding-bottom-lg" style="box-shadow: 0px 0px 20rpx 0px #EEF0F2;">
<view class="view flex padding-bottom-sm solid-bottom">
<view class="view round margin-right-sm"
style="width: 44rpx;height: 44rpx; background-image: url('{{detail.seller.seller_image}}');">
</view>
<view class="view text-cut flex-treble">
<view class="view text-lg text-cut" style="margin-bottom: 16rpx;">{{detail.seller.sellername}}</view>
<view class="view text-df bg-white text-cut">{{detail.seller.map_address}}</view>
</view>
<view class="view margin-left-sm text-blue text-lg" style="min-width: 100rpx;">
{{detail.getStatusStr}}
</view>
</view>
<view class="view margin-top-sm">
<view class="view flex margin-bottom-sm align-center">
<view class="view flex-sub bg-white">预订时间</view>
<view class="view flex-treble text-bold" style="font-size: 36rpx;">
<view class="value" wx:if="{{detail.hasOnlineReserve || detail.hasUpdateDate}}">
<text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{detail.soltName}}</text>
</view>
<view class="value" wx:else="">{{detail.rdateStr}}</view>
</view>
</view>
<view class="view flex align-center">
<view class="view flex-sub bg-white" style="min-width: 140rpx;">包间类型</view>
<view class="view flex-treble text-bold text-cut" style="font-size: 36rpx;">
{{detail.tableFirst||util.getRoomName(detail.room_demand)}}
</view>
</view>
</view>
</view>
... ...
/* components/2.0/reserve/card.wxss */
@import "../../../colorui/main.wxss";
\ No newline at end of file
... ...
... ... @@ -21,10 +21,10 @@
<view class="context flex-lr">
<view class="left info Medium">
<view class="label">时间</view>
<view class="value" wx:if="{{hasOnlineReserve || detail.hasUpdateDate}}">
<view class="value" wx:if="{{detail.hasUpdateDate}}">
<text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{util.reserveTimeSpace(detail.ddate_solt||detail.section)}}</text>
</view>
<view class="value" wx:else="">{{rdateStr}}</view>
<view class="value" wx:else="">{{detail.rdateStr}}</view>
</view>
<view class="line"></view>
<view class="right info Medium" wx:if="{{(detail.type==1 && (detail.status==4 || detail.status==0)) || hasOnlineReserve || detail.status==0 || detail.status==6}}">
... ...
... ... @@ -12,6 +12,12 @@
</view>
<view class="pages">
<view class="block-rev money flex-lr">
<navigator url="/pages/we/follow" class="money-item">
<view class="flex-vc">
<view class="money-value">{{user.collection||0}}</view>
<view class="money-title">关注</view>
</view>
</navigator>
<navigator url="/pack-activity/pages/money" class="money-item">
<view class="flex-vc">
<view class="money-value">¥{{user.balance.price||0}}</view>
... ...
... ... @@ -31,7 +31,7 @@ Page({
tabType:this.tabType
})
}
this.selectComponent('#getpos').getPos();
this.getListData();
},
/**
... ... @@ -46,6 +46,7 @@ Page({
*/
onShow: function () {
PubSub.emit('custom-tab-bar')
},
/**
... ... @@ -79,9 +80,9 @@ Page({
[`list[`+tabType+`]`]: this.data.list[tabType].concat(data),
hasMore:this.hasMore
})
if(res.data.length==0){
this.GetRecommendSellerLists()
}
// if(res.data.length==0){
// this.GetRecommendSellerLists()
// }
})
},
formatList(list) {
... ... @@ -89,9 +90,9 @@ Page({
let dlist = [];
let openid = getApp().openid;
list.forEach(row => {
row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II');
//row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II');
row.navigator = row.openid == openid ? 'detail_owner' : 'detail_customer';
row=RS.reserve(row)
//row=RS.reserve(row)
dlist.push(row);
})
return dlist;
... ...
... ... @@ -9,6 +9,7 @@
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"getpos":"/components/userinfo/getpos",
"as-phone":"/components/actionSheet/phone",
"card":"/components/seller-card/seller-card"
"card-bak":"/components/seller-card/seller-card",
"card":"/components/2.0/reserve/card"
}
}
\ No newline at end of file
... ...
<!--pages/customer/list.wxml-->
<nav hasHome>我的订单</nav>
<view class="tabs flex-lr">
<view class="item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>
<view class="item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>
<view class="item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>
<view class="item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view>
<view class="view tabs flex padding-lg padding-top-xs">
<view class="view item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>
<view class="view item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>
<view class="view item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>
<view class="view item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view>
</view>
<view class="page">
<view class="view pages">
<block wx:if="{{list[tabType].length==0}}">
<view class="flex-vc empry">
<image src="http://nosqn.colorcun.com/reserve/images/order-empty.png"></image>
<view class="Medium">暂无订单</view>
<image src="http://nosqn.colorcun.com/2.0/home%20%2817%29.png"></image>
<view class="Medium">暂无订单哦</view>
</view>
</block>
<block wx:else="">
<block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
<view class="card">
<card
hasShowStatus bindevent="gotoDetail"
seller="{{detail.seller}}" detail="{{detail}}"></card>
</view>
<navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<card
hasShowStatus bindevent="gotoDetail"
seller="{{detail.seller}}" detail="{{detail}}"></card>
</navigator>
</block>
<view class="view" style="height: 192rpx;"></view>
</block>
</view>
<block wx:if="{{list[tabType].length==0 && rsl.length>0}}">
<view class="rsl-block">
<view class="line-push">为你推荐</view>
<view class="transverse-list">
<swiper
indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
interval="2000" duration="500"
previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">
<block wx:for="{{rsl}}" wx:key="rsl.key">
<swiper-item bindtap="gotoSellerDetail" id="{{item.id}}">
<view class="seller" id="seller-{{item.id}}">
<sb-tr seller="{{item}}"
hasInSwiper bindevent="sbtrEvent"
hasActivityTags="{{false}}"
hasActivityShort="{{true}}"
hasBrand="true" hasActivityTese="true"
hasSlogan="{{false}}"></sb-tr>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</block>
<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos>
<as-phone id="as"></as-phone>
\ No newline at end of file
</view>
\ No newline at end of file
... ...
/* pages/customer/list.wxss */
.page{
width: 90%;
margin: 90rpx 5% 0;
color:#353535;
padding-bottom: 60rpx;
@import "../../colorui/main.wxss";
.pages{
margin-top: 100rpx;
}
.card{
/*border-radius: 0 10rpx;*/
box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);
margin-bottom: 44rpx;
}
.card .top{
min-height: 140rpx;
padding: 0 48rpx;
}
.card .title{
line-height: 140rpx;
font-size: 30rpx;
font-weight: bold;
color:#AD7644;
}
.card .bottom{
background-color: #EAECEE;
box-shadow: 2rpx 2rpx 14rpx 0rpx rgba(231,228,228,.5);
padding: 54rpx 50rpx 50rpx;
}
.card .bottom .rdateStr{
font-size: 30rpx;
}
.card .bottom .name{
margin-top: 28rpx;
margin-bottom: 8rpx;
font-size: 30rpx;
}
.card .bottom .addr{
font-size: 26rpx;
color:#999999;
}
.share-but-view button{
border-radius: 0;
}
.share-but,.share-but-write{
color:#FEFEFE;
background: #262628;
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
font-size: 30rpx;
text-align: center;
}
.share-but-write{
border: 2rpx solid #353535;
background-color: #fefefe;
color:#262628;
}
.tabs{
font-size: 30rpx;
color:##353535;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 44rpx;
position: fixed;
width: 90%;
padding: 0 5%;
background-color: #fff;
z-index: 9;
width: 100%;
}
.tabs .item{
position: relative;
width: 25%;
border: 2rpx solid #E0E0E0;
height: 56rpx;
line-height: 56rpx;
text-align: center;
border-right-width: 0;
}
.tabs .item:last-child{
border-right-width: 2rpx;
}
.tabs .active{
color:#FFFFFF;
background-color: #C8B16D;
border-color: #C8B16D;
font-weight: 600;
color: #42A5FF;
}
.tabs .active:after{
display: block;
position: absolute;
content: "";
bottom: -10rpx;
left:calc(50% - 30rpx);
width: 60rpx;
height: 6rpx;
background: linear-gradient(90deg, #3BBFF5 0%, #57A0FF 100%);
border-radius: 3rpx;
}
.empry{
font-size: 28rpx;
... ...
... ... @@ -73,17 +73,10 @@
}
},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
... ... @@ -515,10 +508,9 @@
"scene": null
},
{
"id": -1,
"name": "pages/me/list 我的订单",
"pathName": "pages/me/list",
"query": "id=1017&act=quanzi",
"query": "type=2",
"scene": null
},
{
... ...