This commit is contained in:
2023-10-09 13:29:39 +08:00
parent f8fc65fd0f
commit 20585e24ed
2 changed files with 90 additions and 33 deletions

View File

@ -2,7 +2,7 @@
<view class="app"> <view class="app">
<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"> <view class="loginmount" @tap='gologin'>
<image src="/static/pageC/TAB.png" mode=""></image> <image src="/static/pageC/TAB.png" mode=""></image>
<text>你好,请登录</text> <text>你好,请登录</text>
</view> </view>
@ -59,6 +59,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -70,61 +71,111 @@
export default { export default {
data() { data() {
return { return {
title: 'Hello' openid: null,
} }
}, },
onLoad() { onLoad() {
this.login() // this.login()
},
onShow() {
this.openid = uni.getStorageSync('openid');
}, },
methods: { methods: {
goonline() { nologin() {
uni.navigateTo({ this.$refs.uToast.show({
url: '/pagesB/mysigning/mysigning' title: '您未登录,请先登录',
type: 'error',
duration: '1000',
url: '/pages/login/login'
}) })
// uni.navigateTo({
// url: '/pagesC/Onlinesigning/Onlinesigning'
// })
}, },
//
goonline() {
if (this.openid) {
uni.navigateTo({
url: '/pagesB/mysigning/mysigning'
})
// uni.navigateTo({
// url: '/pagesC/Onlinesigning/Onlinesigning'
// })
} else {
this.nologin()
}
},
//
goHealthrecords() { goHealthrecords() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/Healthrecords/Healthrecords' uni.navigateTo({
}) url: '/pagesC/Healthrecords/Healthrecords'
})
} else {
this.nologin()
}
}, },
// //
gorecords() { gorecords() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/Screeningrecords/Screeningrecords' uni.navigateTo({
}) url: '/pagesC/Screeningrecords/Screeningrecords'
})
} else {
this.nologin()
}
}, },
// //
healthtest() { healthtest() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/healthtest/healthtest' uni.navigateTo({
}) url: '/pagesC/healthtest/healthtest'
})
} else {
this.nologin()
}
}, },
// //
sign() { sign() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/Physicalexamination/Physicalexamination' uni.navigateTo({
}) url: '/pagesC/Physicalexamination/Physicalexamination'
})
} else {
this.nologin()
}
}, },
// //
goappoint() { goappoint() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/ServiceAppointment/ServiceAppointment' uni.navigateTo({
}) url: '/pagesC/ServiceAppointment/ServiceAppointment'
})
} else {
this.nologin()
}
}, },
// //
servicerecord() { servicerecord() {
uni.navigateTo({ if (this.openid) {
url: '/pagesC/servicerecord/servicerecord' uni.navigateTo({
}) url: '/pagesC/servicerecord/servicerecord'
})
} else {
this.nologin()
}
}, },
// //
myappointment() { myappointment() {
if (this.openid) {
uni.navigateTo({
url: '/pagesC/Myappointment/Myappointment'
})
} else {
this.nologin()
}
},
gologin() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/Myappointment/Myappointment' url: '/pages/login/login'
}) })
}, },
login() { login() {

View File

@ -90,7 +90,7 @@
常用功能 常用功能
</view> </view>
<view class="orderStatus"> <view class="orderStatus">
<view class="item"> <view class="item" @tap='goHealthrecords'>
<image src="../../static/pages/jiankangdangan.png" mode=""></image> <image src="../../static/pages/jiankangdangan.png" mode=""></image>
<view class="text"> <view class="text">
健康档案 健康档案
@ -305,6 +305,12 @@
this.gologin(); this.gologin();
} }
}, },
//
goHealthrecords() {
uni.navigateTo({
url: '/pagesC/Healthrecords/Healthrecords'
})
},
// //
goorder(index, item) { goorder(index, item) {
console.log(index, item) console.log(index, item)
@ -380,9 +386,9 @@
} }
}, },
// //
expertOrder(){ expertOrder() {
uni.navigateTo({ uni.navigateTo({
url:"/pagesB/ExpertlookOrder/ExpertlookOrder" url: "/pagesB/ExpertlookOrder/ExpertlookOrder"
}) })
} }
} }