Browse Source

上传图片添加加载提示

master
杜叶春 2 years ago
parent
commit
ab24a24d79
  1. 7
      pages/aftersales/apply.js
  2. 40
      pages/user/user.wxml

7
pages/aftersales/apply.js

@ -81,6 +81,10 @@ Page({
} else {
images = tempFiles;
}
wx.showLoading({
title: '上传中...',
mask: true,
})
wx.uploadFile({
url: 'https://mall.gylservice.com/gw?api=resources.file.uploadFiles',
filePath: images[that.data.imgIndex].tempFilePath,
@ -95,6 +99,7 @@ Page({
uploadType: 2,
}, // HTTP 请求中其他额外的 form data
success: function (res) {
wx.hideLoading();
that.data.imgIndex++
console.log(that.data.imgIndex)
var data = JSON.parse(res.data)
@ -134,7 +139,7 @@ Page({
},
confirmAct() {
var that = this
if (!that.data.errordesc) {
if (!that.data.remark) {
wx.showToast({
title: '请输入退款说明',
icon: 'none',

40
pages/user/user.wxml

@ -63,27 +63,27 @@
<view class="card_bottom">
<!-- bindtap="navToCoupon" -->
<view>
<view>{{user.coupon_num?user.coupon_num:'—'}}</view>
<text>优惠券</text>
</view>
<view bindtap="navToScore">
<view>{{user?user.score:'—'}}</view>
<text>积分</text>
</view>
<view bindtap="navToWallet">
<view>
{{user?user.money:'—'}}
</view>
<text>余额</text>
</view>
<view bindtap="navToCollection">
<view class="relative" style="top: -6rpx;">
{{user?collection_num:'—'}}
</view>
<text>我的收藏</text>
</view>
<view>
<view>{{user.coupon_num?user.coupon_num:'—'}}</view>
<text>优惠券</text>
</view>
<view bindtap="navToScore">
<view>{{user?user.score:'—'}}</view>
<text>积分</text>
</view>
<view bindtap="navToWallet">
<view>
{{user?user.money:'—'}}
</view>
<text>余额</text>
</view>
<view bindtap="navToCollection">
<view class="relative" style="top: -6rpx;">
{{user?collection_num:'—'}}
</view>
<text>我的收藏</text>
</view>
</view>
<!-- 我的订单 -->
<view class='user_dd'>
<view class='dd_stu'>

Loading…
Cancel
Save