// pages/process/order-check/index.js import Scene from '../../index/scene' import { getFactoryOrderInfo } from "../../../api/saas" const util = require('../../../utils/util') Scene({ /** * 页面的初始数据 */ data: { form: null }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { if(options.orderId){ this.fetchOrderInfo(options.orderId) } }, fetchOrderInfo(orderId){ wx.showLoading({ title: '正在获取', mask: true }) getFactoryOrderInfo(orderId).then(result => { wx.hideLoading() this.setData({ form: result.data }) }).catch(err => { wx.hideLoading() util.showToast(err) }) } })