v4.0手机端UI开发

This commit is contained in:
gongfuxiang 2023-11-08 15:43:08 +08:00
parent 349ef25ea0
commit 3aa956898d
329 changed files with 1784 additions and 5961 deletions

View File

@ -1,147 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\admin\controller\Base;
use app\service\ApiService;
use app\service\AnswerService;
/**
* 问答管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Answer extends Base
{
/**
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
return MyView();
}
/**
* 添加/编辑页面
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 模板数据
$assign = [
// 静态数据
'common_is_show_list' => MyConst('common_is_show_list'),
'common_is_text_list' => MyConst('common_is_text_list'),
];
// 数据
$data = $this->data_detail;
if(!empty($data))
{
// 内容
if(!empty($data['content']))
{
$data['content'] = str_replace('<br />', "\n", $data['content']);
}
// 回复内容
if(!empty($data['reply']))
{
$data['reply'] = str_replace('<br />', "\n", $data['reply']);
}
}
$assign['data'] = $data;
// 参数
$params = $this->data_request;
unset($params['id']);
$assign['params'] = $params;
// 数据赋值
MyViewAssign($assign);
return MyView();
}
/**
* 保存
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
$params = $this->data_request;
return ApiService::ApiDataReturn(AnswerService::AnswerSave($params));
}
/**
* 问答删除
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
$params = $this->data_request;
$params['user_type'] = 'admin';
return ApiService::ApiDataReturn(AnswerService::AnswerDelete($params));
}
/**
* 问答回复处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-03-28T15:07:17+0800
*/
public function Reply()
{
$params = $this->data_request;
return ApiService::ApiDataReturn(AnswerService::AnswerReply($params));
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
$params = $this->data_request;
return ApiService::ApiDataReturn(AnswerService::AnswerStatusUpdate($params));
}
}
?>

View File

@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
/**
* 二维码生成控制层
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class QrCode extends Common
{
/**
* 二维码显示
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-04-16T21:52:09+0800
*/
public function Index()
{
if(empty($this->data_request['content']))
{
MyViewAssign('msg', MyLang('content_params_empty_tips'));
return MyView('public/tips_error');
}
(new \base\Qrcode())->View($this->data_request);
}
/**
* 二维码下载
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-04-16T21:52:18+0800
*/
public function Download()
{
$ret = (new \base\Qrcode())->Download($this->data_request);
if(!empty($ret) && isset($ret['code']) && $ret['code'] != 0)
{
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');
}
}
}
?>

View File

