Authored by 李奇

排除多次loading的闪现体验

@@ -172,9 +172,9 @@ Page({ @@ -172,9 +172,9 @@ Page({
172 param.skup = this.data.skup 172 param.skup = this.data.skup
173 param.coupon_code = this.data.selectCouponCode || ''; 173 param.coupon_code = this.data.selectCouponCode || '';
174 174
175 - wx.showLoading({  
176 - title: '',  
177 - }) 175 + // wx.showLoading({
  176 + // title: '',
  177 + // })
178 data = await api.storeBuyerSubmit(param, () => { 178 data = await api.storeBuyerSubmit(param, () => {
179 wx.hideLoading() 179 wx.hideLoading()
180 }) 180 })
@@ -192,9 +192,9 @@ Page({ @@ -192,9 +192,9 @@ Page({
192 let channelNo = ''; 192 let channelNo = '';
193 let couponCode = this.data.selectCouponCode || ''; 193 let couponCode = this.data.selectCouponCode || '';
194 194
195 - wx.showLoading({  
196 - title: '',  
197 - }) 195 + // wx.showLoading({
  196 + // title: '',
  197 + // })
198 data = await api.buyerSubmit(skup, channelNo, addressId, couponCode, () => wx.hideLoading()); 198 data = await api.buyerSubmit(skup, channelNo, addressId, couponCode, () => wx.hideLoading());
199 } 199 }
200 if (data && data.orderCode) { 200 if (data && data.orderCode) {
@@ -10,9 +10,9 @@ import wx from '../../libs/wx'; @@ -10,9 +10,9 @@ import wx from '../../libs/wx';
10 */ 10 */
11 export const prePay = function (productId, orderCode, fromWhere, isStore) { 11 export const prePay = function (productId, orderCode, fromWhere, isStore) {
12 let api = new orderService() 12 let api = new orderService()
13 - wx.showLoading({  
14 - title: '',  
15 - }) 13 + // wx.showLoading({
  14 + // title: '',
  15 + // })
16 let openID = ''; 16 let openID = '';
17 try { 17 try {
18 openID = wx.getStorageSync('openid') 18 openID = wx.getStorageSync('openid')
@@ -33,7 +33,7 @@ export const prePay = function (productId, orderCode, fromWhere, isStore) { @@ -33,7 +33,7 @@ export const prePay = function (productId, orderCode, fromWhere, isStore) {
33 // 调用出错 33 // 调用出错
34 Taro.showToast({ 34 Taro.showToast({
35 title: '订单不可支付', 35 title: '订单不可支付',
36 - duration: 2000, 36 + duration: 1500,
37 icon: 'none' 37 icon: 'none'
38 }); 38 });
39 39
@@ -51,7 +51,7 @@ export const prePay = function (productId, orderCode, fromWhere, isStore) { @@ -51,7 +51,7 @@ export const prePay = function (productId, orderCode, fromWhere, isStore) {
51 wx.redirectTo({ 51 wx.redirectTo({
52 url: '/pages/orderDetail/index?orderCode=' + orderCode 52 url: '/pages/orderDetail/index?orderCode=' + orderCode
53 }); 53 });
54 - }, 2000); 54 + }, 1500);
55 }) 55 })
56 } else { 56 } else {
57 //提示重新登录 57 //提示重新登录