<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area" @click="toPage">
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const title = ref('Hello')
const toPage = () => {
uni.navigateTo({
url:"/pages/test/index",
})
}
</script>

- 发布:2025-05-27 10:05
- 更新:2025-05-27 10:07
- 阅读:59
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 11
第三方开发者工具版本号: vscode
基础库版本号: /
项目创建方式: CLI
CLI版本号: uni-preset-vue-vite-ts
示例代码:
操作步骤:
https://gitee.com/dcloud/uni-preset-vue/tree/vite-ts 拉取代码后添加页面跳转方法,编译后在微信小程序打开
https://gitee.com/dcloud/uni-preset-vue/tree/vite-ts 拉取代码后添加页面跳转方法,编译后在微信小程序打开
预期结果:
编译后小程序正常跳转页面
编译后小程序正常跳转页面
实际结果:
编译后小程序里页面不跳转
编译后小程序里页面不跳转
用户2823606 (作者)
Error: MiniProgramError
{"errMsg":"redirectTo:fail Error: INVALID_LOGIN,access_token expired [20250527 10:16:33][touristappid]"}
有一个,是不能用游客模式吗
2025-05-27 10:17
DCloud_UNI_JBB
回复 用户2823606: 你登录试试还有没有这个报错
2025-05-27 10:22
用户2823606 (作者)
回复 DCloud_UNI_JBB: 登录就可以了,感谢感谢
2025-05-27 10:31