|
|
@@ -22,6 +22,22 @@ use Yii;
|
|
|
class ItemController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //取消花材的限购,重新开始计算
|
|
|
+ public function actionClearLimitBuy()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? '';
|
|
|
+ $item = ItemClass::getById($id, true);
|
|
|
+ if (empty($item)) {
|
|
|
+ util::fail('没有找到花材');
|
|
|
+ }
|
|
|
+ if ($item->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的花材');
|
|
|
+ }
|
|
|
+ ProductClass::cancelLimitBuy($id);
|
|
|
+ util::complete('清除成功');
|
|
|
+ }
|
|
|
+
|
|
|
public function actionModifyWeight()
|
|
|
{
|
|
|
$shop = $this->shop;
|