import request from "../../request.js"

// 获取OpenId
export function getOpenId(code) {
	return request({
		url: `/applet/register/getOpenId/${code}`,
		method: 'GET',
		header: {
			// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}

// 获取当前注册居民
export function getCurrentUser(openid, cityCode) {
	return request({
		url: `/applet/register/getCurrentResident/${openid}/${cityCode}`,
		method: 'GET',
		header: {
			Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}
// 获取签约信息
export function detail(identity) {
	return request({
		url: `/applet/signinfo/detail/${identity}`,
		method: 'GET',
		header: {
			region: uni.getStorageSync('region'),
			// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}

//是否注册
export function checkSignApply(identity) {
	return request({
		url: `/applet/sign/apply/checkSignApply/${identity}`,
		method: 'GET',
		header: {
			region: uni.getStorageSync('region'),
		},
	})
}