Commit dd75806c41e28088935bb66c437e1c1701b66879

Authored by wangfan
1 parent d16732cc

v2 customer view

... ... @@ -10,7 +10,11 @@
"pages/customer/detail_customer",
"pages/customer/invite",
"pages/customer/list",
"pages/customer/remind"
"pages/customer/remind",
"pages/me/index",
"pages/reservr/index",
"pages/me/setting",
"pages/me/list"
],
"window": {
"navigationStyle": "custom",
... ... @@ -23,5 +27,31 @@
"request": 5000,
"downloadFile": 10000
},
"tabBar": {
"color": "#999999",
"selectedColor": "#353535",
"backgroundColor": "#FEFEFE",
"borderStyle": "",
"list": [
{
"pagePath": "pages/reservr/index",
"text": "订座",
"iconPath": "pages/image/tabicon-reservr.png",
"selectedIconPath": "pages/image/tabicon-reservr-checked.png"
},
{
"pagePath": "pages/customer/list",
"text": "日程",
"iconPath": "pages/image/tabicon-schedule.png",
"selectedIconPath": "pages/image/tabicon-schedule-checked.png"
},
{
"pagePath": "pages/me/index",
"text": "我的",
"iconPath": "pages/image/tabicon-me.png",
"selectedIconPath": "pages/image/tabicon-me-checked.png"
}
]
},
"debug": true
}
\ No newline at end of file
... ...
/* pages/customer/detail_customer.wxss */
.page{
width: 94%;
margin: 0 3%;
width: 90%;
margin: 0 5%;
color:#353535;
}
.seller{
... ...
... ... @@ -30,8 +30,18 @@ Page({
this.selectComponent("#network").refresh();
return;
}
let url = 'list';
if (opt.id > 0) {
opt.sms_code='';
try{
opt.sms_code= await this.getClipboardData();
wx.setClipboardData({
data:"?"
})
console.log('SMS.code',opt.sms_code);
}catch (e){
console.log('SMS.code.catch',e);
}
let url = '/pages/customer/list';
if (opt.id > 0 || opt.sms_code) {
if(opt.invite_name){
let invite_names=wx.getStorageSync('invite_names') ||{};
invite_names[opt.id]=opt.invite_name;
... ... @@ -40,38 +50,51 @@ Page({
data:invite_names
});
}
let param={
openid: opt.openid,
}
if(opt.sms_code){
param.code=opt.sms_code;
}else{
param.rid=opt.id
}
App.Reserve.SetRelaOpenid({
rid:opt.id,
openid:opt.openid,
fromid:opt.fromid?opt.fromid:''
})
App.Reserve.Detail(param).then(res => {
//设置关系
App.Reserve.SetRelaOpenid({
rid:res.data.id,
openid:opt.openid,
fromid:opt.fromid?opt.fromid:''
})
App.Reserve.Detail({
openid: opt.openid,
rid: opt.id
}).then(res => {
if (!res.data.openid) {//无预订人
url = 'detail_owner';
url = '/pages/customer/detail_owner';
} else {
url = 'detail_customer';
url = '/pages/customer/detail_customer';
if (res.data.openid == opt.openid) {
url = 'detail_owner';
url = '/pages/customer/detail_owner';
}
}
url+='?id='+opt.id
url+='?id='+res.data.id
console.log('wx.redirectTo',url,res);
wx.redirectTo({url: url});
this.redirectTo({url: url});
}).catch(res=>{
wx.redirectTo({url: url});
this.redirectTo({url: url});
})
} else {
console.log('url',url);
wx.redirectTo({url: url});
this.redirectTo({url: url});
}
},
redirectTo(red){
console.log('this.redirectTo',red);
if(red.url.indexOf('list')>0){
wx.switchTab(red);
}else{
wx.redirectTo(red);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -124,4 +147,21 @@ Page({
let openid = getApp().openid;
return openid;
},
getClipboardData(){
return new Promise((success,fail)=>{
wx.getClipboardData({
success:(res)=>{
let match=res.data.match(/¥(.*)¥/);
if(match && res.data.indexOf('订个座儿')>0){
success(match[1])
}else{
fail()
}
},
fail:()=>{
fail()
}
})
})
}
})
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>Shape</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group-5-Copy-4" transform="translate(-303.000000, -10.000000)" fill="#353535" fill-rule="nonzero">
<g id="我的-copy" transform="translate(303.000000, 10.000000)">
<path d="M15.3632593,11.9704839 C15.1679155,11.7988726 14.8515717,11.7988726 14.6562279,11.9704839 C14.4615439,12.1420952 14.4615439,12.4204487 14.656817,12.5918945 C16.1679627,13.9194759 17,15.6839821 17,17.5607984 C17,17.8035712 17.2235968,18 17.5,18 C17.7763561,18 18,17.8035919 18,17.5607984 C18,15.4493232 17.063528,13.463819 15.3632122,11.9704839 L15.3632593,11.9704839 Z M9.00004713,0 C5.69138508,0 3.00002356,2.36412121 3.00002356,5.27041908 C3.00002356,7.3434572 4.36962157,9.14035657 6.35550686,10.000483 C4.96557331,10.3738633 3.69239832,11.0427769 2.63624582,11.9708358 C0.936095009,13.4637983 0,15.4492197 0,17.5607156 C0,17.8034677 0.223596776,17.9999172 0.5,17.9999172 C0.776285405,17.9999172 0.999976436,17.8034884 0.999976436,17.5607156 C0.999976436,15.6838993 1.83206089,13.9193931 3.34315943,12.5918117 C4.79966068,11.3121266 6.71968519,10.5870993 8.7708893,10.536595 C8.84700033,10.5391823 8.923347,10.5408175 8.99997644,10.5408175 C12.3086385,10.5408175 14.9999764,8.17663415 14.9999764,5.27046047 C14.9999764,2.364204 12.3085914,6.20955167e-05 9.00007069,6.20955167e-05 L9.00004713,0 Z M9.08094161,9.66154494 C9.05422027,9.65765362 9.02690984,9.6551698 8.99903388,9.6551698 C8.92299354,9.6551698 8.84711815,9.65601844 8.77136057,9.65767432 C6.12022244,9.55229822 3.99995287,7.62477059 3.99995287,5.27048117 C3.99995287,2.84879742 6.24306046,0.878444576 8.99988218,0.878444576 C11.7567982,0.878444576 13.9998822,2.84879742 13.9998822,5.27048117 C13.9999293,7.66834095 11.800509,9.62341829 9.08096517,9.66154494 L9.08094161,9.66154494 Z" id="Shape"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>Shape</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group-5-Copy-4" transform="translate(-303.000000, -10.000000)" fill="#999999" fill-rule="nonzero">
<g id="我的-copy" transform="translate(303.000000, 10.000000)">
<path d="M15.3632593,11.9704839 C15.1679155,11.7988726 14.8515717,11.7988726 14.6562279,11.9704839 C14.4615439,12.1420952 14.4615439,12.4204487 14.656817,12.5918945 C16.1679627,13.9194759 17,15.6839821 17,17.5607984 C17,17.8035712 17.2235968,18 17.5,18 C17.7763561,18 18,17.8035919 18,17.5607984 C18,15.4493232 17.063528,13.463819 15.3632122,11.9704839 L15.3632593,11.9704839 Z M9.00004713,0 C5.69138508,0 3.00002356,2.36412121 3.00002356,5.27041908 C3.00002356,7.3434572 4.36962157,9.14035657 6.35550686,10.000483 C4.96557331,10.3738633 3.69239832,11.0427769 2.63624582,11.9708358 C0.936095009,13.4637983 0,15.4492197 0,17.5607156 C0,17.8034677 0.223596776,17.9999172 0.5,17.9999172 C0.776285405,17.9999172 0.999976436,17.8034884 0.999976436,17.5607156 C0.999976436,15.6838993 1.83206089,13.9193931 3.34315943,12.5918117 C4.79966068,11.3121266 6.71968519,10.5870993 8.7708893,10.536595 C8.84700033,10.5391823 8.923347,10.5408175 8.99997644,10.5408175 C12.3086385,10.5408175 14.9999764,8.17663415 14.9999764,5.27046047 C14.9999764,2.364204 12.3085914,6.20955167e-05 9.00007069,6.20955167e-05 L9.00004713,0 Z M9.08094161,9.66154494 C9.05422027,9.65765362 9.02690984,9.6551698 8.99903388,9.6551698 C8.92299354,9.6551698 8.84711815,9.65601844 8.77136057,9.65767432 C6.12022244,9.55229822 3.99995287,7.62477059 3.99995287,5.27048117 C3.99995287,2.84879742 6.24306046,0.878444576 8.99988218,0.878444576 C11.7567982,0.878444576 13.9998822,2.84879742 13.9998822,5.27048117 C13.9999293,7.66834095 11.800509,9.62341829 9.08096517,9.66154494 L9.08094161,9.66154494 Z" id="Shape"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>日程</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="我的日程-copy-25" transform="translate(-178.000000, -722.000000)" fill="#000000" fill-rule="nonzero">
<g id="Group-5-Copy-3" transform="translate(0.000000, 713.000000)">
<g id="Group-3-Copy" transform="translate(174.833333, 9.000000)">
<g id="日程" transform="translate(12.500000, 9.500000) rotate(-360.000000) translate(-12.500000, -9.500000) translate(3.500000, 0.500000)">
<path d="M7.74191362,9.46103669 L3.37324707,9.46103669 C3.14800123,9.46103669 2.96540837,9.64524543 2.96540837,9.87248459 C2.96540837,10.0997238 3.14800123,10.2839325 3.37324707,10.2839325 L7.74191362,10.2839325 C7.96715946,10.2839325 8.14975232,10.0997238 8.14975232,9.87248459 C8.14975232,9.64524543 7.96715946,9.46103669 7.74191362,9.46103669 Z" id="Shape"></path>
<path d="M10.0388496,10.2839325 L14.4075161,10.2839325 C14.6327619,10.2839325 14.8153548,10.0997238 14.8153548,9.87248459 C14.8153548,9.64524543 14.6327619,9.46103669 14.4075161,9.46103669 L10.0388496,9.46103669 C9.81360371,9.46103669 9.63101085,9.64524543 9.63101085,9.87248459 C9.63101085,10.0997238 9.81360371,10.2839325 10.0388496,10.2839325 Z" id="Shape"></path>
<path d="M7.74191362,12.4323254 L3.37324707,12.4323254 C3.14800123,12.4323254 2.96540837,12.6165341 2.96540837,12.8437733 C2.96540837,13.0710124 3.14800123,13.2552212 3.37324707,13.2552212 L7.74191362,13.2552212 C7.96715946,13.2552212 8.14975232,13.0710124 8.14975232,12.8437733 C8.14975232,12.6165341 7.96715946,12.4323254 7.74191362,12.4323254 Z" id="Shape"></path>
<path d="M14.4075161,12.4323254 L10.0388496,12.4323254 C9.81360371,12.4323254 9.63101085,12.6165341 9.63101085,12.8437733 C9.63101085,13.0710124 9.81360371,13.2552212 10.0388496,13.2552212 L14.4075161,13.2552212 C14.6327619,13.2552212 14.8153548,13.0710124 14.8153548,12.8437733 C14.8153548,12.6165341 14.6327619,12.4323254 14.4075161,12.4323254 Z" id="Shape"></path>
<path d="M16.2966133,2.2420796 L14.0747458,2.2420796 L14.0747458,0.413429084 C14.0747458,0.185351387 13.891484,0.000549553218 13.665488,0.000549553218 C13.439411,0.000549553218 13.2562303,0.185351387 13.2562303,0.413429084 L13.2562303,2.24210004 L4.51944453,2.24210004 L4.51944453,0.410872623 C4.51944453,0.184206093 4.33731792,0.000570018814 4.11274107,0.000570018814 C3.88814395,0.000570018814 3.70603761,0.184226559 3.70603761,0.410872623 L3.70603761,2.24210006 L1.48414984,2.24210004 C0.666060014,2.24210004 0.00291160621,2.91111702 0.00291160621,3.73644658 L0.00291160621,16.4384638 C0.00291160621,17.2637933 0.666060014,17.9328103 1.48414984,17.9328103 L16.2966133,17.9328103 C17.1147031,17.9328103 17.7778515,17.2637933 17.7778515,16.4384638 L17.7778516,3.73644658 C17.7778718,2.91109657 17.1147031,2.2420796 16.2966133,2.2420796 Z M1.58017988,3.08129589 L16.2006036,3.08129589 C16.6043473,3.08129589 16.9316238,3.41146861 16.9316238,3.81878527 L16.9316238,6.72516015 L0.849179981,6.72516015 L0.849179981,3.81878525 C0.849159694,3.41146861 1.17643618,3.08129589 1.58017988,3.08129589 Z M16.2005833,17.093594 L1.58017988,17.093594 C1.17643618,17.093594 0.849159694,16.7634213 0.849159694,16.3561046 L0.849159694,7.55490724 L16.9316035,7.55490724 L16.9316035,16.3561046 C16.9316035,16.7634213 16.604327,17.093594 16.2005833,17.093594 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>日程 copy</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group-5-Copy-4" transform="translate(-178.000000, -9.000000)" fill="#999999" fill-rule="nonzero">
<g id="Group-3-Copy" transform="translate(174.833333, 9.000000)">
<g id="日程-copy" transform="translate(12.500000, 9.500000) rotate(-360.000000) translate(-12.500000, -9.500000) translate(3.500000, 0.500000)">
<path d="M7.74191362,9.46103669 L3.37324707,9.46103669 C3.14800123,9.46103669 2.96540837,9.64524543 2.96540837,9.87248459 C2.96540837,10.0997238 3.14800123,10.2839325 3.37324707,10.2839325 L7.74191362,10.2839325 C7.96715946,10.2839325 8.14975232,10.0997238 8.14975232,9.87248459 C8.14975232,9.64524543 7.96715946,9.46103669 7.74191362,9.46103669 Z" id="Shape"></path>
<path d="M10.0388496,10.2839325 L14.4075161,10.2839325 C14.6327619,10.2839325 14.8153548,10.0997238 14.8153548,9.87248459 C14.8153548,9.64524543 14.6327619,9.46103669 14.4075161,9.46103669 L10.0388496,9.46103669 C9.81360371,9.46103669 9.63101085,9.64524543 9.63101085,9.87248459 C9.63101085,10.0997238 9.81360371,10.2839325 10.0388496,10.2839325 Z" id="Shape"></path>
<path d="M7.74191362,12.4323254 L3.37324707,12.4323254 C3.14800123,12.4323254 2.96540837,12.6165341 2.96540837,12.8437733 C2.96540837,13.0710124 3.14800123,13.2552212 3.37324707,13.2552212 L7.74191362,13.2552212 C7.96715946,13.2552212 8.14975232,13.0710124 8.14975232,12.8437733 C8.14975232,12.6165341 7.96715946,12.4323254 7.74191362,12.4323254 Z" id="Shape"></path>
<path d="M14.4075161,12.4323254 L10.0388496,12.4323254 C9.81360371,12.4323254 9.63101085,12.6165341 9.63101085,12.8437733 C9.63101085,13.0710124 9.81360371,13.2552212 10.0388496,13.2552212 L14.4075161,13.2552212 C14.6327619,13.2552212 14.8153548,13.0710124 14.8153548,12.8437733 C14.8153548,12.6165341 14.6327619,12.4323254 14.4075161,12.4323254 Z" id="Shape"></path>
<path d="M16.2966133,2.2420796 L14.0747458,2.2420796 L14.0747458,0.413429084 C14.0747458,0.185351387 13.891484,0.000549553218 13.665488,0.000549553218 C13.439411,0.000549553218 13.2562303,0.185351387 13.2562303,0.413429084 L13.2562303,2.24210004 L4.51944453,2.24210004 L4.51944453,0.410872623 C4.51944453,0.184206093 4.33731792,0.000570018814 4.11274107,0.000570018814 C3.88814395,0.000570018814 3.70603761,0.184226559 3.70603761,0.410872623 L3.70603761,2.24210006 L1.48414984,2.24210004 C0.666060014,2.24210004 0.00291160621,2.91111702 0.00291160621,3.73644658 L0.00291160621,16.4384638 C0.00291160621,17.2637933 0.666060014,17.9328103 1.48414984,17.9328103 L16.2966133,17.9328103 C17.1147031,17.9328103 17.7778515,17.2637933 17.7778515,16.4384638 L17.7778516,3.73644658 C17.7778718,2.91109657 17.1147031,2.2420796 16.2966133,2.2420796 Z M1.58017988,3.08129589 L16.2006036,3.08129589 C16.6043473,3.08129589 16.9316238,3.41146861 16.9316238,3.81878527 L16.9316238,6.72516015 L0.849179981,6.72516015 L0.849179981,3.81878525 C0.849159694,3.41146861 1.17643618,3.08129589 1.58017988,3.08129589 Z M16.2005833,17.093594 L1.58017988,17.093594 C1.17643618,17.093594 0.849159694,16.7634213 0.849159694,16.3561046 L0.849159694,7.55490724 L16.9316035,7.55490724 L16.9316035,16.3561046 C16.9316035,16.7634213 16.604327,17.093594 16.2005833,17.093594 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
... ...
// pages/me/index.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
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"我的",
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<!--pages/me/index.wxml-->
<nav hasHome>订个座儿</nav>
<view class="page">
<view class="header flex-ll">
<view class="avatar">
<open-data type="userAvatarUrl"></open-data>
</view>
<view>
<view class="name"><open-data type="userNickName"></open-data></view>
<view class="info">查看并编辑个人资料</view>
</view>
</view>
<view class="shadow" ></view>
<view class="list">
<formids url="/pages/me/list">
<view class="item flex-lr">
<view class="left">我的订单</view>
<view class="right">
<image src="../image/click.png"></image>
</view>
</view>
</formids>
<formids url="/pages/me/setting">
<view class="item flex-lr">
<view class="left">常用信息</view>
<view class="right">
<image src="../image/click.png"></image>
</view>
</view>
</formids>
</view>
</view>
... ...
/* pages/me/index.wxss */
.page{
width: 90%;
margin: 0 5%;
color:#353535;
}
image{
width:100%;
height: 100%;
display: inherit;
}
.header{
margin-top: 76rpx;
padding-bottom: 54rpx;
}
.shadow{
height: 0rpx;
margin-left: -5%;
width: 110%;
box-shadow: 0 12rpx 14rpx 14rpx RGBA(231, 228, 228, 0.5);
margin-bottom: 98rpx;
}
.avatar{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 20rpx;
}
.name{
height: 52rpx;
line-height: 52rpx;
font-size: 38rpx;
}
.info{
font-size: 26rpx;
margin-top: 4rpx;
}
.item{
height: 107rpx;
line-height: 107rpx;
font-size: 30rpx;
}
.item .left{
height: 42rpx;
line-height: 42rpx;
}
.item .right{
width: 12rpx;
height: 22rpx;
}
\ No newline at end of file
... ...
// pages/customer/list.js
import util from '../../utils/util';
import App from '../../utils/api';
const {regeneratorRuntime} = global
Page({
/**
* 页面的初始数据
*/
data: {
success:[],
padding:[],
total:0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getListData();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
getListData(){
App.Reserve.GetListFromScheAndRes({
flag:this.data.tabFlag,
openid:getApp().openid,
}).then(res => {
let data=this.formatList(res.data);
this.setData({
success:data.success,
padding:data.padding,
total:res.data.success.length+res.data.padding.length
})
})
},
_formatList(list){
if(!list) return {};
let dlist={};
if(list.length>0){
let openid=getApp().openid;
list.forEach(row=>{
row.rdateStr=util.unixtoTime(row.rdate,'MM月DD日 WW HH:II');
row.navigator=row.openid==openid?'detail_owner':'detail_customer';
let d=util.unixtoTime(row.rdate,'MM月DD日 DAY 星期WW');
typeof dlist[d]=='undefined'?dlist[d]=[]:'';
dlist[d].push(row);
})
}
return dlist;
},
formatList(res){
res.success=this._formatList(res.success);
res.padding=this._formatList(res.padding);
return res;
},
switchTab(e){
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":"订个座儿",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"formids":"/components/formids/formids",
"nav":"/components/nav/nav",
"card":"/components/seller-card/seller-card"
}
}
\ No newline at end of file
... ...
<!--pages/customer/list.wxml-->
<nav hasHome>订个座儿</nav>
<view class="page">
<!--
<view class="tabs flex-cc">
<view class="item {{0==tabFlag?'active':''}}"
bindtap="switchTab" data-index="0">我的日程</view>
<view class="item" style="width: 246rpx;"></view>
<view class="item {{1==tabFlag?'active':''}}"
bindtap="switchTab" data-index="1">我的订座</view>
</view>
-->
<block wx:if="{{total==0}}">
<view wx:if="{{tabindex==tabFlag}}" class="flex-vc empry">
<image src="http://qn.colorcun.com/custom/lite/image/empty-order.png"></image>
<view class="Medium">{{0==tabFlag?'暂无日程':'暂无订座'}}</view>
</view>
</block>
<block wx:else="">
<block wx:for="{{success}}" wx:key="success.key" wx:for-item="part" wx:for-index="dateIndex">
<view class="list-content" wx:if="{{part.length>0}}">
<view class="cate-class" style="margin-bottom: 40rpx;margin-left: 44rpx;">{{dateIndex}}</view>
<block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail">
<navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<view class="card">
<card seller="{{detail.seller}}" detail="{{detail}}"></card>
</view>
</navigator>
</block>
</view>
</block>
<block wx:for="{{padding}}" wx:key="padding.key" wx:for-item="part" wx:for-index="dateIndex">
<view class="list-content" wx:if="{{part.length>0}}">
<view class="cate-class" style="margin-bottom: 26rpx;">待处理<text>({{part.length}}条)</text></view>
<view class="cate-class" style="margin-bottom: 40rpx;margin-top: 0;margin-left: 44rpx;">{{dateIndex}}</view>
<block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail">
<navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
<view class="card">
<card seller="{{detail.seller}}" detail="{{detail}}"></card>
</view>
</navigator>
</block>
</view>
</block>
</block>
</view>
... ...
/* pages/customer/list.wxss */
.page{
width: 90%;
margin: 30rpx 5% 0;
color:#353535;
}
.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{
margin: 56rpx 0 88rpx;
font-size: 38rpx;
color:#999999;
font-weight: bold;
}
.tabs .item{
}
.tabs .active{
color:#353535;
}
.empry{
font-size: 34rpx;
}
.empry image{
width:384rpx;
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
... ...
// pages/me/setting.js
import util from '../../utils/util';
import App from '../../utils/api';
const {regeneratorRuntime} = global
const _u={
name:'',
sex:1,
phone:'',
cusdem:'',
}
Page({
/**
* 页面的初始数据
*/
user:_u,
data: {
user:_u
},
cache_key:'me-setting',
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.getStorage({
key:this.cache_key,
success:(res)=>{
if(res.data){
this.user=res.data
this.setData({
user:res.data,
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
saved(){
wx.setStorage({
key:this.cache_key,
data:this.user,
})
wx.navigateBack()
},
changeInput(e){
let key=util.attr(e,'key');
let val=''
if(key=='sex'){
val=util.attr(e,'val');
}else{
val=util.val(e);
}
this.user[key]=val;
if(key=='sex'){
this.setData({
user:this.user
})
}
}
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"我的",
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<!--pages/me/setting.wxml-->
<nav hasHome>常用信息</nav>
<view class="page">
<view class="tip">在这里维护你的常用预订信息</view>
<view class="card">
<view class="item flex-lr">
<view class="item-label">预 定 人</view>
<view class="Medium flex-rr">
<input class="name input" placeholder="请输入姓名"
bindinput="changeInput"
data-key="name"
value="{{user.name}}"
placeholder-class="input-pl" maxlength="4"/>
<view class="flex-rr switch">
<view
bindtap="changeInput"
data-key="sex"
data-val="1"
class="switch-item {{user.sex==1?'checked':''}}">先生</view>
<view
bindtap="changeInput"
data-key="sex"
data-val="2"
class="switch-item {{user.sex==2?'checked':''}}">女士</view>
</view>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">手机号码</view>
<view class="Medium">
<input class="phone input" placeholder="请输入手机号码"
bindinput="changeInput"
data-key="phone"
type="phone"
value="{{user.phone}}"
placeholder-class="input-pl" maxlength="11"/>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">备注信息</view>
<view class="Medium">
<input class="cusdem input" placeholder="请填写预定需求"
bindinput="changeInput"
data-key="cusdem"
value="{{user.cusdem}}"
placeholder-class="input-pl" maxlength="50"/>
</view>
</view>
</view>
<formids bindclick="saved">
<view class="share-but">保存</view>
</formids>
</view>
... ...
/* pages/me/setting.wxss */
.page{
width: 90%;
margin: 0 5%;
color:#353535;
}
.tip{
margin-top: 62rpx;
font-size: 26rpx;
margin-bottom: 38rpx;
}
.card{
box-shadow: 2rpx 2rpx 14rpx 6rpx RGBA(231, 228, 228, 0.5);
font-size: 30rpx;
padding: 0 40rpx;
border-radius: 10rpx;
}
.item{
height: 124rpx;
line-height: 124rpx;
}
.item-label{
width: 120rpx;
min-width: 120rpx;
}
.item view:last-child{
font-size: 34rpx;
}
.switch{
width: 168rpx;
height: 50rpx;
line-height: 50rpx;
border: 2rpx solid #262628;
margin-left: 16rpx;
font-size: 28rpx;
}
input.input{
text-align: right !important;
width: 100%;
}
.switch .switch-item{
width: 84rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
}
.switch .checked{
background-color:#262628;
color: #FEFEFE;
}
.share-but{
color:#FEFEFE;
background: #262628;
width: 100%;
line-height: 80rpx;
font-size: 34rpx;
text-align: center;
margin-top: 300rpx;
}
\ No newline at end of file
... ...
// pages/reservr/index.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
... ...
{}
\ No newline at end of file
... ...
<!--pages/reservr/index.wxml-->
<text>pages/reservr/index.wxml</text>
... ...
/* pages/reservr/index.wxss */
\ No newline at end of file
... ...
... ... @@ -30,7 +30,7 @@
"list": []
},
"miniprogram": {
"current": 11,
"current": 13,
"list": [
{
"id": 0,
... ... @@ -119,6 +119,30 @@
"shareName": "8DEbIRpK4pa9mH_QY2vU4ZUKYPuI97WoQ4BQoFej-Q8@cr4dev",
"shareKey": "PZhnqMlY2TnRuHhATyGeSamVmBQUDXXr_WtjRSddeeFK17UAiOP-HNOdhxiEN7PFub5S1DjAeUl0IXOdW-VDqg~~"
}
},
{
"id": -1,
"name": "我的 pages/me/index",
"pathName": "pages/me/index",
"query": "",
"scene": "1044",
"shareInfo": {
"groupName": "测试模拟群1",
"shareName": "8DEbIRpK4pa9mH_QY2vU4ZUKYPuI97WoQ4BQoFej-Q8@cr4dev",
"shareKey": "PZhnqMlY2TnRuHhATyGeSamVmBQUDXXr_WtjRSddeeFK17UAiOP-HNOdhxiEN7PFub5S1DjAeUl0IXOdW-VDqg~~"
}
},
{
"id": -1,
"name": "我的 常用信息 pages/me/setting",
"pathName": "pages/me/setting",
"query": "",
"scene": "1044",
"shareInfo": {
"groupName": "测试模拟群1",
"shareName": "8DEbIRpK4pa9mH_QY2vU4ZUKYPuI97WoQ4BQoFej-Q8@cr4dev",
"shareKey": "PZhnqMlY2TnRuHhATyGeSamVmBQUDXXr_WtjRSddeeFK17UAiOP-HNOdhxiEN7PFub5S1DjAeUl0IXOdW-VDqg~~"
}
}
]
}
... ...