Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
2664cfe2
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2664cfe2
编写于
11月 23, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
search
上级
3aaa31cc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
46 addition
and
40 deletion
+46
-40
alipay/app.json
alipay/app.json
+2
-2
alipay/pages/goods-search/goods-search.acss
alipay/pages/goods-search/goods-search.acss
+8
-6
alipay/pages/goods-search/goods-search.axml
alipay/pages/goods-search/goods-search.axml
+22
-18
alipay/pages/goods-search/goods-search.js
alipay/pages/goods-search/goods-search.js
+1
-1
service/Application/Service/SearchService.class.php
service/Application/Service/SearchService.class.php
+13
-13
未找到文件。
alipay/app.json
浏览文件 @
2664cfe2
{
"pages"
:
[
"pages/goods-search/goods-search"
,
"pages"
:
[
"pages/index/index"
,
"pages/goods-category/goods-category"
,
"pages/cart/cart"
,
...
...
@@ -8,7 +8,7 @@
"pages/login/login"
,
"pages/paytips/paytips"
,
"pages/goods-search/goods-search"
,
"pages/goods-detail/goods-detail"
,
"pages/goods-attribute/goods-attribute"
,
"pages/buy/buy"
,
...
...
alipay/pages/goods-search/goods-search.acss
浏览文件 @
2664cfe2
/**
* 商品列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list {
overflow: hidden;
}
...
...
@@ -72,19 +75,18 @@
* 排序导航
*/
.nav-sort-content .item {
height:
6
0rpx;
line-height:
6
0rpx;
height:
8
0rpx;
line-height:
8
0rpx;
width: 160rpx;
}
.nav-sort-content .item .icon {
width: 30rpx;
height: 30rpx;
vertical-align: middle;
}
.screening-submit {
width:
45
rpx;
height:
45
rpx;
width:
50
rpx;
height:
50
rpx;
position: absolute;
top: 1
0
rpx;
top: 1
5
rpx;
right: 20rpx;
}
\ No newline at end of file
alipay/pages/goods-search/goods-search.axml
浏览文件 @
2664cfe2
...
...
@@ -11,23 +11,6 @@
<image class="screening-submit" src="/images/search-submit-icon.png" mode="aspectFill" onTap="popup_form_event_show" />
</view>
<!-- 筛选条件 popup -->
<popup show="{{is_show_popup_form}}" position="right" onClose="popup_form_event_close">
<form onSubmit="form_submit_event" class="popup-form oh bg-white">
<view class="item oh screening-price">
<view class="title cr-666">价格区间(元)</view>
<input type="digit" placeholder="最低价" name="min_price" class="br fl" />
<view class="cr-888 fl tc separator">~</view>
<input type="digit" placeholder="最高价" name="max_price" class="br fl" />
</view>
<view class="item keywords">
<view class="title cr-666">关键字</view>
<input type="text" placeholder="关键字" name="keywords" value="{{(params.keywords || '')}}" class="br" />
</view>
<button formType="submit" class="bg-main form-submit wh-auto" disabled="{{popup_form_loading_status}}" hover-class="none">确认</button>
</form>
</popup>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
<view class="data-list">
...
...
@@ -53,4 +36,25 @@
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</scroll-view>
\ No newline at end of file
</scroll-view>
<!-- 筛选条件 popup -->
<popup show="{{is_show_popup_form}}" position="right" onClose="popup_form_event_close">
<form onSubmit="form_submit_event" class="popup-form oh bg-white">
<view class="item oh screening-price">
<view class="title cr-666">价格区间(元)
</view>
<input type="digit" placeholder="最低价" name="min_price" class="br fl" />
<view class="cr-888 fl tc separator">~
</view>
<input type="digit" placeholder="最高价" name="max_price" class="br fl" />
</view>
<view class="item keywords">
<view class="title cr-666">关键字
</view>
<input type="text" placeholder="关键字" name="keywords" value="{{(params.keywords || '')}}" class="br" />
</view>
<button formType="submit" class="bg-main form-submit wh-auto" disabled="{{popup_form_loading_status}}" hover-class="none">确认
</button>
</form>
</popup>
\ No newline at end of file
alipay/pages/goods-search/goods-search.js
浏览文件 @
2664cfe2
...
...
@@ -62,7 +62,7 @@ Page({
my
.
httpRequest
({
url
:
app
.
get_request_url
(
"
Index
"
,
"
Search
"
),
method
:
"
POST
"
,
data
:
params
,
data
:
this
.
data
.
post_data
,
dataType
:
"
json
"
,
success
:
res
=>
{
my
.
hideLoading
();
...
...
service/Application/Service/SearchService.class.php
浏览文件 @
2664cfe2
...
...
@@ -89,19 +89,19 @@ class SearchService
$price
=
M
(
'ScreeningPrice'
)
->
field
(
'min_price,max_price'
)
->
where
([
'is_enable'
=>
1
,
'id'
=>
intval
(
$params
[
'screening_price_id'
])])
->
find
();
$params
[
'min_price'
]
=
$price
[
'min_price'
];
$params
[
'max_price'
]
=
$price
[
'max_price'
];
if
(
!
empty
(
$params
[
'min_price'
])
&&
!
empty
(
$params
[
'max_price'
]))
{
$where
[
'g.price'
]
=
[
[
'EGT'
,
$params
[
'min_price'
]],
[
'LT'
,
$params
[
'max
_price'
]],
];
}
else
if
(
!
empty
(
$params
[
'min_price'
]))
{
$where
[
'g.price'
]
=
[
'EGT'
,
$params
[
'min_price'
]];
}
else
if
(
!
empty
(
$params
[
'max_price'
]))
{
$where
[
'g.price'
]
=
[
'LT'
,
$params
[
'max_price'
]];
}
}
if
(
!
empty
(
$params
[
'min_price'
])
&&
!
empty
(
$params
[
'max_price'
]))
{
$where
[
'g.price'
]
=
[
[
'EGT'
,
$params
[
'min
_price'
]],
[
'LT'
,
$params
[
'max_price'
]],
];
}
else
if
(
!
empty
(
$params
[
'min_price'
]))
{
$where
[
'g.price'
]
=
[
'EGT'
,
$params
[
'min_price'
]];
}
else
if
(
!
empty
(
$params
[
'max_price'
]))
{
$where
[
'g.price'
]
=
[
'LT'
,
$params
[
'max_price'
]];
}
// 获取商品总数
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录