页面通信兼容性优化

master
gongfuxiang 2023-03-22 23:05:44 +08:00
parent 00821b653a
commit 1a60eabada
4 changed files with 10 additions and 6 deletions

View File

@ -1518,13 +1518,14 @@
//
get_page_object(page) {
var result = [];
var pages = getCurrentPages();
for(var i=0; i<pages.length; i++) {
if(pages[i]['route'] == page) {
return pages[i];
result.push(pages[i]);
}
}
return null;
return result;
},
//

View File

@ -20,6 +20,7 @@
* 博客新增评论、点赞
* 新增组合搭配
* 新增列表快捷加入购物车
* 商品列表新增错误提示
## v2.3.22022-11-30

View File

@ -772,7 +772,7 @@ button[disabled].bg-gray {
position: absolute;
top: 0;
left: 0;
background: rgb(225 225 225 / 70%);
background: rgb(253 253 253 / 80%);
z-index: 1;
}
.goods-data-grid-list .item .error-msg,

View File

@ -254,9 +254,11 @@
switch(page[0]) {
//
case 'pages/goods-detail/goods-detail' :
var obj = app.globalData.get_page_object(page[0]);
if(obj != null) {
obj.goods_cart_count_handle(cart_total);
var res = app.globalData.get_page_object(page[0]);
if(res.length > 0) {
for(var i in res) {
res[i].$vm.goods_cart_count_handle(cart_total);
}
}
break;
}