authSetting.js 1.9 KB
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')

// var appInstance = getApp()

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    // auth: {
    //   type: Boolean,
    //   value: true,
    //   observer: function (newVal, oldVal) {
    //     this.getHeadImage()
    //   }
    // },
    // type: {
    //   type: Boolean,
    //   value: true
    // },
    // special: {
    //   type: Boolean,
    //   value: false
    // },
    // index: {
    //   type: Boolean,
    //   value: false
    // }
    agree: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    // auth: true,
    // type: true,
    // appLogo: '',
    // appName: '',
    // merchantName: '',
    // gender: 1
  },
  ready() {
    // this.getHeadImage()
  },
  /**
   * 组件的方法列表
   */
  methods: {
    choose() {
      this.setData({
        agree: !this.data.agree
      })
      this.triggerEvent('choose', this.data.agree)
    },
    jump(e) {
      console.log(e)
      let { url } = e.currentTarget.dataset
      const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
      const path = `${baseUrl}${url}.html`
      //   private user
      wx.navigateTo({
        url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
      })
      //   var globalData = appInstance.globalData.extConfig

      //   restapi.getMerchantBussiness(globalData.merchantId, function (res) {
      //     console.log(res);
      //     if (res.returnCode == '0') {
      //       let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
      //       wx.navigateTo({
      //           url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
      //         })
      //       }
      //   }, function (res) {
      //     console.log(res);
      //   })
    },
    noScroll() {}
  }
})