This commit is contained in:
parent
f479648e62
commit
ec51ffb665
|
|
@ -67,13 +67,13 @@ class Appversion extends Base{
|
||||||
if($file){
|
if($file){
|
||||||
// 移动到框架应用根目录/public/uploads/ 目录下
|
// 移动到框架应用根目录/public/uploads/ 目录下
|
||||||
$file_name_new = $name['file_name'].'_'.$name['version_num'].'.apk';
|
$file_name_new = $name['file_name'].'_'.$name['version_num'].'.apk';
|
||||||
$info = $file->validate(['size'=>$this->file_max,'ext'=>'apk'])->move(ROOT_PATH . 'public' . DS . 'app_update_file',$file_name_new);
|
$info = $file->validate(['size'=>$this->file_max,'ext'=>'apk'])->move(ROOT_PATH . 'public' . DS . 'appupdatefile',$file_name_new);
|
||||||
if($info){
|
if($info){
|
||||||
$result = Db::table('app_version_log')->insert([
|
$result = Db::table('app_version_log')->insert([
|
||||||
'name'=>$name['file_name'],
|
'name'=>$name['file_name'],
|
||||||
'version_num'=>$name['version_num'],
|
'version_num'=>$name['version_num'],
|
||||||
'content'=>$name['content'],
|
'content'=>$name['content'],
|
||||||
'download_url'=>'http://tc.pcxbc.com/app_update_file/'.$file_name_new,
|
'download_url'=>'http://tc.pcxbc.com/appupdatefile/'.$file_name_new,
|
||||||
'create_time'=>date('Y-m-d H:i:s'),
|
'create_time'=>date('Y-m-d H:i:s'),
|
||||||
]);
|
]);
|
||||||
if($result){
|
if($result){
|
||||||
|
|
|
||||||
|
|
@ -121,13 +121,23 @@
|
||||||
data:formdata, //参数值
|
data:formdata, //参数值
|
||||||
type:"POST", //请求方式
|
type:"POST", //请求方式
|
||||||
success:function(req){
|
success:function(req){
|
||||||
|
if(req.code == 0){
|
||||||
|
layer.alert("增加成功", {icon: 6},function() {
|
||||||
|
//关闭当前frame
|
||||||
|
xadmin.close();
|
||||||
|
// 可以对父窗口进行刷新
|
||||||
|
xadmin.father_reload();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
layer.alert("增加失败", {icon: 6},function() {
|
||||||
|
//关闭当前frame
|
||||||
|
xadmin.close();
|
||||||
|
// 可以对父窗口进行刷新
|
||||||
|
xadmin.father_reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
//请求成功时处理
|
//请求成功时处理
|
||||||
// layer.alert("增加成功", {icon: 6},function() {
|
|
||||||
// //关闭当前frame
|
|
||||||
// xadmin.close();
|
|
||||||
// // 可以对父窗口进行刷新
|
|
||||||
// xadmin.father_reload();
|
|
||||||
// });
|
|
||||||
console.log(req)
|
console.log(req)
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@
|
||||||
<th>版本号</th>
|
<th>版本号</th>
|
||||||
<th>描述</th>
|
<th>描述</th>
|
||||||
<th>创建时间</th>
|
<th>创建时间</th>
|
||||||
|
<th>下载</th>
|
||||||
<!-- <th>操作</th></tr> -->
|
<!-- <th>操作</th></tr> -->
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id='content'>
|
<tbody id='content'>
|
||||||
|
|
@ -84,6 +85,8 @@
|
||||||
<td>{$vo.version_num}</td>
|
<td>{$vo.version_num}</td>
|
||||||
<td>{$vo.content}</td>
|
<td>{$vo.content}</td>
|
||||||
<td>{$vo.create_time}</td>
|
<td>{$vo.create_time}</td>
|
||||||
|
<td>{$vo.download_url}</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{/volist}
|
{/volist}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue