修改
This commit is contained in:
parent
46fd79638e
commit
f250d0438b
@ -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() {
|
||||
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'
|
||||
})
|
||||
// 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"
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
// 健康档案
|
||||
goHealthrecords() {
|
||||
|
||||
@ -33,12 +33,45 @@
|
||||
};
|
||||
},
|
||||
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) {
|
||||
@ -87,8 +120,7 @@
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
|
||||
@ -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: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user