Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2023-11-13 10:37:38 +08:00
commit 7b8513be76
5 changed files with 18 additions and 30 deletions

View File

@ -111,12 +111,10 @@
let that = this;
// console.log(that.logincode, that.phonecode)
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("phone", resp.data.phone)
}
if (resp.data.code == '0') {
that.$refs.uToast.show({
title: '未注册,请先注册',
@ -131,26 +129,19 @@
url: '/pages/register/register',
})
}, 1500)
} else if(resp.data.code == '2'){
} else if (resp.data.code == '2') {
that.$refs.uToast.show({
title: '已被其他人注册, 不能再登录',
type: 'error',
duration: '1500',
})
}
else if (resp.data.code == '1') {
} else if (resp.data.code == '1') {
getCurrentUser(resp.data.openid).then(res => {
if (res.code == 200) {
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);
if (res.data) {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('userinfo', res.data);
}
that.$refs.uToast.show({
title: '登录成功',
type: 'success',

View File

@ -35,7 +35,7 @@
<view class="Threecategories">
<view class="item" @tap="goBehaviorpoints">
<view class="number">
{{appPersonallist.score>=0?appPersonallist.score:0}}
{{appPersonallist.score>0?appPersonallist.score:0}}
</view>
<view class="text">
行为积分
@ -43,7 +43,7 @@
</view>
<view class="item" @tap='gointegral'>
<view class="number">
{{appPersonallist.integral>=0?appPersonallist.integral:0}}
{{appPersonallist.integral>0?appPersonallist.integral:0}}
</view>
<view class="text">
健康豆
@ -51,7 +51,7 @@
</view>
<view class="item" @tap='gocoupon'>
<view class="number">
{{appPersonallist.patientCouponCount>=0?appPersonallist.patientCouponCount:0}}
{{appPersonallist.patientCouponCount>0?appPersonallist.patientCouponCount:0}}
</view>
<view class="text">
优惠券
@ -186,7 +186,7 @@
<view class="masktext" @click.stop=''>
<view class="maskcontent" v-if="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)">
<text>{{item.patientName}}</text>
<text
@ -230,12 +230,11 @@
list: {},
showhome: false, //
familyList: null, //
userinfo: {}, //
};
},
onShow() {
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
this.userinfo = uni.getStorageSync('userinfo')
this.appPersonallist = uni.getStorageSync('userinfo')
this.baseurl = baseurl
this.myInfo()
this.getpersnoal()
@ -298,7 +297,7 @@
switchResident(value, e.patientCode).then(res => {
uni.setStorageSync('userinfo', res.data);
uni.setStorageSync('patientId', res.data.id);
this.userinfo = res.data
this.appPersonallist = res.data
if (res.code == 200) {
this.$refs.uToast.show({
title: '切换成功',
@ -333,12 +332,9 @@
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
appPersonal(value2).then(Response => {
uni.setStorageSync('userinfo', Response.data);
if (Response.code == 200) {
uni.setStorageSync('userinfo', Response.data);
that.appPersonallist = Response.data
if (!that.appPersonallist.integral) {
that.appPersonallist.integral = 0
}
that.appPersonallist.homeLatitude = Number(that.appPersonallist
.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist

View File

@ -1,5 +1,5 @@
<template>
<view class="app" v-if="prejectlist.data">
<view class="app" v-if="prejectlist.length>0">
<view class="content" v-for="(item,index) in prejectlist" @tap="result(item)">
<view class="big">{{item.projectName}}
</view>
@ -32,7 +32,7 @@
var patientId = this.userinfo.id
projectTypedata(patientId).then(res => {
this.prejectlist = res.data
console.log(res)
console.log(this.prejectlist)
})
// this.resultstype();

View File

@ -49,6 +49,7 @@
border: 2rpx solid #FFA115;
border-radius: 5rpx;
font-size: 24rpx;
padding: 0 10rpx;
color: #FFA115;
position: absolute;
bottom: 8%;
@ -98,4 +99,4 @@
}
}
}
}
}

View File

@ -1,5 +1,5 @@
<template>
<view class="app" v-if="prejectlist.data">
<view class="app" v-if="prejectlist.length>0">
<view class="content" v-for="(item,index) in prejectlist">
<view class="big">{{item.projectName}}
</view>