如何在WeCaht小程序中获取目录的文件列表

时间:2020-02-25 14:25:00

标签: javascript json wechat wechat-miniprogram

我的微信小程序的项目结构如下。

+ libs
+ pages
  + index
    - index.js
    - index.wxml
+ res
  - foo.json
  - bar.json
- app.js
- app.json
- app.wxss
- sitemap.json

index.js中,我需要获取/res的文件列表,类似['foo.json', 'bar.json']

onReday()的{​​{1}}功能中,如何获取index.js目录的文件列表?

0 个答案:

没有答案
相关问题