@ -216,6 +216,14 @@ class Site extends Base
// 导航类型
switch($this->nav_type)
{
// 基础
case 'base' :
$field_list[] = 'home_site_logo';
$field_list[] = 'home_site_logo_wap';
$field_list[] = 'home_site_logo_app';
$field_list[] = 'home_site_logo_square';
break;
// 用户注册
case 'register' :
$field_list[] = 'home_user_reg_type';
@ -244,6 +252,9 @@ class Site extends Base
// 站点类型
case 'sitetype' :
// 站点类型
$params['common_site_type'] = empty($params['common_site_type']) ? '' : (is_array($params['common_site_type']) ? json_encode($params['common_site_type'], JSON_UNESCAPED_UNICODE) : $params['common_site_type']);
// 自提地址处理
if(!empty($params['common_self_extraction_address']))
{
@ -312,7 +323,7 @@ class Site extends Base
case 'cache' :
// session是否使用缓存
// 数据是否使用缓存
if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_cache']) && $params['common_data_is_use_cache'] == 1))
if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_redis_cache']) && $params['common_data_is_use_redis_cache'] == 1))
{
// 连接测试
$ret = SiteService::RedisCheckConnectPing($params['common_cache_data_redis_host'], $params['common_cache_data_redis_port'], $params['common_cache_data_redis_password']);

View File

@ -81,10 +81,11 @@ class Goods
'is_sort' => 1,
'sort_field' => 'title',
'search_config' => [
'form_type' => 'input',
'form_name' => 'title|simple_desc|seo_title|seo_keywords|seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
'form_type' => 'input',
'form_name' => 'id',
'where_type_custom' => 'in',
'where_value_custom' => 'WhereValueGoodsInfo',
'placeholder' => $lang['info_placeholder'],
],
],
[
@ -311,6 +312,29 @@ class Goods
];
}
/**
* 商品信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public function WhereValueGoodsInfo($value, $params = [])
{
if(!empty($value))
{
// 获取商品 id
$ids = Db::name('Goods')->alias('g')->join('goods_spec_base gb', 'g.id=gb.goods_id')->where('g.title|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords|gb.coding|gb.barcode', 'like', '%'.$value.'%')->column('g.id');
// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}
/**
* 商品分类条件处理
* @author Devil

View File

@ -87,7 +87,7 @@ class GoodsSpecTemplate
],
],
[
'label' => $lang['category_id'],
'label' => $lang['name'],
'view_type' => 'field',
'view_key' => 'name',
'is_sort' => 1,

View File

@ -364,28 +364,6 @@ return [
],
],
// 问答
'answer' => [
'base_nav_title' => '問答',
'user_info_title' => '用戶資訊',
// 动态表格
'form_table' => [
'user' => '用戶資訊',
'user_placeholder' => '請輸入用戶名/昵稱/手機/郵箱',
'name' => '連絡人',
'tel' => '聯繫電話',
'title' => '標題',
'content' => '內容',
'reply' => '回復內容',
'is_show' => '是否顯示',
'is_reply' => '是否回復',
'reply_time_time' => '回復時間',
'access_count' => '訪問次數',
'add_time_time' => '創建時間',
'upd_time_time' => '更新時間',
],
],
// 仓库管理
'warehouse' => [
'base_nav_title' => '倉庫',
@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => '商品ID',
'info' => '商品資訊',
'info_placeholder' => '請輸入商品名稱/簡述/編碼/條碼/SEO資訊',
'category_text' => '商品分類',
'brand_name' => '品牌',
'price' => '銷售價格(元)',
@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => '資料管理',
'item' => [
'answer_index' => '問答留言',
'answer_reply' => '問答留言回復',
'answer_delete' => '問答留言删除',
'answer_statusupdate' => '問答留言狀態更新',
'answer_saveinfo' => '問答添加/編輯頁面',
'answer_save' => '問答添加/編輯',
'answer_detail' => '問答留言詳情',
'message_index' => '消息管理',
'message_delete' => '消息删除',
'message_detail' => '消息詳情',

View File

@ -365,28 +365,6 @@ return [
],
],
// 问答
'answer' => [
'base_nav_title' => 'Q&A',
'user_info_title' => 'User Info',
// 动态表格
'form_table' => [
'user' => 'User Info',
'user_placeholder' => 'Please enter user name/nickname/mobile phone/email',
'name' => 'Contacts',
'tel' => 'Contact Number',
'title' => 'Title',
'content' => 'Content',
'reply' => 'Reply Content',
'is_show' => 'Show or not',
'is_reply' => 'Reply or not',
'reply_time_time' => 'Reply Time',
'access_count' => 'Access Count',
'add_time_time' => 'Creation Time',
'upd_time_time' => 'Update Time',
],
],
// 仓库管理
'warehouse' => [
'base_nav_title' => 'Warehouse',
@ -588,6 +566,7 @@ return [
'form_table' => [
'id' => 'Goods ID',
'info' => 'Goods Info',
'info_placeholder' => 'Please enter product name/brief description/code/barcode/SEO information',
'category_text' => 'Category',
'brand_name' => 'Brand',
'price' => 'Sales Price(yuan)',
@ -1520,13 +1499,6 @@ return [
'data_index' => [
'name' => 'Data Admin',
'item' => [
'answer_index' => 'Q&A message',
'answer_reply' => 'Q&A message reply',
'answer_delete' => 'Q&A message delete',
'answer_statusupdate' => 'Update message status',
'answer_saveinfo' => 'Q&A add/edit page',
'answer_save' => 'Q&A add/edit',
'answer_detail' => 'Q&A message details',
'message_index' => 'Message log',
'message_delete' => 'Message delete',
'message_detail' => 'Message details',

View File

@ -364,28 +364,6 @@ return [
],
],
// 问答
'answer' => [
'base_nav_title' => 'Preguntas y respuestas',
'user_info_title' => 'Información del usuario',
// 动态表格
'form_table' => [
'user' => 'Información del usuario',
'user_placeholder' => 'Introduzca su nombre de usuario / apodo / teléfono móvil / buzón',
'name' => 'Contactos',
'tel' => 'Número de teléfono de contacto',
'title' => 'Título',
'content' => 'Contenido',
'reply' => 'Contenido de la respuesta',
'is_show' => 'Si se muestra',
'is_reply' => 'Si responder',
'reply_time_time' => 'Tiempo de respuesta',
'access_count' => 'Número de visitas',
'add_time_time' => 'Tiempo de creación',
'upd_time_time' => 'Tiempo de actualización',
],
],
// 仓库管理
'warehouse' => [
'base_nav_title' => 'Almacén',
@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => 'Identificación de la mercancía',
'info' => 'Información sobre productos básicos',
'info_placeholder' => 'Introduzca el nombre del producto / descripción / código / código de barras / información seo',
'category_text' => 'Clasificación de mercancías',
'brand_name' => 'Marca',
'price' => 'Precio de venta (yuan)',
@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => 'Gestión de datos',
'item' => [
'answer_index' => 'Preguntas y respuestas mensajes',
'answer_reply' => 'Preguntas y respuestas respuesta al mensaje',
'answer_delete' => 'Eliminar mensajes de preguntas y respuestas',
'answer_statusupdate' => 'Actualización del Estado de los mensajes de preguntas y respuestas',
'answer_saveinfo' => 'Preguntas y respuestas añadir / editar Página',
'answer_save' => 'Preguntas y respuestas añadir / editar',
'answer_detail' => 'Detalles del mensaje de preguntas y respuestas',
'message_index' => 'Gestión de mensajes',
'message_delete' => 'Eliminación de mensajes',
'message_detail' => 'Detalles del mensaje',

View File

@ -364,28 +364,6 @@ return [
],
],
// 问答
'answer' => [
'base_nav_title' => '问答',
'user_info_title' => '用户信息',
// 动态表格
'form_table' => [
'user' => '用户信息',
'user_placeholder' => '请输入用户名/昵称/手机/邮箱',
'name' => '联系人',
'tel' => '联系电话',
'title' => '标题',
'content' => '内容',
'reply' => '回复内容',
'is_show' => '是否显示',
'is_reply' => '是否回复',
'reply_time_time' => '回复时间',
'access_count' => '访问次数',
'add_time_time' => '创建时间',
'upd_time_time' => '更新时间',
],
],
// 仓库管理
'warehouse' => [
'base_nav_title' => '仓库',
@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => '商品ID',
'info' => '商品信息',
'info_placeholder' => '请输入商品名称/简述/编码/条码/SEO信息',
'category_text' => '商品分类',
'brand_name' => '品牌',
'price' => '销售价格(元)',
@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => '数据管理',
'item' => [
'answer_index' => '问答留言',
'answer_reply' => '问答留言回复',
'answer_delete' => '问答留言删除',
'answer_statusupdate' => '问答留言状态更新',
'answer_saveinfo' => '问答添加/编辑页面',
'answer_save' => '问答添加/编辑',
'answer_detail' => '问答留言详情',
'message_index' => '消息管理',
'message_delete' => '消息删除',
'message_detail' => '消息详情',

View File

@ -1,2 +0,0 @@
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}

View File

@ -1,54 +0,0 @@
<!-- 继承公共的 form -->
{{extend name="public/module/form" /}}
<!-- 表单顶部操作栏 -->
{{block name="form_operate_top"}}
<a href="{{:MyUrl('admin/answer/saveinfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> {{:MyLang('add_title')}}</a>
<!-- 父级内容 -->
{__block__}
{{/block}}
<!-- 扩展 -->
{{block name="form_extend"}}
<!-- 处理窗口 -->
<div class="am-popup am-radius" id="my-popup-reply">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">{{:MyLang('reply_title')}}</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<dl class="dl-content">
<dt>{{:MyLang('answer.user_info_title')}}</dt>
<dd class="user-info">
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
<div class="user-base">
<p class="username">{{:MyLang('user_username_title')}}<span>...</span></p>
<p class="nickname">{{:MyLang('user_nickname_title')}}<span>...</span></p>
<p class="mobile">{{:MyLang('user_mobile_title')}}<span>...</span></p>
<p class="email">{{:MyLang('user_email_title')}}<span>...</span></p>
</div>
</dd>
</dl>
<form class="am-form form-validation-reply am-form-popup-fixed" action="{{:MyUrl('admin/answer/reply')}}" method="POST" request-type="ajax-reload" enctype="multipart/form-data">
<div class="am-form-group am-form-group-refreshing">
<label>{{:MyLang('common_service.answer.form_item_reply')}}</label>
<textarea name="reply" rows="5" class="am-radius" placeholder="{{:MyLang('common_service.answer.form_item_save_reply_message')}}" data-validation-message="{{:MyLang('common_service.answer.form_item_save_reply_message')}}" maxlength="1000" required></textarea>
</div>
<div class="am-form-popup-submit">
<input type="hidden" name="id" value="" />
<button type="button" class="am-btn am-btn-warning am-radius am-btn-xs btn-loading-example am-margin-right-lg" data-am-modal-close>
<i class="am-icon-paint-brush"></i>
<span>{{:MyLang('cancel_title')}}</span>
</button>
<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:'{{:MyLang('confirm_title')}}'}">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</form>
</div>
</div>
</div>
{{/block}}

View File

@ -1,4 +0,0 @@
<!-- 内容 -->
{{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}}

View File

@ -1,19 +0,0 @@
<!-- 操作栏 -->
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/answer/detail', ['id'=>$module_data['id']])}}">
<i class="am-icon-eye"></i>
<span>{{:MyLang('detail_title')}}</span>
</button>
<a href="{{:MyUrl('admin/answer/saveinfo', array_merge($params, ['id'=>$module_data['id']]))}}" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block">
<i class="am-icon-edit"></i>
<span>{{:MyLang('edit_title')}}</span>
</a>
{{if $module_data['is_reply'] eq 0}}
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:str_replace("'", '', json_encode($module_data))}}'>
<i class="am-icon-gavel"></i>
<span>{{:MyLang('reply_title')}}</span>
</button>
{{/if}}
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/answer/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
<i class="am-icon-trash-o"></i>
<span>{{:MyLang('delete_title')}}</span>
</button>

View File

@ -1,4 +0,0 @@
<!-- 回复内容 -->
{{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}}

View File

@ -1,107 +0,0 @@
{{include file="public/header" /}}
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation am-form-full-screen am-form-popup-fixed" action="{{:MyUrl('admin/answer/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/answer/index', $params)}}" enctype="multipart/form-data">
<legend>
<span class="am-text-default">{{:MyLang('answer.base_nav_title')}}{{if empty($data['id'])}}{{:MyLang('created_title')}}{{else /}}{{:MyLang('edit_title')}}{{/if}}</span>
<a href="{{:MyUrl('admin/answer/index', $params)}}" class="am-fr am-text-sm am-margin-top-sm am-icon-mail-reply"> {{:MyLang('retreat_title')}}</a>
</legend>
<div class="am-alert am-alert-secondary user-info" data-am-alert>
<p class="am-text-lg">{{:MyLang('answer.user_info_title')}}</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 am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
<ul class="user-base">
<li>{{:MyLang('user_username_title')}}{{if empty($data['user']['username'])}}<span class="am-text-grey">{{:MyLang('no_filled_tips')}}</span>{{else /}}{{$data.user.username}}{{/if}}</li>
<li>{{:MyLang('user_nickname_title')}}{{if empty($data['user']['nickname'])}}<span class="am-text-grey">{{:MyLang('no_filled_tips')}}</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
<li>{{:MyLang('user_mobile_title')}}{{if empty($data['user']['mobile'])}}<span class="am-text-grey">{{:MyLang('no_filled_tips')}}</span>{{else /}}{{$data.user.mobile}}{{/if}}</li>
<li>{{:MyLang('user_email_title')}}{{if empty($data['user']['email'])}}<span class="am-text-grey">{{:MyLang('no_filled_tips')}}</span>{{else /}}{{$data.user.email}}{{/if}}</li>
</ul>
{{else /}}
{{:MyLang('user_info_abnormal_tips')}}
{{/if}}
</div>
<div class="am-cf">
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_name')}}</label>
<input type="text" name="name" placeholder="{{:MyLang('common_service.answer.form_item_name_message')}}" maxlength="30" data-validation-message="{{:MyLang('common_service.answer.form_item_name_message')}}" class="am-radius" value="{{if !empty($data['name'])}}{{$data.name}}{{/if}}" />
</div>
</div>
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_tel')}}</label>
<input type="text" name="tel" placeholder="{{:MyLang('common_service.answer.form_item_tel_message')}}" data-validation-message="{{:MyLang('common_service.answer.form_item_tel_message')}}" class="am-radius" value="{{if !empty($data['tel'])}}{{$data.tel}}{{/if}}" />
</div>
</div>
</div>
<div class="am-cf">
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_title')}}</label>
<input type="text" name="title" placeholder="{{:MyLang('common_service.answer.form_item_title_message')}}" maxlength="60" data-validation-message="{{:MyLang('common_service.answer.form_item_title_message')}}" class="am-radius" value="{{if !empty($data['title'])}}{{$data.title}}{{/if}}" />
</div>
</div>
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_access_count')}}</label>
<input type="number" name="access_count" min="0" placeholder="{{:MyLang('common_service.answer.form_item_access_count_message')}}" data-validation-message="{{:MyLang('common_service.answer.form_item_access_count_message')}}" class="am-radius" value="{{if !empty($data['access_count'])}}{{$data.access_count}}{{else /}}0{{/if}}" />
</div>
</div>
</div>
<div class="am-cf">
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_content')}}<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="{{:MyLang('common_service.answer.form_item_content_message')}}" data-validation-message="{{:MyLang('common_service.answer.form_item_content_message')}}" required>{{if !empty($data['content'])}}{{$data.content|raw}}{{/if}}</textarea>
</div>
</div>
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label>{{:MyLang('common_service.answer.form_item_reply')}}</label>
<textarea class="am-radius am-validate" name="reply" rows="5" maxlength="1000" placeholder="{{:MyLang('common_service.answer.form_item_reply_message')}}" data-validation-message="{{:MyLang('common_service.answer.form_item_reply_message')}}">{{if !empty($data['reply'])}}{{$data.reply|raw}}{{/if}}</textarea>
</div>
</div>
</div>
<div class="am-cf">
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label class="am-block">{{:MyLang('common_service.answer.form_is_reply')}}</label>
<input name="is_reply" value="1" type="checkbox" data-off-text="{{:MyLang('no_title')}}" data-on-text="{{:MyLang('yes_title')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_reply']) and $data['is_reply'] eq 1}}checked="true"{{/if}} />
</div>
</div>
<div class="am-u-sm-6 am-padding-horizontal-0">
<div class="am-form-group">
<label class="am-block">{{:MyLang('form_is_show_title')}}</label>
<input name="is_show" value="1" type="checkbox" data-off-text="{{:MyLang('no_title')}}" data-on-text="{{:MyLang('yes_title')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_show']) and $data['is_show'] eq 1}}checked="true"{{/if}} />
</div>
</div>
</div>
<div class="am-form-popup-submit">
<input type="hidden" name="id" {{if !empty($data['id'])}} value="{{$data.id}}"{{/if}} />
<input type="hidden" name="user_id" {{if !empty($data['user_id'])}} value="{{$data.user_id}}"{{/if}} />
<a href="{{:MyUrl('admin/answer/index', $params)}}" class="am-btn am-btn-warning am-radius am-btn-xs am-margin-right-lg">
<i class="am-icon-mail-reply"></i>
<span>{{:MyLang('retreat_title')}}</span>
</a>
<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:'{{:MyLang('save_title')}}'}">
<i class="am-icon-save"></i>
<span>{{:MyLang('save_title')}}</span>
</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->

View File

@ -85,15 +85,6 @@
</select>
</div>
<div class="am-form-group">
<label class="am-block">{{$data.common_app_is_enable_answer.name}}<span class="am-form-group-label-tips">{{$data.common_app_is_enable_answer.describe}}</span></label>
<select name="{{$data.common_app_is_enable_answer.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_app_is_enable_answer.error_tips}}" required>
{{foreach :MyConst('common_is_text_list') as $v}}
<option value="{{$v.id}}" {{if isset($data['common_app_is_enable_answer']['value']) and $data['common_app_is_enable_answer']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label class="am-block">{{$data.common_app_is_online_service.name}}<span class="am-form-group-label-tips">{{$data.common_app_is_online_service.describe}}</span></label>
<select name="{{$data.common_app_is_online_service.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_app_is_online_service.error_tips}}" required>

View File

@ -11,7 +11,7 @@
<i class="am-icon-copy"></i>
<span>{{:MyLang('copy_title')}}</span>
</a>
<div class="am-dropdown am-dropdown-up am-btn am-btn-danger am-btn-xs am-radius am-btn-block" data-am-dropdown="{trigger: 'hover'}">
<div class="am-dropdown am-dropdown-up am-btn am-btn-danger am-btn-xs am-radius am-btn-block" data-am-dropdown>
<div class="am-dropdown-toggle">
<i class="am-icon-trash-o"></i>
<span>{{:MyLang('delete_title')}}</span>

View File

@ -69,8 +69,7 @@
{{/if}}
{{/foreach}}
</ul>
{{/if}}
{{if empty($express_list)}}
{{else /}}
{{include file="public/not_data" /}}
{{/if}}
</div>
@ -122,8 +121,7 @@
</li>
{{/foreach}}
</ul>
{{/if}}
{{if empty($buy_payment_list)}}
{{else /}}
{{include file="public/not_data" /}}
{{/if}}
</div>

View File

@ -52,6 +52,13 @@
<!-- 公共上传组件初始化 -->
<textarea id="upload-editor-view" data-url="{{if isset($is_load_upload_editor) and $is_load_upload_editor eq 1}}{{:MyUrl('admin/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if}}" style="display: none;"></textarea>
<!-- 公共单个上传组件表单初始化 -->
<form class="am-form form-validation-common-upload-editor-single" method="post" action="{{:MyUrl('admin/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}" request-type="ajax-fun" request-value="CommonFormUploadEditorSingleBack" style="display: none;">
<input type="file" name="upfile" accept="" />
<input type="hidden" name="action" value="uploadimage" />
<button type="reset"></button>
<button type="submit"></button>
</form>
<!-- 公共视频扫码组件初始化 -->
<div class="am-popup am-radius popup-iframe popup-not-title" id="common-video-scan-popup">
@ -209,6 +216,12 @@
$('.am-popup').modal('close');
$('.am-modal').modal('close');
}
// 公共单个文件上传表单回调
function CommonFormUploadEditorSingleBack(e)
{
CommonFormUploadEditorSingleBackHandle(e);
}
</script>
<!-- 项目公共 -->

View File

@ -21,24 +21,33 @@
<!-- 是否开启数据打印操作 -->
{{if isset($form_table['base']['is_data_print']) and $form_table['base']['is_data_print'] eq 1}}
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-print form-table-operate-top-data-print-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_print_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_print_name')}}</button>
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs form-table-operate-top-data-print-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_print_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-print"></i>
<span>{{:MyLang('form_table_nav_operate_data_print_name')}}</span>
</button>
{{/if}}
<!-- 是否开启数据导出pdf操作 -->
{{if isset($form_table['base']['is_data_export_pdf']) and $form_table['base']['is_data_export_pdf'] eq 1}}
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-file-pdf-o form-table-operate-top-data-print-submit" data-is-pdf="1" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_pdf_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_export_pdf_name')}}</button>
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs form-table-operate-top-data-print-submit" data-is-pdf="1" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_pdf_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-file-pdf-o"></i>
<span>{{:MyLang('form_table_nav_operate_data_export_pdf_name')}}</span>
</button>
{{/if}}
<!-- 是否开启数据导出excel操作 -->
{{if isset($form_table['base']['is_data_export_excel']) and $form_table['base']['is_data_export_excel'] eq 1}}
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-file-excel-o form-table-operate-top-export-excel-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_excel_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_export_excel_name')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs form-table-operate-top-export-excel-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_excel_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-file-excel-o"></i>
<span>{{:MyLang('form_table_nav_operate_data_export_excel_name')}}</span>
</button>
{{/if}}
<!-- 是否开启删除操作 -->
{{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"
class="am-btn am-btn-danger am-radius am-btn-xs 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}}"
@ -46,7 +55,10 @@
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}}"
data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_delete_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"
> {{:MyLang('delete_title')}}</button>
>
<i class="am-icon-trash-o"></i>
<span>{{:MyLang('delete_title')}}</span>
</button>
{{/if}}
<!-- 右侧操作 -->

View File

@ -18,10 +18,6 @@
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_route_separator.name}}<span class="am-form-group-label-tips">{{$data.common_route_separator.describe}}</span></label>
<input type="text" name="{{$data.common_route_separator.only_tag}}" placeholder="{{$data.common_route_separator.name}}" data-validation-message="{{$data.common_route_separator.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_route_separator.value}}"{{/if}} readonly />
</div>
<div class="am-form-group">
<label>{{$data.home_seo_url_html_suffix.name}}<span class="am-form-group-label-tips">{{$data.home_seo_url_html_suffix.describe}}</span></label>
<input type="text" name="{{$data.home_seo_url_html_suffix.only_tag}}" pattern="{{:MyConst('common_regex_url_html_suffix')}}" maxlength="8" placeholder="{{$data.home_seo_url_html_suffix.name}}" data-validation-message="{{$data.home_seo_url_html_suffix.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_seo_url_html_suffix.value}}"{{/if}} />

View File

@ -13,27 +13,21 @@
<label>{{$data.home_max_limit_image.name}}<span class="am-form-group-label-tips">{{$data.home_max_limit_image.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_max_limit_image.only_tag}}" placeholder="{{$data.home_max_limit_image.name}}" data-validation-message="{{$data.home_max_limit_image.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_max_limit_image.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">B</button>
</span>
<span class="am-input-group-label am-radius">B</span>
</div>
</div>
<div class="am-form-group">
<label>{{$data.home_max_limit_file.name}}<span class="am-form-group-label-tips">{{$data.home_max_limit_file.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_max_limit_file.only_tag}}" placeholder="{{$data.home_max_limit_file.name}}" data-validation-message="{{$data.home_max_limit_file.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_max_limit_file.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">B</button>
</span>
<span class="am-input-group-label am-radius">B</span>
</div>
</div>
<div class="am-form-group">
<label>{{$data.home_max_limit_video.name}}<span class="am-form-group-label-tips">{{$data.home_max_limit_video.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_max_limit_video.only_tag}}" placeholder="{{$data.home_max_limit_video.name}}" data-validation-message="{{$data.home_max_limit_video.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_max_limit_video.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">B</button>
</span>
<span class="am-input-group-label am-radius">B</span>
</div>
</div>

View File

@ -21,11 +21,12 @@
</div>
<div class="am-form-group">
<label class="am-block">{{$data.home_site_logo.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo-images-view" data-form-name="home_site_logo" data-max-number="1" data-delete="0" data-dialog-type="images">
<ul class="plug-file-upload-view home_site_logo-images-view" data-form-name="home_site_logo" data-max-number="1" data-dialog-type="images">
{{if !empty($data['home_site_logo']['value'])}}
<li>
<input type="text" name="home_site_logo" value="{{$data.home_site_logo.value}}" />
<img src="{{:AttachmentPathViewHandle($data.home_site_logo.value)}}" />
<i>x</i>
</li>
{{/if}}
</ul>
@ -34,24 +35,40 @@
<div class="am-form-group">
<label class="am-block">{{$data.home_site_logo_wap.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_wap.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo_wap-images-view" data-form-name="home_site_logo_wap" data-max-number="1" data-delete="0" data-dialog-type="images">
<ul class="plug-file-upload-view home_site_logo_wap-images-view" data-form-name="home_site_logo_wap" data-max-number="1" data-dialog-type="images">
{{if !empty($data['home_site_logo_wap']['value'])}}
<li>
<input type="text" name="home_site_logo_wap" value="{{$data.home_site_logo_wap.value}}" />
<img src="{{:AttachmentPathViewHandle($data.home_site_logo_wap.value)}}" />
<i>x</i>
</li>
{{/if}}
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.home_site_logo_wap-images-view">+ {{:MyLang('site.choice_upload_logo_title')}}</div>
</div>
<div class="am-form-group">
<label class="am-block">{{$data.home_site_logo_app.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_app.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo_app-images-view" data-form-name="home_site_logo_app" data-max-number="1" data-dialog-type="images">
{{if !empty($data['home_site_logo_app']['value'])}}
<li>
<input type="text" name="home_site_logo_app" value="{{$data.home_site_logo_app.value}}" />
<img src="{{:AttachmentPathViewHandle($data.home_site_logo_app.value)}}" />
<i>x</i>
</li>
{{/if}}
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.home_site_logo_app-images-view">+ {{:MyLang('site.choice_upload_logo_title')}}</div>
</div>
<div class="am-form-group">
<label class="am-block">{{$data.home_site_logo_square.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_square.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo_square-images-view" data-form-name="home_site_logo_square" data-max-number="1" data-delete="0" data-dialog-type="images">
<ul class="plug-file-upload-view home_site_logo_square-images-view" data-form-name="home_site_logo_square" data-max-number="1" data-dialog-type="images">
{{if !empty($data['home_site_logo_square']['value'])}}
<li>
<input type="text" name="home_site_logo_square" value="{{$data.home_site_logo_square.value}}" />
<img src="{{:AttachmentPathViewHandle($data.home_site_logo_square.value)}}" />
<i>x</i>
</li>
{{/if}}
</ul>

View File

@ -88,9 +88,7 @@
<label>{{$data.common_cache_data_redis_expire.name}}<span class="am-form-group-label-tips">{{$data.common_cache_data_redis_expire.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_cache_data_redis_expire.only_tag}}" placeholder="{{$data.common_cache_data_redis_expire.name}}" data-validation-message="{{$data.common_cache_data_redis_expire.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_cache_data_redis_expire.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('second_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('second_title')}}</span>
</div>
</div>
</div>

View File

@ -9,23 +9,6 @@
<div class="content">
<!-- form start -->
<form class="am-form form-validation am-form-popup-fixed" action="{{:MyUrl('admin/site/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/site/index', ['nav_type'=>'extends'])}}" enctype="multipart/form-data">
<!-- 基础配置 -->
<div class="am-panel am-panel-default am-radius">
<div class="am-panel-hd">
<h3 class="am-panel-title">{{:MyLang('base_config_title')}}</h3>
</div>
<div class="am-panel-bd am-padding-vertical-xs">
<div class="am-form-group">
<label>{{$data.common_is_login_answer.name}}<span class="am-form-group-label-tips">{{$data.common_is_login_answer.describe}}</span></label>
<select name="{{$data.common_is_login_answer.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_login_answer.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_is_login_answer']['value']) and $data['common_is_login_answer']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
</div>
</div>
<!-- 定时脚本配置 -->
<div class="am-panel am-panel-default am-radius">
<div class="am-panel-hd">
@ -40,9 +23,7 @@
<label>{{$data.common_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_close_limit_time.only_tag}}" placeholder="{{$data.common_order_close_limit_time.name}}" data-validation-message="{{$data.common_order_close_limit_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('minute_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('minute_title')}}</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/orderclose')}}" target="_blank">{{:MyUrl('api/crontab/orderclose')}}</a>
@ -53,9 +34,7 @@
<label>{{$data.common_order_success_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_success_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_success_limit_time.only_tag}}" placeholder="{{$data.common_order_success_limit_time.name}}" data-validation-message="{{$data.common_order_success_limit_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_order_success_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('minute_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('minute_title')}}</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/ordersuccess')}}" target="_blank">{{:MyUrl('api/crontab/ordersuccess')}}</a>
@ -66,9 +45,7 @@
<label>{{$data.common_pay_log_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_pay_log_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_pay_log_order_close_limit_time.only_tag}}" placeholder="{{$data.common_pay_log_order_close_limit_time.name}}" data-validation-message="{{$data.common_pay_log_order_close_limit_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_pay_log_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('minute_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('minute_title')}}</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/paylogorderclose')}}" target="_blank">{{:MyUrl('api/crontab/paylogorderclose')}}</a>
@ -79,9 +56,7 @@
<label>{{$data.common_goods_give_integral_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_goods_give_integral_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_goods_give_integral_limit_time.only_tag}}" placeholder="{{$data.common_goods_give_integral_limit_time.name}}" data-validation-message="{{$data.common_goods_give_integral_limit_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_goods_give_integral_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('minute_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('minute_title')}}</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/goodsgiveintegral')}}" target="_blank">{{:MyUrl('api/crontab/goodsgiveintegral')}}</a>

View File

@ -45,9 +45,7 @@
<label>{{$data.home_order_aftersale_return_launch_day.name}}<span class="am-form-group-label-tips">{{$data.home_order_aftersale_return_launch_day.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_order_aftersale_return_launch_day.only_tag}}" placeholder="{{$data.home_order_aftersale_return_launch_day.name}}" data-validation-message="{{$data.home_order_aftersale_return_launch_day.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_order_aftersale_return_launch_day.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('day_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('day_title')}}</span>
</div>
</div>

View File

@ -35,9 +35,7 @@
<label>{{$data.common_show_goods_category_level.name}}<span class="am-form-group-label-tips">{{$data.common_show_goods_category_level.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" max="3" name="{{$data.common_show_goods_category_level.only_tag}}" placeholder="{{$data.common_show_goods_category_level.name}}" data-validation-message="{{$data.common_show_goods_category_level.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_show_goods_category_level.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('level_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('level_title')}}</span>
</div>
{{if is_array(MyLang('site.goods_tips_list'))}}
<div class="am-alert am-alert-warning" data-am-alert>

View File

@ -110,12 +110,7 @@
<div class="am-panel-bd am-padding-vertical-xs">
<div class="am-form-group">
<label class="am-block">{{$data.home_index_floor_goods_max_count.name}}<span class="am-form-group-label-tips">{{$data.home_index_floor_goods_max_count.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_index_floor_goods_max_count.only_tag}}" placeholder="{{$data.home_index_floor_goods_max_count.name}}" data-validation-message="{{$data.home_index_floor_goods_max_count.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_index_floor_goods_max_count.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button"></button>
</span>
</div>
<input type="number" min="0" name="{{$data.home_index_floor_goods_max_count.only_tag}}" placeholder="{{$data.home_index_floor_goods_max_count.name}}" data-validation-message="{{$data.home_index_floor_goods_max_count.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_index_floor_goods_max_count.value}}"{{/if}} />
{{if is_array(MyLang('site.goods_auto_mode_max_count_tips_list'))}}
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>

View File

@ -38,9 +38,7 @@
<label>{{$data.home_search_limit_number.name}}<span class="am-form-group-label-tips">{{$data.home_search_limit_number.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.home_search_limit_number.only_tag}}" placeholder="{{$data.home_search_limit_number.name}}" data-validation-message="{{$data.home_search_limit_number.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.home_search_limit_number.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('strip_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('strip_title')}}</span>
</div>
</div>
<div class="am-form-group">

View File

@ -14,22 +14,31 @@
<div class="am-panel-hd">
<h3 class="am-panel-title">{{:MyLang('base_config_title')}}</h3>
</div>
<div class="am-panel-bd am-padding-vertical-xs">
<div class="am-panel-bd am-padding-vertical-0">
<!-- 提示 -->
{{if is_array(MyLang('site.sitetype_top_tips_list'))}}
<div class="am-alert am-alert-warning am-radius am-margin-top-xs" data-am-alert>
<div class="am-alert am-alert-warning am-radius am-margin-top am-margin-bottom-0" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>{{:implode('</p><p>', MyLang('site.sitetype_top_tips_list'))}}</p>
</div>
{{/if}}
<!-- 站点类型 -->
<div class="am-form-group">
<div class="am-form-group platform-list-value-container">
<label class="am-block">{{$data.common_site_type.name}}<span class="am-form-group-label-tips">{{$data.common_site_type.describe}}</span></label>
{{foreach $common_site_type_list as $v}}
<label class="am-radio-inline">
<input type="radio" name="{{$data.common_site_type.only_tag}}" value="{{$v.value}}" {{if isset($data['common_site_type']['value']) and $data['common_site_type']['value'] eq $v['value']}}checked{{/if}} data-validation-message="{{$data.common_site_type.error_tips}}" data-am-ucheck /> {{$v.name}}
</label>
{{foreach $common_platform_type as $v}}
<div class="am-input-group am-input-group-sm">
<span class="am-input-group-btn">
<button type="button" class="am-btn am-btn-default am-radius">{{$v.name}}</button>
</span>
<select name="{{$data.common_site_type.only_tag}}[{{$v.value}}]" class="am-radius chosen-select" data-placeholder="{{:MyLang('optional_tips')}}" data-validation-message="{{:MyLang('site.site_setup_choice_payment_message', ['name'=>$v['name']])}}">
{{if !empty($common_site_type_list)}}
{{foreach $common_site_type_list as $site}}
<option value="{{$site.value}}" {{if !empty($data['common_site_type']) and !empty($data['common_site_type']['value']) and isset($data['common_site_type']['value'][$v['value']]) and $data['common_site_type']['value'][$v['value']] eq $site['value']}}selected{{/if}}>{{$site.name}}</option>
{{/foreach}}
{{/if}}
</select>
</div>
{{/foreach}}
</div>
</div>

View File

@ -13,18 +13,14 @@
<label class="am-block">{{$data.common_verify_expire_time.name}}<span class="am-form-group-label-tips">{{$data.common_verify_expire_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_verify_expire_time.only_tag}}" placeholder="{{$data.common_verify_expire_time.name}}" data-validation-message="{{$data.common_verify_expire_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_verify_expire_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('second_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('second_title')}}</span>
</div>
</div>
<div class="am-form-group">
<label class="am-block">{{$data.common_verify_interval_time.name}}<span class="am-form-group-label-tips">{{$data.common_verify_interval_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_verify_interval_time.only_tag}}" placeholder="{{$data.common_verify_interval_time.name}}" data-validation-message="{{$data.common_verify_interval_time.error_tips}}" class="am-radius am-form-field" {{if !empty($data)}}value="{{$data.common_verify_interval_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">{{:MyLang('second_title')}}</button>
</span>
<span class="am-input-group-label am-radius">{{:MyLang('second_title')}}</span>
</div>
</div>
<div class="am-form-group">

View File

@ -49,7 +49,10 @@
{{/if}}
</select>
<input type="text" placeholder="{{:MyLang('goods_name')}}" class="am-radius forth-selection-form-keywords" />
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm am-icon-search search-submit" data-am-loading="{loadingText: ' {{:MyLang('searching_tips')}}'}"> {{:MyLang('search_title')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm search-submit" data-am-loading="{spinner: 'circle-o-notch', loadingText: '{{:MyLang('search_title')}}'}">
<i class="am-icon-search"></i>
<span>{{:MyLang('search_title')}}</span>
</button>
</div>
<!-- 商品列表 -->

View File

@ -1,139 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\api\controller;
use app\service\ApiService;
use app\service\SystemBaseService;
use app\service\AnswerService;
/**
* 用户留言
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Answer extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
}
/**
* 我的留言列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-07-17
* @desc description
*/
public function Index()
{
// 登录校验
$this->IsLogin();
// 参数
$params = $this->data_request;
$params['user'] = $this->user;
// 条件
$where = AnswerService::AnswerListWhere($params);
// 获取总数
$total = AnswerService::AnswerTotal($where);
$page_total = ceil($total/$this->page_size);
$start = intval(($this->page-1)*$this->page_size);
// 获取列表
$data_params = [
'm' => $start,
'n' => $this->page_size,
'where' => $where,
];
$data = AnswerService::AnswerList($data_params);
// 返回数据
$result = [
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
];
return ApiService::ApiDataReturn(SystemBaseService::DataReturn($result));
}
/**
* 用户留言添加
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-07-17
* @desc description
*/
public function Add()
{
// 登录校验
$this->IsLogin();
$params = $this->data_request;
$params['user'] = $this->user;
return ApiService::ApiDataReturn(AnswerService::AnswerSave($params));
}
/**
* 公共留言广场列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-07-17
* @desc description
*/
public function Square()
{
// 参数
$params = $this->data_request;
$params['is_more'] = 1;
$params['is_show'] = 1;
// 条件
$where = AnswerService::AnswerListWhere($params);
// 获取总数
$total = AnswerService::AnswerTotal($where);
$page_total = ceil($total/$this->page_size);
$start = intval(($this->page-1)*$this->page_size);
// 获取列表
$data_params = [
'm' => $start,
'n' => $this->page_size,
'where' => $where,
];
$data = AnswerService::AnswerList($data_params);
// 返回数据
$result = [
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
];
return ApiService::ApiDataReturn(SystemBaseService::DataReturn($result));
}
}
?>

