import {request} from '../utils/request.js'
function auth(){  //鉴权
  return new Promise((resolve,reject)=>{
    wx.login({
      success(res){
        if(res.errMsg=="login:ok"){
          resolve(res.code)
       }else{
        wx.showToast({
          title:res.errMsg,
          icon:'error'
        })
       }
      },
      fail(err){
        reject(err)
      }
    })
  })
}

function homeData(data){
  return request('/patient/index','GET',data,true)
 
}
module.exports = {
  homeData,
  auth
}