Commit 14889a96 by gonglei

加入框架代码

1 parent 7eb8d908
......@@ -161,8 +161,15 @@ export default class HomePage extends Vue {
created(): void {
onLoad((option) => {
onLoad((options) => {
this.statusBarHeight = uni.getWindowInfo().statusBarHeight;
// 1. 检查是否有 scene 参数 (通过扫码进入)
if (options.scene) {
// 2. scene 需要使用 decodeURIComponent 解码
const scene = decodeURIComponent(options.scene);
console.log("扫码携带的参数是:", scene);
// 输出结果示例: "uid=1001&source=poster"
}
CarouselController.getMiniappCarouselByDate(this.axios).then(res => {
this.carousels = res.data;
this.carousels?.forEach(carousel => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!