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


//签到
export function signIn(patientId) {
	return request({
		url: `/nurseApplet/patientInfo/signIn?patientId=${patientId}&signInChannel=WECHAT_APPLET`,
		method: 'post',
		header: {
			Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}

//积分
export function selectPatientSignIn(patientId) {
	return request({
		url: `/nurseApplet/patientInfo/selectPatientSignIn?patientId=${patientId}`,
		method: 'get',
		header: {
			Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}

//可兑换商品
export function selectExchangeGoods(pageNum, pageSize) {
	return request({
		url: `/nurseApplet/patientInfo/selectExchangeGoods?pageNum=${pageNum}&pageSize=${pageSize}`,
		method: 'get',
		header: {
			Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}

//兑换
export function integralGoodsOrder(data) {
	return request({
		url: `/nurseApplet/patientInfo/integralGoodsOrder`,
		method: 'post',
		data,
		header: {
			Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
		},
	})
}
