Blame view

稻城亚丁小程序/uniapp/src/utils/localGalleryImages.ts 558 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  import { staticAsset } from "@/utils/staticAsset";
  
  export const LOCAL_GALLERY_IMAGES = [
    staticAsset("photo-xiannairi-xuefeng.png"),
    staticAsset("photo-sangdui-caoyuan.png"),
    staticAsset("home-top-banner-2.png"),
    staticAsset("home-top-banner-3.png"),
    staticAsset("user-center-header.png"),
    staticAsset("home-top-banner.png"),
    staticAsset("chapter1-banner.png"),
  ] as const;
  
  export function localGalleryByIndex(index: number): string {
    const list = LOCAL_GALLERY_IMAGES;
    return list[((index % list.length) + list.length) % list.length];
  }