update sync server
This commit is contained in:
parent
fc347376d3
commit
9bdfb205f6
|
@ -123,13 +123,39 @@ class ApiController extends Controller {
|
|||
"gender" => $value->gender,
|
||||
"birthday" => $value->birthday,
|
||||
"telephone" => $value->telephone,
|
||||
"address" => $value->address,
|
||||
"department" => $value->address,
|
||||
"time" => $value->time,
|
||||
"image" => $f
|
||||
"images" => $f
|
||||
];
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
public function actionGetAllImage() {
|
||||
Yii::$app->response->format = "json";
|
||||
$lists = ListManagement::find()->orderBy(['id' => SORT_DESC])->all();
|
||||
$res = [];
|
||||
foreach ($lists as $key => $value) {
|
||||
$f = [];
|
||||
$features = json_decode($value->image, true);
|
||||
foreach ($features as $k => $v) {
|
||||
$f[] = Yii::$app->request->hostInfo . "/data/uploads/face/" . $v['url'];
|
||||
}
|
||||
$res[] = [
|
||||
"id" => $value->id,
|
||||
"code" => $value->code,
|
||||
"type" => $value->type,
|
||||
"name" => $value->name,
|
||||
"gender" => $value->gender,
|
||||
"birthday" => $value->birthday,
|
||||
"telephone" => $value->telephone,
|
||||
"address" => $value->address,
|
||||
"time" => $value->time,
|
||||
"image" => $f
|
||||
];
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -339,6 +339,7 @@ class ListManagementController extends Controller {
|
|||
$model = ListManagement::findOne(['code' => $data['idStaff']]);
|
||||
if ($model) {
|
||||
$model->name = $data['name'];
|
||||
$model->address = $data['department'];
|
||||
$model->image = json_encode($ft);
|
||||
$model->last_modified = time();
|
||||
$model->save();
|
||||
|
@ -352,7 +353,7 @@ class ListManagementController extends Controller {
|
|||
'gender' => "",
|
||||
'birthday' => "",
|
||||
'telephone' => "",
|
||||
'address' => ""
|
||||
'address' => $data['department']
|
||||
]);
|
||||
}
|
||||
return ["status" => true];
|
||||
|
|
|
@ -51,7 +51,7 @@ class ListManagement extends \yii\db\ActiveRecord {
|
|||
'gender' => 'Gender',
|
||||
'birthday' => 'Birthday',
|
||||
'telephone' => 'Telephone',
|
||||
'address' => 'Address',
|
||||
'address' => 'Department',
|
||||
'time' => 'Registration time',
|
||||
'last_modified' => 'Last Modified'
|
||||
];
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-right">Address</div>
|
||||
<div class="col-md-4 text-right">Department</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" name="Address">
|
||||
</div>
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-right">Address</div>
|
||||
<div class="col-md-4 text-right">Department</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" name="Address">
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<th>Registration time</th>
|
||||
<th>Birthday</th>
|
||||
<th>Telephone</th>
|
||||
<th>Address</th>
|
||||
<th>Department</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="sync-lists">
|
||||
|
|
Loading…
Reference in New Issue
Block a user