xinelu-applet-ui/api/pages/myinformation/myinformation.js

71 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-09-22 11:30:57 +08:00
import request from "../../request.js"
2023-09-22 11:08:14 +08:00
export function appPersonal(patientId) {
return request({
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
2023-10-13 15:17:41 +08:00
method: 'GET',
header: {
2023-11-09 10:04:35 +08:00
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
region: uni.getStorageSync('region'),
2023-10-13 15:17:41 +08:00
},
2023-09-22 11:08:14 +08:00
})
}
//邀请
export function inviteFriends(patientId) {
return request({
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
2023-10-13 15:17:41 +08:00
method: 'post',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
2023-09-22 11:08:14 +08:00
})
}
2023-10-17 16:20:03 +08:00
// 获取已绑定家庭成员列表
2024-03-20 09:54:20 +08:00
export function getFamilyList(openid, patientCode) {
return request({
url: `/applet/register/switchResident/${openid}/${patientCode}`,
method: 'get',
})
2023-10-17 16:20:03 +08:00
}
// 添加家庭成员
export function registerdata(data) {
return request({
url: '/applet/register',
method: 'POST',
data: data
})
}
// 获取当前注册居民
2023-10-30 14:56:03 +08:00
export function getCurrentUser(openid) {
2023-10-17 16:20:03 +08:00
return request({
2023-10-30 14:56:03 +08:00
url: `/applet/register/getList/${openid}`,
2023-10-17 16:20:03 +08:00
method: 'GET',
header: {
2023-10-30 14:56:03 +08:00
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
2023-10-17 16:20:03 +08:00
},
})
}
// 切换
2024-03-20 09:54:20 +08:00
export function switchResident(openid, patientCode) {
2023-10-17 16:20:03 +08:00
return request({
url: `/applet/register/switchResident/${openid}/${patientCode}`,
method: 'GET',
header: {
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
})
}
2024-03-20 09:54:20 +08:00
//设置主账号
export function editPrimaryAccountFlag(data) {
return request({
url: `/applet/register/editPrimaryAccountFlag`,
method: 'put',
data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
})
}