Commit 8d8ebaee934676adc3c74102cf762fd1e73847f4

Authored by pengye
1 parent a580e921

意见反馈已提交,置灰按钮

@@ -89,6 +89,7 @@ Page({ @@ -89,6 +89,7 @@ Page({
89 sellerid: this.data.seller.sid, 89 sellerid: this.data.seller.sid,
90 oid: this.data.detail.id, 90 oid: this.data.detail.id,
91 types: '1', 91 types: '1',
  92 + previousPage:'1',
92 }, '/pages/pinglun/createOpinion') 93 }, '/pages/pinglun/createOpinion')
93 wx.navigateTo({ 94 wx.navigateTo({
94 url 95 url
@@ -406,7 +406,7 @@ @@ -406,7 +406,7 @@
406 } 406 }
407 407
408 .evaluateBox { 408 .evaluateBox {
409 - margin: 16rpx 84rpx 16rpx 56rpx; 409 + margin: 16rpx 44rpx 16rpx 48rpx;
410 display: flex; 410 display: flex;
411 align-items: center; 411 align-items: center;
412 justify-content: space-between; 412 justify-content: space-between;
@@ -19,6 +19,7 @@ Page({ @@ -19,6 +19,7 @@ Page({
19 couponId:'', 19 couponId:'',
20 price:'', 20 price:'',
21 coupon:'', 21 coupon:'',
  22 + is_user_comments:'',
22 }, 23 },
23 text: '', 24 text: '',
24 /** 25 /**
@@ -61,6 +62,7 @@ Page({ @@ -61,6 +62,7 @@ Page({
61 this.setData({ 62 this.setData({
62 dateSmart, 63 dateSmart,
63 tablesText, 64 tablesText,
  65 + is_user_comments:res.data.is_user_comments,
64 tableNum:res.data.actual_pum?res.data.actual_pum:tableNum, 66 tableNum:res.data.actual_pum?res.data.actual_pum:tableNum,
65 cusdem:res.data.cusdem, 67 cusdem:res.data.cusdem,
66 }) 68 })
@@ -100,7 +102,6 @@ Page({ @@ -100,7 +102,6 @@ Page({
100 price:price || '', 102 price:price || '',
101 use:use || '', 103 use:use || '',
102 }) 104 })
103 -  
104 this.setData({ 105 this.setData({
105 marketing, 106 marketing,
106 }) 107 })
@@ -125,9 +126,14 @@ Page({ @@ -125,9 +126,14 @@ Page({
125 title: '请填写意见反馈!', 126 title: '请填写意见反馈!',
126 }) 127 })
127 } 128 }
128 - wx.showToast({  
129 - icon: 'none',  
130 - title: '提交中,请稍后!', 129 + if(this.data.is_user_comments){
  130 + return wx.showToast({
  131 + icon: 'none',
  132 + title: '评价已提交!',
  133 + })
  134 + }
  135 + wx.showLoading({
  136 + title: '提交中,请稍后!',
131 }) 137 })
132 let params = { 138 let params = {
133 sid: this.data.options.sellerid, 139 sid: this.data.options.sellerid,
@@ -169,10 +175,12 @@ Page({ @@ -169,10 +175,12 @@ Page({
169 couponId: this.data.couponId || '', 175 couponId: this.data.couponId || '',
170 }, './opinionSuccess') 176 }, './opinionSuccess')
171 } 177 }
  178 + wx.hideLoading()
172 wx.redirectTo({ 179 wx.redirectTo({
173 url 180 url
174 }) 181 })
175 }).catch(e => { 182 }).catch(e => {
  183 + wx.hideLoading()
176 console.log('catch', e); 184 console.log('catch', e);
177 wx.showToast({ 185 wx.showToast({
178 icon: 'none', 186 icon: 'none',
1 <!--pages/pinglun/createOpinion.wxml 填写意见反馈页面--> 1 <!--pages/pinglun/createOpinion.wxml 填写意见反馈页面-->
2 -<nav color="#515151">{{options.sellerName}}</nav> 2 +<nav color="#515151" hasHome="{{options.previousPage!='1'}}">{{options.sellerName}}</nav>
3 <view class="box"> 3 <view class="box">
4 <view class="info"> 4 <view class="info">
5 <view class="texts font28r">就餐时间:</view> 5 <view class="texts font28r">就餐时间:</view>
@@ -22,4 +22,4 @@ @@ -22,4 +22,4 @@
22 <textarea class="margin-top-lg text-df textarea" bindinput="textareaInput" cols="30" rows="10" placeholder="麻烦点这里输入您的意见反馈。\n\n\n可以帮助我们持续改进,给您带来更好的服务品质,谢谢啦!" placeholder-style="color:#999999;font-size:30rpx;"></textarea> 22 <textarea class="margin-top-lg text-df textarea" bindinput="textareaInput" cols="30" rows="10" placeholder="麻烦点这里输入您的意见反馈。\n\n\n可以帮助我们持续改进,给您带来更好的服务品质,谢谢啦!" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
23 <tpupload bind:tpupload="tpupload" tpNum='6'></tpupload> 23 <tpupload bind:tpupload="tpupload" tpNum='6'></tpupload>
24 </view> 24 </view>
25 -<button class="btn" bindtap="submit">提交</button>  
  25 +<button class="btn" bindtap="submit" disabled="{{is_user_comments}}">{{is_user_comments?'该订单已提交!':'提交'}}</button>
@@ -55,4 +55,8 @@ @@ -55,4 +55,8 @@
55 color: #f8f9fd; 55 color: #f8f9fd;
56 border-radius: 42rpx; 56 border-radius: 42rpx;
57 background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); 57 background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
  58 +}
  59 +button[disabled]:not([type]) {
  60 + color: #fff !important;
  61 + background:#4c8dad;
58 } 62 }