mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-29 18:39:16 +08:00
js提示新统一配置
This commit is contained in:
parent
1490254d07
commit
d1124c987b
@ -151,7 +151,7 @@ class Common extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* [ViewInit 视图初始化]
|
||||
* 视图初始化
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -311,6 +311,19 @@ class Common extends BaseController
|
||||
}
|
||||
$assign['admin_color_value'] = $this->admin_color_value;
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.$this->controller_name);
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
}
|
||||
|
@ -16,5 +16,45 @@
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return [];
|
||||
return [
|
||||
// 首页
|
||||
'page_index' => [
|
||||
'order_transaction_amount_name' => '订单成交金额走势',
|
||||
'order_trading_trend_name' => '订单交易走势',
|
||||
'goods_hot_name' => '热销商品',
|
||||
'goods_hot_tips' => '仅显示前30条商品',
|
||||
'payment_name' => '支付方式',
|
||||
'order_region_name' => '订单地域分布',
|
||||
'order_region_tips' => '仅显示30条数据',
|
||||
'upgrade_check_loading_tips' => '正在获取最新内容、请稍候...',
|
||||
'upgrade_version_name' => '更新版本:',
|
||||
'upgrade_date_name' => '更新日期:',
|
||||
],
|
||||
|
||||
// 订单管理
|
||||
'page_order' => [
|
||||
'order_id_empty' => '订单id有误',
|
||||
'express_choice_tips' => '请选择快递方式',
|
||||
'payment_choice_tips' => '请选择支付方式',
|
||||
],
|
||||
|
||||
// 插件管理
|
||||
'page_pluginsadmin' => [
|
||||
'not_enable_tips' => '请先点击勾勾启用',
|
||||
'save_no_data_tips' => '没有可保存的插件数据',
|
||||
],
|
||||
|
||||
// 站点设置
|
||||
'page_site' => [
|
||||
'remove_confirm_tips' => '移除后保存生效、确认继续吗?',
|
||||
'address_no_data' => '地址数据为空',
|
||||
'address_not_exist' => '地址不存在',
|
||||
'address_logo_message' => '请上传logo图片',
|
||||
],
|
||||
|
||||
// 仓库商品
|
||||
'page_warehousegoods' => [
|
||||
'warehouse_choice_tips' => '请选择仓库',
|
||||
],
|
||||
];
|
||||
?>
|
@ -60,7 +60,7 @@
|
||||
<input type="text" autocomplete="off" name="express_number" placeholder="快递单号" minlength="1" data-validation-message="请填写快递单号" class="am-radius" required />
|
||||
</div>
|
||||
|
||||
<div class="am-margin-top-lg">
|
||||
<div class="am-margin-top-lg am-padding-bottom-lg">
|
||||
<input type="hidden" name="id" value="0" />
|
||||
<input type="hidden" name="express_id" value="0" />
|
||||
<input type="hidden" name="user_id" value="0" />
|
||||
@ -98,7 +98,7 @@
|
||||
{{include file="public/not_data" /}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="am-margin-top-sm">
|
||||
<div class="am-margin-top-sm am-padding-bottom-lg">
|
||||
<input type="hidden" name="id" value="0" />
|
||||
<input type="hidden" name="payment_id" value="0" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
|
||||
|
@ -91,6 +91,15 @@
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
{{if !empty($k) and isset($v) and !is_array($v)}}
|
||||
var lang_{{$k}} = '{{$v}}';
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
<body>
|
||||
{{if $module_name.$controller_name.$action_name neq 'adminindexindex'}}
|
||||
|
@ -242,7 +242,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<div class="am-scrollable-vertical am-margin-top-sm am-padding-bottom-xs goods-list-container" data-loading-msg="搜索中...">
|
||||
<div class="am-scrollable-vertical am-margin-top-sm am-padding-bottom-xs goods-list-container" data-no-data-msg="请搜索商品" data-loading-msg="搜索中...">
|
||||
<ul class="am-gallery am-avg-sm-3 am-avg-md-4 am-avg-lg-5 am-gallery-bordered">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 请搜索商品</div>
|
||||
</ul>
|
||||
|
@ -143,7 +143,7 @@ function MyCookie($name = '', $value = '', $is_encryption = true)
|
||||
$value = urlencode(Authcode(base64_encode(json_encode($value)), 'ENCODE'));
|
||||
}
|
||||
$res = cookie($name, $value);
|
||||
return ($res === '' || !$is_encryption) ? $res : json_decode(base64_decode(Authcode(urldecode($res), 'DECODE')), true);
|
||||
return ($res === null || $res === '' || !$is_encryption) ? $res : json_decode(base64_decode(Authcode(urldecode($res), 'DECODE')), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,7 +161,7 @@ class Common extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* [CommonInit 公共数据初始化]
|
||||
* 公共数据初始化
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -174,7 +174,7 @@ class Common extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* [IsLogin 登录校验]
|
||||
* 登录校验
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -194,7 +194,7 @@ class Common extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* [ViewInit 视图初始化]
|
||||
* 视图初始化
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -390,6 +390,19 @@ class Common extends BaseController
|
||||
$site_store_links = empty($site_store_info['links']) ? [] : $site_store_info['links'];
|
||||
$assign['site_store_links'] = $site_store_links;
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.$this->controller_name);
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
}
|
||||
|
@ -16,5 +16,35 @@
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return [];
|
||||
return [
|
||||
// 商品
|
||||
'page_goods' => [
|
||||
'comment_no_data_tips' => '没有评论数据',
|
||||
],
|
||||
|
||||
// 购物车
|
||||
'page_cart' => [
|
||||
'goods_no_choice_tips' => '请选择商品',
|
||||
],
|
||||
|
||||
// 订单确认
|
||||
'page_buy' => [
|
||||
'address_choice_tips' => '请选择地址',
|
||||
'payment_choice_tips' => '请选择支付',
|
||||
],
|
||||
|
||||
// 订单管理
|
||||
'page_order' => [
|
||||
'order_id_empty' => '订单id有误',
|
||||
'payment_choice_tips' => '请选择支付方式',
|
||||
'rating_string' => '非常差,差,一般,好,非常好',
|
||||
'not_choice_data_tips' => '请先选中数据',
|
||||
'pay_url_empty_tips' => '支付url地址有误',
|
||||
],
|
||||
|
||||
// 订单售后
|
||||
'page_orderaftersale' => [
|
||||
'refund_reason_empty_tips' => '退款原因数据为空',
|
||||
],
|
||||
];
|
||||
?>
|
@ -17,7 +17,7 @@
|
||||
<h4 class="am-popup-title">提问/留言</h4>
|
||||
<span data-am-modal-close class="am-close">×</span></div>
|
||||
<div class="am-popup-bd">
|
||||
<form class="am-form form-validation-plugins-answer-ask view-save" action="{{:MyUrl('index/answer/save')}}" method="POST" request-type="ajax-reload">
|
||||
<form class="am-form form-validation" action="{{:MyUrl('index/answer/save')}}" method="POST" request-type="ajax-reload">
|
||||
<div class="am-form-group">
|
||||
<label>昵称<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<input type="text" name="name" placeholder="昵称" minlength="1" maxlength="30" data-validation-message="昵称格式 1~30 个字符之间" class="am-radius" required /></div>
|
||||
@ -31,7 +31,7 @@
|
||||
<label>内容<span class="am-form-group-label-tips-must">必填</span></label>
|
||||
<textarea class="am-radius am-validate" name="content" rows="5" minlength="5" maxlength="1000" placeholder="内容至少5个字" data-validation-message="内容格式 5~1000 个字符之间" required></textarea>
|
||||
</div>
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<div class="am-form-group am-form-group-refreshing am-margin-top-lg">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">提交</button></div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -90,7 +90,16 @@
|
||||
var __map_view_url__ = '{{:MyUrl("index/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
{{if !empty($k) and isset($v) and !is_array($v)}}
|
||||
var lang_{{$k}} = '{{$v}}';
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<!-- 公共header内钩子 -->
|
||||
|
@ -33,18 +33,37 @@ class Common extends BaseController
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// 当前方法
|
||||
MyViewAssign('action', RequestAction());
|
||||
// 模板数据
|
||||
$assign = [
|
||||
// 当前方法
|
||||
'action' => RequestAction(),
|
||||
|
||||
// 系统类型
|
||||
MyViewAssign('system_type', SystemService::SystemTypeValue());
|
||||
// 系统类型
|
||||
'system_type' => SystemService::SystemTypeValue(),
|
||||
|
||||
// 系统环境参数最大数
|
||||
MyViewAssign('env_max_input_vars_count', SystemService::EnvMaxInputVarsCount());
|
||||
// 系统环境参数最大数
|
||||
'env_max_input_vars_count' => SystemService::EnvMaxInputVarsCount(),
|
||||
|
||||
// 默认不加载地图api、类型默认百度地图
|
||||
MyViewAssign('is_load_map_api', 0);
|
||||
MyViewAssign('load_map_type', MyC('common_map_type', 'baidu', true));
|
||||
// 默认不加载地图api、类型默认百度地图
|
||||
'is_load_map_api' => 0,
|
||||
'load_map_type' => MyC('common_map_type', 'baidu', true),
|
||||
];
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.RequestController());
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,16 @@
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("admin/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
{{if !empty($k) and isset($v) and !is_array($v)}}
|
||||
var lang_{{$k}} = '{{$v}}';
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
<body>
|
@ -17,8 +17,67 @@
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return [
|
||||
// 公共
|
||||
'common' => [
|
||||
// 页面公共
|
||||
'page_common' => [
|
||||
// 基础
|
||||
'reminder_title' => '温馨提示',
|
||||
'operate_params_error' => '操作参数有误',
|
||||
'select_reverse_name' => '反选',
|
||||
'select_all_name' => '全选',
|
||||
'loading_tips' => '加载中...',
|
||||
'goods_stock_max_tips' => '最大限购数量',
|
||||
'goods_stock_min_tips' => '最低起购数量',
|
||||
'goods_inventory_number_tips' => '库存数量',
|
||||
'goods_no_choice_spec_tips' => '请选择规格',
|
||||
'store_enabled_tips' => '您的浏览器不支持本地存储。请禁用“专用模式”,或升级到现代浏览器。',
|
||||
// 上传下载
|
||||
'get_loading_tips' => '正在获取中..',
|
||||
'download_loading_tips' => '正在下载中..',
|
||||
'update_loading_tips' => '正在更新中..',
|
||||
'install_loading_tips' => '正在安装中..',
|
||||
'system_download_loading_tips' => '系统包正在下载中...',
|
||||
'upgrade_download_loading_tips' => '升级包正在下载中...',
|
||||
// 公共common.js
|
||||
'select_not_chosen_tips' => '请选择项',
|
||||
'select_chosen_min_tips' => '至少选择{value}项',
|
||||
'select_chosen_max_tips' => '最多选择{value}项',
|
||||
'upload_images_max_tips' => '最多上传{value}张图片',
|
||||
'upload_video_max_tips' => '最多上传{value}个视频',
|
||||
'upload_annex_max_tips' => '最多上传{value}个附件',
|
||||
'form_config_type_params_tips' => '表单[类型]参数配置有误',
|
||||
'form_config_value_params_tips' => '表单[类型]参数配置有误',
|
||||
'form_call_fun_not_exist_tips' => '表单定义的方法未定义',
|
||||
'form_config_main_tips' => '表单[action或method]参数配置有误',
|
||||
'max_input_vars_tips' => '请求参数数量已超出php.ini限制',
|
||||
'operate_add_name' => '新增',
|
||||
'operate_edit_name' => '编辑',
|
||||
'operate_delete_name' => '删除',
|
||||
'upload_images_format_tips' => '图片格式错误,请重新上传',
|
||||
'upload_video_format_tips' => '视频格式错误,请重新上传',
|
||||
'ie_browser_tips' => 'ie浏览器不可用',
|
||||
'browser_api_error_tips' => '浏览器不支持全屏API或已被禁用',
|
||||
'request_handle_loading_tips' => '正在处理中、请稍候...',
|
||||
'params_error_tips' => '参数配置有误',
|
||||
'config_fun_not_exist_tips' => '配置方法未定义',
|
||||
'delete_confirm_tips' => '删除后不可恢复、确认操作吗?',
|
||||
'operate_confirm_tips' => '操作后不可恢复、确认继续吗?',
|
||||
'window_close_confirm_tips' => '您确定要关闭本页吗?',
|
||||
'fullscreen_open_name' => '开启全屏',
|
||||
'fullscreen_exit_name' => '退出全屏',
|
||||
'map_dragging_icon_tips' => '拖动红色图标直接定位',
|
||||
'map_type_not_exist_tips' => '该地图功能未定义',
|
||||
'map_address_analysis_tips' => '您选择地址没有解析到结果!',
|
||||
'map_coordinate_tips' => '坐标有误',
|
||||
'before_choice_data_tips' => '请先选择数据',
|
||||
'address_data_empty_tips' => '地址为空',
|
||||
'assembly_not_init_tips' => '组件未初始化',
|
||||
'not_specified_container_tips' => '未指定容器',
|
||||
'not_specified_assembly_tips' => '未指定加载组建',
|
||||
'not_specified_form_name_tips' => '未指定表单name名称',
|
||||
],
|
||||
|
||||
// 公共基础
|
||||
'common' => [
|
||||
'error' => '异常错误',
|
||||
'operate_fail' => '操作失败',
|
||||
'operate_success' => '操作成功',
|
||||
|
@ -46,7 +46,56 @@
|
||||
</div>
|
||||
|
||||
<!-- 拖拽容器-->
|
||||
<div class="layout-container am-padding-sm am-margin-top-sm">
|
||||
<div class="layout-container am-padding-sm am-margin-top-sm"
|
||||
data-switch-on-text="开启"
|
||||
data-switch-off-text="关闭"
|
||||
data-edit-name="修改"
|
||||
data-layout-set-title="布局设置"
|
||||
data-layout-del-title="布局移除"
|
||||
data-layout-content-set-tips="容器设置"
|
||||
data-layout-content-tips="模块内容区域"
|
||||
data-module-drag-title="拖拽排序"
|
||||
data-module-set-title="模块设置"
|
||||
data-module-del-title="模块移除"
|
||||
data-module-not-exist-tips="模块未定义"
|
||||
data-module-assembly-not-exist-tips="模块组件未定义"
|
||||
data-type-event-not-exist-tips="类型事件未定义"
|
||||
data-params-tips="参数值有误"
|
||||
data-module-tab-tips="模块标记有误"
|
||||
data-module-attr-tips="模块属性有误"
|
||||
data-config-first-tips="请配置"
|
||||
data-url-not-set-tips="未设置链接地址"
|
||||
data-goods-category-name="商品分类"
|
||||
data-brand-name="品牌"
|
||||
data-keywords-name="关键字"
|
||||
data-upload-images-name="上传图片"
|
||||
data-upload-images-tips="请上传图片"
|
||||
data-config-images-tips="请先添加图片并配置"
|
||||
data-upload-video-tips="请上传视频"
|
||||
data-choice-goods-tips="请选择商品"
|
||||
data-goods-data-empty-tips="商品信息为空"
|
||||
data-choice-goods-category-tips="请选择商品分类"
|
||||
data-data-type-tips="数据类型有误"
|
||||
data-main-title-tips="请填写主标题"
|
||||
data-border-style-tips="请选择边线类型"
|
||||
data-border-style-max-tips="请输入边线、最大10的数字"
|
||||
data-height-max-tips="请输入高度、最大100的数字"
|
||||
data-keywords-tips="请填写关键字"
|
||||
data-before-choice-goods-tips="请先选择商品"
|
||||
data-before-choice-goods-category-tips="请先选择商品分类"
|
||||
data-before-choice-brand-tips="请先选择品牌"
|
||||
data-before-input-keywords-tips="请先输入关键字1~30个字符"
|
||||
data-before-choice-page-tips="请先选择页面"
|
||||
data-before-choice-url-position-tips="请先选择链接位置"
|
||||
data-before-config-goods-search-tips="请先配置商品搜索"
|
||||
data-choice-url-tips="请选择跳转链接"
|
||||
data-layout-reminder-title="温馨提示"
|
||||
data-layout-reminder-msg="移除后不可恢复、确定继续吗?"
|
||||
data-layout-container-tips="布局拖放到该区域松开鼠标即可"
|
||||
data-search-goods-tips="请搜索商品"
|
||||
data-custom-url-name="自定义链接"
|
||||
data-custom-url-tips="请至少填写一个地址"
|
||||
>
|
||||
{{if !empty($layout_data) and is_array($layout_data)}}
|
||||
{{foreach $layout_data as $k=>$v}}
|
||||
{{if !empty($v['value']) and !empty($v['children']) and is_array($v['children']) and !empty($v['value_arr']) and count($v['children']) eq count($v['value_arr'])}}
|
||||
|
@ -3,9 +3,10 @@
|
||||
<ul class="goods-category-select-1 am-scrollable-vertical am-list am-list-border am-fl" data-level="1">
|
||||
{{foreach $goods_category_list as $k=>$v}}
|
||||
<li>
|
||||
<a href="javascript:;" data-json="{{:urlencode(json_encode($v['items']))}}" data-index="{{$k}}" data-value="{{$v.id}}">
|
||||
<span>{{$v.name}}</span>
|
||||
<a href="javascript:;" data-index="{{$k}}" data-value="{{$v.id}}">
|
||||
<span class="data-name">{{$v.name}}</span>
|
||||
{{if !empty($v['items'])}}
|
||||
<span class="data-json am-hide">{{:json_encode($v['items'], JSON_UNESCAPED_UNICODE)}}</span>
|
||||
<i class="am-icon-angle-double-right am-fr"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
|
@ -226,7 +226,7 @@ class SystemBaseService
|
||||
];
|
||||
|
||||
// 公共配置信息钩子
|
||||
$hook_name = 'plugins_service_base_commin';
|
||||
$hook_name = 'plugins_service_base_common';
|
||||
MyEventTrigger($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
|
@ -149,7 +149,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -12,10 +12,10 @@ $(function()
|
||||
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 || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .nickname span').html(json.user.nickname || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .mobile span').html(json.user.mobile || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .email span').html(json.user.email || '<span class="cr-ddd">未填写</span>');
|
||||
$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 || '');
|
||||
});
|
||||
});
|
||||
});
|
@ -32,7 +32,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
var key = params.key || '';
|
||||
var terminal = params.terminal || '';
|
||||
var opt = params.opt || 'url';
|
||||
var msg = params.msg || '正在获取中...';
|
||||
var msg = params.msg || lang_get_loading_tips || '正在获取中...';
|
||||
|
||||
// 加载提示
|
||||
AMUI.dialog.loading({title: msg});
|
||||
@ -133,7 +133,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
case 'url' :
|
||||
params['key'] = result.data;
|
||||
params['opt'] = 'download';
|
||||
params['msg'] = '正在下载中...';
|
||||
params['msg'] = lang_download_loading_tips || '正在下载中...';
|
||||
PackageUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -141,7 +141,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
case 'download' :
|
||||
params['key'] = result.data;
|
||||
params['opt'] = 'upgrade';
|
||||
params['msg'] = '正在更新中...';
|
||||
params['msg'] = lang_update_loading_tips || '正在更新中...';
|
||||
PackageUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -156,13 +156,13 @@ function PackageUpgradeRequestHandle(params)
|
||||
}
|
||||
} else {
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(((result || null) == null) ? '返回数据格式错误' : (result.msg || '异常错误'));
|
||||
Prompt(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -199,7 +199,7 @@ $(function()
|
||||
var terminal = $(this).data('terminal') || '';
|
||||
if(name == null || type == null || value == null || json == null)
|
||||
{
|
||||
Prompt('操作事件参数配置有误');
|
||||
Prompt(lang_operate_params_error || '操作事件参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ $(function()
|
||||
var terminal = $(this).attr('data-terminal') || '';
|
||||
if(url == null || type == null || value == null)
|
||||
{
|
||||
Prompt('操作参数有误');
|
||||
Prompt(lang_operate_params_error || '操作参数有误');
|
||||
return false;
|
||||
}
|
||||
$('#package-upgrade-modal').modal('close');
|
||||
@ -269,7 +269,7 @@ $(function()
|
||||
var type = $(this).data('type') || null;
|
||||
if(type == null)
|
||||
{
|
||||
Prompt($table.data('move-type-tips') || '操作类型配置有误');
|
||||
Prompt($table.data('move-type-tips') || lang_operate_params_error || '操作类型配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -10,16 +10,16 @@ $(function()
|
||||
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 || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .nickname span').html(json.user.nickname || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .mobile span').html(json.user.mobile || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .email span').html(json.user.email || '<span class="cr-ddd">未填写</span>');
|
||||
$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 || '');
|
||||
|
||||
$popup.find('.goods-info .base a').attr('href', json.goods.goods_url || 'javascript:;');
|
||||
$popup.find('.goods-info .base img').attr('src', json.goods.images || $popup.find('.goods-info .base img').attr('src'));
|
||||
$popup.find('.goods-info .title').html(json.goods.title);
|
||||
$popup.find('.goods-info .price').html(__currency_symbol__+json.goods.price);
|
||||
$popup.find('.content').html(json.content || '<span class="cr-ddd">没有评论内容</span>');
|
||||
$popup.find('.content').html(json.content || '');
|
||||
$popup.find('textarea[name="reply"]').val(json.reply || '');
|
||||
});
|
||||
});
|
@ -14,12 +14,12 @@ function SystemUpgradeRequestHandle(params)
|
||||
// 参数处理
|
||||
if((params || null) == null)
|
||||
{
|
||||
Prompt('操作参数有误');
|
||||
Prompt(lang_operate_params_error || '操作参数有误');
|
||||
return false;
|
||||
}
|
||||
var url = params.url || null;
|
||||
var opt = params.opt || 'url';
|
||||
var msg = params.msg || '正在获取中...';
|
||||
var msg = params.msg || lang_get_loading_tips || '正在获取中...';
|
||||
|
||||
// 加载提示
|
||||
AMUI.dialog.loading({title: msg});
|
||||
@ -40,21 +40,21 @@ function SystemUpgradeRequestHandle(params)
|
||||
// 获取下载地址
|
||||
case 'url' :
|
||||
params['opt'] = 'download_system';
|
||||
params['msg'] = '系统包正在下载中...';
|
||||
params['msg'] = lang_system_download_loading_tips || '系统包正在下载中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
// 下载系统包
|
||||
case 'download_system' :
|
||||
params['opt'] = 'download_upgrade';
|
||||
params['msg'] = '升级包正在下载中...';
|
||||
params['msg'] = lang_upgrade_download_loading_tips || '升级包正在下载中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
// 下载升级包
|
||||
case 'download_upgrade' :
|
||||
params['opt'] = 'upgrade';
|
||||
params['msg'] = '正在更新中...';
|
||||
params['msg'] = lang_update_loading_tips || '正在更新中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -69,13 +69,13 @@ function SystemUpgradeRequestHandle(params)
|
||||
}
|
||||
} else {
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(((result || null) == null) ? '返回数据格式错误' : (result.msg || '异常错误'));
|
||||
Prompt(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -131,7 +131,7 @@ function EchartsOrderProfit(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name:'订单交易走势', show: true}
|
||||
saveAsImage : {name: lang_order_transaction_amount_name || '订单成交金额走势', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -192,7 +192,7 @@ function EchartsOrderTrading(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name:'订单交易走势', show: true}
|
||||
saveAsImage : {name: lang_order_trading_trend_name || '订单交易走势', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -235,7 +235,7 @@ function EchartsGoodsHot(data)
|
||||
var chart = echarts.init(document.getElementById('echarts-goods-hot'), 'macarons');
|
||||
var option = {
|
||||
title : {
|
||||
subtext: '仅显示前30条商品',
|
||||
subtext: lang_goods_hot_tips || '仅显示前30条商品',
|
||||
x:'center'
|
||||
},
|
||||
tooltip : {
|
||||
@ -260,7 +260,7 @@ function EchartsGoodsHot(data)
|
||||
}
|
||||
},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name:'热销商品', show: true}
|
||||
saveAsImage : {name: lang_goods_hot_name || '热销商品', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
@ -305,7 +305,7 @@ function EchartsPayType(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name:'支付方式', show: true}
|
||||
saveAsImage : {name: lang_payment_name || '支付方式', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
@ -343,7 +343,7 @@ function EchartsOrderMapWholeCountry(name_arr, data)
|
||||
var option = {
|
||||
title: {
|
||||
text: '',
|
||||
subtext: '仅显示30条数据'
|
||||
subtext: lang_order_region_tips || '仅显示30条数据'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@ -361,7 +361,7 @@ function EchartsOrderMapWholeCountry(name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name:'订单地域分布', show: true}
|
||||
saveAsImage : {name: lang_order_region_name || '订单地域分布', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -475,7 +475,8 @@ function EchartsInit(e)
|
||||
break;
|
||||
|
||||
default :
|
||||
console.info('操作类型未定义['+type+']')
|
||||
var msg = lang_operate_params_error || '操作类型未定义';
|
||||
console.info(msg+'['+type+']')
|
||||
}
|
||||
|
||||
// 图表对象存储
|
||||
@ -491,7 +492,7 @@ function EchartsInit(e)
|
||||
{
|
||||
e.button('reset');
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -503,7 +504,7 @@ $(function()
|
||||
$('.inspect-upgrade-submit').on('click', function()
|
||||
{
|
||||
// 基础信息
|
||||
AMUI.dialog.loading({title: '正在获取最新内容、请稍候...'});
|
||||
AMUI.dialog.loading({title: lang_upgrade_check_loading_tips || '正在获取最新内容、请稍候...'});
|
||||
|
||||
// ajax请求
|
||||
$.ajax({
|
||||
@ -522,13 +523,15 @@ $(function()
|
||||
// 是否存在数据、网络不通将返回空数据
|
||||
if((result.data || null) != null)
|
||||
{
|
||||
var upgrade_version_name = lang_upgrade_version_name || '更新版本:';
|
||||
var upgrade_date_name = lang_upgrade_date_name || '更新日期:';
|
||||
var html = '<p class="upgrade-title">';
|
||||
html += '<i class="am-icon-info-circle am-icon-md am-text-warning"></i>';
|
||||
html += '<span class="am-margin-left-xs">'+result.data.title+'</span>';
|
||||
html += '</p>';
|
||||
html += '<div class="am-alert upgrade-base">';
|
||||
html += '<span class="upgrade-ver">更新版本:'+result.data.version_new+'</span>';
|
||||
html += '<span class="upgrade-date am-margin-left-sm">更新日期:'+result.data.add_time+'</span>';
|
||||
html += '<span class="upgrade-ver">'+upgrade_version_name+result.data.version_new+'</span>';
|
||||
html += '<span class="upgrade-date am-margin-left-sm">'+upgrade_date_name+result.data.add_time+'</span>';
|
||||
// 是否带指定链接和链接名称
|
||||
if((result.data.go_title || null) != null && (result.data.go_url || null) != null)
|
||||
{
|
||||
@ -581,7 +584,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -623,7 +626,7 @@ $(function()
|
||||
var is_empty_time = parseInt($(this).parents('.right-operate').data('empty-time')) || 0;
|
||||
if(is_empty_time == 0 && (start == '' || end == ''))
|
||||
{
|
||||
Prompt('快捷时间配置有误');
|
||||
Prompt(lang_operate_params_error || '快捷时间配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -35,13 +35,13 @@ $(function()
|
||||
var id = $('form.delivery-form input[name=id]').val() || 0;
|
||||
if(id == 0)
|
||||
{
|
||||
Prompt('订单id有误');
|
||||
Prompt(lang_order_id_empty || '订单id有误');
|
||||
return false;
|
||||
}
|
||||
var express_id = $('form.delivery-form input[name=express_id]').val() || 0;
|
||||
if(express_id == 0)
|
||||
{
|
||||
Prompt('请选择快递方式');
|
||||
Prompt(lang_express_choice_tips || '请选择快递方式');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -69,13 +69,13 @@ $(function()
|
||||
var id = $('form.pay-form input[name=id]').val() || 0;
|
||||
if(id == 0)
|
||||
{
|
||||
Prompt('订单id有误');
|
||||
Prompt(lang_order_id_empty || '订单id有误');
|
||||
return false;
|
||||
}
|
||||
var payment_id = $('form.pay-form input[name=payment_id]').val() || 0;
|
||||
if(payment_id == 0)
|
||||
{
|
||||
Prompt('请选择支付方式');
|
||||
Prompt(lang_payment_choice_tips || '请选择支付方式');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -93,7 +93,7 @@ $(function()
|
||||
{
|
||||
if(($('form.take-form input[name=id]').val() || 0) == 0)
|
||||
{
|
||||
Prompt('订单id有误');
|
||||
Prompt(lang_order_id_empty || '订单id有误');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -13,17 +13,17 @@ $(function()
|
||||
// 用户信息
|
||||
$popup.find('input[name="id"]').val(data.id);
|
||||
$popup.find('.user-info img').attr('src', data.user.avatar || $popup.find('.user-info img').attr('src'));
|
||||
$popup.find('.user-info .user-base .username span').html(data.user.username || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .nickname span').html(data.user.nickname || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .mobile span').html(data.user.mobile || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .email span').html(data.user.email || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.user-info .user-base .username span').html(data.user.username || '');
|
||||
$popup.find('.user-info .user-base .nickname span').html(data.user.nickname || '');
|
||||
$popup.find('.user-info .user-base .mobile span').html(data.user.mobile || '');
|
||||
$popup.find('.user-info .user-base .email span').html(data.user.email || '');
|
||||
|
||||
// 申请信息
|
||||
$popup.find('.apply-info .type span').html(data.type_text || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.apply-info .reason span').html(data.reason || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.apply-info .number span').html(data.number || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.apply-info .price span').html(data.order_data.currency_data.currency_symbol+data.price || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.apply-info .msg span').html(data.msg || '<span class="cr-ddd">未填写</span>');
|
||||
$popup.find('.apply-info .type span').html(data.type_text || '');
|
||||
$popup.find('.apply-info .reason span').html(data.reason || '');
|
||||
$popup.find('.apply-info .number span').html(data.number || '');
|
||||
$popup.find('.apply-info .price span').html(data.order_data.currency_data.currency_symbol+data.price || '');
|
||||
$popup.find('.apply-info .msg span').html(data.msg || '');
|
||||
|
||||
$popup.modal();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ function RequestHandle(key, opt, msg)
|
||||
{
|
||||
$progress.addClass('am-hide');
|
||||
$error.removeClass('am-hide');
|
||||
$error.find('.msg-text').text('请求参数有误');
|
||||
$error.find('.msg-text').text(lang_operate_params_error || '请求参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ function RequestHandle(key, opt, msg)
|
||||
}
|
||||
|
||||
// 加载提示
|
||||
$progress.find('.msg-text').text(msg || '正在获取中...');
|
||||
$progress.find('.msg-text').text(msg || lang_get_loading_tips || '正在获取中...');
|
||||
|
||||
// ajax
|
||||
$.ajax({
|
||||
@ -55,12 +55,12 @@ function RequestHandle(key, opt, msg)
|
||||
{
|
||||
// 获取下载地址
|
||||
case 'url' :
|
||||
RequestHandle(result.data, 'download', '正在下载中...');
|
||||
RequestHandle(result.data, 'download', lang_download_loading_tips || '正在下载中...');
|
||||
break;
|
||||
|
||||
// 下载插件包
|
||||
case 'download' :
|
||||
RequestHandle(result.data, 'install', '正在安装中...');
|
||||
RequestHandle(result.data, 'install', lang_install_loading_tips || '正在安装中...');
|
||||
break;
|
||||
|
||||
// 安装完成
|
||||
@ -77,7 +77,7 @@ function RequestHandle(key, opt, msg)
|
||||
} else {
|
||||
$progress.addClass('am-hide');
|
||||
$error.removeClass('am-hide');
|
||||
$error.find('.msg-text').text(((result || null) == null) ? '返回数据格式错误' : (result.msg || '异常错误'));
|
||||
$error.find('.msg-text').text(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
@ -103,7 +103,7 @@ function RequestHandle(key, opt, msg)
|
||||
}
|
||||
}
|
||||
var msg = (typeof(data) == 'object') ? data.msg : data;
|
||||
$error.find('.msg-text').text(msg || '异常错误');
|
||||
$error.find('.msg-text').text(msg || (lang_error_text || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -49,9 +49,9 @@ $(function()
|
||||
// 插件设置事件
|
||||
$('.plugins-set-event').on('click', function()
|
||||
{
|
||||
if($(this).parents('.am-gallery-item').hasClass('am-active'))
|
||||
if($(this).parents('.item').hasClass('am-active'))
|
||||
{
|
||||
Prompt('请先点击勾勾启用');
|
||||
Prompt(lang_not_enable_tips || '请先点击勾勾启用');
|
||||
} else {
|
||||
window.location.href = $(this).data('set-url');
|
||||
}
|
||||
@ -93,7 +93,7 @@ $(function()
|
||||
}
|
||||
if(len <= 0)
|
||||
{
|
||||
Prompt('没有可保存的插件数据');
|
||||
Prompt(lang_save_no_data_tips || '没有可保存的插件数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ function AddressModalHandle(data)
|
||||
var lat = data.lat || null;
|
||||
if(name == null || tel == null || province == null || city == null || county == null || address == null)
|
||||
{
|
||||
Prompt('数据填写有误');
|
||||
Prompt(lang_operate_params_error || '数据填写有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ $(function()
|
||||
if(value.length > 0)
|
||||
{
|
||||
AMUI.dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '移除后保存生效、确认继续吗?',
|
||||
title: lang_reminder_title || '温馨提示',
|
||||
content: lang_remove_confirm_tips || '移除后保存生效、确认继续吗?',
|
||||
onConfirm: function(options)
|
||||
{
|
||||
value.splice(index, 1);
|
||||
@ -142,14 +142,14 @@ $(function()
|
||||
var value = SelfExtractionAddressValue();
|
||||
if(value.length <= 0)
|
||||
{
|
||||
Prompt('地址数据为空');
|
||||
Prompt(lang_address_no_data || '地址数据为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
var item = value[index] || null;
|
||||
if(item == null)
|
||||
{
|
||||
Prompt('地址不存在');
|
||||
Prompt(lang_address_not_exist || '地址不存在');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ $(function()
|
||||
if((item.logo || null) != null)
|
||||
{
|
||||
html += '<li>';
|
||||
html += '<input type="text" name="logo" value="'+item.logo+'" data-validation-message="请上传logo图片" required />';
|
||||
html += '<input type="text" name="logo" value="'+item.logo+'" data-validation-message="'+(lang_address_logo_message || '请上传logo图片')+'" required />';
|
||||
html += '<img src="'+item.logo+'" alt="'+item.name+'" />';
|
||||
html += '<i>×</i>';
|
||||
html += '</li>';
|
||||
@ -199,7 +199,7 @@ $(function()
|
||||
$popup_siteset_goods.attr('data-form-name', $(this).data('form-name') || '');
|
||||
|
||||
// 初始化搜索数据
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> 请搜索商品</div>');
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+($('.goods-list-container').data('no-data-msg'))+'</div>');
|
||||
$('.goods-page-container').html(PageLibrary());
|
||||
$popup_siteset_goods.modal();
|
||||
});
|
||||
@ -252,7 +252,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ $(function()
|
||||
var keywords = $('.forth-selection-form-keywords').val();
|
||||
if(warehouse_id <= 0)
|
||||
{
|
||||
Prompt('请选择仓库');
|
||||
Prompt(lang_warehouse_choice_tips || '请选择仓库');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
@ -83,7 +83,7 @@ $(function()
|
||||
var goods_id = $this.parents('li').data('gid');
|
||||
if(warehouse_id <= 0)
|
||||
{
|
||||
Prompt('请选择仓库');
|
||||
Prompt(lang_warehouse_choice_tips || '请选择仓库');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -315,10 +315,10 @@ iframe { border: 0; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图提示
|
||||
* 地图拖动提示
|
||||
*/
|
||||
.map-copy { margin:0px 6px 6px 0px; background-color:#FFF; box-shadow:0 1px 6px rgba(0,0,0,0.35); padding:3px 5px; border-radius: 3px; }
|
||||
.map-copy span { font-size:12px; font-weight:700; color:#f99797; }
|
||||
.map-dragging-tips { margin:0px 6px 6px 0px; background-color:#FFF; box-shadow:0 1px 6px rgba(0,0,0,0.35); padding:3px 5px; border-radius: 3px; }
|
||||
.map-dragging-tips span { font-size:12px; font-weight:700; color:#f99797; }
|
||||
|
||||
/**
|
||||
* 公共图片上传
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* [Prompt 公共提示]
|
||||
* 公共提示
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -70,7 +70,7 @@ function Prompt(msg, type, time)
|
||||
}
|
||||
|
||||
/**
|
||||
* [ArrayTurnJson js数组转json]
|
||||
* js数组转json
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -89,7 +89,7 @@ function ArrayTurnJson(all, object)
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetFormVal 获取form表单的数据]
|
||||
* 获取form表单的数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -190,7 +190,7 @@ function GetFormVal(element, is_json)
|
||||
}
|
||||
|
||||
/**
|
||||
* [IsExitsFunction 方法是否已定义]
|
||||
* 方法是否已定义
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -208,7 +208,7 @@ function IsExitsFunction(fun_name)
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetTagValue 根据tag对象获取值]
|
||||
* 根据tag对象获取值
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -243,7 +243,7 @@ function GetTagValue(tag_obj)
|
||||
}
|
||||
|
||||
/**
|
||||
* [$form.validator 公共表单校验, 添加class form-validation 类的表单自动校验]
|
||||
* 公共表单校验, 添加class form-validation 类的表单自动校验
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -368,7 +368,7 @@ function FromInit(form_name)
|
||||
if((value || null) == null && value != '0')
|
||||
{
|
||||
is_success = false;
|
||||
Prompt(msg || '请选择项');
|
||||
Prompt(msg || lang_select_not_chosen_tips || '请选择项');
|
||||
$(this).trigger('blur');
|
||||
return false;
|
||||
} else {
|
||||
@ -378,12 +378,20 @@ function FromInit(form_name)
|
||||
if(minchecked > 0 && count < minchecked)
|
||||
{
|
||||
is_success = false;
|
||||
msg = msg || '至少选择'+minchecked+'项';
|
||||
if((msg || null) == null)
|
||||
{
|
||||
var temp_msg = lang_select_chosen_min_tips || '至少选择{value}项';
|
||||
msg = temp_msg.replace('{value}', minchecked);
|
||||
}
|
||||
}
|
||||
if(maxchecked > 0 && count > maxchecked)
|
||||
{
|
||||
is_success = false;
|
||||
msg = msg || '最多选择'+maxchecked+'项';
|
||||
if((msg || null) == null)
|
||||
{
|
||||
var temp_msg = lang_select_chosen_max_tips || '最多选择{value}项';
|
||||
msg = temp_msg.replace('{value}', maxchecked);
|
||||
}
|
||||
}
|
||||
if(is_success === false)
|
||||
{
|
||||
@ -424,7 +432,7 @@ function FromInit(form_name)
|
||||
if(request_handle.indexOf(request_type) == -1)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt('表单[类型]参数配置有误');
|
||||
Prompt(lang_form_config_type_params_tips || '表单[类型]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -433,7 +441,7 @@ function FromInit(form_name)
|
||||
if(request_type_value.indexOf(request_type) != -1 && request_value == null)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt('表单[类型值]参数配置有误');
|
||||
Prompt(lang_form_config_value_params_tips || '表单[类型值]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -452,7 +460,7 @@ function FromInit(form_name)
|
||||
{
|
||||
window[request_value](GetFormVal(form_name, true));
|
||||
} else {
|
||||
Prompt('['+request_value+']表单定义的方法未定义');
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@ -483,7 +491,7 @@ function FromInit(form_name)
|
||||
if(!IsExitsFunction(request_value))
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt('['+request_value+']表单定义的方法未定义');
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -494,7 +502,7 @@ function FromInit(form_name)
|
||||
if(action == null || method == null)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt('表单[action或method]参数配置有误');
|
||||
Prompt(lang_form_config_main_tips || '表单[action或method]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -513,7 +521,7 @@ function FromInit(form_name)
|
||||
if(env_vars_count > 0 && form_data_count > env_vars_count)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt('请求参数数量已超出php.ini限制[max_input_vars]('+form_data_count+'>'+env_vars_count+')');
|
||||
Prompt((lang_max_input_vars_tips || '请求参数数量已超出php.ini限制')+'[max_input_vars]('+form_data_count+'>'+env_vars_count+')');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -539,7 +547,7 @@ function FromInit(form_name)
|
||||
window[request_value](result);
|
||||
} else {
|
||||
$button.button('reset');
|
||||
Prompt('['+request_value+']表单定义的方法未定义');
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
}
|
||||
} else {
|
||||
// 统一处理
|
||||
@ -586,7 +594,7 @@ function FromInit(form_name)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$button.button('reset');
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -600,7 +608,7 @@ FromInit('form.form-validation');
|
||||
FromInit('form.form-validation-search');
|
||||
|
||||
/**
|
||||
* [FormDataFill 表单数据填充]
|
||||
* 表单数据填充
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -655,7 +663,7 @@ function FormDataFill(json, tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* [Tree 树方法]
|
||||
* 树方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -702,7 +710,7 @@ function Tree(id, url, level = 0, is_delete_all = 0)
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$('#tree').find('p').text(HtmlToString(xhr.responseText) || '异常错误');
|
||||
$('#tree').find('p').text(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
$('#tree').find('img').remove();
|
||||
}
|
||||
});
|
||||
@ -753,18 +761,18 @@ function TreeItemHtmlHandle(item, pid, level, is_delete_all)
|
||||
// 新增
|
||||
if(level < rank-1)
|
||||
{
|
||||
html += '<button class="am-btn am-btn-success am-btn-xs am-radius am-icon-plus am-margin-right-sm tree-submit-add-node" data-am-modal="{target: \''+popup_tag+'\'}" data-id="'+item.id+'" '+(item.is_enable == 0 ? 'style="display:none;"' : '')+'> 新增</button>';
|
||||
html += '<button class="am-btn am-btn-success am-btn-xs am-radius am-icon-plus am-margin-right-sm tree-submit-add-node" data-am-modal="{target: \''+popup_tag+'\'}" data-id="'+item.id+'" '+(item.is_enable == 0 ? 'style="display:none;"' : '')+'> '+(lang_operate_add_name || '新增')+'</button>';
|
||||
}
|
||||
|
||||
// 编辑
|
||||
html += '<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit submit-edit" data-am-modal="{target: \''+popup_tag+'\'}" data-json="'+encodeURIComponent(item.json)+'" data-is-exist-son="'+item.is_son+'"> 编辑</button>';
|
||||
html += '<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit submit-edit" data-am-modal="{target: \''+popup_tag+'\'}" data-json="'+encodeURIComponent(item.json)+'" data-is-exist-son="'+item.is_son+'"> '+(lang_operate_edit_name || '编辑')+'</button>';
|
||||
if(item.is_son != 'ok' || is_delete_all == 1)
|
||||
{
|
||||
// 是否需要删除子数据
|
||||
var pid_class = is_delete_all == 1 ? '.tree-pid-'+item.id : '';
|
||||
|
||||
// 删除
|
||||
html += '<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-margin-left-sm submit-delete" data-id="'+item.id+'" data-url="'+delete_url+'" data-ext-delete-tag="'+pid_class+'"> 删除</button>';
|
||||
html += '<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-margin-left-sm submit-delete" data-id="'+item.id+'" data-url="'+delete_url+'" data-ext-delete-tag="'+pid_class+'"> '+(lang_operate_delete_name || '删除')+'</button>';
|
||||
}
|
||||
html += '</div>';
|
||||
// 操作项 end
|
||||
@ -918,7 +926,7 @@ function TreeFormSaveBackHandle(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* [ImageFileUploadShow 图片上传预览]
|
||||
* 图片上传预览
|
||||
* @param {[string]} class_name [class名称]
|
||||
* @param {[string]} show_img [预览图片id或class]
|
||||
* @param {[string]} default_images [默认图片]
|
||||
@ -935,11 +943,11 @@ function ImageFileUploadShow(class_name, show_img, default_images)
|
||||
filextension = filextension.toLowerCase();
|
||||
if((filextension!='.jpg') && (filextension!='.gif') && (filextension!='.jpeg') && (filextension!='.png') && (filextension!='.bmp'))
|
||||
{
|
||||
Prompt("图片格式错误,请重新上传");
|
||||
Prompt(lang_upload_images_format_tips || '图片格式错误,请重新上传');
|
||||
} else {
|
||||
if(document.all)
|
||||
{
|
||||
Prompt('ie浏览器不可用');
|
||||
Prompt(lang_ie_browser_tips || 'ie浏览器不可用');
|
||||
/*imgFile.select();
|
||||
path = document.selection.createRange().text;
|
||||
$(this).parent().parent().find('img').attr('src', '');
|
||||
@ -960,7 +968,7 @@ function ImageFileUploadShow(class_name, show_img, default_images)
|
||||
}
|
||||
|
||||
/**
|
||||
* [VideoFileUploadShow 视频上传预览]
|
||||
* 视频上传预览
|
||||
* @param {[string]} class_name [class名称]
|
||||
* @param {[string]} show_video [预览视频id或class]
|
||||
* @param {[string]} default_video [默认视频]
|
||||
@ -977,11 +985,11 @@ function VideoFileUploadShow(class_name, show_video, default_video)
|
||||
filextension = filextension.toLowerCase();
|
||||
if(filextension != '.mp4')
|
||||
{
|
||||
Prompt("视频格式错误,请重新上传");
|
||||
Prompt(lang_upload_video_format_tips || '视频格式错误,请重新上传');
|
||||
} else {
|
||||
if(document.all)
|
||||
{
|
||||
Prompt('ie浏览器不可用');
|
||||
Prompt(lang_ie_browser_tips || 'ie浏览器不可用');
|
||||
/*imgFile.select();
|
||||
path = document.selection.createRange().text;
|
||||
$(this).parent().parent().find('img').attr('src', '');
|
||||
@ -1001,41 +1009,6 @@ function VideoFileUploadShow(class_name, show_video, default_video)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 校验浏览器是否支持视频播放
|
||||
function CheckVideo()
|
||||
{
|
||||
if(document.createElement('video').canPlayType)
|
||||
{
|
||||
var vid_test = document.createElement("video");
|
||||
var ogg_test = vid_test.canPlayType('video/ogg; codecs="theora, vorbis"');
|
||||
if(!ogg_test)
|
||||
{
|
||||
h264_test = vid_test.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
|
||||
if(!h264_test)
|
||||
{
|
||||
document.getElementById("checkVideoResult").innerHTML = "Sorry. No video support."
|
||||
} else {
|
||||
if(h264_test == "probably")
|
||||
{
|
||||
document.getElementById("checkVideoResult").innerHTML = "Yes! Full support!";
|
||||
} else {
|
||||
document.getElementById("checkVideoResult").innerHTML = "Well. Some support.";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(ogg_test == "probably")
|
||||
{
|
||||
document.getElementById("checkVideoResult").innerHTML = "Yes! Full support!";
|
||||
} else {
|
||||
document.getElementById("checkVideoResult").innerHTML = "Well. Some support.";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
document.getElementById("checkVideoResult").innerHTML = "Sorry. No video support."
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹窗加载
|
||||
* @author Devil
|
||||
@ -1110,7 +1083,7 @@ function FomatFloat(value, pos)
|
||||
}
|
||||
|
||||
/**
|
||||
* [DataDelete 数据删除]
|
||||
* 数据删除
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -1128,12 +1101,12 @@ function DataDelete(e)
|
||||
var view_value = e.attr('data-view-value') || '';
|
||||
var ext_delete_tag = e.attr('data-ext-delete-tag') || null;
|
||||
var is_loading = parseInt(e.attr('data-is-loading') || 0);
|
||||
var loading_msg = e.attr('data-loading-msg') || '正在处理中、请稍候...';
|
||||
var loading_msg = e.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
|
||||
// 参数校验
|
||||
if((id || null) == null || (url || null) == null)
|
||||
{
|
||||
Prompt('参数配置有误');
|
||||
Prompt(lang_params_error_tips || '参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1200,7 +1173,7 @@ function DataDelete(e)
|
||||
result['data_id'] = id;
|
||||
window[value](result);
|
||||
} else {
|
||||
Prompt('['+value+']配置方法未定义');
|
||||
Prompt((lang_config_fun_not_exist_tips || '配置方法未定义')+'['+value+']');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1246,13 +1219,13 @@ function DataDelete(e)
|
||||
AMUI.dialog.loading('close');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* [ConfirmDataDelete 数据删除]
|
||||
* 数据删除
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -1261,8 +1234,8 @@ function DataDelete(e)
|
||||
*/
|
||||
function ConfirmDataDelete(e)
|
||||
{
|
||||
var title = e.attr('data-title') || '温馨提示';
|
||||
var msg = e.attr('data-msg') || '删除后不可恢复、确认操作吗?';
|
||||
var title = e.attr('data-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = e.attr('data-msg') || lang_delete_confirm_tips || '删除后不可恢复、确认操作吗?';
|
||||
var is_confirm = (e.attr('data-is-confirm') == undefined || e.attr('data-is-confirm') == 1) ? 1 : 0;
|
||||
|
||||
if(is_confirm == 1)
|
||||
@ -1282,7 +1255,7 @@ function ConfirmDataDelete(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* [AjaxRequest ajax网络请求]
|
||||
* ajax网络请求
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -1301,7 +1274,7 @@ function AjaxRequest(e)
|
||||
var view_value = e.attr('data-view-value') || '';
|
||||
var is_example = e.hasClass('btn-loading-example');
|
||||
var is_loading = parseInt(e.attr('data-is-loading') || 0);
|
||||
var loading_msg = e.attr('data-loading-msg') || '正在处理中、请稍候...';
|
||||
var loading_msg = e.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
|
||||
// 请求数据
|
||||
var data = {"value": value, "field": field};
|
||||
@ -1369,7 +1342,7 @@ function AjaxRequest(e)
|
||||
{
|
||||
window[value](result);
|
||||
} else {
|
||||
Prompt('['+value+']配置方法未定义');
|
||||
Prompt((lang_config_fun_not_exist_tips || '配置方法未定义')+'['+value+']');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1417,13 +1390,13 @@ function AjaxRequest(e)
|
||||
e.button('reset');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* [ConfirmNetworkAjax 确认网络请求]
|
||||
* 确认网络请求
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -1432,9 +1405,8 @@ function AjaxRequest(e)
|
||||
*/
|
||||
function ConfirmNetworkAjax(e)
|
||||
{
|
||||
var title = e.attr('data-title') || '温馨提示';
|
||||
var msg = e.attr('data-msg') || '操作后不可恢复、确认继续吗?';
|
||||
|
||||
var title = e.attr('data-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = e.attr('data-msg') || lang_operate_confirm_tips || '操作后不可恢复、确认继续吗?';
|
||||
AMUI.dialog.confirm({
|
||||
title: title,
|
||||
content: msg,
|
||||
@ -1467,7 +1439,7 @@ function FullscreenOpen()
|
||||
{
|
||||
elem.requestFullScreen();
|
||||
} else {
|
||||
Prompt("浏览器不支持全屏API或已被禁用");
|
||||
Prompt(lang_browser_api_error_tips || '浏览器不支持全屏API或已被禁用');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1497,7 +1469,7 @@ function FullscreenExit()
|
||||
{
|
||||
elem.exitFullscreen();
|
||||
} else {
|
||||
Prompt("浏览器不支持全屏API或已被禁用");
|
||||
Prompt(lang_browser_api_error_tips || '浏览器不支持全屏API或已被禁用');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1520,7 +1492,7 @@ function FullscreenEscEvent()
|
||||
var $fullscreen = $('.fullscreen-event');
|
||||
if(($fullscreen.attr('data-status') || 0) == 1)
|
||||
{
|
||||
$fullscreen.find('.fullscreen-text').text($fullscreen.attr('data-fulltext-open') || '开启全屏');
|
||||
$fullscreen.find('.fullscreen-text').text($fullscreen.attr('data-fulltext-open') || lang_fullscreen_open_name || '开启全屏');
|
||||
$fullscreen.attr('data-status', 0);
|
||||
}
|
||||
}
|
||||
@ -1670,7 +1642,7 @@ function MobileBrowserEnvironment()
|
||||
}
|
||||
|
||||
/**
|
||||
* [pagelibrary 分页按钮获取]
|
||||
* 分页按钮获取
|
||||
* @param {[int]} total [数据总条数]
|
||||
* @param {[int]} number [页面数据显示条数]
|
||||
* @param {[int]} page [当前页码数]
|
||||
@ -1727,7 +1699,7 @@ function PageLibrary(total, number, page, sub_number)
|
||||
}
|
||||
|
||||
/**
|
||||
* [RegionNodeData 地区联动]
|
||||
* 地区联动
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -1977,7 +1949,7 @@ function MapInit(lng, lat, level, is_dragend, mapid)
|
||||
var cr = new BMap.CopyrightControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT});
|
||||
map.addControl(cr); //添加版权控件
|
||||
var bs = map.getBounds(); //返回地图可视区域
|
||||
cr.addCopyright({id: 1, content: "<div class='map-copy'><span>拖动红色图标直接定位</span></div>", bounds:bs});
|
||||
cr.addCopyright({id: 1, content: '<div class="map-dragging-tips"><span>'+(lang_map_dragging_icon_tips || '拖动红色图标直接定位')+'</span></div>', bounds:bs});
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2107,7 +2079,7 @@ function MapInit(lng, lat, level, is_dragend, mapid)
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt('该地图功能未定义('+__load_map_type__+')');
|
||||
Prompt((lang_map_type_not_exist_tips || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
}
|
||||
|
||||
//获取地址坐标
|
||||
@ -2452,9 +2424,7 @@ function RegionLinkageInit()
|
||||
function RequestUrlHandle(url)
|
||||
{
|
||||
// 增加系统参数
|
||||
url = UrlFieldReplace('system_type', __system_type__, url);
|
||||
|
||||
return url;
|
||||
return UrlFieldReplace('system_type', __system_type__, url);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2524,7 +2494,7 @@ $(function()
|
||||
var val = $(this).data('val') || null;
|
||||
if(key == null || val == null)
|
||||
{
|
||||
Prompt('排序数据值有误');
|
||||
Prompt(lang_operate_params_error || '排序数据值有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2557,7 +2527,7 @@ $(function()
|
||||
// 是否有选择的数据
|
||||
if(fields.length <= 0)
|
||||
{
|
||||
Prompt('请先选择数据');
|
||||
Prompt(lang_before_choice_data_tips || '请先选择数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2593,7 +2563,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$button.button('reset');
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -2604,11 +2574,11 @@ $(function()
|
||||
var value = parseInt($(this).attr('data-value')) || 0;
|
||||
if(value == 1)
|
||||
{
|
||||
var not_checked_text = $(this).data('not-checked-text') || '全选';
|
||||
var not_checked_text = $(this).data('not-checked-text') || lang_select_all_name || '全选';
|
||||
$(this).text(not_checked_text);
|
||||
$('.form-table-fields-list-container ul li').find('input[type="checkbox"]').uCheck('uncheck');
|
||||
} else {
|
||||
var checked_text = $(this).data('checked-text') || '反选';
|
||||
var checked_text = $(this).data('checked-text') || lang_select_reverse_name || '反选';
|
||||
$(this).text(checked_text);
|
||||
$('.form-table-fields-list-container ul li').find('input[type="checkbox"]').uCheck('check');
|
||||
}
|
||||
@ -2621,11 +2591,11 @@ $(function()
|
||||
var value = parseInt($(this).attr('data-value')) || 0;
|
||||
if(value == 1)
|
||||
{
|
||||
var not_checked_text = $(this).data('not-checked-text') || '全选';
|
||||
var not_checked_text = $(this).data('not-checked-text') || lang_select_all_name || '全选';
|
||||
$(this).text(not_checked_text);
|
||||
$('.form-table-operate-checkbox').find('input[type="checkbox"]').uCheck('uncheck');
|
||||
} else {
|
||||
var checked_text = $(this).data('checked-text') || '反选';
|
||||
var checked_text = $(this).data('checked-text') || lang_select_reverse_name || '反选';
|
||||
$(this).text(checked_text);
|
||||
$('.form-table-operate-checkbox').find('input[type="checkbox"]').uCheck('check');
|
||||
}
|
||||
@ -2639,7 +2609,7 @@ $(function()
|
||||
var url = $(this).data('url') || null;
|
||||
if(url == null)
|
||||
{
|
||||
Prompt('url参数有误');
|
||||
Prompt(lang_operate_params_error || 'url参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2647,7 +2617,7 @@ $(function()
|
||||
var form = $(this).data('form') || null;
|
||||
if(form == null)
|
||||
{
|
||||
Prompt('form参数有误');
|
||||
Prompt(lang_operate_params_error || 'form参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2655,15 +2625,15 @@ $(function()
|
||||
var values = FromTableCheckedValues(form, '.am-table-scrollable-horizontal');
|
||||
if(values.length <= 0)
|
||||
{
|
||||
Prompt('请先选中数据');
|
||||
Prompt(lang_before_choice_data_tips || '请先选中数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 提交字段名称|超时时间|标题|描述
|
||||
var key = $(this).data('key') || form;
|
||||
var timeout = $(this).data('timeout') || 60000;
|
||||
var title = $(this).data('confirm-title') || '温馨提示';
|
||||
var msg = $(this).data('confirm-msg') || '删除后不可恢复、确认操作吗?';
|
||||
var title = $(this).data('confirm-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = $(this).data('confirm-msg') || lang_delete_confirm_tips || '删除后不可恢复、确认操作吗?';
|
||||
|
||||
// 再次确认
|
||||
AMUI.dialog.confirm({
|
||||
@ -2705,7 +2675,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2729,12 +2699,12 @@ $(function()
|
||||
{
|
||||
if(FullscreenOpen())
|
||||
{
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-exit') || '退出全屏');
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-exit') || lang_fullscreen_exit_name || '退出全屏');
|
||||
}
|
||||
} else {
|
||||
if(FullscreenExit())
|
||||
{
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-open') || '开启全屏');
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-open') || lang_fullscreen_open_name || '开启全屏');
|
||||
}
|
||||
}
|
||||
$(this).attr('data-status', status == 0 ? 1 : 0);
|
||||
@ -2776,7 +2746,7 @@ $(function()
|
||||
});
|
||||
|
||||
/**
|
||||
* [submit-delete 删除数据列表]
|
||||
* 删除数据列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2790,7 +2760,7 @@ $(function()
|
||||
});
|
||||
|
||||
/**
|
||||
* [submit-state 公共数据状态操作]
|
||||
* 公共数据状态操作
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2809,10 +2779,10 @@ $(function()
|
||||
var field = $this.attr('data-field') || '';
|
||||
var is_update_status = $this.attr('data-is-update-status') || 0;
|
||||
var is_loading = parseInt($this.attr('data-is-loading') || 0);
|
||||
var loading_msg = $this.attr('data-loading-msg') || '正在处理中、请稍候...';
|
||||
var loading_msg = $this.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
if(id == undefined || url == undefined)
|
||||
{
|
||||
Prompt('参数配置有误');
|
||||
Prompt(lang_params_error_tips || '参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2876,13 +2846,13 @@ $(function()
|
||||
AMUI.dialog.loading('close');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* [submit-edit 公共编辑]
|
||||
* 公共编辑
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2909,7 +2879,7 @@ $(function()
|
||||
});
|
||||
|
||||
/**
|
||||
* [tree-submit-add-node 公共无限节点 - 新子节点]
|
||||
* 公共无限节点 - 新子节点
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2932,7 +2902,7 @@ $(function()
|
||||
});
|
||||
|
||||
/**
|
||||
* [tree-submit 公共无限节点]
|
||||
* 公共无限节点
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2978,13 +2948,13 @@ $(function()
|
||||
{
|
||||
Tree(id, url, level, is_delete_all);
|
||||
} else {
|
||||
Prompt('参数有误');
|
||||
Prompt(lang_operate_params_error || '参数有误');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* [tree-submit-add 公共无限节点新增按钮处理]
|
||||
* 公共无限节点新增按钮处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -2996,7 +2966,7 @@ $(function()
|
||||
});
|
||||
|
||||
/**
|
||||
* [submit-ajax 公共数据ajax操作]
|
||||
* 公共数据ajax操作
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -3056,7 +3026,7 @@ $(function()
|
||||
address += $('#form-address').val();
|
||||
if(province.length <= 0 && address.length <= 0)
|
||||
{
|
||||
Prompt('地址为空');
|
||||
Prompt(lang_address_data_empty_tips || '地址为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3074,7 +3044,7 @@ $(function()
|
||||
{
|
||||
MapInit(point.lng, point.lat);
|
||||
} else {
|
||||
Prompt('您选择地址没有解析到结果!');
|
||||
Prompt(lang_map_address_analysis_tips || '您选择地址没有解析到结果!');
|
||||
}
|
||||
}, province);
|
||||
break;
|
||||
@ -3091,7 +3061,7 @@ $(function()
|
||||
var lnglat = result.geocodes[0].location;
|
||||
MapInit(lnglat.lng, lnglat.lat);
|
||||
} else {
|
||||
Prompt('您选择地址没有解析到结果!');
|
||||
Prompt(lang_map_address_analysis_tips || '您选择地址没有解析到结果!');
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -3123,7 +3093,7 @@ $(function()
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt('该地图功能未定义('+__load_map_type__+')');
|
||||
Prompt((lang_map_type_not_exist_tips || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
}
|
||||
});
|
||||
|
||||
@ -3253,7 +3223,8 @@ $(function()
|
||||
// 是否限制数量
|
||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||
{
|
||||
Prompt('最多上传'+max_number+'张图片');
|
||||
var temp_msg = lang_upload_images_max_tips || '最多上传{value}张图片';
|
||||
Prompt(temp_msg.replace('{value}', max_number));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3301,7 +3272,8 @@ $(function()
|
||||
// 是否限制数量
|
||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||
{
|
||||
Prompt('最多上传'+max_number+'个视频');
|
||||
var temp_msg = upload_video_max_tips || '最多上传{value}个视频';
|
||||
Prompt(temp_msg.replace('{value}', max_number));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3349,7 +3321,8 @@ $(function()
|
||||
// 是否限制数量
|
||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||
{
|
||||
Prompt('最多上传'+max_number+'个附件');
|
||||
var temp_msg = upload_annex_max_tips || '最多上传{value}个附件';
|
||||
Prompt(temp_msg.replace('{value}', max_number));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3376,14 +3349,14 @@ $(function()
|
||||
// 组件是否初始化
|
||||
if(typeof(upload_editor) != 'object')
|
||||
{
|
||||
Prompt('组件未初始化');
|
||||
Prompt(lang_assembly_not_init_tips || '组件未初始化');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 容器是否指定
|
||||
if(($(this).attr('data-view-tag') || null) == null)
|
||||
{
|
||||
Prompt('未指定容器');
|
||||
Prompt(lang_not_specified_container_tips || '未指定容器');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3411,14 +3384,14 @@ $(function()
|
||||
}
|
||||
if(dialog_type == null)
|
||||
{
|
||||
Prompt('未指定加载组建');
|
||||
Prompt(lang_not_specified_assembly_tips || '未指定加载组建');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 是否指定form名称
|
||||
if(($view_tag.attr('data-form-name') || null) == null)
|
||||
{
|
||||
Prompt('未指定表单name名称');
|
||||
Prompt(lang_not_specified_form_name_tips || '未指定表单name名称');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3480,7 +3453,7 @@ $(function()
|
||||
var url = $(this).data('url') || null;
|
||||
if(url == null)
|
||||
{
|
||||
Prompt('url未配置');
|
||||
Prompt(lang_operate_params_error || 'url未配置');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3502,7 +3475,7 @@ $(function()
|
||||
var lat = $(this).data('lat') || null;
|
||||
if(lng == null || lat == null)
|
||||
{
|
||||
Prompt('坐标有误');
|
||||
Prompt(lang_map_coordinate_tips || '坐标有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3532,7 +3505,7 @@ $(function()
|
||||
// 关闭窗口
|
||||
$(document).on('click', '.window-close-event', function()
|
||||
{
|
||||
if(confirm($(this).data('msg') || '您确定要关闭本页吗?'))
|
||||
if(confirm($(this).data('msg') || lang_window_close_confirm_tips || '您确定要关闭本页吗?'))
|
||||
{
|
||||
var user_agent = navigator.userAgent;
|
||||
if(user_agent.indexOf('Firefox') != -1 || user_agent.indexOf('Chrome') != -1)
|
||||
@ -3545,5 +3518,4 @@ $(function()
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
@ -19,6 +19,7 @@ var $layout_content_obj = null;
|
||||
var $page_parent_obj = null;
|
||||
var $base_show_style_value_obj = null;
|
||||
var $base_title_keywords_obj = null;
|
||||
var $layout = $('.layout-container');
|
||||
var $offcanvas_layout_config = $('#offcanvas-layout-config');
|
||||
var $offcanvas_config_images = $('#offcanvas-module-config-images');
|
||||
var $offcanvas_config_many_images = $('#offcanvas-module-config-many-images');
|
||||
@ -38,15 +39,11 @@ var $popup_goods_search = $('#popup-module-goods-search');
|
||||
var $popup_goods_category = $('#popup-module-goods-category');
|
||||
|
||||
// 布局模块类型信息
|
||||
var layout_module_type_arr = {
|
||||
"images": "单图",
|
||||
"many-images": "多图",
|
||||
"video": "视频",
|
||||
"goods": "商品",
|
||||
"title": "标题",
|
||||
"border": "辅助线",
|
||||
"height": "辅助空白"
|
||||
}
|
||||
var layout_module_type_arr = {};
|
||||
$('#renovation-tabs-module button').each(function(k, v)
|
||||
{
|
||||
layout_module_type_arr[$(this).data('value')] = $(this).text();
|
||||
});
|
||||
|
||||
/**
|
||||
* 模块拖拽初始化
|
||||
@ -84,12 +81,17 @@ function ModuleDragSortInit(event)
|
||||
function StructureDragHtmlCreate(value)
|
||||
{
|
||||
// 基础
|
||||
var switch_on = $layout.data('switch-on-text') || '开启';
|
||||
var switch_off = $layout.data('switch-off-text') || '关闭';
|
||||
var set_title = $layout.data('layout-set-title') || '布局设置';
|
||||
var del_title = $layout.data('layout-del-title') || '布局移除';
|
||||
var content_tips = $layout.data('layout-content-tips') || '模块内容区域';
|
||||
var html = '<div class="layout-view" data-value="'+value+'">';
|
||||
html += '<i class="layout-view-dragenter-icon am-icon-sort-asc am-icon-lg am-hide"></i>';
|
||||
html += '<div class="layout-content-submit drag-submit">';
|
||||
html += '<input type="checkbox" class="switch-checkbox" checked="true" data-size="xs" data-on-color="success" data-off-color="warning" data-off-text="关闭" data-on-text="开启" />';
|
||||
html += ' <button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-square-o layout-submit layout-submit-set"> 布局设置</button>';
|
||||
html += ' <button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-trash-o layout-submit layout-submit-del"> 布局移除</button>';
|
||||
html += '<input type="checkbox" class="switch-checkbox" checked="true" data-size="xs" data-on-color="success" data-off-color="warning" data-off-text="'+switch_off+'" data-on-text="'+switch_on+'" />';
|
||||
html += ' <button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-square-o layout-submit layout-submit-set"> '+set_title+'</button>';
|
||||
html += ' <button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-trash-o layout-submit layout-submit-del"> '+del_title+'</button>';
|
||||
html += '</div>';
|
||||
|
||||
// 容器设置
|
||||
@ -98,7 +100,7 @@ function StructureDragHtmlCreate(value)
|
||||
content_submit += '</div>';
|
||||
|
||||
// 默认内容提示信息
|
||||
var content_tips = '<div class="layout-content-tips">模块内容区域</div>';
|
||||
var content_tips = '<div class="layout-content-tips">'+content_tips+'</div>';
|
||||
|
||||
// 根据布局类型处理
|
||||
var arr = value.toString().split(':');
|
||||
@ -148,11 +150,12 @@ function RenovationModuleDragHtmlCreate(value)
|
||||
// 根据模块类型处理
|
||||
if((layout_module_type_arr[value] || null) == null)
|
||||
{
|
||||
Prompt('模块未定义['+value+']');
|
||||
Prompt(($layout.data('module-not-exist-tips') || '模块未定义')+'['+value+']');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 基础
|
||||
var config_first_tips = $layout.data('config-first-tips') || '请配置';
|
||||
var index = parseInt(Math.random()*1000001);
|
||||
var doc = 'module-content-index-'+value+'-'+index;
|
||||
var html = '<div class="module-view">';
|
||||
@ -162,7 +165,7 @@ function RenovationModuleDragHtmlCreate(value)
|
||||
html += ' <button type="button" class="am-btn am-btn-danger am-radius am-btn-xs am-icon-trash-o layout-submit module-view-submit-del"></button>';
|
||||
html += '</div>';
|
||||
html += '<div class="module-content module-content-type-'+value+' '+doc+'">';
|
||||
html += '<div class="am-text-center am-padding-vertical-sm am-text-primary">请配置'+layout_module_type_arr[value]+'</div>';
|
||||
html += '<div class="am-text-center am-padding-vertical-sm am-text-primary">'+config_first_tips+layout_module_type_arr[value]+'</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
return html;
|
||||
@ -179,7 +182,7 @@ function RenovationModuleDragHtmlCreate(value)
|
||||
*/
|
||||
function ModuleToPrompt(to_name)
|
||||
{
|
||||
Prompt(to_name || '未设置链接地址', 'warning');
|
||||
Prompt(to_name || ($layout.data('url-not-set-tips') || '未设置链接地址'), 'warning');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -464,14 +467,14 @@ function FormBackModuleConfigImagesHandle(data)
|
||||
var doc = $offcanvas_config_images.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 图片必须
|
||||
if((data.content_images || null) == null)
|
||||
{
|
||||
Prompt('请上传图片');
|
||||
Prompt($layout.data('upload-images-tips') || '请上传图片');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -514,7 +517,7 @@ function FormBackModuleConfigManyImagesHandle(data)
|
||||
var doc = $offcanvas_config_many_images.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -557,14 +560,14 @@ function FormBackModuleConfigManyImagesHandle(data)
|
||||
}
|
||||
if(data_list.length <= 0)
|
||||
{
|
||||
Prompt('请先添加图片并配置');
|
||||
Prompt($layout.data('config-images-tips') || '请先添加图片并配置');
|
||||
return false;
|
||||
}
|
||||
for(var i in data_list)
|
||||
{
|
||||
if((data_list[i]['images'] || null) == null)
|
||||
{
|
||||
Prompt('请上传图片');
|
||||
Prompt($layout.data('upload-images-tips') || '请上传图片');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -713,14 +716,14 @@ function FormBackModuleConfigVideoHandle(data)
|
||||
var doc = $offcanvas_config_video.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 视频
|
||||
if((data.content_video || null) == null)
|
||||
{
|
||||
Prompt('请上传视频');
|
||||
Prompt($layout.data('upload-video-tips') || '请上传视频');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -763,7 +766,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
var doc = $offcanvas_config_goods.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -776,7 +779,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
case 'goods' :
|
||||
if((data.goods_ids || null) == null)
|
||||
{
|
||||
Prompt('请选择商品');
|
||||
Prompt($layout.data('choice-goods-tips') || '请选择商品');
|
||||
return false;
|
||||
}
|
||||
goods_ids = data.goods_ids;
|
||||
@ -786,7 +789,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
case 'category' :
|
||||
if((data.goods_category_value || null) == null)
|
||||
{
|
||||
Prompt('请选择商品分类');
|
||||
Prompt($layout.data('choice-goods-category-tips') || '请选择商品分类');
|
||||
return false;
|
||||
}
|
||||
var category = JSON.parse(decodeURIComponent(data.goods_category_value)) || null;
|
||||
@ -794,7 +797,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
break;
|
||||
|
||||
default :
|
||||
Prompt('数据类型有误['+data.goods_data_type+']');
|
||||
Prompt(($layout.data('data-type-tips') || '数据类型有误')+'['+data.goods_data_type+']');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -948,7 +951,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
// 关闭商品窗口
|
||||
$offcanvas_config_goods.offCanvas('close');
|
||||
} else {
|
||||
Prompt('商品信息为空');
|
||||
Prompt($layout.data('goods-data-empty-tips') || '商品信息为空');
|
||||
}
|
||||
} else {
|
||||
Prompt(res.msg);
|
||||
@ -957,7 +960,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
@ -978,14 +981,14 @@ function FormBackModuleConfigTitleHandle(data)
|
||||
var doc = $offcanvas_config_title.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 视频
|
||||
if((data.content_title || null) == null)
|
||||
{
|
||||
Prompt('请填写主标题');
|
||||
Prompt($layout.data('main-title-tips') || '请填写主标题');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1081,19 +1084,19 @@ function FormBackModuleConfigBorderHandle(data)
|
||||
var doc = $offcanvas_config_border.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 边线类型、和大小
|
||||
if((data.style_border_style || null) == null)
|
||||
{
|
||||
Prompt('请选择边线类型');
|
||||
Prompt($layout.data('border-style-tips') || '请选择边线类型');
|
||||
return false;
|
||||
}
|
||||
if((data.style_border_width || null) == null)
|
||||
{
|
||||
Prompt('请输入边线、最大10的数字');
|
||||
Prompt($layout.data('border-style-max-tips') || '请输入边线、最大10的数字');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1130,14 +1133,14 @@ function FormBackModuleConfigHeightHandle(data)
|
||||
var doc = $offcanvas_config_height.attr('data-doc') || null;
|
||||
if(doc == null)
|
||||
{
|
||||
Prompt('模块标记有误');
|
||||
Prompt($layout.data('module-tab-tips') || '模块标记有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 高度
|
||||
if((data.style_height || null) == null)
|
||||
{
|
||||
Prompt('请输入高度、最大100的数字');
|
||||
Prompt($layout.data('height-max-tips') || '请输入高度、最大100的数字');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1207,7 +1210,7 @@ function FormBackModuleModalTitleKeywordsHandle(data)
|
||||
if((data.content_keywords || null) == null)
|
||||
{
|
||||
$modal_title_keywords.find('input[name="content_keywords"]').focus();
|
||||
Prompt('请填写关键字');
|
||||
Prompt($layout.data('keywords-tips') || '请填写关键字');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1259,7 +1262,7 @@ function FormBackModulePopupGoodsSearchHandle(data)
|
||||
}
|
||||
if(json == null)
|
||||
{
|
||||
Prompt('请先选择商品分类');
|
||||
Prompt($layout.data('before-choice-goods-category-tips') || '请先选择商品分类');
|
||||
return false;
|
||||
}
|
||||
params['value'] = json;
|
||||
@ -1270,7 +1273,7 @@ function FormBackModulePopupGoodsSearchHandle(data)
|
||||
var $vbs = $vb.find('ul li.active a');
|
||||
if($vbs.length <= 0)
|
||||
{
|
||||
Prompt('请先选择品牌');
|
||||
Prompt($layout.data('before-choice-brand-tips') || '请先选择品牌');
|
||||
return false;
|
||||
}
|
||||
params['value'] = {
|
||||
@ -1285,7 +1288,7 @@ function FormBackModulePopupGoodsSearchHandle(data)
|
||||
if(value == '')
|
||||
{
|
||||
$vb.find('input').focus();
|
||||
Prompt('请先输入关键字1~30个字符');
|
||||
Prompt($layout.data('before-input-keywords-tips') || '请先输入关键字1~30个字符');
|
||||
return false;
|
||||
}
|
||||
// 输入关键字去除引号
|
||||
@ -1315,7 +1318,7 @@ function ModuleConfigImagesToContentHtml(name)
|
||||
// 无数据
|
||||
if((name || null) == null)
|
||||
{
|
||||
return '<a href="javascript:;" class="form-view-choice-container-submit">请选择跳转链接</a>';
|
||||
return '<a href="javascript:;" class="form-view-choice-container-submit">'+($layout.data('choice-url-tips') || '请选择跳转链接')+'</a>';
|
||||
}
|
||||
|
||||
// 有数据
|
||||
@ -1323,7 +1326,7 @@ function ModuleConfigImagesToContentHtml(name)
|
||||
html += '<span class="am-text-truncate">'+name+'</span>';
|
||||
html += '<i class="am-icon-close am-margin-left-xs"></i>';
|
||||
html += '</span>';
|
||||
html += '<a href="javascript:;" class="form-view-choice-container-submit am-margin-left-sm">修改</a>';
|
||||
html += '<a href="javascript:;" class="form-view-choice-container-submit am-margin-left-sm">'+($layout.data('edit-name') || '修改')+'</a>';
|
||||
return html;
|
||||
}
|
||||
|
||||
@ -1341,7 +1344,7 @@ function ModuleConfigGoodsCategoryContentHtml(name)
|
||||
// 无数据
|
||||
if((name || null) == null)
|
||||
{
|
||||
return '<a href="javascript:;" class="form-view-choice-container-submit">请选择商品分类</a>';
|
||||
return '<a href="javascript:;" class="form-view-choice-container-submit">'+($layout.data('choice-goods-category-tips') || '请选择商品分类')+'</a>';
|
||||
}
|
||||
|
||||
// 设置数据
|
||||
@ -1349,7 +1352,7 @@ function ModuleConfigGoodsCategoryContentHtml(name)
|
||||
html += '<span class="am-text-truncate">'+name+'</span>';
|
||||
html += '<i class="am-icon-close am-margin-left-xs"></i>';
|
||||
html += '</span>';
|
||||
html += '<a href="javascript:;" class="form-view-choice-container-submit am-margin-left-sm">修改</a>';
|
||||
html += '<a href="javascript:;" class="form-view-choice-container-submit am-margin-left-sm">'+($layout.data('edit-name') || '修改')+'</a>';
|
||||
return html;
|
||||
}
|
||||
|
||||
@ -1400,11 +1403,11 @@ function ModuleConfigManyImagesItemContentHtml(images, type, name, value)
|
||||
html += '<div class="am-form-group am-form-file am-form-group-refreshing">';
|
||||
html += '<ul class="plug-file-upload-view module-slider-type-images-view module-slider-type-images-view-'+index+'" data-form-name="content_images_'+index+'" data-max-number="1" data-delete="0" data-dialog-type="images">';
|
||||
html += '<li>';
|
||||
html += '<input type="text" name="content_images_'+index+'" data-validation-message="请上传图片" value="'+(images || '')+'" required />';
|
||||
html += '<input type="text" name="content_images_'+index+'" data-validation-message="'+($layout.data('upload-images-tips') || '请上传图片')+'" value="'+(images || '')+'" required />';
|
||||
html += '<img src="'+(images || $offcanvas_config_many_images.data('default-images'))+'" />';
|
||||
html += '</li>';
|
||||
html += '</ul>';
|
||||
html += '<div class="plug-file-upload-submit" data-view-tag="ul.module-slider-type-images-view-'+index+'">+上传图片</div>';
|
||||
html += '<div class="plug-file-upload-submit" data-view-tag="ul.module-slider-type-images-view-'+index+'">+'+($layout.data('upload-images-name') || '上传图片')+'</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="am-form-group am-form-group-refreshing">';
|
||||
html += '<div class="form-view-choice-container am-margin-top-xs" data-key="'+index+'">';
|
||||
@ -1508,17 +1511,17 @@ function ModuleConfigGoodsSearchPageShowName(data)
|
||||
{
|
||||
// 商品分类
|
||||
case 'category' :
|
||||
name = '商品分类-'+value[value.length-1]['name'];
|
||||
name = ($layout.data('goods-category-name') || '商品分类')+'-'+value[value.length-1]['name'];
|
||||
break;
|
||||
|
||||
// 品牌
|
||||
case 'brand' :
|
||||
name = '品牌-'+value['name'];
|
||||
name = ($layout.data('brand-name') || '品牌')+'-'+value['name'];
|
||||
break;
|
||||
|
||||
// 关键字
|
||||
case 'keywords' :
|
||||
name = '关键字-'+value;
|
||||
name = ($layout.data('keywords-name') || '关键字')+'-'+value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1809,7 +1812,7 @@ function LayoutSwitchInit()
|
||||
$(function()
|
||||
{
|
||||
// 布局拖拽
|
||||
$('.layout-container').dragsort({
|
||||
$layout.dragsort({
|
||||
dragSelector: '.drag-submit',
|
||||
placeHolderTemplate: '<div class="drag-sort-dotted"></div>'
|
||||
});
|
||||
@ -1875,7 +1878,7 @@ $(function()
|
||||
|
||||
// 容器设置弹出框提示初始化
|
||||
$('.layout-content-submit-set').popover({
|
||||
content: '容器设置',
|
||||
content: $layout.data('layout-content-set-tips') || '容器设置',
|
||||
trigger: 'hover focus',
|
||||
theme: 'sm'
|
||||
});
|
||||
@ -1943,8 +1946,8 @@ $(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
AMUI.dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '移除后不可恢复、确定继续吗?',
|
||||
title: $layout.data('layout-reminder-title') || '温馨提示',
|
||||
content: $layout.data('layout-reminder-msg') || '移除后不可恢复、确定继续吗?',
|
||||
onConfirm: function(e)
|
||||
{
|
||||
// 移除布局
|
||||
@ -1953,7 +1956,7 @@ $(function()
|
||||
// 无布局则添加提示信息
|
||||
if($('.layout-container .layout-view').length <= 0)
|
||||
{
|
||||
$('.layout-container').html('<div class="layout-container-tips">布局拖放到该区域松开鼠标即可</div>');
|
||||
$layout.html('<div class="layout-container-tips">'+($layout.data('layout-container-tips') || '布局拖放到该区域松开鼠标即可')+'</div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -2050,17 +2053,17 @@ $(function()
|
||||
|
||||
// 模块弹出框提示初始化
|
||||
$('.module-view-submit-drag').popover({
|
||||
content: '拖拽排序',
|
||||
content: $layout.data('module-drag-title') || '拖拽排序',
|
||||
trigger: 'hover focus',
|
||||
theme: 'sm'
|
||||
});
|
||||
$('.module-view-submit-set').popover({
|
||||
content: '模块设置',
|
||||
content: $layout.data('module-set-title') || '模块设置',
|
||||
trigger: 'hover focus',
|
||||
theme: 'sm'
|
||||
});
|
||||
$('.module-view-submit-del').popover({
|
||||
content: '模块移除',
|
||||
content: $layout.data('module-del-title') || '模块移除',
|
||||
trigger: 'hover focus',
|
||||
theme: 'sm'
|
||||
});
|
||||
@ -2078,8 +2081,8 @@ $(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
AMUI.dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '移除后不可恢复、确定继续吗?',
|
||||
title: $layout.data('layout-reminder-title') || '温馨提示',
|
||||
content: $layout.data('layout-reminder-msg') || '移除后不可恢复、确定继续吗?',
|
||||
onConfirm: function(e)
|
||||
{
|
||||
// 模块容器
|
||||
@ -2091,7 +2094,7 @@ $(function()
|
||||
// 无模块则添加提示信息
|
||||
if($module_view.find('.module-view').length <= 0)
|
||||
{
|
||||
$module_view.html('<div class="layout-content-tips">模块内容区域</div>');
|
||||
$module_view.html('<div class="layout-content-tips">'+($layout.data('layout-content-tips') || '模块内容区域')+'</div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -2107,7 +2110,7 @@ $(function()
|
||||
var doc = $parent.data('doc') || null;
|
||||
if(value == null || index == null || doc == null)
|
||||
{
|
||||
Prompt('模块属性有误');
|
||||
Prompt($layout.data('module-attr-tips') || '模块属性有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2159,7 +2162,7 @@ $(function()
|
||||
// 图片处理
|
||||
var default_images = $config.data('default-images');
|
||||
var html = '<li>';
|
||||
html += '<input type="text" name="content_images" value="'+(json.content_images || '')+'" data-validation-message="请上传图片" value="" required />';
|
||||
html += '<input type="text" name="content_images" value="'+(json.content_images || '')+'" data-validation-message="'+($layout.data('upload-images-tips') || '请上传图片')+'" value="" required />';
|
||||
html += '<img src="'+(json.content_images || default_images)+'" />';
|
||||
html += '</li>';
|
||||
$config.find('ul.module-images-type-images-view').html(html);
|
||||
@ -2227,7 +2230,7 @@ $(function()
|
||||
|
||||
// 未定义
|
||||
default :
|
||||
console.info('模块组件未定义['+goods_data_type+']')
|
||||
console.info(($layout.data('module-assembly-not-exist-tips') || '模块组件未定义')+'['+goods_data_type+']')
|
||||
}
|
||||
|
||||
// tab处理
|
||||
@ -2321,7 +2324,7 @@ $(function()
|
||||
var json = $(this).attr('data-json') || null;
|
||||
if(value == null || name == null)
|
||||
{
|
||||
Prompt('参数值有误');
|
||||
Prompt($layout.data('params-tips') || '参数值有误');
|
||||
return false;
|
||||
}
|
||||
if(json != null)
|
||||
@ -2335,7 +2338,7 @@ $(function()
|
||||
// 单一商品
|
||||
case 'goods' :
|
||||
// 初始化搜索数据
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> 请搜索商品</div>');
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+($layout.data('search-goods-tips') || '请搜索商品')+'</div>');
|
||||
$('.goods-page-container').html(PageLibrary());
|
||||
|
||||
// 弹窗数据设置并打开
|
||||
@ -2428,7 +2431,7 @@ $(function()
|
||||
if(index == 2)
|
||||
{
|
||||
var to_type = 'pages-custom-url';
|
||||
var to_name = '自定义链接';
|
||||
var to_name = $layout.data('custom-url-name') || '自定义链接';
|
||||
var to_value = GetFormVal('.pages-custom-url-container', true);
|
||||
var count = 0;
|
||||
for(var i in to_value)
|
||||
@ -2440,7 +2443,7 @@ $(function()
|
||||
}
|
||||
if(count >= Object.keys(to_value).length)
|
||||
{
|
||||
Prompt('请至少填写一个地址');
|
||||
Prompt($layout.data('custom-url-tips') || '请至少填写一个地址');
|
||||
return false;
|
||||
}
|
||||
to_value = encodeURIComponent(JSON.stringify(to_value));
|
||||
@ -2456,7 +2459,7 @@ $(function()
|
||||
}
|
||||
if(to_type == '' || to_name == '')
|
||||
{
|
||||
Prompt('请先选择页面');
|
||||
Prompt($layout.data('before-choice-page-tips') || '请先选择页面');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2467,14 +2470,14 @@ $(function()
|
||||
case 'goods' :
|
||||
if(json == null)
|
||||
{
|
||||
Prompt('请选择商品');
|
||||
Prompt($layout.data('choice-goods-tips') || '请选择商品');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 选择位置是否存在
|
||||
if($page_parent_obj == null)
|
||||
{
|
||||
Prompt('请先选择链接位置');
|
||||
Prompt($layout.data('before-choice-url-position-tips') || '请先选择链接位置');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2486,7 +2489,7 @@ $(function()
|
||||
case 'goods_search' :
|
||||
if(json == null)
|
||||
{
|
||||
Prompt('请先配置商品搜索');
|
||||
Prompt($layout.data('before-config-goods-search-tips') || '请先配置商品搜索');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2516,7 +2519,7 @@ $(function()
|
||||
// 商品
|
||||
case 'goods' :
|
||||
// 初始化搜索数据
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> 请搜索商品</div>');
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+($layout.data('search-goods-tips') || '请搜索商品')+'</div>');
|
||||
$('.goods-page-container').html(PageLibrary());
|
||||
|
||||
// 弹窗数据设置并打开
|
||||
@ -2563,7 +2566,7 @@ $(function()
|
||||
break;
|
||||
|
||||
default :
|
||||
Prompt('类型事件未定义['+value+']')
|
||||
Prompt(($layout.data('type-event-not-exist-tips') || '类型事件未定义')+'['+value+']')
|
||||
}
|
||||
});
|
||||
|
||||
@ -2602,7 +2605,7 @@ $(function()
|
||||
}
|
||||
if(json == null)
|
||||
{
|
||||
Prompt('请先选择商品分类');
|
||||
Prompt($layout.data('before-choice-goods-category-tips') || '请先选择商品分类');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2619,7 +2622,7 @@ $(function()
|
||||
$offcanvas_config_goods.on('click', '.offcanvas-config-goods-category-container .form-view-choice-container-active i.am-icon-close', function()
|
||||
{
|
||||
var $parent = $(this).parents('.form-view-choice-container-content');
|
||||
$parent.html('<a href="javascript:;" class="form-view-choice-container-submit">请选择商品分类</a>');
|
||||
$parent.html('<a href="javascript:;" class="form-view-choice-container-submit">'+($layout.data('choice-goods-category-tips') || '请选择商品分类')+'</a>');
|
||||
$parent.parent().find('input[name="goods_category_value"]').val('');
|
||||
return false;
|
||||
});
|
||||
@ -2677,7 +2680,7 @@ $(function()
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
@ -2741,7 +2744,7 @@ $(function()
|
||||
var goods_ids = $popup_goods_select.attr('data-goods-ids') || null;
|
||||
if(goods_ids == null)
|
||||
{
|
||||
Prompt('请先选择商品');
|
||||
Prompt($layout.data('before-choice-goods-tips') || '请先选择商品');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2793,7 +2796,7 @@ $(function()
|
||||
// 清空选择的商品id
|
||||
$popup_goods_select.attr('data-goods-ids', '');
|
||||
} else {
|
||||
Prompt('商品信息为空');
|
||||
Prompt($layout.data('goods-data-empty-tips') || '商品信息为空');
|
||||
}
|
||||
} else {
|
||||
Prompt(res.msg);
|
||||
@ -2802,7 +2805,7 @@ $(function()
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
@ -2827,10 +2830,10 @@ $(function()
|
||||
$(this).parent().addClass('active').siblings().removeClass('active');
|
||||
|
||||
// 分类数据
|
||||
var data = $(this).data('json') || null;
|
||||
var data = $(this).find('span.data-json').text() || null;
|
||||
if(data != null)
|
||||
{
|
||||
data = JSON.parse(decodeURIComponent(data)) || null;
|
||||
data = JSON.parse(data) || null;
|
||||
}
|
||||
|
||||
// 参数
|
||||
@ -2843,8 +2846,10 @@ $(function()
|
||||
var html = '';
|
||||
for(var i in data)
|
||||
{
|
||||
var json = (data[i]['items'] || null) == null ? '' : encodeURIComponent(JSON.stringify(data[i]['items']));
|
||||
html += '<li><a href="javascript:;" data-json="'+json+'" data-value="'+data[i]['id']+'"><span>'+data[i]['name']+'</span>';
|
||||
var json = (data[i]['items'] || null) == null ? '' : JSON.stringify(data[i]['items']);
|
||||
html += '<li><a href="javascript:;" data-value="'+data[i]['id']+'">';
|
||||
html += '<span class="data-name">'+data[i]['name']+'</span>';
|
||||
html += '<span class="data-json am-hide">'+json+'</span>';
|
||||
if((data[i]['items'] || null) != null)
|
||||
{
|
||||
html += '<i class="am-icon-angle-double-right am-fr"></i>';
|
||||
@ -2877,7 +2882,7 @@ $(function()
|
||||
{
|
||||
text += ' > ';
|
||||
}
|
||||
var name = $(this).find('a span').text();
|
||||
var name = $(this).find('a span.data-name').text();
|
||||
value.push({"id":$(this).find('a').data('value'), "name":name});
|
||||
text += name;
|
||||
});
|
||||
@ -3058,7 +3063,7 @@ $(function()
|
||||
error:function(xhr, type)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || '异常错误';
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
// 问答表单初始化
|
||||
FromInit('form.form-validation-plugins-answer-ask');
|
||||
});
|
@ -99,7 +99,7 @@ $(function()
|
||||
var address_id = parseInt($('form.nav-buy input[name="address_id"]').val());
|
||||
if(address_id == -1)
|
||||
{
|
||||
Prompt('请选择地址');
|
||||
Prompt(lang_address_choice_tips || '请选择地址');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ $(function()
|
||||
var payment_id = parseInt($('form.nav-buy input[name="payment_id"]').val()) || 0;
|
||||
if(payment_id === 0)
|
||||
{
|
||||
Prompt('请选择支付');
|
||||
Prompt(lang_payment_choice_tips || '请选择支付');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -114,7 +114,7 @@ $(function()
|
||||
if(max > 0 && temp_stock > max)
|
||||
{
|
||||
$input.val(max);
|
||||
Prompt('最大限购数量'+max+unit);
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@ -122,7 +122,7 @@ $(function()
|
||||
if(temp_stock < min)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt('最低起购数量'+min+unit);
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -160,10 +160,10 @@ $(function()
|
||||
{
|
||||
if($(this).find('input').is(':checked'))
|
||||
{
|
||||
$(this).find('span.el-text').text('反选');
|
||||
$(this).find('span.el-text').text(lang_select_reverse_name || '反选');
|
||||
$('.am-table').find('input[type="checkbox"]').not(':disabled').uCheck('check');
|
||||
} else {
|
||||
$(this).find('span.el-text').text('全选');
|
||||
$(this).find('span.el-text').text(lang_select_all_name || '全选');
|
||||
$('.am-table').find('input[type="checkbox"]').not(':disabled').uCheck('uncheck');
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ $(function()
|
||||
var ids = $(this).parents('form').find('input[name="ids"]').val() || 0;
|
||||
if(ids == 0)
|
||||
{
|
||||
Prompt('请选择商品');
|
||||
Prompt(lang_goods_no_choice_tips || '请选择商品');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -5,10 +5,10 @@ console.log("\u6280\u672f\u652f\u6301\uff1a\u0068\u0074\u0074\u0070\u003a\u002f\
|
||||
var store = $.AMUI.store;
|
||||
if(!store.enabled)
|
||||
{
|
||||
alert('您的浏览器不支持本地存储。请禁用“专用模式”,或升级到现代浏览器。');
|
||||
alert(lang_store_enabled_tips || '您的浏览器不支持本地存储。请禁用“专用模式”,或升级到现代浏览器。');
|
||||
} else {
|
||||
// 选择缓存key
|
||||
var store_user_menu_key = 'store-user-menu-active-key';
|
||||
// 选择缓存key
|
||||
var store_user_menu_key = 'store-user-menu-active-key';
|
||||
}
|
||||
|
||||
// 购物车数量更新
|
||||
@ -17,12 +17,12 @@ function HomeCartNumberTotalUpdate(number)
|
||||
var $this = $('.common-cart-total');
|
||||
if(number <= 0)
|
||||
{
|
||||
$this.text(0);
|
||||
$('.mobile-navigation .common-cart-total').text('');
|
||||
$this.removeClass('am-badge am-badge-danger');
|
||||
$this.text(0);
|
||||
$('.mobile-navigation .common-cart-total').text('');
|
||||
$this.removeClass('am-badge am-badge-danger');
|
||||
} else {
|
||||
$this.text(number);
|
||||
$this.addClass('am-badge am-badge-danger');
|
||||
$this.text(number);
|
||||
$this.addClass('am-badge am-badge-danger');
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,5 +247,4 @@ $(function()
|
||||
{
|
||||
FromInit('form.form-validation-user-avatar');
|
||||
}
|
||||
|
||||
});
|
@ -31,7 +31,7 @@ function GoodsCommentsHtml(page)
|
||||
if((page || 1) <= 1)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
$('.goods-page-no-data span').text('加载中...');
|
||||
$('.goods-page-no-data span').text(lang_loading_tips || '加载中...');
|
||||
} else {
|
||||
$('.goods-page-no-data').addClass('none');
|
||||
}
|
||||
@ -54,13 +54,13 @@ function GoodsCommentsHtml(page)
|
||||
if($('.goods-comment-content article').length <= 0)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
$('.goods-page-no-data span').text('没有评论数据');
|
||||
$('.goods-page-no-data span').text(lang_comment_no_data_tips || '没有评论数据');
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
$('.goods-page-no-data span').text(xhr.responseText || '请求出现错误,请稍后再试!');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -111,17 +111,17 @@ function BuyCartCheck(e)
|
||||
var unit = $('.stock-tips .stock').data('unit') || '';
|
||||
if(stock < min)
|
||||
{
|
||||
Prompt('最低起购数量'+min+unit);
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
if(max > 0 && stock > max)
|
||||
{
|
||||
Prompt('最大限购数量'+max+unit);
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
if(stock > inventory)
|
||||
{
|
||||
Prompt('库存数量'+inventory+unit);
|
||||
Prompt((lang_goods_inventory_number_tips || '库存数量')+inventory+unit);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ function BuyCartCheck(e)
|
||||
$(this).addClass('sku-not-active');
|
||||
}
|
||||
});
|
||||
Prompt('请选择规格');
|
||||
Prompt(lang_goods_no_choice_spec_tips || '请选择规格');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ function BuyCartHandle(e)
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt('操作参数配置有误');
|
||||
Prompt(lang_operate_params_error || '操作参数配置有误');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -296,7 +296,7 @@ function GoodsSpecDetail()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -377,7 +377,7 @@ function GoodsSpecType()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -464,7 +464,7 @@ function GoodsNumberChange()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -656,7 +656,7 @@ $(function() {
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
PoptitClose();
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -734,13 +734,13 @@ $(function() {
|
||||
if(max > 0 && stock > max)
|
||||
{
|
||||
$input.val(max);
|
||||
Prompt('最大限购数量'+max+unit);
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
if(stock > inventory)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt('库存数量'+inventory+unit);
|
||||
Prompt((lang_goods_inventory_number_tips || '库存数量')+inventory+unit);
|
||||
return false;
|
||||
}
|
||||
$input.val(stock);
|
||||
@ -755,7 +755,7 @@ $(function() {
|
||||
if(value < min)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt('最低起购数量'+min+unit);
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
$input.val(value);
|
||||
|
@ -47,13 +47,13 @@ $(function()
|
||||
var ids = $('form.pay-form input[name=ids]').val() || null;
|
||||
if(ids == null)
|
||||
{
|
||||
Prompt('订单id有误');
|
||||
Prompt(lang_order_id_empty || '订单id有误');
|
||||
return false;
|
||||
}
|
||||
var payment_id = $('form.pay-form input[name=payment_id]').val() || 0;
|
||||
if(payment_id == 0)
|
||||
{
|
||||
Prompt('请选择支付方式');
|
||||
Prompt(lang_payment_choice_tips || '请选择支付方式');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -65,12 +65,12 @@ $(function()
|
||||
{
|
||||
$(this).parent().find('li i').removeClass('am-icon-star').addClass('am-icon-star-o');
|
||||
var index = $(this).index();
|
||||
var rating_msg = ['非常差', '差', '一般', '好', '非常好'];
|
||||
var rating_arr = (lang_rating_string || '非常差,差,一般,好,非常好').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_msg[index]);
|
||||
$(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');
|
||||
});
|
||||
@ -98,7 +98,7 @@ $(function()
|
||||
var values = FromTableCheckedValues('order_form_checkbox_value', '.am-table-scrollable-horizontal');
|
||||
if(values.length <= 0)
|
||||
{
|
||||
Prompt('请先选中数据');
|
||||
Prompt(lang_not_choice_data_tips || '请先选中数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ $(function()
|
||||
var url = $(this).data('url') || null;
|
||||
if(url == null)
|
||||
{
|
||||
Prompt('支付url地址有误');
|
||||
Prompt(lang_pay_url_empty_tips || '支付url地址有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ $(function()
|
||||
$form_panel.find('select[name="reason"]').html(html);
|
||||
} else {
|
||||
$form_panel.find('select[name="reason"]').html('');
|
||||
Prompt('退款原因数据为空');
|
||||
Prompt(lang_refund_reason_empty_tips || '退款原因数据为空');
|
||||
}
|
||||
$form_panel.find('.chosen-select').val('').trigger('chosen:updated');
|
||||
});
|
||||
|
@ -34,7 +34,7 @@ $(function()
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
|
@ -82,14 +82,14 @@ $(function()
|
||||
Prompt(result.msg);
|
||||
}
|
||||
},
|
||||
error: function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$this.button('reset');
|
||||
if(is_win == 1)
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt('网络错误');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -176,14 +176,14 @@ $(function()
|
||||
Prompt(result.msg);
|
||||
}
|
||||
},
|
||||
error: function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$this.button('reset');
|
||||
if(is_win == 1)
|
||||
{
|
||||
$('.verify-submit-win-new').button('reset');
|
||||
}
|
||||
Prompt('网络错误');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -125,7 +125,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || '异常错误', null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user