From 4a83c3983167d8cea2f686f17d3d8c37262522c2 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Mon, 28 Mar 2022 20:07:17 +0800 Subject: [PATCH] setter --- .../config/distribution_proportion.html | 16 +++++++++++--- .../config/distribution_proportion_user.html | 21 +++++++++++++------ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/view/manager/config/distribution_proportion.html b/view/manager/config/distribution_proportion.html index 74682f1..540c328 100644 --- a/view/manager/config/distribution_proportion.html +++ b/view/manager/config/distribution_proportion.html @@ -60,12 +60,22 @@ $("#price").text(0); return false; } - if (agency < consumer) { - + if(agency>0 || consumer>0){ + if (agency < consumer) { + $("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency))); + }else{ + $("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer))); + } + }else if(agency>0){ $("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency))); - }else{ + } + else if(consumer>0){ $("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer))); } + else{ + $("#price").text(0); + } + } jsPrice(); \ No newline at end of file diff --git a/view/manager/config/distribution_proportion_user.html b/view/manager/config/distribution_proportion_user.html index 9625fa2..d1b8d52 100644 --- a/view/manager/config/distribution_proportion_user.html +++ b/view/manager/config/distribution_proportion_user.html @@ -18,7 +18,7 @@