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

View File

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

View File

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

View File

@ -34,14 +34,14 @@
onLoad() {
this.region = uni.getStorageSync('region')
if (this.region == 1) {
dzrecord('370785199502153071').then(res => {
dzrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
res.data.forEach(e => {
e.existReport = Number(e.existReport)
})
this.list = res.data
})
} else if (this.region == 2) {
dyrecord('370785199502153071').then(res => {
dyrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
res.data.forEach(e => {
e.existReport = Number(e.existReport)
})
@ -72,7 +72,7 @@
});
} else if (this.region == 2) {
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) {
console.log(res)
var filePath = res.tempFilePath;
@ -169,4 +169,4 @@
}
}
}
</style>
</style>