Browse Source

checkredis

yuenan
娄梦宁 3 years ago
parent
commit
90ee11e6ca
2 changed files with 11 additions and 11 deletions
  1. +9
    -9
      addons/unishop/controller/Product.php
  2. +2
    -2
      application/database.php

+ 9
- 9
addons/unishop/controller/Product.php View File

@@ -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;


+ 2
- 2
application/database.php View File

@@ -16,13 +16,13 @@ return [
// 数据库类型
'type' => Env::get('database.type', 'mysql'),
// 服务器地址
'hostname' => Env::get('database.hostname', '47.101.187.29'),
'hostname' => Env::get('database.hostname', '43.129.92.193'),
// 数据库名
'database' => Env::get('database.database', 'vietnam'),
// 用户名
'username' => Env::get('database.username', 'root'),
// 密码
'password' => Env::get('database.password', 'zBg%V91jGrJPbvf5'),
'password' => Env::get('database.password', 'Kjs98dt!SHA89'),
// 端口
'hostport' => Env::get('database.hostport', ''),
// 连接dsn


Loading…
Cancel
Save