View File

@ -80,10 +80,11 @@ class Order extends Common
// 返回数据
$result = [
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
'payment_list' => $payment_list,
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
'payment_list' => $payment_list,
'default_payment_id' => PaymentService::BuyDefaultPayment($params),
];
return ApiService::ApiDataReturn(SystemBaseService::DataReturn($result));
}

View File

@ -664,7 +664,7 @@ function GetHttpCode($url, $timeout = 5)
*/
function IsUrl($value)
{
return empty($value) ? false : in_array(substr($value, 0, 6), ['http:/', 'https:']);
return (empty($value) || is_array($value)) ? false : in_array(substr($value, 0, 6), ['http:/', 'https:']);
}
/**
@ -941,7 +941,7 @@ function IsWeixinEnv()
}
/**
* 是否微信环境
* 是否钉钉环境
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@ -982,6 +982,34 @@ function IsAlipayEnv()
return (!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') !== false);
}
/**
* 是否百度环境
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-08-26
* @desc description
* @return [boolean] [否false, 是true]
*/
function IsBaiduEnv()
{
return (!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp') !== false);
}
/**
* 是否快手环境
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-08-26
* @desc description
* @return [boolean] [否false, 是true]
*/
function IsKuaishouEnv()
{
return (!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'Kwai') !== false);
}
/**
* 是否新浪微博环境
* @author Devil
@ -996,6 +1024,111 @@ function IsWeiboEnv()
return (!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'Weibo') !== false);
}
/**
* web环境
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2023-10-24
* @desc description
*/
function WebEnv()
{
// 微信
if(IsWeixinEnv())
{
return 'weixin';
}
// 支付宝
if(IsAlipayEnv())
{
return 'alipay';
}
// 百度
if(IsBaiduEnv())
{
return 'baidu';
}
// 快手
if(IsKuaishouEnv())
{
return 'kuaishou';
}
// 钉钉
if(IsDingdingEnv())
{
return 'dingding';
}
// QQ
if(IsQQEnv())
{
return 'qq';
}
// 微博
if(IsWeiboEnv())
{
return 'weibo';
}
return null;
}
/**
* 判断当前是否小程序环境中
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-06-29T22:21:44+0800
*/
function MiniAppEnv()
{
if(!empty($_SERVER['HTTP_USER_AGENT']))
{
// 微信小程序 miniProgram
// QQ小程序 miniProgram
if(stripos($_SERVER['HTTP_USER_AGENT'], 'miniProgram') !== false)
{
// 是否QQ小程序
if(stripos($_SERVER['HTTP_USER_AGENT'], 'QQ') !== false)
{
return 'qq';
}
return 'weixin';
}
// 支付宝客户端 AlipayClient
if(stripos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') !== false)
{
return 'alipay';
}
// 百度小程序 swan-baiduboxapp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'swan-baiduboxapp') !== false)
{
return 'baidu';
}
// 头条小程序 ToutiaoMicroApp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'ToutiaoMicroApp') !== false)
{
return 'toutiao';
}
// 快手小程序 AllowKsCallApp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'AllowKsCallApp') !== false)
{
return 'kuaishou';
}
}
return null;
}
/**
* 笛卡尔积生成规格
* @author Devil
@ -1230,15 +1363,28 @@ function FormModulePath($params = [])
$controller = empty($params['pluginscontrol']) ? 'index' : $params['pluginscontrol'];
$action = empty($params['pluginsaction']) ? 'index' : $params['pluginsaction'];
// 是否定义模块组
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.$group.'\\'.ucfirst($controller);
// 是否定义模块组、是否存在控制住+方法的form文件
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.$group.'\\'.ucfirst($controller.$action);
if(!class_exists($path))
{
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller);
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.$group.'\\'.ucfirst($controller);
if(!class_exists($path))
{
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller.$action);
if(!class_exists($path))
{
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller);
}
}
}
}
} else {
$path = '\app\\'.$group.'\form\\'.ucfirst($controller);
// 是否存在控制住+方法的form文件
$path = '\app\\'.$group.'\form\\'.ucfirst($controller.$action);
if(!class_exists($path))
{
$path = '\app\\'.$group.'\form\\'.ucfirst($controller);
}
}
return [
@ -1247,6 +1393,77 @@ function FormModulePath($params = [])
];
}
/**
* 获取动态表格数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-10-08
* @desc description
* @param [array] $params [输入参数]
*/
function FormModuleData($params = [])
{
$data = [];
if(!empty($params['control']) && !empty($params['id']))
{
// 模块组、默认前端
$group = empty($params['group']) ? 'index' : $params['group'];
// 控制器
$control = strtolower($params['control']);
// 方法、默认详情
$action = empty($params['action']) ? 'detail' : strtolower($params['action']);
// 请求参数
$request_params = [
// 数据id
'id' => $params['id'],
// 详情数据key
'detail_dkey' => empty($params['detail_dkey']) ? 'id' : $params['detail_dkey'],
// 详情额外参数
'detail_where' => empty($params['where']) ? [] : $params['where'],
];
// 是否插件
if(empty($params['plugins']))
{
// 模块地址
$module = '\app\\'.$group.'\form\\'.ucfirst($control);
// 模块参数
$request_params['module_name'] = $group;
$request_params['controller_name'] = $control;
$request_params['action_name'] = $action;
} else {
// 模块地址
$module = '\app\plugins\\'.$params['plugins'].'\form\\'.$group.'\\'.ucfirst($control);
// 模块参数
$request_params['pluginsname'] = $params['plugins'];
$request_params['pluginscontrol'] = $control;
$request_params['pluginsaction'] = $action;
}
// 模块运行方法
$run = empty($params['run']) ? 'Run' : $params['run'];
// 调用模块获取数据
$ret = (new app\module\FormHandleModule())->Run($module, $run, $request_params);
if($ret['code'] == 0 && !empty($ret['data']) && is_array($ret['data']))
{
// 全部数据
if(empty($params['data_type']) || $params['data_type'] == 'all')
{
$data = $ret['data'];
} else {
if(array_key_exists($params['data_type'], $ret['data']))
{
$data = $ret['data'][$params['data_type']];
}
}
}
}
return $data;
}
/**
* 模块视图动态加载方法
* @author Devil
@ -1473,56 +1690,6 @@ function CallPluginsServiceMethod($plugins, $service, $method, $params = null)
return DataReturn(MyLang('common_function.plugins_class_no_exist_tips').'['.$plugins.'-'.$service.']', -1);
}
/**
* 判断当前是否小程序环境中
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-06-29T22:21:44+0800
*/
function MiniAppEnv()
{
if(!empty($_SERVER['HTTP_USER_AGENT']))
{
// 微信小程序 miniProgram
// QQ小程序 miniProgram
if(stripos($_SERVER['HTTP_USER_AGENT'], 'miniProgram') !== false)
{
// 是否QQ小程序
if(stripos($_SERVER['HTTP_USER_AGENT'], 'QQ') !== false)
{
return 'qq';
}
return 'weixin';
}
// 支付宝客户端 AlipayClient
if(stripos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') !== false)
{
return 'alipay';
}
// 百度小程序 swan-baiduboxapp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'swan-baiduboxapp') !== false)
{
return 'baidu';
}
// 头条小程序 ToutiaoMicroApp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'ToutiaoMicroApp') !== false)
{
return 'toutiao';
}
// 快手小程序 AllowKsCallApp
if(stripos($_SERVER['HTTP_USER_AGENT'], 'AllowKsCallApp') !== false)
{
return 'kuaishou';
}
}
return null;
}
/**
* RGB 十六进制
* @author Devil
@ -1953,6 +2120,12 @@ function CurrentScriptName()
*/
function MyUrl($path, $params = [])
{
// 空或数组则返回空字符串
if(empty($path) || is_array($path))
{
return '';
}
// 当前脚本名称
$script_name = CurrentScriptName();

View File

@ -1,90 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\controller;
use app\index\controller\Center;
use app\service\SeoService;
use app\service\ApiService;
use app\service\AnswerService;
/**
* 问答/留言管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Answer extends Center
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
}
/**
* 问答/留言列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-28
* @desc description
*/
public function Index()
{
// 浏览器名称
MyViewAssign('home_seo_site_title', SeoService::BrowserSeoTitle(MyLang('answer.browser_seo_title'), 1));
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
$assign = [
'data' => $this->data_detail,
'is_header' => 0,
'is_footer' => 0,
];
MyViewAssign($assign);
return MyView();
}
/**
* 问答/提问保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Save()
{
$params = $this->data_request;
$params['user'] = $this->user;
return ApiService::ApiDataReturn(AnswerService::AnswerSave($params));
}
}
?>

View File

@ -241,7 +241,7 @@ class Common extends BaseController
$assign['common_customer_store_email'] = MyC('common_customer_store_email');
$assign['common_customer_store_address'] = MyC('common_customer_store_address');
$assign['common_customer_store_qrcode'] = AttachmentPathViewHandle(MyC('common_customer_store_qrcode'));
// 主题
$default_theme = strtolower(MyC('common_default_theme', 'default', true));
$assign['default_theme'] = $default_theme;
@ -717,6 +717,10 @@ class Common extends BaseController
'plugins_view_header_navigation_top_right_begin',
// 公共顶部小导航钩子-右侧后面
'plugins_view_header_navigation_top_right_end',
// 用户登录容器内顶部钩子
'plugins_view_user_login_content_inside_top',
// 用户登录容器内底部钩子
'plugins_view_user_login_content_inside_bottom',
// 用户登录页面顶部钩子
'plugins_view_user_login_info_top',
// 用户登录内底部钩子

View File

@ -277,33 +277,33 @@ class Goods extends Common
return ApiService::ApiDataReturn(DataReturn(MyLang('params_error_tips'), -1));
}
// 分页
$number = 10;
$page = max(1, isset($params['page']) ? intval($params['page']) : 1);
// 条件
$where = [
'goods_id' => $params['goods_id'],
'is_show' => 1,
'goods_id' => $params['goods_id'],
'is_show' => 1,
];
// 获取总数
$total = GoodsCommentsService::GoodsCommentsTotal($where);
$page_total = ceil($total/$number);
$start = intval(($page-1)*$number);
$page_total = ceil($total/$this->page_size);
$start = intval(($this->page-1)*$this->page_size);
// 获取列表
$data_params = array(
'm' => $start,
'n' => $number,
'where' => $where,
'is_public' => 1,
);
$data = GoodsCommentsService::GoodsCommentsList($data_params);
$data = [];
if($total > 0)
{
$data_params = [
'm' => $start,
'n' => $this->page_size,
'where' => $where,
'is_public' => 1,
];
$data = GoodsCommentsService::GoodsCommentsList($data_params);
}
// 返回数据
$result = [
'number' => $number,
'number' => $this->page_size,
'total' => $total,
'page_total' => $page_total,
'data' => MyView('', ['data'=>$data['data']]),
@ -369,6 +369,18 @@ class Goods extends Common
// 商品页面tabs顶部钩子
'plugins_view_goods_detail_tabs_content',
// 商品页面tabs内评价顶部钩子
'plugins_view_goods_detail_tabs_comments_top',
// 商品页面tabs内评价底部钩子
'plugins_view_goods_detail_tabs_comments_bottom',
// 商品页面tabs内猜你喜欢顶部钩子
'plugins_view_goods_detail_tabs_guess_like_top',
// 商品页面tabs内猜你喜欢底部钩子
'plugins_view_goods_detail_tabs_guess_like_bottom',
// 商品页面tabs内容钩子
'plugins_view_goods_detail_tabs_bottom',
@ -384,9 +396,15 @@ class Goods extends Common
// 商品页面基础信息标题里面钩子
'plugins_view_goods_detail_title',
// 商品页面基础信息面板原价顶部钩子
'plugins_view_goods_detail_panel_original_price_top',
// 商品页面基础信息面板售价顶部钩子
'plugins_view_goods_detail_panel_price_top',
// 商品页面基础信息面板售价底部钩子
'plugins_view_goods_detail_panel_price_bottom',
// 商品页面基础信息购买小导航内部前面钩子
'plugins_view_goods_detail_base_buy_nav_min_inside_begin',

View File

@ -45,46 +45,6 @@ class User extends Center
parent::__construct();
}
/**
* 获取上一个页面地址
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-04
* @desc description
*/
private function GetrefererUrl()
{
// 上一个页面, 空则用户中心
$referer_url = empty($_SERVER['HTTP_REFERER']) ? MyUrl('index/user/index') : htmlentities($_SERVER['HTTP_REFERER']);
if(!empty($_SERVER['HTTP_REFERER']))
{
// 是否是指定页面,则赋值用户中心
$all = ['login', 'regster', 'forget', 'logininfo', 'reginfo', 'smsreginfo', 'emailreginfo', 'forgetpwdinfo'];
$status = false;
foreach($all as $v)
{
if(strpos($_SERVER['HTTP_REFERER'], $v) !== false)
{
$referer_url = MyUrl('index/user/index');
$status = true;
break;
}
}
// 未匹配到指定页面
if(!$status)
{
// 非商城域名,则赋值用户中心
if(GetUrlHost($referer_url) != GetUrlHost(__MY_URL__))
{
$referer_url = MyUrl('index/user/index');
}
}
}
return $referer_url;
}
/**
* 用户中心
* @author Devil
@ -255,7 +215,7 @@ class User extends Center
// 模板数据
$assign = [
// 返回地址
'referer_url' => $this->GetrefererUrl(),
'referer_url' => UserService::UserLoginOrRegBackRefererUrl(),
// 注册背景图片
'user_register_bg_images' => MyC('home_site_user_register_bg_images'),
// 注册背景色
@ -293,7 +253,7 @@ class User extends Center
// 模板数据
$assign = [
// 返回地址
'referer_url' => $this->GetrefererUrl(),
'referer_url' => UserService::UserLoginOrRegBackRefererUrl(),
// 注册背景图片
'user_login_left_data' => empty($left_data['data']) ? [] : $left_data['data'][array_rand($left_data['data'], 1)],
// 浏览器名称
@ -333,7 +293,7 @@ class User extends Center
$assign['home_seo_site_title'] = SeoService::BrowserSeoTitle(MyLang('user.user_login_browser_seo_title'), 1);
// 返回地址
$assign['referer_url'] = $this->GetrefererUrl();
$assign['referer_url'] = UserService::UserLoginOrRegBackRefererUrl();
MyViewAssign($assign);
return MyView();
}

View File

@ -1,154 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\form;
use think\facade\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 = [])
{
$lang = MyLang('answer.form_table');
return [
// 基础配置
'base' => [
'key_field' => 'id',
'is_search' => 1,
],
// 表单配置
'form' => [
[
'label' => $lang['name'],
'view_type' => 'field',
'view_key' => 'name',
'is_sort' => 1,
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => $lang['tel'],
'view_type' => 'field',
'view_key' => 'tel',
'is_sort' => 1,
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => $lang['title'],
'view_type' => 'field',
'view_key' => 'title',
'is_sort' => 1,
'search_config' => [
'form_type' => 'input',
'where_type' => 'like',
],
],
[
'label' => $lang['content'],
'view_type' => 'module',
'view_key' => 'answer/module/content',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'content',
'where_type' => 'like',
],
],
[
'label' => $lang['reply'],
'view_type' => 'module',
'view_key' => 'answer/module/reply',
'grid_size' => 'lg',
'search_config' => [
'form_type' => 'input',
'form_name' => 'reply',
'where_type' => 'like',
],
],
[
'label' => $lang['reply_time_time'],
'view_type' => 'field',
'view_key' => 'reply_time_time',
'is_sort' => 1,
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'reply_time',
],
],
[
'label' => $lang['add_time_time'],
'view_type' => 'field',
'view_key' => 'add_time_time',
'is_sort' => 1,
'search_config' => [
'form_type' => 'datetime',
'form_name' => 'add_time',
],
],
[
'label' => MyLang('operate_title'),
'view_type' => 'operate',
'view_key' => 'answer/module/operate',
'align' => 'center',
'fixed' => 'right',
],
],
// 数据配置
'data' => [
'table_name' => 'Answer',
'data_handle' => 'AnswerService::AnswerListHandle',
'is_page' => 1,
],
];
}
}
?>

View File

@ -299,6 +299,7 @@ return [
'browser_seo_title' => '訂單售後',
'detail_browser_seo_title' => '訂單售後詳情',
'view_orderaftersale_enter_name' => '查看售後訂單',
'orderaftersale_apply_name' => '申請售後',
'operate_delivery_name' => '立即退貨',
'goods_list_thead_base' => '商品資訊',
'goods_list_thead_price' => '單價',

View File

@ -299,6 +299,7 @@ return [
'browser_seo_title' => 'Order AfterSales',
'detail_browser_seo_title' => 'Order AfterSales Detail',
'view_orderaftersale_enter_name' => 'View after-sales orders',
'orderaftersale_apply_name' => 'Apply for after-sales service',
'operate_delivery_name' => 'Return immediately',
'goods_list_thead_base' => 'Goods Info',
'goods_list_thead_price' => 'Price',

View File

@ -299,6 +299,7 @@ return [
'browser_seo_title' => 'Posventa de pedidos',
'detail_browser_seo_title' => 'Detalles de la posventa del pedido',
'view_orderaftersale_enter_name' => 'Ver pedidos post - venta',
'orderaftersale_apply_name' => 'Solicitar posventa',
'operate_delivery_name' => 'Devolución inmediata',
'goods_list_thead_base' => 'Información sobre productos básicos',
'goods_list_thead_price' => 'Precio unitario',

View File

@ -299,6 +299,7 @@ return [
'browser_seo_title' => '订单售后',
'detail_browser_seo_title' => '订单售后详情',
'view_orderaftersale_enter_name' => '查看售后订单',
'orderaftersale_apply_name' => '申请售后',
'operate_delivery_name' => '立即退货',
'goods_list_thead_base' => '商品信息',
'goods_list_thead_after_base_title' => '售后商品',

View File

@ -1,2 +0,0 @@
<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}

View File

@ -1,49 +0,0 @@
<!-- 继承公共的 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'}"> {{:MyLang('add_title')}}</a>
<!-- 父级内容 -->
{__block__}
{{/block}}
<!-- 扩展 -->
{{block name="form_extend"}}
<!-- 新增问答弹窗 -->
<div class="am-popup am-radius" id="plugins-answers-popup-ask">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">{{:MyLang('answer.form_title')}}</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form form-validation am-form-full-screen am-form-popup-fixed" action="{{:PluginsHomeUrl('answers', 'index', 'answer')}}" method="POST" request-type="ajax-reload">
<div class="am-form-group">
<label>{{:MyLang('answer.form_item_name')}}<span class="am-form-group-label-tips-must">*</span></label>
<input type="text" name="name" placeholder="{{:MyLang('answer.form_item_name')}}" minlength="1" maxlength="80" data-validation-message="{{:MyLang('answer.form_item_name_message')}}" class="am-radius" required /></div>
<div class="am-form-group">
<label>{{:MyLang('answer.form_item_tel')}}</label>
<input type="text" name="tel" placeholder="{{:MyLang('answer.form_item_tel')}}" data-validation-message="{{:MyLang('answer.form_item_tel_message')}}" class="am-radius" /></div>
<div class="am-form-group">
<label>{{:MyLang('answer.form_item_title')}}<span class="am-form-group-label-tips-must">*</span></label>
<input type="text" name="title" placeholder="{{:MyLang('answer.form_item_title')}}" minlength="1" maxlength="60" data-validation-message="{{:MyLang('answer.form_item_title_message')}}" class="am-radius" required /></div>
<div class="am-form-group">
<label>{{:MyLang('answer.form_item_content')}}<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="{{:MyLang('answer.form_item_content_message')}}" data-validation-message="{{:MyLang('answer.form_item_content_message')}}" required></textarea>
</div>
<div class="am-form-popup-submit">
<button type="button" class="am-btn am-btn-warning am-radius am-btn-xs btn-loading-example am-margin-right-lg" data-am-modal-close>
<i class="am-icon-paint-brush"></i>
<span>{{:MyLang('cancel_title')}}</span>
</button>
<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:'{{:MyLang('submit_title')}}'}">
<i class="am-icon-save"></i>
<span>{{:MyLang('submit_title')}}</span>
</button>
</div>
</form>
</div>
</div>
</div>
{{/block}}

View File

@ -1,4 +0,0 @@
<!-- 内容 -->
{{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}}

View File

@ -1,5 +0,0 @@
<!-- 操作栏 -->
<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>{{:MyLang('detail_title')}}</span>
</button>

View File

@ -1,4 +0,0 @@
<!-- 回复内容 -->
{{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}}

View File

@ -305,7 +305,7 @@
<!-- 导航 -->
<div class="cart-nav">
<div class="am-container am-background-white am-radius am-nbfc am-padding">
<div class="nav-left am-fl am-margin-top-xs am-padding-left">
<div class="nav-left am-fl am-padding-left">
<label class="am-checkbox-inline select-all-event">
<input type="checkbox" value="1" data-am-ucheck />
<span class="el-text am-color-grey-dark">{{:MyLang('select_all_title')}}</span>

View File

@ -27,7 +27,7 @@
<!-- 第一级菜单 -->
<ul class="am-slides am-text-nowrap">
{{foreach $goods_category_list as $k=>$v}}
<li class="{{if $k eq 0}} active{{/if}}" data-id="{{$v.id}}" data-json="{{if !empty($v['items'])}}{{:urlencode(base64_encode(json_encode($v['items'])))}}{{/if}}">
<li class="am-text-truncate {{if $k eq 0}} active{{/if}}" data-id="{{$v.id}}" data-json="{{if !empty($v['items'])}}{{:urlencode(base64_encode(json_encode($v['items'])))}}{{/if}}">
<div class="zero-item">
{{if !empty($v['icon'])}}
<a style="background-image: url({{if empty($v['realistic_images'])}}{{$v.icon}}{{else /}}{{$v.realistic_images}}{{/if}})" alt="{{$v.name}}"></a>
@ -71,16 +71,18 @@
</div>
{{elseif $category_level eq 1}}
<div class="model-one">
<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4">
<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-5">
{{foreach $goods_category_list as $v}}
<li class="am-fl">
<div class="item-content am-text-center am-margin-xs">
<a href="{{:MyUrl('index/search/index', ['cid'=>$v['id']])}}" class="am-block am-padding-xs">
<div class="item-content am-text-center am-margin-lg">
<a href="{{:MyUrl('index/search/index', ['cid'=>$v['id']])}}" class="am-block">
{{if !empty($v['realistic_images'])}}
<img src="{{$v.realistic_images}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-margin-bottom-xs" />
<img src="{{$v.realistic_images}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-images-scale" />
{{elseif !empty($v['icon']) /}}
<img src="{{$v.icon}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-margin-bottom-xs category-img" />
<img src="{{$v.icon_active}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-margin-bottom-xs category-img-active am-hide" />
<img src="{{$v.icon}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-images-scale am-margin-bottom-xs category-img" />
{{if !empty($v['icon_active'])}}
<img src="{{$v.icon_active}}" alt="{{$v.name}}" class="category-icon am-block am-radius am-images-scale am-margin-bottom-xs category-img-active am-hide" />
{{/if}}
{{/if}}
<p>{{$v.name}}</p>
</a>

View File

@ -1,6 +1,6 @@
{
"name":"默认主题",
"ver":"3.0.3",
"ver":"4.0.0",
"author":"Devil",
"home":"https://shopxo.net/"
}

View File

@ -190,6 +190,11 @@
<button type="button" class="am-btn am-btn-danger">危险按钮</button>
<p class="text-copy-submit am-width" data-value="am-btn-danger">.am-btn-danger</p>
</li>
<li>
<p>辅助按钮</p>
<button type="button" class="am-btn am-btn-assist">辅助按钮</button>
<p class="text-copy-submit am-width" data-value="am-btn-assist">.am-btn-assist</p>
</li>
<li>
<p>链接</p>
<a class="am-btn am-btn-link">链接按钮</a>

View File

@ -227,6 +227,19 @@
<!-- 基础面板 -->
<div class="tb-detail-price">
<div class="price-top-content">
<!-- 商品页面基础信息面板原价顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_panel_original_price_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_panel_original_price_top_data) and is_array($plugins_view_goods_detail_panel_original_price_top_data)}}
{{foreach $plugins_view_goods_detail_panel_original_price_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{if isset($goods['original_price']) and $goods['original_price'] gt 0 and !empty($goods['show_field_original_price_text'])}}
<!-- 原价 -->
<div class="items price goods-original-price">
@ -236,7 +249,8 @@
</dd>
</div>
{{/if}}
<!-- 商品页面基础信息面板售价顶部钩子 -->
<!-- 商品页面基础信息面板售价顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_panel_price_top</span>
@ -263,13 +277,27 @@
<div class="tm-indcon sales-volume"><span class="tm-count">{{$goods.sales_count}}</span><span class="tm-label">{{:MyLang('sales_title')}}</span></div>
<!-- 二维码 -->
<div class="goods-qrcode">
<div class="am-dropdown" data-am-dropdown="{trigger: 'hover'}">
<div class="am-dropdown" data-am-dropdown>
<a href="javascript:;" class="am-dropdown-toggle am-color-grey-dark">{{:MyLang('goods.qrcode_mobile_buy_name')}} <i class="am-icon-qrcode"></i></a>
<div class="am-dropdown-content am-padding-sm am-radius">
<img class="am-img-thumbnail am-radius" src="{{$qrcode_url}}" />
<img src="{{$qrcode_url}}" width="150" height="150" />
</div>
</div>
</div>
<!-- 商品页面基础信息面板售价顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_panel_price_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_panel_price_bottom_data) and is_array($plugins_view_goods_detail_panel_price_bottom_data)}}
{{foreach $plugins_view_goods_detail_panel_price_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 商品页面基础信息面板底部钩子 -->
@ -357,7 +385,7 @@
<!--各种规格-->
{{if $goods['is_shelves'] == 1 and $goods['inventory'] gt 0}}
<dl class="buy-spec-info-container am-margin-top-main">
<dl class="buy-spec-info-container">
<dt class="buy-event mini-spec-event" data-type="buy">
<div class="cart-title">
<span class="specpara-title">{{:MyLang('goods.panel_can_choice_spec_name')}}</span>
@ -393,7 +421,7 @@
{{if !empty($goods['specifications']['choose'])}}
{{foreach $goods.specifications.choose as $key=>$spec}}
{{if !empty($spec['value'])}}
<div class="theme-options sku-items">
<div class="theme-options sku-items am-flex am-flex-row am-flex-items-center">
<div class="cart-title">{{$spec.name}}</div>
<ul>
{{foreach $spec.value as $keys=>$specs}}
@ -427,7 +455,7 @@
{{/if}}
<!-- 库存数量 -->
<div class="theme-options">
<div class="theme-options am-flex am-flex-row am-flex-items-center">
<div class="cart-title number">{{:MyLang('number_title')}}</div>
<dd>
<div class="am-input-group am-input-group-sm number-tag">
@ -770,6 +798,7 @@
{{/foreach}}
</div>
{{/if}}
<!-- web详情 -->
<div class="content-web am-scrollable-horizontal richtext">{{$goods.content_web|raw}}</div>
@ -792,9 +821,24 @@
<!-- 评价 -->
{{if in_array('comments', $middle_tabs_nav['type'])}}
<div class="am-tab-panel goods-comment" id="goods-middle-tabs-nav-comments" data-goods-id="{{$goods.id}}" data-url="{{:MyUrl('index/goods/comments')}}">
<div class="am-tab-panel goods-comment am-relative" id="goods-middle-tabs-nav-comments" data-goods-id="{{$goods.id}}" data-url="{{:MyUrl('index/goods/comments')}}">
<!-- 商品页面tabs内评价底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_tabs_comments_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_tabs_comments_top_data) and is_array($plugins_view_goods_detail_tabs_comments_top_data)}}
{{foreach $plugins_view_goods_detail_tabs_comments_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 评价数据 -->
{{if isset($goods_score['avg']) and $goods_score['avg'] gt 0 and !empty($goods_score['rating'])}}
<div class="am-cf tabs-nav-base-container score-container">
<div class="am-cf tabs-nav-base-container score-container {{if isset($goods_score['avg']) and $goods_score['avg'] gt 0 and !empty($goods_score['rating'])}} shifting{{/if}}">
<div class="score">
<p class="value">{{$goods_score.avg}}</p>
<p class="name">{{:MyLang('goods.dynamic_scoring_name')}}</p>
@ -829,18 +873,49 @@
{{/if}}
<div class="goods-comment-content"></div>
<div class="table-no goods-page-no-data none">
<img src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$attachment_host}}/static/common/images/no-comment.png{{/if}}" />
<p>{{:MyLang('goods.no_comments_data_tips')}}</p>
<div class=" am-flex am-flex-row am-flex-items-center am-gap-24 am-text-left">
<img class="no-data-comment" src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$attachment_host}}/static/common/images/no-comment.png{{/if}}" />
<p class="no-data-tips tips-width am-text-truncate">{{:MyLang('goods.no_comments_data_tips')}}</p>
</div>
</div>
{{if isset($goods_score['avg']) and $goods_score['avg'] gt 0 and !empty($goods_score['rating'])}}
<div class="goods-page-container"></div>
{{/if}}
<!-- 商品页面tabs内评价底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_tabs_comments_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_tabs_comments_bottom_data) and is_array($plugins_view_goods_detail_tabs_comments_bottom_data)}}
{{foreach $plugins_view_goods_detail_tabs_comments_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
{{/if}}
<!-- 猜你喜欢 -->
{{if in_array('guess_you_like', $middle_tabs_nav['type'])}}
<div class="am-tab-panel" id="goods-middle-tabs-nav-guess_you_like">
<!-- 商品页面tabs内猜你喜欢顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_tabs_guess_like_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_tabs_guess_like_top_data) and is_array($plugins_view_goods_detail_tabs_guess_like_top_data)}}
{{foreach $plugins_view_goods_detail_tabs_guess_like_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 猜你喜欢商品 -->
<div class="like">
<ul class="boxes">
{{if !empty($detail_like_goods)}}
@ -863,6 +938,20 @@
{{/if}}
</ul>
</div>
<!-- 商品页面tabs内猜你喜欢底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_goods_detail_tabs_guess_like_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_goods_detail_tabs_guess_like_bottom_data) and is_array($plugins_view_goods_detail_tabs_guess_like_bottom_data)}}
{{foreach $plugins_view_goods_detail_tabs_guess_like_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
{{/if}}
@ -916,4 +1005,23 @@ function CartSubmitBack(e)
$.AMUI.progress.done();
$('form.cart-form').find('button[type="submit"]').button('reset');
}
$(function(){
/**
* 评价打分
*/
$(document).on('click', 'ul.rating li', function()
{
$(this).parent().find('li i').removeClass('am-icon-star').addClass('am-icon-star-o');
var index = $(this).index();
var rating_arr = ('非常差,差,一般,好,非常好').split(',');
for(var i=0; i<=index; i++)
{
$(this).parent().find('li').eq(i).find('i').removeClass('am-icon-star-o').addClass('am-icon-star');
}
$(this).parent().find('li.tips-text').text(rating_arr[index]);
$(this).parents('td').find('input.input-rating').val(index+1).trigger('blur');
$(this).parent().removeClass('not-selected');
});
})
</script>

View File

@ -13,7 +13,7 @@
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<h1 class="am-text-xl am-font-weight">订单详情</h1>
<h1 class="am-text-xl am-font-weight">{{:MyLang('order.detail_browser_seo_title')}}</h1>
<!-- 用户订单详情状态环节顶部-开始 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">

View File

@ -14,7 +14,7 @@
<!-- content start -->
<div class="user-content">
<div class="user-content-body">
<h1 class="am-text-xl am-font-weight">申请售后</h1>
<h1 class="am-text-xl am-font-weight">{{:MyLang('orderaftersale.orderaftersale_apply_name')}}</h1>
<!-- 用户订单售后详情顶部-开始 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
@ -270,7 +270,7 @@
<!-- 详情 -->
{{if !empty($new_aftersale_data) and $new_aftersale_data['status'] neq 5}}
<div class="detail am-nbfc">
<div class="detail am-cf">
<div class="apply-container">
<div class="am-panel am-panel-default am-radius">
<div class="am-panel-hd">{{:MyLang('orderaftersale.goods_after_status_title')}}</div>

View File

@ -43,6 +43,13 @@
<!-- 公共上传组件初始化 -->
<textarea id="upload-editor-view" data-url="{{if isset($is_load_upload_editor) and $is_load_upload_editor eq 1}}{{:MyUrl('index/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if}}" style="display: none;"></textarea>
<!-- 公共单个上传组件表单初始化 -->
<form class="am-form form-validation-common-upload-editor-single" method="post" action="{{:MyUrl('index/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}" request-type="ajax-fun" request-value="CommonFormUploadEditorSingleBack" style="display: none;">
<input type="file" name="upfile" accept="" />
<input type="hidden" name="action" value="uploadimage" />
<button type="reset"></button>
<button type="submit"></button>
</form>
<!-- 公共视频扫码组件初始化 -->
<div class="am-popup am-radius popup-iframe popup-not-title" id="common-video-scan-popup">
@ -200,6 +207,12 @@
$('.am-modal').modal('close');
}
// 公共单个文件上传表单回调
function CommonFormUploadEditorSingleBack(e)
{
CommonFormUploadEditorSingleBackHandle(e);
}
// 子级调用购物车数量更新
function IframePopupHomeCartNumberTotalUpdate(value, popup = null)
{

View File

@ -19,7 +19,7 @@
<div class="am-container footer-nav-content">
<!-- 底部导航 -->
{{if !empty($nav_footer)}}
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-gallery-overlay am-no-layout am-u-md-8 footer-nav-list" data-am-gallery="{}">
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-gallery-overlay am-no-layout am-u-md-8 am-u-lg-9 footer-nav-list" data-am-gallery="{}">
{{foreach $nav_footer as $k=>$v}}
{{if $k lt 4}}
<li>
@ -40,22 +40,22 @@
{{/if}}
<!-- 商店信息 -->
<ul class="footer-about am-u-md-4">
<ul class="footer-about am-u-md-4 am-u-lg-3">
{{if !empty($common_customer_store_tel)}}
<li class="tel">
<i class="am-icon-volume-control-phone"></i>
<i class="iconfont icon-footer-tel am-vertical-align-middle"></i>
<a href="tel:{{$common_customer_store_tel}}">{{$common_customer_store_tel}}</a>
</li>
{{/if}}
{{if !empty($common_customer_store_address)}}
<li class="address">
<i class="am-icon-map-marker"></i>
<i class="iconfont icon-footer-address am-vertical-align-middle"></i>
<span>{{$common_customer_store_address}}</span>
</li>
{{/if}}
{{if !empty($common_customer_store_email)}}
<li class="email">
<i class="am-icon-envelope"></i>
<i class="iconfont icon-footer-email am-vertical-align-middle"></i>
<span>{{$common_customer_store_email}}</span>
</li>
{{/if}}

View File

@ -21,24 +21,33 @@
<!-- 是否开启数据打印操作 -->
{{if isset($form_table['base']['is_data_print']) and $form_table['base']['is_data_print'] eq 1}}
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-print form-table-operate-top-data-print-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_print_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_print_name')}}</button>
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs form-table-operate-top-data-print-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_print_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-print"></i>
<span>{{:MyLang('form_table_nav_operate_data_print_name')}}</span>
</button>
{{/if}}
<!-- 是否开启数据导出pdf操作 -->
{{if isset($form_table['base']['is_data_export_pdf']) and $form_table['base']['is_data_export_pdf'] eq 1}}
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-file-pdf-o form-table-operate-top-data-print-submit" data-is-pdf="1" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_pdf_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_export_pdf_name')}}</button>
<button type="button" class="am-btn am-btn-danger am-radius am-btn-xs form-table-operate-top-data-print-submit" data-is-pdf="1" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_pdf_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-file-pdf-o"></i>
<span>{{:MyLang('form_table_nav_operate_data_export_pdf_name')}}</span>
</button>
{{/if}}
<!-- 是否开启数据导出excel操作 -->
{{if isset($form_table['base']['is_data_export_excel']) and $form_table['base']['is_data_export_excel'] eq 1}}
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-file-excel-o form-table-operate-top-export-excel-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_excel_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"> {{:MyLang('form_table_nav_operate_data_export_excel_name')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs form-table-operate-top-export-excel-submit" data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_export_excel_tips')}}', trigger: 'hover focus', theme: 'warning sm'}">
<i class="am-icon-file-excel-o"></i>
<span>{{:MyLang('form_table_nav_operate_data_export_excel_name')}}</span>
</button>
{{/if}}
<!-- 是否开启删除操作 -->
{{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"
class="am-btn am-btn-danger am-radius am-btn-xs 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}}"
@ -46,7 +55,10 @@
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}}"
data-am-popover="{content: '{{:MyLang('form_table_nav_operate_data_list_delete_tips')}}', trigger: 'hover focus', theme: 'warning sm'}"
> {{:MyLang('delete_title')}}</button>
>
<i class="am-icon-trash-o"></i>
<span>{{:MyLang('delete_title')}}</span>
</button>
{{/if}}
<!-- 右侧操作 -->

