This commit is contained in:
shidongli 2023-11-09 15:58:45 +08:00
parent e550435756
commit 22eae82d6f
4 changed files with 97 additions and 111 deletions

View File

@ -4,7 +4,9 @@ export function getAppletOrderList(parentId,orderStatus,cardNo,region,pageNum,pa
url: `/nurseApplet/nursingOrder/getAppletOrderList?parentId=${parentId}&orderStatus=${orderStatus}&cardNo=${cardNo}&region=${region}&pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
region: uni.getStorageSync('region'),
},
})

View File

@ -8,6 +8,8 @@ export function surveylist(data) {
data,
header: {
region: uni.getStorageSync('region'),
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
})
}
}

View File

@ -88,10 +88,7 @@
data() {
return {
patientName: '',
userinfo: {
cityCode: "",
},
userinfo: null,
region: '',
checkSign: null,
address: '',
@ -103,9 +100,11 @@
},
onShow() {
this.address = uni.getStorageSync('location')
this.userinfo = uni.getStorageSync('userinfo')
this.openid = uni.getStorageSync('openid');
this.cityCode = this.userinfo.cityCode;
if (uni.getStorageSync('userinfo')) {
this.userinfo = uni.getStorageSync('userinfo')
this.cityCode = this.userinfo.cityCode;
}
if (this.address == '德州市') {
uni.setStorageSync("region", 1)
} else if (this.address == '东营市') {
@ -114,12 +113,12 @@
uni.setStorageSync("region", 3)
}
this.region = uni.getStorageSync('region')
if (this.userinfo && this.region!="3") {
if (this.userinfo && this.region != "3") {
this.patientName = this.userinfo.patientName
checkSignApply(this.userinfo.cardNo).then(res => {
if(res.data){
this.checkSign=res.data.code
this.info=res.data.info
if (res.data) {
this.checkSign = res.data.code
this.info = res.data.info
}
// if (res.data.code == 0) {
@ -174,14 +173,14 @@
this.family()
} else {
if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign=="0") {
if (this.checkSign == "0") {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else if(this.checkSign=="01"){
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
@ -189,8 +188,7 @@
})
}
else {
} else {
uni.navigateTo({
url: "/pagesB/mysigning/mysigning"
})
@ -214,15 +212,14 @@
this.family()
} else {
if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign=="0") {
if (this.checkSign == "0") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
}
else if(this.checkSign=="01"){
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
@ -230,8 +227,7 @@
})
}
else if(this.checkSign=="01"){
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
@ -239,8 +235,7 @@
})
}
else {
} else {
uni.navigateTo({
url: '/pagesB/Behaviorpoints/Behaviorpoints'
})
@ -314,34 +309,32 @@
// if (this.region == "3") {
// this.family()
// } else {
// if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign=="0") {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
}
else if(this.checkSign=="01"){
this.$refs.uToast.show({
title: this.info,
type: 'error',
duration: '2000',
// if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign == "0") {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
duration: '2000',
})
})
}
else {
uni.navigateTo({
url: "/pagesC/ServiceAppointment/ServiceAppointment"
})
}
} else {
uni.navigateTo({
url: "/pagesC/ServiceAppointment/ServiceAppointment"
})
}
// } else {
// this.family()
// } else {
// this.family()
// }
// }
// }
// }
@ -362,15 +355,14 @@
this.family()
} else {
if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign=="0") {
if (this.checkSign == "0") {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
}
else if(this.checkSign=="01"){
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
@ -378,7 +370,7 @@
})
}else{
} else {
uni.navigateTo({
url: "/pagesC/servicerecord/servicerecord"
})
@ -404,15 +396,14 @@
this.family()
} else {
if (this.cityCode == "1" || this.cityCode == "2") {
if (this.checkSign=="0") {
if (this.checkSign == "0") {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
}
else if(this.checkSign=="01"){
} else if (this.checkSign == "01") {
this.$refs.uToast.show({
title: this.info,
type: 'error',
@ -420,8 +411,7 @@
})
}
else {
} else {
uni.navigateTo({
url: "/pagesC/Myappointment/Myappointment"
})

View File

@ -11,13 +11,10 @@
<image :src="baseurl+appPersonallist.headPictureUrl" mode="" class="headsculpture" @tap='updatainfo' v-else>
</image>
<view class="namesigning">
<span class="name" v-if="appPersonallist.patientName">
{{appPersonallist.patientName}}
<span class="name">
{{appPersonallist.patientName?appPersonallist.patientName:'请先登录!'}}
</span>
<span class="name" v-else>
请先登录!
</span>
<span class="" v-if="appPersonallist.patientName">
<span class="" v-show="appPersonallist.patientName">
<span class="signing" v-if="appPersonallist.signNo">
已签约
</span>
@ -56,7 +53,8 @@
</view>
</view>
<view class="item" @tap='gocoupon'>
<view class="number" v-if="appPersonallist.patientCouponCount==0 ||appPersonallist.patientCouponCount==undefined">
<view class="number"
v-if="appPersonallist.patientCouponCount==0 ||appPersonallist.patientCouponCount==undefined">
0
</view>
<view class="number" v-else>
@ -240,22 +238,15 @@
showhome: false, //
familyList: null, //
userinfo: {}, //
valueopenid: '',
cityCode: '',
};
},
onShow() {
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
let that = this
this.userinfo = uni.getStorageSync('userinfo')
this.baseurl = baseurl
this.valueopenid = uni.getStorageSync('openid');
this.cityCode = uni.getStorageSync('region');
if (that.userinfo) {
that.myInfo()
} else {
that.appPersonallist = null
}
this.myInfo()
this.getpersnoal()
},
methods: {
@ -281,9 +272,6 @@
type: 'success',
duration: '1000'
})
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
})
if (that.timer) {
clearTimeout(that.timer)
}
@ -305,31 +293,39 @@
},
//
getpersnoal() {
getCurrentUser(this.valueopenid).then(res => {
this.familyList = res.data
})
const value = uni.getStorageSync('openid');
if (value) {
getCurrentUser(value).then(res => {
this.familyList = res.data
})
}
},
//
changeFamilyInfo(e) {
switchResident(this.valueopenid, e.patientCode).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '切换成功',
type: 'success',
duration: '1000',
})
const value = uni.getStorageSync('openid');
if (value) {
switchResident(value, e.patientCode).then(res => {
uni.setStorageSync('userinfo', res.data);
uni.setStorageSync('patientId', res.data.id);
this.myInfo()
} else {
this.$refs.uToast.show({
title: res.msg,
type: 'error',
duration: '1000',
})
}
})
this.showhome = false
this.userinfo =res.data
if (res.code == 200) {
this.$refs.uToast.show({
title: '切换成功',
type: 'success',
duration: '1000',
})
this.myInfo()
} else {
this.$refs.uToast.show({
title: res.msg,
type: 'error',
duration: '1000',
})
}
})
this.showhome = false
}
},
removes() {
this.appPersonallist = null
@ -337,7 +333,6 @@
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('userinfo');
uni.removeStorageSync('token');
},
//
myInfo() {
@ -358,7 +353,7 @@
.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist
.homeLongitude)
} else if (Response.code == 9999) {} else {
} else {
that.removes();
}
})
@ -371,7 +366,7 @@
}
},
updatainfo() {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
@ -383,7 +378,7 @@
},
//
gonursestation() {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
@ -417,7 +412,7 @@
},
//
gocoupon() {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
@ -435,7 +430,7 @@
},
//
goorder(index, item) {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
@ -455,7 +450,7 @@
},
//
gonursestation() {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
@ -473,15 +468,12 @@
},
//
homeshow() {
// this.getSetting()
// this.listquery.bindingCity = uni.getStorageSync('userinfo').bindingCity
var patientCode = this.userinfo.patientCode
var openid = uni.getStorageSync('openid')
// getFamilyList(openid, patientCode).then(res => {
// this.familyList = res.data
// console.log(this.familyList, '000')
// })
this.showhome = true
this.getpersnoal()
// this.myInfo()
},
//
gomanagefamily() {
@ -520,7 +512,7 @@
//
...mapActions(["integralopenPopup"]),
gointegral() {
const value = uni.getStorageSync('openid');
const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
this.integralopenPopup();
@ -545,4 +537,4 @@
<style lang="scss">
@import './myinformation.scss'
</style>
</style>