家庭成员 登录
This commit is contained in:
parent
8feb5cebb8
commit
67c22e8731
@ -103,15 +103,13 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
// this.login()
|
||||
},
|
||||
onShow() {
|
||||
this.userinfo = uni.getStorageSync('userinfo')
|
||||
this.address = uni.getStorageSync('location')
|
||||
this.openid = uni.getStorageSync('openid');
|
||||
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 == '东营市') {
|
||||
@ -169,12 +167,12 @@
|
||||
goonline() {
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else if(this.userinfo){
|
||||
} else if (this.userinfo) {
|
||||
if (this.region == 3) {
|
||||
this.family()
|
||||
} else {
|
||||
console.log(this.userinfo,'0900')
|
||||
|
||||
console.log(this.userinfo, '0900')
|
||||
|
||||
if (this.region == 1 || this.region == 2) {
|
||||
if (this.checkSign == "0") {
|
||||
this.$refs.uToast.show({
|
||||
@ -218,8 +216,7 @@
|
||||
title: this.infotitle,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
||||
})
|
||||
@ -284,26 +281,26 @@
|
||||
if (this.region == 3) {
|
||||
this.family()
|
||||
} else {
|
||||
if (this.region == 1 || this.region == 2) {
|
||||
if (this.checkSign == "0") {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else if (this.checkSign == "01") {
|
||||
this.$refs.uToast.show({
|
||||
title: this.infotitle,
|
||||
type: 'error',
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.family()
|
||||
}
|
||||
if (this.region == 1 || this.region == 2) {
|
||||
if (this.checkSign == "0") {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else if (this.checkSign == "01") {
|
||||
this.$refs.uToast.show({
|
||||
title: this.infotitle,
|
||||
type: 'error',
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.family()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -376,4 +373,3 @@
|
||||
<style lang="scss">
|
||||
@import "./homepage.scss";
|
||||
</style>
|
||||
|
||||
|
||||
@ -114,9 +114,9 @@
|
||||
if(resp.data.openid && resp.data.phone){
|
||||
uni.setStorageSync("openid", resp.data.openid)
|
||||
uni.setStorageSync("phone", resp.data.phone)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (resp.data.code == '0') {
|
||||
that.$refs.uToast.show({
|
||||
title: '未注册,请先注册',
|
||||
@ -142,13 +142,15 @@
|
||||
else if (resp.data.code == '1') {
|
||||
getCurrentUser(resp.data.openid).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res,'000')
|
||||
if(res.data){
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
|
||||
uni.setStorageSync('patientId',res.data.id)
|
||||
uni.setStorageSync('userinfo',res.data)
|
||||
|
||||
// uni.setStorageSync('patientId', res.data.id);
|
||||
// uni.setStorageSync('userinfo', res.data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
that.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
type: 'success',
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
</view> -->
|
||||
<view class="name">
|
||||
所在位置
|
||||
<view class="select" @tap='getAddress'>
|
||||
<view class="selectdata" @tap='getAddress'>
|
||||
<text v-if="query.locationName ==''">请选择所在位置</text>
|
||||
<text class="testitem">{{query.locationName}}</text>
|
||||
</view>
|
||||
@ -765,6 +765,47 @@
|
||||
display: flex;
|
||||
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 {
|
||||
font-size: 26rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
|
||||
@ -46,38 +46,60 @@
|
||||
currentInfo: '',
|
||||
show: false,
|
||||
title: '提示',
|
||||
content: '确定要解除绑定吗?'
|
||||
content: '确定要解除绑定吗?',
|
||||
userinfo:{},
|
||||
patientCode:'',
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
var patientCode=options.patientCode
|
||||
getInfo(patientCode).then(res => {
|
||||
// console.log(options)
|
||||
this.patientCode=options.patientCode
|
||||
},
|
||||
onShow() {
|
||||
this.userinfo=uni.getStorageSync('userinfo')
|
||||
console.log(this.userinfo)
|
||||
getInfo(this.patientCode).then(res => {
|
||||
this.currentInfo=res.data
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
closebtn() {
|
||||
this.show = false;
|
||||
},
|
||||
confirmbtn() {
|
||||
console.log(this.currentInfo.cardNo,this.userinfo.cardNo)
|
||||
delFamilyItem(this.currentInfo.patientCode).then(res => {
|
||||
if(res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '解除成功',
|
||||
duration: 1000
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1000);
|
||||
if(this.currentInfo.cardNo==this.userinfo.cardNo){
|
||||
uni.showToast({
|
||||
title: '解除成功',
|
||||
duration: 1000
|
||||
});
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('openid');
|
||||
uni.removeStorageSync('phone');
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user