rename envar names from Xxx_Yyy to xxxYyy

This commit is contained in:
陆柯 2022-06-04 15:59:41 +08:00
parent 555b114be1
commit f30142ead6

View File

@ -95,8 +95,8 @@ export default {
// #ifdef H5 // #ifdef H5
// 响应式方案:仅仅根据当前设备类型,如果是 PC 大屏幕,则始终显示 topWindow 并且隐藏顶部 navibar 和底部 tabBar。 // 响应式方案:仅仅根据当前设备类型,如果是 PC 大屏幕,则始终显示 topWindow 并且隐藏顶部 navibar 和底部 tabBar。
if (pagesJson?.topWindow || envar?.Hide_Bars_On_PC) { if (pagesJson?.topWindow || envar?.hideBarsOnPC) {
// 如果页头不是通过 pagesJson.topWindow 而是作为组件来引入个别页面,那么定义配置参数 Hide_Bars_On_PC 来控制。 // 如果页头不是通过 pagesJson.topWindow 而是作为组件来引入个别页面,那么定义配置参数 hideBarsOnPC 来控制。
if (uni.getSystemInfoSync().model === 'PC') { if (uni.getSystemInfoSync().model === 'PC') {
if (window.innerWidth > (pagesJson?.topWindow?.matchMedia?.minWidth || 0)) { if (window.innerWidth > (pagesJson?.topWindow?.matchMedia?.minWidth || 0)) {
uni.hideTabBar() uni.hideTabBar()
@ -124,19 +124,19 @@ export default {
let protocol, hostname, port let protocol, hostname, port
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
protocol = envar.Base_Protocol || 'https' protocol = envar.servProtocol || 'https'
hostname = envar.Base_Hostname hostname = envar.servHostname
port = envar.Base_Port port = envar.servPort
} else { } else {
protocol = envar.Base_Protocol_Dev || 'http' protocol = envar.servProtocolDev || 'http'
hostname = hostname =
envar.Base_Hostname_Dev || envar.servHostnameDev ||
// #ifdef H5 // #ifdef H5
window.location.hostname window.location.hostname
// #endif // #endif
port = port =
envar.Base_Port_Dev || envar.servPortDev ||
envar.Base_Port || envar.servPort ||
// #ifdef H5 // #ifdef H5
window.location.port.replace(':', '') window.location.port.replace(':', '')
// #endif // #endif
@ -157,8 +157,8 @@ export default {
* - CLIENT_BASEND_TIMEOUT: 前端发现后台超时 * - CLIENT_BASEND_TIMEOUT: 前端发现后台超时
* - CLINET_BASEND_EXCEPTION: 前端发现后台异常 * - CLINET_BASEND_EXCEPTION: 前端发现后台异常
**/ **/
async callBase ({ async callBasend ({
basendType = this.envar?.Basend_Type_Default || wo?.envar?.Basend_Type_Default || this.BASEND_TYPE_DEFAULT, basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || this.BASEND_TYPE_DEFAULT,
httpMethod = 'POST', httpMethod = 'POST',
apiVersion = 'api', apiVersion = 'api',
apiWho, apiWho,
@ -369,7 +369,7 @@ export default {
}, },
async pickupFile ({ async pickupFile ({
basendType = this.envar?.Basend_Type_Default || wo?.envar?.Basend_Type_Default || this.BASEND_TYPE_DEFAULT, basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || this.BASEND_TYPE_DEFAULT,
mediaType = 'image', mediaType = 'image',
count = 1, count = 1,
sizeType = ['original', 'compressed'], sizeType = ['original', 'compressed'],