diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 261ce48..1e1eb6a 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -1,24 +1,26 @@ -{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version": "0.0", - "configurations": [{ - "app-plus" : - { - "launchtype" : "remote" - }, - "default" : - { - "launchtype" : "remote" - }, - "h5" : - { - "launchtype" : "remote" - }, - "mp-weixin" : - { - "launchtype" : "remote" - }, - "type" : "uniCloud" - } +{ + // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : { + "launchtype" : "remote" + }, + "default" : { + "launchtype" : "remote" + }, + "h5" : { + "launchtype" : "remote" + }, + "mp-weixin" : { + "launchtype" : "remote" + }, + "type" : "uniCloud" + }, + { + "playground" : "standard", + "type" : "uni-app:app-android" + } ] } diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index e9a4bde..4698294 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -415,8 +415,6 @@ export default { mounted() { this.formatSku(this.goodsSpec); - - console.log("goodsDetail",this.goodsDetail) } }; @@ -437,9 +435,9 @@ export default { box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2); } -::v-deep.u-icon-plus, -.u-icon-minus, -.u-icon-disabled { +::v-deep .u-icon-plus, +::v-deep .u-icon-minus, +::v-deep .u-icon-disabled { height: 30rpx !important; background: #fff !important; } @@ -541,7 +539,7 @@ export default { color: #999; margin-left: 10rpx; - ::v-deep span { + .goods-price-bigshow { font-size: 30rpx; } } diff --git a/components/popups/popups.vue b/components/popups/popups.vue index a9ae593..cb568f8 100644 --- a/components/popups/popups.vue +++ b/components/popups/popups.vue @@ -79,20 +79,15 @@ export default { this.$emit("input", !this.value); }, getStatusBar() { - let promise = new Promise((resolve, reject) => { - uni.getSystemInfo({ - success: function (e) { - let customBar; - // #ifdef H5 - - customBar = e.statusBarHeight + e.windowTop; - - // #endif - resolve(customBar); - }, - }); - }); - return promise; + const windowInfo = uni.getWindowInfo(); + // #ifdef H5 + return Promise.resolve( + (windowInfo.statusBarHeight || 0) + (windowInfo.windowTop || 0) + ); + // #endif + // #ifndef H5 + return Promise.resolve(windowInfo.statusBarHeight || 0); + // #endif }, async popupsPosition() { let statusBar = await this.getStatusBar(); @@ -104,6 +99,10 @@ export default { size: true, }, (data) => { + if (!data) { + resolve(); + return; + } let width = data.width; let height = data.height; @@ -154,8 +153,7 @@ export default { return promise; }, getPlacement(x, y) { - let width = uni.getSystemInfoSync().windowWidth; - let height = uni.getSystemInfoSync().windowHeight; + const { windowWidth: width, windowHeight: height } = uni.getWindowInfo(); if (x > width / 2 && y > height / 2) { return "bottom-end"; } else if (x < width / 2 && y < height / 2) { @@ -171,20 +169,21 @@ export default { } }, dynamicGetY(y, gap) { - let height = uni.getSystemInfoSync().windowHeight; + const { windowHeight: height } = uni.getWindowInfo(); y = y < gap ? gap : y; y = height - y < gap ? height - gap : y; return y; }, dynamicGetX(x, gap) { - let width = uni.getSystemInfoSync().windowWidth; + const { windowWidth: width } = uni.getWindowInfo(); x = x < gap ? gap : x; x = width - x < gap ? width - gap : x; return x; }, transformRpx(params) { - return (params * uni.getSystemInfoSync().screenWidth) / 375; + const { screenWidth } = uni.getWindowInfo(); + return (params * screenWidth) / 375; }, }, watch: { diff --git a/main.js b/main.js index f8a3e83..5b4c72f 100644 --- a/main.js +++ b/main.js @@ -10,9 +10,7 @@ import * as filterUtils from './utils/filters.js' export function createApp() { const app = createSSRApp(App) - // #ifdef MP-WEIXIN - // 微信开发者工具部分版本在输出 Vue warn 时会触发 - // TypeError: Cannot read property '__global' of null,自定义 handler 绕过默认路径 + // uview-plus 内部会触发 Vue3 开发态告警(枚举组件实例 keys),不影响运行 app.config.warnHandler = (msg, _instance, trace) => { if ( typeof msg === 'string' && @@ -23,10 +21,12 @@ export function createApp() { try { console.warn(`[Vue warn]: ${msg}${trace || ''}`) } catch (e) { - // 忽略开发者工具 console 代理异常 + // #ifdef MP-WEIXIN + // 微信开发者工具部分版本在输出 Vue warn 时会触发 + // TypeError: Cannot read property '__global' of null + // #endif } } - // #endif app.use(store) app.use(uviewPlus) diff --git a/pages/cart/coupon/index.vue b/pages/cart/coupon/index.vue index df0b130..3f60d3d 100644 --- a/pages/cart/coupon/index.vue +++ b/pages/cart/coupon/index.vue @@ -1,15 +1,12 @@