新增退货流程

This commit is contained in:
唐明明
2023-08-29 13:53:48 +08:00
parent 308aeeafb5
commit 510cbeb181
17 changed files with 404 additions and 13 deletions

View File

@@ -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()
}
}
})