Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
3aaa31cc
ShopXO
项目概览
starsw001
/
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,发现更多精彩内容 >>
提交
3aaa31cc
编写于
11月 23, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
search
上级
b0429f28
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
256 addition
and
164 deletion
+256
-164
alipay/app.json
alipay/app.json
+2
-2
alipay/images/search-asc-icon.png
alipay/images/search-asc-icon.png
+0
-0
alipay/images/search-default-icon.png
alipay/images/search-default-icon.png
+0
-0
alipay/images/search-desc-icon.png
alipay/images/search-desc-icon.png
+0
-0
alipay/images/search-submit-icon.png
alipay/images/search-submit-icon.png
+0
-0
alipay/pages/cart/cart.js
alipay/pages/cart/cart.js
+5
-5
alipay/pages/goods-search/goods-search.acss
alipay/pages/goods-search/goods-search.acss
+63
-1
alipay/pages/goods-search/goods-search.axml
alipay/pages/goods-search/goods-search.axml
+31
-0
alipay/pages/goods-search/goods-search.js
alipay/pages/goods-search/goods-search.js
+57
-1
alipay/pages/goods-search/goods-search.json
alipay/pages/goods-search/goods-search.json
+4
-1
alipay/pages/index/index.acss
alipay/pages/index/index.acss
+30
-0
alipay/pages/index/index.axml
alipay/pages/index/index.axml
+8
-0
alipay/pages/index/index.js
alipay/pages/index/index.js
+14
-0
alipay/pages/user-order/user-order.js
alipay/pages/user-order/user-order.js
+2
-2
service/Application/Api/Controller/BuyController.class.php
service/Application/Api/Controller/BuyController.class.php
+2
-2
service/Application/Api/Controller/CommonController.class.php
...ice/Application/Api/Controller/CommonController.class.php
+3
-3
service/Application/Api/Controller/OrderController.class.php
service/Application/Api/Controller/OrderController.class.php
+26
-140
service/Application/Service/SearchService.class.php
service/Application/Service/SearchService.class.php
+9
-7
未找到文件。
alipay/app.json
浏览文件 @
3aaa31cc
{
"pages"
:
[
"pages"
:
[
"pages/goods-search/goods-search"
,
"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/images/search-asc-icon.png
0 → 100644
浏览文件 @
3aaa31cc
3.0 KB
alipay/images/search-default-icon.png
0 → 100644
浏览文件 @
3aaa31cc
2.8 KB
alipay/images/search-desc-icon.png
0 → 100644
浏览文件 @
3aaa31cc
2.9 KB
alipay/images/search-submit-icon.png
0 → 100644
浏览文件 @
3aaa31cc
3.6 KB
alipay/pages/cart/cart.js
浏览文件 @
3aaa31cc
...
...
@@ -105,15 +105,15 @@ Page({
// 数量输入事件
goods_buy_number_blur
(
e
)
{
var
index
=
e
.
currentT
arget
.
dataset
.
index
||
0
;
var
index
=
e
.
t
arget
.
dataset
.
index
||
0
;
var
buy_number
=
parseInt
(
e
.
detail
.
value
)
||
1
;
this
.
goods_buy_number_func
(
index
,
buy_number
);
},
// 数量操作事件
goods_buy_number_event
(
e
)
{
var
index
=
e
.
currentT
arget
.
dataset
.
index
||
0
;
var
type
=
parseInt
(
e
.
currentT
arget
.
dataset
.
type
)
||
0
;
var
index
=
e
.
t
arget
.
dataset
.
index
||
0
;
var
type
=
parseInt
(
e
.
t
arget
.
dataset
.
type
)
||
0
;
var
temp_buy_number
=
parseInt
(
this
.
data
.
data_list
[
index
][
'
stock
'
]);
if
(
type
==
0
)
{
var
buy_number
=
temp_buy_number
-
1
;
...
...
@@ -280,7 +280,7 @@ Page({
// 选中处理
selectedt_event
(
e
)
{
var
type
=
e
.
currentT
arget
.
dataset
.
type
||
null
;
var
type
=
e
.
t
arget
.
dataset
.
type
||
null
;
if
(
type
!=
null
)
{
var
temp_data_list
=
this
.
data
.
data_list
;
...
...
@@ -296,7 +296,7 @@ Page({
// 节点操作
case
'
node
'
:
var
index
=
e
.
currentT
arget
.
dataset
.
index
||
0
;
var
index
=
e
.
t
arget
.
dataset
.
index
||
0
;
temp_data_list
[
index
][
'
selected
'
]
=
(
temp_data_list
[
index
][
'
selected
'
]
==
true
)
?
false
:
true
;
break
;
}
...
...
alipay/pages/goods-search/goods-search.acss
浏览文件 @
3aaa31cc
/* 商品列表 */
/**
* 商品列表
*/
.data-list {
overflow: hidden;
}
...
...
@@ -25,4 +27,64 @@
.data-list .items .base,
.data-list .items .base .price {
margin-top: 15rpx;
}
/**
* 条件
*/
.popup-form {
height: calc(100vh - 20rpx);
padding: 20rpx 20rpx 0 20rpx;
}
.popup-form input {
font-size: 24rpx;
height: 50rpx;
line-height: 50rpx;
background: #efefef;
}
.screening-price input {
width: 220rpx;
}
.screening-price .separator {
margin-top: 20rpx;
width: 30rpx;
}
.popup-form .keywords input {
width: 490rpx;
}
.popup-form .item:not(:last-child) {
margin-bottom: 50rpx;
}
.popup-form .item .title {
margin-bottom: 10rpx;
font-size: 28rpx;
}
.popup-form .form-submit {
height: 80rpx;
line-height: 80rpx;
position: absolute;
left: 0;
bottom: 0;
border-radius: 0;
}
/**
* 排序导航
*/
.nav-sort-content .item {
height: 60rpx;
line-height: 60rpx;
width: 160rpx;
}
.nav-sort-content .item .icon {
width: 30rpx;
height: 30rpx;
vertical-align: middle;
}
.screening-submit {
width: 45rpx;
height: 45rpx;
position: absolute;
top: 10rpx;
right: 20rpx;
}
\ No newline at end of file
alipay/pages/goods-search/goods-search.axml
浏览文件 @
3aaa31cc
<!-- 排序 -->
<view class="nav-sort oh br-b">
<view class="nav-sort-content">
<block a:for="{{search_nav_sort_list}}">
<view class="item tc fl" data-index="{{index}}" onTap="nav_sort_event">
<text class="cr-666">{{item.name}}</text>
<image a:if="{{(item.icon || null) != null}}" class="icon" src="/images/search-{{item.icon}}-icon.png" mode="aspectFill" />
</view>
</block>
</view>
<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">
<view class="items bg-white" a:for="{{data_list}}">
...
...
alipay/pages/goods-search/goods-search.js
浏览文件 @
3aaa31cc
...
...
@@ -7,10 +7,18 @@ Page({
data_page_total
:
0
,
data_page
:
1
,
params
:
null
,
post_data
:
{},
is_show_popup_form
:
false
,
popup_form_loading_status
:
false
,
search_nav_sort_list
:
[
{
name
:
"
综合
"
,
field
:
"
default
"
,
sort
:
"
asc
"
,
"
icon
"
:
null
},
{
name
:
"
销量
"
,
field
:
"
sales_count
"
,
sort
:
"
asc
"
,
"
icon
"
:
"
default
"
},
{
name
:
"
价格
"
,
field
:
"
price
"
,
sort
:
"
asc
"
,
"
icon
"
:
"
default
"
},
],
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
setData
({
params
:
params
,
post_data
:
params
});
this
.
init
();
},
...
...
@@ -128,4 +136,52 @@ Page({
scroll_lower
(
e
)
{
this
.
get_data_list
();
},
// 搜索条件
form_submit_event
(
e
)
{
this
.
setData
({
post_data
:
e
.
detail
.
value
,
data_page
:
1
});
this
.
popup_form_event_close
();
this
.
get_data_list
(
1
);
},
// 筛选条件关闭
popup_form_event_close
(
e
)
{
this
.
setData
({
is_show_popup_form
:
false
});
},
// 筛选条件开启
popup_form_event_show
(
e
)
{
this
.
setData
({
is_show_popup_form
:
true
});
},
// 筛选
nav_sort_event
(
e
)
{
var
index
=
e
.
target
.
dataset
.
index
||
0
;
var
temp_post_data
=
this
.
data
.
post_data
;
var
temp_search_nav_sort
=
this
.
data
.
search_nav_sort_list
;
var
temp_sort
=
(
temp_search_nav_sort
[
index
][
'
sort
'
]
==
'
desc
'
)
?
'
asc
'
:
'
desc
'
;
for
(
var
i
in
temp_search_nav_sort
)
{
if
(
i
!=
index
)
{
if
(
temp_search_nav_sort
[
i
][
'
icon
'
]
!=
null
)
{
temp_search_nav_sort
[
i
][
'
icon
'
]
=
'
default
'
;
}
temp_search_nav_sort
[
i
][
'
sort
'
]
=
'
desc
'
;
}
}
temp_search_nav_sort
[
index
][
'
sort
'
]
=
temp_sort
;
if
(
temp_search_nav_sort
[
index
][
'
icon
'
]
!=
null
)
{
temp_search_nav_sort
[
index
][
'
icon
'
]
=
temp_sort
;
}
temp_post_data
[
'
order_by_field
'
]
=
temp_search_nav_sort
[
index
][
'
field
'
];
temp_post_data
[
'
order_by_type
'
]
=
temp_sort
;
this
.
setData
({
post_data
:
temp_post_data
,
search_nav_sort_list
:
temp_search_nav_sort
,
data_page
:
1
,
});
this
.
get_data_list
(
1
);
},
});
alipay/pages/goods-search/goods-search.json
浏览文件 @
3aaa31cc
{
"pullRefresh"
:
true
"pullRefresh"
:
true
,
"usingComponents"
:
{
"popup"
:
"mini-antui/es/popup/index"
}
}
\ No newline at end of file
alipay/pages/index/index.acss
浏览文件 @
3aaa31cc
/**
* 搜索
*/
.search {
left: 0;
top: 20rpx;
box-sizing: border-box;
padding: 15rpx 20rpx;
background: #d2364c;
}
.search-content {
border-radius: 6rpx;
position: relative;
}
.search icon {
position: absolute;
left: 10rpx;
top: 10rpx;
}
.search input {
font-size: 28rpx;
padding-left: 50rpx;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
}
/**
* 楼层数据
*/
.floor-list, .floor-left {
overflow: hidden;
position: relative;
...
...
alipay/pages/index/index.axml
浏览文件 @
3aaa31cc
<!-- 搜索 -->
<view class="search wh-auto">
<view class="search-content bg-white oh">
<icon type="search" size="16" />
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto" onConfirm="search_input_event" />
</view>
</view>
<!-- 轮播 -->
<component-home-banner />
...
...
alipay/pages/index/index.js
浏览文件 @
3aaa31cc
...
...
@@ -72,6 +72,20 @@ Page({
});
},
// 搜索事件
search_input_event
(
e
)
{
var
keywords
=
e
.
detail
.
value
||
null
;
if
(
keywords
==
null
)
{
my
.
showToast
({
content
:
'
请输入搜索关键字
'
});
return
false
;
}
// 进入搜索页面
my
.
navigateTo
({
url
:
'
/pages/goods-search/goods-search?keywords=
'
+
keywords
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
...
...
alipay/pages/user-order/user-order.js
浏览文件 @
3aaa31cc
...
...
@@ -293,7 +293,7 @@ Page({
if
(
res
.
data
.
code
==
0
)
{
var
temp_data_list
=
this
.
data
.
data_list
;
temp_data_list
[
index
][
'
status
'
]
=
5
;
temp_data_list
[
index
][
'
status_
text
'
]
=
'
已取消
'
;
temp_data_list
[
index
][
'
status_
name
'
]
=
'
已取消
'
;
this
.
setData
({
data_list
:
temp_data_list
});
my
.
showToast
({
...
...
@@ -346,7 +346,7 @@ Page({
if
(
res
.
data
.
code
==
0
)
{
var
temp_data_list
=
this
.
data
.
data_list
;
temp_data_list
[
index
][
'
status
'
]
=
4
;
temp_data_list
[
index
][
'
status_
text
'
]
=
'
已完成
'
;
temp_data_list
[
index
][
'
status_
name
'
]
=
'
已完成
'
;
this
.
setData
({
data_list
:
temp_data_list
});
my
.
showToast
({
...
...
service/Application/Api/Controller/BuyController.class.php
浏览文件 @
3aaa31cc
...
...
@@ -48,7 +48,7 @@ class BuyController extends CommonController
public
function
Index
()
{
// 获取商品列表
$params
=
$
_POST
;
$params
=
$
this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
$ret
=
BuyService
::
BuyTypeGoodsList
(
$params
);
...
...
@@ -94,7 +94,7 @@ class BuyController extends CommonController
*/
public
function
Add
()
{
$params
=
$
_POST
;
$params
=
$
this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
$ret
=
BuyService
::
OrderAdd
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
...
...
service/Application/Api/Controller/CommonController.class.php
浏览文件 @
3aaa31cc
...
...
@@ -46,9 +46,9 @@ class CommonController extends Controller
$this
->
CommonInit
();
// 输入参数
$this
->
data_post
=
I
(
'post.'
)
;
$this
->
data_get
=
I
(
'get.'
)
;
$this
->
data_request
=
I
(
'request.'
)
;
$this
->
data_post
=
$_POST
;
$this
->
data_get
=
$_GET
;
$this
->
data_request
=
$_REQUEST
;
}
/**
...
...
service/Application/Api/Controller/OrderController.class.php
浏览文件 @
3aaa31cc
...
...
@@ -130,34 +130,16 @@ class OrderController extends CommonController
*/
public
function
Cancel
()
{
if
(
empty
(
$this
->
data_post
[
'id'
]))
{
$this
->
ajaxReturn
(
'请选择订单'
);
}
$m
=
M
(
'Order'
);
$where
=
[
'id'
=>
intval
(
$this
->
data_post
[
'id'
]),
'user_id'
=>
$this
->
user
[
'id'
]];
$data
=
$m
->
where
(
$where
)
->
field
(
'id,status'
)
->
find
();
if
(
empty
(
$data
))
{
$this
->
ajaxReturn
(
L
(
'common_data_no_exist_error'
));
}
if
(
!
in_array
(
$data
[
'status'
],
[
0
,
1
]))
{
$status_text
=
L
(
'common_order_user_status'
)[
$data
[
'status'
]][
'name'
];
$this
->
ajaxReturn
(
'状态不可操作['
.
$status_text
.
']'
);
}
$save_data
=
[
'status'
=>
5
,
'cancel_time'
=>
time
(),
'upd_time'
=>
time
()];
if
(
$m
->
where
(
$where
)
->
save
(
$save_data
))
{
$this
->
ajaxReturn
(
L
(
'common_cancel_success'
),
0
);
}
$this
->
ajaxReturn
(
L
(
'common_cancel_error'
));
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$ret
=
OrderService
::
OrderCancel
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
/**
* [Collect 订单
完成
]
* [Collect 订单
收货
]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -165,127 +147,31 @@ class OrderController extends CommonController
*/
public
function
Collect
()
{
if
(
empty
(
$this
->
data_post
[
'id'
]))
{
$this
->
ajaxReturn
(
'请选择订单'
);
}
$m
=
M
(
'Order'
);
$where
=
[
'id'
=>
intval
(
$this
->
data_post
[
'id'
]),
'user_id'
=>
$this
->
user
[
'id'
]];
$data
=
$m
->
where
(
$where
)
->
field
(
'id,status'
)
->
find
();
if
(
empty
(
$data
))
{
$this
->
ajaxReturn
(
L
(
'common_data_no_exist_error'
));
}
if
(
!
in_array
(
$data
[
'status'
],
[
3
]))
{
$status_text
=
L
(
'common_order_user_status'
)[
$data
[
'status'
]][
'name'
];
$this
->
ajaxReturn
(
'状态不可操作['
.
$status_text
.
']'
);
}
$save_data
=
[
'status'
=>
4
,
'success_time'
=>
time
(),
'upd_time'
=>
time
()];
if
(
$m
->
where
(
$where
)
->
save
(
$save_data
))
{
$this
->
ajaxReturn
(
L
(
'common_confirm_success'
),
0
);
}
$this
->
ajaxReturn
(
L
(
'common_confirm_error'
));
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$ret
=
OrderService
::
OrderCollect
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
// /**
// * [Pay 订单支付]
// * @author Devil
// * @blog http://gong.gg/
// * @version 1.0.0
// * @datetime 2018-07-22T22:10:46+0800
// */
// public function Pay()
// {
// if(empty($this->data_post['id']))
// {
// $this->ajaxReturn('请选择订单');
// }
// $m = M('Order');
// $where = ['id'=>intval($this->data_post['id']), 'user_id' => $this->user['id']];
// $data = $m->where($where)->field('id,status,total_price')->find();
// if(empty($data))
// {
// $this->ajaxReturn(L('common_data_no_exist_error'));
// }
// if($data['total_price'] <= 0.00)
// {
// $this->ajaxReturn('金额不能为0');
// }
// if($data['status'] != 1)
// {
// $status_text = L('common_order_user_status')[$data['status']]['name'];
// $this->ajaxReturn('状态不可操作['.$status_text.']');
// }
// // 发起支付
// $notify_url = __MY_URL__.'Notify/order.php';
// $pay_data = array(
// 'out_user' => md5($this->user['id']),
// 'order_sn' => $data['id'].GetNumberCode(6),
// 'name' => '订单支付',
// 'total_price' => $data['total_price'],
// 'notify_url' => $notify_url,
// );
// $pay = (new \Library\Alipay())->SoonPay($pay_data, C("alipay_key_secret"));
// if(empty($pay))
// {
// $this->ajaxReturn('支付接口异常');
// }
// $this->ajaxReturn(L('common_operation_success'), 0, $pay);
// }
/**
*
确认
*
订单删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-06-18T00:10:32+0800
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-30
* @desc description
*/
public
function
Confirm
()
public
function
Delete
()
{
die
(
'error'
);
// 参数
$params
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'请选择订单'
,
]
];
$ret
=
params_checked
(
$this
->
data_post
,
$params
);
if
(
$ret
!==
true
)
{
$this
->
ajaxReturn
(
$ret
);
}
// 订单处理
$m
=
M
(
'Order'
);
$where
=
[
'id'
=>
intval
(
$this
->
data_post
[
'id'
]),
'user_id'
=>
$this
->
user
[
'id'
]];
$data
=
$m
->
where
(
$where
)
->
field
(
'id,status'
)
->
find
();
if
(
empty
(
$data
))
{
$this
->
ajaxReturn
(
L
(
'common_data_no_exist_error'
));
}
// 状态
if
(
$temp
[
'status'
]
!=
0
)
{
$status_text
=
L
(
'common_order_user_status'
)[
$data
[
'status'
]][
'name'
];
$this
->
ajaxReturn
(
'状态不可操作['
.
$status_text
.
']'
);
}
// 开始处理
$save_data
=
[
'status'
=>
1
,
'confirm_time'
=>
time
(),
'upd_time'
=>
time
()];
if
(
$m
->
where
(
$where
)
->
save
(
$data
))
{
$this
->
ajaxReturn
(
L
(
'common_confirm_success'
),
0
);
}
$this
->
ajaxReturn
(
L
(
'common_confirm_error'
));
$params
=
$this
->
data_post
;
$params
[
'user_id'
]
=
$this
->
user
[
'id'
];
$params
[
'creator'
]
=
$this
->
user
[
'id'
];
$params
[
'creator_name'
]
=
$this
->
user
[
'user_name_view'
];
$params
[
'user_type'
]
=
'user'
;
$ret
=
OrderService
::
OrderDelete
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
}
...
...
service/Application/Service/SearchService.class.php
浏览文件 @
3aaa31cc
...
...
@@ -87,18 +87,20 @@ class SearchService
if
(
!
empty
(
$params
[
'screening_price_id'
]))
{
$price
=
M
(
'ScreeningPrice'
)
->
field
(
'min_price,max_price'
)
->
where
([
'is_enable'
=>
1
,
'id'
=>
intval
(
$params
[
'screening_price_id'
])])
->
find
();
if
(
!
empty
(
$price
[
'min_price'
])
&&
!
empty
(
$price
[
'max_price'
]))
$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'
,
$p
rice
[
'min_price'
]],
[
'LT'
,
$p
rice
[
'max_price'
]],
[
'EGT'
,
$p
arams
[
'min_price'
]],
[
'LT'
,
$p
arams
[
'max_price'
]],
];
}
else
if
(
!
empty
(
$p
rice
[
'min_price'
]))
}
else
if
(
!
empty
(
$p
arams
[
'min_price'
]))
{
$where
[
'g.price'
]
=
[
'EGT'
,
$p
rice
[
'min_price'
]];
}
else
if
(
!
empty
(
$p
rice
[
'max_price'
]))
$where
[
'g.price'
]
=
[
'EGT'
,
$p
arams
[
'min_price'
]];
}
else
if
(
!
empty
(
$p
arams
[
'max_price'
]))
{
$where
[
'g.price'
]
=
[
'LT'
,
$p
rice
[
'max_price'
]];
$where
[
'g.price'
]
=
[
'LT'
,
$p
arams
[
'max_price'
]];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录