Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f4ccffe9
authored
May 25, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
70a392dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
pages/mine/shoporder.vue
pages/mine/shoporder.vue
View file @
f4ccffe9
...
...
@@ -15,7 +15,7 @@
<view
class=
"tab row avarage verCenter"
>
<view
class=
"box row rowCenter verCenter"
v-for=
"(item, index) in arr"
:class=
"
{ curr: index == curr }" :key="index" @click="tab(index)">
<text
class=
"t2"
>
{{
item
}}
</text>
<text
class=
"t3"
>
(
0
)
</text>
<text
class=
"t3"
>
(
{{
count
[
index
]
}}
)
</text>
</view>
</view>
</view>
...
...
@@ -155,12 +155,13 @@ export default {
return
{
kfqq
:
''
,
time
:
currentDate
,
arr
:
[
'全部'
,
'待付款'
,
'待收货'
,
'已完结订单'
],
arr
:
[],
curr
:
0
,
list
:
[],
currencyIndex
:
0
,
currency_arr
:
[
'全部'
,
'人民币'
,
'美元'
],
tipType
:
1
,
count
:
[],
searchParams
:
{
order_sn
:
''
,
p
:
1
,
...
...
@@ -187,7 +188,7 @@ export default {
*/
handleInput
:
debounce
(
function
(
event
)
{
this
.
getData
();
},
8
00
),
},
5
00
),
getDate
(
type
)
{
const
date
=
new
Date
();
let
year
=
date
.
getFullYear
();
...
...
@@ -206,13 +207,13 @@ export default {
tab
(
index
)
{
this
.
curr
=
index
;
if
(
index
==
0
)
{
this
.
searchParams
.
status
=
''
;
this
.
searchParams
.
status
=
0
;
}
else
if
(
index
==
1
)
{
this
.
searchParams
.
status
=
2
;
this
.
searchParams
.
status
=
'2,3'
;
}
else
if
(
index
==
2
)
{
this
.
searchParams
.
status
=
8
;
this
.
searchParams
.
status
=
'7,8'
;
}
else
if
(
index
==
3
)
{
this
.
searchParams
.
status
=
10
;
this
.
searchParams
.
status
=
'-1,10'
;
}
this
.
getData
();
},
...
...
@@ -440,6 +441,20 @@ export default {
});
},
getData
()
{
this
.
request
(
Api_Url
+
'/order/count'
,
'POST'
,
{
status
:
'1,2,3,4,7,8,10,-1'
,
mul
:
1
},
false
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
arr
=
[
'全部'
,
'待付款'
,
'待收货'
,
'已完结订单'
];
let
num
=
0
;
for
(
var
i
in
res
.
data
)
{
num
+=
Number
(
res
.
data
[
i
]);
}
this
.
count
[
0
]
=
num
;
this
.
count
[
1
]
=
Number
(
res
.
data
[
2
])
+
Number
(
res
.
data
[
3
]);
//待付款
this
.
count
[
2
]
=
Number
(
res
.
data
[
7
])
+
Number
(
res
.
data
[
8
]);
//待收货
this
.
count
[
3
]
=
Number
(
res
.
data
[
-
1
])
+
Number
(
res
.
data
[
10
]);
//已完结订单
}
});
this
.
request
(
Api_Url
+
'/order/lists'
,
'POST'
,
this
.
searchParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment