32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
前端:
|
||
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"; |