新增退货流程
This commit is contained in:
@@ -13,6 +13,10 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
listsArr: [],
|
||||
page : { current: 1 }
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
/**
|
||||
@@ -27,9 +31,6 @@ Page({
|
||||
page : this.data.page.current
|
||||
}).then(res => {
|
||||
let { data, page } = res.data
|
||||
|
||||
console.log(data)
|
||||
|
||||
this.setData({
|
||||
listsArr : page.current == 1 ? data : this.data.listsArr.concat(data),
|
||||
page : res.data.page,
|
||||
@@ -40,11 +41,57 @@ Page({
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 申请售后
|
||||
* 寄回商品
|
||||
*/
|
||||
onAftersale(){
|
||||
onDeliver(e){
|
||||
let { no } = e.currentTarget.dataset
|
||||
wx.navigateTo({
|
||||
url: './aftersale/aftersale',
|
||||
url: "./deliver/deliver?no=" + no,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 取消售后
|
||||
*/
|
||||
onCancel(e){
|
||||
let { no } = e.currentTarget.dataset
|
||||
let index = this.data.listsArr.findIndex(val => val.refund_no == no )
|
||||
let atArr = this.data.listsArr
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.refund.refundsCancel(no).then(res => {
|
||||
wx.showToast({
|
||||
title: res.data,
|
||||
icon : 'none'
|
||||
})
|
||||
atArr.splice(index, 1)
|
||||
this.setData({
|
||||
listsArr: atArr
|
||||
})
|
||||
}).catch(err => { })
|
||||
},
|
||||
/**
|
||||
* 售后信息
|
||||
*/
|
||||
onInfo(e){
|
||||
let { no } = e.currentTarget.dataset
|
||||
wx.navigateTo({
|
||||
url: "./info/info?no=" + no,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let page = this.data.page
|
||||
if(page.has_more){
|
||||
page.current += 1
|
||||
this.setData({ page })
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user