import request from '@/utils/request'

// 个人中心信息
export function getPersonalInfo() {
	return request({
		headers: {
			"isToken": true
		},
		url: "/h5/companion/staff/getStaffInfo",
		method: 'get'
	})
}

//获取openId
export function getOpenId(code) {
	return request({
		url: `/no-auth/wechat/getOpenId?code=${code}&sourceType=1`,
		method: 'get'
	})
}

//获取手机号
export function getPhoneNumber(data) {
	return request({
		url: `/applet/login/bindPhone`,
		method: 'post',
		data
	})
}

// 微信授权登录
export const wxLogin = (data) => {
	return request({
		url: `/applet/login/wechatLogin`,
		method: 'post',
		data
	})
}
// 字典
export function getDictList(type){
	return request({
	  url: `/h5/system/dict/data/type/${type}`,
	  method: 'get'
	})
}