<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { parseUrlParams } from '@/utils/tool'
import db from './utils/db'

onLaunch(() => {
  const { code } = parseUrlParams()
  if (code) {
    console.log('code', code)
    // 公众号回调地址传来的code
    db.set('code', code)
  }
})
onShow(() => {})
onHide(() => {})
</script>
<style lang="scss">
page {
  background-color: #f7f8fa;
}
</style>
