Commit 710af31d authored by clone's avatar clone

bug

parent 94ebbd76
......@@ -71,14 +71,14 @@
<div class="col-sm-9">
<div class="radio" style="display: inline-block">
<label>
<input type="radio" name="optionsRadios" id="is_update_1" value="0"
<input type="radio" name="isUpdateRadios" id="is_update_1" value="0"
checked>强制更新
</label>
</div>
<div class="radio" style="display: inline-block">
<label>
<input type="radio" name="optionsRadios" id="is_update_2"
<input type="radio" name="isUpdateRadios" id="is_update_2"
value="1">非强制更新
</label>
</div>
......@@ -122,12 +122,12 @@
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th class="text-center" style="width:15%;">发布时间</th>
<th class="text-center" style="width:8%;">app类型</th>
<th class="text-center" style="width:8%;">版本号</th>
<th class="text-center" style="width:5%;">强制更新</th>
<th class="text-center" style="width:14%;">下载地址</th>
<th class="text-center" style="width:50%;">发布简述</th>
<th class="text-center">发布时间</th>
<th class="text-center">app类型</th>
<th class="text-center">版本号</th>
<th class="text-center">强制更新</th>
<th class="text-center">下载地址</th>
<th class="text-center">发布简述</th>
</tr>
</thead>
<tbody id="sublet_list" class="text-center">
......
......@@ -37,7 +37,7 @@ class AppVersion extends Model
public function getVersionList()
{
$param["is_del"] = 0;
return $this->field("id,version_no,IF(type = 1,'ios','android') as type ,create_time,intro,app_path,is_update")
return $this->field("id,version_no,IF(type = 1,'ios','android') as type ,create_time,intro,app_path,IF(is_update = 1,'是','否') as is_update")
->where($param)
->order("id desc")
->select();
......
......@@ -25,6 +25,7 @@ define(['doT', 'text!temp/version_template_tpl.html', 'ckfinder', 'ckfinderStart
params.version_no = $("#version_no").val();
params.app_path = $("#cover_image").val();
params.intro = $("#intro").val();
params.isUpdate = $("input[name = isUpdateRadios]:checked").val();
if (!params.type || params.type == null) {
alert("类型不能为空");
......@@ -38,6 +39,10 @@ define(['doT', 'text!temp/version_template_tpl.html', 'ckfinder', 'ckfinderStart
alert("下载地址不能为空");
return false;
}
if (!params.isUpdate || params.isUpdate == null) {
alert("是否强制更新不能为空");
return false;
}
Version.addVersion(params);
});
......
......@@ -5,6 +5,7 @@
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]["type"] %]</td>
<td>[%= it[item]["version_no"] %] </td>
<td>[%= it[item]["is_update"] %] </td>
<td>[%= it[item]["app_path"] || '---' %]</td>
<td>[%= it[item]["intro"] %]</td>
</tr>
......
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