...
This commit is contained in:
parent
a4f3ce1a04
commit
af5ca79653
@ -774,12 +774,31 @@ class ShopController extends BaseAuthedController
|
|||||||
$chk = $this->getTodayLastDailySelection($address);
|
$chk = $this->getTodayLastDailySelection($address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 预检查是否有表格更新,未必能检测准确,但是可以避免大部分情况下的错误
|
||||||
|
$check = true;
|
||||||
|
$selection = $chk[0];
|
||||||
|
$pre_goodsList = array();
|
||||||
|
for ($i = 1; $i <= 6; $i++) {
|
||||||
|
$pre_goodsList[$i] = mt\Dailyselection::get($selection['grid_' . $i]);
|
||||||
|
if (!$pre_goodsList[$i]) {
|
||||||
|
$check = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$check) {
|
||||||
|
$chk = $this->refreshDailySelectionWithMode($address, 0);
|
||||||
|
$chk = $this->getTodayLastDailySelection($address);
|
||||||
|
$selection = $chk[0];
|
||||||
|
}
|
||||||
|
|
||||||
$selection = $chk[0];
|
$selection = $chk[0];
|
||||||
$goodsList = array();
|
$goodsList = array();
|
||||||
for ($i = 1; $i <= 6; $i++) {
|
for ($i = 1; $i <= 6; $i++) {
|
||||||
$goodsList[$i] = mt\Dailyselection::get($selection['grid_' . $i]);
|
$goodsList[$i] = mt\Dailyselection::get($selection['grid_' . $i]);
|
||||||
$goodsList[$i]['count'] = $selection['count_' . $i];
|
if ($goodsList[$i]) {
|
||||||
$goodsList[$i]['pending'] = $this->checkPendingBuyGoodsDS($address, $goodsList[$i]['goods_id'], $selection['idx'], $i);
|
$goodsList[$i]['count'] = $selection['count_' . $i];
|
||||||
|
$goodsList[$i]['pending'] = $this->checkPendingBuyGoodsDS($address, $goodsList[$i]['goods_id'], $selection['idx'], $i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = $this->countTodayRefreshTimes($address);
|
$count = $this->countTodayRefreshTimes($address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user