Commit 600a1f9e3e805e93a95b8fc605bee35a50a33dad

Authored by pengye
1 parent 6a841b53

提交意见反馈问题样式处理

... ... @@ -20,6 +20,7 @@ Page({
price:'',
coupon:'',
is_user_comments:'',
showLoading:false,
},
text: '',
/**
... ... @@ -131,9 +132,8 @@ Page({
title: '评价已提交!',
})
}
wx.showLoading({
title: '提交中,请稍后!',
mask: true,
this.setData({
showLoading:true
})
let params = {
sid: this.data.options.sellerid,
... ... @@ -150,6 +150,9 @@ Page({
});
App.User.SetComment(params).then(res => {
if (res.ret== 200 && res.data) {
this.setData({
showLoading:false
})
let url = ''
let options = this.data.options
console.log('options',options);
... ... @@ -172,17 +175,23 @@ Page({
sellid: options.sellerid,
}, './opinionSuccess')
}
wx.hideLoading()
wx.redirectTo({
url
})
}else{
this.setData({
showLoading:false
})
return wx.showToast({
icon: 'none',
title: res.msg,
})
}
}).catch(e => {
wx.hideLoading()
this.setData({
showLoading:false
})
console.log('catch', e);
wx.showToast({
icon: 'none',
... ...
... ... @@ -22,4 +22,11 @@
<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>
<tpupload bind:tpupload="tpupload" tpNum='6'></tpupload>
</view>
<button class="btn" bindtap="submit" disabled="{{is_user_comments}}">{{is_user_comments?'该订单已提交!':'提交'}}</button>
\ No newline at end of file
<button class="btn" bindtap="submit" disabled="{{is_user_comments}}">{{is_user_comments?'该订单已提交!':'提交'}}</button>
<view class="loading-container" wx:if="{{showLoading}}">
<view class="loading-mask"></view>
<view class="loading-content">
<image src="https://qn.colorcun.com/loading.webp" class="loading-image" />
<text class="loading-text">提交中...</text>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -59,4 +59,49 @@
button[disabled]:not([type]) {
color: #fff !important;
background:#4c8dad;
}
\ No newline at end of file
}
.loading-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.loading-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.3);
z-index: 999;
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
padding: 20rpx;
border-radius: 10rpx;
z-index: 1000;
}
.loading-image {
width: 60rpx;
height: 60rpx;
}
.loading-text {
margin-top: 10rpx;
font-size: 28rpx;
color: #333;
}
\ No newline at end of file
... ...