<route lang="json5" type="page">
{
  style: {
    navigationBarTitleText: '六纬AI小助手',
  },
}
</route>
<template>
  <view class="w-full h-screen">
    <image
      src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/shengxue_aibg.png"
      mode="widthFix"
      class="w-full"
      @click="navigateToAi"
    />
  </view>
</template>

<script setup lang="ts">
let queryStr = '?'
onLoad((options: any) => {
  // 预加载AI小助手页面
  const temQuery = Object.entries(options)
    .map(([key, value]) => `${key}=${value}`)
    .join('&')
  queryStr += temQuery
  console.log(queryStr)
})

const navigateToAi = () => {
  uni.navigateTo({ url: `/aiService-sub/index/newAi${queryStr}` })
}
</script>

<style lang="scss" scoped></style>
