// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    sku_pic:'/pages/image/tuiguang_bj.png',
    beijing:'/pages/image/tuiguang_i.png',
    motto: 'Hello World',
    title: '你好，\n欢迎来到蜜芽商户端',
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    canIUseGetUserProfile: false,
    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') ,// 如需尝试获取用户信息可改为false

    regFlag:false,
    input_phone: '13511112222',
   // input_phone: '18133922183',
    input_password: '123456',

    name:'',
    phone:'',
    hangye:''
  },
  back(){
    wx.navigateBack()
},
  /**
   * 推广用户的二维码和赏金数据
   */
  onLoad: function (options) {
  this.applyExtension()
  },
applyExtension: function () {
    var that = this;
    wx.request({
        url: app.buildUrl("/app/Goddesswechat/getExtensionInfor"),
        header: app.getRequestHeader(),
        method:'POST',
        data: {
          version_number: app.globalData.version_number,
          uid:wx.getStorageSync('uid'),
          token:wx.getStorageSync('token'),  
        },
        success: function (res) {
            var resp = res.data;
            console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
            if(resp.erro==0){
              that.setData({
                infro:resp.infro
              })  
            }
        }
    });              
  },
  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
})
