切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
7 years ago
提交
8cee3b6cf20a1af6030005ceb773da95bce1d92e
1 个父辈
3dca78c4
1 个管道 的构建
通过
耗费 0 秒
测试反馈修改
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
57 行增加
和
7 行删除
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
查看文件 @
8cee3b6
...
...
@@ -78,9 +78,21 @@ class ActiveController extends WeChatBaseController
$this
->
assign
(
'list'
,
$data
);
return
$this
->
fetch
(
'active_detail'
);
}
public
function
comment
(){
$id
=
$this
->
request
->
param
(
'id'
);
$this
->
assign
(
'id'
,
$id
);
$re
=
Db
::
name
(
'users'
)
->
where
([
'open_id'
=>
session
(
'wechat_user'
)[
'id'
]])
->
find
();
if
(
!
$re
[
'mobile'
]){
return
2
;
}
else
{
return
url
(
'portal/active/comment2'
,
array
(
'id'
=>
$id
));
}
}
public
function
comment2
(){
$id
=
$this
->
request
->
param
(
'id'
);
$this
->
assign
(
'id'
,
$id
);
return
$this
->
fetch
();
}
...
...
public/themes/simpleboot3/portal/active/active_detail.html
查看文件 @
8cee3b6
...
...
@@ -232,11 +232,9 @@
</eq>
<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"
>
...
...
@@ -334,7 +332,7 @@
window
.
location
.
reload
();
}
else
if
(
data
==
3
){
var
a
=
confirm
(
"
是否
注册"
)
var
a
=
confirm
(
"
请先
注册"
)
if
(
a
==
true
){
window
.
location
.
href
=
"{:url('user/register/register')}"
}
...
...
@@ -342,5 +340,26 @@
}
})
})
//注册
$
(
".comment"
).
click
(
function
(){
$
.
ajax
({
url
:
"{:url('portal/active/comment')}"
,
type
:
"post"
,
data
:
{
id
:
"{$list.id}"
,
},
success
:
function
(
data
)
{
if
(
data
==
1
)
{
window
.
location
.
href
=
"{:url('portal/active/comment2'}"
}
else
{
var
a
=
confirm
(
"是否注册"
)
if
(
a
==
true
){
window
.
location
.
href
=
data
}
}
}
})
})
</script>
</html>
...
...
public/themes/simpleboot3/portal/brand/brand_detail.html
查看文件 @
8cee3b6
...
...
@@ -248,11 +248,9 @@
</eq>
<p
class=
"commentnum"
>
{$list.dolike}
</p>
</p>
<a
href=
"{:url('portal/brand/comment',array('id'=>$list.id))}"
style=
"text-decoration:none;"
>
<p
class=
"comment"
>
评论留言
</p>
</a>
</div>
</div>
</div>
...
...
@@ -339,7 +337,7 @@
window
.
location
.
reload
();
}
else
if
(
data
==
3
){
var
a
=
confirm
(
"
是否
注册"
)
var
a
=
confirm
(
"
请先
注册"
)
if
(
a
==
true
){
window
.
location
.
href
=
"{:url('user/register/register')}"
}
...
...
@@ -349,6 +347,27 @@
}
})
})
//注册
$
(
".comment"
).
click
(
function
(){
$
.
ajax
({
url
:
"{:url('portal/brand/comment')}"
,
type
:
"post"
,
data
:
{
id
:
"{$list.id}"
,
},
success
:
function
(
data
)
{
if
(
data
==
1
)
{
window
.
location
.
href
=
"{:url('portal/brand/comment2'}"
}
else
{
var
a
=
confirm
(
"是否注册"
)
if
(
a
==
true
){
window
.
location
.
href
=
data
}
}
}
})
})
</script>
</body>
</html>
...
...
请
注册
或
登录
后发表评论