|
|
@@ -42,15 +42,15 @@ class Product extends Base |
|
|
|
$data->save(); |
|
|
|
|
|
|
|
//服务 |
|
|
|
$server = explode(',', $data->server); |
|
|
|
$configServer = json_decode(Config::getByName('server')['value'],true); |
|
|
|
$serverValue = []; |
|
|
|
foreach ($server as $k => $v) { |
|
|
|
if (isset($configServer[$v])) { |
|
|
|
$serverValue[] = $configServer[$v]; |
|
|
|
} |
|
|
|
} |
|
|
|
$data->server = count($serverValue) ? implode(' · ', $serverValue) : ''; |
|
|
|
// $server = explode(',', $data->server); |
|
|
|
// $configServer = json_decode(Config::getByName('server')['value'],true); |
|
|
|
// $serverValue = []; |
|
|
|
// foreach ($server as $k => $v) { |
|
|
|
// if (isset($configServer[$v])) { |
|
|
|
// $serverValue[] = $configServer[$v]; |
|
|
|
// } |
|
|
|
// } |
|
|
|
// $data->server = count($serverValue) ? implode(' · ', $serverValue) : ''; |
|
|
|
|
|
|
|
// 默认没有收藏 |
|
|
|
$data->favorite = false; |
|
|
|