// pages/result/result.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    aiState: 0, //展示成功或失败页面,
    time1: '', //本次认证时间
    time2: '', //认证耗时
    bg_color: '',
    Labeldiff: 0,//展示码不同页面
  },

  onLoad(options) {
    const { aiState, time1, time2, Labeldiff } = options
    console.log(options, time1)
    console.log('options.Labeldiff', options.Labeldiff)
    this.setData({
      aiState: aiState || 0,
      time1: time1 || '',
      time2: (time2 && (new Date().getTime() - time2) / 100) || '',
      bg_color: getApp().page_bg,
      Labeldiff: Labeldiff || 0
    })
  },
  // 返回首页
  handleBack() {
    wx.reLaunch({
      url: `/pages/index/index`
    })
  },
  // 重新拍照
  handleGoTakePhoto() {
    wx.reLaunch({
      url: `/pages/cameraTakePhoto/cameraTakePhoto`
    })
  },
  handleOpenVideo() {
    wx.navigateTo({
      url: '/pages/video/video'
    })
  },
  onReady() {},
  onShow() {}
})
