miniprogram/pages/order-details/doing.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//const wxbarcode = require('wxbarcode')
const AUTH = require('../../utils/auth')
const APP = getApp()
APP.configLoadOK = () => {

}
Page({
  data: {
    apiOk: false,
    isLogined: true
  },
  onLoad: function (options) {
    
  },
  onShow: function () {
    AUTH.checkHasLogined().then(isLogined => {
      this.setData({
        isLogined
      })
      if (isLogined) {
        this.orderList();
      }
    })
  },
  toIndexPage: function() {
    wx.switchTab({
      url: "/pages/order/index"
    });
  },
  async orderList() {
    wx.showLoading({
      title: '',
    })
    const res = await WXAPI.orderList({
      token: wx.getStorageSync('token'),
      type: 0,
      statusBatch: '1,2'
    })
    wx.hideLoading()
    if (res.code == 0) {
      this.setData({
        orderList: res.data.orderList,
        logisticsMap: res.data.logisticsMap,
        goodsMap: res.data.goodsMap,
        apiOk: true
      })
      wxbarcode.qrcode('qrcode_0', res.data.orderList[0].hxNumber, 400, 400);
    } else {
      this.setData({
        orderList: null,
        logisticsMap: null,
        goodsMap: null,
        apiOk: true
      })
    }
  },
  bindchange(e) {
    const index = e.detail.current
    const hxNumber = this.data.orderList[index].hxNumber
    if (!hxNumber) {
后面还有 5 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。