Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
cd309a48
ShopXO
项目概览
飞鱼0526
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cd309a48
编写于
10月 23, 2021
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品评价新增开关
上级
edd5b045
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
42 addition
and
22 deletion
+42
-22
app/admin/view/default/site/siteset/goods.html
app/admin/view/default/site/siteset/goods.html
+9
-0
app/index/view/default/goods/index.html
app/index/view/default/goods/index.html
+7
-7
app/service/GoodsService.php
app/service/GoodsService.php
+25
-8
app/service/SystemBaseService.php
app/service/SystemBaseService.php
+1
-0
public/static/index/default/js/goods.js
public/static/index/default/js/goods.js
+0
-7
未找到文件。
app/admin/view/default/site/siteset/goods.html
浏览文件 @
cd309a48
...
...
@@ -22,6 +22,15 @@
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_is_show_goods_comments.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_is_show_goods_comments.describe}}
</span></label>
<select
name=
"{{$data.common_is_show_goods_comments.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.common_is_show_goods_comments.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
common_is_show_goods_comments
']['
value
'])
and
$
data
['
common_is_show_goods_comments
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_show_goods_category_level.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_show_goods_category_level.describe}}
</span></label>
<div
class=
"am-input-group am-input-group-sm"
>
...
...
app/index/view/default/goods/index.html
浏览文件 @
cd309a48
...
...
@@ -279,16 +279,16 @@
{{/if}}
</div>
<!--销量/浏览/评
论
-->
<!--销量/浏览/评
价
-->
<ul
class=
"tm-ind-panel"
>
<li
class=
"tm-ind-item"
>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
累计销量
</span><span
class=
"tm-count"
>
{{$goods.sales_count
}}
</span></div>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
库存
</span><span
class=
"tm-count"
>
{{$goods.inventory
}}
</span></div>
</li>
<li
class=
"tm-ind-item"
>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
浏览次数
</span><span
class=
"tm-count"
>
{{$goods.acces
s_count}}
</span></div>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
销量
</span><span
class=
"tm-count"
>
{{$goods.sale
s_count}}
</span></div>
</li>
<li
class=
"tm-ind-item
ind-panel-comment
"
>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
累计评论
</span><span
class=
"tm-count"
>
{{$goods.comment
s_count}}
</span></div>
<li
class=
"tm-ind-item"
>
<div
class=
"tm-indcon"
><span
class=
"tm-label"
>
热度
</span><span
class=
"tm-count"
>
{{$goods.acces
s_count}}
</span></div>
</li>
</ul>
...
...
@@ -732,7 +732,7 @@
</div>
{{/if}}
<!-- 评
论
-->
<!-- 评
价
-->
{{if in_array('comments', $middle_tabs_nav['type'])}}
<div
class=
"am-tab-panel goods-comment"
data-goods-id=
"{{$goods.id}}"
data-url=
"{{:MyUrl('index/goods/comments')}}"
>
<div
class=
"am-cf tabs-nav-base-container score-container"
>
...
...
@@ -770,7 +770,7 @@
<div
class=
"goods-comment-content"
></div>
<div
class=
"table-no goods-page-no-data none"
>
<i
class=
"am-icon-warning"
></i>
<span>
没有评
论
数据
</span>
<span>
没有评
价
数据
</span>
</div>
<div
class=
"goods-page-container"
></div>
</div>
...
...
app/service/GoodsService.php
浏览文件 @
cd309a48
...
...
@@ -2802,15 +2802,25 @@ class GoodsService
*/
public
static
function
GoodsDetailMiddleTabsNavList
(
$goods
)
{
// 是否展示商品评价
$is_comments
=
MyC
(
'common_is_show_goods_comments'
,
1
);
// app与web端不一致
if
(
APPLICATION
==
'app'
)
{
// 这里的 ent 值必须和系统中区域块定义的一致
$data
=
[
[
'name'
=>
'商品'
,
'ent'
=>
'.page'
],
[
'name'
=>
'评价'
,
'ent'
=>
'.goods-comment'
],
[
'name'
=>
'详情'
,
'ent'
=>
'.goods-detail'
],
];
// 是否展示商品评价
if
(
$is_comments
==
1
)
{
$data
[]
=
[
'name'
=>
'评价'
,
'ent'
=>
'.goods-comment'
];
}
// 商品详情介绍
$data
[]
=
[
'name'
=>
'详情'
,
'ent'
=>
'.goods-detail'
];
}
else
{
// 评论总数
$comments_count
=
isset
(
$goods
[
'comments_count'
])
?
$goods
[
'comments_count'
]
:
GoodsCommentsService
::
GoodsCommentsTotal
([
'goods_id'
=>
$goods
[
'id'
],
'is_show'
=>
1
]);
...
...
@@ -2826,14 +2836,21 @@ class GoodsService
'name'
=>
'详情'
,
'active'
=>
1
,
],
[
];
// 是否展示商品评价
if
(
$is_comments
==
1
)
{
$data
[]
=
[
'type'
=>
'comments'
,
'name'
=>
'评价('
.
$comments_count
.
')'
,
],
[
'type'
=>
'guess_you_like'
,
'name'
=>
'猜你喜欢'
,
]
];
}
// 猜你喜欢,目前以销量最高推荐
$data
[]
=
[
'type'
=>
'guess_you_like'
,
'name'
=>
'猜你喜欢'
,
];
}
...
...
app/service/SystemBaseService.php
浏览文件 @
cd309a48
...
...
@@ -154,6 +154,7 @@ class SystemBaseService
'common_app_is_poster_share'
=>
(
int
)
MyC
(
'common_app_is_poster_share'
),
'common_is_goods_detail_show_photo'
=>
(
int
)
MyC
(
'common_is_goods_detail_show_photo'
,
0
,
true
),
'common_is_exhibition_mode_btn_text'
=>
MyC
(
'common_is_exhibition_mode_btn_text'
,
'立即咨询'
,
true
),
'common_is_show_goods_comments'
=>
(
int
)
MyC
(
'common_is_show_goods_comments'
,
1
),
// 百度地图密钥
'common_baidu_map_ak'
=>
MyC
(
'common_baidu_map_ak'
,
null
,
true
),
...
...
public/static/index/default/js/goods.js
浏览文件 @
cd309a48
...
...
@@ -762,13 +762,6 @@ $(function() {
}
});
// 累计评价点击事件
$
(
'
.tm-ind-panel .ind-panel-comment
'
).
on
(
'
click
'
,
function
()
{
$
(
window
).
smoothScroll
({
position
:
$
(
'
.introduce-main
'
).
offset
().
top
});
$
(
'
.introduce-main .am-tabs
'
).
tabs
(
'
open
'
,
1
);
});
// tab事件
$
(
'
.introduce-main .am-tabs li
'
).
on
(
'
click
'
,
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录