1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- const _Http = getApp().globalData.http;
- Component({
- data: {
- steps: [],
- sa_logisticsid: 0,
- content: {
- nocache: true,
- pageNumber: 1,
- pageTotal: 1,
- total: null
- }
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- methods: {
- copyNum(e) {
- if (this.data.un) wx.setClipboardData({
- data: this.data.un,
- success: function (res) {
- getApp().globalData.Language.showToast('快递单号复制成功')
- }
- })
- },
- getList(id) {
- let content = this.data.content;
- content.sa_logisticsid = id;
- _Http.basic({
- "id": "20230110135004",
- content
- }).then(res => {
- console.log("物流查询", res)
- if (res.code != '1') return wx.showToast({
- title: JSON.parse(res.msg).message,
- icon: "none"
- })
- if (res.data.message) this.setData({
- steps: res.data.data.map(v => {
- return {
- text: v.time,
- desc: v.context
- }
- }),
- nu: res.data.nu,
- "content.total": 1,
- sa_logisticsid: id
- })
- })
- }
- }
- })
|