Commit bc88aab0 authored by zw's avatar zw

强制更细

parent edbfcca2
......@@ -54,6 +54,7 @@ class Version extends Basic
$param["intro"] = $_POST["intro"];
$param["type"] = $_POST["type"];
$param["app_path"] = $_POST["app_path"];
$param["is_update"] = $_POST["is_update"];
if (!isset($param["version_no"]) || !isset($param["type"])) {
$this->response("101", "版本号或app类型不能为空");
......@@ -61,6 +62,9 @@ class Version extends Basic
if ($param["type"] == 0 || $param["type"] == 2 && isset($param["app_path"])) {
$this->response("101", "安卓请上传安装包");
}
if (!isset($param["is_update"])) {
$this->response("101", "是否强制更新为必填");
}
$param["create_time"] = date("Y-m-d H:i:s", time());
$param["update_time"] = date("Y-m-d H:i:s", time());
$result = $this->appVersion->addVersion($param);
......
......@@ -66,6 +66,24 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" style="text-align: right">强制更新:</label>
<div class="col-sm-9">
<div class="radio" style="display: inline-block">
<label>
<input type="radio" name="optionsRadios" 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"
value="1">非强制更新
</label>
</div>
</div>
</div>
<div class="form-group show_select_page">
<!--<label class="col-sm-3 control-label" style="text-align: right">上传包:</label>
......@@ -107,8 +125,9 @@
<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:55%;">发布简述</th>
<th class="text-center" style="width:50%;">发布简述</th>
</tr>
</thead>
<tbody id="sublet_list" class="text-center">
......
......@@ -23,7 +23,7 @@ class AppVersion extends Model
$param["type"] = $type;
$param["is_del"] = 0;
// return $this->field("id,version_no,type,create_time,intro,CONCAT('".CK_IMG_URL."' , app_path) as app_path")
return $this->field("id,version_no,type,create_time,intro, app_path")
return $this->field("id,version_no,type,create_time,intro, app_path,is_update")
->where($param)
->order("id desc")
->limit(1)
......@@ -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")
return $this->field("id,version_no,IF(type = 1,'ios','android') as type ,create_time,intro,app_path,is_update")
->where($param)
->order("id desc")
->select();
......
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