瀏覽代碼

【Fix】修改产品组合SKU请求方式为post,避免数据超长可能导致的异常

liuxiangxin 2 月之前
父節點
當前提交
90ea381212

+ 1 - 1
app/Http/Controllers/Admin/Product.php

@@ -1059,7 +1059,7 @@ class Product extends Auth{
 					$new['stock']		= $old['stock'];
 					$new['status']		= $old['status'];
 					$new['min_quota']	= $old['min_quota'];
-					$new['quota']	= $old['quota'];
+					$new['quota']		= $old['quota'];
 				}
 			}
 			$skuList[$newKey]	= $new;

+ 2 - 0
app/Http/Middleware/VerifyCsrfToken.php

@@ -39,5 +39,7 @@ class VerifyCsrfToken extends Middleware
         'admin/custom_score/import_execl',
         // 微伴积分导入
         'admin/custom_score/import_weiban',
+        // SKU组合数据
+        'admin/product/get_sku_html',
     ];
 }

+ 1 - 1
resources/views/admin/product/add.blade.php

@@ -257,7 +257,7 @@ $(function(){
 			var name = $(this).val();
 			var formData = $('#add_spec input,select').serialize();
 			$.ajax({
-				type: 'get',
+				type: 'post',
 				url: "{{url('admin/product/get_sku_html')}}",
 				data: formData,
 				success: function(data) {

+ 1 - 1
resources/views/admin/product/copy.blade.php

@@ -381,7 +381,7 @@ $(function(){
 			var name = $(this).val();
 			var formData = $('#add_spec input,select').serialize();
 			$.ajax({
-				type: 'get',
+				type: 'post',
 				url: "{{url('admin/product/get_sku_html?product_id='.$oldData['id'])}}",
 				data: formData,
 				success: function(data) {

+ 1 - 1
resources/views/admin/product/edit.blade.php

@@ -383,7 +383,7 @@ $(function(){
 			var name = $(this).val();
 			var formData = $('#add_spec input,select').serialize();
 			$.ajax({
-				type: 'get',
+				type: 'post',
 				url: "{{url('admin/product/get_sku_html?product_id='.$oldData['id'])}}",
 				data: formData,
 				success: function(data) {