View File

@ -32,7 +32,7 @@
<div class="am-form-group">
<label>{{:MyLang('form_verify_title')}}</label>
<div class="am-input-group am-input-group-sm">
<input type="number" name="verify" class="am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<input type="number" name="verify" class="am-form-field am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius btn-loading-example verify-submit" type="button" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-url="{{:MyUrl('index/safety/verifysend')}}" data-verify="{{:MyC('common_img_verify_state')}}" data-text="{{:MyLang('form_verify_button_text')}}" data-send-text="{{:MyLang('form_verify_send_text')}}" data-time="{{:MyC('common_verify_interval_time', 30, true)}}">{{:MyLang('form_verify_button_text')}}</button>
</span>
@ -53,13 +53,16 @@
</div>
<div class="am-modal-bd">
<div class="base">
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" />
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" autocomplete="off" data-is-clearout="0" />
<div class="am-fl">
<img src="{{:MyUrl('index/safety/verifyentry')}}" class="am-radius c-p" id="verify-img" onClick="this.src=this.src+(({{$url_model}} == 0) ? '&' : '?')+Math.random();" />
<a href="javascript:;" class="verify-tips" onClick="document.getElementById('verify-img').src='{{:MyUrl('index/safety/verifyentry')}}{{if $url_model eq 0}}&{{else /}}?{{/if}}'+Math.random();">{{:MyLang('form_images_verify_button_text')}}</a>
</div>
</div>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block btn-loading-example verify-submit-win" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-win="1">{{:MyLang('confirm_title')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block btn-loading-example verify-submit-win" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}" data-win="1">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</div>
</div>

