feat: 完成对接

This commit is contained in:
anonymous
2024-12-31 21:07:08 +08:00
parent ecd30a2e82
commit fecf6535a8
99 changed files with 2253 additions and 299 deletions
+22 -6
View File
@@ -1,21 +1,37 @@
<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { onLaunch, onHide } from '@dcloudio/uni-app'
import { useUserStore } from './store'
import { checkWithRedirectLogin, loginRoute } from './interceptors/route'
onLaunch(() => {
uni.showModal({ title: '提示', content: 'App Launch' })
console.log('App Launch')
onLaunch((options) => {
if (checkWithRedirectLogin(options.path)) {
uni.reLaunch({
url: loginRoute,
// query: {
// redirect: options.path,
// },
})
}
})
onShow(() => {
console.log('App Show')
onPageNotFound(() => {
console.log(1)
uni.reLaunch({
url: '/',
})
})
onHide(() => {
console.log('App Hide')
})
const userStore = useUserStore()
</script>
<style lang="scss">
/* 覆盖 uniapp 自带rpx效果 */
html {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px !important;
}
/* stylelint-disable-next-line selector-type-no-unknown */