Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
8174084d
Commit
8174084d
authored
Aug 02, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
a91b1ed3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
11 deletions
+8
-11
Version.php
application/index/controller/Version.php
+2
-2
index.html
application/index/view/version/index.html
+3
-6
AppVersion.php
application/model/AppVersion.php
+1
-1
version.js
public/resource/js/version.js
+2
-2
No files found.
application/index/controller/Version.php
View file @
8174084d
...
@@ -56,13 +56,13 @@ class Version extends Basic
...
@@ -56,13 +56,13 @@ class Version extends Basic
$param
[
"app_path"
]
=
$_POST
[
"app_path"
];
$param
[
"app_path"
]
=
$_POST
[
"app_path"
];
$param
[
"is_update"
]
=
$_POST
[
"is_update"
];
$param
[
"is_update"
]
=
$_POST
[
"is_update"
];
if
(
!
isset
(
$param
[
"version_no"
])
||
!
isset
(
$param
[
"type"
]))
{
if
(
empty
(
$param
[
"version_no"
])
||
empty
(
$param
[
"type"
]))
{
$this
->
response
(
"101"
,
"版本号或app类型不能为空"
);
$this
->
response
(
"101"
,
"版本号或app类型不能为空"
);
}
}
if
(
$param
[
"type"
]
==
0
||
$param
[
"type"
]
==
2
&&
isset
(
$param
[
"app_path"
]))
{
if
(
$param
[
"type"
]
==
0
||
$param
[
"type"
]
==
2
&&
isset
(
$param
[
"app_path"
]))
{
$this
->
response
(
"101"
,
"安卓请上传安装包"
);
$this
->
response
(
"101"
,
"安卓请上传安装包"
);
}
}
if
(
!
isset
(
$param
[
"is_update"
]))
{
if
(
empty
(
$param
[
"is_update"
]))
{
$this
->
response
(
"101"
,
"是否强制更新为必填"
);
$this
->
response
(
"101"
,
"是否强制更新为必填"
);
}
}
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
...
...
application/index/view/version/index.html
View file @
8174084d
...
@@ -67,19 +67,16 @@
...
@@ -67,19 +67,16 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
style=
"text-align: right"
>
强制更新:
</label>
<label
class=
"col-sm-3 control-label"
style=
"text-align: right"
>
是否
强制更新:
</label>
<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=
"isUpdateRadios"
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=
"isUpdateRadios"
id=
"is_update_2"
<input
type=
"radio"
name=
"isUpdateRadios"
id=
"is_update_2"
value=
"1"
>
强制更新
value=
"1"
>
非强制更新
</label>
</label>
</div>
</div>
</div>
</div>
...
...
application/model/AppVersion.php
View file @
8174084d
...
@@ -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,IF(is_update = 1,'是','否') as is_update"
)
return
$this
->
field
(
"id,version_no,IF(type = 1
|| type =3
,'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
();
...
...
public/resource/js/version.js
View file @
8174084d
...
@@ -25,7 +25,7 @@ define(['doT', 'text!temp/version_template_tpl.html', 'ckfinder', 'ckfinderStart
...
@@ -25,7 +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
.
is
U
pdate
=
$
(
"input[name = isUpdateRadios]:checked"
).
val
();
params
.
is
_u
pdate
=
$
(
"input[name = isUpdateRadios]:checked"
).
val
();
if
(
!
params
.
type
||
params
.
type
==
null
)
{
if
(
!
params
.
type
||
params
.
type
==
null
)
{
alert
(
"类型不能为空"
);
alert
(
"类型不能为空"
);
...
@@ -39,7 +39,7 @@ define(['doT', 'text!temp/version_template_tpl.html', 'ckfinder', 'ckfinderStart
...
@@ -39,7 +39,7 @@ define(['doT', 'text!temp/version_template_tpl.html', 'ckfinder', 'ckfinderStart
alert
(
"下载地址不能为空"
);
alert
(
"下载地址不能为空"
);
return
false
;
return
false
;
}
}
if
(
!
params
.
is
Update
||
params
.
isU
pdate
==
null
)
{
if
(
!
params
.
is
_update
||
params
.
is_u
pdate
==
null
)
{
alert
(
"是否强制更新不能为空"
);
alert
(
"是否强制更新不能为空"
);
return
false
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment