Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
鹿
鹿马108官网
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
鹿马108官网
Commits
b11c86b3
Commit
b11c86b3
authored
Mar 11, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addxx
parent
9bfe0193
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
269 additions
and
0 deletions
+269
-0
application/admin/view/news/add.html
application/admin/view/news/add.html
+123
-0
application/admin/view/news/edit.html
application/admin/view/news/edit.html
+125
-0
application/admin/view/news/index.html
application/admin/view/news/index.html
+21
-0
No files found.
application/admin/view/news/add.html
0 → 100644
View file @
b11c86b3
<link
rel=
"stylesheet"
href=
"/assets/addons/simditor/css/simditor.min.css"
>
<form
id=
"add-form"
class=
"form-horizontal"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
""
>
{:token()}
<!-- 文章添加 -->
<div
class=
"form-group"
>
<label
for=
"c-name"
class=
"control-label col-xs-12 col-sm-2"
>
文章标题:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-name"
data-rule=
"required"
class=
"form-control"
name=
"row[news_title]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-nickname"
class=
"control-label col-xs-12 col-sm-2"
>
二级标题:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-nickname"
data-rule=
"required"
class=
"form-control"
name=
"row[secondary_title]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-image"
class=
"control-label col-xs-12 col-sm-2"
>
缩略图:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-image"
class=
"form-control"
size=
"35"
name=
"row[news_img]"
type=
"text"
value=
""
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"faupload-image"
class=
"btn btn-danger faupload"
data-input-id=
"c-image"
data-mimetype=
"image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple=
"false"
data-preview-id=
"p-image"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-image"
class=
"btn btn-primary fachoose"
data-input-id=
"c-image"
data-mimetype=
"image/*"
data-multiple=
"false"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
></span>
</div>
<ul
class=
"row list-inline faupload-preview"
id=
"p-image"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-description"
class=
"control-label col-xs-12 col-sm-2"
>
详情:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<textarea
id=
"news_comtent"
class=
"form-control"
name=
"row[news_comtent]"
></textarea>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-weigh"
class=
"control-label col-xs-12 col-sm-2"
>
排序:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-weigh"
class=
"form-control"
name=
"row[news_sort]"
type=
"number"
value=
"0"
>
</div>
</div>
<!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
</div>
</div> -->
<div
class=
"form-group layer-footer"
>
<label
class=
"control-label col-xs-12 col-sm-2"
></label>
<div
class=
"col-xs-12 col-sm-8"
>
<button
type=
"submit"
class=
"btn btn-success btn-embossed disabled"
>
{:__('OK')}
</button>
<button
type=
"reset"
class=
"btn btn-default btn-embossed"
>
{:__('Reset')}
</button>
</div>
</div>
</form>
<script
src=
"/static/js/jquery-3.3.1.min.js"
></script>
<script
src=
"/assets/addons/simditor/js/simditor.min.js"
></script>
<script>
$
(
function
(){
//news_comtent
var
editor
=
new
Simditor
({
toolbar
:
[
'
title
'
,
'
bold
'
,
'
italic
'
,
'
underline
'
,
'
strikethrough
'
,
'
fontScale
'
,
'
color
'
,
'
|
'
,
'
ol
'
,
'
ul
'
,
'
blockquote
'
,
'
code
'
,
'
table
'
,
'
|
'
,
'
link
'
,
'
image
'
,
'
hr
'
,
'
|
'
,
'
alignment
'
],
textarea
:
'
#news_comtent
'
,
placeholder
:
'
写点什么...
'
,
defaultImage
:
'
/static/home/images/logo.png
'
,
imageButton
:
[
'
upload
'
],
upload
:
{
url
:
'
../ajax/upload
'
,
params
:
{
_token
:
""
},
fileKey
:
'
file
'
,
leaveConfirm
:
'
正在上传文件..
'
,
connectionCount
:
1
},
});
//配置路径
editor
.
uploader
.
on
(
'
uploadsuccess
'
,
(
function
(
_this
)
{
return
function
(
e
,
file
,
result
)
{
console
.
log
(
_this
,
"
_this
"
);
console
.
log
(
e
,
"
e
"
);
console
.
log
(
file
,
"
file
"
);
console
.
log
(
result
,
"
result
"
);
var
$img
,
$mask
,
msg
;
if
(
!
file
.
inline
)
{
return
;
}
$img
=
file
.
img
;
$img
.
removeData
(
'
file
'
);
$img
.
removeClass
(
'
uploading
'
);
$mask
=
$img
.
data
(
'
mask
'
);
if
(
$mask
)
{
$mask
.
remove
();
}
$img
.
removeData
(
'
mask
'
);
if
(
result
.
code
!=
1
)
{
$img
.
attr
(
'
src
'
,
result
.
data
.
url
);
console
.
log
(
"
上传错误
"
);
}
else
{
$img
.
attr
(
'
src
'
,
result
.
data
.
url
);
}
editor
.
trigger
(
'
valuechanged
'
);
var
rns
=
editor
.
uploader
.
trigger
(
'
uploadready
'
,
[
file
,
result
]);
console
.
log
(
rns
,
"
rns
"
);
return
rns
;
};
})(
this
));
})
</script>
application/admin/view/news/edit.html
0 → 100644
View file @
b11c86b3
<link
rel=
"stylesheet"
href=
"/assets/addons/simditor/css/simditor.min.css"
>
<form
id=
"add-form"
class=
"form-horizontal"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
""
>
{:token()}
<!-- 文章添加 -->
<input
type=
"hidden"
name=
"news_id"
value=
"{$row.news_id}"
>
<div
class=
"form-group"
>
<label
for=
"c-name"
class=
"control-label col-xs-12 col-sm-2"
>
文章标题:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-name"
data-rule=
"required"
class=
"form-control"
name=
"row[news_title]"
type=
"text"
value=
"{$row.news_title}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-nickname"
class=
"control-label col-xs-12 col-sm-2"
>
二级标题:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-nickname"
data-rule=
"required"
class=
"form-control"
name=
"row[secondary_title]"
type=
"text"
value=
"{$row.secondary_title}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-image"
class=
"control-label col-xs-12 col-sm-2"
>
缩略图:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-image"
class=
"form-control"
size=
"35"
name=
"row[news_img]"
type=
"text"
value=
"{$row.news_img}"
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"faupload-image"
class=
"btn btn-danger faupload"
data-input-id=
"c-image"
data-mimetype=
"image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple=
"false"
data-preview-id=
"p-image"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-image"
class=
"btn btn-primary fachoose"
data-input-id=
"c-image"
data-mimetype=
"image/*"
data-multiple=
"false"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
></span>
</div>
<ul
class=
"row list-inline faupload-preview"
id=
"p-image"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-description"
class=
"control-label col-xs-12 col-sm-2"
>
详情:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<!-- value="{$row.news_comtent}" -->
<textarea
id=
"news_comtent"
class=
"form-control"
name=
"row[news_comtent]"
placeholder=
"{$row.news_comtent}"
></textarea>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"c-weigh"
class=
"control-label col-xs-12 col-sm-2"
>
排序:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-weigh"
class=
"form-control"
name=
"row[news_sort]"
type=
"number"
value=
"{$row.news_sort}"
>
</div>
</div>
<!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
</div>
</div> -->
<div
class=
"form-group layer-footer"
>
<label
class=
"control-label col-xs-12 col-sm-2"
></label>
<div
class=
"col-xs-12 col-sm-8"
>
<button
type=
"submit"
class=
"btn btn-success btn-embossed disabled"
>
{:__('OK')}
</button>
<button
type=
"reset"
class=
"btn btn-default btn-embossed"
>
{:__('Reset')}
</button>
</div>
</div>
</form>
<script
src=
"/static/js/jquery-3.3.1.min.js"
></script>
<script
src=
"/assets/addons/simditor/js/simditor.min.js"
></script>
<script>
$
(
function
(){
//news_comtent
var
editor
=
new
Simditor
({
toolbar
:
[
'
title
'
,
'
bold
'
,
'
italic
'
,
'
underline
'
,
'
strikethrough
'
,
'
fontScale
'
,
'
color
'
,
'
|
'
,
'
ol
'
,
'
ul
'
,
'
blockquote
'
,
'
code
'
,
'
table
'
,
'
|
'
,
'
link
'
,
'
image
'
,
'
hr
'
,
'
|
'
,
'
alignment
'
],
textarea
:
'
#news_comtent
'
,
placeholder
:
'
写点什么...
'
,
defaultImage
:
'
/static/home/images/logo.png
'
,
imageButton
:
[
'
upload
'
],
upload
:
{
url
:
'
../ajax/upload
'
,
params
:
{
_token
:
""
},
fileKey
:
'
file
'
,
leaveConfirm
:
'
正在上传文件..
'
,
connectionCount
:
1
},
});
//配置路径
editor
.
uploader
.
on
(
'
uploadsuccess
'
,
(
function
(
_this
)
{
return
function
(
e
,
file
,
result
)
{
console
.
log
(
_this
,
"
_this
"
);
console
.
log
(
e
,
"
e
"
);
console
.
log
(
file
,
"
file
"
);
console
.
log
(
result
,
"
result
"
);
var
$img
,
$mask
,
msg
;
if
(
!
file
.
inline
)
{
return
;
}
$img
=
file
.
img
;
$img
.
removeData
(
'
file
'
);
$img
.
removeClass
(
'
uploading
'
);
$mask
=
$img
.
data
(
'
mask
'
);
if
(
$mask
)
{
$mask
.
remove
();
}
$img
.
removeData
(
'
mask
'
);
if
(
result
.
code
!=
1
)
{
$img
.
attr
(
'
src
'
,
result
.
data
.
url
);
console
.
log
(
"
上传错误
"
);
}
else
{
$img
.
attr
(
'
src
'
,
result
.
data
.
url
);
}
editor
.
trigger
(
'
valuechanged
'
);
var
rns
=
editor
.
uploader
.
trigger
(
'
uploadready
'
,
[
file
,
result
]);
console
.
log
(
rns
,
"
rns
"
);
return
rns
;
};
})(
this
));
})
</script>
application/admin/view/news/index.html
0 → 100644
View file @
b11c86b3
<div
class=
"panel panel-default panel-intro"
>
{:build_heading()}
<div
class=
"panel-body"
>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade active in"
id=
"one"
>
<div
class=
"widget-body no-padding"
>
<div
id=
"toolbar"
class=
"toolbar"
>
{:build_toolbar('refresh,add,delete')}
</div>
<table
id=
"table"
class=
"table table-striped table-bordered table-hover"
data-operate-edit=
"{:$auth->check('news/edit')}"
data-operate-del=
"{:$auth->check('news/del')}"
width=
"100%"
>
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
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