update new feature
This commit is contained in:
@@ -118,14 +118,24 @@ class ListManagement extends \yii\db\ActiveRecord {
|
||||
|
||||
public function getAllFeatures() {
|
||||
$features = json_decode($this->image, true);
|
||||
$f = [];
|
||||
// $f = [];
|
||||
// foreach ($features as $k => $v) {
|
||||
// $f[] = $v['features'];
|
||||
// if (isset($v['features512']))
|
||||
// if (count($v['features512']))
|
||||
// $f[] = $v['features512'];
|
||||
// }
|
||||
$feature1 = $feature2 = [];
|
||||
foreach ($features as $k => $v) {
|
||||
$f[] = $v['features'];
|
||||
$feature1[] = $v['features'];
|
||||
if (isset($v['features512']))
|
||||
if (count($v['features512']))
|
||||
$f[] = $v['features512'];
|
||||
$feature2[] = $v['features512'];
|
||||
}
|
||||
return $f;
|
||||
return [
|
||||
"feature1" => $feature1,
|
||||
"feature2" => $feature2
|
||||
];
|
||||
}
|
||||
|
||||
public static function statisticFeatures() {
|
||||
|
||||
Reference in New Issue
Block a user