Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
77e21a40
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,发现更多精彩内容 >>
提交
77e21a40
编写于
3月 13, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
问答系统优化+后台数据编辑优化
上级
804012bf
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
330 addition
and
106 deletion
+330
-106
application/admin/controller/Admin.php
application/admin/controller/Admin.php
+5
-3
application/admin/controller/Apphomenav.php
application/admin/controller/Apphomenav.php
+4
-2
application/admin/controller/Article.php
application/admin/controller/Article.php
+4
-2
application/admin/controller/Brand.php
application/admin/controller/Brand.php
+4
-2
application/admin/controller/Customview.php
application/admin/controller/Customview.php
+4
-2
application/admin/controller/Goods.php
application/admin/controller/Goods.php
+3
-1
application/admin/controller/Power.php
application/admin/controller/Power.php
+6
-4
application/admin/controller/Slide.php
application/admin/controller/Slide.php
+4
-2
application/admin/controller/User.php
application/admin/controller/User.php
+9
-4
application/admin/view/default/answer/index.html
application/admin/view/default/answer/index.html
+2
-0
application/admin/view/default/sqlconsole/index.html
application/admin/view/default/sqlconsole/index.html
+1
-1
application/plugins/answers/Admin.php
application/plugins/answers/Admin.php
+3
-3
application/plugins/answers/Index.php
application/plugins/answers/Index.php
+16
-2
application/plugins/answers/Service.php
application/plugins/answers/Service.php
+2
-2
application/plugins/view/answers/admin/baseinfo.html
application/plugins/view/answers/admin/baseinfo.html
+42
-6
application/plugins/view/answers/admin/index.html
application/plugins/view/answers/admin/index.html
+31
-0
application/plugins/view/answers/index/detail.html
application/plugins/view/answers/index/detail.html
+26
-12
application/plugins/view/answers/index/index.html
application/plugins/view/answers/index/index.html
+84
-42
application/plugins/view/answers/index/search.html
application/plugins/view/answers/index/search.html
+9
-1
application/service/AnswerService.php
application/service/AnswerService.php
+18
-0
application/service/GoodsService.php
application/service/GoodsService.php
+1
-1
public/static/plugins/css/answers/admin.css
public/static/plugins/css/answers/admin.css
+1
-1
public/static/plugins/css/answers/index.css
public/static/plugins/css/answers/index.css
+51
-13
public/static/upload/images/plugins_answers/2019/03/13/1552463137211834.png
...ad/images/plugins_answers/2019/03/13/1552463137211834.png
+0
-0
未找到文件。
application/admin/controller/Admin.php
浏览文件 @
77e21a40
...
...
@@ -117,6 +117,7 @@ class Admin extends Common
}
// 管理员编辑
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
$data_params
=
[
...
...
@@ -124,13 +125,14 @@ class Admin extends Common
'm'
=>
0
,
'n'
=>
1
,
];
$
data
=
AdminService
::
AdminList
(
$data_params
);
if
(
empty
(
$
data
[
0
]))
$
ret
=
AdminService
::
AdminList
(
$data_params
);
if
(
empty
(
$
ret
[
0
]))
{
return
$this
->
error
(
'管理员信息不存在'
,
MyUrl
(
'admin/index/index'
));
}
$
this
->
assign
(
'data'
,
$data
[
0
])
;
$
data
=
$ret
[
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 角色
$role_params
=
[
...
...
application/admin/controller/Apphomenav.php
浏览文件 @
77e21a40
...
...
@@ -109,6 +109,7 @@ class AppHomeNav extends Common
$params
=
input
();
// 数据
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
...
...
@@ -118,9 +119,10 @@ class AppHomeNav extends Common
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$
data
=
AppNavService
::
AppHomeNavList
(
$data_params
);
$
this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
])
;
$
ret
=
AppNavService
::
AppHomeNavList
(
$data_params
);
$
data
=
empty
(
$ret
[
'data'
][
0
])
?
[]
:
$ret
[
'data'
][
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 所属平台
$this
->
assign
(
'common_platform_type'
,
lang
(
'common_platform_type'
));
...
...
application/admin/controller/Article.php
浏览文件 @
77e21a40
...
...
@@ -110,6 +110,7 @@ class Article extends Common
$params
=
input
();
// 数据
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
...
...
@@ -119,9 +120,10 @@ class Article extends Common
'where'
=>
[
'a.id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'a.*'
,
);
$
data
=
ArticleService
::
ArticleList
(
$data_params
);
$
this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
])
;
$
ret
=
ArticleService
::
ArticleList
(
$data_params
);
$
data
=
empty
(
$ret
[
'data'
][
0
])
?
[]
:
$ret
[
'data'
][
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
...
...
application/admin/controller/Brand.php
浏览文件 @
77e21a40
...
...
@@ -107,6 +107,7 @@ class Brand extends Common
$params
=
input
();
// 数据
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
...
...
@@ -116,9 +117,10 @@ class Brand extends Common
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$
data
=
BrandService
::
BrandList
(
$data_params
);
$
this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
])
;
$
ret
=
BrandService
::
BrandList
(
$data_params
);
$
data
=
empty
(
$ret
[
'data'
][
0
])
?
[]
:
$ret
[
'data'
][
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
...
...
application/admin/controller/Customview.php
浏览文件 @
77e21a40
...
...
@@ -112,6 +112,7 @@ class CustomView extends Common
$params
=
input
();
// 数据
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
...
...
@@ -121,9 +122,10 @@ class CustomView extends Common
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$
data
=
CustomViewService
::
CustomViewList
(
$data_params
);
$
this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
])
;
$
ret
=
CustomViewService
::
CustomViewList
(
$data_params
);
$
data
=
empty
(
$ret
[
'data'
][
0
])
?
[]
:
$ret
[
'data'
][
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
...
...
application/admin/controller/Goods.php
浏览文件 @
77e21a40
...
...
@@ -107,6 +107,7 @@ class Goods extends Common
$params
=
input
();
// 商品信息
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
$data_params
=
[
...
...
@@ -122,12 +123,13 @@ class Goods extends Common
{
return
$this
->
error
(
'商品信息不存在'
,
MyUrl
(
'admin/goods/index'
));
}
$
this
->
assign
(
'data'
,
$ret
[
'data'
][
0
])
;
$
data
=
$ret
[
'data'
][
0
]
;
// 获取商品编辑规格
$specifications
=
GoodsService
::
GoodsEditSpecifications
(
$ret
[
'data'
][
0
][
'id'
]);
$this
->
assign
(
'specifications'
,
$specifications
);
}
$this
->
assign
(
'data'
,
$data
);
// 地区信息
$this
->
assign
(
'region_province_list'
,
RegionService
::
RegionItems
([
'pid'
=>
0
]));
...
...
application/admin/controller/Power.php
浏览文件 @
77e21a40
...
...
@@ -134,20 +134,22 @@ class Power extends Common
$params
=
input
();
// 角色组
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
$data_params
=
[
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
];
$
data
=
AdminPowerService
::
RoleList
(
$data_params
);
if
(
!
empty
(
$
data
[
0
][
'id'
]))
$
ret
=
AdminPowerService
::
RoleList
(
$data_params
);
if
(
!
empty
(
$
ret
[
0
][
'id'
]))
{
$
this
->
assign
(
'data'
,
$data
[
0
])
;
$
data
=
$ret
[
0
]
;
// 权限关联数据
$params
[
'role_id'
]
=
$
data
[
0
][
'id'
];
$params
[
'role_id'
]
=
$
ret
[
0
][
'id'
];
}
}
$this
->
assign
(
'data'
,
$data
);
// 菜单列表
$power
=
AdminPowerService
::
RolePowerEditData
(
$params
);
...
...
application/admin/controller/Slide.php
浏览文件 @
77e21a40
...
...
@@ -109,6 +109,7 @@ class Slide extends Common
$params
=
input
();
// 数据
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
...
...
@@ -118,9 +119,10 @@ class Slide extends Common
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$
data
=
SlideService
::
SlideList
(
$data_params
);
$
this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
])
;
$
ret
=
SlideService
::
SlideList
(
$data_params
);
$
data
=
empty
(
$ret
[
'data'
][
0
])
?
[]
:
$ret
[
'data'
][
0
]
;
}
$this
->
assign
(
'data'
,
$data
);
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
...
...
application/admin/controller/User.php
浏览文件 @
77e21a40
...
...
@@ -131,6 +131,7 @@ class User extends Common
$params
=
input
();
// 用户编辑
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
{
$data_params
=
[
...
...
@@ -138,14 +139,18 @@ class User extends Common
'm'
=>
0
,
'n'
=>
1
,
];
$
data
=
UserService
::
UserList
(
$data_params
);
if
(
empty
(
$
data
[
'data'
][
0
]))
$
ret
=
UserService
::
UserList
(
$data_params
);
if
(
empty
(
$
ret
[
'data'
][
0
]))
{
return
$this
->
error
(
'用户信息不存在'
,
MyUrl
(
'admin/user/index'
));
}
$data
[
'data'
][
0
][
'birthday_text'
]
=
empty
(
$data
[
'data'
][
0
][
'birthday'
])
?
''
:
date
(
'Y-m-d'
,
$data
[
'data'
][
0
][
'birthday'
]);
$this
->
assign
(
'data'
,
$data
[
'data'
][
0
]);
// 生日
$ret
[
'data'
][
0
][
'birthday_text'
]
=
empty
(
$ret
[
'data'
][
0
][
'birthday'
])
?
''
:
date
(
'Y-m-d'
,
$ret
[
'data'
][
0
][
'birthday'
]);
$data
=
$ret
[
'data'
][
0
];
}
$this
->
assign
(
'data'
,
$data
);
// 性别
$this
->
assign
(
'common_gender_list'
,
lang
(
'common_gender_list'
));
...
...
application/admin/view/default/answer/index.html
浏览文件 @
77e21a40
...
...
@@ -48,6 +48,7 @@
<th>
标题
</th>
<th
class=
"am-hide-sm-only"
>
内容
</th>
<th
class=
"am-hide-sm-only"
>
回复内容
</th>
<th
class=
"am-hide-sm-only"
>
访问次数
</th>
<th
class=
"am-hide-sm-only"
>
回复时间
</th>
<th
class=
"am-hide-sm-only"
>
创建时间
</th>
<th>
是否显示
</th>
...
...
@@ -98,6 +99,7 @@
<span
class=
"cr-ddd"
>
未回复
</span>
{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.access_count}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.reply_time}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.add_time}}
</td>
<td>
...
...
application/admin/view/default/sqlconsole/index.html
浏览文件 @
77e21a40
...
...
@@ -11,7 +11,7 @@
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/sqlconsole/implement')}}"
method=
"POST"
request-type=
"ajax-fun"
request-value=
"ViewImplementBack"
>
<div
class=
"am-form-group"
>
<textarea
rows=
"6"
name=
"sql"
class=
"am-radius"
placeholder=
"SQL语句"
data-validation-message=
"请填写需要执行的SQL语句"
required
>
{{if !empty($data)}}{{$data.sql}}{{/if}}
</textarea>
<textarea
rows=
"6"
name=
"sql"
class=
"am-radius"
placeholder=
"SQL语句"
data-validation-message=
"请填写需要执行的SQL语句"
required
></textarea>
</div>
<div
class=
"am-form-group am-form-group-refreshing"
>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100"
data-am-loading=
"{loadingText:'处理中...'}"
>
执行
</button>
...
...
application/plugins/answers/Admin.php
浏览文件 @
77e21a40
...
...
@@ -35,7 +35,7 @@ class Admin extends Controller
public
function
index
(
$params
=
[])
{
// 基础数据
$base
=
PluginsService
::
PluginsData
(
'answers'
,
[
'images'
]);
$base
=
PluginsService
::
PluginsData
(
'answers'
,
[
'images'
,
'images_bottom'
]);
$this
->
assign
(
'data'
,
isset
(
$base
[
'data'
])
?
$base
[
'data'
]
:
[]);
// 幻灯片
...
...
@@ -62,7 +62,7 @@ class Admin extends Controller
*/
public
function
baseinfo
(
$params
=
[])
{
$ret
=
PluginsService
::
PluginsData
(
'answers'
,
[
'images'
]);
$ret
=
PluginsService
::
PluginsData
(
'answers'
,
[
'images'
,
'images_bottom'
]);
if
(
$ret
[
'code'
]
==
0
)
{
// 是否
...
...
@@ -99,7 +99,7 @@ class Admin extends Controller
*/
public
function
basesave
(
$params
=
[])
{
return
PluginsService
::
PluginsDataSave
([
'plugins'
=>
'answers'
,
'data'
=>
$params
],
[
'images'
]);
return
PluginsService
::
PluginsDataSave
([
'plugins'
=>
'answers'
,
'data'
=>
$params
],
[
'images'
,
'images_bottom'
]);
}
/**
...
...
application/plugins/answers/Index.php
浏览文件 @
77e21a40
...
...
@@ -15,6 +15,7 @@ use app\service\PluginsService;
use
app\service\AnswerService
;
use
app\service\UserService
;
use
app\service\SeoService
;
use
app\service\GoodsService
;
use
app\plugins\answers\Service
;
/**
...
...
@@ -66,6 +67,13 @@ class Index extends Controller
$this
->
assign
(
'plugins_answers_rc_list'
,
[]);
}
// 最新商品
if
(
!
empty
(
$base
[
'data'
][
'home_new_goods_number'
]))
{
$goods
=
GoodsService
::
GoodsList
([
'where'
=>
[
'is_delete_time'
=>
0
],
'field'
=>
'id,title,images,min_price'
,
'n'
=>
intval
(
$base
[
'data'
][
'home_new_goods_number'
])]);
$this
->
assign
(
'plugins_new_goods_list'
,
$goods
[
'data'
]);
}
// 浏览器标题
$seo_name
=
empty
(
$base
[
'data'
][
'application_name'
])
?
'问答'
:
$base
[
'data'
][
'application_name'
];
$this
->
assign
(
'home_seo_site_title'
,
SeoService
::
BrowserSeoTitle
(
$seo_name
,
1
));
...
...
@@ -105,6 +113,12 @@ class Index extends Controller
$detail
=
Service
::
AnswerRow
(
$params
);
$this
->
assign
(
'plugins_answers_detail'
,
$detail
);
// 浏览次数
if
(
$detail
[
'code'
]
==
0
&&
!
empty
(
$detail
[
'data'
][
'id'
]))
{
AnswerService
::
AnswerAccessCountInc
([
'answer_id'
=>
$detail
[
'data'
][
'id'
]]);
}
// 浏览器标题
if
(
!
empty
(
$detail
[
'data'
][
'title'
]))
{
...
...
@@ -152,7 +166,7 @@ class Index extends Controller
// 获取搜索数据
// 分页
$number
=
10
;
$number
=
isset
(
$base
[
'data'
][
'search_page_number'
])
?
intval
(
$base
[
'data'
][
'search_page_number'
])
:
28
;
// 条件
$keywords_arr
=
empty
(
$params
[
'answers_keywords'
])
?
[]
:
[
'keywords'
=>
$params
[
'answers_keywords'
]];
...
...
@@ -177,7 +191,7 @@ class Index extends Controller
'm'
=>
$page
->
GetPageStarNumber
(),
'n'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'id,title,content,add_time'
,
'field'
=>
'id,title,content,add_time
,is_reply
'
,
);
$data
=
AnswerService
::
AnswerList
(
$data_params
);
$this
->
assign
(
'plugins_answers_data_list'
,
$data
[
'data'
]);
...
...
application/plugins/answers/Service.php
浏览文件 @
77e21a40
...
...
@@ -302,7 +302,7 @@ class Service
];
// 指定字段
$field
=
'g.id,g.title,g.images'
;
$field
=
'g.id,g.title,g.images
,g.min_price
'
;
// 获取数据
$ret
=
GoodsService
::
CategoryGoodsList
([
'where'
=>
$where
,
'm'
=>
0
,
'n'
=>
100
,
'field'
=>
$field
]);
...
...
@@ -387,7 +387,7 @@ class Service
];
// 字段
$field
=
'
title,content,reply,is_reply
,reply_time,add_time'
;
$field
=
'
id,name,title,content,reply,is_reply,access_count
,reply_time,add_time'
;
// 获取列表
$data_params
=
array
(
...
...
application/plugins/view/answers/admin/baseinfo.html
浏览文件 @
77e21a40
...
...
@@ -20,7 +20,7 @@
<ul
class=
"plug-file-upload-view plugins-images-view"
data-form-name=
"images"
data-max-number=
"1"
data-dialog-type=
"images"
>
{{if !empty($data['images_old'])}}
<li>
<input
type=
"text"
name=
"images"
value=
"{{$data.images_old}}"
data-validation-message=
"请上传图片"
required
/>
<input
type=
"text"
name=
"images"
value=
"{{$data.images_old}}"
data-validation-message=
"请上
中间横幅
传图片"
required
/>
<img
src=
"{{$data.images}}"
/>
<i>
×
</i>
</li>
...
...
@@ -28,14 +28,12 @@
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.plugins-images-view"
>
+上传图片
</div>
</div>
<div
class=
"am-form-group"
>
<label>
链接地址
<span
class=
"am-form-group-label-tips"
>
带http://或https://
</span></label>
<label>
中间横幅-
链接地址
<span
class=
"am-form-group-label-tips"
>
带http://或https://
</span></label>
<input
type=
"url"
placeholder=
"链接地址"
name=
"url"
data-validation-message=
"链接地址格式有误"
class=
"am-radius"
{{
if
!
empty
($
data
['
url
'])}}
value=
"{{$data.url}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
是否新窗口打开
</label>
<label>
中间横幅-
是否新窗口打开
</label>
<div>
{{foreach $is_whether_list as $v}}
<label
class=
"am-radio-inline m-r-10"
>
...
...
@@ -45,6 +43,34 @@
</div>
</div>
<div
class=
"am-form-group am-form-file"
>
<label
class=
"block"
>
底部横幅
<span
class=
"am-form-group-label-tips"
>
建议1200像数X80像数
</span></label>
<ul
class=
"plug-file-upload-view plugins-images-bottom-view"
data-form-name=
"images_bottom"
data-max-number=
"1"
data-dialog-type=
"images"
>
{{if !empty($data['images_bottom_old'])}}
<li>
<input
type=
"text"
name=
"images_bottom"
value=
"{{$data.images_bottom_old}}"
data-validation-message=
"请上传底部横幅图片"
required
/>
<img
src=
"{{$data.images_bottom}}"
/>
<i>
×
</i>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.plugins-images-bottom-view"
>
+上传图片
</div>
</div>
<div
class=
"am-form-group"
>
<label>
底部横幅-链接地址
<span
class=
"am-form-group-label-tips"
>
带http://或https://
</span></label>
<input
type=
"url"
placeholder=
"链接地址"
name=
"url_bottom"
data-validation-message=
"链接地址格式有误"
class=
"am-radius"
{{
if
!
empty
($
data
['
url_bottom
'])}}
value=
"{{$data.url_bottom}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
底部横幅-是否新窗口打开
</label>
<div>
{{foreach $is_whether_list as $v}}
<label
class=
"am-radio-inline m-r-10"
>
<input
type=
"radio"
name=
"is_new_window_open_bottom"
value=
"{{$v.id}}"
{{
if
isset
($
data
['
is_new_window_open_bottom
'])
and
$
data
['
is_new_window_open_bottom
']
eq
$
v
['
id
']}}
checked=
"checked"
{{
else
/}}{{
if
!
isset
($
data
['
is_new_window_open_bottom
'])
and
isset
($
v
['
checked
'])
and
$
v
['
checked
']
eq
true
}}
checked=
"checked"
{{/
if
}}{{/
if
}}
data-am-ucheck
/>
{{$v.name}}
</label>
{{/foreach}}
</div>
</div>
<div
class=
"am-form-group"
>
<label>
右侧推荐问答名称
<span
class=
"am-form-group-label-tips"
>
默认 推荐问答
</span></label>
<input
type=
"text"
name=
"right_top_rec_name"
placeholder=
"右侧推荐问答名称"
maxlength=
"30"
data-validation-message=
"右侧推荐问答名称格式最多 30 个字符"
class=
"am-radius"
{{
if
!
empty
($
data
['
right_top_rec_name
'])}}
value=
"{{$data.right_top_rec_name}}"
{{/
if
}}
/>
...
...
@@ -62,7 +88,17 @@
<div
class=
"am-form-group"
>
<label>
最新问答展示数量
<span
class=
"am-form-group-label-tips"
>
默认 15 条
</span></label>
<input
type=
"number"
name=
"middle_new_page_number"
placeholder=
"右侧推荐商品名称"
maxlength=
"30"
data-validation-message=
"请填写最新问答展示数量"
class=
"am-radius"
value=
"{{if !empty($data['middle_new_page_number'])}}{{$data.middle_new_page_number}}{{else /}}15{{/if}}"
/>
<input
type=
"number"
name=
"middle_new_page_number"
placeholder=
"最新问答展示数量"
maxlength=
"30"
data-validation-message=
"请填写最新问答展示数量"
class=
"am-radius"
value=
"{{if !empty($data['middle_new_page_number'])}}{{$data.middle_new_page_number}}{{else /}}15{{/if}}"
/>
</div>
<div
class=
"am-form-group"
>
<label>
搜索问答展示数量
<span
class=
"am-form-group-label-tips"
>
默认 28 条
</span></label>
<input
type=
"number"
name=
"search_page_number"
placeholder=
"搜索问答展示数量"
maxlength=
"30"
data-validation-message=
"请填写搜索问答展示数量数量"
class=
"am-radius"
value=
"{{if !empty($data['search_page_number'])}}{{$data.search_page_number}}{{else /}}28{{/if}}"
/>
</div>
<div
class=
"am-form-group"
>
<label>
首页开启最新商品展示
<span
class=
"am-form-group-label-tips"
>
空则不展示
</span></label>
<input
type=
"number"
name=
"home_new_goods_number"
placeholder=
"首页开启最新商品展示"
maxlength=
"30"
data-validation-message=
"请填写首页开启最新商品展示数量"
class=
"am-radius"
value=
"{{if !empty($data['home_new_goods_number'])}}{{$data.home_new_goods_number}}{{/if}}"
/>
</div>
<label>
右侧推荐问答
</label>
...
...
application/plugins/view/answers/admin/index.html
浏览文件 @
77e21a40
...
...
@@ -71,6 +71,28 @@
</div>
</div>
<div
class=
"items"
>
<label>
搜索问答展示数量
</label>
<div>
{{if empty($data['search_page_number'])}}
默认 28 条
{{else /}}
{{$data.search_page_number}} 条
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
首页开启最新商品展示
</label>
<div>
{{if empty($data['home_new_goods_number'])}}
不展示
{{else /}}
{{$data.home_new_goods_number}} 条
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
中间横幅
</label>
<div
class=
"immages-tag"
>
...
...
@@ -79,6 +101,15 @@
</a>
</div>
</div>
<div
class=
"items"
>
<label>
底部横幅
</label>
<div
class=
"immages-tag"
>
<a
href=
"{{if empty($data['url_bottom'])}}javascript:;{{else /}}{{$data.url_bottom}}{{/if}}"
{{
if
isset
($
data
['
is_new_window_open_bottom
'])
and
$
data
['
is_new_window_open_bottom
']
eq
1}}
target=
"_blank"
{{/
if
}}
>
<img
src=
"{{if !empty($data['images_bottom'])}}{{$data.images_bottom}}{{else /}}{{$attachment_host}}/static/plugins/images/answers/default-images.png{{/if}}"
/>
</a>
</div>
</div>
</div>
</div>
...
...
application/plugins/view/answers/index/detail.html
浏览文件 @
77e21a40
...
...
@@ -18,23 +18,34 @@
<div
class=
"am-u-md-8"
>
{{if isset($plugins_answers_detail['code']) and $plugins_answers_detail['code'] eq 0}}
{{if !empty($plugins_answers_detail['data']['content'])}}
<div
class=
"base-title"
>
{{if !empty($plugins_answers_detail['data']['title'])}}
<h2>
{{$plugins_answers_detail.data.title}}
</h2>
<h2><span
class=
"highlighted"
>
主题:
</span>
{{$plugins_answers_detail.data.title}}
</h2>
{{/if}}
<p
class=
"gray-text"
>
阅读数:
<span
class=
"highlighted"
>
{{$plugins_answers_detail.data.access_count}}
</span></p>
</div>
<div
class=
"base-content"
>
{{$plugins_answers_detail.data.content}}
</div>
<div
class=
"base-footer gray-text"
>
留言时间:{{$plugins_answers_detail.data.add_time_date}}
{{if !empty($plugins_answers_detail['data']['name'])}}
留言人:{{$plugins_answers_detail.data.name}}
{{/if}}
<div
class=
"base-content"
>
<p>
{{$plugins_answers_detail.data.content}}
</p>
<p
class=
"base-date gray-text"
>
{{$plugins_answers_detail.data.add_time_date}}
</p>
</div>
<div
class=
"am-panel base {{if isset($plugins_answers_detail['data']['is_reply']) and $plugins_answers_detail['data']['is_reply'] eq 1}} am-panel-success{{else /}} am-panel-warning{{/if}}"
>
<div
class=
"am-panel-bd"
>
{{if isset($plugins_answers_detail['data']['is_reply']) and $plugins_answers_detail['data']['is_reply'] eq 1}}
<div
class=
"am-panel-bd"
>
<span
class=
"am-badge am-radius am-badge-success"
>
管理员已回答
</span>
<p
class=
"reply-content"
>
{{$plugins_answers_detail.data.reply}}
</p>
<p
class=
"base-date gray-text"
>
{{$plugins_answers_detail.data.reply_time_date}}
</p>
</div>
<div
class=
"base-footer gray-text reply-footer"
>
回复时间:{{$plugins_answers_detail.data.reply_time_date}}
</div>
{{else /}}
<div
class=
"am-panel-bd"
>
<span
class=
"am-badge am-radius"
>
管理员待回复
</span>
{{/if}}
</div>
{{/if}}
</div>
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
...
...
@@ -101,6 +112,9 @@
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
alt=
"{{$goods.title}}"
/>
<h3
class=
"am-gallery-title"
>
{{$goods.title}}
</h3>
<div
class=
"price"
>
<strong>
¥{{$goods.min_price}}
</strong>
</div>
</a>
</div>
</li>
...
...
application/plugins/view/answers/index/index.html
浏览文件 @
77e21a40
...
...
@@ -86,6 +86,7 @@
</div>
{{/if}}
<div
class=
"answers-middle"
>
<!-- 最新问答 -->
<div
class=
"am-u-md-8 answers-middle-list"
>
<div
data-am-widget=
"list_news"
class=
"am-list-news am-list-news-default"
>
...
...
@@ -115,6 +116,9 @@
</li>
{{/foreach}}
</ul>
<div
class=
"am-list-news-ft"
>
<a
class=
"am-list-news-more am-btn am-btn-default"
href=
"{{:PluginsHomeUrl('answers', 'index', 'search')}}"
>
查看更多
»
</a>
</div>
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/if}}
...
...
@@ -142,6 +146,9 @@
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
alt=
"{{$goods.title}}"
/>
<h3
class=
"am-gallery-title"
>
{{$goods.title}}
</h3>
<div
class=
"price"
>
<strong>
¥{{$goods.min_price}}
</strong>
</div>
</a>
</div>
</li>
...
...
@@ -149,6 +156,41 @@
</ul>
{{/if}}
</div>
</div>
<!-- 底部横幅广告 -->
{{if !empty($plugins_answers_data['images_bottom'])}}
<div
class=
"answers-middle-banner"
>
<a
href=
"{{if empty($plugins_answers_data['url_bottom'])}}javascript:;{{else /}}{{$plugins_answers_data.url_bottom}}{{/if}}"
{{
if
isset
($
plugins_answers_data
['
is_new_window_open_bottom
'])
and
$
plugins_answers_data
['
is_new_window_open_bottom
']
eq
1}}
target=
"_blank"
{{/
if
}}
>
<img
src=
"{{$plugins_answers_data.images_bottom}}"
/>
</a>
</div>
{{/if}}
<!-- 最新商品 -->
{{if !empty($plugins_new_goods_list)}}
<div
class=
"answers-goods"
>
<div
class=
"am-list-news-hd am-cf"
>
<h2>
最新商品
</h2>
<a
href=
"{{:MyUrl('index/search/index')}}"
target=
"_blank"
class=
"am-list-news-more am-fr"
>
更多
»
</a>
</div>
<ul
data-am-widget=
"gallery"
class=
"am-gallery am-avg-sm-2 am-avg-md-3 am-avg-lg-6 am-gallery-bordered"
data-am-gallery=
"{}"
>
{{foreach $plugins_new_goods_list as $goods}}
<li>
<div
class=
"am-gallery-item"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
alt=
"{{$goods.title}}"
/>
<h3
class=
"am-gallery-title"
>
{{$goods.title}}
</h3>
<div
class=
"price"
>
<strong>
¥{{$goods.min_price}}
</strong>
</div>
</a>
</div>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
<!-- 提问popup -->
{{include file="../../../plugins/view/answers/index/popup" /}}
...
...
application/plugins/view/answers/index/search.html
浏览文件 @
77e21a40
...
...
@@ -13,7 +13,7 @@
{{include file="public/goods_category" /}}
<!-- content start -->
<div
class=
"am-g am-container plugins-answers plugins-answers-
detail
"
>
<div
class=
"am-g am-container plugins-answers plugins-answers-
search
"
>
<!-- 详情 -->
<div
class=
"am-u-md-8"
>
{{if !empty($plugins_answers_data_list)}}
...
...
@@ -23,6 +23,11 @@
{{foreach $plugins_answers_data_list as $answers}}
<li
class=
"am-g am-list-item-dated"
>
<a
href=
"{{:PluginsHomeUrl('answers', 'index', 'detail', ['id'=>$answers['id']])}}"
target=
"_blank"
class=
"am-list-item-hd"
>
{{if isset($answers['is_reply']) and $answers['is_reply'] eq 1}}
<span
class=
"am-badge am-radius am-badge-success"
>
已回复
</span>
{{else /}}
<span
class=
"am-badge am-radius"
>
待回复
</span>
{{/if}}
{{if empty($answers['title'])}}
{{$answers.content}}
{{else /}}
...
...
@@ -98,6 +103,9 @@
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
alt=
"{{$goods.title}}"
/>
<h3
class=
"am-gallery-title"
>
{{$goods.title}}
</h3>
<div
class=
"price"
>
<strong>
¥{{$goods.min_price}}
</strong>
</div>
</a>
</div>
</li>
...
...
application/service/AnswerService.php
浏览文件 @
77e21a40
...
...
@@ -382,5 +382,23 @@ class AnswerService
}
return
DataReturn
(
'编辑失败或数据未改变'
,
-
100
);
}
/**
* 访问统计加1
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-15
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
AnswerAccessCountInc
(
$params
=
[])
{
if
(
!
empty
(
$params
[
'answer_id'
]))
{
return
Db
::
name
(
'Answer'
)
->
where
([
'id'
=>
intval
(
$params
[
'answer_id'
])])
->
setInc
(
'access_count'
);
}
return
false
;
}
}
?>
\ No newline at end of file
application/service/GoodsService.php
浏览文件 @
77e21a40
...
...
@@ -680,7 +680,7 @@ class GoodsService
{
if
(
!
empty
(
$params
[
'goods_id'
]))
{
return
Db
::
name
(
'Goods'
)
->
where
(
array
(
'id'
=>
intval
(
$params
[
'goods_id'
]))
)
->
setInc
(
'access_count'
);
return
Db
::
name
(
'Goods'
)
->
where
(
[
'id'
=>
intval
(
$params
[
'goods_id'
])]
)
->
setInc
(
'access_count'
);
}
return
false
;
}
...
...
public/static/plugins/css/answers/admin.css
浏览文件 @
77e21a40
...
...
@@ -36,7 +36,7 @@
/**
* 编辑页面
*/
ul
.plugins-images-view
li
{
ul
.plugins-images-view
li
,
ul
.plugins-images-bottom-view
li
{
width
:
100%
;
height
:
auto
;
}
...
...
public/static/plugins/css/answers/index.css
浏览文件 @
77e21a40
...
...
@@ -3,6 +3,9 @@
padding-top
:
10px
;
padding-bottom
:
2px
;
}
.plugins-answers
.answers-goods
{
overflow
:
hidden
;
}
.plugins-answers
.answers-goods
.am-list-news-hd
{
padding-bottom
:
0
;
}
...
...
@@ -47,6 +50,12 @@
.plugins-answers
.am-gallery-bordered
.am-gallery-title
{
font-size
:
12px
;
}
.plugins-answers
.answers-top
,
.plugins-answers
.answers-middle
{
overflow
:
hidden
;
}
.plugins-answers
.answers-top
,
.plugins-answers
.answers-middle-banner
{
margin-top
:
10px
;
}
@media
only
screen
and
(
min-width
:
640px
)
{
.plugins-answers
.am-u-md-8
,
.plugins-answers
.am-gallery
{
...
...
@@ -64,10 +73,7 @@
color
:
#d2364c
;
text-decoration
:
underline
;
}
.plugins-answers
.answers-top
,
.plugins-answers
.answers-middle-banner
{
margin-top
:
10px
;
overflow
:
hidden
;
}
.plugins-answers
.answers-sidebar
,
.plugins-answers
.answers-goods
{
padding-right
:
1px
;
}
...
...
@@ -101,23 +107,30 @@
.plugins-answers
.am-list-news-hd
{
padding-bottom
:
5px
;
}
.plugins-answers
.answers-top
{
margin-top
:
0
;
}
}
/**
* 详情
*/
.plugins-answers-detail
{
.plugins-answers-detail
,
.plugins-answers-search
{
padding-top
:
10px
;
}
.plugins-answers-detail
.
base-content
{
border
:
1px
dashed
transparent
;
background
:
linear-gradient
(
white
,
white
)
padding-box
,
repeating-linear-gradient
(
-45deg
,
#ccc
0
,
#ccc
0.25em
,
white
0
,
white
0.6em
);
.plugins-answers-detail
.
am-u-md-8
{
border
:
1px
solid
#dedede
;
}
.plugins-answers-detail
.base-content
,
.plugins-answers-detail
.base-footer
{
padding
:
10px
;
}
.plugins-answers-detail
.base-date
{
.plugins-answers-detail
.base-content
{
border-top
:
1px
solid
#dedede
;
}
.plugins-answers-detail
.base-footer
{
text-align
:
right
;
margin-top
:
5px
;
border-top
:
1px
dashed
#e7e7e7
;
border-bottom
:
1px
dashed
#e7e7e7
;
}
.plugins-answers-detail
.base
{
margin-top
:
10px
;
...
...
@@ -128,13 +141,38 @@
background
:
#fff7ef
;
}
.plugins-answers-detail
.am-panel-success
{
background
:
#f2fff1
;
background
:
#e7ffe5
;
}
.plugins-answers-detail
.am-panel
{
margin
:
0
;
border
:
0
;
}
.plugins-answers-detail
.base-title
{
position
:
relative
;
height
:
45px
;
padding
:
10px
;
background
:
#f6f6f6
;
}
.plugins-answers-detail
.base-title
.highlighted
{
color
:
#FF9800
;
}
.plugins-answers-detail
h2
{
font-weight
:
500
;
margin-bottom
:
5px
;
font-size
:
16px
;
}
.plugins-answers-detail
.base-title
.gray-text
{
position
:
absolute
;
right
:
10px
;
top
:
15px
;
}
.plugins-answers-detail
.base
.reply-content
{
margin-top
:
5px
;
}
.plugins-answers-detail
.reply-footer
{
border-bottom
:
0
;
}
@media
only
screen
and
(
max-width
:
640px
)
{
.plugins-answers-detail
.answers-btn-list
{
margin-top
:
10px
;
}
}
\ No newline at end of file
public/static/upload/images/plugins_answers/2019/03/13/1552463137211834.png
0 → 100644
浏览文件 @
77e21a40
47.6 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录