From ca425b889f3c1b5847ffc26a0229307f7f8ef43e Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Tue, 09 Dec 2025 16:11:31 +0800
Subject: [PATCH] 添加消费券 商户端添加页面diy
---
admin/app/supplier/controller/product/Product.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/admin/app/supplier/controller/product/Product.php b/admin/app/supplier/controller/product/Product.php
index 1381fc0..757b6d0 100644
--- a/admin/app/supplier/controller/product/Product.php
+++ b/admin/app/supplier/controller/product/Product.php
@@ -52,6 +52,7 @@
$data = json_decode($this->postData()['params'], true);
$data['is_newcomer'] = $supplier['is_newcomer'];
$data['is_repurchase'] = $supplier['is_repurchase'];
+ $data['is_vip'] = $supplier['is_vip'];
// 添加商品
if($scene == 'copy'){
unset($data['create_time']);
@@ -91,7 +92,7 @@
*/
public function getBaseData($supplier)
{
- return $this->renderSuccess('', array_merge(ProductService::getEditData(null, 'add', $this->getSupplierId()),['is_newcomer'=>$supplier['is_newcomer'],'is_repurchase'=>$supplier['is_repurchase']]));
+ return $this->renderSuccess('', array_merge(ProductService::getEditData(null, 'add', $this->getSupplierId()),['is_newcomer'=>$supplier['is_newcomer'],'is_repurchase'=>$supplier['is_repurchase'],'is_vip'=>$supplier['is_vip']]));
}
/**
@@ -113,12 +114,13 @@
$model = ProductModel::detail($product_id);
$is_newcomer = $supplier['is_newcomer'];
$is_repurchase = $supplier['is_repurchase'];
+ $is_vip = $supplier['is_vip'];
$supplierName='';
if($model['belonging_shop_supplier_id']){
$belonging_shop_supplier= SupplierModel::detail($model['belonging_shop_supplier_id']);
$supplierName=$belonging_shop_supplier['name'];
}
- return $this->renderSuccess('', array_merge(ProductService::getEditData($model, $scene, $this->getSupplierId()), compact('model','is_newcomer','is_repurchase','supplierName')));
+ return $this->renderSuccess('', array_merge(ProductService::getEditData($model, $scene, $this->getSupplierId()), compact('model','is_newcomer','is_repurchase','is_vip','supplierName')));
}
if ($scene == 'copy') {
return $this->add($scene);
@@ -128,6 +130,7 @@
$data = json_decode($this->postData()['params'], true);
$data['is_newcomer'] = $supplier['is_newcomer'];
$data['is_repurchase'] = $supplier['is_repurchase'];
+ $data['is_vip'] = $supplier['is_vip'];
// 更新记录
if ($model->edit($data,$this->getSupplierId())) {
return $this->renderSuccess('更新成功');
--
Gitblit v1.9.2