更新支付失败时的错误提示,更新logo、名称
This commit is contained in:
parent
59adb8c1d0
commit
0088f922f5
1
app.json
1
app.json
@ -12,6 +12,7 @@
|
|||||||
"pages/ucenter/index/index",
|
"pages/ucenter/index/index",
|
||||||
"pages/ucenter/settings/index",
|
"pages/ucenter/settings/index",
|
||||||
"pages/ucenter/order-list/index",
|
"pages/ucenter/order-list/index",
|
||||||
|
"pages/ucenter/goods-list/index",
|
||||||
"pages/ucenter/order-details/index",
|
"pages/ucenter/order-details/index",
|
||||||
"pages/ucenter/express-info/index",
|
"pages/ucenter/express-info/index",
|
||||||
"pages/ucenter/footprint/index",
|
"pages/ucenter/footprint/index",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.3 KiB |
@ -2,7 +2,7 @@
|
|||||||
<view class='logo'>
|
<view class='logo'>
|
||||||
<image class='logo-img' src='http://lucky-icon.meiweiyuxian.com/hio/logo.png'></image>
|
<image class='logo-img' src='http://lucky-icon.meiweiyuxian.com/hio/logo.png'></image>
|
||||||
</view>
|
</view>
|
||||||
<view class='logo-name'>海鸥商城</view>
|
<view class='logo-name'>海风小店</view>
|
||||||
<view class='intro'>开源微信小程序商城</view>
|
<view class='intro'>开源微信小程序商城</view>
|
||||||
<view class='login'>请完成微信授权以继续使用</view>
|
<view class='login'>请完成微信授权以继续使用</view>
|
||||||
<button class='btn-login' open-type="getUserInfo" bindgetuserinfo='getUserInfo'>
|
<button class='btn-login' open-type="getUserInfo" bindgetuserinfo='getUserInfo'>
|
||||||
|
|||||||
@ -72,6 +72,9 @@ Page({
|
|||||||
cartTotal: res.data.cartTotal,
|
cartTotal: res.data.cartTotal,
|
||||||
hasCartGoods: hasCartGoods
|
hasCartGoods: hasCartGoods
|
||||||
});
|
});
|
||||||
|
if (res.data.cartTotal.numberChange == 1) {
|
||||||
|
util.showErrorToast('部分商品库存有变动');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
that.setData({
|
that.setData({
|
||||||
checkedAllStatus: that.isCheckedAll()
|
checkedAllStatus: that.isCheckedAll()
|
||||||
@ -140,11 +143,10 @@ Page({
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
updateCart: function(productId, goodsId, number, id) {
|
updateCart: function (itemIndex,productId, number, id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
util.request(api.CartUpdate, {
|
util.request(api.CartUpdate, {
|
||||||
productId: productId,
|
productId: productId,
|
||||||
goodsId: goodsId,
|
|
||||||
number: number,
|
number: number,
|
||||||
id: id
|
id: id
|
||||||
}, 'POST').then(function(res) {
|
}, 'POST').then(function(res) {
|
||||||
@ -153,9 +155,13 @@ Page({
|
|||||||
cartGoods: res.data.cartList,
|
cartGoods: res.data.cartList,
|
||||||
cartTotal: res.data.cartTotal
|
cartTotal: res.data.cartTotal
|
||||||
});
|
});
|
||||||
|
let cartItem = that.data.cartGoods[itemIndex];
|
||||||
|
cartItem.number = number;
|
||||||
that.getCartNum();
|
that.getCartNum();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
util.showErrorToast('库存不足了')
|
||||||
|
}
|
||||||
that.setData({
|
that.setData({
|
||||||
checkedAllStatus: that.isCheckedAll()
|
checkedAllStatus: that.isCheckedAll()
|
||||||
});
|
});
|
||||||
@ -163,32 +169,30 @@ Page({
|
|||||||
|
|
||||||
},
|
},
|
||||||
cutNumber: function(event) {
|
cutNumber: function(event) {
|
||||||
|
|
||||||
let itemIndex = event.target.dataset.itemIndex;
|
let itemIndex = event.target.dataset.itemIndex;
|
||||||
let cartItem = this.data.cartGoods[itemIndex];
|
let cartItem = this.data.cartGoods[itemIndex];
|
||||||
if (cartItem.number - 1 == 0) {
|
if (cartItem.number - 1 == 0) {
|
||||||
util.showErrorToast('再减没啦,要删除左滑试试')
|
util.showErrorToast('删除左滑试试')
|
||||||
}
|
}
|
||||||
let number = (cartItem.number - 1 > 1) ? cartItem.number - 1 : 1;
|
let number = (cartItem.number - 1 > 1) ? cartItem.number - 1 : 1;
|
||||||
|
|
||||||
cartItem.number = number;
|
// cartItem.number = number;
|
||||||
this.setData({
|
this.setData({
|
||||||
cartGoods: this.data.cartGoods,
|
cartGoods: this.data.cartGoods,
|
||||||
});
|
});
|
||||||
this.updateCart(cartItem.product_id, cartItem.goods_id, number, cartItem.id);
|
this.updateCart(itemIndex,cartItem.product_id, number, cartItem.id);
|
||||||
},
|
},
|
||||||
clicknone: function() {
|
clicknone: function() {
|
||||||
|
|
||||||
},
|
},
|
||||||
addNumber: function(event) {
|
addNumber: function(event) {
|
||||||
let itemIndex = event.target.dataset.itemIndex;
|
let itemIndex = event.target.dataset.itemIndex;
|
||||||
let cartItem = this.data.cartGoods[itemIndex];
|
let cartItem = this.data.cartGoods[itemIndex];
|
||||||
let number = Number(cartItem.number) + 1;
|
let number = Number(cartItem.number) + 1;
|
||||||
cartItem.number = number;
|
// cartItem.number = number;
|
||||||
this.setData({
|
this.setData({
|
||||||
cartGoods: this.data.cartGoods,
|
cartGoods: this.data.cartGoods,
|
||||||
});
|
});
|
||||||
this.updateCart(cartItem.product_id, cartItem.goods_id, number, cartItem.id);
|
this.updateCart(itemIndex,cartItem.product_id, number, cartItem.id);
|
||||||
},
|
},
|
||||||
getCartNum: function() {
|
getCartNum: function() {
|
||||||
util.request(api.CartGoodsCount).then(function(res) {
|
util.request(api.CartGoodsCount).then(function(res) {
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
</block>
|
</block>
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
<view class="loading-wrap">
|
<view class="loading-wrap">
|
||||||
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading.gif"></image>
|
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading2.gif"></image>
|
||||||
<view class="text">正在加载...</view>
|
<view class="text">正在加载...</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|||||||
@ -117,6 +117,7 @@ page {
|
|||||||
}
|
}
|
||||||
.catalog .cate .loading-wrap .text{
|
.catalog .cate .loading-wrap .text{
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.catalog .cate .banner-container {
|
.catalog .cate .banner-container {
|
||||||
|
|||||||
@ -225,9 +225,8 @@ Page({
|
|||||||
});
|
});
|
||||||
// console.error('规格所对应货品不存在');
|
// console.error('规格所对应货品不存在');
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '规格所对应货品不存在',
|
title: '规格所对应货品不存在',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -241,9 +240,8 @@ Page({
|
|||||||
soldout: true
|
soldout: true
|
||||||
});
|
});
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '库存不足',
|
title: '库存不足',
|
||||||
// mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -368,9 +366,8 @@ Page({
|
|||||||
//提示选择完整规格
|
//提示选择完整规格
|
||||||
if (!this.isCheckedAllSpec()) {
|
if (!this.isCheckedAllSpec()) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '请选择规格',
|
title: '请选择规格',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -380,9 +377,8 @@ Page({
|
|||||||
if (!checkedProductArray || checkedProductArray.length <= 0) {
|
if (!checkedProductArray || checkedProductArray.length <= 0) {
|
||||||
//找不到对应的product信息,提示没有库存
|
//找不到对应的product信息,提示没有库存
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '库存不足',
|
title: '库存不足',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -391,9 +387,8 @@ Page({
|
|||||||
if (checkedProduct.goods_number < this.data.number) {
|
if (checkedProduct.goods_number < this.data.number) {
|
||||||
//要买的数量比库存多
|
//要买的数量比库存多
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '库存不足',
|
title: '库存不足',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -414,7 +409,6 @@ Page({
|
|||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '添加成功',
|
title: '添加成功',
|
||||||
// mask: true
|
|
||||||
});
|
});
|
||||||
if (productLength != 1 || that.data.openAttr == true) {
|
if (productLength != 1 || that.data.openAttr == true) {
|
||||||
that.setData({
|
that.setData({
|
||||||
@ -430,9 +424,8 @@ Page({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: _res.errmsg,
|
title: _res.errmsg,
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,9 +452,8 @@ Page({
|
|||||||
//提示选择完整规格
|
//提示选择完整规格
|
||||||
if (!this.isCheckedAllSpec()) {
|
if (!this.isCheckedAllSpec()) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '请选择规格',
|
title: '请选择规格',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -470,9 +462,8 @@ Page({
|
|||||||
if (!checkedProductArray || checkedProductArray.length <= 0) {
|
if (!checkedProductArray || checkedProductArray.length <= 0) {
|
||||||
//找不到对应的product信息,提示没有库存
|
//找不到对应的product信息,提示没有库存
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '库存不足',
|
title: '库存不足',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -481,9 +472,8 @@ Page({
|
|||||||
if (checkedProduct.goods_number < this.data.number) {
|
if (checkedProduct.goods_number < this.data.number) {
|
||||||
//要买的数量比库存多
|
//要买的数量比库存多
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: '库存不足',
|
title: '库存不足',
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -504,9 +494,8 @@ Page({
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: 'http://lucky-icon.meiweiyuxian.com/hio/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
title: _res.errmsg,
|
title: _res.errmsg,
|
||||||
mask: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -46,7 +46,7 @@ Page({
|
|||||||
onShareAppMessage: function() {
|
onShareAppMessage: function() {
|
||||||
let info = wx.getStorageSync('userInfo');
|
let info = wx.getStorageSync('userInfo');
|
||||||
return {
|
return {
|
||||||
title: '海鸥商城',
|
title: '海风小店',
|
||||||
desc: '开源微信小程序商城',
|
desc: '开源微信小程序商城',
|
||||||
path: '/pages/index/index?id=' + info.id
|
path: '/pages/index/index?id=' + info.id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "海鸥商城"
|
"navigationBarTitleText": "海风小店"
|
||||||
}
|
}
|
||||||
@ -98,6 +98,6 @@
|
|||||||
<view class="no-more-goods ">没有更多商品啦</view>
|
<view class="no-more-goods ">没有更多商品啦</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="loading" style="height:{{sysHeight}}px" wx:else>
|
<view class="loading" style="height:{{sysHeight}}px" wx:else>
|
||||||
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading.gif"></image>
|
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading2.gif"></image>
|
||||||
<view class="text">努力加载中</view>
|
<view class="text">努力加载中</view>
|
||||||
</view>
|
</view>
|
||||||
@ -18,8 +18,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.loading .img {
|
.loading .img {
|
||||||
width: 60rpx;
|
width: 90rpx;
|
||||||
height: 60rpx;
|
height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading .text {
|
.loading .text {
|
||||||
|
|||||||
@ -14,11 +14,11 @@ Page({
|
|||||||
addressId: 0,
|
addressId: 0,
|
||||||
goodsCount: 0,
|
goodsCount: 0,
|
||||||
postscript: '',
|
postscript: '',
|
||||||
|
outStock: 0
|
||||||
},
|
},
|
||||||
toGoodsList: function (e) {
|
toGoodsList: function (e) {
|
||||||
let orderId = this.data.orderId;
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/ucenter/goods-list/index?type=1',
|
url: '/pages/ucenter/goods-list/index?id=0',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toSelectAddress: function () {
|
toSelectAddress: function () {
|
||||||
@ -119,6 +119,9 @@ Page({
|
|||||||
if (res.data.outStock == 1) {
|
if (res.data.outStock == 1) {
|
||||||
util.showErrorToast('有部分商品缺货或已下架');
|
util.showErrorToast('有部分商品缺货或已下架');
|
||||||
}
|
}
|
||||||
|
else if (res.data.numberChange == 1){
|
||||||
|
util.showErrorToast('部分商品库存有变动');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -141,7 +144,7 @@ Page({
|
|||||||
formId: formId,
|
formId: formId,
|
||||||
actualPrice: actualPrice,
|
actualPrice: actualPrice,
|
||||||
}, 'POST').then(res => {
|
}, 'POST').then(res => {
|
||||||
const orderId = res.data.orderInfo.id;
|
console.log(res);
|
||||||
if (res.errno === 0) {
|
if (res.errno === 0) {
|
||||||
wx.removeStorageSync('orderId');
|
wx.removeStorageSync('orderId');
|
||||||
wx.setStorageSync('addressId', 0);
|
wx.setStorageSync('addressId', 0);
|
||||||
@ -156,7 +159,7 @@ Page({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
util.showErrorToast('下单失败');
|
util.showErrorToast(res.errmsg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Page({
|
|||||||
status: true
|
status: true
|
||||||
});
|
});
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
util.showErrorToast('支付失败');
|
util.showErrorToast(res.errmsg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -94,7 +94,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="company">
|
<view class="company">
|
||||||
<view class="c-wrap">
|
<view class="c-wrap">
|
||||||
<view class="text">海鸥商城</view>
|
<view class="text">海风小店</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">开源微信小程序商城</view>
|
<view class="tip">开源微信小程序商城</view>
|
||||||
|
|||||||
@ -60,12 +60,9 @@ Page({
|
|||||||
payOrder: function(e) {
|
payOrder: function(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
pay.payOrder(parseInt(that.data.orderId)).then(res => {
|
pay.payOrder(parseInt(that.data.orderId)).then(res => {
|
||||||
// this.setData({
|
|
||||||
// status: true
|
|
||||||
// });
|
|
||||||
that.getOrderDetail();
|
that.getOrderDetail();
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
util.showErrorToast('支付失败');
|
util.showErrorToast(res.errmsg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toSelectAddress: function() {
|
toSelectAddress: function() {
|
||||||
@ -155,15 +152,6 @@ Page({
|
|||||||
onPosting: 1,
|
onPosting: 1,
|
||||||
express: express
|
express: express
|
||||||
});
|
});
|
||||||
// var traces = res.data.traces;
|
|
||||||
// that.setData({
|
|
||||||
// expressList: expressList
|
|
||||||
// });
|
|
||||||
// if (traces.length == 0) {
|
|
||||||
// that.setData({
|
|
||||||
// hasExpress: 0
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="onPosting" wx:if="{{orderInfo.shipping_status && onPosting == 0}}">
|
<view class="onPosting" wx:if="{{orderInfo.shipping_status && onPosting == 0}}">
|
||||||
<image class='loading' src='http://lucky-icon.meiweiyuxian.com/hio/loading.gif'></image>
|
<image class='loading' src='http://lucky-icon.meiweiyuxian.com/hio/loading2.gif'></image>
|
||||||
<view class='t'>快递信息查询中。。。</view>
|
<view class='t'>快递信息查询中。。。</view>
|
||||||
</view>
|
</view>
|
||||||
<view wx:elif="{{orderInfo.shipping_status && onPosting == 1}}" class="express">
|
<view wx:elif="{{orderInfo.shipping_status && onPosting == 1}}" class="express">
|
||||||
|
|||||||
@ -38,7 +38,8 @@ Page({
|
|||||||
that.getOrderList();
|
that.getOrderList();
|
||||||
that.getOrderInfo();
|
that.getOrderInfo();
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
util.showErrorToast('支付失败');
|
console.log(res);
|
||||||
|
util.showErrorToast(res.errmsg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getOrderInfo: function(e) {
|
getOrderInfo: function(e) {
|
||||||
@ -61,16 +62,6 @@ Page({
|
|||||||
}).then(function(res) {
|
}).then(function(res) {
|
||||||
if (res.errno === 0) {
|
if (res.errno === 0) {
|
||||||
let count = res.data.count;
|
let count = res.data.count;
|
||||||
// var orderList = res.data.data;
|
|
||||||
// that.setData({
|
|
||||||
// orderList: orderList
|
|
||||||
// });
|
|
||||||
// if (orderList.length == 0) {
|
|
||||||
// that.setData({
|
|
||||||
// hasOrder: 1
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
that.setData({
|
that.setData({
|
||||||
allCount: count,
|
allCount: count,
|
||||||
allOrderList: that.data.allOrderList.concat(res.data.data),
|
allOrderList: that.data.allOrderList.concat(res.data.data),
|
||||||
@ -78,14 +69,11 @@ Page({
|
|||||||
orderList: that.data.allOrderList.concat(res.data.data)
|
orderList: that.data.allOrderList.concat(res.data.data)
|
||||||
});
|
});
|
||||||
let hasOrderData = that.data.allOrderList.concat(res.data.data);
|
let hasOrderData = that.data.allOrderList.concat(res.data.data);
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
that.setData({
|
that.setData({
|
||||||
hasOrder: 1
|
hasOrder: 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -94,9 +82,7 @@ Page({
|
|||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad: function() {
|
onLoad: function() {},
|
||||||
|
|
||||||
},
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
let showType = wx.getStorageSync('showType');
|
let showType = wx.getStorageSync('showType');
|
||||||
let nowShowType = this.data.showType;
|
let nowShowType = this.data.showType;
|
||||||
@ -113,13 +99,6 @@ Page({
|
|||||||
}
|
}
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
},
|
},
|
||||||
// onPullDownRefresh: function () {
|
|
||||||
// wx.showNavigationBarLoading()
|
|
||||||
// this.getOrderList();
|
|
||||||
// this.getOrderInfo();
|
|
||||||
// wx.hideNavigationBarLoading() //完成停止加载
|
|
||||||
// wx.stopPullDownRefresh() //停止下拉刷新
|
|
||||||
// },
|
|
||||||
switchTab: function(event) {
|
switchTab: function(event) {
|
||||||
let showType = event.currentTarget.dataset.index;
|
let showType = event.currentTarget.dataset.index;
|
||||||
wx.setStorageSync('showType', showType);
|
wx.setStorageSync('showType', showType);
|
||||||
@ -166,10 +145,8 @@ Page({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onReachBottom: function() {
|
onReachBottom: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
if (that.data.allCount / that.data.size < that.data.allPage) {
|
if (that.data.allCount / that.data.size < that.data.allPage) {
|
||||||
that.setData({
|
that.setData({
|
||||||
showTips: 1
|
showTips: 1
|
||||||
@ -181,5 +158,4 @@ Page({
|
|||||||
});
|
});
|
||||||
that.getOrderList();
|
that.getOrderList();
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -10,6 +10,7 @@ function payOrder(orderId) {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.errno === 0) {
|
if (res.errno === 0) {
|
||||||
const payParam = res.data;
|
const payParam = res.data;
|
||||||
|
console.log(res.data);
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
'timeStamp': payParam.timeStamp,
|
'timeStamp': payParam.timeStamp,
|
||||||
'nonceStr': payParam.nonceStr,
|
'nonceStr': payParam.nonceStr,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user