123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- // pages/sorting/enternext/enternext.js
- const app =getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- id: 0,
- status: 0,
- iserr: false
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- if(options.status){
- this.setData({status: options.status})
- if(this.data.status!=0){
- this.setData({iserr: true})
- }
- console.log(this.data.status)
- }
- this.setData({id: options.id})
-
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- signerr(){
- let that = this
- app.api.useApi(app.globalData.baseAppUrl + "api/admin/sorting/entry/add_abnormal", {
- id: that.data.id,
- }, "post").then(function (res) {
- console.log(res);
- if (res.code != 200) {
- wx.showLoading({
- title: res.message.msg,
- })
- setTimeout(function () {
- wx.hideLoading();
- }, 1000);
-
- } else {
- wx.hideLoading();
- wx.showLoading({
- title: res.message.msg,
- })
- setTimeout(function () {
- wx.hideLoading();
- }, 1000);
- that.setData({iserr:true})
- }
- }).catch(function (err) {
-
- console.log(222);
- })
- },
- goback(e){
- let num = e.currentTarget.dataset.num
- wx.navigateBack({
- delta: num,
- })
- },
- goindex(){
- wx.switchTab({
- url: '/pages/tabber/home/index',
- })
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|