Commit 4a48da50 authored by shajiaiming's avatar shajiaiming

fix

parent fd90b085
......@@ -154,10 +154,10 @@ class ApplicationController extends BaseController
#echo json_encode($applicate);exit;
$applicate['sort'] = $app_cate->sort;
$name_arr = json_decode($applicate['name'], true);
$applicate['name_ja'] = $name_arr['ja'];
$applicate['name_en'] = $name_arr['en-US'];
$applicate['name_zh'] = $name_arr['zh-CN'];
$applicate['name_ko'] = $name_arr['ko'];
$applicate['name_ja'] = isset($name_arr['ja']) ? $name_arr['ja'] : '';
$applicate['name_en'] = isset($name_arr['en-US']) ? $name_arr['en-US'] : '';
$applicate['name_zh'] = isset($name_arr['zh-CN']) ? $name_arr['zh-CN'] : '';
$applicate['name_ko'] = isset($name_arr['ko']) ? $name_arr['ko'] : '';
$this->layout = false;
return $this->render('edit', ['item' => $applicate, 'category_id' => $category_id]);
}
......
......@@ -34,25 +34,25 @@
<div class="layui-inline">
<label class="layui-form-label">中文名</label>
<div class="layui-input-block" style="width: 250px">
<input class="layui-input" name="nickname[zh-CN]" value="<?= $model->nickname['zh-CN'] ?>">
<input class="layui-input" name="nickname[zh-CN]" value="<?= isset($model->nickname['zh-CN']) ? $model->nickname['zh-CN'] : '' ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">英文名</label>
<div class="layui-input-block" style="width: 250px">
<input class="layui-input" name="nickname[en-US]" value="<?= $model->nickname['en-US'] ?>">
<input class="layui-input" name="nickname[en-US]" value="<?= isset($model->nickname['en-US']) ? $model->nickname['en-US'] : '' ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">日文名</label>
<div class="layui-input-block" style="width: 250px">
<input class="layui-input" name="nickname[ja]" value="<?= $model->nickname['ja'] ?>">
<input class="layui-input" name="nickname[ja]" value="<?= isset($model->nickname['ja']) ? $model->nickname['ja'] : '' ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">韩文名</label>
<div class="layui-input-block" style="width: 250px">
<input class="layui-input" name="nickname[ko]" value="<?= $model->nickname['ko'] ?>">
<input class="layui-input" name="nickname[ko]" value="<?= isset($model->nickname['ko']) ? $model->nickname['ko'] : '' ?>">
</div>
</div>
<div class="layui-form-item">
......@@ -147,25 +147,25 @@
<div class="layui-form-item">
<label class="layui-form-label">中文介绍</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="introduce[zh-CN]"><?= $model->introduce['zh-CN'] ?></textarea>
<textarea class="layui-textarea" name="introduce[zh-CN]"><?= isset($model->introduce['zh-CN']) ? $model->introduce['zh-CN'] : '' ?></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">英文介绍</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="introduce[en-US]"><?= $model->introduce['en-US'] ?></textarea>
<textarea class="layui-textarea" name="introduce[en-US]"><?= isset($model->introduce['en-US']) ? $model->introduce['en-US'] : '' ?></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">日文介绍</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="introduce[ja]"><?= $model->introduce['ja'] ?></textarea>
<textarea class="layui-textarea" name="introduce[ja]"><?= isset($model->introduce['ja']) ? $model->introduce['ja'] : '' ?></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">韩文介绍</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="introduce[ko]"><?= $model->introduce['ko'] ?></textarea>
<textarea class="layui-textarea" name="introduce[ko]"><?= isset($model->introduce['ko']) ? $model->introduce['ko'] : '' ?></textarea>
</div>
</div>
<div class="layui-inline">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment