Commit 710af31d authored by clone's avatar clone

bug

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