[订单拆分,周五福利添加配送方式]
This commit is contained in:
@@ -5,9 +5,10 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
stateType : 'all', //状态
|
||||
counts : '', //数量
|
||||
orderArr : [], //列表
|
||||
orderType : '', //订单来源
|
||||
stateType : 'all', //状态
|
||||
counts : '', //数量
|
||||
orderArr : [], //列表
|
||||
page : {}, //下一页
|
||||
lodingStats : false, //加载状态
|
||||
pay : {
|
||||
@@ -22,6 +23,7 @@ Page({
|
||||
*/
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
orderType: options.orderType,
|
||||
stateType: options.stateType
|
||||
})
|
||||
},
|
||||
@@ -35,7 +37,12 @@ Page({
|
||||
* 商品活动订单
|
||||
*/
|
||||
orderInfo(page) {
|
||||
wx.$api.exchange.index(this.data.stateType, page).then(res=>{
|
||||
let url = ''
|
||||
if(this.data.orderType == 'welfare') url = wx.$api.exchange.welfare
|
||||
if(this.data.orderType == 'welfareGoods') url = wx.$api.exchange.welfareCoupons
|
||||
if(this.data.orderType == 'rights') url = wx.$api.exchange.orders
|
||||
if(this.data.orderType == 'rightsCoupons') url = wx.$api.exchange.ordersCoupons
|
||||
url(this.data.stateType, page).then(res=>{
|
||||
let listArr = this.data.orderArr,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
@@ -79,7 +86,11 @@ Page({
|
||||
content : '确认取消吗?',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.exchange.cancel(orderId).then(res=>{
|
||||
let url = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') url = wx.$api.exchange.welfaresCancel
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') url = wx.$api.exchange.cancel
|
||||
|
||||
url(orderId).then(res=>{
|
||||
// 获取商品活动订单
|
||||
this.orderInfo()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user