家庭成员 登录
This commit is contained in:
parent
8feb5cebb8
commit
67c22e8731
@ -103,15 +103,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
// this.login()
|
// this.login()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.userinfo = uni.getStorageSync('userinfo')
|
||||||
this.address = uni.getStorageSync('location')
|
this.address = uni.getStorageSync('location')
|
||||||
this.openid = uni.getStorageSync('openid');
|
this.openid = uni.getStorageSync('openid');
|
||||||
if (uni.getStorageSync('userinfo')) {
|
|
||||||
this.userinfo = uni.getStorageSync('userinfo')
|
|
||||||
// this.cityCode = this.userinfo.cityCode;
|
|
||||||
}
|
|
||||||
if (this.address == '德州市') {
|
if (this.address == '德州市') {
|
||||||
uni.setStorageSync("region", 1)
|
uni.setStorageSync("region", 1)
|
||||||
} else if (this.address == '东营市') {
|
} else if (this.address == '东营市') {
|
||||||
@ -169,11 +167,11 @@
|
|||||||
goonline() {
|
goonline() {
|
||||||
if (!this.userinfo) {
|
if (!this.userinfo) {
|
||||||
this.gologin();
|
this.gologin();
|
||||||
} else if(this.userinfo){
|
} else if (this.userinfo) {
|
||||||
if (this.region == 3) {
|
if (this.region == 3) {
|
||||||
this.family()
|
this.family()
|
||||||
} else {
|
} else {
|
||||||
console.log(this.userinfo,'0900')
|
console.log(this.userinfo, '0900')
|
||||||
|
|
||||||
if (this.region == 1 || this.region == 2) {
|
if (this.region == 1 || this.region == 2) {
|
||||||
if (this.checkSign == "0") {
|
if (this.checkSign == "0") {
|
||||||
@ -218,8 +216,7 @@
|
|||||||
title: this.infotitle,
|
title: this.infotitle,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
||||||
})
|
})
|
||||||
@ -284,26 +281,26 @@
|
|||||||
if (this.region == 3) {
|
if (this.region == 3) {
|
||||||
this.family()
|
this.family()
|
||||||
} else {
|
} else {
|
||||||
if (this.region == 1 || this.region == 2) {
|
if (this.region == 1 || this.region == 2) {
|
||||||
if (this.checkSign == "0") {
|
if (this.checkSign == "0") {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '未签约,请先签约',
|
title: '未签约,请先签约',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||||
})
|
})
|
||||||
} else if (this.checkSign == "01") {
|
} else if (this.checkSign == "01") {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: this.infotitle,
|
title: this.infotitle,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.family()
|
this.family()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -376,4 +373,3 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "./homepage.scss";
|
@import "./homepage.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -142,10 +142,12 @@
|
|||||||
else if (resp.data.code == '1') {
|
else if (resp.data.code == '1') {
|
||||||
getCurrentUser(resp.data.openid).then(res => {
|
getCurrentUser(resp.data.openid).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log(res,'000')
|
|
||||||
if(res.data){
|
if(res.data){
|
||||||
uni.setStorageSync('patientId', res.data.id);
|
uni.setStorageSync('patientId',res.data.id)
|
||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo',res.data)
|
||||||
|
|
||||||
|
// uni.setStorageSync('patientId', res.data.id);
|
||||||
|
// uni.setStorageSync('userinfo', res.data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="name">
|
<view class="name">
|
||||||
所在位置
|
所在位置
|
||||||
<view class="select" @tap='getAddress'>
|
<view class="selectdata" @tap='getAddress'>
|
||||||
<text v-if="query.locationName ==''">请选择所在位置</text>
|
<text v-if="query.locationName ==''">请选择所在位置</text>
|
||||||
<text class="testitem">{{query.locationName}}</text>
|
<text class="testitem">{{query.locationName}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -765,6 +765,47 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.testitem {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
line-height: 63rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #8E8E8E;
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 9rpx;
|
||||||
|
height: 17rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 40rpx;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectdata {
|
||||||
|
width: 636rpx;
|
||||||
|
height: 63rpx;
|
||||||
|
background: #F6F6F6;
|
||||||
|
margin: 12rpx auto;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
|
||||||
.testitem {
|
.testitem {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|||||||
@ -46,38 +46,60 @@
|
|||||||
currentInfo: '',
|
currentInfo: '',
|
||||||
show: false,
|
show: false,
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要解除绑定吗?'
|
content: '确定要解除绑定吗?',
|
||||||
|
userinfo:{},
|
||||||
|
patientCode:'',
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(options)
|
// console.log(options)
|
||||||
var patientCode=options.patientCode
|
this.patientCode=options.patientCode
|
||||||
getInfo(patientCode).then(res => {
|
},
|
||||||
|
onShow() {
|
||||||
|
this.userinfo=uni.getStorageSync('userinfo')
|
||||||
|
console.log(this.userinfo)
|
||||||
|
getInfo(this.patientCode).then(res => {
|
||||||
this.currentInfo=res.data
|
this.currentInfo=res.data
|
||||||
})
|
})
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
closebtn() {
|
closebtn() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
confirmbtn() {
|
confirmbtn() {
|
||||||
|
console.log(this.currentInfo.cardNo,this.userinfo.cardNo)
|
||||||
delFamilyItem(this.currentInfo.patientCode).then(res => {
|
delFamilyItem(this.currentInfo.patientCode).then(res => {
|
||||||
if(res.code == 200) {
|
if(res.code == 200) {
|
||||||
uni.showToast({
|
if(this.currentInfo.cardNo==this.userinfo.cardNo){
|
||||||
title: '解除成功',
|
uni.showToast({
|
||||||
duration: 1000
|
title: '解除成功',
|
||||||
});
|
duration: 1000
|
||||||
setTimeout(function() {
|
});
|
||||||
uni.navigateBack({
|
uni.removeStorageSync('patientId');
|
||||||
delta: 1
|
uni.removeStorageSync('openid');
|
||||||
})
|
uni.removeStorageSync('phone');
|
||||||
}, 1000);
|
uni.removeStorageSync('userinfo');
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '解除成功',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.show = false;
|
this.show = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user