Commit 96fca973baf5da858475bbabf88a2f1024cb6116

Authored by wangfan
1 parent 846950c8

customer

... ... @@ -11,4 +11,5 @@
line-height: inherit;
-webkit-tap-highlight-color: transparent;
color: inherit;
width: 100%;
}
\ No newline at end of file
... ...
... ... @@ -36,14 +36,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
App.Reserve.GetListFromScheAndRes({
flag:this.data.tabFlag,
openid:getApp().openid,
}).then(res => {
let data=this.formatList(res.data);
let list=this.data.list;
list[this.data.tabFlag]=data;
})
this.getListData();
},
/**
... ... @@ -59,11 +52,25 @@ Page({
onUnload: function () {
},
getListData(){
App.Reserve.GetListFromScheAndRes({
flag:this.data.tabFlag,
openid:getApp().openid,
}).then(res => {
let data=this.formatList(res.data);
let list=this.data.list;
list[this.data.tabFlag]=data;
this.setData({
list:list
})
})
},
_formatList(list){
if(!list) return [];
if(list.length>0){
list.forEach(row=>{
row.rdateStr=util.unixtoTime(row.rdate,'MM月DD日 WW HH:II');
row.navigator=row.inviting==getApp().openid?'detail_owner':'detail_customer'
})
}
return list;
... ... @@ -77,5 +84,23 @@ Page({
this.setData({
tabFlag:util.attr(e,'index')
})
this.getListData();
},
userinfo(e){
let id=e.target.dataset.id;
let type=e.target.dataset.type;
if(type=='padding'){
App.Reserve.SetRelaSuccess({
rid:id,
openid:getApp().openid
}).then(res=>{
this.getListData();
})
}else{
wx.navigateTo({
url:'invite?id='+id,
});
}
}
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"定个座儿"
"navigationBarTitleText":"定个座儿",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
... ... @@ -8,28 +8,43 @@
bindtap="switchTab" data-index="1">我的订座</view>
</view>
<block wx:for="{{list}}" wx:key="list.key" wx:for-item="parts" wx:for-index="tabindex">
<text>{{parts.length}}</text>
<block wx:if="{{parts.success.length>0 || parts.padding.length>0}}">
<block wx:for="{{parts}}" wx:key="partskey" wx:for-item="part">
<view class="list-content" wx:if="{{tabindex==tabFlag}}">
<view>{{index=='success'?'即将开始':'待处理'}}<text>({{part.length}}条)</text></view>
<block wx:for="{{parts}}" wx:key="partskey" wx:for-item="part" wx:for-index="partIndex">
<view class="list-content" wx:if="{{tabindex==tabFlag && part.length>0}}">
<view class="cate-class">{{partIndex=='success'?'即将开始':'待处理'}}<text>({{part.length}}条)</text></view>
<block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail">
<view class="card">
<view class="top" wx:if="{{detail.topic}}">
<view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view>
</view>
<view class="bottom">
<view class="rdateStr Medium">{{detail.rdateStr}}</view>
<view class="seller flex-lr" bindtap="lookLocation">
<view class="seller-info">
<view class="name Medium">{{detail.seller.sellername}}</view>
<view class="addr">{{detail.seller.map_address}}</view>
<navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<view class="card" style="width: 100%;">
<view class="bottom">
<view class="rdateStr Medium">{{detail.rdateStr}}</view>
<view class="seller flex-lr" bindtap="lookLocation">
<view class="seller-info">
<view class="name Medium">{{detail.seller.sellername}}</view>
<view class="addr">{{detail.seller.map_address}}</view>
</view>
<image src="http://qn.colorcun.com/custom/lite-yd/image/success.png"
style="width:160rpx;height: 94rpx;"
wx:if="{{tabFlag==1}}"></image>
</view>
</view>
<view class="top">
<view class="customers flex-ll" wx:if="{{detail.customers.length>0}}">
<block wx:for="{{detail.customers}}">
<image src="{{item.headimgurl}}" wx:if="{{index<5}}"></image>
</block>
<view>等{{detail.customers.length}}人已参加</view>
</view>
<view class="addr-icon">
<image src="../image/gps-icon.png"></image>
<view class="flex-lr">
<view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view>
<userinfo binduserinfo="userinfo"
class="share-but-view" data-id="{{detail.id}}" data-type="{{partIndex}}">
<view class="share-but{{partIndex=='success'?'':'-write'}} Regular">{{partIndex=='success'?'邀请':'接受'}}</view>
</userinfo>
</view>
</view>
</view>
</view>
</navigator>
</block>
</view>
</block>
... ...
... ... @@ -6,29 +6,54 @@
}
.card{
border-radius: 10rpx;
/*border-radius: 0 10rpx;*/
box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);
margin-bottom: 44rpx;
}
.card .top{
min-height: 160rpx;
min-height: 140rpx;
padding: 0 48rpx;
}
.card .title{
line-height: 160rpx;
font-size: 44rpx;
line-height: 140rpx;
font-size: 30rpx;
font-weight: bold;
color:#AD7644;
width:94%;
margin: 0 auto;
}
.card .bottom{
background-color: #EAECEE;
border-radius: 10rpx;
box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);
padding: 36rpx 46rpx 40rpx;
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{
margin: 56rpx 0 88rpx;
... ... @@ -50,4 +75,22 @@
height: 296rpx;
margin-bottom: 100rpx;
margin-top: 176rpx;
}
.cate-class{
margin-bottom: 72rpx;
font-size: 28rpx;
}
.customers{
font-size: 26rpx;
color:#999999;
margin-top: 20rpx;
}
.customers image{
width:60rpx;
height:60rpx;
border-radius: 50%;
margin-right: 8rpx;
}
.customers view{
margin-left: 14rpx;
}
\ No newline at end of file
... ...
... ... @@ -30,7 +30,7 @@
"list": []
},
"miniprogram": {
"current": 8,
"current": 6,
"list": [
{
"id": 0,
... ... @@ -72,7 +72,8 @@
"id": 6,
"name": "pages/customer/index",
"pathName": "pages/customer/index",
"query": "id=64"
"query": "id=67",
"scene": "1001"
},
{
"id": -1,
... ... @@ -86,6 +87,13 @@
"pathName": "pages/customer/index",
"query": "id=64&fromid=test",
"scene": "1001"
},
{
"id": -1,
"name": "预定本-无参数",
"pathName": "pages/book/b_index",
"query": "",
"scene": "1001"
}
]
}
... ...
... ... @@ -28,4 +28,7 @@ export default {
//列表----我的日程
'App.Reserve.GetListFromScheAndRes':null,
//订座详情页面----我愿意
'App.Reserve.SetRelaSuccess':null,
}
\ No newline at end of file
... ...