fix bug token - version
This commit is contained in:
parent
924d23dad0
commit
70d60ff51e
|
@ -3,6 +3,6 @@
|
|||
return [
|
||||
'adminEmail' => 'admin@example.com',
|
||||
"maxLogs" => 100000,
|
||||
"maxPicture" => 2,
|
||||
"maxPicture" => 5,
|
||||
"version" => "1.0.7"
|
||||
];
|
||||
|
|
|
@ -417,8 +417,8 @@ class ApiController extends Controller {
|
|||
}
|
||||
$version = \app\models\SyncUrl::findOne(['key_config' => 'version']);
|
||||
if ($version) {
|
||||
$token->data = $post['version'];
|
||||
$token->save();
|
||||
$version->data = $post['version'];
|
||||
$version->save();
|
||||
} else {
|
||||
$model = new \app\models\SyncUrl();
|
||||
$model->create([
|
||||
|
@ -469,8 +469,12 @@ class ApiController extends Controller {
|
|||
}
|
||||
|
||||
public function actionTest() {
|
||||
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||
var_dump($updating->data);
|
||||
// $updating = \app\models\SyncUrl::findOne(['key_config' => 'token']);
|
||||
$updating = \app\models\SyncUrl::find()->all();
|
||||
foreach ($updating as $key => $value) {
|
||||
echo $value->key_config . " " . $value->data . "<br>";
|
||||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
public function actionReGenFeature() {
|
||||
|
|
|
@ -578,7 +578,8 @@ class ListManagementController extends Controller {
|
|||
])), true);
|
||||
foreach ($results as $key => $value) {
|
||||
$images = [];
|
||||
foreach ($value['images'] as $k => $v) {
|
||||
$imagesReverse = array_reverse($value['images']);
|
||||
foreach ($imagesReverse as $k => $v) {
|
||||
if ($k < Yii::$app->params['maxPicture']) {
|
||||
$key = common::generateRandomString();
|
||||
$RootFolder = Yii::getAlias('@webroot') . "/data/uploads";
|
||||
|
|
Loading…
Reference in New Issue
Block a user