update CRUD list-management
This commit is contained in:
@@ -59,7 +59,7 @@ class common extends \yii\db\ActiveRecord {
|
||||
// $now = time();
|
||||
// $range = $now - $time;
|
||||
// if ($range > 60 * 60 * 12) {
|
||||
return date($format, $time);
|
||||
return date($format, $time);
|
||||
// } else {
|
||||
// return Yii::$app->formatter->asRelativeTime($time);
|
||||
// }
|
||||
@@ -171,4 +171,14 @@ class common extends \yii\db\ActiveRecord {
|
||||
return $visible;
|
||||
}
|
||||
|
||||
public static function requestToEngine($path, $data) {
|
||||
return file_get_contents("http://192.168.2.158:2305" . $path, false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST",
|
||||
'content' => json_encode($data)
|
||||
]
|
||||
]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user