Files
xuan_wechat/pages/refund/info/info.js
2023-08-29 13:53:48 +08:00

44 lines
972 B
JavaScript

Page({
/**
* 页面的初始数据
*/
data: {
state : null,
refund_total: '0.00',
refund_no : null,
source : null,
title : null,
created_at : '',
items : []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.onInfo(options.no)
},
/**
* 获取服务单详情
*/
onInfo(no){
wx.showLoading({
title: '加载中...',
mask : true
})
wx.$api.refund.info(no).then(res => {
let { state, refund_total, refund_no, source, title, created_at, items } = res.data;
this.setData({
state,
refund_total,
refund_no,
source,
title,
created_at,
items
})
wx.hideLoading()
}).catch(err => {})
}
})