提交 2733874a 编写于 作者: D devil

用户端优化

上级 1bca42d7
......@@ -71,10 +71,6 @@ class Answer extends Common
];
$ret = AnswerService::AnswerList($data_params);
// 静态数据
$this->assign('common_is_show_list', lang('common_is_show_list'));
$this->assign('common_is_text_list', lang('common_is_text_list'));
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
......@@ -84,10 +80,11 @@ class Answer extends Common
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
......
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsBrowseService;
/**
* 商品浏览管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class GoodsBrowse extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
// 登录校验
$this->IsLogin();
// 权限校验
$this->IsPower();
}
/**
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Index()
{
// 总数
$total = GoodsBrowseService::GoodsBrowseTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goodsbrowse/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
$this->assign('data_list', $ret['data']);
return $this->fetch();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['b.id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
}
return $this->fetch();
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return GoodsBrowseService::GoodsBrowseDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsFavorService;
/**
* 商品收藏管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class Goodsfavor extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
// 登录校验
$this->IsLogin();
// 权限校验
$this->IsPower();
}
/**
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Index()
{
// 总数
$total = GoodsFavorService::GoodsFavorTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goodsfavor/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
$this->assign('data_list', $ret['data']);
return $this->fetch();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['f.id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
}
return $this->fetch();
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return GoodsFavorService::GoodsFavorDelete($params);
}
}
?>
\ No newline at end of file
......@@ -210,28 +210,5 @@ class Answer
}
return $value;
}
/**
* 基础信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-08
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public function WhereValueBaseInfo($value, $params = [])
{
if(!empty($value))
{
// 获取商品评论关联的商品 id
$ids = Db::name('answer')->alias('gc')->join(['__GOODS__'=>'g'], 'gc.goods_id=g.id')->where('title|model', 'like', '%'.$value.'%')->column('gc.id');
// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\form;
use think\Db;
/**
* 商品浏览管理动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class GoodsBrowse
{
// 基础条件
public $condition_base = [];
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('admin/goodsbrowse/index'),
'is_delete' => 1,
'delete_url' => MyUrl('admin/goodsbrowse/delete'),
'delete_key' => 'ids',
],
// 表单配置
'form' => [
[
'view_type' => 'checkbox',
'is_checked' => 0,
'checked_text' => '反选',
'not_checked_text' => '全选',
'align' => 'center',
'width' => 80,
],
[
'label' => '用户信息',
'view_type' => 'module',
'view_key' => 'lib/module/user',
'grid_size' => 'sm',
'search_config' => [
'form_type' => 'input',
'form_name' => 'b.user_id',
'where_type' => 'like',
'where_type_custom' => 'in',
'where_handle_custom' => 'WhereValueUserInfo',
'placeholder' => '请输入用户名/昵称/手机/邮箱',
],
],
[
'label' => '商品信息',
'view_type' => 'module',
'view_key' => 'goodsbrowse/module/goods',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
],
],
[
'label' => '销售价格(元)',
'view_type' => 'field',
'view_key' => 'price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_price',
'is_point' => 1,
],
],
[
'label' => '原价(元)',
'view_type' => 'field',
'view_key' => 'original_price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_original_price',
'is_point' => 1,
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'b.add_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'goodsbrowse/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
];
}
/**
* 用户信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public function WhereValueUserInfo($value, $params = [])
{
if(!empty($value))
{
// 获取用户 id
$ids = Db::name('User')->where('username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id');
// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\form;
use think\Db;
/**
* 商品收藏管理动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class GoodsFavor
{
// 基础条件
public $condition_base = [];
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('admin/goodsfavor/index'),
'is_delete' => 1,
'delete_url' => MyUrl('admin/goodsfavor/delete'),
'delete_key' => 'ids',
],
// 表单配置
'form' => [
[
'view_type' => 'checkbox',
'is_checked' => 0,
'checked_text' => '反选',
'not_checked_text' => '全选',
'align' => 'center',
'width' => 80,
],
[
'label' => '用户信息',
'view_type' => 'module',
'view_key' => 'lib/module/user',
'grid_size' => 'sm',
'search_config' => [
'form_type' => 'input',
'form_name' => 'f.user_id',
'where_type' => 'like',
'where_type_custom' => 'in',
'where_handle_custom' => 'WhereValueUserInfo',
'placeholder' => '请输入用户名/昵称/手机/邮箱',
],
],
[
'label' => '商品信息',
'view_type' => 'module',
'view_key' => 'goodsfavor/module/goods',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
],
],
[
'label' => '销售价格(元)',
'view_type' => 'field',
'view_key' => 'price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_price',
'is_point' => 1,
],
],
[
'label' => '原价(元)',
'view_type' => 'field',
'view_key' => 'original_price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_original_price',
'is_point' => 1,
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'f.add_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'goodsfavor/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
];
}
/**
* 用户信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public function WhereValueUserInfo($value, $params = [])
{
if(!empty($value))
{
// 获取用户 id
$ids = Db::name('User')->where('username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id');
// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}
}
?>
\ No newline at end of file
......@@ -18,7 +18,7 @@
<div class="am-alert am-alert-secondary user-info" data-am-alert>
<p class="am-text-lg">用户信息</p>
{{if !empty($data['user'])}}
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
<ul class="user-base">
<li>名称:{{if empty($data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.username}}{{/if}}</li>
<li>昵称:{{if empty($data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
......
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
\ No newline at end of file
<!-- 商品基础信息 -->
{{if !empty($module_data)}}
<div class="am-nbfc">
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}">
<img src="{{$module_data['images']}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}" {{if !empty($module_data['title_color'])}} style="color:{{$module_data.title_color}};" {{/if}} class="am-nowrap-initial">{{$module_data.title}}</a>
{{if !empty($module_data['simple_desc'])}}
<p class="am-text-danger am-nowrap-initial">{{$module_data.simple_desc}}</p>
{{/if}}
</div>
{{/if}}
\ No newline at end of file
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/goodsbrowse/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodsbrowse/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</button>
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
\ No newline at end of file
<!-- 商品基础信息 -->
{{if !empty($module_data)}}
<div class="am-nbfc">
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}">
<img src="{{$module_data['images']}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}" {{if !empty($module_data['title_color'])}} style="color:{{$module_data.title_color}};" {{/if}} class="am-nowrap-initial">{{$module_data.title}}</a>
{{if !empty($module_data['simple_desc'])}}
<p class="am-text-danger am-nowrap-initial">{{$module_data.simple_desc}}</p>
{{/if}}
</div>
{{/if}}
\ No newline at end of file
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/goodsfavor/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodsfavor/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</button>
\ No newline at end of file
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_form_bottom_operate}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_form_bottom_operate, ['hook_name'=>$hook_name_form_bottom_operate, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
\ No newline at end of file
<!-- 公共操作 -->
<!-- 是否开启删除操作 -->
{{if isset($form_table['base']['is_delete']) and $form_table['base']['is_delete'] eq 1}}
<button
type="button"
class="am-btn am-btn-danger am-radius am-btn-xs am-icon-trash-o form-table-operate-top-delete-submit"
data-url="{{if isset($form_table['base']['delete_url'])}}{{$form_table.base.delete_url}}{{/if}}"
data-form="{{if isset($form_table['base']['delete_form'])}}{{$form_table.base.delete_form}}{{/if}}"
data-key="{{if isset($form_table['base']['delete_key'])}}{{$form_table.base.delete_key}}{{/if}}"
data-confirm-title="{{if isset($form_table['base']['confirm_title'])}}{{$form_table.base.confirm_title}}{{/if}}"
data-confirm-msg="{{if isset($form_table['base']['confirm_msg'])}}{{$form_table.base.confirm_msg}}{{/if}}"
data-timeout="{{if isset($form_table['base']['timeout'])}}{{$form_table.base.timeout}}{{/if}}"
> 删除</button>
{{/if}}
<!-- 钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>plugins_view_admin_goods_top_operate</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_admin_goods_top_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- 是否开启搜索操作 公共搜索操作放在最后面 -->
{{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1}}
<a href="{{if isset($form_table['base']['search_url'])}}{{$form_table.base.search_url}}{{/if}}" class="am-btn am-btn-warning am-radius am-btn-sm am-icon-filter"> 重置</a>
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example am-icon-search" data-am-loading="{loadingText:' 搜索中...'}"> 搜索</button>
{{/if}}
\ No newline at end of file
......@@ -15,6 +15,7 @@ use app\service\BuyService;
use app\service\PluginsService;
use app\service\GoodsCommentsService;
use app\service\ResourcesService;
use app\service\GoodsFavorService;
/**
* 商品
......@@ -84,7 +85,7 @@ class Goods extends Common
}
// 当前登录用户是否已收藏
$ret_favor = GoodsService::IsUserGoodsFavor(['goods_id'=>$goods_id, 'user'=>$this->user]);
$ret_favor = GoodsFavorService::IsUserGoodsFavor(['goods_id'=>$goods_id, 'user'=>$this->user]);
$ret['data'][0]['is_favor'] = ($ret_favor['code'] == 0) ? $ret_favor['data'] : 0;
// 商品评价总数
......@@ -163,7 +164,7 @@ class Goods extends Common
// 开始操作
$params = $this->data_post;
$params['user'] = $this->user;
return GoodsService::GoodsFavor($params);
return GoodsFavorService::GoodsFavorCancel($params);
}
/**
......
......@@ -10,7 +10,7 @@
// +----------------------------------------------------------------------
namespace app\api\controller;
use app\service\GoodsService;
use app\service\GoodsFavorService;
/**
* 用户商品收藏
......@@ -55,10 +55,10 @@ class UserGoodsFavor extends Common
$page = max(1, isset($this->data_post['page']) ? intval($this->data_post['page']) : 1);
// 条件
$where = GoodsService::UserGoodsFavorListWhere($params);
$where = GoodsFavorService::UserGoodsFavorListWhere($params);
// 获取总数
$total = GoodsService::GoodsFavorTotal($where);
$total = GoodsFavorService::GoodsFavorTotal($where);
$page_total = ceil($total/$number);
$start = intval(($page-1)*$number);
......@@ -68,7 +68,7 @@ class UserGoodsFavor extends Common
'n' => $number,
'where' => $where,
);
$data = GoodsService::GoodsFavorList($data_params);
$data = GoodsFavorService::GoodsFavorList($data_params);
// 返回数据
$result = [
......@@ -91,7 +91,7 @@ class UserGoodsFavor extends Common
{
$params = $this->data_post;
$params['user'] = $this->user;
return GoodsService::GoodsFavor($params);
return GoodsFavorService::GoodsFavorCancel($params);
}
}
?>
\ No newline at end of file
......@@ -23,16 +23,17 @@ use app\service\AnswerService;
class Answer extends Common
{
/**
* [_initialize 前置操作-继承公共前置方法]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function _initialize()
public function __construct()
{
// 调用父类前置方法
parent::_initialize();
parent::__construct();
// 是否登录
$this->IsLogin();
......@@ -48,71 +49,83 @@ class Answer extends Common
*/
public function Index()
{
// 参数
$params = input();
$params['user'] = $this->user;
// 总数
$total = AnswerService::AnswerTotal($this->form_where);
// 分页
$number = 10;
// 条件
$where = AnswerService::AnswerListWhere($params);
// 获取总数
$total = AnswerService::AnswerTotal($where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => MyUrl('admin/answer/index'),
);
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('index/answer/index'),
];
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = AnswerService::AnswerList($data_params);
$this->assign('data_list', $data['data']);
// 静态数据
$this->assign('common_is_show_list', lang('common_is_show_list'));
$this->assign('common_is_text_list', lang('common_is_text_list'));
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
];
$ret = AnswerService::AnswerList($data_params);
// 浏览器名称
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('问答/留言', 1));
// 参数
$this->assign('params', $params);
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
$this->assign('data_list', $ret['data']);
return $this->fetch();
}
/**
* 问答删除
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Delete()
public function Detail()
{
// 是否ajax请求
if(!IS_AJAX)
if(!empty($this->data_request['id']))
{
return $this->error('非法访问');
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = AnswerService::AnswerList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
}
// 开始处理
$params = input();
$params['user_type'] = 'user';
$this->assign('is_header', 0);
$this->assign('is_footer', 0);
return $this->fetch();
}
/**
* 问答/提问保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Save()
{
$params = $this->data_post;
$params['user'] = $this->user;
return AnswerService::AnswerDelete($params);
return AnswerService::AnswerSave($params);
}
}
?>
\ No newline at end of file
......@@ -13,6 +13,8 @@ namespace app\index\controller;
use think\facade\Hook;
use app\service\GoodsService;
use app\service\GoodsCommentsService;
use app\service\GoodsBrowseService;
use app\service\GoodsFavorService;
use app\service\SeoService;
/**
......@@ -62,14 +64,14 @@ class Goods extends Common
return $this->fetch('/public/tips_error');
} else {
// 当前登录用户是否已收藏
$ret_favor = GoodsService::IsUserGoodsFavor(['goods_id'=>$goods_id, 'user'=>$this->user]);
$ret_favor = GoodsFavorService::IsUserGoodsFavor(['goods_id'=>$goods_id, 'user'=>$this->user]);
$ret['data'][0]['is_favor'] = ($ret_favor['code'] == 0) ? $ret_favor['data'] : 0;
// 商品评价总数
$ret['data'][0]['comments_count'] = GoodsCommentsService::GoodsCommentsTotal(['goods_id'=>$goods_id, 'is_show'=>1]);
// 商品收藏总数
$ret['data'][0]['favor_count'] = GoodsService::GoodsFavorTotal(['goods_id'=>$goods_id]);
$ret['data'][0]['favor_count'] = GoodsFavorService::GoodsFavorTotal(['goods_id'=>$goods_id]);
// 钩子
$this->PluginsHook($goods_id, $ret['data'][0]);
......@@ -100,7 +102,7 @@ class Goods extends Common
GoodsService::GoodsAccessCountInc(['goods_id'=>$goods_id]);
// 用户商品浏览
GoodsService::GoodsBrowseSave(['goods_id'=>$goods_id, 'user'=>$this->user]);
GoodsBrowseService::GoodsBrowseSave(['goods_id'=>$goods_id, 'user'=>$this->user]);
// 左侧商品 看了又看
$params = [
......@@ -284,7 +286,7 @@ class Goods extends Common
// 开始处理
$params = input('post.');
$params['user'] = $this->user;
return GoodsService::GoodsFavor($params);
return GoodsFavorService::GoodsFavorCancel($params);
}
/**
......
......@@ -18,6 +18,7 @@ use app\service\BuyService;
use app\service\SeoService;
use app\service\MessageService;
use app\service\NavigationService;
use app\service\GoodsBrowseService;
/**
* 用户
......@@ -125,15 +126,15 @@ class User extends Common
$this->assign('goods_favor_list', $favor['data']);
// 我的足迹
$params = array_merge($_POST, $_GET);
$params['user'] = $this->user;
$where = GoodsService::UserGoodsBrowseListWhere($params);
$browse_params = array(
'm' => 0,
'n' => 6,
'where' => $where,
'where' => [
['g.is_delete_time', '=', 0],
['b.user_id', '=', $this->user['id']],
],
);
$data = GoodsService::GoodsBrowseList($browse_params);
$data = GoodsBrowseService::GoodsBrowseList($browse_params);
$this->assign('goods_browse_list', $data['data']);
// 钩子
......
......@@ -11,7 +11,7 @@
namespace app\index\controller;
use app\service\SeoService;
use app\service\GoodsService;
use app\service\GoodsBrowseService;
/**
* 用户商品浏览
......@@ -39,63 +39,85 @@ class UserGoodsBrowse extends Common
}
/**
* 商品浏览列表
* @author Devil
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-09
* @date 2020-06-30
* @desc description
*/
public function Index()
{
// 参数
$params = input();
$params['user'] = $this->user;
// 分页
$number = 10;
// 条件
$where = GoodsService::UserGoodsBrowseListWhere($params);
// 获取总数
$total = GoodsService::GoodsBrowseTotal($where);
// 总数
$total = GoodsBrowseService::GoodsBrowseTotal($this->form_where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => MyUrl('index/usergoodsbrowse/index'),
);
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('index/usergoodsbrowse/index'),
];
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = GoodsService::GoodsBrowseList($data_params);
$this->assign('data_list', $data['data']);
$this->assign('ids', empty($data['data']) ? '' : implode(',', array_column($data['data'], 'id')));
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
// 浏览器名称
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的足迹', 1));
// 参数
$this->assign('params', $params);
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
$this->assign('data_list', $ret['data']);
return $this->fetch();
}
/**
* 商品浏览删除
* @author Devil
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['b.id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
}
$this->assign('is_header', 0);
$this->assign('is_footer', 0);
return $this->fetch();
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @date 2020-06-30
* @desc description
*/
public function Delete()
......@@ -103,13 +125,13 @@ class UserGoodsBrowse extends Common
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
return $this->error('非法访问');
}
// 开始处理
$params = input('post.');
$params = $this->data_post;
$params['user'] = $this->user;
return GoodsService::GoodsBrowseDelete($params);
return GoodsBrowseService::GoodsBrowseDelete($params);
}
}
?>
\ No newline at end of file
......@@ -10,17 +10,17 @@
// +----------------------------------------------------------------------
namespace app\index\controller;
use app\service\GoodsService;
use app\service\GoodsFavorService;
use app\service\SeoService;
/**
* 用户收藏
* 用户商品收藏
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class UserFavor extends Common
class UserGoodsFavor extends Common
{
/**
* 构造方法
......@@ -39,53 +39,76 @@ class UserFavor extends Common
}
/**
* 商品收藏
* @author Devil
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-09
* @date 2020-06-30
* @desc description
*/
public function Goods()
public function Index()
{
// 参数
$params = input();
$params['user'] = $this->user;
// 总数
$total = GoodsFavorService::GoodsFavorTotal($this->form_where);
// 分页
$number = 10;
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('index/usergoodsfavor/index'),
];
$page = new \base\Page($page_params);
// 条件
$where = GoodsService::UserGoodsFavorListWhere($params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
// 获取总数
$total = GoodsService::GoodsFavorTotal($where);
// 浏览器名称
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('商品收藏', 1));
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => MyUrl('index/userfavor/goods'),
);
$page = new \base\Page($page_params);
// 基础参数赋值
$this->assign('params', $this->data_request);
$this->assign('page_html', $page->GetPageHtml());
$this->assign('data_list', $ret['data']);
return $this->fetch();
}
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = GoodsService::GoodsFavorList($data_params);
$this->assign('data_list', $data['data']);
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['f.id', '=', intval($this->data_request['id'])],
];
// 浏览器名称
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的收藏', 1));
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
$this->assign('data', $data);
}
// 参数
$this->assign('params', $params);
$this->assign('is_header', 0);
$this->assign('is_footer', 0);
return $this->fetch();
}
......@@ -97,7 +120,7 @@ class UserFavor extends Common
* @date 2018-09-13
* @desc description
*/
public function Cancel()
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
......@@ -105,10 +128,9 @@ class UserFavor extends Common
$this->error('非法访问');
}
// 开始处理
$params = input('post.');
$params = $this->data_post;
$params['user'] = $this->user;
return GoodsService::GoodsFavor($params);
return GoodsFavorService::GoodsFavorDelete($params);
}
}
?>
\ No newline at end of file
......@@ -22,17 +22,18 @@ use app\service\SeoService;
*/
class UserIntegral extends Common
{
/**
* [_initialize 前置操作-继承公共前置方法]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function _initialize()
public function __construct()
{
// 调用父类前置方法
parent::_initialize();
parent::__construct();
// 是否登录
$this->IsLogin();
......
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\form;
use think\Db;
/**
* 我的问答动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class Answer
{
// 基础条件
public $condition_base = [];
/**
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-29
* @desc description
* @param [array] $params [输入参数]
*/
public function __construct($params = [])
{
// 用户信息
if(!empty($params['system_user']))
{
$this->condition_base[] = ['user_id', '=', $params['system_user']['id']];
}
}
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('index/answer/index'),
],
// 表单配置
'form' => [
[
'label' => '联系人',
'view_type' => 'field',
'view_key' => 'name',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '联系电话',
'view_type' => 'field',
'view_key' => 'tel',
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => '内容',
'view_type' => 'module',
'view_key' => 'answer/module/content',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'content',
'where_type' => 'like',
],
],
[
'label' => '回复内容',
'view_type' => 'module',
'view_key' => 'answer/module/reply',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'reply',
'where_type' => 'like',
],
],
[
'label' => '回复时间',
'view_type' => 'field',
'view_key' => 'reply_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'reply_time',
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'add_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'answer/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
];
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\form;
use think\Db;
/**
* 用户商品浏览管理动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class UserGoodsBrowse
{
// 基础条件
public $condition_base = [];
/**
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-29
* @desc description
* @param [array] $params [输入参数]
*/
public function __construct($params = [])
{
// 用户信息
if(!empty($params['system_user']))
{
$this->condition_base[] = ['b.user_id', '=', $params['system_user']['id']];
}
}
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('index/usergoodsbrowse/index'),
'is_delete' => 1,
'delete_url' => MyUrl('index/usergoodsbrowse/delete'),
'delete_key' => 'ids',
],
// 表单配置
'form' => [
[
'view_type' => 'checkbox',
'is_checked' => 0,
'checked_text' => '反选',
'not_checked_text' => '全选',
'align' => 'center',
'width' => 80,
],
[
'label' => '商品信息',
'view_type' => 'module',
'view_key' => 'usergoodsbrowse/module/goods',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
],
],
[
'label' => '销售价格(元)',
'view_type' => 'field',
'view_key' => 'price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_price',
'is_point' => 1,
],
],
[
'label' => '原价(元)',
'view_type' => 'field',
'view_key' => 'original_price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_original_price',
'is_point' => 1,
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'b.add_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'usergoodsbrowse/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
];
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\form;
use think\Db;
/**
* 用户商品收藏管理动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class UserGoodsFavor
{
// 基础条件
public $condition_base = [];
/**
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-29
* @desc description
* @param [array] $params [输入参数]
*/
public function __construct($params = [])
{
// 用户信息
if(!empty($params['system_user']))
{
$this->condition_base[] = ['f.user_id', '=', $params['system_user']['id']];
}
}
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('index/usergoodsfavor/index'),
'is_delete' => 1,
'delete_url' => MyUrl('index/usergoodsfavor/delete'),
'delete_key' => 'ids',
],
// 表单配置
'form' => [
[
'view_type' => 'checkbox',
'is_checked' => 0,
'checked_text' => '反选',
'not_checked_text' => '全选',
'align' => 'center',
'width' => 80,
],
[
'label' => '商品信息',
'view_type' => 'module',
'view_key' => 'usergoodsfavor/module/goods',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
],
],
[
'label' => '销售价格(元)',
'view_type' => 'field',
'view_key' => 'price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_price',
'is_point' => 1,
],
],
[
'label' => '原价(元)',
'view_type' => 'field',
'view_key' => 'original_price',
'search_config' => [
'form_type' => 'section',
'form_name' => 'g.min_original_price',
'is_point' => 1,
],
],
[
'label' => '创建时间',
'view_type' => 'field',
'view_key' => 'add_time_time',
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'f.add_time',
],
],
[
'label' => '操作',
'view_type' => 'operate',
'view_key' => 'usergoodsfavor/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
];
}
}
?>
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}
\ No newline at end of file
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- content -->
<div class="am-container user-main">
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('index/answer/index')}}" request-type="form">
<div class="thin">
<div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="其实搜索很简单 ^_^!" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
</span>
<!-- 继承公共的 form -->
{{extend name="public/module/user_form" /}}
<!-- 表单顶部操作栏 -->
{{block name="form_operate_top"}}
<a href="javascript:;" type="button" class="am-btn am-btn-success am-radius am-btn-xs am-icon-plus" data-am-modal="{target: '#plugins-answers-popup-ask'}"> 新增</a>
<!-- 父级内容 -->
{__block__}
{{/block}}
<!-- 扩展 -->
{{block name="form_extend"}}
<!-- 新增问答弹窗 -->
<div class="am-popup" id="plugins-answers-popup-ask">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">提问/留言</h4>
<span data-am-modal-close class="am-close">&times;</span></div>
<div class="am-popup-bd">
<form class="am-form form-validation-plugins-answer-ask view-save" action="{{:MyUrl('index/answer/save')}}" method="POST" request-type="ajax-reload">
<div class="am-form-group">
<label>昵称
<span class="am-form-group-label-tips-must">必填</span></label>
<input type="text" name="name" placeholder="昵称" minlength="1" maxlength="30" data-validation-message="昵称格式 1~30 个字符之间" class="am-radius" required /></div>
<div class="am-form-group">
<label>电话
<span class="am-form-group-label-tips">选填</span></label>
<input type="text" name="tel" placeholder="电话" data-validation-message="请填写电话" class="am-radius" /></div>
<div class="am-form-group">
<label>标题
<span class="am-form-group-label-tips-must">必填</span></label>
<input type="text" name="title" placeholder="标题" minlength="1" maxlength="60" data-validation-message="标题格式 1~60 个字符之间" class="am-radius" required /></div>
<div class="am-form-group">
<label>内容
<span class="am-form-group-label-tips-must">必填</span></label>
<textarea class="am-radius am-validate" name="content" rows="5" minlength="5" maxlength="1000" placeholder="内容至少5个字" data-validation-message="内容格式 5~1000 个字符之间" required></textarea>
</div>
<label class="am-fl thin_sub more-submit">
更多筛选条件
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
<i class="am-icon-angle-up"></i>
{{else /}}
<input type="checkbox" name="is_more" value="1" id="is_more" />
<i class="am-icon-angle-down"></i>
{{/if}}
</label>
</div>
<table class="so-list more-where {{if !isset($params['is_more'])}}none{{/if}}">
<tbody>
<tr>
<td>
<span>显示:</span>
<select name="is_show" class="chosen-select" data-placeholder="是否显示...">
<option value="-1">是否显示...</option>
{{if !empty($common_is_show_list)}}
{{foreach $common_is_show_list as $v}}
<option value="{{$v.id}}" {{if isset($params['is_show']) and $params['is_show'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>状态:</span>
<select name="is_reply" class="chosen-select" data-placeholder="是否回复...">
<option value="-1">是否回复...</option>
{{if !empty($common_is_text_list)}}
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($params['is_reply']) and $params['is_reply'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
<a href="{{:MyUrl('index/answer/index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
</td>
</tr>
</tbody>
</table>
</form>
<!-- 列表 -->
<div class="data-list am-margin-top-sm">
<table class="am-table am-table-striped">
<thead>
<tr>
<th>姓名</th>
<th class="am-hide-sm-only">电话</th>
<th>标题</th>
<th class="am-hide-sm-only">内容</th>
<th class="am-hide-sm-only">回复</th>
<th class="am-hide-md-down">回复时间</th>
<th class="am-hide-md-down">时间</th>
<th>更多</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr id="data-list-{{$v.id}}">
<td>{{$v.name}}</td>
<td class="am-hide-sm-only">{{$v.tel}}</td>
<td>{{$v.title}}</td>
<td class="am-hide-sm-only reply-content">{{$v.content|raw}}</td>
<td class="am-hide-sm-only reply-content">
{{if $v['is_reply'] eq 1}}
{{$v.reply|raw}}
{{else /}}
<span class="gray-text">未回复</span>
{{/if}}
</td>
<td class="am-hide-md-down">{{$v.reply_time}}</td>
<td class="am-hide-md-down">{{$v.add_time}}</td>
<td>
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">详情内容</h4>
<span data-am-modal-close
class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<dl class="dl-content">
<dt>姓名</dt>
<dd>{{if empty($v['name'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.name}}{{/if}}</dd>
<dt>电话</dt>
<dd>{{if empty($v['tel'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.tel}}{{/if}}</dd>
<dt>标题</dt>
<dd>{{if empty($v['title'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.title}}{{/if}}</dd>
<dt>内容</dt>
<dd>{{$v.content|raw}}</dd>
<dt>回复内容</dt>
<dd>
{{if $v['is_reply'] eq 1}}
{{$v.reply|raw}}
{{else /}}
<span class="gray-text">未回复</span>
{{/if}}
</dd>
<dt>回复时间</dt>
<dd>{{if empty($v['reply_time'])}}<span class="cr-ddd">未回复</span>{{else /}}{{$v.reply_time}}{{/if}}</dd>
<dt>创建时间</dt>
<dd>{{$v.add_time}}</dd>
<dt>更新时间</dt>
<dd>{{$v.upd_time}}</dd>
</dl>
</div>
</div>
</div>
</td>
<td class="view-operation">
<button class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-trash-o submit-delete" data-url="{{:MyUrl('index/answer/delete')}}" data-id="{{$v.id}}"> 删除</button>
</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{if empty($data_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
{{/if}}
<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 am-btn-block" data-am-loading="{loadingText:'处理中...'}">提交</button></div>
</form>
</div>
<!-- 分页 -->
{{if !empty($data_list)}}
{{$page_html|raw}}
{{/if}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
{{/block}}
\ No newline at end of file
<!-- 内容 -->
{{if !empty($module_data) and !empty($module_data['content'])}}
<div class="am-scrollable-vertical am-nowrap-initial reply-content">{{$module_data.content|raw}}</div>
{{/if}}
\ No newline at end of file
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('index/answer/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
\ No newline at end of file
<!-- 回复内容 -->
{{if !empty($module_data) and isset($module_data['is_reply']) and $module_data['is_reply'] eq 1 and !empty($module_data['reply'])}}
<div class="am-scrollable-vertical am-nowrap-initial reply-content">{{$module_data.reply|raw}}</div>
{{/if}}
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
\ No newline at end of file
{{extend name="public/module/user_form" /}}
\ No newline at end of file
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_form_bottom_operate}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_form_bottom_operate, ['hook_name'=>$hook_name_form_bottom_operate, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
\ No newline at end of file
<!-- 公共操作 -->
<!-- 是否开启删除操作 -->
{{if isset($form_table['base']['is_delete']) and $form_table['base']['is_delete'] eq 1}}
<button
type="button"
class="am-btn am-btn-danger am-radius am-btn-xs am-icon-trash-o form-table-operate-top-delete-submit"
data-url="{{if isset($form_table['base']['delete_url'])}}{{$form_table.base.delete_url}}{{/if}}"
data-form="{{if isset($form_table['base']['delete_form'])}}{{$form_table.base.delete_form}}{{/if}}"
data-key="{{if isset($form_table['base']['delete_key'])}}{{$form_table.base.delete_key}}{{/if}}"
data-confirm-title="{{if isset($form_table['base']['confirm_title'])}}{{$form_table.base.confirm_title}}{{/if}}"
data-confirm-msg="{{if isset($form_table['base']['confirm_msg'])}}{{$form_table.base.confirm_msg}}{{/if}}"
data-timeout="{{if isset($form_table['base']['timeout'])}}{{$form_table.base.timeout}}{{/if}}"
> 删除</button>
{{/if}}
<!-- 钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>plugins_view_admin_goods_top_operate</span>
</div>
{{/if}}
{{php}}
$hook_name = 'plugins_view_admin_goods_top_operate';
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- 是否开启搜索操作 公共搜索操作放在最后面 -->
{{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1}}
<a href="{{if isset($form_table['base']['search_url'])}}{{$form_table.base.search_url}}{{/if}}" class="am-btn am-btn-warning am-radius am-btn-sm am-icon-filter"> 重置</a>
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example am-icon-search" data-am-loading="{loadingText:' 搜索中...'}"> 搜索</button>
{{/if}}
\ No newline at end of file
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- content -->
<div class="am-container user-main">
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<!-- content top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_content_top}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_content_top, ['hook_name'=>$hook_name_content_top, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- content start -->
<div class="form-table-content">
<!-- content inside top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_content_inside_top}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_content_inside_top, ['hook_name'=>$hook_name_content_inside_top, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- form -->
{{if !empty($form_table) and !empty($form_table['base']) and !empty($form_table['form']) and is_array($form_table['base']) and is_array($form_table['form'])}}
<form class="form-validation-search" method="post" action="{{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1 and !empty($form_table['base']['search_url'])}}{{$form_table.base.search_url}}{{/if}}" request-type="jump" request-value="{{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1 and !empty($form_table['base']['search_url'])}}{{$form_table.base.search_url}}{{/if}}">
<!-- nav start -->
<div class="am-g form-table-navigation">
{{block name="form_navigation"}}{{/block}}
</div>
<!-- nav end -->
<!-- top operate start -->
<div class="am-g form-table-operate-top">
{{block name="form_operate_top"}}
{{include file="public/module/form_operate_top" /}}
{{/block}}
</div>
<!-- top operate end -->
<!-- form table start -->
{{include file="public/module/form_table" /}}
<!-- form table end -->
<!-- bottom operate start -->
<div class="am-g am-margin-top-sm form-table-operate-bottom">
{{block name="form_operate_bottom"}}
{{include file="public/module/form_operate_bottom" /}}
{{/block}}
</div>
<!-- bottom operate end -->
</form>
{{else /}}
<div class="table-no"><i class="am-icon-warning"></i> {{if empty($form_error)}}动态表格配置有误{{else /}}{{$form_error}}{{/if}}</div>
{{/if}}
<!-- page start -->
{{block name="form_page"}}
{{if !empty($data_list) and isset($page_html)}}
{{$page_html|raw}}
{{/if}}
{{/block}}
<!-- page end -->
<!-- extend start -->
{{block name="form_extend"}}{{/block}}
<!-- extend end -->
<!-- content inside top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_content_inside_bottom}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_content_inside_bottom, ['hook_name'=>$hook_name_content_inside_bottom, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</div>
<!-- content end -->
<!-- content bottom hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag">
<span>{{$hook_name_content_bottom}}</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_content_bottom, ['hook_name'=>$hook_name_content_bottom, 'is_backend'=>true]);
if(!empty($hook_data) && is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- content -->
<div class="am-container user-main">
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('index/userfavor/goods')}}" request-type="form">
<div class="thin">
<div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="其实搜索很简单 ^_^!" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
</span>
</div>
</div>
</form>
<!-- 商品列表 -->
<div class="data-list am-margin-top-sm">
<table class="am-table am-table-striped">
<thead>
<tr>
<th class="base">商品信息</th>
<th class="price">价格</th>
<th class="operate">操作</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr id="data-list-{{$v.goods_id}}">
<td>
<div class="goods-detail">
<a href="{{$v.goods_url}}" target="_blank">
<img src="{{$v.images}}" alt="{{$v.title}}" class="am-img-thumbnail am-radius" />
</a>
<div class="goods-base">
<a href="{{$v.goods_url}}" target="_blank" class="goods-title">{{$v.title}}</a>
</div>
</div>
</td>
<td>
{{if $v['original_price'] gt 0}}
<p class="original-price">{{$price_symbol}}{{$v.original_price}}</p>
{{/if}}
<p class="line-price">{{$price_symbol}}{{$v.price}}</p>
</td>
<td>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-paint-brush submit-ajax" data-url="{{:MyUrl('index/userfavor/cancel')}}" data-id="{{$v.goods_id}}" data-view="delete"> 取消</button>
</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{if empty($data_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
{{/if}}
</div>
<!-- 分页 -->
{{if !empty($data_list)}}
{{$page_html|raw}}
{{/if}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}
\ No newline at end of file
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- content -->
<div class="am-container user-main">
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('index/usergoodsbrowse/index')}}" request-type="form">
<div class="thin">
<div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="其实搜索很简单 ^_^!" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
</span>
</div>
</div>
</form>
<!-- 商品列表 -->
<div class="data-list am-margin-top-sm">
<table class="am-table am-table-striped">
<thead>
<tr>
<th class="base">商品信息</th>
<th class="price">价格</th>
<th class="operate">操作</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr id="data-list-{{$v.id}}">
<td>
<div class="goods-detail">
<a href="{{$v.goods_url}}" target="_blank">
<img src="{{$v.images}}" alt="{{$v.title}}" class="am-img-thumbnail am-radius" />
</a>
<div class="goods-base">
<a href="{{$v.goods_url}}" target="_blank" class="goods-title">{{$v.title}}</a>
</div>
</div>
</td>
<td>
{{if $v['original_price'] gt 0}}
<p class="original-price">{{$price_symbol}}{{$v.original_price}}</p>
{{/if}}
<p class="line-price">{{$price_symbol}}{{$v.price}}</p>
</td>
<td>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-trash-o submit-delete" data-url="{{:MyUrl('index/usergoodsbrowse/delete')}}" data-id="{{$v.id}}" data-view="delete"> 删除</button>
</td>
</tr>
{{/foreach}}
{{/if}}
</tbody>
</table>
{{if empty($data_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
{{/if}}
</div>
{{if !empty($data_list)}}
<a href="javascript:;" class="am-btn am-btn-warning am-radius am-btn-sm submit-ajax" data-url="{{:MyUrl('index/usergoodsbrowse/delete')}}" data-id="{{$ids}}" data-view="reload" data-msg="清空后不可恢复、确认操作吗?">清空</a>
<!-- 分页 -->
{{$page_html|raw}}
{{/if}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/user_form" /}}
\ No newline at end of file
<!-- 商品基础信息 -->
{{if !empty($module_data)}}
<div class="am-nbfc">
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}">
<img src="{{$module_data['images']}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}" {{if !empty($module_data['title_color'])}} style="color:{{$module_data.title_color}};" {{/if}} class="am-nowrap-initial">{{$module_data.title}}</a>
{{if !empty($module_data['simple_desc'])}}
<p class="am-text-danger am-nowrap-initial">{{$module_data.simple_desc}}</p>
{{/if}}
</div>
{{/if}}
\ No newline at end of file
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('index/usergoodsbrowse/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('index/usergoodsbrowse/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</button>
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/user_form" /}}
\ No newline at end of file
<!-- 商品基础信息 -->
{{if !empty($module_data)}}
<div class="am-nbfc">
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}">
<img src="{{$module_data['images']}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<a href="{{$module_data.goods_url}}" target="_blank" title="{{$module_data.title}}" {{if !empty($module_data['title_color'])}} style="color:{{$module_data.title_color}};" {{/if}} class="am-nowrap-initial">{{$module_data.title}}</a>
{{if !empty($module_data['simple_desc'])}}
<p class="am-text-danger am-nowrap-initial">{{$module_data.simple_desc}}</p>
{{/if}}
</div>
{{/if}}
\ No newline at end of file
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('index/usergoodsfavor/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>详情</span>
</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('index/usergoodsfavor/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
<i class="am-icon-trash-o"></i>
<span>删除</span>
</button>
\ No newline at end of file
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
{{extend name="public/module/user_form" /}}
<!-- 顶部导航内容 -->
{{block name="form_navigation"}}
......
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\service;
use think\Db;
use app\service\ResourcesService;
use app\service\UserService;
/**
* 商品浏览服务层
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-09
* @desc description
*/
class GoodsBrowseService
{
/**
* 商品浏览保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-15
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseSave($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'goods_id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'is_array',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
$where = ['goods_id'=>intval($params['goods_id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsBrowse')->where($where)->find();
$data = [
'goods_id' => intval($params['goods_id']),
'user_id' => $params['user']['id'],
];
if(empty($temp))
{
$data['add_time'] = time();
$status = Db::name('GoodsBrowse')->insertGetId($data) > 0;
} else {
$data['upd_time'] = time();
$status = Db::name('GoodsBrowse')->where($where)->update($data) !== false;
}
if($status)
{
return DataReturn('添加成功', 0);
}
return DataReturn('添加失败', -100);
}
/**
* 前端商品浏览列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function UserGoodsBrowseListWhere($params = [])
{
$where = [
['g.is_delete_time', '=', 0]
];
// 用户id
if(!empty($params['user']))
{
$where[] = ['b.user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
{
$where[] = ['g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords', 'like', '%'.$params['keywords'].'%'];
}
return $where;
}
/**
* 商品浏览总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public static function GoodsBrowseTotal($where = [])
{
return (int) Db::name('GoodsBrowse')->alias('b')->join(['__GOODS__'=>'g'], 'g.id=b.goods_id')->where($where)->count();
}
/**
* 商品浏览列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseList($params = [])
{
$where = empty($params['where']) ? [] : $params['where'];
$m = isset($params['m']) ? intval($params['m']) : 0;
$n = isset($params['n']) ? intval($params['n']) : 10;
$order_by = empty($params['order_by']) ? 'b.id desc' : $params['order_by'];
$field = 'b.*, g.title, g.original_price, g.price, g.min_price, g.images';
// 获取数据
$data = Db::name('GoodsBrowse')->alias('b')->join(['__GOODS__'=>'g'], 'g.id=b.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
if(!empty($data))
{
foreach($data as &$v)
{
// 用户信息
if(isset($v['user_id']))
{
if(isset($params['is_public']) && $params['is_public'] == 0)
{
$v['user'] = UserService::GetUserViewInfo($v['user_id']);
}
}
// 商品信息
$v['images_old'] = $v['images'];
$v['images'] = ResourcesService::AttachmentPathViewHandle($v['images']);
$v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]);
// 时间
$v['add_time_time'] = date('Y-m-d H:i:s', $v['add_time']);
$v['add_time_date'] = date('Y-m-d', $v['add_time']);
}
}
return DataReturn('处理成功', 0, $data);
}
/**
* 商品浏览删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseDelete($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'ids',
'error_msg' => '操作id有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 是否数组
if(!is_array($params['ids']))
{
$params['ids'] = explode(',', $params['ids']);
}
// 条件
$where = ['id' => $params['ids']];
// 用户id
if(!empty($params['user']))
{
$where['user_id'] = $params['user']['id'];
}
// 删除
if(Db::name('GoodsBrowse')->where($where)->delete())
{
return DataReturn('删除成功', 0);
}
return DataReturn('删除失败', -100);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\service;
use think\Db;
use app\service\ResourcesService;
use app\service\UserService;
/**
* 商品收藏服务层
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-09
* @desc description
*/
class GoodsFavorService
{
/**
* 商品收藏/取消
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsFavorCancel($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 查询用户状态是否正常
$ret = UserService::UserStatusCheck('id', $params['user']['id']);
if($ret['code'] != 0)
{
return $ret;
}
// 开始操作
$data = ['goods_id'=>intval($params['id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsFavor')->where($data)->find();
if(empty($temp))
{
// 添加收藏
$data['add_time'] = time();
if(Db::name('GoodsFavor')->insertGetId($data) > 0)
{
return DataReturn('收藏成功', 0, [
'text' => '已收藏',
'status' => 1,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
} else {
return DataReturn('收藏失败');
}
} else {
// 是否强制收藏
if(isset($params['is_mandatory_favor']) && $params['is_mandatory_favor'] == 1)
{
return DataReturn('收藏成功', 0, [
'text' => '已收藏',
'status' => 1,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
}
// 删除收藏
if(Db::name('GoodsFavor')->where($data)->delete() > 0)
{
return DataReturn('取消成功', 0, [
'text' => '收藏',
'status' => 0,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
} else {
return DataReturn('取消失败');
}
}
}
/**
* 用户是否收藏了商品
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
* @return [int] [1已收藏, 0未收藏]
*/
public static function IsUserGoodsFavor($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'goods_id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
$data = ['goods_id'=>intval($params['goods_id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsFavor')->where($data)->find();
return DataReturn('操作成功', 0, empty($temp) ? 0 : 1);
}
/**
* 前端商品收藏列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function UserGoodsFavorListWhere($params = [])
{
$where = [
['g.is_delete_time', '=', 0]
];
// 用户id
if(!empty($params['user']))
{
$where[]= ['f.user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
{
$where[] = ['g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords', 'like', '%'.$params['keywords'].'%'];
}
return $where;
}
/**
* 商品收藏总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public static function GoodsFavorTotal($where = [])
{
return (int) Db::name('GoodsFavor')->alias('f')->join(['__GOODS__'=>'g'], 'g.id=f.goods_id')->where($where)->count();
}
/**
* 商品收藏列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsFavorList($params = [])
{
$where = empty($params['where']) ? [] : $params['where'];
$m = isset($params['m']) ? intval($params['m']) : 0;
$n = isset($params['n']) ? intval($params['n']) : 10;
$order_by = empty($params['order_by']) ? 'f.id desc' : $params['order_by'];
$field = 'f.*, g.title, g.original_price, g.price, g.min_price, g.images';
// 获取数据
$data = Db::name('GoodsFavor')->alias('f')->join(['__GOODS__'=>'g'], 'g.id=f.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
if(!empty($data))
{
foreach($data as &$v)
{
// 用户信息
if(isset($v['user_id']))
{
if(isset($params['is_public']) && $params['is_public'] == 0)
{
$v['user'] = UserService::GetUserViewInfo($v['user_id']);
}
}
// 商品信息
$v['images_old'] = $v['images'];
$v['images'] = ResourcesService::AttachmentPathViewHandle($v['images']);
$v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]);
// 时间
$v['add_time_time'] = date('Y-m-d H:i:s', $v['add_time']);
$v['add_time_date'] = date('Y-m-d', $v['add_time']);
}
}
return DataReturn('处理成功', 0, $data);
}
/**
* 商品收藏删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsFavorDelete($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'ids',
'error_msg' => '操作id有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 是否数组
if(!is_array($params['ids']))
{
$params['ids'] = explode(',', $params['ids']);
}
// 条件
$where = ['id' => $params['ids']];
// 用户id
if(!empty($params['user']))
{
$where['user_id'] = $params['user']['id'];
}
// 删除
if(Db::name('GoodsFavor')->where($where)->delete())
{
return DataReturn('删除成功', 0);
}
return DataReturn('删除失败', -100);
}
}
?>
\ No newline at end of file
......@@ -555,197 +555,6 @@ class GoodsService
return ['choose'=>$choose];
}
/**
* 商品收藏
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsFavor($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 查询用户状态是否正常
$ret = UserService::UserStatusCheck('id', $params['user']['id']);
if($ret['code'] != 0)
{
return $ret;
}
// 开始操作
$data = ['goods_id'=>intval($params['id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsFavor')->where($data)->find();
if(empty($temp))
{
// 添加收藏
$data['add_time'] = time();
if(Db::name('GoodsFavor')->insertGetId($data) > 0)
{
return DataReturn('收藏成功', 0, [
'text' => '已收藏',
'status' => 1,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
} else {
return DataReturn('收藏失败');
}
} else {
// 是否强制收藏
if(isset($params['is_mandatory_favor']) && $params['is_mandatory_favor'] == 1)
{
return DataReturn('收藏成功', 0, [
'text' => '已收藏',
'status' => 1,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
}
// 删除收藏
if(Db::name('GoodsFavor')->where($data)->delete() > 0)
{
return DataReturn('取消成功', 0, [
'text' => '收藏',
'status' => 0,
'count' => self::GoodsFavorTotal(['goods_id'=>$data['goods_id']]),
]);
} else {
return DataReturn('取消失败');
}
}
}
/**
* 用户是否收藏了商品
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
* @return [int] [1已收藏, 0未收藏]
*/
public static function IsUserGoodsFavor($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'goods_id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
$data = ['goods_id'=>intval($params['goods_id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsFavor')->where($data)->find();
return DataReturn('操作成功', 0, empty($temp) ? 0 : 1);
}
/**
* 前端商品收藏列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function UserGoodsFavorListWhere($params = [])
{
$where = [
['g.is_delete_time', '=', 0]
];
// 用户id
if(!empty($params['user']))
{
$where[]= ['f.user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
{
$where[] = ['g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords', 'like', '%'.$params['keywords'].'%'];
}
return $where;
}
/**
* 商品收藏总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public static function GoodsFavorTotal($where = [])
{
return (int) Db::name('GoodsFavor')->alias('f')->join(['__GOODS__'=>'g'], 'g.id=f.goods_id')->where($where)->count();
}
/**
* 商品收藏列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsFavorList($params = [])
{
$where = empty($params['where']) ? [] : $params['where'];
$m = isset($params['m']) ? intval($params['m']) : 0;
$n = isset($params['n']) ? intval($params['n']) : 10;
$order_by = empty($params['order_by']) ? 'f.id desc' : $params['order_by'];
$field = 'f.*, g.title, g.original_price, g.price, g.min_price, g.images';
// 获取数据
$data = Db::name('GoodsFavor')->alias('f')->join(['__GOODS__'=>'g'], 'g.id=f.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
if(!empty($data))
{
foreach($data as &$v)
{
// 图片
$v['images_old'] = $v['images'];
$v['images'] = ResourcesService::AttachmentPathViewHandle($v['images']);
$v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]);
}
}
return DataReturn('处理成功', 0, $data);
}
/**
* 商品访问统计加1
* @author Devil
......@@ -764,174 +573,6 @@ class GoodsService
return false;
}
/**
* 商品浏览保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-15
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseSave($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'goods_id',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'is_array',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
$where = ['goods_id'=>intval($params['goods_id']), 'user_id'=>$params['user']['id']];
$temp = Db::name('GoodsBrowse')->where($where)->find();
$data = [
'goods_id' => intval($params['goods_id']),
'user_id' => $params['user']['id'],
'upd_time' => time(),
];
if(empty($temp))
{
$data['add_time'] = time();
$status = Db::name('GoodsBrowse')->insertGetId($data) > 0;
} else {
$status = Db::name('GoodsBrowse')->where($where)->update($data) !== false;
}
if($status)
{
return DataReturn('处理成功', 0);
}
return DataReturn('处理失败', -100);
}
/**
* 前端商品浏览列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function UserGoodsBrowseListWhere($params = [])
{
$where = [
['g.is_delete_time', '=', 0]
];
// 用户id
if(!empty($params['user']))
{
$where[] = ['b.user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
{
$where[] = ['g.title|g.model|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords', 'like', '%'.$params['keywords'].'%'];
}
return $where;
}
/**
* 商品浏览总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public static function GoodsBrowseTotal($where = [])
{
return (int) Db::name('GoodsBrowse')->alias('b')->join(['__GOODS__'=>'g'], 'g.id=b.goods_id')->where($where)->count();
}
/**
* 商品浏览列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseList($params = [])
{
$where = empty($params['where']) ? [] : $params['where'];
$m = isset($params['m']) ? intval($params['m']) : 0;
$n = isset($params['n']) ? intval($params['n']) : 10;
$order_by = empty($params['order_by']) ? 'b.id desc' : $params['order_by'];
$field = 'b.*, g.title, g.original_price, g.price, g.min_price, g.images';
// 获取数据
$data = Db::name('GoodsBrowse')->alias('b')->join(['__GOODS__'=>'g'], 'g.id=b.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
if(!empty($data))
{
foreach($data as &$v)
{
$v['images_old'] = $v['images'];
$v['images'] = ResourcesService::AttachmentPathViewHandle($v['images']);
$v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]);
}
}
return DataReturn('处理成功', 0, $data);
}
/**
* 商品浏览删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public static function GoodsBrowseDelete($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => '删除数据id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 删除
$where = [
'id' => explode(',', $params['id']),
'user_id' => $params['user']['id']
];
if(Db::name('GoodsBrowse')->where($where)->delete())
{
return DataReturn('删除成功', 0);
}
return DataReturn('删除失败或资源不存在', -100);
}
/**
* 获取商品总数
* @author Devil
......
......@@ -16,6 +16,7 @@ use app\service\BuyService;
use app\service\MessageService;
use app\service\OrderService;
use app\service\GoodsService;
use app\service\GoodsBrowseService;
/**
* 导航服务层
......@@ -641,7 +642,7 @@ class NavigationService
'items' => [
[
'name' => '商品收藏',
'url' => MyUrl('index/userfavor/goods'),
'url' => MyUrl('index/usergoodsfavor/index'),
],
],
],
......@@ -833,8 +834,8 @@ class NavigationService
],
[
'name' => '我的收藏',
'url' => MyUrl('index/userfavor/goods'),
'contains' => ['indexuserfavorgoods'],
'url' => MyUrl('index/usergoodsfavor/index'),
'contains' => ['indexusergoodsfavorindex'],
'is_show' => 1,
'icon' => 'am-icon-heart-o',
'is_system' => 1,
......@@ -1029,7 +1030,7 @@ class NavigationService
// 我的足迹总数
$where = ['user_id'=>$params['user']['id']];
$user_goods_browse_count = GoodsService::GoodsBrowseTotal($where);
$user_goods_browse_count = GoodsBrowseService::GoodsBrowseTotal($where);
// 用户积分
$user_integral = isset($params['user']['integral']) ? $params['user']['integral'] : 0;
......
/**
* 登录页面背景图片
*/
body {
background: url(data:image/png;base64,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) left top #f5f5f5;
}
.bg-slides {
position: absolute;
width: 100vw;
......
/**
* 列表
*/
.content-right table.am-table .reply-content {
.form-table-content table.am-table .reply-content {
max-height: 80px;
}
\ No newline at end of file
......@@ -87,7 +87,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view, .content-app-ite
height: 32px;
}
.popup-iframe-not-title .am-popup-inner .am-close:hover {
background: #2f8ded;
background: #f22a30;
}
/**
......
/**
* 列表
*/
.data-list table.am-table .reply-content { max-width: 200px; }
\ No newline at end of file
.form-table-content table.am-table .reply-content {
max-height: 80px;
}
\ No newline at end of file
......@@ -501,24 +501,24 @@ ul.am-dropdown-content > .am-active > a:focus,
}
.am-btn-secondary {
color: #f77076 !important;
background-color: #ffe2e5;
border-color: #facbd0;
color: #F44336 !important;
background-color: #fddedc;
border-color: #ffc3bf;
}
.am-btn-secondary:hover, .am-btn-secondary:focus {
background-color: #f77076;
background-color: #F44336;
}
.am-btn-secondary:hover, .am-btn-secondary:focus, .am-btn-secondary:active, .am-btn-secondary.am-active, .am-dropdown.am-active .am-btn-secondary.am-dropdown-toggle {
color: #fff !important;
border-color: #f77076;
border-color: #F44336;
}
.am-btn-secondary.am-disabled, .am-btn-secondary[disabled], fieldset[disabled] .am-btn-secondary, .am-btn-secondary.am-disabled:hover, .am-btn-secondary[disabled]:hover, fieldset[disabled] .am-btn-secondary:hover, .am-btn-secondary.am-disabled:focus, .am-btn-secondary[disabled]:focus, fieldset[disabled] .am-btn-secondary:focus, .am-btn-secondary.am-disabled:active, .am-btn-secondary[disabled]:active, fieldset[disabled] .am-btn-secondary:active, .am-btn-secondary.am-disabled.am-active, .am-btn-secondary[disabled].am-active, fieldset[disabled] .am-btn-secondary.am-active {
background-color: #ffe2e5;
border-color: #ffe2e5;
background-color: #fddedc;
border-color: #fddedc;
}
.am-btn-secondary:active, .am-btn-secondary.am-active, .am-dropdown.am-active .am-btn-secondary.am-dropdown-toggle {
background-image: none;
background-color: #f77076;
background-color: #F44336;
}
.am-btn-primary {
......
$(function()
{
// 问答表单初始化
FromInit('form.form-validation-plugins-answer-ask');
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册