This commit is contained in:
2023-10-16 11:54:32 +08:00
parent 46fd79638e
commit f250d0438b
3 changed files with 63 additions and 31 deletions

View File

@ -4,7 +4,7 @@
<image src="/static/pageC/homepage.png" mode=""></image>
<view class="loginmount">
<image src="/static/pageC/TAB.png" mode=""></image>
<text v-if="patientName">{{patientName}}</text>
<text v-if="patientName">{{patientName}},你好</text>
<text @tap="login" v-else>你好,请登录</text>
</view>
</view>
@ -75,7 +75,7 @@
data() {
return {
patientName: '',
userinfo: {},
userinfo: null,
region: '',
checkSign: null,
}
@ -88,7 +88,7 @@
this.userinfo = uni.getStorageSync('userinfo');
this.patientName = this.userinfo.patientName
if (this.userinfo) {
checkSignApply(this.userinfo.cardNo, '1').then(res => {
checkSignApply(this.userinfo.cardNo).then(res => {
if (res.code != 0) {
this.checkSign = true
} else {
@ -114,6 +114,7 @@
},
//
goonline() {
console.log(!this.userinfo)
if (!this.userinfo) {
this.gologin();
} else {
@ -133,25 +134,22 @@
},
//
count() {
uni.navigateTo({
url: '/pagesB/Behaviorpoints/Behaviorpoints'
})
// if (!this.userinfo) {
// this.gologin();
// } else {
// if (!this.checkSign) {
// this.$refs.uToast.show({
// title: '',
// type: 'error',
// duration: '1000',
// url: "/pagesC/Onlinesigning/Onlinesigning"
// })
// } else {
// uni.navigateTo({
// url: "/pagesB/PointsMall/PointsMall"
// })
// }
// }
if (!this.userinfo) {
this.gologin();
} else {
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else {
uni.navigateTo({
url: '/pagesB/Behaviorpoints/Behaviorpoints'
})
}
}
},
//
goHealthrecords() {

View File

@ -28,17 +28,50 @@
code: undefined,
timer: undefined,
cityCode: '1',
openid:'',
openid: '',
// scenenurseStationId: undefined,
};
},
onShow() {
this.getAddress();
this.phonecode = undefined
this.logincode = undefined
this.code = undefined
// this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
},
methods: {
//
getAddress() {
let that = this;
uni.getLocation({
type: 'wgs84',
success: (res) => {
let location = res.latitude + ',' + res.longitude
//
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=location', //
data: {
location: location,
'key': "Q4DBZ-UIMC2-B63UX-CUZ6A-S3UT7-TBF3V", //Key
},
method: "GET",
success(res) {
uni.setStorageSync('location', res.data.result.address_component.city)
},
fail: res => {
console.log(res.errMsg, '解析失败返回的错误信息');
}
})
},
//
fail: (res) => {
uni.showToast({
icon: 'none',
title: '获取地址失败,请打开定位',
})
}
})
},
getPhoneNumberp(val) {
let that = this;
if (val.detail.code) {
@ -58,8 +91,8 @@
// getWeChatUser(that.logincode).then(res => {
// if (res.code == 200) {
isRegistered(that.logincode, that.phonecode).then(resp => {
uni.setStorageSync("openid", resp.data.openid)
that.openid=resp.data.openid
uni.setStorageSync("openid", resp.data.openid)
that.openid = resp.data.openid
if (resp.data.code == '0') {
that.$refs.uToast.show({
title: '未注册,请先注册',
@ -87,8 +120,7 @@
delta: 1
})
}, 500)
}
else {
} else {
that.$refs.uToast.show({
title: '登录失败',
type: 'error',

View File

@ -3,7 +3,7 @@
<view class="address">
<image src="../../static/pages/address.png" mode=""></image>
<text>
济南市
{{location?location:''}}
</text>
</view>
<view class="topbar">
@ -61,12 +61,14 @@
informationCategoryVOList: [], //
patientId: '',
userInfo: null,
location: null,
};
},
onShow() {
this.pageNum = 1
this.patientId = uni.getStorageSync('patientId');
this.userInfo = uni.getStorageSync('userinfo')
this.location = uni.getStorageSync('location')
this.getHeathHousing();
},
methods: {
@ -92,7 +94,7 @@
getScreening(this.patientId).then(res => {
if (res.code == 200) {
let userinfo = JSON.stringify(this.userInfo)
if (!res.data||res.data==null) {
if (!res.data || res.data == null) {
uni.navigateTo({
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
})
@ -122,7 +124,7 @@
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
if (res.rows) {
res.rows.forEach(e => {
e.leadThumbnailUrl = baseurl+ e.leadThumbnailUrl
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
})
}
this.informationCategoryVOList = res.rows