View File

@ -32,7 +32,7 @@
<div class="am-form-group">
<label>{{:MyLang('form_verify_title')}}</label>
<div class="am-input-group am-input-group-sm">
<input type="number" name="verify" class="am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<input type="number" name="verify" class="am-form-field am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius btn-loading-example verify-submit" type="button" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-url="{{:MyUrl('index/safety/verifysend')}}" data-verify="{{:MyC('common_img_verify_state')}}" data-text="{{:MyLang('form_verify_button_text')}}" data-send-text="{{:MyLang('form_verify_send_text')}}" data-time="{{:MyC('common_verify_interval_time', 30, true)}}">{{:MyLang('form_verify_button_text')}}</button>
</span>
@ -53,13 +53,16 @@
</div>
<div class="am-modal-bd">
<div class="base">
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" />
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" autocomplete="off" data-is-clearout="0" />
<div class="am-fl">
<img src="{{:MyUrl('index/safety/verifyentry')}}" class="am-radius c-p" id="verify-img" onClick="this.src=this.src+(({{$url_model}} == 0) ? '&' : '?')+Math.random();" />
<a href="javascript:;" class="verify-tips" onClick="document.getElementById('verify-img').src='{{:MyUrl('index/safety/verifyentry')}}{{if $url_model eq 0}}&{{else /}}?{{/if}}'+Math.random();">{{:MyLang('form_images_verify_button_text')}}</a>
</div>
</div>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block m-t-20 btn-loading-example verify-submit-win" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-win="1">{{:MyLang('confirm_title')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block am-margin-top-lg btn-loading-example verify-submit-win" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}" data-win="1">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</div>
</div>

View File

@ -32,7 +32,7 @@
<div class="am-form-group">
<label>{{:MyLang('form_verify_title')}}</label>
<div class="am-input-group am-input-group-sm">
<input type="number" name="verify" class="am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<input type="number" name="verify" class="-am-form-field am-radius" placeholder="{{:MyLang('form_verify_placeholder')}}" minlength="4" maxlength="4" data-validation-message="{{:MyLang('form_verify_message')}}" required />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default am-radius btn-loading-example verify-submit-new" type="button" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-url="{{:MyUrl('index/safety/verifysend')}}" data-verify="{{:MyC('common_img_verify_state')}}" data-text="{{:MyLang('form_verify_button_text')}}" data-send-text="{{:MyLang('form_verify_send_text')}}" data-time="{{:MyC('common_verify_interval_time', 30, true)}}">{{:MyLang('form_verify_button_text')}}</button>
</span>
@ -53,13 +53,16 @@
</div>
<div class="am-modal-bd">
<div class="base">
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" />
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" autocomplete="off" data-is-clearout="0" />
<div class="am-fl">
<img src="{{:MyUrl('index/safety/verifyentry')}}" class="am-radius c-p" id="verify-img" onClick="this.src=this.src+(({{$url_model}} == 0) ? '&' : '?')+Math.random();" />
<a href="javascript:;" class="verify-tips" onClick="document.getElementById('verify-img').src='{{:MyUrl('index/safety/verifyentry')}}{{if $url_model eq 0}}&{{else /}}?{{/if}}'+Math.random();">{{:MyLang('form_images_verify_button_text')}}</a>
</div>
</div>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block btn-loading-example verify-submit-win-new" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-win="1">{{:MyLang('confirm_title')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block btn-loading-example verify-submit-win-new" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}" data-win="1">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</div>
</div>

View File

@ -31,7 +31,7 @@
</legend>
<div class="am-form-group">
<label>{{:MyLang('common_service.safety.form_item_mobile')}}</label>
<input type="text" name="accounts" class="am-radius" id="accounts" placeholder="{{:MyLang('common_service.safety.form_item_mobile')}}" pattern="{{:MyConst('common_regex_mobile')}}" data-validation-message="{{:MyLang('common_service.safety.form_item_mobile_message')}}" required />
<input type="text" name="accounts" class="am-form-field am-radius" id="accounts" placeholder="{{:MyLang('common_service.safety.form_item_mobile')}}" pattern="{{:MyConst('common_regex_mobile')}}" data-validation-message="{{:MyLang('common_service.safety.form_item_mobile_message')}}" required />
</div>
<div class="am-form-group">
<label>{{:MyLang('form_verify_title')}}</label>
@ -57,13 +57,16 @@
</div>
<div class="am-modal-bd">
<div class="base">
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" />
<input type="text" placeholder="{{:MyLang('form_images_verify_title')}}" maxlength="4" id="verify-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius" autocomplete="off" data-is-clearout="0" />
<div class="am-fl">
<img src="{{:MyUrl('index/safety/verifyentry')}}" class="am-radius c-p" id="verify-img" onClick="this.src=this.src+(({{$url_model}} == 0) ? '&' : '?')+Math.random();" />
<a href="javascript:;" class="verify-tips" onClick="document.getElementById('verify-img').src='{{:MyUrl('index/safety/verifyentry')}}{{if $url_model eq 0}}&{{else /}}?{{/if}}'+Math.random();">{{:MyLang('form_images_verify_button_text')}}</a>
</div>
</div>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block m-t-20 btn-loading-example verify-submit-win-new" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-win="1">{{:MyLang('confirm_title')}}</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-sm block am-margin-top-lg btn-loading-example verify-submit-win-new" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}" data-win="1">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</div>
</div>

View File

@ -5,7 +5,7 @@
</div>
<div class="am-modal-bd">
<div class="am-input-material">
<input type="text" minlength="4" maxlength="4" id="user-verify-win-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius input-padding-right-max" autocomplete="off" />
<input type="text" minlength="4" maxlength="4" id="user-verify-win-img-value" data-validation-message="{{:MyLang('form_images_verify_message')}}" class="am-form-field am-radius input-padding-right-max" autocomplete="off" data-is-clearout="0" />
<div class="am-position-verify">
<img src="{{:MyUrl('index/user/userverifyentry', ['type'=>'[type]'])}}" class="am-cursor-pointer am-radius" id="user-verify-win-img" onClick="this.src=this.src+(({{$url_model}} == 0) ? '&' : '?')+Math.random();" />
<a href="javascript:;" class="form-verify-tips am-radius" onClick="document.getElementById('user-verify-win-img').src='{{:MyUrl('index/user/userverifyentry', ['type'=>'[type]'])}}{{if $url_model eq 0}}&{{else /}}?{{/if}}'+Math.random();">{{:MyLang('form_images_verify_button_text')}}</a>
@ -13,7 +13,10 @@
<span class="am-material-bar"></span>
<label class="am-material-label">{{:MyLang('form_verify_title')}}</label>
</div>
<button type="button" class="am-btn am-btn-primary am-radius am-btn-md am-block am-margin-top-lg btn-loading-example user-verify-win-submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('send_tips')}}'}" data-win="1">{{:MyLang('confirm_title')}}</button>
<button type="button" class="am-btn am-btn-primary am-radius am-btn-md am-block am-margin-top-lg btn-loading-example user-verify-win-submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}" data-win="1">
<i class="am-icon-check"></i>
<span>{{:MyLang('confirm_title')}}</span>
</button>
</div>
</div>
</div>

View File

@ -195,9 +195,7 @@
</li>
<li>
<span>{{$order.status_name}}</span>
{{if $order['items_count'] gt 1}}
<span class="items-count">{{:MyLang('goods_more_total_tips', ['total'=>$order['items_count']])}}</span>
{{/if}}
<span class="items-count">{{:MyLang('goods_more_total_tips', ['total'=>$order['items_count']])}}</span>
</li>
</ul>
</div>

View File

