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

40
pages/user/user.wxml

@ -63,27 +63,27 @@
<view class="card_bottom"> <view class="card_bottom">
<!-- bindtap="navToCoupon" --> <!-- bindtap="navToCoupon" -->
<view> <view>
<view>{{user.coupon_num?user.coupon_num:'—'}}</view> <view>{{user.coupon_num?user.coupon_num:'—'}}</view>
<text>优惠券</text> <text>优惠券</text>
</view> </view>
<view bindtap="navToScore"> <view bindtap="navToScore">
<view>{{user?user.score:'—'}}</view> <view>{{user?user.score:'—'}}</view>
<text>积分</text> <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>
<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='user_dd'>
<view class='dd_stu'> <view class='dd_stu'>

Loading…
Cancel
Save