修改
This commit is contained in:
parent
67c22e8731
commit
89d59a0aac
@ -111,12 +111,10 @@
|
|||||||
let that = this;
|
let that = this;
|
||||||
// console.log(that.logincode, that.phonecode)
|
// console.log(that.logincode, that.phonecode)
|
||||||
isRegistered(that.logincode, that.phonecode).then(resp => {
|
isRegistered(that.logincode, that.phonecode).then(resp => {
|
||||||
if(resp.data.openid && resp.data.phone){
|
if (resp.data.openid && resp.data.phone) {
|
||||||
uni.setStorageSync("openid", resp.data.openid)
|
uni.setStorageSync("openid", resp.data.openid)
|
||||||
uni.setStorageSync("phone", resp.data.phone)
|
uni.setStorageSync("phone", resp.data.phone)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resp.data.code == '0') {
|
if (resp.data.code == '0') {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '未注册,请先注册',
|
title: '未注册,请先注册',
|
||||||
@ -131,26 +129,19 @@
|
|||||||
url: '/pages/register/register',
|
url: '/pages/register/register',
|
||||||
})
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else if(resp.data.code == '2'){
|
} else if (resp.data.code == '2') {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '已被其他人注册, 不能再登录',
|
title: '已被其他人注册, 不能再登录',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '1500',
|
duration: '1500',
|
||||||
})
|
})
|
||||||
|
} 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) {
|
||||||
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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<view class="Threecategories">
|
<view class="Threecategories">
|
||||||
<view class="item" @tap="goBehaviorpoints">
|
<view class="item" @tap="goBehaviorpoints">
|
||||||
<view class="number">
|
<view class="number">
|
||||||
{{appPersonallist.score>=0?appPersonallist.score:0}}
|
{{appPersonallist.score>0?appPersonallist.score:0}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
行为积分
|
行为积分
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item" @tap='gointegral'>
|
<view class="item" @tap='gointegral'>
|
||||||
<view class="number">
|
<view class="number">
|
||||||
{{appPersonallist.integral>=0?appPersonallist.integral:0}}
|
{{appPersonallist.integral>0?appPersonallist.integral:0}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
健康豆
|
健康豆
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item" @tap='gocoupon'>
|
<view class="item" @tap='gocoupon'>
|
||||||
<view class="number">
|
<view class="number">
|
||||||
{{appPersonallist.patientCouponCount>=0?appPersonallist.patientCouponCount:0}}
|
{{appPersonallist.patientCouponCount>0?appPersonallist.patientCouponCount:0}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
优惠券
|
优惠券
|
||||||
@ -186,7 +186,7 @@
|
|||||||
<view class="masktext" @click.stop=''>
|
<view class="masktext" @click.stop=''>
|
||||||
<view class="maskcontent" v-if="familyList">
|
<view class="maskcontent" v-if="familyList">
|
||||||
<template v-for="item in familyList">
|
<template v-for="item in familyList">
|
||||||
<view :class="item.cardNo == userinfo.cardNo ? 'p1' : 'p2'"
|
<view :class="item.cardNo == appPersonallist.cardNo ? 'p1' : 'p2'"
|
||||||
@click.stop="changeFamilyInfo(item)">
|
@click.stop="changeFamilyInfo(item)">
|
||||||
<text>{{item.patientName}}</text>
|
<text>{{item.patientName}}</text>
|
||||||
<text
|
<text
|
||||||
@ -230,12 +230,11 @@
|
|||||||
list: {},
|
list: {},
|
||||||
showhome: false, //切换
|
showhome: false, //切换
|
||||||
familyList: null, //切换列表
|
familyList: null, //切换列表
|
||||||
userinfo: {}, //用户信息
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
||||||
this.userinfo = uni.getStorageSync('userinfo')
|
this.appPersonallist = uni.getStorageSync('userinfo')
|
||||||
this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
this.myInfo()
|
this.myInfo()
|
||||||
this.getpersnoal()
|
this.getpersnoal()
|
||||||
@ -298,7 +297,7 @@
|
|||||||
switchResident(value, e.patientCode).then(res => {
|
switchResident(value, e.patientCode).then(res => {
|
||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo', res.data);
|
||||||
uni.setStorageSync('patientId', res.data.id);
|
uni.setStorageSync('patientId', res.data.id);
|
||||||
this.userinfo = res.data
|
this.appPersonallist = res.data
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '切换成功',
|
title: '切换成功',
|
||||||
@ -333,12 +332,9 @@
|
|||||||
existPatientInfo(value).then(res => {
|
existPatientInfo(value).then(res => {
|
||||||
if (res.code == 200 && res.msg == 'LOGIN') {
|
if (res.code == 200 && res.msg == 'LOGIN') {
|
||||||
appPersonal(value2).then(Response => {
|
appPersonal(value2).then(Response => {
|
||||||
uni.setStorageSync('userinfo', Response.data);
|
|
||||||
if (Response.code == 200) {
|
if (Response.code == 200) {
|
||||||
|
uni.setStorageSync('userinfo', Response.data);
|
||||||
that.appPersonallist = Response.data
|
that.appPersonallist = Response.data
|
||||||
if (!that.appPersonallist.integral) {
|
|
||||||
that.appPersonallist.integral = 0
|
|
||||||
}
|
|
||||||
that.appPersonallist.homeLatitude = Number(that.appPersonallist
|
that.appPersonallist.homeLatitude = Number(that.appPersonallist
|
||||||
.homeLatitude)
|
.homeLatitude)
|
||||||
that.appPersonallist.homeLongitude = Number(that.appPersonallist
|
that.appPersonallist.homeLongitude = Number(that.appPersonallist
|
||||||
|
|||||||
@ -49,6 +49,7 @@
|
|||||||
border: 2rpx solid #FFA115;
|
border: 2rpx solid #FFA115;
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
color: #FFA115;
|
color: #FFA115;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 8%;
|
bottom: 8%;
|
||||||
@ -98,4 +99,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user