@ -1,6 +1,20 @@
<div class="am-tabs am-margin-0 am-tabs-border user-form-content-container user-login-content-container" data-am-tabs="{noSwipe: 1}">
<div class="am-tabs am-margin-0 am-tabs-border user-form-content-container user-login-content-container {{if MyC('home_user_login_img_verify_state') neq 1}} not-login-verify{{/if}}" data-am-tabs="{noSwipe: 1}">
<!-- 用户登录容器内顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_user_login_content_inside_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_user_login_content_inside_top_data) and is_array($plugins_view_user_login_content_inside_top_data)}}
{{foreach $plugins_view_user_login_content_inside_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{if count($home_user_login_type) gt 1}}
<!-- am-tabs-border底部边框 -->
<!-- am-tabs-border底部边框 -->
<ul class="am-tabs-nav am-nav am-nav-tabs">
{{if in_array('username', $home_user_login_type)}}
<li class="am-active"><a href="[data-tab-panel-0]">{{:MyLang('user.login_type_username_title')}}</a></li>
@ -106,8 +120,11 @@
<!-- form end -->
</div>
{{/if}}
</div>
<div class="am-padding-horizontal-lg am-padding-vertical-xs am-margin-bottom-sm am-nbfc">
<!-- 底部内容 -->
<div class="bottom-container am-padding-horizontal-lg am-padding-top-xs am-margipaddingn-bottom-sm am-nbfc">
<div class="am-padding-horizontal-sm am-margin-bottom-sm am-nbfc">
<!-- 用户登录内底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
@ -121,10 +138,13 @@
{{/if}}
{{/foreach}}
{{/if}}
<!-- 右侧快捷入口 -->
<div class="am-fr">
<a href="{{:MyUrl('index/user/forgetpwdinfo')}}" target="_blank" class="am-color-grey">{{:MyLang('user.forget_password_nav_title')}}</a>
</div>
</div>
<div class="am-padding-horizontal-sm am-padding-vertical-xs am-margin-bottom-sm am-nbfc">
<div class="bottom-content">
{{if !empty($home_user_reg_type)}}
<span>{{:MyLang('user.login_top_register_tips')}}</span>
@ -147,6 +167,20 @@
</div>
</div>
</div>
<!-- 用户登录容器内底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_user_login_content_inside_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_user_login_content_inside_bottom_data) and is_array($plugins_view_user_login_content_inside_bottom_data)}}
{{foreach $plugins_view_user_login_content_inside_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 用户登录内容页面底部钩子 -->

View File

@ -157,21 +157,25 @@
<!-- form end -->
</div>
{{/if}}
</div>
<!-- 用户注册页面内底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_user_reg_info_inside_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_user_reg_info_inside_bottom_data) and is_array($plugins_view_user_reg_info_inside_bottom_data)}}
{{foreach $plugins_view_user_reg_info_inside_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 底部内容 -->
<div class="bottom-container am-padding-horizontal-lg am-padding-top-xs am-padding-bottom-sm am-nbfc">
<div class="am-padding-horizontal-sm am-margin-bottom-sm am-nbfc">
<!-- 用户注册页面内底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_user_reg_info_inside_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_user_reg_info_inside_bottom_data) and is_array($plugins_view_user_reg_info_inside_bottom_data)}}
{{foreach $plugins_view_user_reg_info_inside_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<div class="am-padding-horizontal-sm am-padding-vertical-xs am-margin-bottom-sm am-nbfc">
<!-- 用户注册页面内登录底部钩子 -->
<div class="bottom-content">

View File

@ -167,7 +167,7 @@ class Index extends Common
}
// 参数
$params = input('post.');
$params = $this->RequestParams();
$ret = $this->ParamsCheck($params);
if($ret['code'] != 0)
{
@ -213,7 +213,7 @@ class Index extends Common
}
// 开始安装
$params = input('post.');
$params = $this->RequestParams();
$db = $this->DbObj($params);
if(!is_object($db))
{
@ -245,6 +245,33 @@ class Index extends Common
return $ret;
}
/**
* 请求参数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2023-09-23
* @desc description
*/
public function RequestParams()
{
$params = input('post.');
if(!empty($params) && is_array($params))
{
// 需要去除的特殊字符
$search = ['<?php', '<?', '?>', '\'', '"', '&quot;', '\\', 'eval(', '&amp;', '&lt;', '&gt;'];
foreach($params as &$v)
{
// 去除的特殊字符
if(!is_array($v))
{
$v = str_replace($search, '', $v);
}
}
}
return $params;
}
/**
* 生成配置文件
* @author Devil
@ -257,17 +284,6 @@ class Index extends Common
*/
private function CreateDbConfig($dir, $params = [])
{
// 输入参数特殊字符处理
$search = ['<?php', '<?', '?>', '\'', '"', '\\', 'eval('];
foreach($params as $k=>&$v)
{
if(in_array($k, ['DB_HOST', 'DB_NAME', 'DB_USER', 'DB_PWD', 'DB_PORT', 'DB_CHARSET', 'DB_PREFIX']))
{
$v = str_replace($search, '', $v);
}
}
// 配置文件信息处理
$db_str=<<<php
<?php
// +----------------------------------------------------------------------

View File

@ -6,26 +6,27 @@
<!-- conntent start -->
<div class="am-g inside create">
<form class="am-form am-form-horizontal form-validation" method="post" action="{{:MyUrl('install/index/confirm')}}" request-type="ajax-fun" request-value="FormBackConfirm" timeout="60000">
<div class="am-alert am-radius" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p class="am-text-sm">
<strong>温馨提示</strong>
</p>
<div class="am-padding-left-sm am-text-xs am-margin-top-xs">
<p>建议采用utf8mb4编码、MySQL版本5.6或5.7</p>
{{if !empty($charset_type_list)}}
{{foreach $charset_type_list as $v}}
<p>{{$v.charset}}编码、MySQL版本需 {{$v.version}} 及以上版本 {{$v.collate}}</p>
{{/foreach}}
{{/if}}
<p class="am-margin-top-xs am-text-danger">填写的信息中不要包含【&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;\&nbsp;&nbsp;&nbsp;&nbsp;<span><</span>?php&nbsp;&nbsp;&nbsp;&nbsp;<span><</span>?&nbsp;&nbsp;&nbsp;&nbsp;?<span>></span>&nbsp;&nbsp;&nbsp;&nbsp;<&nbsp;&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;&nbsp;&nbsp;&&nbsp;&nbsp;&nbsp;】类特殊符号</p>
</div>
</div>
<div class="am-panel am-panel-default am-radius">
<div class="am-panel-hd">
<h2 class="am-margin-0">数据库配置信息</h2>
</div>
<div class="am-panel-bd">
<div class="am-alert am-radius" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p class="am-text-sm">
<strong>温馨提示</strong>
</p>
<div class="am-padding-left-sm am-text-xs am-margin-top-xs">
<p>建议采用utf8mb4编码、MySQL版本5.6或5.7</p>
{{if !empty($charset_type_list)}}
{{foreach $charset_type_list as $v}}
<p>{{$v.charset}}编码、MySQL版本需 {{$v.version}} 及以上版本 {{$v.collate}}</p>
{{/foreach}}
{{/if}}
<p class="am-margin-top-xs am-text-danger">填写的配置信息中不要包含【单引号,双引号,反斜杠,<span><</span>?php<span><</span>??<span>></span>】类特殊符号</p>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-2 am-form-label">数据库类型</label>
<div class="am-u-sm-10">

View File

@ -352,6 +352,7 @@ return [
'default_title' => '默認',
'setup_default_title' => '設為默認',
'grade_title' => '等級',
'total_title' => '共',
'only_title' => '僅',
'strip_title' => '條',
'level_title' => '級',
@ -634,6 +635,7 @@ return [
'uninstall_confirm_tips' => '卸載後不可恢復、確認繼續嗎?',
'collect_confirm_tips' => '確認已收到貨物、操作後不可恢復!',
'save_close_page_confirm_tips' => '請確認數據是否保存、繼續關閉本頁嗎?',
'service_confirm_tips' => '確認客戶服務完成,操作後不可恢復!',
// 缓存更新类型列表
'admin_cache_type_list' => [
'site' => ['name' => '網站緩存', 'desc' => '資料轉換後或前臺不能正常訪問時,可以使用此功能更新所有緩存'],
@ -1120,26 +1122,6 @@ return [
// 表单
'form_item_document_type_message' => '協定文檔類型為空',
],
// 问答
'answer' => [
// 表单
'form_item_name' => '連絡人',
'form_item_name_message' => '連絡人格式最多30個字元',
'form_item_tel' => '電話',
'form_item_tel_message' => '請填寫有效的電話',
'form_item_title' => '標題',
'form_item_title_message' => '標題格式最多60個字元',
'form_item_access_count' => '訪問次數',
'form_item_access_count_message' => '訪問次數格式0~9的數值',
'form_item_content' => '內容',
'form_item_content_message' => '內容格式5~1000個字元之間',
'form_item_reply' => '回復內容',
'form_item_reply_message' => '回復內容格式1~1000個字元之間',
'form_item_save_reply_message' => '回復內容格式最多1000個字元',
'form_is_reply' => '是否已回復',
// 基础
'no_username_name' => '網友',
],
// 用户中心导航
'appcenternav' => [
// 表单
@ -1719,7 +1701,6 @@ return [
'safety' => '安全設置',
'message' => '我的消息',
'goodsbrowse' => '我的足迹',
'answer' => '問答/留言',
'logout' => '安全退出',
],
// 用户中心基础信息中mini导航
@ -2426,7 +2407,6 @@ return [
'page_user_goods_browse_list' => '我的足迹',
'page_user_integral_list' => '我的積分',
'page_user_message_list' => '我的消息',
'page_user_answer_list' => '問答/留言',
// 页面-扩展模块
'page_plugins_title' => '擴展模組',
// 页面
@ -2910,14 +2890,19 @@ return [
'desc' => '默認關閉,開啟後用戶註冊需要稽核通過方可登入',
'tips' => '請選擇用戶註冊開啟稽核',
],
'home_site_logo_wap' => [
'home_site_logo_app' => [
'name' => '手機端logo',
'desc' => '支持[jpgpnggif]建議220x66px',
'desc' => '支持 [jpg, png, gif]建議60*60px',
'tips' => '請上傳手機端網站logo',
],
'home_site_logo_wap' => [
'name' => 'wap端logo',
'desc' => '支持[jpgpnggif]建議220*66px',
'tips' => '請上傳wap端網站logo',
],
'home_site_logo' => [
'name' => '電腦端logo',
'desc' => '支持[jpgpnggif]建議220x60px',
'desc' => '支持[jpgpnggif]建議220*60px',
'tips' => '請上傳電腦端網站logo',
],
'home_content_max_width' => [
@ -2927,7 +2912,7 @@ return [
],
'home_site_logo_square' => [
'name' => '正方形logo',
'desc' => '建議使用png格式建議300x300px',
'desc' => '建議使用png格式建議300*300px',
'tips' => '請上傳正方形logo',
],
'home_user_reg_type' => [
@ -3167,10 +3152,6 @@ return [
'desc' => '樓層下關鍵字(輸入回車)',
'tips' => '請填寫首頁樓層頂部右側關鍵字',
],
'common_app_is_enable_answer' => [
'name' => '是否啟用留言',
'desc' => '默認否',
],
'common_spec_add_max_number' => [
'name' => '商品可添加規格最大數量',
'desc' => '建議不超過3個規格',
@ -3428,11 +3409,6 @@ return [
'desc' => '',
'tips' => '請填寫描述',
],
'common_is_login_answer' => [
'name' => '留言需要登入',
'desc' => '默認否',
'tips' => '請選擇是否留言需要登入',
],
'common_order_close_limit_time' => [
'name' => '訂單關閉腳本時長',
'desc' => '組織分鐘默認30分鐘',
@ -3645,7 +3621,7 @@ return [
],
'home_index_floor_left_top_category' => [
'name' => '首頁樓層左側二級商品分類',
'desc' => '樓層下分類(下拉多選)',
'desc' => '可以多選',
'tips' => '請填寫首頁樓層左側二級商品分類',
],
'home_navigation_main_quick_status' => [

View File

@ -352,6 +352,7 @@ return [
'default_title' => 'Default',
'setup_default_title' => 'Setup Default',
'grade_title' => 'Grade',
'total_title' => 'Total',
'only_title' => 'Only',
'strip_title' => 'Strip',
'level_title' => 'Level',
@ -634,6 +635,7 @@ return [
'uninstall_confirm_tips' => 'It cannot be recovered after uninstallation. Are you sure to continue?',
'collect_confirm_tips' => 'Please carefully confirm that the goods have been received and confirm to continue?',
'save_close_page_confirm_tips' => 'Are you sure you want to save the data and continue to close this page?',
'service_confirm_tips' => 'Confirm that customer service is complete and cannot be restored after operation!',
// 缓存更新类型列表
'admin_cache_type_list' => [
'site' => ['name' => 'Site Cache', 'desc' => 'This function can be used to update all caches after data conversion or when the foreground cannot be accessed normally'],
@ -1118,26 +1120,6 @@ return [
// 表单
'form_item_document_type_message' => '协议文档类型为空',
],
// 问答
'answer' => [
// 表单
'form_item_name' => 'Contacts',
'form_item_name_message' => 'Contact format can be up to 30 characters',
'form_item_tel' => 'Telephone',
'form_item_tel_message' => 'Please fill in a valid phone number',
'form_item_title' => 'Title',
'form_item_title_message' => 'Header format can be up to 60 characters',
'form_item_access_count' => 'Number of visits',
'form_item_access_count_message' => 'Number of visits in the format of 0~9',
'form_item_content' => 'Content',
'form_item_content_message' => 'Content format is between 5 and 1000 characters',
'form_item_reply' => 'Reply Content',
'form_item_reply_message' => 'The format of reply content is between 1 and 1000 characters',
'form_item_save_reply_message' => 'Reply content format can be up to 1000 characters',
'form_is_reply' => 'Reply or not',
// 基础
'no_username_name' => 'Net Friend',
],
// 用户中心导航
'appcenternav' => [
// 表单
@ -1716,7 +1698,6 @@ return [
'safety' => 'Safety',
'message' => 'My Message',
'goodsbrowse' => 'My Browse',
'answer' => 'Q&A/Message',
'logout' => 'Sign Out',
],
// 用户中心基础信息中mini导航
@ -2422,7 +2403,6 @@ return [
'page_user_goods_browse_list' => 'My Tracks',
'page_user_integral_list' => 'My Points',
'page_user_message_list' => 'My Message',
'page_user_answer_list' => 'Q&A/Message',
// 页面-扩展模块
'page_plugins_title' => 'Expansion module',
// 页面
@ -2912,14 +2892,19 @@ return [
'desc' => 'It is closed by default. After being opened, user registration needs to be approved before login',
'tips' => 'Please select user registration to enable audit',
],
'home_site_logo_wap' => [
'home_site_logo_app' => [
'name' => 'Mobile logo',
'desc' => 'Support [JPG, PNG, GIF], 220x66px recommended',
'desc' => 'Support [JPG, PNG, GIF], 60*60px recommended',
'tips' => 'Please upload the logo of the mobile website',
],
'home_site_logo_wap' => [
'name' => 'Wap logo',
'desc' => 'Support [JPG, PNG, GIF], 220*66px recommended',
'tips' => 'Please upload the logo of the wap website',
],
'home_site_logo' => [
'name' => 'Computer logo',
'desc' => 'Support [JPG, PNG, GIF], 220x60px recommended',
'desc' => 'Support [JPG, PNG, GIF], 220*60px recommended',
'tips' => 'Please upload the logo of the computer website',
],
'home_content_max_width' => [
@ -2929,7 +2914,7 @@ return [
],
'home_site_logo_square' => [
'name' => 'Square logo',
'desc' => 'PNG format is recommended. 300x300px is recommended',
'desc' => 'PNG format is recommended. 300*300px is recommended',
'tips' => 'Please upload the square logo',
],
'home_user_reg_type' => [
@ -3177,11 +3162,6 @@ return [
'desc' => 'Keywords under floor (enter)',
'tips' => 'Please fill in the keywords on the top right of the first floor',
],
'common_app_is_enable_answer' => [
'name' => 'Whether to enable message',
'desc' => 'Default no',
'tips' => '',
],
'common_spec_add_max_number' => [
'name' => 'Maximum quantity of goods specifications that can be added',
'desc' => 'No more than 3 specifications are recommended',
@ -3462,11 +3442,6 @@ return [
'desc' => '',
'tips' => 'Please fill in the description',
],
'common_is_login_answer' => [
'name' => 'Message needs to be logged in',
'desc' => 'Default no',
'tips' => 'Please select whether to log in for message',
],
'common_order_close_limit_time' => [
'name' => 'Order closing script duration',
'desc' => 'Unit minute, 30 minutes by default',
@ -3679,7 +3654,7 @@ return [
],
'home_index_floor_left_top_category' => [
'name' => 'Second level goods classification on the left side of the home floor',
'desc' => 'Classification under floor (drop-down multiple selection)',
'desc' => 'Multiple choices available',
'tips' => 'Please fill in the second level goods classification on the left side of the home floor',
],
'home_navigation_main_quick_status' => [

View File

@ -352,6 +352,7 @@ return [
'default_title' => 'Predeterminado',
'setup_default_title' => 'Establecer como predeterminado',
'grade_title' => 'Nivel',
'total_title' => 'Total',
'only_title' => 'Solo',
'strip_title' => 'Artículo',
'level_title' => 'Nivel',
@ -634,6 +635,7 @@ return [
'uninstall_confirm_tips' => '¿No se puede restaurar después de desinstalar, ¿ se confirma que continúa?',
'collect_confirm_tips' => '¡¡ se confirma que se han recibido las mercancías y que no se pueden restaurar después de la operación!',
'save_close_page_confirm_tips' => 'Confirme si los datos se guardan y continúa cerrando esta página.',
'service_confirm_tips' => '¡¡ confirme que el servicio al cliente se ha completado y no se puede restaurar después de la operación!',
// 缓存更新类型列表
'admin_cache_type_list' => [
'site' => ['name' => 'Caché del sitio', 'desc' => 'Esta función se puede utilizar para actualizar todos los cachés después de la conversión de datos o cuando el primer plano no puede acceder normalmente.'],
@ -1120,26 +1122,6 @@ return [
// 表单
'form_item_document_type_message' => 'El tipo de documento del Protocolo está vacío',
],
// 问答
'answer' => [
// 表单
'form_item_name' => 'Contactos',
'form_item_name_message' => 'Formato de contacto hasta 30 caracteres',
'form_item_tel' => 'Teléfono',
'form_item_tel_message' => 'Por favor, rellene el número de teléfono válido.',
'form_item_title' => 'Título',
'form_item_title_message' => 'El formato del título tiene un máximo de 60 caracteres',
'form_item_access_count' => 'Número de visitas',
'form_item_access_count_message' => 'Valores del formato de número de visitas 0 a 9',
'form_item_content' => 'Contenido',
'form_item_content_message' => 'Formato de contenido entre 5 y 1000 caracteres',
'form_item_reply' => 'Contenido de la respuesta',
'form_item_reply_message' => 'Formato de contenido de respuesta entre 1 y 1000 caracteres',
'form_item_save_reply_message' => 'Formato de contenido de respuesta hasta 1000 caracteres',
'form_is_reply' => 'Si se ha respondido',
// 基础
'no_username_name' => 'Internautas',
],
// 用户中心导航
'appcenternav' => [
// 表单
@ -1719,7 +1701,6 @@ return [
'safety' => 'Configuración de Seguridad',
'message' => 'Mis noticias',
'goodsbrowse' => 'Mis huellas',
'answer' => 'Preguntas y respuestas / mensajes',
'logout' => 'Salida segura',
],
// 用户中心基础信息中mini导航
@ -2426,7 +2407,6 @@ return [
'page_user_goods_browse_list' => 'Mis huellas',
'page_user_integral_list' => 'Mis puntos',
'page_user_message_list' => 'Mis noticias',
'page_user_answer_list' => 'Preguntas y respuestas / mensajes',
// 页面-扩展模块
'page_plugins_title' => 'Módulo de expansión',
// 页面
@ -2910,14 +2890,19 @@ return [
'desc' => 'Se cierra por defecto. después de abrir, el registro del usuario necesita ser revisado antes de iniciar sesión.',
'tips' => 'Por favor, elija el registro del usuario para abrir la auditoría',
],
'home_site_logo_wap' => [
'home_site_logo_app' => [
'name' => 'Logotipo del teléfono móvil',
'desc' => 'Soporte [jpg, png, gif], recomendado 220x66px',
'desc' => 'Soporte [jpg, png, gif], recomendado 60*60px',
'tips' => 'Por favor, suba el logotipo del sitio web móvil',
],
'home_site_logo_wap' => [
'name' => 'Logotipo del lado WAP',
'desc' => 'Soporte [jpg, png, gif], recomendado 220*66px',
'tips' => 'Por favor, suba el logotipo del sitio web del lado WAP',
],
'home_site_logo' => [
'name' => 'Logotipo del lado de la computadora',
'desc' => 'Soporte [jpg, png, gif], recomendado 220x60px',
'desc' => 'Soporte [jpg, png, gif], recomendado 220*60px',
'tips' => 'Por favor, suba el logotipo del sitio web del lado de la computadora.',
],
'home_content_max_width' => [
@ -2927,7 +2912,7 @@ return [
],
'home_site_logo_square' => [
'name' => 'Logotipo cuadrado',
'desc' => 'Se recomienda usar el formato png, se recomienda 300x300px',
'desc' => 'Se recomienda usar el formato png, se recomienda 300*300px',
'tips' => 'Por favor, suba el logotipo cuadrado',
],
'home_user_reg_type' => [
@ -3167,10 +3152,6 @@ return [
'desc' => 'Palabra clave debajo del piso (introduzca la devolución)',
'tips' => 'Por favor, rellene la palabra clave derecha en la parte superior del piso de la página de inicio.',
],
'common_app_is_enable_answer' => [
'name' => 'Si habilitar mensajes',
'desc' => 'Predeterminado No',
],
'common_spec_add_max_number' => [
'name' => 'Los productos pueden agregar la cantidad máxima de especificaciones',
'desc' => 'Se recomienda no exceder las 3 especificaciones',
@ -3428,11 +3409,6 @@ return [
'desc' => '',
'tips' => 'Por favor, rellene la descripción',
],
'common_is_login_answer' => [
'name' => 'Los mensajes deben iniciar sesión',
'desc' => 'Predeterminado No',
'tips' => 'Por favor, elija si dejar un mensaje requiere iniciar sesión.',
],
'common_order_close_limit_time' => [
'name' => 'Duración del guión de cierre del pedido',
'desc' => 'Minutos unitarios, 30 minutos por defecto',
@ -3645,7 +3621,7 @@ return [
],
'home_index_floor_left_top_category' => [
'name' => 'Clasificación de productos secundarios en el lado izquierdo del piso de inicio',
'desc' => 'Clasificación por debajo del piso (selección múltiple desplegable)',
'desc' => 'Se puede elegir más',
'tips' => 'Por favor, rellene la clasificación de productos secundarios en el lado izquierdo del piso de inicio.',
],
'home_navigation_main_quick_status' => [

View File

@ -352,6 +352,7 @@ return [
'default_title' => '默认',
'setup_default_title' => '设为默认',
'grade_title' => '等级',
'total_title' => '共',
'only_title' => '仅',
'strip_title' => '条',
'level_title' => '级',
@ -634,6 +635,7 @@ return [
'uninstall_confirm_tips' => '卸载后不可恢复、确认继续吗?',
'collect_confirm_tips' => '确认已收到货物、操作后不可恢复!',
'save_close_page_confirm_tips' => '请确认数据是否保存、继续关闭本页吗?',
'service_confirm_tips' => '确认客户服务完成,操作后不可恢复!',
// 缓存更新类型列表
'admin_cache_type_list' => [
'site' => ['name' => '站点缓存', 'desc' => '数据转换后或前台不能正常访问时,可以使用此功能更新所有缓存'],
@ -1120,26 +1122,6 @@ return [
// 表单
'form_item_document_type_message' => '协议文档类型为空',
],
// 问答
'answer' => [
// 表单
'form_item_name' => '联系人',
'form_item_name_message' => '联系人格式最多30个字符',
'form_item_tel' => '电话',
'form_item_tel_message' => '请填写有效的电话',
'form_item_title' => '标题',
'form_item_title_message' => '标题格式最多60个字符',
'form_item_access_count' => '访问次数',
'form_item_access_count_message' => '访问次数格式0~9的数值',
'form_item_content' => '内容',
'form_item_content_message' => '内容格式5~1000个字符之间',
'form_item_reply' => '回复内容',
'form_item_reply_message' => '回复内容格式1~1000个字符之间',
'form_item_save_reply_message' => '回复内容格式最多1000个字符',
'form_is_reply' => '是否已回复',
// 基础
'no_username_name' => '网友',
],
// 用户中心导航
'appcenternav' => [
// 表单
@ -1379,7 +1361,7 @@ return [
'form_item_business_type_message' => '业务类型有误',
'form_item_rating' => '评分',
'form_item_rating_placeholder' => '未评分',
'form_item_rating_message' => '评分有误',
'form_item_rating_message' => '请选择评分',
'form_item_content' => '评论内容',
'form_item_content_placeholder' => '宝贝满足你的期待吗?说说它的优点和美中不足的地方吧',
'form_item_content_message' => '评论内容6~230个字符之间',
@ -1719,7 +1701,6 @@ return [
'safety' => '安全设置',
'message' => '我的消息',
'goodsbrowse' => '我的足迹',
'answer' => '问答/留言',
'logout' => '安全退出',
],
// 用户中心基础信息中mini导航
@ -2426,7 +2407,6 @@ return [
'page_user_goods_browse_list' => '我的足迹',
'page_user_integral_list' => '我的积分',
'page_user_message_list' => '我的消息',
'page_user_answer_list' => '问答/留言',
// 页面-扩展模块
'page_plugins_title' => '扩展模块',
// 页面
@ -2910,14 +2890,19 @@ return [
'desc' => '默认关闭,开启后用户注册需要审核通过方可登录',
'tips' => '请选择用户注册开启审核',
],
'home_site_logo_wap' => [
'home_site_logo_app' => [
'name' => '手机端logo',
'desc' => '支持 [jpg, png, gif],建议220x66px',
'desc' => '支持 [jpg, png, gif],建议60*60px',
'tips' => '请上传手机端网站logo',
],
'home_site_logo_wap' => [
'name' => 'wap端logo',
'desc' => '支持 [jpg, png, gif]建议220*66px',
'tips' => '请上传wap端网站logo',
],
'home_site_logo' => [
'name' => '电脑端logo',
'desc' => '支持 [jpg, png, gif]建议220x60px',
'desc' => '支持 [jpg, png, gif]建议220*60px',
'tips' => '请上传电脑端网站logo',
],
'home_content_max_width' => [
@ -2927,7 +2912,7 @@ return [
],
'home_site_logo_square' => [
'name' => '正方形logo',
'desc' => '建议使用png格式建议300x300px',
'desc' => '使用png格式建议300*300px',
'tips' => '请上传正方形logo',
],
'home_user_reg_type' => [
@ -3167,10 +3152,6 @@ return [
'desc' => '楼层下关键字(输入回车)',
'tips' => '请填写首页楼层顶部右侧关键字',
],
'common_app_is_enable_answer' => [
'name' => '是否启用留言',
'desc' => '默认否',
],
'common_spec_add_max_number' => [
'name' => '商品可添加规格最大数量',
'desc' => '建议不超过3个规格',
@ -3428,11 +3409,6 @@ return [
'desc' => '',
'tips' => '请填写描述',
],
'common_is_login_answer' => [
'name' => '留言需要登录',
'desc' => '默认否',
'tips' => '请选择是否留言需要登录',
],
'common_order_close_limit_time' => [
'name' => '订单关闭脚本时长',
'desc' => '单位 分钟默认30分钟',
@ -3645,7 +3621,7 @@ return [
],
'home_index_floor_left_top_category' => [
'name' => '首页楼层左侧二级商品分类',
'desc' => '楼层下分类(下拉多选)',
'desc' => '可以多选',
'tips' => '请填写首页楼层左侧二级商品分类',
],
'home_navigation_main_quick_status' => [

View File

@ -664,7 +664,6 @@ class BaseLayout
'user_address_list' => MyUrl('index/useraddress/index'),
'user_goods_browse_list' => MyUrl('index/usergoodsbrowse/index'),
'user_integral_list' => MyUrl('index/userintegral/index'),
'user_answer_list' => MyUrl('index/answer/index'),
'user_message_list' => MyUrl('index/message/index'),
];
@ -680,7 +679,6 @@ class BaseLayout
'user_address_list' => '/pages/user-address/user-address',
'user_goods_browse_list' => '/pages/user-goods-browse/user-goods-browse',
'user_integral_list' => '/pages/user-integral/user-integral',
'user_answer_list' => '/pages/user-answer-list/user-answer-list',
'user_message_list' => '/pages/message/message',
];
@ -1025,7 +1023,6 @@ class BaseLayout
[ 'value' => 'user_goods_browse_list', 'name' => MyLang('layout.page_user_goods_browse_list')],
[ 'value' => 'user_integral_list', 'name' => MyLang('layout.page_user_integral_list')],
[ 'value' => 'user_message_list', 'name' => MyLang('layout.page_user_message_list')],
[ 'value' => 'user_answer_list', 'name' => MyLang('layout.page_user_answer_list')],
],
],

View File

@ -503,15 +503,15 @@
{{/case}}
{{case leftright}}
<ul class="module-goods-content module-list-content {{$vss.config.frontend_config.list_ent}}">
{{foreach $vss.config.data_list as $ik=>$i}}
{{foreach $vss.config.data_list as $g}}
<li>
<div class="module-item" style="{{$vss.config.frontend_config.item_style}}">
<a href="{{$g.goods_url}}" target="_blank" class="am-fl {{$vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}">
<img src="{{$i.images}}" class="{{$vss.config.frontend_config.media_fixed.media_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}" />
<img src="{{$g.images}}" class="{{$vss.config.frontend_config.media_fixed.media_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}" />
</a>
<div class="am-fl" style="{{$vss.config.frontend_config.item_right_style}}">
<div class="module-title">
<a href="{{$g.goods_url}}" target="_blank">{{$i.title}}</a>
<a href="{{$g.goods_url}}" target="_blank">{{$g.title}}</a>
</div>
<p class="module-price">{{$currency_symbol}}{{$g.price}}</p>
</div>

View File

@ -495,15 +495,15 @@
{{/case}}
{{case leftright}}
<ul class="module-goods-content module-list-content {{$vss.config.frontend_config.list_ent}}">
{{foreach $vss.config.data_list as $ik=>$i}}
{{foreach $vss.config.data_list as $g}}
<li>
<div class="module-item" style="{{$vss.config.frontend_config.item_style}}">
<a href="javascript:{{if !empty($g['goods_url'])}}CustomUrlOpenHandle('{{$g.goods_url}}'){{/if}};" class="am-fl {{$vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}">
<img src="{{$i.images}}" class="{{$vss.config.frontend_config.media_fixed.media_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}" />
<img src="{{$g.images}}" class="{{$vss.config.frontend_config.media_fixed.media_ent}}" style="{{$vss.config.frontend_config.media_fixed.media_container_style}}" />
</a>
<div class="am-fl" style="{{$vss.config.frontend_config.item_right_style}}">
<div class="module-title">
<a href="javascript:{{if !empty($g['goods_url'])}}CustomUrlOpenHandle('{{$g.goods_url}}'){{/if}};">{{$i.title}}</a>
<a href="javascript:{{if !empty($g['goods_url'])}}CustomUrlOpenHandle('{{$g.goods_url}}'){{/if}};">{{$g.title}}</a>
</div>
<p class="module-price">{{$currency_symbol}}{{$g.price}}</p>
</div>

View File

@ -240,10 +240,10 @@ class FormHandleModule
$this->page = max(1, isset($this->out_params['page']) ? intval($this->out_params['page']) : 1);
$this->page_size = min(empty($this->out_params['page_size']) ? MyC('common_page_size', 10, true) : intval($this->out_params['page_size']), 1000);
// 当前系统操作名称
$this->module_name = RequestModule();
$this->controller_name = RequestController();
$this->action_name = RequestAction();
// 当前系统操作名称、是否指定模块
$this->module_name = empty($this->out_params['module_name']) ? RequestModule() : $this->out_params['module_name'];
$this->controller_name = empty($this->out_params['controller_name']) ? RequestController() : $this->out_params['controller_name'];
$this->action_name = empty($this->out_params['action_name']) ? RequestAction() : $this->out_params['action_name'];
// 是否开启删除
$is_delete = isset($this->form_data['base']['is_delete']) && $this->form_data['base']['is_delete'] == 1;
@ -737,10 +737,13 @@ class FormHandleModule
}
}
// 当前详情数据最大数记录
$temp_max = (count($v[$dv['field']]) == count($v[$dv['field']], 1)) ? 1 : count($v[$dv['field']]);
if($temp_max > $detail_data_row_max)
if(isset($v[$dv['field']]))
{
$detail_data_row_max = $temp_max;
$temp_max = (count($v[$dv['field']]) == count($v[$dv['field']], 1)) ? 1 : count($v[$dv['field']]);
if($temp_max > $detail_data_row_max)
{
$detail_data_row_max = $temp_max;
}
}
}
$is_table_title = false;

View File

@ -1,468 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\service;
use think\facade\Db;
use app\service\UserService;
use app\service\AdminService;
use app\service\SystemBaseService;
/**
* 问答/留言服务层
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class AnswerService
{
/**
* 总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public static function AnswerTotal($where = [])
{
return (int) Db::name('Answer')->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 AnswerList($params = [])
{
$where = empty($params['where']) ? [] : $params['where'];
$field = empty($params['field']) ? '*' : $params['field'];
$order_by = empty($params['order_by']) ? 'id desc' : $params['order_by'];
$m = isset($params['m']) ? intval($params['m']) : 0;
$n = isset($params['n']) ? intval($params['n']) : 10;
// 获取数据列表
$data = Db::name('Answer')->field($field)->where($where)->limit($m, $n)->order($order_by)->select()->toArray();
return DataReturn(MyLang('handle_success'), 0, self::AnswerListHandle($data, $params));
}
/**
* 列表数据处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-08-01
* @desc description
* @param [array] $data [数据列表]
* @param [array] $params [输入参数]
*/
public static function AnswerListHandle($data, $params = [])
{
if(!empty($data))
{
// 用户默认头像
$default_avatar = SystemBaseService::AttachmentHost().'/static/index/'.strtolower(MyFileConfig('common_default_theme', '', 'default', true)).'/images/default-user-avatar.jpg';
// 默认用户名称
$default_username = MyLang('common_service.answer.no_username_name');
foreach($data as &$v)
{
// 用户信息
if(isset($v['user_id']))
{
$user = UserService::GetUserViewInfo($v['user_id']);
if(!isset($params['is_public']) || $params['is_public'] == 1)
{
$v['user'] = [
'avatar' => empty($user['avatar']) ? $default_avatar : $user['avatar'],
'user_name_view' => empty($user['user_name_view']) ? $default_username : $user['user_name_view'],
];
} else {
$v['user'] = $user;
}
}
// 内容
if(!empty($v['content']) && APPLICATION == 'web')
{
$v['content'] = str_replace("\n", '<br />', $v['content']);
}
// 回复内容
if(!empty($v['reply']) && APPLICATION == 'web')
{
$v['reply'] = str_replace("\n", '<br />', $v['reply']);
}
// 回复时间
if(isset($v['reply_time']))
{
$v['reply_time_time'] = empty($v['reply_time']) ? null : date('Y-m-d H:i:s', $v['reply_time']);
$v['reply_time_date'] = empty($v['reply_time']) ? null : date('Y-m-d', $v['reply_time']);
}
// 添加时间
if(isset($v['add_time']))
{
$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']);
}
// 更新时间
if(isset($v['upd_time']))
{
$v['upd_time_time'] = empty($v['upd_time']) ? null : date('Y-m-d H:i:s', $v['upd_time']);
$v['upd_time_date'] = empty($v['upd_time']) ? null : date('Y-m-d', $v['upd_time']);
}
}
}
return $data;
}
/**
* 列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public static function AnswerListWhere($params = [])
{
$where = [];
// id
if(!empty($params['id']))
{
$where[] = ['id', '=', $params['id']];
}
// 用户id
if(!empty($params['user']))
{
$where[] = ['user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
{
$where[] = ['name|tel|title|content', 'like', '%'.$params['keywords'].'%'];
}
// 是否更多条件
if(isset($params['is_more']) && $params['is_more'] == 1)
{
// 等值
if(isset($params['is_show']) && $params['is_show'] > -1)
{
$where[] = ['is_show', '=', intval($params['is_show'])];
}
if(isset($params['is_reply']) && $params['is_reply']> -1)
{
$where[] = ['is_reply', '=', intval($params['is_reply'])];
}
if(!empty($params['time_start']))
{
$where[] = ['add_time', '>', strtotime($params['time_start'])];
}
if(!empty($params['time_end']))
{
$where[] = ['add_time', '<', strtotime($params['time_end'])];
}
}
return $where;
}
/**
* 用户留言保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-07-17
* @desc description
* @param [array] $params [输入参数]
*/
public static function AnswerSave($params = [])
{
// 是否开启登录留言,管理员登录状态可继续操作
$admin = AdminService::LoginInfo();
if(MyC('common_is_login_answer') == 1 && empty($admin))
{
$user = UserService::LoginUserInfo();
if(empty($user))
{
return DataReturn(MyLang('user_no_login_tips'), -400);
}
}
// 参数校验
$p = [
[
'checked_type' => 'length',
'key_name' => 'name',
'checked_data' => '30',
'is_checked' => 1,
'error_msg' => MyLang('common_service.answer.form_item_name_message'),
],
[
'checked_type' => 'isset',
'key_name' => 'tel',
'error_msg' => MyLang('common_service.answer.form_item_tel_message'),
],
[
'checked_type' => 'length',
'key_name' => 'title',
'checked_data' => '60',
'is_checked' => 1,
'error_msg' => MyLang('common_service.answer.form_item_title_message'),
],
[
'checked_type' => 'length',
'key_name' => 'content',
'checked_data' => '1000',
'error_msg' => MyLang('common_service.answer.form_item_content_message'),
],
[
'checked_type' => 'length',
'key_name' => 'reply',
'checked_data' => '1000',
'is_checked' => 1,
'error_msg' => MyLang('common_service.answer.form_item_save_reply_message'),
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 开始操作
$data = [
'user_id' => isset($params['user']['id']) ? intval($params['user']['id']) : (isset($params['user_id']) ? intval($params['user_id']) : 0),
'name' => isset($params['name']) ? $params['name'] : '',
'tel' => isset($params['tel']) ? $params['tel'] : '',
'title' => isset($params['title']) ? $params['title'] : '',
'content' => $params['content'],
'reply' => isset($params['reply']) ? $params['reply'] : '',
'access_count' => isset($params['access_count']) ? intval($params['access_count']) : 0,
'is_reply' => isset($params['is_reply']) ? intval($params['is_reply']) : 0,
'is_show' => isset($params['is_show']) ? intval($params['is_show']) : 0,
'add_time' => time(),
];
// 回复时间
$data['reply_time'] = (isset($data['is_reply']) && $data['is_reply'] == 1) ? time() : 0;
// 不存在添加,则更新
if(empty($params['id']))
{
$data['add_time'] = time();
if(Db::name('Answer')->insertGetId($data) > 0)
{
return DataReturn(MyLang('submit_success'), 0);
}
return DataReturn(MyLang('submit_fail'), -100);
} else {
$data['upd_time'] = time();
if(Db::name('Answer')->where(['id'=>intval($params['id'])])->update($data))
{
return DataReturn(MyLang('edit_success'), 0);
}
return DataReturn(MyLang('edit_fail'), -100);
}
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-30
* @desc description
* @param [array] $params [输入参数]
*/
public static function AnswerDelete($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'ids',
'error_msg' => MyLang('data_id_error_tips'),
],
[
'checked_type' => 'empty',
'key_name' => 'user_type',
'error_msg' => MyLang('user_type_error_tips'),
],
];
$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'],
];
// 用户类型
if($params['user_type'] == 'user')
{
if(empty($params['user']))
{
return DataReturn(MyLang('user_info_incorrect_tips'), -1);
}
$where['user_id'] = $params['user']['id'];
}
// 开始删除
if(Db::name('Answer')->where($where)->delete())
{
return DataReturn(MyLang('delete_success'), 0);
}
return DataReturn(MyLang('delete_fail'), -1);
}
/**
* 回复
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-12-18
* @desc description
* @param [array] $params [输入参数]
*/
public static function AnswerReply($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => MyLang('data_id_error_tips'),
],
[
'checked_type' => 'length',
'key_name' => 'reply',
'checked_data' => '1000',
'error_msg' => MyLang('common_service.answer.form_item_reply_message'),
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 条件
$where = [
'id' => intval($params['id']),
];
// 问答是否存在
$temp = Db::name('Answer')->where($where)->field('id')->find();
if(empty($temp))
{
return DataReturn(MyLang('data_no_exist_or_delete_error_tips'), -2);
}
// 更新问答
$data = [
'reply' => $params['reply'],
'is_reply' => 1,
'reply_time' => time(),
'upd_time' => time()
];
if(Db::name('Answer')->where($where)->update($data))
{
return DataReturn(MyLang('operate_success'), 0);
}
return DataReturn(MyLang('operate_fail'), -100);
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
* @param [array] $params [输入参数]
*/
public static function AnswerStatusUpdate($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => MyLang('data_id_error_tips'),
],
[
'checked_type' => 'empty',
'key_name' => 'field',
'error_msg' => MyLang('operate_field_error_tips'),
],
[
'checked_type' => 'in',
'key_name' => 'state',
'checked_data' => [0,1],
'error_msg' => MyLang('form_status_range_message'),
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 数据更新
if(Db::name('Answer')->where(['id'=>intval($params['id'])])->update([$params['field']=>intval($params['state']), 'upd_time'=>time()]))
{
return DataReturn(MyLang('edit_success'), 0);
}
return DataReturn(MyLang('edit_fail'), -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'])])->inc('access_count')->update();
}
return false;
}
}
?>

View File

@ -41,6 +41,7 @@ class ConfigService
'home_email_user_forget_pwd',
'home_email_user_email_binding',
'home_site_close_reason',
'common_site_type',
'common_self_extraction_address',
'home_index_floor_top_right_keywords',
'home_index_floor_manual_mode_goods',
@ -58,6 +59,7 @@ class ConfigService
public static $attachment_field_list = [
'home_site_logo',
'home_site_logo_wap',
'home_site_logo_app',
'home_site_logo_square',
'common_customer_store_qrcode',
'home_site_user_register_bg_images',
@ -84,6 +86,7 @@ class ConfigService
// json数组字段
public static $data_json_array_field_list = [
'common_site_type',
'common_default_payment',
'common_domain_multilingual_bind_list',
'common_multilingual_choose_list',

View File

@ -123,6 +123,7 @@ class ConstService
'3.0.1' => ['value' => '3.0.1', 'name' => 'v3.0.1'],
'3.0.2' => ['value' => '3.0.2', 'name' => 'v3.0.2'],
'3.0.3' => ['value' => '3.0.3', 'name' => 'v3.0.3'],
'4.0.0' => ['value' => '4.0.0', 'name' => 'v4.0.0'],
],
// 搜索排序方式

View File

@ -160,7 +160,7 @@ class GoodsCommentsService
'order_id' => $order_id,
'goods_id' => $goods_id,
'business_type' => $params['business_type'],
'content' => isset($params['content'][$k]) ? htmlspecialchars(trim($params['content'][$k])) : '',
'content' => isset($params['content'][$k]) ? str_replace(['"', "'", '&quot', '&lt;', '&gt;'], '', htmlspecialchars(trim($params['content'][$k]))) : '',
'images' => empty($params['images'][$k]) ? '' : json_encode($params['images'][$k]),
'rating' => isset($params['rating'][$k]) ? intval($params['rating'][$k]) : 0,
'is_anonymous' => $is_anonymous,

View File

@ -993,14 +993,6 @@ class NavigationService
'icon' => '',
'is_system' => 1,
],
[
'name' => $lang['answer'],
'url' => MyUrl('index/answer/index'),
'contains' => ['indexanswerindex'],
'is_show' => 1,
'icon' => '',
'is_system' => 1,
],
]
],
'logout' => [

View File

@ -1004,12 +1004,14 @@ class OrderAftersaleService
}
}
// 金额大于0是仅退、订单状态为待发货或虚拟订单则退回数量
// 是否需要自动退回数量
// 仅退款类型、申请退款金额+已退款金额大于等于订单商品详情总额时
// 非已发货和已完成、或虚拟订单模式
$is_refund_only_number = false;
if($aftersale['type'] == 0 && (!in_array($order['data']['status'], [3,4]) || $order['data']['order_model'] == 3))
if($aftersale['type'] == 0 && $aftersale['price']+$order['data']['items']['refund_price'] >= $order['data']['items']['total_price'] && (!in_array($order['data']['status'], [3,4]) || $order['data']['order_model'] == 3))
{
$is_refund_only_number = true;
$aftersale['number'] = $order['data']['items']['buy_number'];
$aftersale['number'] = $order['data']['items']['buy_number']-$order['data']['items']['returned_quantity'];
}
// 更新主订单
@ -1183,11 +1185,13 @@ class OrderAftersaleService
// 操作退款
$pay_name = 'payment\\'.$pay_log['payment'];
$msg = MyLang('common_service.orderaftersale.pay_log_refund_reason', ['order_no'=>$order['order_no'], 'price'=>$aftersale['price']]);
// 如果支付金额与支付单总额仅相差一分钱则使用支付单总额(该问题可能在有些支付会转换为分的情况下出现精度原因造成金额不一致)
$pay_price = ($pay_log['total_price']-$pay_log['pay_price'] <= 0.01) ? $pay_log['total_price'] : $pay_log['pay_price'];
$pay_params = [
'order_id' => $order['id'],
'order_no' => $pay_log['log_no'],
'trade_no' => $pay_log['trade_no'],
'pay_price' => $pay_log['pay_price'],
'pay_price' => $pay_price,
'refund_price' => $aftersale['price'],
'client_type' => $order['client_type'],
'refund_reason' => $msg,

View File

@ -600,14 +600,6 @@ class OrderService
$pay_ret = (new $pay_name($payment['config']))->Respond(array_merge(input('get.'), input('post.')));
if(isset($pay_ret['code']) && $pay_ret['code'] == 0)
{
if(empty($pay_ret['data']['out_trade_no']))
{
return DataReturn(MyLang('order_no_error_tips'), -1);
}
// 获取订单信息
$where = ['order_no'=>$pay_ret['data']['out_trade_no'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
$order = Db::name('Order')->where($where)->find();
// 线下支付方式
if(in_array($payment_name, MyConfig('shopxo.under_line_list')))
{
@ -620,7 +612,11 @@ class OrderService
}
}
}
return $pay_ret;
return DataReturn(
empty($pay_ret['msg']) ? MyLang('pay_fail') : $pay_ret['msg'],
isset($pay_ret['code']) ? $pay_ret['code'] : -100,
isset($pay_ret['data']) ? $pay_ret['data'] : ''
);
}
/**

View File

@ -39,11 +39,6 @@ class PayLogService
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'user_id',
'error_msg' => MyLang('common_service.paylog.save_user_id_empty_tips'),
],
[
'checked_type' => 'empty',
'key_name' => 'business_type',
@ -69,7 +64,7 @@ class PayLogService
// 日志主数据
$data = [
'log_no' => date('YmdHis').GetNumberCode(6),
'user_id' => intval($params['user_id']),
'user_id' => empty($params['user_id']) ? 0 : intval($params['user_id']),
'total_price' => PriceNumberFormat($params['total_price']),
'business_type' => trim($params['business_type']),
'subject' => isset($params['subject']) ? $params['subject'] : '',

View File

@ -359,7 +359,11 @@ class RegionService
}
// 获取地区
$result = ['province'=>'', 'city'=>'', 'county'=>''];
$result = [
'province' =>['id'=>0, 'name'=>''],
'city' =>['id'=>0, 'name'=>''],
'county' =>['id'=>0, 'name'=>''],
];
$field = 'id,pid,level,name,code';
$region = self::RegionNode(['field'=>$field, 'where'=>[['code', '=', $params['code']]]]);
if(!empty($region) && !empty($region[0]))
@ -367,7 +371,7 @@ class RegionService
$arr = [1=>'province', 2=>'city', 3=>'county'];
if(array_key_exists($region[0]['level'], $arr))
{
$result[$arr[$region[0]['level']]] = $region[0]['id'];
$result[$arr[$region[0]['level']]] = ['id'=>$region[0]['id'], 'name'=>$region[0]['name']];
// 上一级
if($region[0]['level'] > 1)
{
@ -376,7 +380,7 @@ class RegionService
{
if(array_key_exists($region[0]['level'], $arr))
{
$result[$arr[$region[0]['level']]] = $region[0]['id'];
$result[$arr[$region[0]['level']]] = ['id'=>$region[0]['id'], 'name'=>$region[0]['name']];
// 上一级
if($region[0]['level'] > 1)
{
@ -385,7 +389,7 @@ class RegionService
{
if(array_key_exists($region[0]['level'], $arr))
{
$result[$arr[$region[0]['level']]] = $region[0]['id'];
$result[$arr[$region[0]['level']]] = ['id'=>$region[0]['id'], 'name'=>$region[0]['name']];
}
}
}
@ -394,7 +398,7 @@ class RegionService
}
}
}
if(empty($result) || count(array_filter(array_values($result))) == 0)
if(empty($result) || count(array_filter(array_column($result, 'id'))) == 0)
{
return DataReturn(MyLang('common_service.region.region_no_data_tips'), -1);
}

View File

@ -149,12 +149,10 @@ class ResourcesService
{
if(!empty($value))
{
// 附件地址
$host = SystemBaseService::AttachmentHost();
// 是否数组
if(is_array($value))
{
$host = SystemBaseService::AttachmentHost();
foreach($value as &$v)
{
// 是否二级
@ -174,7 +172,7 @@ class ResourcesService
} else {
if(substr($value, 0, 4) != 'http')
{
$value = $host.$value;
$value = SystemBaseService::AttachmentHost().$value;
}
}
}

View File

@ -52,7 +52,6 @@ class SystemBaseService
// 手机端相关配置
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
'common_app_is_header_nav_fixed' => (int) MyC('common_app_is_header_nav_fixed', 0),
'common_app_is_online_service' => (int) MyC('common_app_is_online_service', 0),
'common_app_customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
@ -62,9 +61,6 @@ class SystemBaseService
'common_cdn_attachment_host' => MyC('common_cdn_attachment_host', null, true),
'common_cdn_public_host' => MyC('common_cdn_public_host', null, true),
// 扩展项-留言、问答
'common_is_login_answer' => (int) MyC('common_is_login_answer', 0, true),
// 扩展项-订单
'common_order_close_limit_time' => (int) MyC('common_order_close_limit_time', 30, true),
'common_order_success_limit_time' => (int) MyC('common_order_success_limit_time', 21600, true),
@ -102,6 +98,7 @@ class SystemBaseService
'home_site_name' => MyC('home_site_name', null, true),
'home_site_logo' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo')),
'home_site_logo_wap' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo_wap')),
'home_site_logo_app' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo_app')),
'home_site_logo_square' => ResourcesService::AttachmentPathViewHandle(MyC('home_site_logo_square')),
'home_site_state' => (int) MyC('home_site_state', 1),
'home_site_web_home_state' => (int) MyC('home_site_web_home_state', 1),
@ -310,7 +307,8 @@ class SystemBaseService
public static function SiteTypeValue()
{
// 当前站点类型、默认快递0快递, 1展示型, 2自提点, 3虚拟销售, 4销售+自提)
$value = (int) MyC('common_site_type', 0, true);
$site_type = MyC('common_site_type');
$value = empty($site_type) ? 0 : (is_array($site_type) ? (array_key_exists(APPLICATION_CLIENT_TYPE, $site_type) ? $site_type[APPLICATION_CLIENT_TYPE] : 0) : $site_type);
// 钩子
$hook_name = 'plugins_service_base_site_type_value';

View File

@ -390,6 +390,23 @@ class SystemService
'color_button_danger_focus_text' => '#E12C08',
'color_button_danger_active_text' => '#C72100',
'color_button_danger_disabled_text' => '#FFC3B7',
// 辅助 - 按钮
'color_button_assist' => '#f7e7e7',
'color_button_assist_hover' => '#f2bab0',
'color_button_assist_focus' => '#fac3bb',
'color_button_assist_active' => '#E22C08',
'color_button_assist_disabled' => '#faeaec',
'color_button_assist_border' => '#E22C08',
'color_button_assist_hover_border' => '#ea755d',
'color_button_assist_focus_border' => '#D58576',
'color_button_assist_active_border' => '#E22C08',
'color_button_assist_disabled_border' => '#f6d9d5',
'color_button_assist_text' => '#E22C08',
'color_button_assist_hover_text' => '#e54726',
'color_button_assist_focus_text' => '#e33210',
'color_button_assist_active_text' => '#ffffff',
'color_button_assist_disabled_text' => '#f1c3bb',
// 小徽章部分
// 默认基础色 - 小徽章

View File

@ -3256,5 +3256,45 @@ class UserService
}
return empty($referrer) ? 0 : intval($referrer);
}
/**
* 用户登录注册后跳转页面地址
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-04
* @desc description
*/
public static function UserLoginOrRegBackRefererUrl()
{
// 上一个页面, 空则用户中心
$referer_url = empty($_SERVER['HTTP_REFERER']) ? MyUrl('index/user/index') : htmlentities($_SERVER['HTTP_REFERER']);
if(!empty($_SERVER['HTTP_REFERER']))
{
// 是否是指定页面,则赋值用户中心
$all = ['login', 'regster', 'forget', 'logininfo', 'reginfo', 'smsreginfo', 'emailreginfo', 'forgetpwdinfo'];
$status = false;
foreach($all as $v)
{
if(strpos($_SERVER['HTTP_REFERER'], $v) !== false)
{
$referer_url = MyUrl('index/user/index');
$status = true;
break;
}
}
// 未匹配到指定页面
if(!$status)
{
// 非商城域名,则赋值用户中心
if(GetUrlHost($referer_url) != GetUrlHost(__MY_URL__))
{
$referer_url = MyUrl('index/user/index');
}
}
}
return $referer_url;
}
}
?>

File diff suppressed because one or more lines are too long

1
example.env Normal file
View File

@ -0,0 +1 @@
APP_DEBUG = true

View File

@ -88,24 +88,24 @@ class Uploader
return;
}
$file = $this->file = $_FILES[$this->fileField];
if (!$file) {
$this->file = $_FILES[$this->fileField];
if (!$this->file) {
$this->stateInfo = $this->getStateErrorInfo('error_file_not_found');
return;
}
if ($this->file['error']) {
$this->stateInfo = $this->getFileErrorInfo($file['error']);
$this->stateInfo = $this->getFileErrorInfo($this->file['error']);
return;
} else if (!file_exists($file['tmp_name'])) {
} else if (!file_exists($this->file['tmp_name'])) {
$this->stateInfo = $this->getStateErrorInfo('error_tmp_file_not_found');
return;
} else if (!is_uploaded_file($file['tmp_name'])) {
} else if (!is_uploaded_file($this->file['tmp_name'])) {
$this->stateInfo = $this->getStateErrorInfo('error_tmp_file');
return;
}
$this->oriName = $file['name'];
$this->fileSize = $file['size'];
$this->oriName = $this->file['name'];
$this->fileSize = $this->file['size'];
$this->fileType = $this->getFileExt();
$this->fullName = $this->getFullName();
$this->filePath = $this->getFilePath();
@ -134,7 +134,7 @@ class Uploader
}
//移动文件
if (!(move_uploaded_file($file['tmp_name'], $this->filePath) && file_exists($this->filePath))) { //移动失败
if (!(move_uploaded_file($this->file['tmp_name'], $this->filePath) && file_exists($this->filePath))) { //移动失败
$this->stateInfo = $this->getStateErrorInfo('error_file_move');
} else { //移动成功
$this->stateInfo = 'SUCCESS';
@ -151,31 +151,31 @@ class Uploader
*/
private function uploadImage()
{
$file = $this->file = $_FILES[$this->fileField];
if (!$file) {
$this->file = empty($_FILES[$this->fileField]) ? '' : $_FILES[$this->fileField];
if (!$this->file) {
$this->stateInfo = $this->getStateErrorInfo('error_file_not_found');
return;
}
if ($this->file['error']) {
$this->stateInfo = $this->getStateErrorInfo($file['error']);
$this->stateInfo = $this->getStateErrorInfo($this->file['error']);
return;
} else if (!file_exists($file['tmp_name'])) {
} else if (!file_exists($this->file['tmp_name'])) {
$this->stateInfo = $this->getStateErrorInfo('error_tmp_file_not_found');
return;
} else if (!is_uploaded_file($file['tmp_name'])) {
} else if (!is_uploaded_file($this->file['tmp_name'])) {
$this->stateInfo = $this->getStateErrorInfo('error_tmp_file');
return;
}
// 防止原名称没有带后缀
$info = getimagesize($file['tmp_name']);
if(stripos($file['name'], '.') === false)
$info = getimagesize($this->file['tmp_name']);
if(stripos($this->file['name'], '.') === false)
{
$file['name'] .= str_replace('/', '.', $info['mime']);
$this->file['name'] .= str_replace('/', '.', $info['mime']);
}
$this->oriName = $file['name'];
$this->fileSize = $file['size'];
$this->oriName = $this->file['name'];
$this->fileSize = $this->file['size'];
$this->fileType = $this->getFileExt();
$this->fullName = $this->getFullName();
$this->filePath = $this->getFilePath();
@ -204,7 +204,7 @@ class Uploader
}
// 验证一句话木马(如果是加密的无法判断)
$content = @file_get_contents($file['tmp_name']);
$content = @file_get_contents($this->file['tmp_name']);
if(false == $content || preg_match('#<\?php#i', $content) || $info['mime'] == 'text/x-php')
{
$this->stateInfo = $this->getStateErrorInfo('invalid_file');
@ -212,7 +212,7 @@ class Uploader
}
// 是否需要直接存储文件
if(!move_uploaded_file($file['tmp_name'], $this->filePath))
if(!move_uploaded_file($this->file['tmp_name'], $this->filePath))
{
$this->stateInfo = $this->getStateErrorInfo('error_file_move');
}
@ -236,7 +236,7 @@ class Uploader
*/
private function uploadBase64()
{
$base64Data = $_POST[$this->fileField];
$base64Data = empty($_POST[$this->fileField]) ? '' : $_POST[$this->fileField];
$img = base64_decode($base64Data);
$this->oriName = $this->config['oriName'];

View File

@ -14,6 +14,8 @@ use think\facade\Db;
use app\service\PaymentService;
use app\service\OrderService;
use app\plugins\wallet\service\WalletService;
use app\plugins\scanpay\service\ScanpayLogService;
use app\plugins\membershiplevelvip\service\PayService as LevelPayService;
/**
* 钱包支付
@ -108,6 +110,12 @@ class WalletPay
return $ret;
}
// 是否登录用户
if(empty($params['user']) || empty($params['user']['id']))
{
return DataReturn('请先登录后再使用钱包支付!', -1);
}
// 获取用户钱包校验
$user_wallet = WalletService::UserWallet($params['user']['id']);
if($user_wallet['code'] != 0)
@ -122,7 +130,7 @@ class WalletPay
}
// 处理支付
$ret = WalletService::UserWalletMoneyUpdate($params['user']['id'], $params['total_price'], 0, 'normal_money', 3, '钱包余额支付[订单'.$params['order_no'].']', ['is_consistent'=>1]);
$ret = WalletService::UserWalletMoneyUpdate($params['user']['id'], $params['total_price'], 0, 'normal_money', 3, $params['name'].'[订单'.$params['order_no'].']', ['is_consistent'=>1]);
if($ret['code'] == 0)
{
// 支付方式
@ -142,8 +150,28 @@ class WalletPay
return DataReturn('日志订单关联信息有误', -1);
}
// 获取订单
$order_list = Db::name('Order')->where(['id'=>$pay_log_value, 'status'=>1])->select()->toArray();
// 根据业务类型
$business_type = empty($params['business_type']) ? 'system-order' : $params['business_type'];
// 获取对应订单信息
$order_list = [];
switch($business_type)
{
// 系统订单
case 'system-order' :
$order_list = Db::name('Order')->where(['id'=>$pay_log_value, 'status'=>1])->select()->toArray();
break;
// 扫码收款
case 'plugins-scanpay' :
$order_list = Db::name('PluginsScanpayLog')->where(['id'=>$pay_log_value, 'status'=>0])->select()->toArray();
break;
// 会员等级
case 'plugins-membershiplevelvip' :
$order_list = Db::name('PluginsMembershiplevelvipPaymentUserOrder')->where(['id'=>$pay_log_value, 'status'=>0])->select()->toArray();
break;
}
if(empty($order_list))
{
return DataReturn('订单信息有误', -1);
@ -161,16 +189,44 @@ class WalletPay
'payment' => $payment[0],
'pay_log_data' => $pay_log_data,
'pay' => [
'trade_no' => '钱包支付',
'trade_no' => 'wallet',
'subject' => $pay_log_data['subject'],
'buyer_user' => (empty($params['user']) || empty($params['user']['user_name_view'])) ? '' : $params['user']['user_name_view'],
'pay_price' => $pay_log_data['total_price'],
],
];
$ret = OrderService::OrderPayHandle($pay_params);
if($ret['code'] == 0)
// 调用支付处理方法
switch($business_type)
{
return DataReturn('支付成功', 0, MyUrl('index/order/respond', ['appoint_status'=>0]));
// 系统订单
case 'system-order' :
$ret = OrderService::OrderPayHandle($pay_params);
if($ret['code'] == 0)
{
return DataReturn('支付成功', 0, MyUrl('index/order/respond', ['appoint_status'=>0]));
}
break;
// 扫码收款
case 'plugins-scanpay' :
$pay_params['order'] = $pay_params['order'][0];
$ret = ScanpayLogService::ScanpayLogHandle($pay_params);
if($ret['code'] == 0)
{
return DataReturn('支付成功', 0, PluginsHomeUrl('scanpay', 'index', 'respond'));
}
break;
// 会员购买
case 'plugins-membershiplevelvip' :
$pay_params['order'] = $pay_params['order'][0];
$ret = LevelPayService::LevelPayHandle($pay_params);
if($ret['code'] == 0)
{
return DataReturn('支付成功', 0, PluginsHomeUrl('membershiplevelvip', 'buy', 'respond', ['appoint_status'=>0]));
}
break;
}
}
return $ret;

View File

@ -373,10 +373,7 @@ class Weixin
<title>微信安全支付</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1">
<body style="text-align:center;padding-top:10%;">
<p style="color:#999;">正在支付中...</p>
<p style="color:#f00;margin-top:20px;">请不要关闭页面!</p>
</body>
<body></body>
<script type="text/javascript">
function onBridgeReady()
{

View File

@ -10,7 +10,7 @@
// +----------------------------------------------------------------------
// 系统版本
define('APPLICATION_VERSION', 'v3.0.3');
define('APPLICATION_VERSION', 'v4.0.0');
// 检测PHP环境
if(version_compare(PHP_VERSION,'7.4.0','<'))

View File

@ -1,6 +0,0 @@
/**
* 列表
*/
.form-table-content table.am-table .reply-content {
max-height: 4rem;
}

View File

@ -141,6 +141,14 @@ ul {margin-top:0;}
.am-container {max-width: 150rem;}
}
/**
* 两行超出字符省略
*/
.am-text-truncate-2,
.am-text-truncate-2-sm{
font-size: 1.2rem;
}
/**
* 列表按钮美化
*/

View File

@ -168,6 +168,6 @@ ul.home_site_user_forgetpwd_ad3_images-images-view li {
height: 1.2rem;
padding-left: 0;
line-height: 1.2rem;
right: -0.2rem;
top: -0.2rem;
right: 0;
top: 0;
}

View File

@ -1,21 +0,0 @@
$(function()
{
// 表单初始化
FromInit('form.form-validation-reply');
$(function()
{
// 处理
$(document).on('click', '.submit-reply', function()
{
var json = $(this).data('json');
var $popup = $('#my-popup-reply');
$popup.find('input[name="id"]').val(json.id);
$popup.find('.user-info img').attr('src', json.user.avatar || $popup.find('.user-info img').attr('src'));
$popup.find('.user-info .user-base .username span').html(json.user.username || '');
$popup.find('.user-info .user-base .nickname span').html(json.user.nickname || '');
$popup.find('.user-info .user-base .mobile span').html(json.user.mobile || '');
$popup.find('.user-info .user-base .email span').html(json.user.email || '');
});
});
});

Some files were not shown because too many files have changed in this diff Show More