wsyt/修改方法.txt
紫幽冥竹 7603f1513e 新增了微信网页登录功能与关联功能。
拆分前台与Express后端API接口,前端VUE代码负责接收Express后端发来的数据进行展示,Express后端复制处理敏感信息和接口访问。
2024-03-07 16:17:16 +08:00

32 lines
1.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

前端:
1.src\util\Resource.ts
修改里面
export const expressUrl="http://10.168.101.50:3000";
正式环境下这行的地址为expressUrl="/express"
微信相关这几个参数修改为正式环境
export const weixinAppId="wx4ba9c65aa31c50db";
export const weixinAppSecret="32ded2ee1faecd90a899cbab3d86cc0b";
export const weixinredirect_uri="https://wsyt.guizhoujc.com";
vite.config.js里
修改
'/express':{
target: 'http://10.168.101.50:3000',
的ip地址为正式环境的服务器ip开发环境改为本地ip
后端:
【运行】
修改后需要把代码打包转换为JS用node为环境运行
打包指令npm run build
开发环境运行指令npm run devs
打包完成后运行start.sh以保持程序后台运行
【修改】
修改里面util\Resource.ts
export const localUrl="/express";
开发环境为本地IP+端口
微信同上
export const weixinAppId="wx4ba9c65aa31c50db";
export const weixinAppSecret="32ded2ee1faecd90a899cbab3d86cc0b";
export const weixinredirect_uri="https://wsyt.guizhoujc.com";