Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
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
5e48c457
authored
May 21, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
h5自营
parent
d3987db0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
11 deletions
.gitignore
src/store/modules/xianhuo/xianhuo.js
src/views/xianhuo/xianhuo.vue
view/index.html
.gitignore
View file @
5e48c457
...
...
@@ -19,3 +19,4 @@ yarn-error.log*
*.sln
*.sw*
/view
/view
src/store/modules/xianhuo/xianhuo.js
View file @
5e48c457
...
...
@@ -18,7 +18,8 @@ const state = {
classLight
:
{},
zyFilterData
:
{},
//过滤数据
zyData
:
[],
total
:
0
,
loading
:
false
,
finished
:
false
}
const
mutations
=
{
xianhuo
(
state
,
payload
)
{
...
...
@@ -33,7 +34,7 @@ const mutations = {
}
else
if
(
payload
.
type
==
"class_light"
)
{
state
.
classLight
=
payload
.
data
;
}
else
if
(
payload
.
type
==
"zydata"
)
{
state
.
zyData
=
payload
.
data
state
.
zyData
=
state
.
zyData
.
concat
(
payload
.
data
)
}
}
}
...
...
@@ -41,10 +42,14 @@ const actions = {
getZyData
({
commit
},
payload
)
{
state
.
loading
=
true
;
state
.
finished
=
false
;
let
p
=
payload
.
data
.
params
;
console
Services
.
getZyData
(
qs
.
stringify
(
payload
.
data
)).
then
((
res
)
=>
{
state
.
loading
=
false
;
let
data
=
res
.
data
;
if
(
data
.
error_code
==
0
)
{
state
.
total
=
data
.
data
.
total
;
if
(
data
.
data
.
aggs
)
{
commit
(
"xianhuo"
,
{
//过滤数据
type
:
"filter"
,
...
...
@@ -83,6 +88,7 @@ const actions = {
}
}).
catch
(
function
(
err
)
{
state
.
loading
=
false
;
});
}
}
...
...
src/views/xianhuo/xianhuo.vue
View file @
5e48c457
...
...
@@ -143,12 +143,10 @@
</div>
<div
class=
"content_scroll"
>
<van-list
v-model=
"loading"
v-model=
"loading
Xh
"
:finished=
"finished"
finished-text=
"我是有底线的噢"
@
load=
"onLoad"
error-text=
"请求失败,点击重新加载"
:immediate-check=
"true"
>
<GoodsOne
:dataList=
"zyData"
></GoodsOne>
</van-list>
...
...
@@ -203,9 +201,8 @@ export default {
isResetData
:
false
,
//是否重置数据
isShowRight
:
false
,
//是否展示右侧
list
:
[],
loading
:
false
,
finished
:
false
,
p
:
1
loadingXh
:
false
,
p
:
0
};
},
created
()
{},
...
...
@@ -218,10 +215,15 @@ export default {
classLight
:
state
=>
state
.
xianhuo
.
classLight
,
zyFilterData
:
state
=>
state
.
xianhuo
.
zyFilterData
,
zyData
:
state
=>
state
.
xianhuo
.
zyData
,
total
:
state
=>
state
.
xianhuo
.
total
total
:
state
=>
state
.
xianhuo
.
total
,
loading
:
state
=>
state
.
xianhuo
.
loading
,
finished
:
state
=>
state
.
xianhuo
.
finished
})
},
watch
:
{
loading
(
now
)
{
this
.
loadingXh
=
now
;
},
zyRankInit
(
now
)
{
this
.
getZyData
();
},
...
...
@@ -244,6 +246,8 @@ export default {
},
methods
:
{
onLoad
()
{
console
.
log
(
this
.
loadingXh
);
this
.
p
++
;
this
.
getZyData
();
},
toSearch
()
{},
...
...
@@ -298,7 +302,7 @@ export default {
}
},
getZyData
(
rightFilter
=
{})
{
let
params
=
{
p
:
1
,
offset
:
10
};
let
params
=
{
p
:
this
.
p
,
offset
:
10
};
let
rightFilterStr
=
JSON
.
stringify
(
rightFilter
);
if
(
this
.
addClassStr
)
{
params
[
"class_id/condition"
]
=
this
.
addClassStr
;
...
...
view/index.html
deleted
100644 → 0
View file @
d3987db0
This diff is collapsed.
Click to expand it.
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