This commit is contained in:
2023-11-13 11:31:54 +08:00
parent 90e5584626
commit ac8d8ed292
4 changed files with 14 additions and 53 deletions

View File

@ -3,24 +3,11 @@
<view class="content"> <view class="content">
<image src="/static/pageC/homepage.png" mode=""></image> <image src="/static/pageC/homepage.png" mode=""></image>
<view class="loginmount" @tap="city"> <view class="loginmount" @tap="city">
<!-- <image src="/static/pageC/TAB.png" mode=""></image> -->
<image src="../../static/pages/address.png" mode=""></image> <image src="../../static/pages/address.png" mode=""></image>
<text v-if="address"> <text>
{{address}} {{address?address:'请选择城市'}}
</text>
<text v-else>
请选择城市
</text> </text>
</view> </view>
<!-- <view class="address" @tap="city">
<image src="../../static/pages/address.png" mode=""></image>
<text v-if="address">
{{address}}
</text>
<text v-else>
请选择城市
</text>
</view> -->
</view> </view>
<view class="contentcenter"> <view class="contentcenter">
<view class="home" @tap="goonline"> <view class="home" @tap="goonline">
@ -93,7 +80,6 @@
export default { export default {
data() { data() {
return { return {
patientName: '',
userinfo: null, userinfo: null,
infotitle: null, infotitle: null,
region: '', region: '',
@ -102,40 +88,23 @@
openid: '', openid: '',
} }
}, },
onLoad() { onLoad() {},
// this.login()
},
onShow() { onShow() {
this.userinfo = uni.getStorageSync('userinfo') this.userinfo = uni.getStorageSync('userinfo')
this.address = uni.getStorageSync('location') this.address = uni.getStorageSync('location')
this.openid = uni.getStorageSync('openid'); this.openid = uni.getStorageSync('openid');
if (this.address == '德州市') {
uni.setStorageSync("region", 1)
} else if (this.address == '东营市') {
uni.setStorageSync("region", 2)
} else if (this.address == '济南市') {
uni.setStorageSync("region", 3)
}
this.region = uni.getStorageSync('region') this.region = uni.getStorageSync('region')
if (this.userinfo && this.region != 3) { if (this.userinfo && this.region != 3) {
this.patientName = this.userinfo.patientName
checkSignApply(this.userinfo.cardNo).then(res => { checkSignApply(this.userinfo.cardNo).then(res => {
if (res.data) { if (res.data) {
this.checkSign = res.data.code this.checkSign = res.data.code
this.infotitle = res.data.info this.infotitle = res.data.info
} }
// if (res.data.code == 0) {
// this.checkSign = true
// } else {
// this.checkSign = false
// }
}) })
} else { } else {}
this.patientName = ''
}
}, },
methods: { methods: {
//
city() { city() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/location/location' url: '/pages/location/location'
@ -171,8 +140,6 @@
if (this.region == 3) { if (this.region == 3) {
this.family() this.family()
} else { } else {
console.log(this.userinfo, '0900')
if (this.region == 1 || this.region == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -372,4 +339,4 @@
<style lang="scss"> <style lang="scss">
@import "./homepage.scss"; @import "./homepage.scss";
</style> </style>

View File

@ -31,7 +31,6 @@
</view> </view>
<view class="city_item" @click="getAddressCon('3')"> <view class="city_item" @click="getAddressCon('3')">
<text>济南市</text> <text>济南市</text>
</view> </view>
</view> </view>
</view> </view>
@ -75,16 +74,15 @@
uni.setStorageSync('location', this.showFont) uni.setStorageSync('location', this.showFont)
this.isShowFont = false this.isShowFont = false
this.address = uni.getStorageSync('location') this.address = uni.getStorageSync('location')
// console.log('fontClick',this.address);
}, },
getAddressCon(value) { getAddressCon(value) {
if (value == '1') { if (value == '1') {
uni.setStorageSync('location', '德州市') uni.setStorageSync('location', '德州市')
uni.setStorageSync("region", 1) uni.setStorageSync("region", 1)
this.address = '德州市' this.address = '德州市'
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
} else if (value == '2') { } else if (value == '2') {
uni.setStorageSync('location', '东营市') uni.setStorageSync('location', '东营市')
uni.setStorageSync("region", 2) uni.setStorageSync("region", 2)

View File

@ -31,11 +31,7 @@
}; };
}, },
onShow() { onShow() {
if (uni.getStorageSync('location') && uni.getStorageSync('region')) { if (uni.getStorageSync('location') && uni.getStorageSync('region')) {} else {
let location = uni.getStorageSync('location')
let region = uni.getStorageSync('region')
} else {
this.getAddress() this.getAddress()
} }
this.phonecode = undefined this.phonecode = undefined

View File

@ -34,14 +34,14 @@
onLoad() { onLoad() {
this.region = uni.getStorageSync('region') this.region = uni.getStorageSync('region')
if (this.region == 1) { if (this.region == 1) {
dzrecord('370785199502153071').then(res => { dzrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
res.data.forEach(e => { res.data.forEach(e => {
e.existReport = Number(e.existReport) e.existReport = Number(e.existReport)
}) })
this.list = res.data this.list = res.data
}) })
} else if (this.region == 2) { } else if (this.region == 2) {
dyrecord('370785199502153071').then(res => { dyrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
res.data.forEach(e => { res.data.forEach(e => {
e.existReport = Number(e.existReport) e.existReport = Number(e.existReport)
}) })
@ -72,7 +72,7 @@
}); });
} else if (this.region == 2) { } else if (this.region == 2) {
uni.downloadFile({ uni.downloadFile({
url: `http://8.131.93.145:54098/fd/sh05/report/download/${item.reportId}`, url: `http://218.58.213.15:8009/fd/sh05/report/download/${item.reportId}`,
success: function(res) { success: function(res) {
console.log(res) console.log(res)
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
@ -169,4 +169,4 @@
} }
} }
} }
</style> </style>