From 9582b6a26ac8822b02258ea0ad0fd0c25a57ca3f Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Thu, 24 Aug 2023 14:41:26 +0800 Subject: [PATCH] 自定义组件优化 --- components/diy_public/diy_public.js | 19 ++++++++++++++++--- components/diy_public/diy_public.wxml | 16 ++++++++-------- pages/index/index/index.wxml | 5 ++++- pages/template/index.wxml | 5 ++++- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/components/diy_public/diy_public.js b/components/diy_public/diy_public.js index 0a610d8..d5494db 100644 --- a/components/diy_public/diy_public.js +++ b/components/diy_public/diy_public.js @@ -54,6 +54,7 @@ Component({ }, nav1:'/packageA/pages/goodsInfo/goodsInfo?', nav2:'/pages/goods/goodsInfo/goodsInfo?', + }, pageLifetimes: { @@ -345,7 +346,8 @@ Component({ } if (th.data.prom_type==9) { //幸运购 price = (all_array[i].group_price / 100) + '' - all_array[i].buy_num = all_array[i].group_joined + // all_array[i].buy_num = all_array[i].group_joined + all_array[i].buy_num = all_array[i].goods_num*1 - all_array[i].actLen*1 all_array[i].goods_name = all_array[i].title } @@ -360,7 +362,11 @@ Component({ all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 all_array[i].residue = (all_array[i].residue >= 0) ? all_array[i].residue : 0 - console.error(all_array[i].residue); + if (th.data.prom_type==9) { //幸运购 + all_array[i].residue= all_array[i].actLen + } + + // console.error(all_array[i].residue); if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { empty.push(all_array[i]) } @@ -470,7 +476,14 @@ Component({ sec: '00' } } - var txt = "goods_array[" + j + "][" + i + "].djs"; + let txt = "goods_array[" + j + "][" + i + "].djs"; + + if (!o.status && obj.day=='00' && obj.hou=='00' && obj.min=='00' && obj.sec=='01') { + let t1="goods_array[" + j + "][" + i + "].status"; + ee.setData({ + [t1]:1 + }) + } ee.setData({ [txt]: obj }); diff --git a/components/diy_public/diy_public.wxml b/components/diy_public/diy_public.wxml index bbadfc0..fc02b38 100644 --- a/components/diy_public/diy_public.wxml +++ b/components/diy_public/diy_public.wxml @@ -16,7 +16,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -422,7 +422,7 @@ - + diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index a232463..78cc564 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -484,9 +484,12 @@ - + + + + diff --git a/pages/template/index.wxml b/pages/template/index.wxml index 8d2a906..7be1c03 100644 --- a/pages/template/index.wxml +++ b/pages/template/index.wxml @@ -41,9 +41,12 @@ - + + + + -- libgit2 0.21.4