|
|
@ -46,7 +46,8 @@ Component({ |
|
|
tomorrow:util.formatMing(new Date()), |
|
|
tomorrow:util.formatMing(new Date()), |
|
|
afterTom:util.formatHou(new Date()), |
|
|
afterTom:util.formatHou(new Date()), |
|
|
skuName:'', |
|
|
skuName:'', |
|
|
monthList:[] |
|
|
monthList:[], |
|
|
|
|
|
scrollLeft: 0 |
|
|
}, |
|
|
}, |
|
|
lifetimes: { |
|
|
lifetimes: { |
|
|
attached: function () { |
|
|
attached: function () { |
|
|
@ -122,14 +123,21 @@ Component({ |
|
|
item.week = this.getDay(item.date) |
|
|
item.week = this.getDay(item.date) |
|
|
}) |
|
|
}) |
|
|
let seldDate = '' |
|
|
let seldDate = '' |
|
|
|
|
|
let leftIndex = 0; |
|
|
if (app.globalData.product.changeFlag) { |
|
|
if (app.globalData.product.changeFlag) { |
|
|
if( app.globalData.product.date) { |
|
|
if( app.globalData.product.date) { |
|
|
res.data.forEach(item=> { |
|
|
|
|
|
|
|
|
res.data.forEach((item,index)=> { |
|
|
if (item.date == app.globalData.product.date.date) { |
|
|
if (item.date == app.globalData.product.date.date) { |
|
|
seldDate = item |
|
|
seldDate = item |
|
|
|
|
|
leftIndex = index |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
scrollLeft: 70*leftIndex |
|
|
|
|
|
}) |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.changeDate(seldDate) |
|
|
this.changeDate(seldDate) |
|
|
}) |
|
|
}) |
|
|
@ -239,7 +247,7 @@ Component({ |
|
|
for (let i = 0; i < res.data.length; i++) { |
|
|
for (let i = 0; i < res.data.length; i++) { |
|
|
|
|
|
|
|
|
if (res.data[i].stock_number > 0) { |
|
|
if (res.data[i].stock_number > 0) { |
|
|
if (app.globalData.product.changeFlag) { |
|
|
if (app.globalData.product.changeFlag && app.globalData.product.time) { |
|
|
if (res.data[i].start_time == app.globalData.product.time.start_time) { |
|
|
if (res.data[i].start_time == app.globalData.product.time.start_time) { |
|
|
timeIndex = i; |
|
|
timeIndex = i; |
|
|
break; |
|
|
break; |
|
|
|