护理服务+登录注册
This commit is contained in:
parent
d11b8b6c07
commit
74ffed31b9
@ -22,9 +22,9 @@ export function getwxPhoneNumber(code) {
|
||||
}
|
||||
|
||||
// 判断是否注册
|
||||
export function isRegistered(code) {
|
||||
export function isRegistered(logincode,phonecode) {
|
||||
return request({
|
||||
url: `/applet/register/isRegistered/${code}`,
|
||||
url: `/applet/register/login/${logincode}/${phonecode}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
@ -2,7 +2,10 @@ import request from "../../request.js"
|
||||
export function appPersonal(patientId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -11,6 +14,9 @@ export function appPersonal(patientId) {
|
||||
export function inviteFriends(patientId) {
|
||||
return request({
|
||||
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
|
||||
method: 'post'
|
||||
method: 'post',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -4,7 +4,10 @@ import request from "../../request.js"
|
||||
export function AppIdentification(patientId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/AppIdentification?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,10 @@ import request from "../../request.js"
|
||||
export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
|
||||
return request({
|
||||
url: `/nurseApplet/login/getStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@ -3,21 +3,30 @@ import request from "../../request.js"
|
||||
export function getAppPatientList(id) {
|
||||
return request({
|
||||
url: `/nurseApp/login/getAppPatientList?patientId=${id}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
export function submitAppointment(data) {
|
||||
return request({
|
||||
url: `/nurseApplet/login/appointment`,
|
||||
method: 'post',
|
||||
data
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// 小程序预约服务支付接口
|
||||
|
||||
@ -4,7 +4,10 @@ import request from "../../request.js"
|
||||
export function getRegionAndStreetInfo() {
|
||||
return request({
|
||||
url: `/nurseApplet/login/getRegionAndStreetInfo`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -15,7 +18,10 @@ export function information(data) {
|
||||
return request({
|
||||
url: `/nurseApp/login/appInformation`,
|
||||
method: 'POST',
|
||||
data
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -6,12 +6,18 @@ export function updateInformation(data){
|
||||
url: '/nurseApp/login/updateInformation',
|
||||
method: 'POST',
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function appPersonal(patientId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -4,7 +4,10 @@ import request from "../../request.js"
|
||||
export function goodPatientInfo(patientId) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingStationGoods/goodPatientInfo?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// 新增基本信息
|
||||
@ -13,6 +16,9 @@ export function addnursingStation(data) {
|
||||
url: '/nurseApplet/nursingStationGoods/add',
|
||||
method: 'POST',
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -23,13 +29,19 @@ export function updatenursingStation(data) {
|
||||
url: '/nurseApplet/nursingStationGoods/edit',
|
||||
method: 'POST',
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// 修改反显
|
||||
export function nursingStationGoodsinfo(id) {
|
||||
return request({
|
||||
url: '/nurseApplet/nursingStationGoods/' + id,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -37,14 +49,20 @@ export function nursingStationGoodsinfo(id) {
|
||||
export function delnursingStation(id) {
|
||||
return request({
|
||||
url: '/nurseApplet/nursingStationGoods/' + id,
|
||||
method: 'delete'
|
||||
method: 'delete',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// 查询
|
||||
export function getSubordinate(areaCode) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// //区街道list
|
||||
@ -58,14 +76,20 @@ export function getSubordinate(areaCode) {
|
||||
export function getSubordinateRegions(areaCode) {
|
||||
return request({
|
||||
url: `/nurseApplet/login/getProvinceInfo?areaCode=${areaCode}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
//市区街道list
|
||||
export function getSubordinateInfo(id) {
|
||||
return request({
|
||||
url: `/nurseApplet/login/getSubordinateInfo?areaCode=${id}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -75,6 +99,9 @@ export function updateDefaultAddress(data) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`,
|
||||
method: 'POST',
|
||||
data
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,10 @@ export function nearbyList(pageSize, pageNum, longitude, latitude,ClassifyInfoId
|
||||
export function getPatientInfo(id) {
|
||||
return request({
|
||||
url: `/nurseApplet/login/getPatientInfo?patientId=${id}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
15
pages.json
15
pages.json
@ -3,19 +3,20 @@
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||
},
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
|
||||
{
|
||||
"path": "pages/homepage/homepage",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/startup/startup",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
},{
|
||||
"path": "pages/homepage/homepage",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/medicalservice/medicalservice",
|
||||
"style": {
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
getWeChatUser,
|
||||
isRegistered,
|
||||
} from '../../api/pages/login/index.js'
|
||||
import {
|
||||
getCurrentUser,
|
||||
} from '@/api/pages/homepage/homepage.js'
|
||||
import {
|
||||
createMobileToken
|
||||
} from '@/api/pages/login/index.js'
|
||||
@ -24,6 +27,8 @@
|
||||
logincode: undefined,
|
||||
code: undefined,
|
||||
timer: undefined,
|
||||
cityCode: '1',
|
||||
openid:'',
|
||||
// scenenurseStationId: undefined,
|
||||
};
|
||||
},
|
||||
@ -41,55 +46,59 @@
|
||||
wx.login({
|
||||
provider: 'weixin',
|
||||
success: function(loginRes) {
|
||||
that.code = loginRes.code
|
||||
that.login()
|
||||
that.logincode = loginRes.code
|
||||
that.login();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
login() {
|
||||
let that = this;
|
||||
getWeChatUser(that.code).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("openid", res.data)
|
||||
isRegistered(that.code).then(resp => {
|
||||
if (!resp.data) {
|
||||
// getWeChatUser(that.logincode).then(res => {
|
||||
// if (res.code == 200) {
|
||||
isRegistered(that.logincode, that.phonecode).then(resp => {
|
||||
uni.setStorageSync("openid", resp.data.openid)
|
||||
that.openid=resp.data.openid
|
||||
if (resp.data.code == '0') {
|
||||
that.$refs.uToast.show({
|
||||
title: '未注册,请先注册',
|
||||
type: 'error',
|
||||
duration: '1500',
|
||||
url: '/pages/register/register',
|
||||
})
|
||||
} else if (resp.data.code == '1') {
|
||||
that.cityCode = '1'
|
||||
console.log(that.openid)
|
||||
getCurrentUser(that.openid, that.cityCode).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '未注册,请先注册',
|
||||
type: 'error',
|
||||
duration: '1500',
|
||||
url: '/pages/register/register',
|
||||
title: '登录成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
} else {
|
||||
getCurrentUser(that.openid, that.region).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('userinfo', resp.data);
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
this.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
this.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
pwdlogin() {
|
||||
var that = this
|
||||
|
||||
@ -105,7 +105,8 @@
|
||||
this.swiperImglink.forEach(e => {
|
||||
e.image = baseurl + e.posterPictureUrl
|
||||
if (e.image == item) {
|
||||
if (e.jumpLink == '/pages/medicalservice/medicalservice' || e.jumpLink == '/pages/myinformation/myinformation') {
|
||||
if (e.jumpLink == '/pages/medicalservice/medicalservice' || e.jumpLink ==
|
||||
'/pages/myinformation/myinformation') {
|
||||
uni.switchTab({
|
||||
url: e.jumpLink
|
||||
})
|
||||
@ -155,22 +156,23 @@
|
||||
goappointments() {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
const value2 = uni.getStorageSync('userinfo');
|
||||
if (value && value2) {
|
||||
AppIdentification(value2).then(res => {
|
||||
const patientid = value2.id
|
||||
AppIdentification(patientid).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
if (that.nurseStationId == scenenurseStationId) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/hospitalcare/hospitalcare?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
// const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
// if (that.nurseStationId == scenenurseStationId) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pagesB/hospitalcare/hospitalcare?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
// })
|
||||
// } else {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
@ -245,4 +247,4 @@
|
||||
|
||||
<style lang="scss">
|
||||
@import './ProjectDetails.scss';
|
||||
</style>
|
||||
</style>
|
||||
@ -192,6 +192,7 @@
|
||||
onShow() {
|
||||
let that = this
|
||||
uni.$on('updata', function(data) {
|
||||
console.log(data.updata,'9')
|
||||
if (data.updata) {
|
||||
that.orderlist = JSON.parse(data.updata)
|
||||
}
|
||||
@ -206,6 +207,7 @@
|
||||
})
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options,'89')
|
||||
var that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
@ -234,9 +236,9 @@
|
||||
userinfo() {
|
||||
//取出patientId
|
||||
var that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value = uni.getStorageSync('userinfo');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
that.patientId = value.id
|
||||
//被护理人信息
|
||||
getAppPatientList(that.patientId).then(response => {
|
||||
if (response.data.disablingCondition == 'DISABLED') {
|
||||
@ -477,7 +479,7 @@
|
||||
checkboxGroupChange(e) {},
|
||||
goaddress() {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/modifyAddress/modifyAddress?updata=${JSON.stringify(this.orderlist)}`
|
||||
url: `/pagesB/modify/modify?updata=${JSON.stringify(this.orderlist)}`
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -105,7 +105,10 @@
|
||||
getNurseType,
|
||||
information
|
||||
} from '@/api/pagesB/information/index.js'
|
||||
import contenttext from '../../components/text.vue'
|
||||
import contenttext from '../../components/text.vue';
|
||||
import {
|
||||
appPersonal,
|
||||
} from '@/api/pages/myinformation/myinformation.js';
|
||||
import {
|
||||
getSubordinateRegions,
|
||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||
@ -349,10 +352,46 @@
|
||||
//进入界面加载
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
this.query.couponId = Number(options.couponId)
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value = uni.getStorageSync('userinfo');
|
||||
if (value) {
|
||||
that.query.patientId = value
|
||||
that.query.patientId = value.id
|
||||
}
|
||||
|
||||
if(options.updata){
|
||||
// this.baseurl = baseurl
|
||||
// var that = this
|
||||
const value = uni.getStorageSync('userinfo');
|
||||
if (value) {
|
||||
const patientid =value.id
|
||||
appPersonal(patientid).then(Response => {
|
||||
if (Response.code == 200) {
|
||||
that.query = Response.data
|
||||
Number(that.query.homeLatitude) > 0 ? that.query.homeLatitude = Number(
|
||||
that.query.homeLatitude) : that.query.homeLatitude = null
|
||||
Number(that.query.homeLongitude) > 0 ? that.query.homeLongitude =
|
||||
Number(that.query.homeLongitude) : that.query.homeLongitude = null
|
||||
if (that.query.headPictureUrl) {
|
||||
that.img = baseurl + that.query.headPictureUrl
|
||||
}
|
||||
if (that.query.sex == 'MALE') {
|
||||
that.query.sexname = '男';
|
||||
} else if (that.query.sex == 'FEMALE') {
|
||||
that.query.sexname = '女';
|
||||
}
|
||||
if (that.query.areaName) {
|
||||
that.address = that.query.areaName
|
||||
}
|
||||
} else if (Response.code == 9999) {} else {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {}
|
||||
// this.listinfo = JSON.parse(options.updata)
|
||||
// console.log(this.listinfo, '888')
|
||||
}else{
|
||||
this.query.couponId = Number(options.couponId)
|
||||
}
|
||||
this.areaInfo()
|
||||
this.getNurseTypeInfo();
|
||||
|
||||
@ -3,11 +3,83 @@
|
||||
width: 100%;
|
||||
color: #000000;
|
||||
padding: 15rpx 0 50rpx;
|
||||
|
||||
.name {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
position: relative;
|
||||
font-size: 30rpx;
|
||||
::v-deep .input input.data-v-2ee6bce8 {
|
||||
// position: relative;
|
||||
// background-color: red;
|
||||
// top: 50%;
|
||||
// transform: translateY(64%);
|
||||
// font-size: 30rpx;
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 50%;
|
||||
color:#000;
|
||||
width: 75%;
|
||||
transform: translateY(-50%);
|
||||
display: inline-block;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .u-drawer {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
// .name {
|
||||
// width: 94%;
|
||||
// margin: 0 auto;
|
||||
// height: 120rpx;
|
||||
// line-height: 120rpx;
|
||||
// border-bottom: 1rpx solid #D8D4D4;
|
||||
// position: relative;
|
||||
// font-size: 30rpx;
|
||||
|
||||
// ::v-deep .u-radio.data-v-643b3322 {
|
||||
// margin-top: 8rpx;
|
||||
// margin-left: 30rpx;
|
||||
|
||||
// }
|
||||
// ::v-deep .u-input {
|
||||
// width: 630rpx;
|
||||
// height: 63rpx;
|
||||
// background: #F6F6F6;
|
||||
// margin: 12rpx auto;
|
||||
// border: none;
|
||||
// border-radius: 5rpx;
|
||||
// }
|
||||
|
||||
// .select {
|
||||
// position: absolute;
|
||||
// left: 25%;
|
||||
// top: 50%;
|
||||
|
||||
// width: 75%;
|
||||
// transform: translateY(-50%);
|
||||
// display: inline-block;
|
||||
// height: 120rpx;
|
||||
// line-height: 120rpx;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// // ::v-deep .input input.data-v-2ee6bce8 {
|
||||
// // position: absolute;
|
||||
// // background-color: red;
|
||||
// // top: 50;
|
||||
// // transform: translateY(64%);
|
||||
// // font-size: 30rpx;
|
||||
// // }
|
||||
// }
|
||||
// }
|
||||
.Agreement {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
@ -186,6 +258,7 @@
|
||||
}
|
||||
::v-deep .u-radio{
|
||||
width: 150rpx !important;
|
||||
|
||||
}
|
||||
.address {
|
||||
position: absolute;
|
||||
|
||||
@ -56,6 +56,13 @@
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-else>
|
||||
</view>
|
||||
</view>
|
||||
<view class="name">
|
||||
<span>基础疾病</span>
|
||||
<view class="select">
|
||||
<ld-select :multiple="true" :list="options" label-key="label" value-key="value" placeholder="请选择"
|
||||
v-model="value2" @change="selectChange" @cancel="cancel" @confirm="confirm"></ld-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="radio-content">
|
||||
<view class="radio-right" @click='changeRadio'>
|
||||
@ -100,9 +107,6 @@
|
||||
import {
|
||||
getRegionAndStreetInfo
|
||||
} from '@/api/pagesB/information/index.js'
|
||||
import {
|
||||
information
|
||||
} from '@/api/pagesB/information/index.js'
|
||||
import contenttext from '../../components/text.vue'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
@ -112,6 +116,9 @@
|
||||
getSubordinateRegions,
|
||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||
import gkcity from "../../components/m-city/m-city.vue";
|
||||
import {
|
||||
registerdata
|
||||
} from '@/api/pages/register/register.js'
|
||||
export default {
|
||||
components: {
|
||||
contenttext,
|
||||
@ -127,6 +134,20 @@
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
value2: [],
|
||||
options: [{
|
||||
value: '1',
|
||||
label: '高血压'
|
||||
}, {
|
||||
value: '2',
|
||||
label: '高血糖'
|
||||
}, {
|
||||
value: '3',
|
||||
label: '高血脂'
|
||||
}, {
|
||||
value: '0',
|
||||
label: '无'
|
||||
}],
|
||||
timeshow: false, //出生日期
|
||||
sexlist: [{
|
||||
name: '男',
|
||||
@ -159,22 +180,31 @@
|
||||
homeLatitude: null,
|
||||
nurseTypeIdList: [],
|
||||
diseaseInfoList: [],
|
||||
diseaseList: [],
|
||||
headPictureUrl: '',
|
||||
birthDate: '',
|
||||
locationName: '',
|
||||
sex: '',
|
||||
cityCode: '1',
|
||||
},
|
||||
addresslength: null,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options, '555')
|
||||
this.areaInfo();
|
||||
this.baseurl = baseurl
|
||||
var that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value = uni.getStorageSync('userinfo');
|
||||
if (value) {
|
||||
appPersonal(value).then(Response => {
|
||||
const patientid = value.id
|
||||
appPersonal(patientid).then(Response => {
|
||||
if (Response.code == 200) {
|
||||
if (Response.data.sex == 'MALE') {
|
||||
that.appPersonallist.sex = '男';
|
||||
} else if (Response.data.sex == 'FEMALE') {
|
||||
that.appPersonallist.sex = '女';
|
||||
}
|
||||
that.appPersonallist = Response.data
|
||||
Number(that.appPersonallist.homeLatitude) > 0 ? that.appPersonallist.homeLatitude = Number(
|
||||
that.appPersonallist.homeLatitude) : that.appPersonallist.homeLatitude = null
|
||||
@ -183,11 +213,8 @@
|
||||
if (that.appPersonallist.headPictureUrl) {
|
||||
that.img = baseurl + that.appPersonallist.headPictureUrl
|
||||
}
|
||||
if (that.appPersonallist.sex == 'MALE') {
|
||||
that.appPersonallist.sex = '男';
|
||||
} else if (that.appPersonallist.sex == 'FEMALE') {
|
||||
that.appPersonallist.sex = '女';
|
||||
}
|
||||
console.log(Response)
|
||||
|
||||
if (that.appPersonallist.areaName) {
|
||||
that.address = that.appPersonallist.areaName
|
||||
}
|
||||
@ -200,6 +227,15 @@
|
||||
} else {}
|
||||
},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
this.appPersonallist.diseaseList = e.map(Number)
|
||||
console.log(e)
|
||||
},
|
||||
// 下拉框多选
|
||||
selectChange(val) {
|
||||
console.log(val);
|
||||
},
|
||||
cancel() {},
|
||||
//性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
@ -240,6 +276,7 @@
|
||||
//上传图片+提交信息
|
||||
data() {
|
||||
var that = this
|
||||
that.appPersonallist.openid = uni.getStorageSync('openid');
|
||||
if (that.appPersonallist.sex == '男') {
|
||||
that.appPersonallist.sex = 'MALE';
|
||||
} else if (that.appPersonallist.sex == '女') {
|
||||
@ -262,7 +299,9 @@
|
||||
timeout: 5000,
|
||||
success(res) {
|
||||
that.appPersonallist.headPictureUrl = JSON.parse(res.data).imgUrl
|
||||
information(that.appPersonallist).then(res => {
|
||||
that.appPersonallist.cityCode = '1'
|
||||
console.log(that.appPersonallist.sex,'4')
|
||||
registerdata(that.appPersonallist).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '修改信息成功',
|
||||
@ -288,7 +327,8 @@
|
||||
}
|
||||
})
|
||||
} else {
|
||||
information(that.appPersonallist).then(res => {
|
||||
that.appPersonallist.cityCode = '1'
|
||||
registerdata(that.appPersonallist).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '修改信息成功',
|
||||
|
||||
@ -216,9 +216,9 @@
|
||||
// 查询地址信息
|
||||
goodsList() {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value = uni.getStorageSync('userinfo');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
that.patientId = value.id
|
||||
goodPatientInfo(that.patientId).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.address = e.areaName + e.receiveAddress
|
||||
|
||||
@ -239,16 +239,17 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
let that = this
|
||||
this.nurseStationId = options.nurseStationId
|
||||
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
||||
if (options.scene) {
|
||||
createMobileToken().then(res => {
|
||||
uni.setStorageSync("token", res.data.token)
|
||||
})
|
||||
this.nurseStationId = decodeURIComponent(options.scene)
|
||||
uni.setStorageSync("scenenurseStationId", this.nurseStationId)
|
||||
}
|
||||
// if (options.scene) {
|
||||
// createMobileToken().then(res => {
|
||||
// uni.setStorageSync("token", res.data.token)
|
||||
// })
|
||||
// this.nurseStationId = decodeURIComponent(options.scene)
|
||||
// uni.setStorageSync("scenenurseStationId", this.nurseStationId)
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
//跳转swiper
|
||||
@ -327,14 +328,17 @@
|
||||
goappointments(item) {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
const patientId = uni.getStorageSync('patientId');
|
||||
if (value && patientId) {
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
if (that.list.nurseStationId == scenenurseStationId) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
const userinfo = uni.getStorageSync('userinfo');
|
||||
|
||||
const patientId =userinfo.id
|
||||
if (value && userinfo) {
|
||||
// const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
// if (that.list.nurseStationId == scenenurseStationId) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pagesB/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
// })
|
||||
// } else {
|
||||
console.log(item,'5656')
|
||||
AppIdentification(patientId).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
@ -353,7 +357,7 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
|
||||
@ -59,7 +59,8 @@
|
||||
// },
|
||||
methods: {
|
||||
getOrderList() {
|
||||
this.patientId = uni.getStorageSync('patientId');
|
||||
const value= uni.getStorageSync('userinfo');
|
||||
this.patientId =value.id
|
||||
getOrderList(this.patientId,this.pageNum,this.pageSize).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.pageList = res.rows
|
||||
|
||||
@ -293,7 +293,8 @@
|
||||
return
|
||||
}
|
||||
|
||||
this.formData.patientId = uni.getStorageSync('patientId');
|
||||
const value= uni.getStorageSync('userinfo');
|
||||
this.formData.patientId =value.id
|
||||
this.formData.identity = this.userInfo.cardNo
|
||||
this.formData.diseaseList = this.userInfo.diseaseList
|
||||
this.formData.applyStartTime = this.datetimerange[0]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user