diff --git a/common/style/base-style.scss b/common/style/base-style.scss new file mode 100644 index 0000000..22c326b --- /dev/null +++ b/common/style/base-style.scss @@ -0,0 +1,9 @@ +$brand-theme-color: #28B389; //品牌主体红色 + +$border-color: #e0e0e0; //边框颜色 +$border-color-light: #efefef; //边框亮色 + +$text-font-color-1: #522510; //文字主色 +$text-font-color-2: #676767; //副标题颜色 +$text-font-color-3: #a7a7a7; //浅色 +$text-font-color-4: #e4e4e4; //更浅 diff --git a/common/style/common-style.scss b/common/style/common-style.scss new file mode 100644 index 0000000..fd2db9e --- /dev/null +++ b/common/style/common-style.scss @@ -0,0 +1,5 @@ + +.safe-area-inset-bottom { + height: env(safe-area-inset-bottom); +} + diff --git a/uni.scss b/uni.scss index 4e95a33..c8bbf1b 100644 --- a/uni.scss +++ b/uni.scss @@ -16,6 +16,7 @@ // 引入uview @import 'uview-ui/theme.scss'; +@import "@/common/style/base-style.scss"; /* 行为相关颜色 */ $uni-color-primary: #007aff; $uni-color-success: #4cd964; diff --git a/utils/request.js b/utils/request.js index 53354e3..7f3470e 100644 --- a/utils/request.js +++ b/utils/request.js @@ -17,19 +17,19 @@ import { const ENV_CONFIG = { develop: { // 开发环境 - // baseUrl: 'http://192.168.2.136:4501', - baseUrl: "https://testlu.chuangtewl.com/prod-api", - appId: 1, // TODO: 根据实际后端配置调整 + baseUrl: "http://192.168.2.174:4501", + //baseUrl: "https://testlu.chuangtewl.com/prod-api", + appId: 1, }, trial: { // 体验版 - baseUrl: "https://testlu.chuangtewl.com/prod-api", - appId: 1, // TODO: 根据实际后端配置调整 + baseUrl: "http://192.168.2.174:4501", + appId: 1, }, release: { // 正式版 - baseUrl: "https://testlu.chuangtewl.com/prod-api", - appId: 1, // TODO: 根据实际后端配置调整 + baseUrl: "http://192.168.2.174:4501", + appId: 1, }, }; diff --git a/utils/system.js b/utils/system.js new file mode 100644 index 0000000..3a24ecc --- /dev/null +++ b/utils/system.js @@ -0,0 +1,25 @@ +const SYSTEM_INFO = uni.getSystemInfoSync(); + +export const getStatusBarHeight = ()=> SYSTEM_INFO.statusBarHeight || 15; + +export const getTitleBarHeight = ()=>{ + if(uni.getMenuButtonBoundingClientRect){ + let {top,height} = uni.getMenuButtonBoundingClientRect(); + return height + (top - getStatusBarHeight())*2 + }else{ + return 40; + } +} + +export const getNavBarHeight = ()=> getStatusBarHeight()+getTitleBarHeight(); + +export const getLeftIconLeft = ()=> { + // #ifdef MP-TOUTIAO + let {leftIcon:{left,width}} = tt.getCustomButtonBoundingClientRect(); + return left+ parseInt(width); + // #endif + + // #ifndef MP-TOUTIAO + return 0 + // #endif +} \ No newline at end of file