提交 379e4656 编写于 作者: G gongfuxiang

order

上级 b6e757eb
......@@ -47,7 +47,7 @@ App({
// 请求地址
request_url: "https://demo.shopxo.net/",
//request_url: 'http://localhost/project/shopxo/service/',
request_url: 'http://localhost/project/shopxo/service/',
// 基础信息
application_title: "ShopXO电商系统",
......
{
"pages": [
"pages": ["pages/user-order/user-order",
"pages/index/index",
"pages/goods-category/goods-category",
"pages/cart/cart",
......@@ -15,7 +15,7 @@
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
"pages/user-order/user-order",
"pages/user-order-detail/user-order-detail",
"pages/user-faovr/user-faovr",
"pages/user-answer-list/user-answer-list",
......
......@@ -43,11 +43,11 @@
font-size: 24rpx;
height: 50rpx;
line-height: 50rpx;
background: #efefef;
background: #fbfbfb;
border-radius: 6rpx;
}
.screening-price input {
width: 220rpx;
border-radius: 6rpx;
}
.screening-price .separator {
margin-top: 20rpx;
......@@ -75,6 +75,9 @@
/**
* 排序导航
*/
.nav-sort {
background: #eee;
}
.nav-sort-content .item {
height: 80rpx;
line-height: 80rpx;
......
<!-- 排序 -->
<view class="nav-sort oh br-b">
<view class="nav-sort oh">
<view class="nav-sort-content">
<block a:for="{{search_nav_sort_list}}">
<view class="item tc fl" data-index="{{index}}" onTap="nav_sort_event">
......
......@@ -56,13 +56,17 @@ Page({
data_list_loding_status: 1
});
// 获取数据
// 参数
var params = this.data.params;
params['page'] = this.data.data_page;
var post_data = this.data.post_data;
post_data['page'] = this.data.data_page;
post_data['category_id'] = params['category_id'] || 0;
// 获取数据
my.httpRequest({
url: app.get_request_url("Index", "Search"),
method: "POST",
data: this.data.post_data,
data: post_data,
dataType: "json",
success: res => {
my.hideLoading();
......
......@@ -5,24 +5,25 @@
left: 0;
top: 20rpx;
box-sizing: border-box;
padding: 15rpx 20rpx;
padding: 20rpx;
background: #d2364c;
}
.search-content {
border-radius: 6rpx;
position: relative;
opacity: 0.8;
}
.search icon {
position: absolute;
left: 10rpx;
top: 10rpx;
left: 15rpx;
top: 15rpx;
}
.search input {
font-size: 28rpx;
padding-left: 50rpx;
padding-left: 60rpx;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
height: 70rpx;
line-height: 70rpx;
}
/**
......
......@@ -2,7 +2,7 @@
<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" />
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" onConfirm="search_input_event" />
</view>
</view>
......
/*
头部搜索框
*/
.search-content{
height: 120rpx;
padding: 25rpx 10rpx;
box-sizing: border-box;
}
.search-box{
border: 1px solid #eee;
border-radius: 2rpx;
height: 70rpx;
}
.search-box .search{
width: calc(100% - 111rpx);
height: 75rpx;
line-height: 75rpx;
font-size: 28rpx;
box-sizing: border-box;
color: #4a4a4a;
}
.search-box .search-btn {
width: 100rpx;
box-sizing: border-box;
margin: 12rpx 0;
height: 50rpx;
border-left: solid 1px #e3e3e3;
}
.search-btn .search-icon{
margin: 8rpx 0;
* 导航
*/
.nav {
background: #eee;
height: 70rpx;
line-height: 70rpx;
}
.nav .item {
width: 16.66%;
}
/*
主体
*/
* 列表
*/
.scroll-box{
height: calc(100vh - 120rpx);
height: calc(100vh - 70rpx);
}
.goods-base {
min-height: 160rpx;
......
<!-- 搜索 -->
<view class="search-content bg-white">
<view class="search-box oh">
<input class="search" type="text" onInput="input_event" placeholder="收件人/电话/单号" />
<view class="search-btn tc fr" onTap="search_event">
<icon class="search-icon" type="search" size="16" />
</view>
</view>
<!-- 导航 -->
<view class="nav">
<block a:for="{{nav_status_list}}">
<view a:if="{{nav_status_index == index}}" class="item fl tc cr-main" data-index="{{index}}" onTap="nav_event">{{item.name}}</view>
<view a:else class="item fl tc" data-index="{{index}}" onTap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 订单列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
<view class="list-content spacing">
<view class="list-content">
<view class="list-item bg-white spacing-mb" a:if="{{data_list.length > 0}}" a:for="{{data_list}}">
<view class="item-base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
......
......@@ -14,6 +14,15 @@ Page({
payment_id: 0,
temp_pay_value: 0,
temp_pay_index: 0,
nav_status_list: [
{ name: "全部", value: "-1" },
{ name: "待付款", value: "0,1" },
{ name: "待发货", value: "2" },
{ name: "待收货", value: "3" },
{ name: "已完成", value: "4" },
{ name: "已失效", value: "5,6" },
],
nav_status_index: 0,
},
onLoad(params) {
......@@ -46,14 +55,6 @@ Page({
this.setData({input_keyword_value: e.detail.value});
},
// 搜索事件
search_event() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
......@@ -69,13 +70,18 @@ Page({
data_list_loding_status: 1
});
// 参数
var order_status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据
my.httpRequest({
url: app.get_request_url("Index", "Order"),
method: "POST",
data: {
page: this.data.data_page,
keywords: this.data.input_keyword_value || ""
keywords: this.data.input_keyword_value || "",
status: order_status,
is_more: 1,
},
dataType: "json",
success: res => {
......@@ -116,6 +122,7 @@ Page({
data_page: this.data.data_page + 1,
load_status: 1,
payment_list: res.data.data.payment_list || [],
nav_status_list: res.data.data.nav_status_list || [],
});
// 是否还有数据
......@@ -380,4 +387,13 @@ Page({
content: "催促成功"
});
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.target.dataset.index || 0,
data_page: 1,
});
this.get_data_list(1);
},
});
......@@ -68,12 +68,23 @@ class OrderController extends CommonController
// 支付方式
$payment_list = ResourcesService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]);
// 导航状态列表
$nav_status_list = [
['name'=>'全部', 'value'=>'-1'],
['name'=>'待付款', 'value'=>'0,1'],
['name'=>'待发货', 'value'=>'2'],
['name'=>'待收货', 'value'=>'3'],
['name'=>'已完成', 'value'=>'4'],
['name'=>'已失效', 'value'=>'5,6'],
];
// 返回数据
$result = [
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
'payment_list' => $payment_list,
'total' => $total,
'page_total' => $page_total,
'data' => $data['data'],
'payment_list' => $payment_list,
'nav_status_list' => $nav_status_list,
];
$this->ajaxReturn(L('common_operation_success'), 0, $result);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册