Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop-show-h5
Commits
9887c328
提交
9887c328
authored
6月 08, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改订单搜索
上级
82b12ecf
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
75 行增加
和
14 行删除
+75
-14
common.js
src/api/common.js
+1
-1
index.vue
src/pages/home/index.vue
+50
-10
index.vue
src/pages/order/index.vue
+24
-3
没有找到文件。
src/api/common.js
浏览文件 @
9887c328
...
@@ -34,7 +34,7 @@ export function checkPayStatus(params) {
...
@@ -34,7 +34,7 @@ export function checkPayStatus(params) {
* 查询订单列表
* 查询订单列表
*/
*/
export
function
getOrderList
(
data
)
{
export
function
getOrderList
(
data
)
{
return
httpRequest
.
post
(
'/api/shop/order/search'
,
data
)
return
httpRequest
.
post
(
'/api/shop/order/
range/
search'
,
data
)
}
}
/**
/**
* 查询订单详情
* 查询订单详情
...
...
src/pages/home/index.vue
浏览文件 @
9887c328
<
template
>
<
template
>
<div
class=
"main-container"
>
<div
class=
"main-container"
>
<app-search-bar
v-model=
"search"
@
change=
"handleSearchChange"
/>
<van-sticky
class=
"search-cont"
>
<van-search
v-model=
"search"
shape=
"round"
size=
"mini"
background=
"transparent"
placeholder=
"搜索商品"
@
input=
"handleSearchChange"
/>
</van-sticky>
<!--
<div
class=
"notice"
>
<!--
<div
class=
"notice"
>
<van-notice-bar
color=
"#333"
background=
"transparent"
scrollable
text=
"技术是开发它的人的共同灵魂。"
>
<van-notice-bar
color=
"#333"
background=
"transparent"
scrollable
text=
"技术是开发它的人的共同灵魂。"
>
<template
slot=
"left-icon"
>
<template
slot=
"left-icon"
>
...
@@ -20,7 +29,7 @@
...
@@ -20,7 +29,7 @@
class=
"goods-list"
class=
"goods-list"
:finished=
"finished"
:finished=
"finished"
finished-text=
"没有更多了"
finished-text=
"没有更多了"
@
load=
"
goodsListLoad
"
@
load=
"
fetchGoodsList
"
>
>
<div
class=
"goods-item"
v-for=
"item in goodsList"
:key=
"item.id"
@
click=
"handleClick(item)"
>
<div
class=
"goods-item"
v-for=
"item in goodsList"
:key=
"item.id"
@
click=
"handleClick(item)"
>
<div
class=
"thumb"
>
<div
class=
"thumb"
>
...
@@ -76,10 +85,10 @@ export default {
...
@@ -76,10 +85,10 @@ export default {
return
this
.
$route
.
query
return
this
.
$route
.
query
},
},
shop_id
()
{
shop_id
()
{
return
this
.
query
.
shop_id
||
window
.
local
Storage
.
getItem
(
'shop_id'
)
||
'6800681447305773056'
return
this
.
query
.
shop_id
||
window
.
session
Storage
.
getItem
(
'shop_id'
)
||
'6800681447305773056'
},
},
group_id
()
{
group_id
()
{
return
this
.
query
.
group_id
||
window
.
local
Storage
.
getItem
(
'group_id'
)
||
''
return
this
.
query
.
group_id
||
window
.
session
Storage
.
getItem
(
'group_id'
)
||
''
}
}
},
},
methods
:
{
methods
:
{
...
@@ -87,7 +96,14 @@ export default {
...
@@ -87,7 +96,14 @@ export default {
this
.
$router
.
push
({
path
:
'buy'
,
query
:
{
spu_id
:
val
.
spu_id
,
shop_id
:
val
.
shop_id
}
})
this
.
$router
.
push
({
path
:
'buy'
,
query
:
{
spu_id
:
val
.
spu_id
,
shop_id
:
val
.
shop_id
}
})
},
},
handleSearchChange
()
{
handleSearchChange
()
{
this
.
fetchGetList
()
this
.
goodsList
=
[]
this
.
loading
=
false
this
.
finished
=
false
this
.
refreshing
=
false
this
.
page_size
=
'10'
this
.
page
=
'0'
this
.
total
=
0
this
.
fetchGoodsList
()
},
},
imgJsonParse
(
val
)
{
imgJsonParse
(
val
)
{
if
(
typeof
val
===
'string'
&&
typeof
JSON
.
parse
(
val
)
===
'object'
)
{
if
(
typeof
val
===
'string'
&&
typeof
JSON
.
parse
(
val
)
===
'object'
)
{
...
@@ -107,9 +123,9 @@ export default {
...
@@ -107,9 +123,9 @@ export default {
console
.
log
(
1243
)
console
.
log
(
1243
)
},
},
goodsListLoad
()
{
goodsListLoad
()
{
this
.
fetchG
et
List
()
this
.
fetchG
oods
List
()
},
},
fetchG
et
List
()
{
fetchG
oods
List
()
{
const
params
=
{
const
params
=
{
shop_id
:
this
.
shop_id
,
shop_id
:
this
.
shop_id
,
group_id
:
this
.
group_id
,
group_id
:
this
.
group_id
,
...
@@ -120,6 +136,7 @@ export default {
...
@@ -120,6 +136,7 @@ export default {
}
}
getGoodsList
(
params
).
then
(
res
=>
{
getGoodsList
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
msg
===
'成功'
)
{
if
(
res
.
code
===
0
&&
res
.
msg
===
'成功'
)
{
console
.
log
(
this
.
goodsList
)
this
.
goodsList
=
this
.
goodsList
.
concat
(
res
.
data
)
this
.
goodsList
=
this
.
goodsList
.
concat
(
res
.
data
)
}
else
{
}
else
{
this
.
goodsList
=
[]
this
.
goodsList
=
[]
...
@@ -135,9 +152,9 @@ export default {
...
@@ -135,9 +152,9 @@ export default {
}
}
},
},
beforeMount
()
{
beforeMount
()
{
window
.
local
Storage
.
setItem
(
'shop_id'
,
this
.
shop_id
)
window
.
session
Storage
.
setItem
(
'shop_id'
,
this
.
shop_id
)
window
.
local
Storage
.
setItem
(
'group_id'
,
this
.
group_id
)
window
.
session
Storage
.
setItem
(
'group_id'
,
this
.
group_id
)
// this.fetchG
et
List()
// this.fetchG
oods
List()
}
}
}
}
</
script
>
</
script
>
...
@@ -214,4 +231,27 @@ export default {
...
@@ -214,4 +231,27 @@ export default {
}
}
}
}
}
}
.search-cont
{
.van-sticky
{
padding
:
0
.2rem
0
.3rem
0
.3rem
;
.van-search
{
padding
:
0
;
.van-search__content
{
background
:
#fff
;
.van-cell
{
padding
:
5px
8px
5px
0
!
important
;
}
}
}
}
.van-sticky--fixed
{
background
:
#fff
;
box-shadow
:
0
8px
12px
#ebedf0
;
.van-search
{
.van-search__content
{
background
:
#f7f7f7
;
}
}
}
}
</
style
>
</
style
>
src/pages/order/index.vue
浏览文件 @
9887c328
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
size=
"small"
size=
"small"
background=
"#f7f7f7"
background=
"#f7f7f7"
placeholder=
"搜索订单"
placeholder=
"搜索订单"
@
input=
"
fetchOrderList
"
@
input=
"
handleSearch
"
/>
/>
</div>
</div>
<van-tabs
v-model=
"active"
@
change=
"handleTabChange"
>
<van-tabs
v-model=
"active"
@
change=
"handleTabChange"
>
...
@@ -139,6 +139,16 @@ export default {
...
@@ -139,6 +139,16 @@ export default {
// this.fetchOrderList()
// this.fetchOrderList()
},
},
methods
:
{
methods
:
{
handleSearch
()
{
this
.
list
=
[]
this
.
loading
=
false
this
.
finished
=
false
this
.
refreshing
=
false
this
.
page_size
=
'10'
this
.
page
=
'0'
this
.
total
=
0
this
.
fetchOrderList
()
},
handleTabChange
()
{
handleTabChange
()
{
this
.
list
=
[]
this
.
list
=
[]
this
.
page
=
'0'
this
.
page
=
'0'
...
@@ -203,16 +213,27 @@ export default {
...
@@ -203,16 +213,27 @@ export default {
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
page
=
'0'
this
.
page
=
'0'
this
.
fetchOrderList
();
this
.
fetchOrderList
();
console
.
log
(
1243
)
},
},
fetchOrderList
()
{
fetchOrderList
()
{
const
params
=
{
const
params
=
{
shop_id
:
''
,
customer_id
:
this
.
user
.
id
,
customer_id
:
this
.
user
.
id
,
order_status
:
this
.
active
,
order_status
:
this
.
active
,
spu_name
:
this
.
search
,
search_field
:
this
.
search
?
'spu_name'
:
''
,
search_value
:
this
.
search
,
page_size
:
this
.
page_size
,
page_size
:
this
.
page_size
,
payment_method
:
''
,
page
:
this
.
page
page
:
this
.
page
}
}
// const params = {
// shop_id: '6806052866961178624',
// search_field: 'spu_name',
// search_value: '课',
// order_status: '',
// payment_method: '',
// page: '0',
// page_size: '20'
// }
getOrderList
(
params
).
then
(
res
=>
{
getOrderList
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
msg
===
'成功'
)
{
if
(
res
.
code
===
0
&&
res
.
msg
===
'成功'
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
)
this
.
list
=
this
.
list
.
concat
(
res
.
data
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论