feature/main20240421
郭嘉 6 months ago
parent 73ed2ad9fc
commit a226de402b
  1. 2
      app/store/controller/setting/Payment.php
  2. 6
      app/store/model/Payment.php

@ -35,7 +35,7 @@ class Payment extends Controller
$model = new PaymentModel;
$postform = $this->postForm();
//$postform['merchant_id'] = $this->merchantId;
if ($model->updateOptions($postform, $this->merchantId)) {
if ($model->updateOptions($postform/*, $this->merchantId*/)) {
return $this->renderSuccess('更新成功');
}
return $this->renderError($model->getError() ?: '更新失败');

@ -30,7 +30,7 @@ class Payment extends PaymentModel
public function updateOptions(array $form, $merchantId = 0): bool
{
// 生成写入的数据
$dataList = $this->buildData($form, $merchantId);
$dataList = $this->buildData($form/*, $merchantId*/);
// 删除所有的支付方式记录
static::deleteAll([]);
// 批量写入商品图片记录
@ -65,7 +65,7 @@ class Payment extends PaymentModel
* @param array $form
* @return array[]
*/
private function buildData(array $form, $merchantId = 0): array
private function buildData(array $form/*, $merchantId = 0*/): array
{
$data = [];
foreach ($form as $item) {
@ -79,7 +79,7 @@ class Payment extends PaymentModel
'is_default' => (int)$method['is_default'],
'others' => [],
'store_id' => self::$storeId,
'merchant_id' => $merchantId,
//'merchant_id' => $merchantId,
];
}
}

Loading…
Cancel
Save