护理服务+登录注册

This commit is contained in:
闫晓茹 2023-10-13 15:17:41 +08:00
parent d11b8b6c07
commit 74ffed31b9
20 changed files with 351 additions and 115 deletions

View File

@ -22,9 +22,9 @@ export function getwxPhoneNumber(code) {
} }
// 判断是否注册 // 判断是否注册
export function isRegistered(code) { export function isRegistered(logincode,phonecode) {
return request({ return request({
url: `/applet/register/isRegistered/${code}`, url: `/applet/register/login/${logincode}/${phonecode}`,
method: 'GET' method: 'GET'
}) })
} }

View File

@ -2,7 +2,10 @@ import request from "../../request.js"
export function appPersonal(patientId) { export function appPersonal(patientId) {
return request({ return request({
url: `/nurseApp/login/appPersonal?patientId=${patientId}`, 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) { export function inviteFriends(patientId) {
return request({ return request({
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`, url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
method: 'post' method: 'post',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -4,7 +4,10 @@ import request from "../../request.js"
export function AppIdentification(patientId) { export function AppIdentification(patientId) {
return request({ return request({
url: `/nurseApp/login/AppIdentification?patientId=${patientId}`, url: `/nurseApp/login/AppIdentification?patientId=${patientId}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -3,6 +3,10 @@ import request from "../../request.js"
export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) { export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
return request({ return request({
url: `/nurseApplet/login/getStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`, url: `/nurseApplet/login/getStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -3,21 +3,30 @@ import request from "../../request.js"
export function getAppPatientList(id) { export function getAppPatientList(id) {
return request({ return request({
url: `/nurseApp/login/getAppPatientList?patientId=${id}`, url: `/nurseApp/login/getAppPatientList?patientId=${id}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) { export function getAppStationItemInfo(stationId, stationItemId, stationItemPriceId) {
return request({ return request({
url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`, url: `/nurseApp/login/getAppStationItemInfo?stationId=${stationId}&stationItemId=${stationItemId}&stationItemPriceId=${stationItemPriceId}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
export function submitAppointment(data) { export function submitAppointment(data) {
return request({ return request({
url: `/nurseApplet/login/appointment`, url: `/nurseApplet/login/appointment`,
method: 'post', method: 'post',
data data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
// 小程序预约服务支付接口 // 小程序预约服务支付接口

View File

@ -4,7 +4,10 @@ import request from "../../request.js"
export function getRegionAndStreetInfo() { export function getRegionAndStreetInfo() {
return request({ return request({
url: `/nurseApplet/login/getRegionAndStreetInfo`, url: `/nurseApplet/login/getRegionAndStreetInfo`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
@ -15,7 +18,10 @@ export function information(data) {
return request({ return request({
url: `/nurseApp/login/appInformation`, url: `/nurseApp/login/appInformation`,
method: 'POST', method: 'POST',
data data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -6,12 +6,18 @@ export function updateInformation(data){
url: '/nurseApp/login/updateInformation', url: '/nurseApp/login/updateInformation',
method: 'POST', method: 'POST',
data, data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
export function appPersonal(patientId) { export function appPersonal(patientId) {
return request({ return request({
url: `/nurseApp/login/appPersonal?patientId=${patientId}`, url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -4,7 +4,10 @@ import request from "../../request.js"
export function goodPatientInfo(patientId) { export function goodPatientInfo(patientId) {
return request({ return request({
url: `/nurseApplet/nursingStationGoods/goodPatientInfo?patientId=${patientId}`, 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', url: '/nurseApplet/nursingStationGoods/add',
method: 'POST', method: 'POST',
data, data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
@ -23,13 +29,19 @@ export function updatenursingStation(data) {
url: '/nurseApplet/nursingStationGoods/edit', url: '/nurseApplet/nursingStationGoods/edit',
method: 'POST', method: 'POST',
data, data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
// 修改反显 // 修改反显
export function nursingStationGoodsinfo(id) { export function nursingStationGoodsinfo(id) {
return request({ return request({
url: '/nurseApplet/nursingStationGoods/' + id, 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) { export function delnursingStation(id) {
return request({ return request({
url: '/nurseApplet/nursingStationGoods/' + id, url: '/nurseApplet/nursingStationGoods/' + id,
method: 'delete' method: 'delete',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
// 查询 // 查询
export function getSubordinate(areaCode) { export function getSubordinate(areaCode) {
return request({ return request({
url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`, url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
// //区街道list // //区街道list
@ -58,14 +76,20 @@ export function getSubordinate(areaCode) {
export function getSubordinateRegions(areaCode) { export function getSubordinateRegions(areaCode) {
return request({ return request({
url: `/nurseApplet/login/getProvinceInfo?areaCode=${areaCode}`, url: `/nurseApplet/login/getProvinceInfo?areaCode=${areaCode}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }
//市区街道list //市区街道list
export function getSubordinateInfo(id) { export function getSubordinateInfo(id) {
return request({ return request({
url: `/nurseApplet/login/getSubordinateInfo?areaCode=${id}`, 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({ return request({
url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`, url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`,
method: 'POST', method: 'POST',
data data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -14,7 +14,10 @@ export function nearbyList(pageSize, pageNum, longitude, latitude,ClassifyInfoId
export function getPatientInfo(id) { export function getPatientInfo(id) {
return request({ return request({
url: `/nurseApplet/login/getPatientInfo?patientId=${id}`, url: `/nurseApplet/login/getPatientInfo?patientId=${id}`,
method: 'GET' method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
}) })
} }

View File

@ -3,19 +3,20 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/homepage/homepage",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/startup/startup", "path": "pages/startup/startup",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },{
"path": "pages/homepage/homepage",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{ {
"path": "pages/medicalservice/medicalservice", "path": "pages/medicalservice/medicalservice",
"style": { "style": {

View File

@ -14,6 +14,9 @@
getWeChatUser, getWeChatUser,
isRegistered, isRegistered,
} from '../../api/pages/login/index.js' } from '../../api/pages/login/index.js'
import {
getCurrentUser,
} from '@/api/pages/homepage/homepage.js'
import { import {
createMobileToken createMobileToken
} from '@/api/pages/login/index.js' } from '@/api/pages/login/index.js'
@ -24,6 +27,8 @@
logincode: undefined, logincode: undefined,
code: undefined, code: undefined,
timer: undefined, timer: undefined,
cityCode: '1',
openid:'',
// scenenurseStationId: undefined, // scenenurseStationId: undefined,
}; };
}, },
@ -41,55 +46,59 @@
wx.login({ wx.login({
provider: 'weixin', provider: 'weixin',
success: function(loginRes) { success: function(loginRes) {
that.code = loginRes.code that.logincode = loginRes.code
that.login() that.login();
} }
}); });
} }
}, },
login() { login() {
let that = this; let that = this;
getWeChatUser(that.code).then(res => { // getWeChatUser(that.logincode).then(res => {
if (res.code == 200) { // if (res.code == 200) {
uni.setStorageSync("openid", res.data) isRegistered(that.logincode, that.phonecode).then(resp => {
isRegistered(that.code).then(resp => { uni.setStorageSync("openid", resp.data.openid)
if (!resp.data) { 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({ that.$refs.uToast.show({
title: '未注册,请先注册', title: '登录成功',
type: 'error', type: 'success',
duration: '1500', duration: '1500'
url: '/pages/register/register',
}) })
} else { uni.setStorageSync('patientId', res.data.id);
getCurrentUser(that.openid, that.region).then(res => { uni.setStorageSync('userinfo', res.data);
if (res.code == 200) { if (this.timer) {
that.$refs.uToast.show({ clearTimeout(this.timer)
title: '登录成功', }
type: 'success', this.timer = setTimeout(e => {
duration: '1500' uni.navigateBack({
}) delta: 1
uni.setStorageSync('patientId', res.data.id); })
uni.setStorageSync('userinfo', resp.data); }, 500)
if (this.timer) { }
clearTimeout(this.timer) else {
} that.$refs.uToast.show({
this.timer = setTimeout(e => { title: '登录失败',
uni.navigateBack({ type: 'error',
delta: 1 duration: '1500'
})
}, 500)
} else {
that.$refs.uToast.show({
title: '登录失败',
type: 'error',
duration: '1500'
})
}
}) })
} }
}) })
} }
}) })
}, },
pwdlogin() { pwdlogin() {
var that = this var that = this

View File

@ -105,7 +105,8 @@
this.swiperImglink.forEach(e => { this.swiperImglink.forEach(e => {
e.image = baseurl + e.posterPictureUrl e.image = baseurl + e.posterPictureUrl
if (e.image == item) { 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({ uni.switchTab({
url: e.jumpLink url: e.jumpLink
}) })
@ -155,22 +156,23 @@
goappointments() { goappointments() {
let that = this let that = this
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('userinfo');
if (value && value2) { if (value && value2) {
AppIdentification(value2).then(res => { const patientid = value2.id
AppIdentification(patientid).then(res => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.loginFlag) { if (res.data.loginFlag) {
that.usershow = false that.usershow = false
const scenenurseStationId = uni.getStorageSync('scenenurseStationId'); // const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
if (that.nurseStationId == scenenurseStationId) { // if (that.nurseStationId == scenenurseStationId) {
uni.navigateTo({ // uni.navigateTo({
url: `/pagesB/hospitalcare/hospitalcare?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`, // url: `/pagesB/hospitalcare/hospitalcare?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
}) // })
} else { // } else {
uni.navigateTo({ uni.navigateTo({
url: `/pagesB/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`, url: `/pagesB/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
}) })
} // }
} else { } else {
that.usershow = true that.usershow = true
} }
@ -245,4 +247,4 @@
<style lang="scss"> <style lang="scss">
@import './ProjectDetails.scss'; @import './ProjectDetails.scss';
</style> </style>

View File

@ -192,6 +192,7 @@
onShow() { onShow() {
let that = this let that = this
uni.$on('updata', function(data) { uni.$on('updata', function(data) {
console.log(data.updata,'9')
if (data.updata) { if (data.updata) {
that.orderlist = JSON.parse(data.updata) that.orderlist = JSON.parse(data.updata)
} }
@ -206,6 +207,7 @@
}) })
}, },
onLoad(options) { onLoad(options) {
console.log(options,'89')
var that = this var that = this
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
if (value) { if (value) {
@ -234,9 +236,9 @@
userinfo() { userinfo() {
//patientId //patientId
var that = this var that = this
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('userinfo');
if (value) { if (value) {
that.patientId = value that.patientId = value.id
// //
getAppPatientList(that.patientId).then(response => { getAppPatientList(that.patientId).then(response => {
if (response.data.disablingCondition == 'DISABLED') { if (response.data.disablingCondition == 'DISABLED') {
@ -477,7 +479,7 @@
checkboxGroupChange(e) {}, checkboxGroupChange(e) {},
goaddress() { goaddress() {
uni.navigateTo({ uni.navigateTo({
url: `/pagesB/modifyAddress/modifyAddress?updata=${JSON.stringify(this.orderlist)}` url: `/pagesB/modify/modify?updata=${JSON.stringify(this.orderlist)}`
}) })
}, },
} }

View File

@ -105,7 +105,10 @@
getNurseType, getNurseType,
information information
} from '@/api/pagesB/information/index.js' } 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 { import {
getSubordinateRegions, getSubordinateRegions,
} from '@/api/pagesB/modifyAddress/modifyAddress.js'; } from '@/api/pagesB/modifyAddress/modifyAddress.js';
@ -349,10 +352,46 @@
// //
onLoad(options) { onLoad(options) {
let that = this let that = this
this.query.couponId = Number(options.couponId) const value = uni.getStorageSync('userinfo');
const value = uni.getStorageSync('patientId');
if (value) { 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.areaInfo()
this.getNurseTypeInfo(); this.getNurseTypeInfo();

View File

@ -3,11 +3,83 @@
width: 100%; width: 100%;
color: #000000; color: #000000;
padding: 15rpx 0 50rpx; 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 { /deep/ .u-drawer {
z-index: 0 !important; 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 { .Agreement {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
@ -186,6 +258,7 @@
} }
::v-deep .u-radio{ ::v-deep .u-radio{
width: 150rpx !important; width: 150rpx !important;
} }
.address { .address {
position: absolute; position: absolute;

View File

@ -56,6 +56,13 @@
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-else> <view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-else>
</view> </view>
</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>
<view class="radio-content"> <view class="radio-content">
<view class="radio-right" @click='changeRadio'> <view class="radio-right" @click='changeRadio'>
@ -100,9 +107,6 @@
import { import {
getRegionAndStreetInfo getRegionAndStreetInfo
} from '@/api/pagesB/information/index.js' } from '@/api/pagesB/information/index.js'
import {
information
} from '@/api/pagesB/information/index.js'
import contenttext from '../../components/text.vue' import contenttext from '../../components/text.vue'
import baseurl from '@/api/baseurl.js' import baseurl from '@/api/baseurl.js'
import { import {
@ -112,6 +116,9 @@
getSubordinateRegions, getSubordinateRegions,
} from '@/api/pagesB/modifyAddress/modifyAddress.js'; } from '@/api/pagesB/modifyAddress/modifyAddress.js';
import gkcity from "../../components/m-city/m-city.vue"; import gkcity from "../../components/m-city/m-city.vue";
import {
registerdata
} from '@/api/pages/register/register.js'
export default { export default {
components: { components: {
contenttext, contenttext,
@ -127,6 +134,20 @@
minute: false, minute: false,
second: false second: false
}, },
value2: [],
options: [{
value: '1',
label: '高血压'
}, {
value: '2',
label: '高血糖'
}, {
value: '3',
label: '高血脂'
}, {
value: '0',
label: '无'
}],
timeshow: false, // timeshow: false, //
sexlist: [{ sexlist: [{
name: '男', name: '男',
@ -159,22 +180,31 @@
homeLatitude: null, homeLatitude: null,
nurseTypeIdList: [], nurseTypeIdList: [],
diseaseInfoList: [], diseaseInfoList: [],
diseaseList: [],
headPictureUrl: '', headPictureUrl: '',
birthDate: '', birthDate: '',
locationName: '', locationName: '',
sex: '', sex: '',
cityCode: '1',
}, },
addresslength: null, addresslength: null,
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options, '555')
this.areaInfo(); this.areaInfo();
this.baseurl = baseurl this.baseurl = baseurl
var that = this var that = this
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('userinfo');
if (value) { if (value) {
appPersonal(value).then(Response => { const patientid = value.id
appPersonal(patientid).then(Response => {
if (Response.code == 200) { 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 that.appPersonallist = Response.data
Number(that.appPersonallist.homeLatitude) > 0 ? that.appPersonallist.homeLatitude = Number( Number(that.appPersonallist.homeLatitude) > 0 ? that.appPersonallist.homeLatitude = Number(
that.appPersonallist.homeLatitude) : that.appPersonallist.homeLatitude = null that.appPersonallist.homeLatitude) : that.appPersonallist.homeLatitude = null
@ -183,11 +213,8 @@
if (that.appPersonallist.headPictureUrl) { if (that.appPersonallist.headPictureUrl) {
that.img = baseurl + that.appPersonallist.headPictureUrl that.img = baseurl + that.appPersonallist.headPictureUrl
} }
if (that.appPersonallist.sex == 'MALE') { console.log(Response)
that.appPersonallist.sex = '男';
} else if (that.appPersonallist.sex == 'FEMALE') {
that.appPersonallist.sex = '女';
}
if (that.appPersonallist.areaName) { if (that.appPersonallist.areaName) {
that.address = that.appPersonallist.areaName that.address = that.appPersonallist.areaName
} }
@ -200,6 +227,15 @@
} else {} } else {}
}, },
methods: { methods: {
confirm(e) {
this.appPersonallist.diseaseList = e.map(Number)
console.log(e)
},
//
selectChange(val) {
console.log(val);
},
cancel() {},
// //
sexchange(e) { sexchange(e) {
if (e == '男') { if (e == '男') {
@ -240,6 +276,7 @@
//+ //+
data() { data() {
var that = this var that = this
that.appPersonallist.openid = uni.getStorageSync('openid');
if (that.appPersonallist.sex == '男') { if (that.appPersonallist.sex == '男') {
that.appPersonallist.sex = 'MALE'; that.appPersonallist.sex = 'MALE';
} else if (that.appPersonallist.sex == '女') { } else if (that.appPersonallist.sex == '女') {
@ -262,7 +299,9 @@
timeout: 5000, timeout: 5000,
success(res) { success(res) {
that.appPersonallist.headPictureUrl = JSON.parse(res.data).imgUrl 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) { if (res.code == 200) {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '修改信息成功', title: '修改信息成功',
@ -288,7 +327,8 @@
} }
}) })
} else { } else {
information(that.appPersonallist).then(res => { that.appPersonallist.cityCode = '1'
registerdata(that.appPersonallist).then(res => {
if (res.code == 200) { if (res.code == 200) {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '修改信息成功', title: '修改信息成功',

View File

@ -216,9 +216,9 @@
// //
goodsList() { goodsList() {
let that = this let that = this
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('userinfo');
if (value) { if (value) {
that.patientId = value that.patientId = value.id
goodPatientInfo(that.patientId).then(res => { goodPatientInfo(that.patientId).then(res => {
res.data.forEach(e => { res.data.forEach(e => {
e.address = e.areaName + e.receiveAddress e.address = e.areaName + e.receiveAddress

View File

@ -239,16 +239,17 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
let that = this let that = this
this.nurseStationId = options.nurseStationId this.nurseStationId = options.nurseStationId
// scene 使 decodeURIComponent scene // scene 使 decodeURIComponent scene
if (options.scene) { // if (options.scene) {
createMobileToken().then(res => { // createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token) // uni.setStorageSync("token", res.data.token)
}) // })
this.nurseStationId = decodeURIComponent(options.scene) // this.nurseStationId = decodeURIComponent(options.scene)
uni.setStorageSync("scenenurseStationId", this.nurseStationId) // uni.setStorageSync("scenenurseStationId", this.nurseStationId)
} // }
}, },
methods: { methods: {
//swiper //swiper
@ -327,14 +328,17 @@
goappointments(item) { goappointments(item) {
let that = this let that = this
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const patientId = uni.getStorageSync('patientId'); const userinfo = uni.getStorageSync('userinfo');
if (value && patientId) {
const scenenurseStationId = uni.getStorageSync('scenenurseStationId'); const patientId =userinfo.id
if (that.list.nurseStationId == scenenurseStationId) { if (value && userinfo) {
uni.navigateTo({ // const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
url: `/pagesB/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`, // if (that.list.nurseStationId == scenenurseStationId) {
}) // uni.navigateTo({
} else { // url: `/pagesB/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
// })
// } else {
console.log(item,'5656')
AppIdentification(patientId).then(res => { AppIdentification(patientId).then(res => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.loginFlag) { if (res.data.loginFlag) {
@ -353,7 +357,7 @@
}) })
} }
}) })
} // }
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '未登录,请先登录', title: '未登录,请先登录',

View File

@ -59,7 +59,8 @@
// }, // },
methods: { methods: {
getOrderList() { getOrderList() {
this.patientId = uni.getStorageSync('patientId'); const value= uni.getStorageSync('userinfo');
this.patientId =value.id
getOrderList(this.patientId,this.pageNum,this.pageSize).then(res => { getOrderList(this.patientId,this.pageNum,this.pageSize).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.pageList = res.rows this.pageList = res.rows

View File

@ -293,7 +293,8 @@
return 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.identity = this.userInfo.cardNo
this.formData.diseaseList = this.userInfo.diseaseList this.formData.diseaseList = this.userInfo.diseaseList
this.formData.applyStartTime = this.datetimerange[0] this.formData.applyStartTime = this.datetimerange[0]