1 Star 0 Fork 0

重文兄 / uni_static

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
# 方式一: http://140.83.52.255/wen/appList.json
mkdir -p /www/wwwroot/127.0.0.1/wen
cd /www/wwwroot/127.0.0.1/wen
wget -O appList.json https://gitee.com/panchongwen/uni_static/raw/main/api/appList.json

# 方式二: http://140.83.52.255/uni_static/api/appList.json
# cd /www/wwwroot/127.0.0.1
# git clone https://gitee.com/panchongwen/uni_static.git
# cd uni_static
cd /www/wwwroot/127.0.0.1/uni_static
git pull

# 方式三: 用 termux 自己开一个服务 localhost:8080/uni_static/api/appList.json
```bash
cd $HOME
pkg install openssl
pkg install git
pkg install nginx
# 查看 Nginx 路径
pkg files nginx
pkg files nginx | grep conf
vim /data/data/com.termux/files/usr/etc/nginx/nginx.conf
... 加上下面的跨域
...
# 启动 nginx
# 检查nginx的配置文件
nginx -t
nginx
# 优雅重启,并重新载入配置文件 nginx.conf
nginx -s reload
# nginx -c filename //指定配置文件
cd /data/data/com.termux/files/usr/share/nginx/html
git clone https://gitee.com/panchongwen/uni_static.git

# pkg install nodejs
# npm config set registry https://registry.npmmirror.com
# npm install -g yarn && yarn config set registry https://registry.npmmirror.com -g
# npm install -g http-server

然后写个更新脚本

ps -ef | grep nginx | grep -v grep &> /dev/null || nginx
cd /data/data/com.termux/files/usr/share/nginx/html/uni_static
git pull

nginx

server { #允许跨域请求的域,*代表所有 add_header 'Access-Control-Allow-Origin' *; #允许带上cookie请求 add_header 'Access-Control-Allow-Credentials' 'true'; #允许请求的方法,比如 GET/POST/PUT/DELETE add_header 'Access-Control-Allow-Methods' *; #允许请求的header add_header 'Access-Control-Allow-Headers' *; }


空文件

简介

uni_app 的静态资源 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/panchongwen/uni_static.git
git@gitee.com:panchongwen/uni_static.git
panchongwen
uni_static
uni_static
main

搜索帮助