chore: 测试服务器IP地址切换

This commit is contained in:
Junling Bu
2019-11-04 21:30:57 +08:00
parent f16b2f35fc
commit 34dd88bd34
8 changed files with 12 additions and 12 deletions

View File

@@ -435,7 +435,7 @@ flush privilege
// 局域网测试使用
// var WxApiRoot = 'http://192.168.0.101:8080/wx/';
// 云平台部署时使用
// var WxApiRoot = 'http://118.24.0.153:8080/wx/';
// var WxApiRoot = 'http://122.51.199.160:8080/wx/';
// 云平台上线时使用
// var WxApiRoot = 'https://www.menethil.com.cn/wx/';
@@ -918,7 +918,7 @@ sudo apt-get install mysql-client
如果配置MySQL可以运行命令
```
mysql_secure_installation
sudo mysql_secure_installation
```
#### 1.5.1.4 项目打包

View File

@@ -236,14 +236,14 @@ var WxApiRoot = 'http://localhost:8082/wx/';
// 局域网测试使用
// var WxApiRoot = 'http://192.168.0.101:8082/wx/';
// 云平台部署时使用
// var WxApiRoot = 'http://118.24.0.153:8082/wx/';
// var WxApiRoot = 'http://122.51.199.160:8082/wx/';
```
也就是说这里存在三种类型的API服务地址这里是考虑到开发存在三种情况
1. 本机开发时localhost是当前开发机的地址
2. 手机预览时192.168.0.101是开发机的IP地址
3. 当后台部署在云服务器中时118.24.0.153是云服务器的IP地址
3. 当后台部署在云服务器中时122.51.199.160是云服务器的IP地址
4. 此外,更最重要的是,如果小程序正式部署时,这里的地址必须是域名,
而不能是IP地址。