verify_info.js 1.5 KB
// pages/main/verify/verify_info.js
Page({

  /**
   * Page initial data
   */
  data: {
    is_foreigner:false,
    btn_text:"下一步",
    info_steps: [
      {
        label: '身份信息',
        status: 'success'
      }, {
        label: '上传证件照',
        status: 'circle'
      }
    ],
  },

  /**
   * Lifecycle function--Called when page load
   */
  onLoad: function (options) {
    console.log("options",options);
    this.setData({
      is_foreigner:options.foreigner,
      btn_text:"true"==options.foreigner?"提交":"下一步"
    })
  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady: function () {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow: function () {

  },

  gonext:function(){
    if(this.data.is_foreigner){
        wx.showToast({
          title: '提交成功',
          icon: "none",
          duration: 2000
        })
        wx.navigateBack({})
    }else{
      wx.navigateTo({
        url: 'verify_result/verify_result',
      })
    }
  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide: function () {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload: function () {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh: function () {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom: function () {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage: function () {

  }
})