|
|
@@ -17,19 +17,16 @@ class ShopExtController extends BaseController
|
|
|
{
|
|
|
$shopId = $this->shopId;
|
|
|
$ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|
|
|
- if (isset($ext->printSn) && !empty($ext->printSn)) {
|
|
|
- util::fail('您已经添加过了');
|
|
|
- }
|
|
|
$get = Yii::$app->request->get();
|
|
|
- $sn = $get['sn'] ?? '';
|
|
|
- $key = $get['key'] ?? '';
|
|
|
- $print = new printUtil($sn);
|
|
|
+ $printSn = $get['printSn'] ?? '';
|
|
|
+ $printKey = $get['printKey'] ?? '';
|
|
|
+ $print = new printUtil($printSn);
|
|
|
$shop = $this->shop;
|
|
|
$shopName = $shop['shopName'] ?? '';
|
|
|
- $ext->printSn = $sn;
|
|
|
- $ext->printKey = $key;
|
|
|
+ $ext->printSn = $printSn;
|
|
|
+ $ext->printKey = $printKey;
|
|
|
$ext->save();
|
|
|
- $return = $print->addPrint($key, $shopName);
|
|
|
+ $return = $print->addPrint($printKey, $shopName);
|
|
|
if ($return) {
|
|
|
util::complete();
|
|
|
}
|