切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
926db6d2fd41e8be87574c0c28a6c11d3ad6731e
1 个父辈
ca5ff5f2
1 个管道 的构建
通过
耗费 1 秒
1
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
323 行增加
和
6 行删除
app/portal/controller/ActiveController.php
public/themes/simpleboot3/portal/active/active_detail.html
public/themes/simpleboot3/portal/brand/brand_detail.html
app/portal/controller/ActiveController.php
查看文件 @
926db6d
...
...
@@ -126,26 +126,44 @@ class ActiveController extends WeChatBaseController
//活动详情
public
function
activeDetail
()
{
$re
=
$this
->
checkUser
();
$id
=
$this
->
request
->
param
(
'id'
);
$data
=
Db
::
name
(
'active'
)
->
where
(
'id'
,
$id
)
->
find
();
$data
[
'more'
]
=
json_decode
(
$data
[
'more'
],
true
);
$data
[
'content'
]
=
cmf_replace_content_file_url
(
htmlspecialchars_decode
(
$data
[
'content'
]));
$like
=
Db
::
name
(
'like'
)
->
where
([
'cid'
=>
$id
,
'users_id'
=>
session
(
'wechat_user'
)[
'users_
id'
],
'status'
=>
2
])
->
find
();
$like
=
Db
::
name
(
'like'
)
->
where
([
'cid'
=>
$id
,
'users_id'
=>
$re
[
'
id'
],
'status'
=>
2
])
->
find
();
if
(
$like
){
$like
=
1
;
}
else
{
$like
=
0
;
}
$comment
=
Db
::
name
(
'comment'
)
->
alias
(
'c'
)
->
join
(
'users u'
,
'c.users_id=u.id'
)
->
join
(
'brand b'
,
'c.cid=b.id'
)
->
where
([
'b.id'
=>
$id
,
'c.status'
=>
2
])
->
field
(
'c.*,u.*'
)
->
select
();
$this
->
assign
(
'comment'
,
$comment
);
$this
->
assign
(
'like'
,
$like
);
$this
->
assign
(
'list'
,
$data
);
return
$this
->
fetch
();
return
$this
->
fetch
(
'active_detail'
);
}
//兑奖首页
public
function
prize
(){
$user
=
Db
::
name
(
'users'
)
->
where
(
'id'
,
session
(
'wechat_user'
)[
'users_id'
])
->
find
();
...
...
public/themes/simpleboot3/portal/active/active_detail.html
0 → 100644
查看文件 @
926db6d
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/base.css"
>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/swiper.css"
>
<script
type=
"text/javascript"
src=
"__TMPL__/public/assets/js/base.js"
></script>
<title>
活动详情
</title>
<style>
body
,
html
{
background
:
#F5F6FA
;
}
.head
{
height
:
3.6rem
;
}
.swiper-container
{
height
:
3.6rem
;
}
.swiper-slide
{
height
:
3.6rem
;
}
.swiper-slide
img
{
width
:
100%
;
height
:
100%
;
}
.body
{
height
:
1.39rem
;
padding
:
0.29rem
0.33rem
;
background
:
#fff
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.bodytext_name
{
width
:
4.5rem
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
#000000
;
font-size
:
0.32rem
;
}
.body_textdate
{
color
:
#666666
;
font-size
:
0.26rem
;
margin-top
:
0.2rem
;
}
.discuss
{
display
:
flex
;
position
:
relative
;
}
.praise
{
width
:
0.6rem
;
height
:
0.6rem
;
background
:
#CA277B
;
border-radius
:
50%
;
font-size
:
0
;
text-align
:
center
;
vertical-align
:
middle
;
margin-right
:
0.16rem
;
}
.praise
img
{
width
:
0.28rem
;
height
:
0.28rem
;
margin-top
:
0.15rem
;
}
.comment
{
width
:
1.4rem
;
height
:
0.6rem
;
background
:
#CA277B
;
color
:
#fff
;
font-size
:
0.26rem
;
text-align
:
center
;
line-height
:
0.6rem
;
border-radius
:
0.3rem
;
}
.activedetail
{
margin-top
:
0.16rem
;
background
:
#fff
;
}
.shop_tab
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
0.31rem
1.36rem
;
align-items
:
center
;
width
:
7.5rem
;
height
:
0.88rem
;
background
:
#fff
;
border-bottom
:
1px
solid
#f5f5f5
;
}
.tab
{
color
:
#97A0A8
;
font-size
:
0.26rem
;
position
:
relative
;
}
.active
{
color
:
#CA277B
;
}
.active
em
{
width
:
0.8rem
;
height
:
0.06rem
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
0.45rem
;
margin
:
0
auto
;
background
:
#CA277B
;
border-radius
:
0.03rem
;
}
.goodtail_name
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
0.36rem
;
}
.good_line
{
width
:
2.5rem
;
height
:
1px
;
background
:
#f5f5f5
;
}
.good_name
{
color
:
#999999
;
font-size
:
0.26rem
;
}
.goodtail
{
background
:
#fff
;
padding
:
0
0.24rem
0.5rem
0.24rem
;
}
.commenttail
{
background
:
#fff
;
padding
:
0
0.24rem
0.5rem
0.24rem
;
}
.goodtail_img
{
width
:
7.02rem
;
margin-top
:
0.16rem
;
}
.goodtail_img
img
{
width
:
100%
;
height
:
100%
;
}
.comment_list
{
display
:
flex
;
border-bottom
:
1px
solid
#f5f5f5
;
padding
:
0.3rem
0
;
}
.comment_img
{
width
:
0.8rem
;
height
:
0.8rem
;
border-radius
:
50%
;
font-size
:
0
;
}
.comment_img
img
{
width
:
100%
;
height
:
100%
;
}
.comment_name
{
color
:
#000000
;
font-size
:
0.3rem
;
}
.comment_date
{
color
:
#999999
;
font-size
:
0.24rem
;
}
.comment_text
{
color
:
#000000
;
font-size
:
0.28rem
;
width
:
5.86rem
;
margin-top
:
0.53rem
;
}
.comment_content
{
margin-left
:
0.19rem
;
}
.commentnum
{
width
:
0.3rem
;
text-align
:
center
;
height
:
0.3rem
;
line-height
:
0.3rem
;
background
:
#CA277B
;
border-radius
:
50%
;
color
:
#fff
;
position
:
absolute
;
left
:
0.4rem
;
font-size
:
0.2rem
;
}
</style>
</head>
<body>
<div
class=
"container"
>
<div
class=
"head"
>
<div
class=
"swiper-container"
>
<div
class=
"swiper-wrapper"
>
<foreach
name=
"list.more.photos"
item=
"vo"
>
<div
class=
"swiper-slide"
>
<img
src=
"{:cmf_get_image_preview_url($vo.url)}"
alt=
""
>
</div>
</foreach>
</div>
<div
class=
"swiper-pagination"
></div>
</div>
</div>
<div
class=
"body"
>
<div
class=
"body_text"
>
<p
class=
"bodytext_name"
>
{$list.name}
</p>
<p
class=
"body_textdate"
>
{:date('Y-m-d',$vo['active_time'])}-{:date('Y-m-d',$vo['end_time'])}
</p>
</div>
<div
class=
"discuss"
>
<p
class=
"praise"
>
<img
src=
"__TMPL__/public/assets/images/img/zan.png"
alt=
""
>
<p
class=
"commentnum"
>
{$list.dolike}
</p>
</p>
<a
href=
"{:url('portal/active/comment',array('id'=>$list.id))}"
style=
"text-decoration:none;"
>
<p
class=
"comment"
>
评论留言
</p>
</a>
</div>
</div>
<div
class=
"activedetail"
>
<div
class=
"shop_tab"
>
<p
class=
"tab active"
id=
"1"
>
<em></em>
活动详情
</p>
<P
class=
"tab"
id=
"2"
>
<em></em>
评论留言
</P>
</div>
<div
class=
"goodtail"
>
{$list.content}
<!--<div class="goodtail_name">-->
<!--<p class="good_line"></p>-->
<!--<p class="good_name">活动详情</p>-->
<!--<p class="good_line"></p>-->
<!--</div>-->
<!--<div class="goodtail_img">-->
<!--<img src="img/activetail.png" alt="">-->
<!--</div>-->
</div>
<div
class=
"commenttail"
style=
"display:none"
>
<foreach
name=
"comment"
item=
"vo"
>
<div
class=
"comment_list"
>
<div
class=
"comment_img"
>
<img
src=
"{:cmf_get_image_preview_url($vo.avatar)}"
alt=
""
>
</div>
<div
class=
"comment_content"
>
<p
class=
"comment_name"
>
{$vo.nickname}
</p>
<p
class=
"comment_date"
>
{:date('Y-m-d',$vo['create_time'])}
</p>
<div
class=
"comment_text"
>
{$vo.content}
</div>
</div>
</div>
</foreach>
</div>
</div>
</div>
</body>
<script
type=
"text/javascript"
src=
"js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/swiper.min.js"
></script>
<script>
var
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
pagination
:
{
el
:
'.swiper-pagination'
,
},
autoplay
:
true
,
//可选选项,自动滑动
})
$
(
".tab"
).
click
(
function
(){
if
(
$
(
this
).
attr
(
"id"
)
==
1
){
$
(
this
).
addClass
(
"active"
);
$
(
this
).
siblings
(
".tab"
).
removeClass
(
"active"
)
$
(
".goodtail"
).
css
(
"display"
,
"block"
);
$
(
".commenttail"
).
css
(
"display"
,
"none"
)
}
else
if
(
$
(
this
).
attr
(
"id"
)
==
2
){
$
(
this
).
addClass
(
"active"
);
$
(
this
).
siblings
(
".tab"
).
removeClass
(
"active"
)
$
(
".goodtail"
).
css
(
"display"
,
"none"
);
$
(
".commenttail"
).
css
(
"display"
,
"block"
)
}
})
//评论留言
$
(
".comment"
).
click
(
function
(){
window
.
location
.
href
=
'writeevalute.html'
})
//点赞
$
(
".discuss"
).
click
(
function
(){
window
.
event
.
stopPropagation
();
var
num
=
$
(
".commentnum"
).
html
();
num
++
;
$
(
".commentnum"
).
html
(
num
)
})
</script>
</html>
...
...
public/themes/simpleboot3/portal/brand/brand_detail.html
查看文件 @
926db6d
...
...
@@ -300,10 +300,6 @@
}
})
//评论留言
$
(
".comment"
).
click
(
function
(){
window
.
location
.
href
=
'writeevalute.html'
})
//点赞
$
(
".praise"
).
click
(
function
(){
// alert("{$list.id}")
...
...
请
注册
或
登录
后发表评论