File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,12 @@ <h1>Доставка цветов</h1>
9696 </ p >
9797 < p >
9898 При совмещении нескольких заказов стоимость каждого последующего заказа рассчитывается как:< br >
99- < mark > cost = 5 * duration</ mark >
99+ < mark > cost = max(100, 5 * duration) </ mark >
100100 </ p >
101101 < p >
102102 < mark > cost</ mark > - стоимость доставки< br >
103- < mark > duration</ mark > - продолжительность доставки в минутах в одну сторону
103+ < mark > duration</ mark > - продолжительность доставки в минутах в одну сторону< br >
104+ Стоимость доставки всегда кратна < mark > 10</ mark > , округление происходит в ближайшую сторону
104105 </ p >
105106 </ div >
106107 </ div >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.component('calc-item', {
2929 } ,
3030 computed : {
3131 cost : function ( ) {
32- return this . duration * 5
32+ return Math . round ( Math . max ( this . duration * 5 , 100 ) / 10 ) * 10
3333 }
3434 } ,
3535 methods : {
@@ -58,7 +58,7 @@ var app = new Vue({
5858 } ,
5959 computed : {
6060 cost : function ( ) {
61- return Math . round ( 450 + Math . atan ( ( this . duration - 30 ) / 20 ) * 230 )
61+ return Math . round ( ( 450 + Math . atan ( ( this . duration - 30 ) / 20 ) * 230 ) / 10 ) * 10
6262 } ,
6363 totalDuration : function ( ) {
6464 return this . duration + this . additionalDuration
You can’t perform that action at this time.
0 commit comments