From 74ffed31b9eb8599881013dd0c8564258e167f56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Fri, 13 Oct 2023 15:17:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E6=9C=8D=E5=8A=A1+=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E6=B3=A8=E5=86=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/pages/login/index.js | 4 +-
api/pages/myinformation/myinformation.js | 10 ++-
api/pagesB/AppIdentification/index.js | 5 +-
api/pagesB/ProjectDetails/index.js | 6 +-
api/pagesB/appointmenttime/appointmenttime.js | 15 +++-
api/pagesB/information/index.js | 10 ++-
api/pagesB/modify/modify.js | 8 +-
api/pagesB/modifyAddress/modifyAddress.js | 43 ++++++++--
api/pagesB/site/site.js | 5 +-
pages.json | 15 ++--
pages/login/login.vue | 81 ++++++++++---------
pagesB/ProjectDetails/ProjectDetails.vue | 24 +++---
pagesB/appointmenttime/appointmenttime.vue | 8 +-
pagesB/information/information.vue | 47 ++++++++++-
pagesB/modify/modify.scss | 75 ++++++++++++++++-
pagesB/modify/modify.vue | 64 ++++++++++++---
pagesB/modifyAddress/modifyAddress.vue | 4 +-
pagesB/nursestation/nursestation.vue | 36 +++++----
pagesB/orderlist/orderlist.vue | 3 +-
pagesB/screenorder/screenorder.vue | 3 +-
20 files changed, 351 insertions(+), 115 deletions(-)
diff --git a/api/pages/login/index.js b/api/pages/login/index.js
index 462a706..c908ab4 100644
--- a/api/pages/login/index.js
+++ b/api/pages/login/index.js
@@ -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'
})
}
\ No newline at end of file
diff --git a/api/pages/myinformation/myinformation.js b/api/pages/myinformation/myinformation.js
index b56ab9f..e118e16 100644
--- a/api/pages/myinformation/myinformation.js
+++ b/api/pages/myinformation/myinformation.js
@@ -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')
+ },
})
}
diff --git a/api/pagesB/AppIdentification/index.js b/api/pagesB/AppIdentification/index.js
index 462894d..b7cb10f 100644
--- a/api/pagesB/AppIdentification/index.js
+++ b/api/pagesB/AppIdentification/index.js
@@ -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')
+ },
})
}
diff --git a/api/pagesB/ProjectDetails/index.js b/api/pagesB/ProjectDetails/index.js
index 3598e24..a73d7f1 100644
--- a/api/pagesB/ProjectDetails/index.js
+++ b/api/pagesB/ProjectDetails/index.js
@@ -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')
+ },
+
})
}
diff --git a/api/pagesB/appointmenttime/appointmenttime.js b/api/pagesB/appointmenttime/appointmenttime.js
index 9066f35..bb35a0b 100644
--- a/api/pagesB/appointmenttime/appointmenttime.js
+++ b/api/pagesB/appointmenttime/appointmenttime.js
@@ -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')
+ },
})
}
// 小程序预约服务支付接口
diff --git a/api/pagesB/information/index.js b/api/pagesB/information/index.js
index 82e2d0f..127d16e 100644
--- a/api/pagesB/information/index.js
+++ b/api/pagesB/information/index.js
@@ -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')
+ },
})
}
diff --git a/api/pagesB/modify/modify.js b/api/pagesB/modify/modify.js
index b7050f7..8468e5d 100644
--- a/api/pagesB/modify/modify.js
+++ b/api/pagesB/modify/modify.js
@@ -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')
+ },
})
}
\ No newline at end of file
diff --git a/api/pagesB/modifyAddress/modifyAddress.js b/api/pagesB/modifyAddress/modifyAddress.js
index 226140e..85e62ca 100644
--- a/api/pagesB/modifyAddress/modifyAddress.js
+++ b/api/pagesB/modifyAddress/modifyAddress.js
@@ -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')
+ },
})
-}
+}
\ No newline at end of file
diff --git a/api/pagesB/site/site.js b/api/pagesB/site/site.js
index c11ed13..9efc60f 100644
--- a/api/pagesB/site/site.js
+++ b/api/pagesB/site/site.js
@@ -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')
+ },
})
}
diff --git a/pages.json b/pages.json
index 891e73b..69c7711 100644
--- a/pages.json
+++ b/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": {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index dbca6c6..8e28e81 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -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
diff --git a/pagesB/ProjectDetails/ProjectDetails.vue b/pagesB/ProjectDetails/ProjectDetails.vue
index 1c9b454..130b80e 100644
--- a/pagesB/ProjectDetails/ProjectDetails.vue
+++ b/pagesB/ProjectDetails/ProjectDetails.vue
@@ -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 @@
+
\ No newline at end of file
diff --git a/pagesB/appointmenttime/appointmenttime.vue b/pagesB/appointmenttime/appointmenttime.vue
index 6c2015b..f4f636b 100644
--- a/pagesB/appointmenttime/appointmenttime.vue
+++ b/pagesB/appointmenttime/appointmenttime.vue
@@ -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)}`
})
},
}
diff --git a/pagesB/information/information.vue b/pagesB/information/information.vue
index 26ecf1d..8f27a52 100644
--- a/pagesB/information/information.vue
+++ b/pagesB/information/information.vue
@@ -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();
diff --git a/pagesB/modify/modify.scss b/pagesB/modify/modify.scss
index d01fc8e..b67e6bd 100644
--- a/pagesB/modify/modify.scss
+++ b/pagesB/modify/modify.scss
@@ -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;
diff --git a/pagesB/modify/modify.vue b/pagesB/modify/modify.vue
index 34bbcf9..4b715b5 100644
--- a/pagesB/modify/modify.vue
+++ b/pagesB/modify/modify.vue
@@ -56,6 +56,13 @@
+
+ 基础疾病
+
+
+
+
@@ -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: '修改信息成功',
diff --git a/pagesB/modifyAddress/modifyAddress.vue b/pagesB/modifyAddress/modifyAddress.vue
index 5887a99..c67b413 100644
--- a/pagesB/modifyAddress/modifyAddress.vue
+++ b/pagesB/modifyAddress/modifyAddress.vue
@@ -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
diff --git a/pagesB/nursestation/nursestation.vue b/pagesB/nursestation/nursestation.vue
index 26c4899..15578ba 100644
--- a/pagesB/nursestation/nursestation.vue
+++ b/pagesB/nursestation/nursestation.vue
@@ -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: '未登录,请先登录',
diff --git a/pagesB/orderlist/orderlist.vue b/pagesB/orderlist/orderlist.vue
index e2cb9b9..9393acb 100644
--- a/pagesB/orderlist/orderlist.vue
+++ b/pagesB/orderlist/orderlist.vue
@@ -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
diff --git a/pagesB/screenorder/screenorder.vue b/pagesB/screenorder/screenorder.vue
index 133e351..140dd32 100644
--- a/pagesB/screenorder/screenorder.vue
+++ b/pagesB/screenorder/screenorder.vue
@@ -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]