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

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

  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 || '',
      bg_color: getApp().page_bg
    })
  },
  // 返回首页
  handleBack() {
    wx.reLaunch({
      url: `/pages/index/index`
    })
  },
  // 重新拍照
  handleGoTakePhoto(){
    wx.reLaunch({
      url: `/pages/cameraTakePhoto/cameraTakePhoto`
    })
  },
  handleOpenVideo() {
    wx.navigateTo({
      url: '/pages/video/video',
    })
  },
  onReady() {

  },
  onShow() {

  },

})