Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
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
刘小敏
loveisland
Commits
686808a1
Commit
686808a1
authored
May 13, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页广告增加视频封面图
parent
a47125e1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
3 deletions
+39
-3
Index.php
addons/shopro/controller/Index.php
+1
-1
Ad.php
application/admin/lang/zh-cn/shopro/miniprogram/Ad.php
+1
-0
add.html
application/admin/view/shopro/miniprogram/ad/add.html
+14
-0
edit.html
application/admin/view/shopro/miniprogram/ad/edit.html
+14
-0
site.php
application/extra/site.php
+2
-2
ad.js
public/assets/js/backend/shopro/miniprogram/ad.js
+7
-0
No files found.
addons/shopro/controller/Index.php
View file @
686808a1
...
@@ -247,7 +247,7 @@ class Index extends Common
...
@@ -247,7 +247,7 @@ class Index extends Common
*/
*/
public
function
ad
()
public
function
ad
()
{
{
$ad
=
Ad
::
where
([
'status'
=>
'normal'
])
->
field
(
'title,video,link,skip_time,show_count'
)
->
order
(
'id'
,
'desc'
)
->
find
();
$ad
=
Ad
::
where
([
'status'
=>
'normal'
])
->
field
(
'title,video,
video_cover,
link,skip_time,show_count'
)
->
order
(
'id'
,
'desc'
)
->
find
();
if
(
!
$ad
)
{
if
(
!
$ad
)
{
$this
->
error
(
'暂无数据'
);
$this
->
error
(
'暂无数据'
);
}
}
...
...
application/admin/lang/zh-cn/shopro/miniprogram/Ad.php
View file @
686808a1
...
@@ -4,6 +4,7 @@ return [
...
@@ -4,6 +4,7 @@ return [
'Id'
=>
'ID'
,
'Id'
=>
'ID'
,
'Title'
=>
'标题'
,
'Title'
=>
'标题'
,
'Video'
=>
'视频'
,
'Video'
=>
'视频'
,
'Cover'
=>
'封面'
,
'Status'
=>
'状态'
,
'Status'
=>
'状态'
,
'Link'
=>
'跳转链接'
,
'Link'
=>
'跳转链接'
,
'Skip_time'
=>
'跳过等待秒数'
,
'Skip_time'
=>
'跳过等待秒数'
,
...
...
application/admin/view/shopro/miniprogram/ad/add.html
View file @
686808a1
...
@@ -21,6 +21,20 @@
...
@@ -21,6 +21,20 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Cover')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-video-cover"
data-rule=
"required"
class=
"form-control"
size=
"50"
name=
"row[video_cover]"
type=
"text"
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"faupload-video-cover"
class=
"btn btn-danger faupload"
data-input-id=
"c-video-cover"
data-mimetype=
"jpg,jpeg,png,gif"
data-multiple=
"false"
data-preview-id=
"p-video-cover"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-video-cover"
class=
"btn btn-primary fachoose"
data-input-id=
"c-video-cover"
data-mimetype=
"jpg,jpeg,png,gif"
data-multiple=
"false"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
for=
"c-video-cover"
></span>
</div>
<ul
class=
"row list-inline faupload-preview"
id=
"p-video-cover"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Link')}:
</label>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Link')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-link"
class=
"form-control"
name=
"row[link]"
type=
"text"
>
<input
id=
"c-link"
class=
"form-control"
name=
"row[link]"
type=
"text"
>
...
...
application/admin/view/shopro/miniprogram/ad/edit.html
View file @
686808a1
...
@@ -21,6 +21,20 @@
...
@@ -21,6 +21,20 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Cover')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-video-cover"
data-rule=
"required"
class=
"form-control"
size=
"50"
name=
"row[video_cover]"
type=
"text"
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"faupload-video-cover"
class=
"btn btn-danger faupload"
data-input-id=
"c-video-cover"
data-mimetype=
"jpg,jpeg,png,gif"
data-multiple=
"false"
data-preview-id=
"p-video-cover"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-video-cover"
class=
"btn btn-primary fachoose"
data-input-id=
"c-video-cover"
data-mimetype=
"jpg,jpeg,png,gif"
data-multiple=
"false"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
for=
"c-video-cover"
></span>
</div>
<ul
class=
"row list-inline faupload-preview"
id=
"p-video-cover"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Link')}:
</label>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Link')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-link"
class=
"form-control"
name=
"row[link]"
type=
"text"
value=
"{$row.link|htmlentities}"
>
<input
id=
"c-link"
class=
"form-control"
name=
"row[link]"
type=
"text"
value=
"{$row.link|htmlentities}"
>
...
...
application/extra/site.php
View file @
686808a1
<?php
<?php
return
array
(
return
array
(
'name'
=>
'
爱岛珠宝
'
,
'name'
=>
'
静文化饰品
'
,
'beian'
=>
''
,
'beian'
=>
''
,
'cdnurl'
=>
''
,
'cdnurl'
=>
''
,
'version'
=>
'1.0.
0
'
,
'version'
=>
'1.0.
3
'
,
'timezone'
=>
'Asia/Shanghai'
,
'timezone'
=>
'Asia/Shanghai'
,
'forbiddenip'
=>
''
,
'forbiddenip'
=>
''
,
'languages'
=>
'languages'
=>
...
...
public/assets/js/backend/shopro/miniprogram/ad.js
View file @
686808a1
...
@@ -33,6 +33,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...
@@ -33,6 +33,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return
'<video style="width: 250px; height: 120px;" src="'
+
val
+
'" controls="controls"></video>'
;
return
'<video style="width: 250px; height: 120px;" src="'
+
val
+
'" controls="controls"></video>'
;
}
}
},
},
{
field
:
'video_cover'
,
title
:
__
(
'Cover'
),
operate
:
false
,
formatter
:
function
(
val
,
data
)
{
return
val
;
if
(
!
val
)
return
''
;
// 返回一个 图片 标签,限制高以适应表格
return
'<img style="width: auto; height: 120px;" src="'
+
val
+
'" controls="controls"></img>'
;
}
},
{
field
:
'link'
,
title
:
__
(
'Link'
),
operate
:
false
},
{
field
:
'link'
,
title
:
__
(
'Link'
),
operate
:
false
},
{
field
:
'skip_time'
,
title
:
__
(
'Skip_time'
),
operate
:
false
},
{
field
:
'skip_time'
,
title
:
__
(
'Skip_time'
),
operate
:
false
},
{
field
:
'status'
,
title
:
__
(
'Status'
),
searchList
:
{
"normal"
:
__
(
'Normal'
),
"hidden"
:
__
(
'Hidden'
)},
formatter
:
Table
.
api
.
formatter
.
status
},
{
field
:
'status'
,
title
:
__
(
'Status'
),
searchList
:
{
"normal"
:
__
(
'Normal'
),
"hidden"
:
__
(
'Hidden'
)},
formatter
:
Table
.
api
.
formatter
.
status
},
...
...
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