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

Page({
  data: {
    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()
},
  goToIndex: function () {
    var that = this;
    wx.request({
        url: app.buildUrl("/app/Goddesswechat/applyExtension"),
        header: app.getRequestHeader(),
        method:'POST',
        data: {
          version_number: app.globalData.version_number,
          uid:wx.getStorageSync('uid'),
          token:wx.getStorageSync('token'),
          name:that.data.name,
          phone:that.data.phone,    
          industry:that.data.hangye      
        },
        success: function (res) {
            var resp = res.data;
            console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
            if(resp.erro==0){
              wx.showToast({ title: resp.msg, icon: 'none' });
              that.setData({
               
                
            });
            }
        }
    });              
  },
  // 事件处理函数
  bindViewTap() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
})
