Commit 1c7e3b770daed2cdd5c14c6d8129b0fb0e16f9e4

Authored by liuxuqinfhp1220
1 parent 4c70d029

no message

... ... @@ -31,7 +31,8 @@
"pages/reserve/indexList",
"pages/reserve/share",
"pages/reserve/submit",
"pages/me/history"
"pages/me/history",
"pages/reserve/remark"
],
"subpackages": [
{
... ...
... ... @@ -207,6 +207,9 @@ image{
.bg_gray{
background:#efeef3;
}
.bg-gray{
background:#F5F5F5;
}
.font-siny{
font-weight:300;
}
... ...
... ... @@ -98,9 +98,9 @@
style="{{(detail.cusman_phone || detail.cusman_account)?'text-decoration: underline;':''}}"
>{{detail.cusman||''}}</view>
</view>
<view class="flex-lr" style="margin-top: 43rpx;" wx:if="{{detail.cusdem}}">
<view>备注信息</view>
<view class="detail-info-right">{{detail.cusdem}}</view>
<view class="flex-lr" style="margin-top: 43rpx;align-items: flex-start;" wx:if="{{detail.cusdem}}">
<view style="line-height: 34rpx;">备注信息</view>
<view class="detail-info-right flex-rr" style="width:500rpx;line-height: 1.35;">{{detail.cusdem}}</view>
</view>
</view>
<view class="hr" style="margin-top: 78rpx;margin-bottom: 78rpx;"></view>
... ...
... ... @@ -23,6 +23,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(wx.getStorageSync('remark')){
wx.removeStorageSync('remark')
}
console.log('onLoad', options)
console.log('初次进入详情页---小米8测试',this.data.reserveDate ? this.data.reserveDate : '没有日期','openid:',getApp().openid)
this.options=options
... ...
import util from '../../utils/util';
import App from '../../utils/api';
Page({
data:{
remark:''
},
onLoad(opt){
this.setData({
remark:opt.remark
})
this.remark=opt.remark;
this.getlabellist();
},
inputremark(e){
this.remark=util.trim(e.detail.value)
console.log(e)
},
selectlabel(e){
let name=e.currentTarget.dataset.name;
if(this.remark!=''){
let str=this.remark+','+name
if(str.length>25){
console.log('rrrrrr')
return wx.showToast({
icon:'none',
title:'最多输入25个字符',
mask:true,
duration:1500
})
}
}
// this.setData({
// remark:this.data.remark=='' ? name : this.data.remark+','+name
// })
this.remark=this.remark=='' ? name : this.remark+','+name
console.log(this.remark,this.remark.length)
},
inputblur(e){
console.log(e)
this.setData({
remark:this.remark
})
},
getlabellist(){
App.Customer.GetUserRemarkes().then((json)=>{
console.log('eeeee',json)
if(json.ret==200){
this.setData({
labellist:json.data
})
}
})
},
save(){
wx.setStorageSync('remark',this.remark);
wx.navigateBack();
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"周到安排",
"usingComponents": {
"nav":"/components/nav/nav"
}
}
\ No newline at end of file
... ...
<layout>
<nav>备注</nav>
<view class="contain">
<view class="bg-gray textarea-cover">
<textarea placeholder="请输入您的特殊要求,我们会尽量安排" placeholder-class="gray-font font28r" class="black-font font28r" value="{{remark}}" maxlength="25" auto-focus bindinput="inputremark" bindblur="inputblur"></textarea>
<view class="gray-font font24r flex-rr" style="padding-top: 20rpx;">最多输入25个字</view>
</view>
<view class="label">
<view class="gray-font font28r">快捷标签</view>
<view class="label-list flex-rs">
<block wx:for="{{labellist}}">
<view class="black-font font28r label-single bg-gray" data-name="{{item.remark}}" bindtap="selectlabel">{{item.remark}}</view>
</block>
</view>
</view>
</view>
<view class="save-button white-font flex-cc font32r" bindtap="save">保存</view>
</layout>
... ...
.contain{
width:100%;
padding:10rpx 0 180rpx;
}
.textarea-cover{
width: 690rpx;
padding: 20rpx 40rpx;
box-sizing: border-box;
border-radius: 16rpx;
overflow: hidden;
margin: 0 auto 40rpx;
}
textarea,input{
width: 100%;
height: 200rpx;
line-height: 40rpx;
}
input{
display: block;
}
.label{
width: 100%;
padding:0 10rpx 0 30rpx;
box-sizing: border-box;
}
.label-single{
padding:5rpx 20rpx;
line-height: 40rpx;
margin-right: 20rpx;
margin-top: 20rpx;
border-radius:4rpx;
}
.save-button{
width: 690rpx;
height: 80rpx;
background: #C0A369;
margin: 0 auto;
position: fixed;
left:0;
right:0;
bottom:60rpx;
}
\ No newline at end of file
... ...
... ... @@ -25,22 +25,22 @@ Page({
*/
options:null,
onLoad: function (options) {
console.log(options)
console.log(options)
options.room_demand=JSON.parse(decodeURIComponent(options.room_demand))
this.options=options
this.GetSellerDetail();
App.Customer.GetCustomerInfo().then(res=>{
if(res.data.length>0){
res.data.forEach((v,i)=>{
if(v.is_default==1){
this.user = v
v.remark='';
this.setData({
user: v,
})
return;
}
})
res.data.forEach((v,i)=>{
if(v.is_default==1){
this.user = v
v.remark=wx.getStorageSync('remark') ? wx.getStorageSync('remark') : '';
this.setData({
user: v,
})
return;
}
})
}
})
},
... ... @@ -56,7 +56,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
'user.remark':wx.getStorageSync('remark') ? wx.getStorageSync('remark') : ''
})
},
/**
... ... @@ -139,7 +141,7 @@ Page({
this.options.room_demand.forEach((v,i)=>{
roomids.push(v.id)
})
console.log('ceshi',roomids);
console.log('ceshi',roomids);
App.Customer.SetReserveInfo({
sid:this.options.sid,
ddate:this.options.ddate,
... ... @@ -159,10 +161,14 @@ Page({
if(res.data.hasSetUserInfo){
App.Customer.GetCustomerInfo({},'clear')
}
if(this.data.user.remark!=''){
this.setremark();
}
let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请留意短信或微信通知'
if(!this.hasInWorkTime()){//非营业时间预订
firstShowMsg='商家未上班,上班后将第一时间告知您预订结果,请留意短信/微信通知(上班时间:'+this.data.seller.rec_stime+'—'+this.data.seller.rec_etime+')'
}
wx.removeStorageSync('remark')
wx.redirectTo({
url:util.http_build_query({
id:res.data.rid,
... ... @@ -242,4 +248,18 @@ Page({
})
}).exec()
},
toremark(){
wx.navigateTo({
url:'remark?remark='+this.data.user.remark,
})
},
setremark(){
App.Customer.SetUserRemarkes({remark:this.data.user.remark}).then((json)=>{
console.log(json)
if(json.ret==200){
console.log(json)
App.Customer.GetUserRemarkes({},'clear')
}
})
},
})
\ No newline at end of file
... ...
... ... @@ -30,6 +30,8 @@
bindinput="changeInput"
data-key="name"
value="{{user.name}}"
bindkeyboardheightchange="keyboardheightchange"
adjust-position="{{false}}"
placeholder-class="input-pl" maxlength="10"/>
<view class="flex-rr switch">
<view
... ... @@ -58,6 +60,7 @@
data-key="phone"
type="number"
value="{{user.phone}}"
adjust-position="{{false}}"
placeholder-class="input-pl" maxlength="11"/>
<view class="flex-rr">
<!-- 一键获取 -->
... ... @@ -70,16 +73,19 @@
</view>
<view class="item flex-lr">
<view class="item-label" style="margin-left:30rpx;">备注</view>
<view class="Medium">
<input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)"
<view class="Medium flex-rr" bindtap="toremark">
<!-- <input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)"
bindinput="changeInput"
bindkeyboardheightchange="keyboardheightchange"
bindblur="keyboardheightchange"
bindconfirm="keyboardheightchange"
adjust-position="{{false}}"
data-key="remark"
value="{{user.remark}}"
placeholder-class="input-pl" maxlength="25"/>
placeholder-class="input-pl" maxlength="25"/> -->
<view class="cusdem input {{user.remark && user.remark!='' ? 'black-font' : 'gray-font'}} font-more" data-key="remark" style="width: 496rpx;">{{user.remark && user.remark!='' ? user.remark : '您的特殊要求,我们会尽量安排'}}</view>
<view class="click-cover" style="padding-right:30rpx;">
<image src="../image/click-icon.png"></image>
</view>
</view>
</view>
<formids bindclick="saved">
... ...
... ... @@ -108,4 +108,7 @@
height:50rpx;
line-height: 50rpx;
background: #C0A369;
}
.cusdem{
width:100%;
}
\ No newline at end of file
... ...
... ... @@ -564,6 +564,12 @@
"pathName": "pages/me/history",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/reserve/remark",
"pathName": "pages/reserve/remark",
"scene": null
}
]
}
... ...
... ... @@ -399,4 +399,13 @@ export default {
openid:'openid',
},
//快速备注
'App.Customer.GetUserRemarkes':{
openid:'openid',
cachetime: -1,
},
//写入快速备注
'App.Customer.SetUserRemarkes':{
openid:'openid',
}
}
\ No newline at end of file
... ...