You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
858 B
44 lines
858 B
var util = require('../../../utils/util.js');
|
|
var api = require('../../../config/api.js');
|
|
var app = getApp();
|
|
|
|
Page({
|
|
data: {
|
|
orderId: 1,
|
|
expressInfo: {},
|
|
expressTraces: []
|
|
},
|
|
onLoad: function (options) {
|
|
this.setData({
|
|
orderId: options.id
|
|
});
|
|
this.getExpressInfo();
|
|
},
|
|
onReady: function () {
|
|
// 页面渲染完成
|
|
},
|
|
onShow: function () {
|
|
// 页面显示
|
|
|
|
},
|
|
getExpressInfo() {
|
|
let that = this;
|
|
util.request(api.OrderExpress, { orderId: that.data.orderId }).then(function (res) {
|
|
if (res.errno === 0) {
|
|
that.setData({
|
|
expressInfo: res.data,
|
|
expressTraces: res.data.traces
|
|
});
|
|
}
|
|
});
|
|
},
|
|
updateExpress() {
|
|
this.getExpressInfo();
|
|
},
|
|
onHide: function () {
|
|
// 页面隐藏
|
|
},
|
|
onUnload: function () {
|
|
// 页面关闭
|
|
}
|
|
}) |