// pages/result/result.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    aiState: 0, //展示成功或失败页面,
    time1: '', //本次认证时间
    time2: '' //认证耗时
  },

  onLoad(options) {
    const {
      aiState,
      time1,
      time2
    } = options
    console.log(options,time1);
    this.setData({
      aiState: aiState || 0,
      time1: time1 || '',
      time2: time2 && (new Date().getTime() - time2) / 1000 || ''
    })
  },
  // 返回首页
  handleBack() {
    wx.reLaunch({
      url: `/pages/index/index`
    })
  },
  // 重新拍照
  handleGoTakePhoto(){
    wx.reLaunch({
      url: `/pages/cameraTakePhoto/cameraTakePhoto`
    })
  },

  onReady() {

  },
  onShow() {

  },

})