mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-06-06 03:56:57 +08:00
v6.1.0
This commit is contained in:
@ -10,14 +10,14 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 系统版本
|
||||
define('APPLICATION_VERSION', 'v6.0.0');
|
||||
define('APPLICATION_VERSION', 'v6.1.0');
|
||||
|
||||
// 检测PHP环境
|
||||
if(version_compare(PHP_VERSION,'7.4.0','<'))
|
||||
if(version_compare(PHP_VERSION, '8.0.0','<'))
|
||||
{
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
header('Content-Type:text/html;charset=utf-8');
|
||||
die('<div style="margin-top:15%;text-align:center;font-size:16px;padding:0 10px;"><p><a href="https://shopxo.net/" target="_blank" title="ShopXO电商系统" style="font-size:36px;font-weight:bold;text-decoration:none;"><span style="color:#026ed9;">Shop</span><span style="color:#e6000e;">XO</span></a> <span style="color:#888;">'.APPLICATION_VERSION.'</span></p><p style="color:#f00;margin-top:10px;">需要PHP版本最低 v7.4.0,当前PHP版本 v'.PHP_VERSION.'</p></div>');
|
||||
die('<div style="margin-top:15%;text-align:center;font-size:16px;padding:0 10px;"><p><a href="https://shopxo.net/" target="_blank" title="ShopXO电商系统" style="font-size:36px;font-weight:bold;text-decoration:none;"><span style="color:#026ed9;">Shop</span><span style="color:#f00;">XO</span></a> <span style="color:#888;">'.APPLICATION_VERSION.'</span></p><p style="color:#f00;margin-top:10px;">需要PHP版本最低 v8.0.0,当前PHP版本 v'.PHP_VERSION.'</p></div>');
|
||||
}
|
||||
|
||||
// 定义系统目录分隔符
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 66 KiB |
@ -888,6 +888,7 @@ span.business-operations-submit {
|
||||
.submit-modal,
|
||||
.text-copy-submit,
|
||||
.common-goods-favor-submit-event,
|
||||
.common-annex-view-event,
|
||||
.common-scan-submit,
|
||||
.am-cursor-pointer {
|
||||
cursor: pointer;
|
||||
|
||||
@ -1546,7 +1546,7 @@ function UrlFieldReplace (field, value, url = null, anchor = null) {
|
||||
if (url.indexOf('?') >= 0) {
|
||||
var str = url.substr(0, url.lastIndexOf('.' + __seo_url_suffix__));
|
||||
var ext = url.substr(url.lastIndexOf('.' + __seo_url_suffix__));
|
||||
if (str.indexOf(field) >= 0) {
|
||||
if (str.indexOf(field+'/') >= 0) {
|
||||
var first = str.substr(0, str.lastIndexOf(field));
|
||||
var last = str.substr(str.lastIndexOf(field));
|
||||
last = last.replace(new RegExp(field + '/', 'g'), '');
|
||||
@ -1600,8 +1600,26 @@ function UrlFieldReplace (field, value, url = null, anchor = null) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (value !== null) {
|
||||
url += '?' + field + '=' + value;
|
||||
if(url.indexOf(field+'/') != -1)
|
||||
{
|
||||
var str = url.substr(0, url.lastIndexOf('.' + __seo_url_suffix__));
|
||||
var ext = url.substr(url.lastIndexOf('.' + __seo_url_suffix__));
|
||||
var first = str.substr(0, str.lastIndexOf(field));
|
||||
var last = str.substr(str.lastIndexOf(field));
|
||||
last = last.replace(new RegExp(field + '/', 'g'), '');
|
||||
last = (last.indexOf('/') >= 0) ? last.substr(last.indexOf('/')) : '';
|
||||
if (value === null) {
|
||||
if (first.substr(-1) == '/') {
|
||||
first = first.substr(0, first.length - 1);
|
||||
}
|
||||
url = first + last + ext;
|
||||
} else {
|
||||
url = first + field + '/' + value + last + ext;
|
||||
}
|
||||
} else {
|
||||
if (value !== null) {
|
||||
url += '?' + field + '=' + value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3722,7 +3740,42 @@ function VoiceNotice (mp3) {
|
||||
$('body').append('<audio class="common-voice-container" src="' + mp3 + '" controls autoplay></audio>');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 附件预览
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2024-04-19
|
||||
* @desc description
|
||||
* @param {[string]} type [文件类型(video 视频, images 默认图片)]
|
||||
* @param {[string]} value [附件地址]
|
||||
*/
|
||||
function AnnexView(type, value) {
|
||||
if((value || null) != null) {
|
||||
var title = null;
|
||||
var html = null;
|
||||
var style = 'max-width:100%; max-height:calc(80vh - 4.5rem); margin: 0 auto;';
|
||||
switch (type) {
|
||||
case 'video':
|
||||
title = window['lang_video_preview_title'] || '视频预览';
|
||||
html = '<video src="' + value + '" style="' + style + '" controls autoplay>your browser does not support the video tag</video>';
|
||||
break;
|
||||
default:
|
||||
title = window['lang_images_preview_title'] || '图片预览';
|
||||
html = '<img src="' + value + '" class="am-block" style="' + style + '" />';
|
||||
}
|
||||
if (html != null) {
|
||||
AMUI.dialog.alert({
|
||||
title: title,
|
||||
isClose: true,
|
||||
config: {},
|
||||
style: 'max-width: 80%; max-height: 80%; left: auto; min-width: 12rem;',
|
||||
content_style: 'padding: 0; border-bottom: 0;',
|
||||
content: html,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4875,43 +4928,24 @@ $(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
// 文件预览
|
||||
// 上传文件组件预览
|
||||
$(document).on('click', '.plug-file-upload-view li', function () {
|
||||
if ($(this).find('i.icon-eye').length > 0) {
|
||||
// 容器
|
||||
var $tag = $(this).parents('ul.plug-file-upload-view');
|
||||
var type = $tag.attr('data-dialog-type') || 'images';
|
||||
var title = null;
|
||||
var html = null;
|
||||
var style = 'max-width:100%; max-height:calc(80vh - 4.5rem); margin: 0 auto;';
|
||||
switch (type) {
|
||||
case 'video':
|
||||
var video = $(this).find('>video').attr('src') || null;
|
||||
if (video != null) {
|
||||
title = window['lang_video_preview_title'] || '视频预览';
|
||||
html = '<video src="' + video + '" style="' + style + '" controls autoplay>your browser does not support the video tag</video>';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
var img = $(this).find('>img').attr('src') || null;
|
||||
if (img != null) {
|
||||
title = window['lang_images_preview_title'] || '图片预览';
|
||||
html = '<img src="' + img + '" class="am-block" style="' + style + '" />';
|
||||
}
|
||||
}
|
||||
if (html != null) {
|
||||
AMUI.dialog.alert({
|
||||
title: title,
|
||||
isClose: true,
|
||||
config: {},
|
||||
style: 'max-width: 80%; max-height: 80%; left: auto; min-width: 12rem;',
|
||||
content_style: 'padding: 0; border-bottom: 0;',
|
||||
content: html,
|
||||
});
|
||||
}
|
||||
var value = (type == 'video') ? $(this).find('>video').attr('src') : $(this).find('>img').attr('src');
|
||||
AnnexView(type, value);
|
||||
}
|
||||
});
|
||||
|
||||
// 公共文件预览
|
||||
$(document).on('click', '.common-annex-view-event', function() {
|
||||
var type = $(this).attr('data-type') || 'images';
|
||||
var value = $(this).attr('data-value') || null;
|
||||
AnnexView(type, value);
|
||||
});
|
||||
|
||||
/* 搜索切换 */
|
||||
var $more_where = $('.more-where');
|
||||
$more_submit = $('.more-submit');
|
||||
|
||||
@ -1 +1 @@
|
||||
.am-tagsinput{display:inline-block;margin-bottom:1rem;padding:.5em .625em;font-size:1.6rem;line-height:1.2;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #f0f0f0;border-radius:0;-webkit-appearance:none;max-width:100%;cursor:text}.am-tagsinput .tag{margin-right:2px;font-size:13px;line-height:1.8rem;padding:0 .5em;color:#fff;border-radius:0.2rem;}.am-tagsinput .tag [data-role="remove"]{margin-left:5px;cursor:pointer}.am-tagsinput .tag [data-role="remove"]:after{content:"x";padding:0 3px}.am-tagsinput .tag [data-role="remove"]:hover{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.am-tagsinput .tag [data-role="remove"]:hover:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.am-tagsinput input,.am-form .am-tagsinput input{display:inline-block;border:none;-webkit-box-shadow:none;box-shadow:none;outline:none;background-color:transparent;padding:0;margin:0;width:auto!important;max-width:inherit;height:1.8rem;line-height:1.8rem}.am-tagsinput input:focus,.am-form .am-tagsinput input:focus{border:none;-webkit-box-shadow:none;box-shadow:none}.am-form-group .am-tagsinput{margin-bottom:auto}
|
||||
.am-tagsinput{display:inline-block;margin-bottom:1rem;padding:.5em .625em;font-size:1.6rem;line-height:1.2;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #f0f0f0;border-radius:0;-webkit-appearance:none;max-width:100%;cursor:text}.am-tagsinput .tag{margin-right:2px;font-size:13px;line-height:1.8rem;padding:0 .5em;color:#666;border-radius:0.2rem;font-weight:inherit;}.am-tagsinput .tag [data-role="remove"]{margin-left:5px;cursor:pointer}.am-tagsinput .tag [data-role="remove"]:after{content:"x";padding:0 3px}.am-tagsinput .tag [data-role="remove"]:hover{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.am-tagsinput .tag [data-role="remove"]:hover:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.am-tagsinput input,.am-form .am-tagsinput input{display:inline-block;border:none;-webkit-box-shadow:none;box-shadow:none;outline:none;background-color:transparent;padding:0;margin:0;width:auto!important;max-width:inherit;height:1.8rem;line-height:1.8rem}.am-tagsinput input:focus,.am-form .am-tagsinput input:focus{border:none;-webkit-box-shadow:none;box-shadow:none}.am-form-group .am-tagsinput{margin-bottom:auto}
|
||||
2
public/static/common/lib/jRange/.gitignore
vendored
Normal file
2
public/static/common/lib/jRange/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.DS_Store
|
||||
*.codekit
|
||||
58
public/static/common/lib/jRange/README.md
Normal file
58
public/static/common/lib/jRange/README.md
Normal file
@ -0,0 +1,58 @@
|
||||
## jQuery plugin to create Range Selector
|
||||
|
||||

|
||||
|
||||
[Demo and Documentation](http://nitinhayaran.github.io/jRange/demo/)
|
||||
|
||||
以下是一个表格,展示了jRange插件的配置选项:
|
||||
|
||||
选项 是否必需 类型 默认值 描述
|
||||
from 是 Integer 无 滑块的下限
|
||||
to 是 Integer 无 滑块的上限
|
||||
step 否 Integer 1 每次移动的步长
|
||||
scale 否 Array [from, to] 显示在滑块下方的标签数组
|
||||
showLabels 否 Boolean true 是否显示滑块顶部的标签
|
||||
showScale 否 Boolean true 是否显示滑块下方的刻度尺
|
||||
format 否 String / Function "%s" 指针上标签的格式
|
||||
width 否 Integer 300 滑块容器的宽度
|
||||
theme 否 String "theme-green" 容器的CSS类名,可用的主题包括"theme-blue", "theme-green"
|
||||
isRange 否 Boolean false 是否为范围选择器,如果是,则隐藏输入的值将设置为逗号分隔的形式,例如"25,75"
|
||||
snap 否 Boolean false 是否将滑块吸附到步长值上
|
||||
disable 否 Boolean false 是否禁用(只读)范围选择器
|
||||
|
||||
要使用此插件,请按照以下步骤操作:
|
||||
|
||||
在HTML文件中包含jquery.range.js和jquery.range.css文件。
|
||||
html
|
||||
<link rel="stylesheet" href="jquery.range.css">
|
||||
<script src="jquery.range.js"></script>
|
||||
在您希望显示滑块的位置添加一个隐藏的输入元素。
|
||||
html
|
||||
<input type="hidden" class="slider-input" value="23" />
|
||||
使用jRange方法初始化插件,并传递所需的选项。
|
||||
javascript
|
||||
$('.slider-input').jRange({
|
||||
from: 1,
|
||||
to: 100,
|
||||
step: 1,
|
||||
// 其他选项...
|
||||
});
|
||||
|
||||
|
||||
Modification
|
||||
Change values on runtime
|
||||
Methods which you can call to dynamically modify current values and range.
|
||||
|
||||
Method Description
|
||||
setValue
|
||||
sets the current value of the slider without changing its range, if you want to update the range as well use updateRange instead.
|
||||
|
||||
$('.slider').jRange('setValue', '10,20');
|
||||
$('.slider').jRange('setValue', '10');
|
||||
updateRange
|
||||
'updateRange' to change (min, max) value and interval after initialized.
|
||||
|
||||
$('.slider').jRange('updateRange', '0,100');
|
||||
$('.slider').jRange('updateRange', '0,100', '25,50');
|
||||
$('.slider').jRange('updateRange', '0,100', 25);
|
||||
passing second parameter also sets its current value
|
||||
178
public/static/common/lib/jRange/jquery.range.css
Normal file
178
public/static/common/lib/jRange/jquery.range.css
Normal file
@ -0,0 +1,178 @@
|
||||
.jrange-slider-container {
|
||||
width: 30rem;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.jrange-slider-container .back-bar {
|
||||
height: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
.jrange-slider-container .back-bar .selected-bar {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
}
|
||||
.jrange-slider-container .back-bar .pointer {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
cursor: col-resize;
|
||||
opacity: 1;
|
||||
z-index: 2;
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
top: -0.6rem;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-radius: 1rem;
|
||||
border: 0.1rem solid #AAA;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
.jrange-slider-container .back-bar .pointer.last-active {
|
||||
z-index: 3;
|
||||
}
|
||||
.jrange-slider-container .back-bar .pointer-label {
|
||||
position: absolute;
|
||||
top: -1.7rem;
|
||||
font-size: 0.8rem;
|
||||
background: white;
|
||||
white-space: nowrap;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
.jrange-slider-container .back-bar .focused {
|
||||
z-index: 10;
|
||||
color: #333;
|
||||
}
|
||||
.jrange-slider-container .clickable-dummy {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.jrange-slider-container .scale {
|
||||
top: 0.2rem;
|
||||
position: relative;
|
||||
}
|
||||
.jrange-slider-container .scale span {
|
||||
position: absolute;
|
||||
height: 0.5rem;
|
||||
border-left: 0.1rem solid #e5e5e5;
|
||||
font-size: 0;
|
||||
}
|
||||
.jrange-slider-container .scale ins {
|
||||
font-size: 0.9rem;
|
||||
text-decoration: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0.5rem;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
}
|
||||
.jrange-slider-container.slider-readonly .clickable-dummy,
|
||||
.jrange-slider-container.slider-readonly .pointer {
|
||||
cursor: auto;
|
||||
}
|
||||
.jrange-slider-container .back-bar {
|
||||
height: 0.5rem;
|
||||
border-radius: 0.2rem;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主色
|
||||
*/
|
||||
.jrange-slider-container.theme-main .back-bar {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-main .back-bar .selected-bar {
|
||||
border-radius: 0.2rem;
|
||||
background-color: var(--color-main);
|
||||
background-image: -moz-linear-gradient(top, var(--color-main-hover), var(--color-main));
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(var(--color-main-hover)), to(var(--color-main)));
|
||||
background-image: -webkit-linear-gradient(top, var(--color-main-hover), var(--color-main));
|
||||
background-image: -o-linear-gradient(top, var(--color-main-hover), var(--color-main));
|
||||
background-image: linear-gradient(to bottom, var(--color-main-hover), var(--color-main));
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbdfade', endColorstr='#ff76fabc', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-main .back-bar .pointer {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绿色
|
||||
*/
|
||||
.jrange-slider-container.theme-green .back-bar {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-green .back-bar .selected-bar {
|
||||
border-radius: 0.2rem;
|
||||
background-color: #52dc58;
|
||||
background-image: -moz-linear-gradient(top, #65e76b, #4caf50);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#65e76b), to(#4caf50));
|
||||
background-image: -webkit-linear-gradient(top, #65e76b, #4caf50);
|
||||
background-image: -o-linear-gradient(top, #65e76b, #4caf50);
|
||||
background-image: linear-gradient(to bottom, #65e76b, #4caf50);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbdfade', endColorstr='#ff76fabc', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-green .back-bar .pointer {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 蓝色
|
||||
*/
|
||||
.jrange-slider-container.theme-blue .back-bar {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-blue .back-bar .selected-bar {
|
||||
border-radius: 0.2rem;
|
||||
background-color: #92c1f9;
|
||||
background-image: -moz-linear-gradient(top, #b1d1f9, #2A94FF);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b1d1f9), to(#2A94FF));
|
||||
background-image: -webkit-linear-gradient(top, #b1d1f9, #2A94FF);
|
||||
background-image: -o-linear-gradient(top, #b1d1f9, #2A94FF);
|
||||
background-image: linear-gradient(to bottom, #b1d1f9, #2A94FF);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb1d1f9', endColorstr='#ff64a8f9', GradientType=0);
|
||||
}
|
||||
.jrange-slider-container.theme-blue .back-bar .pointer {
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #dddddd);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0);
|
||||
}
|
||||
395
public/static/common/lib/jRange/jquery.range.js
Normal file
395
public/static/common/lib/jRange/jquery.range.js
Normal file
@ -0,0 +1,395 @@
|
||||
/*jshint multistr:true, curly: false */
|
||||
/*global jQuery:false, define: false */
|
||||
/**
|
||||
* jRange - Awesome range control
|
||||
*
|
||||
* Written by
|
||||
* ----------
|
||||
* Nitin Hayaran (nitinhayaran@gmail.com)
|
||||
*
|
||||
* Licensed under the MIT (MIT-LICENSE.txt).
|
||||
*
|
||||
* @author Nitin Hayaran
|
||||
* @version 0.1-RELEASE
|
||||
**/
|
||||
(function($, window, document, undefined) {
|
||||
'use strict';
|
||||
|
||||
var jRange = function() {
|
||||
return this.init.apply(this, arguments);
|
||||
};
|
||||
jRange.prototype = {
|
||||
defaults: {
|
||||
onstatechange: function() {},
|
||||
ondragend: function() {},
|
||||
onbarclicked: function() {},
|
||||
isRange: false,
|
||||
showLabels: true,
|
||||
showScale: true,
|
||||
step: 1,
|
||||
format: '%s',
|
||||
theme: 'theme-green',
|
||||
width: 300,
|
||||
disable: false,
|
||||
snap: false
|
||||
},
|
||||
template: '<div class="jrange-slider-container">\
|
||||
<div class="back-bar">\
|
||||
<div class="selected-bar"></div>\
|
||||
<div class="pointer low"></div><div class="pointer-label low">123456</div>\
|
||||
<div class="pointer high"></div><div class="pointer-label high">456789</div>\
|
||||
<div class="clickable-dummy"></div>\
|
||||
</div>\
|
||||
<div class="scale"></div>\
|
||||
</div>',
|
||||
init: function(node, options) {
|
||||
this.options = $.extend({}, this.defaults, options);
|
||||
this.inputNode = $(node);
|
||||
this.options.value = this.inputNode.val() || (this.options.isRange ? this.options.from + ',' + this.options.from : '' + this.options.from);
|
||||
this.domNode = $(this.template);
|
||||
this.domNode.addClass(this.options.theme);
|
||||
this.inputNode.after(this.domNode);
|
||||
this.domNode.on('change', this.onChange);
|
||||
this.pointers = $('.pointer', this.domNode);
|
||||
this.lowPointer = this.pointers.first();
|
||||
this.highPointer = this.pointers.last();
|
||||
this.labels = $('.pointer-label', this.domNode);
|
||||
this.lowLabel = this.labels.first();
|
||||
this.highLabel = this.labels.last();
|
||||
this.scale = $('.scale', this.domNode);
|
||||
this.bar = $('.selected-bar', this.domNode);
|
||||
this.clickableBar = this.domNode.find('.clickable-dummy');
|
||||
this.interval = this.options.to - this.options.from;
|
||||
this.render();
|
||||
},
|
||||
render: function() {
|
||||
// Check if inputNode is visible, and have some width, so that we can set slider width accordingly.
|
||||
if (this.inputNode.width() === 0 && !this.options.width) {
|
||||
console.log('jRange : no width found, returning');
|
||||
return;
|
||||
} else {
|
||||
this.options.width = this.options.width || this.inputNode.width();
|
||||
this.domNode.width(this.options.width);
|
||||
this.inputNode.hide();
|
||||
}
|
||||
|
||||
if (this.isSingle()) {
|
||||
this.lowPointer.hide();
|
||||
this.lowLabel.hide();
|
||||
}
|
||||
if (!this.options.showLabels) {
|
||||
this.labels.hide();
|
||||
}
|
||||
this.attachEvents();
|
||||
if (this.options.showScale) {
|
||||
this.renderScale();
|
||||
}
|
||||
this.setValue(this.options.value);
|
||||
},
|
||||
isSingle: function() {
|
||||
if (typeof(this.options.value) === 'number') {
|
||||
return true;
|
||||
}
|
||||
return (this.options.value.indexOf(',') !== -1 || this.options.isRange) ?
|
||||
false : true;
|
||||
},
|
||||
attachEvents: function() {
|
||||
this.clickableBar.click($.proxy(this.barClicked, this));
|
||||
this.pointers.on('mousedown touchstart', $.proxy(this.onDragStart, this));
|
||||
this.pointers.bind('dragstart', function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
onDragStart: function(e) {
|
||||
if ( this.options.disable || (e.type === 'mousedown' && e.which !== 1)) {
|
||||
return;
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var pointer = $(e.target);
|
||||
this.pointers.removeClass('last-active');
|
||||
pointer.addClass('focused last-active');
|
||||
this[(pointer.hasClass('low') ? 'low' : 'high') + 'Label'].addClass('focused');
|
||||
$(document).on('mousemove.slider touchmove.slider', $.proxy(this.onDrag, this, pointer));
|
||||
$(document).on('mouseup.slider touchend.slider touchcancel.slider', $.proxy(this.onDragEnd, this));
|
||||
},
|
||||
onDrag: function(pointer, e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
if (e.originalEvent.touches && e.originalEvent.touches.length) {
|
||||
e = e.originalEvent.touches[0];
|
||||
} else if (e.originalEvent.changedTouches && e.originalEvent.changedTouches.length) {
|
||||
e = e.originalEvent.changedTouches[0];
|
||||
}
|
||||
|
||||
var position = e.clientX - this.domNode.offset().left;
|
||||
this.domNode.trigger('change', [this, pointer, position]);
|
||||
},
|
||||
onDragEnd: function(e) {
|
||||
this.pointers.removeClass('focused')
|
||||
.trigger('rangeslideend');
|
||||
this.labels.removeClass('focused');
|
||||
$(document).off('.slider');
|
||||
this.options.ondragend.call(this, this.options.value);
|
||||
},
|
||||
barClicked: function(e) {
|
||||
if(this.options.disable) return;
|
||||
var x = e.pageX - this.clickableBar.offset().left;
|
||||
if (this.isSingle())
|
||||
this.setPosition(this.pointers.last(), x, true, true);
|
||||
else {
|
||||
var firstLeft = Math.abs(parseFloat(this.pointers.first().css('left'), 10)),
|
||||
firstHalfWidth = this.pointers.first().width() / 2,
|
||||
lastLeft = Math.abs(parseFloat(this.pointers.last().css('left'), 10)),
|
||||
lastHalfWidth = this.pointers.first().width() / 2,
|
||||
leftSide = Math.abs(firstLeft - x + firstHalfWidth),
|
||||
rightSide = Math.abs(lastLeft - x + lastHalfWidth),
|
||||
pointer;
|
||||
|
||||
if(leftSide == rightSide) {
|
||||
pointer = x < firstLeft ? this.pointers.first() : this.pointers.last();
|
||||
} else {
|
||||
pointer = leftSide < rightSide ? this.pointers.first() : this.pointers.last();
|
||||
}
|
||||
this.setPosition(pointer, x, true, true);
|
||||
}
|
||||
this.options.onbarclicked.call(this, this.options.value);
|
||||
},
|
||||
onChange: function(e, self, pointer, position) {
|
||||
var min, max;
|
||||
min = 0;
|
||||
max = self.domNode.width();
|
||||
|
||||
if (!self.isSingle()) {
|
||||
min = pointer.hasClass('high') ? parseFloat(self.lowPointer.css("left")) + (self.lowPointer.width() / 2) : 0;
|
||||
max = pointer.hasClass('low') ? parseFloat(self.highPointer.css("left")) + (self.highPointer.width() / 2) : self.domNode.width();
|
||||
}
|
||||
|
||||
var value = Math.min(Math.max(position, min), max);
|
||||
self.setPosition(pointer, value, true);
|
||||
},
|
||||
setPosition: function(pointer, position, isPx, animate) {
|
||||
var leftPos, rightPos,
|
||||
lowPos = parseFloat(this.lowPointer.css("left")),
|
||||
highPos = parseFloat(this.highPointer.css("left")) || 0,
|
||||
circleWidth = this.highPointer.width() / 2;
|
||||
if (!isPx) {
|
||||
position = this.prcToPx(position);
|
||||
}
|
||||
if(this.options.snap){
|
||||
var expPos = this.correctPositionForSnap(position);
|
||||
if(expPos === -1){
|
||||
return;
|
||||
}else{
|
||||
position = expPos;
|
||||
}
|
||||
}
|
||||
if (pointer[0] === this.highPointer[0]) {
|
||||
highPos = Math.round(position - circleWidth);
|
||||
} else {
|
||||
lowPos = Math.round(position - circleWidth);
|
||||
}
|
||||
pointer[animate ? 'animate' : 'css']({
|
||||
'left': Math.round(position - circleWidth)
|
||||
});
|
||||
if (this.isSingle()) {
|
||||
leftPos = 0;
|
||||
} else {
|
||||
leftPos = lowPos + circleWidth;
|
||||
rightPos = highPos + circleWidth;
|
||||
}
|
||||
var w = Math.round(highPos + circleWidth - leftPos);
|
||||
this.bar[animate ? 'animate' : 'css']({
|
||||
'width': Math.abs(w),
|
||||
'left': (w>0) ? leftPos : leftPos + w
|
||||
});
|
||||
this.showPointerValue(pointer, position, animate);
|
||||
this.isReadonly();
|
||||
},
|
||||
correctPositionForSnap: function(position){
|
||||
var currentValue = this.positionToValue(position) - this.options.from;
|
||||
var diff = this.options.width / (this.interval / this.options.step),
|
||||
expectedPosition = (currentValue / this.options.step) * diff;
|
||||
if( position <= expectedPosition + diff / 2 && position >= expectedPosition - diff / 2){
|
||||
return expectedPosition;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
},
|
||||
// will be called from outside
|
||||
setValue: function(value) {
|
||||
var values = value.toString().split(',');
|
||||
values[0] = Math.min(Math.max(values[0], this.options.from), this.options.to) + '';
|
||||
if (values.length > 1){
|
||||
values[1] = Math.min(Math.max(values[1], this.options.from), this.options.to) + '';
|
||||
}
|
||||
this.options.value = value;
|
||||
var prc = this.valuesToPrc(values.length === 2 ? values : [0, values[0]]);
|
||||
if (this.isSingle()) {
|
||||
this.setPosition(this.highPointer, prc[1]);
|
||||
} else {
|
||||
this.setPosition(this.lowPointer, prc[0]);
|
||||
this.setPosition(this.highPointer, prc[1]);
|
||||
}
|
||||
},
|
||||
renderScale: function() {
|
||||
var s = this.options.scale || [this.options.from, this.options.to];
|
||||
var prc = Math.round((100 / (s.length - 1)) * 10) / 10;
|
||||
var str = '';
|
||||
for (var i = 0; i < s.length; i++) {
|
||||
str += '<span style="left: ' + i * prc + '%">' + (s[i] != '|' ? '<ins>' + s[i] + '</ins>' : '') + '</span>';
|
||||
}
|
||||
this.scale.html(str);
|
||||
|
||||
$('ins', this.scale).each(function() {
|
||||
$(this).css({
|
||||
marginLeft: -$(this).outerWidth() / 2
|
||||
});
|
||||
});
|
||||
},
|
||||
getBarWidth: function() {
|
||||
var values = this.options.value.split(',');
|
||||
if (values.length > 1) {
|
||||
return parseFloat(values[1]) - parseFloat(values[0]);
|
||||
} else {
|
||||
return parseFloat(values[0]);
|
||||
}
|
||||
},
|
||||
showPointerValue: function(pointer, position, animate) {
|
||||
var label = $('.pointer-label', this.domNode)[pointer.hasClass('low') ? 'first' : 'last']();
|
||||
var text;
|
||||
var value = this.positionToValue(position);
|
||||
// Is it higer or lower than it should be?
|
||||
|
||||
if ($.isFunction(this.options.format)) {
|
||||
var type = this.isSingle() ? undefined : (pointer.hasClass('low') ? 'low' : 'high');
|
||||
text = this.options.format(value, type);
|
||||
} else {
|
||||
text = this.options.format.replace('%s', value);
|
||||
}
|
||||
|
||||
var width = label.html(text).width(),
|
||||
left = position - width / 2;
|
||||
left = Math.min(Math.max(left, 0), this.options.width - width);
|
||||
label[animate ? 'animate' : 'css']({
|
||||
left: left
|
||||
});
|
||||
this.setInputValue(pointer, value);
|
||||
},
|
||||
valuesToPrc: function(values) {
|
||||
var lowPrc = ((parseFloat(values[0]) - parseFloat(this.options.from)) * 100 / this.interval),
|
||||
highPrc = ((parseFloat(values[1]) - parseFloat(this.options.from)) * 100 / this.interval);
|
||||
return [lowPrc, highPrc];
|
||||
},
|
||||
prcToPx: function(prc) {
|
||||
return (this.domNode.width() * prc) / 100;
|
||||
},
|
||||
isDecimal: function() {
|
||||
return ((this.options.value + this.options.from + this.options.to).indexOf(".")===-1) ? false : true;
|
||||
},
|
||||
positionToValue: function(pos) {
|
||||
var value = (pos / this.domNode.width()) * this.interval;
|
||||
value = parseFloat(value, 10) + parseFloat(this.options.from, 10);
|
||||
if (this.isDecimal()) {
|
||||
var final = Math.round(Math.round(value / this.options.step) * this.options.step *100)/100;
|
||||
if (final!==0.0) {
|
||||
final = '' + final;
|
||||
if (final.indexOf(".")===-1) {
|
||||
final = final + ".";
|
||||
}
|
||||
while (final.length - final.indexOf('.')<3) {
|
||||
final = final + "0";
|
||||
}
|
||||
} else {
|
||||
final = "0.00";
|
||||
}
|
||||
return final;
|
||||
} else {
|
||||
return Math.round(value / this.options.step) * this.options.step;
|
||||
}
|
||||
},
|
||||
setInputValue: function(pointer, v) {
|
||||
// if(!isChanged) return;
|
||||
if (this.isSingle()) {
|
||||
this.options.value = v.toString();
|
||||
} else {
|
||||
var values = this.options.value.split(',');
|
||||
if (pointer.hasClass('low')) {
|
||||
this.options.value = v + ',' + values[1];
|
||||
} else {
|
||||
this.options.value = values[0] + ',' + v;
|
||||
}
|
||||
}
|
||||
if (this.inputNode.val() !== this.options.value) {
|
||||
this.inputNode.val(this.options.value)
|
||||
.trigger('change');
|
||||
this.options.onstatechange.call(this, this.options.value);
|
||||
}
|
||||
},
|
||||
getValue: function() {
|
||||
return this.options.value;
|
||||
},
|
||||
getOptions: function() {
|
||||
return this.options;
|
||||
},
|
||||
getRange: function() {
|
||||
return this.options.from + "," + this.options.to;
|
||||
},
|
||||
isReadonly: function(){
|
||||
this.domNode.toggleClass('slider-readonly', this.options.disable);
|
||||
},
|
||||
disable: function(){
|
||||
this.options.disable = true;
|
||||
this.isReadonly();
|
||||
},
|
||||
enable: function(){
|
||||
this.options.disable = false;
|
||||
this.isReadonly();
|
||||
},
|
||||
toggleDisable: function(){
|
||||
this.options.disable = !this.options.disable;
|
||||
this.isReadonly();
|
||||
},
|
||||
updateRange: function(range, value) {
|
||||
var values = range.toString().split(',');
|
||||
this.interval = parseInt(values[1]) - parseInt(values[0]);
|
||||
if(value){
|
||||
this.setValue(value);
|
||||
}else{
|
||||
this.setValue(this.getValue());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var pluginName = 'jRange';
|
||||
// A really lightweight plugin wrapper around the constructor,
|
||||
// preventing against multiple instantiations
|
||||
$.fn[pluginName] = function(option) {
|
||||
var args = arguments,
|
||||
result;
|
||||
|
||||
this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $.data(this, 'plugin_' + pluginName),
|
||||
options = typeof option === 'object' && option;
|
||||
if (!data) {
|
||||
$this.data('plugin_' + pluginName, (data = new jRange(this, options)));
|
||||
$(window).resize(function() {
|
||||
data.setValue(data.getValue());
|
||||
}); // Update slider position when window is resized to keep it in sync with scale
|
||||
}
|
||||
// if first argument is a string, call silimarly named function
|
||||
// this gives flexibility to call functions of the plugin e.g.
|
||||
// - $('.dial').plugin('destroy');
|
||||
// - $('.dial').plugin('render', $('.new-child'));
|
||||
if (typeof option === 'string') {
|
||||
result = data[option].apply(data, Array.prototype.slice.call(args, 1));
|
||||
}
|
||||
});
|
||||
|
||||
// To enable plugin returns values
|
||||
return result || this;
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
||||
4
public/static/index/.gitignore
vendored
Normal file
4
public/static/index/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!.gitignore
|
||||
!default
|
||||
!index.html
|
||||
@ -1,4 +1,5 @@
|
||||
/** * 条件
|
||||
/**
|
||||
* 条件
|
||||
*/
|
||||
.map-item > li {
|
||||
background: transparent;
|
||||
@ -208,7 +209,9 @@
|
||||
.map-item > li {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
} /** * 条件指定品牌信息
|
||||
}
|
||||
/**
|
||||
* 条件指定品牌信息
|
||||
*/
|
||||
.brand-info .map-images-text-items {
|
||||
padding: 1.5rem 1.5rem 0 1.5rem;
|
||||
@ -237,7 +240,9 @@
|
||||
.brand-info .map-left {
|
||||
line-height: 8.4rem !important;
|
||||
}
|
||||
} /** * 条件基础信息
|
||||
}
|
||||
/**
|
||||
* 条件基础信息
|
||||
*/
|
||||
.map-base-tips {
|
||||
background: #fafafa;
|
||||
@ -252,7 +257,9 @@
|
||||
color: #666 !important;
|
||||
background-color: transparent;
|
||||
border-color: #eee;
|
||||
} /** * 导航
|
||||
}
|
||||
/**
|
||||
* 导航
|
||||
*/
|
||||
.search-nav {
|
||||
position: relative;
|
||||
@ -283,7 +290,9 @@
|
||||
.search-nav .am-sticky-placeholder .am-sticky {
|
||||
border-width: 0 0.1rem 0.1rem 0;
|
||||
}
|
||||
} /** * 排序
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
.sort-nav {
|
||||
padding: 0px;
|
||||
@ -327,12 +336,44 @@
|
||||
}
|
||||
@media only screen and (max-width: 640px) {
|
||||
.sort-nav li a {
|
||||
padding: 0.6rem 1rem;
|
||||
padding: 0.6rem 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
/**
|
||||
* 排序导航里面价格滑条
|
||||
*/
|
||||
.sort-nav-map-price-content {
|
||||
width: 22rem;
|
||||
}
|
||||
.sort-nav-map-price-range-slider-input,
|
||||
.sort-nav-map-price-bottom-operate {
|
||||
display: none;
|
||||
}
|
||||
.sort-nav-map-price-content .sort-nav-map-price-input input {
|
||||
width: 8rem;
|
||||
}
|
||||
.sort-nav-map-price:hover .sort-nav-map-price-content {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border: 0.1rem solid #ededed;
|
||||
box-shadow: var(--box-shadow);
|
||||
top: -0.5rem;
|
||||
padding: 0.5rem 1rem 1rem 1rem;
|
||||
}
|
||||
.sort-nav-map-price:hover .sort-nav-map-price-range-slider-input,
|
||||
.sort-nav-map-price:hover .sort-nav-map-price-bottom-operate {
|
||||
display: block;
|
||||
}
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.sort-nav-map-price {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.search-pages-submit {
|
||||
|
||||
@ -471,8 +471,23 @@ $(function()
|
||||
}
|
||||
|
||||
// 加入购物车处理
|
||||
var goods_id = $(this).data('gid');
|
||||
if(parseInt($(this).data('is-many-spec') || 0) == 0)
|
||||
var $this = $(this);
|
||||
var goods_id = $this.attr('data-gid');
|
||||
var stock = parseInt($this.attr('data-stock') || 0);
|
||||
// 是否强制数量
|
||||
if(parseInt($this.attr('data-is-force-stock') || 0) == 1 && stock == 0)
|
||||
{
|
||||
Prompt(window['lang_goods_stock_empty_tips'] || '请输入购买数量');
|
||||
return false;
|
||||
}
|
||||
// 指定规格、先获取指定原始数据字段
|
||||
var spec = $this.attr('data-original-spec') || $this.attr('data-spec') || '';
|
||||
if(spec !== '')
|
||||
{
|
||||
spec = JSON.parse(CryptoJS.enc.Base64.parse(decodeURIComponent(spec)).toString(CryptoJS.enc.Utf8));
|
||||
}
|
||||
// 已确定非多规格 或 存在指定多规格数据则直接加入购物车操作
|
||||
if(parseInt($(this).data('is-many-spec') || 0) == 0 || spec !== '')
|
||||
{
|
||||
$.AMUI.progress.start();
|
||||
$.ajax({
|
||||
@ -482,7 +497,8 @@ $(function()
|
||||
timeout: 10000,
|
||||
data: {
|
||||
goods_id: goods_id,
|
||||
stock: 1
|
||||
stock: stock || 1,
|
||||
spec: spec,
|
||||
},
|
||||
success: function(res)
|
||||
{
|
||||
@ -491,9 +507,16 @@ $(function()
|
||||
{
|
||||
// 更新公共购物车数量
|
||||
HomeCartNumberTotalUpdate(res.data.buy_number);
|
||||
|
||||
// 提示成功
|
||||
Prompt(res.msg, 'success');
|
||||
|
||||
// 是否展示购物车成功提示弹窗
|
||||
if(parseInt($this.attr('data-is-cart-success-modal') || 0) == 1)
|
||||
{
|
||||
// 展示购物车成功提示弹窗
|
||||
HomeUserCartSuccessModal(res.data.buy_number);
|
||||
} else {
|
||||
// 提示成功
|
||||
Prompt(res.msg, 'success');
|
||||
}
|
||||
} else {
|
||||
Prompt(res.msg);
|
||||
}
|
||||
|
||||
@ -458,8 +458,8 @@ function GoodsSpecType()
|
||||
function GoodsBrowserHistoryUrlChange()
|
||||
{
|
||||
var spec = GoodsSelectedSpec();
|
||||
var value = (spec.length == 0) ? null : spec.map(function(v){return v.value;}).join('|');
|
||||
history.pushState({}, '', UrlFieldReplace('spec', value));
|
||||
var value = (spec.length == 0) ? (GetQueryValue('spec') || null) : spec.map(function(v){return v.value;}).join('|');
|
||||
history.pushState({}, '', UrlFieldReplace('spec', value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -30,4 +30,42 @@ $(function()
|
||||
var value = ($(this).data('value') || 0) == 1 ? 0 : 1;
|
||||
window.location.href = UrlFieldReplace('layout', value);
|
||||
});
|
||||
|
||||
// 价格滑条初始化
|
||||
var $range_input = $('.sort-nav-map-price-range-slider-input input');
|
||||
$range_input.jRange({
|
||||
from: 0,
|
||||
to: $range_input.attr('data-to'),
|
||||
step: 1,
|
||||
showScale: false,
|
||||
format: '%s',
|
||||
width: 178,
|
||||
showLabels: true,
|
||||
isRange : false,
|
||||
theme: 'theme-main',
|
||||
onstatechange: function(res) {
|
||||
var arr = res.split(',');
|
||||
$('.sort-nav-map-price-input-min').val(arr[0]);
|
||||
$('.sort-nav-map-price-input-max').val(arr[1]);
|
||||
}
|
||||
});
|
||||
// 价格滑条清空
|
||||
$(document).on('click', '.sort-nav-map-price-clear', function()
|
||||
{
|
||||
$('.sort-nav-map-price-input-min,.sort-nav-map-price-input-max').val('');
|
||||
window.location.href = UrlFieldReplace('price', null);
|
||||
});
|
||||
// 价格滑条确认
|
||||
$(document).on('click', '.sort-nav-map-price-submit', function()
|
||||
{
|
||||
var min = FomatFloat($('.sort-nav-map-price-input-min').val() || 0);
|
||||
var max = FomatFloat($('.sort-nav-map-price-input-max').val() || 0);
|
||||
if(min <= 0 && max <= 0)
|
||||
{
|
||||
var url = UrlFieldReplace('price', null);
|
||||
} else {
|
||||
var url = UrlFieldReplace('price', min+'-'+max);
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user