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
Show 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*
...
@@ -19,3 +19,4 @@ yarn-error.log*
*.sln
*.sln
*.sw*
*.sw*
/view
/view
/view
src/store/modules/xianhuo/xianhuo.js
View file @
5e48c457
...
@@ -18,7 +18,8 @@ const state = {
...
@@ -18,7 +18,8 @@ const state = {
classLight
:
{},
classLight
:
{},
zyFilterData
:
{},
//过滤数据
zyFilterData
:
{},
//过滤数据
zyData
:
[],
zyData
:
[],
total
:
0
,
loading
:
false
,
finished
:
false
}
}
const
mutations
=
{
const
mutations
=
{
xianhuo
(
state
,
payload
)
{
xianhuo
(
state
,
payload
)
{
...
@@ -33,7 +34,7 @@ const mutations = {
...
@@ -33,7 +34,7 @@ const mutations = {
}
else
if
(
payload
.
type
==
"class_light"
)
{
}
else
if
(
payload
.
type
==
"class_light"
)
{
state
.
classLight
=
payload
.
data
;
state
.
classLight
=
payload
.
data
;
}
else
if
(
payload
.
type
==
"zydata"
)
{
}
else
if
(
payload
.
type
==
"zydata"
)
{
state
.
zyData
=
payload
.
data
state
.
zyData
=
state
.
zyData
.
concat
(
payload
.
data
)
}
}
}
}
}
}
...
@@ -41,10 +42,14 @@ const actions = {
...
@@ -41,10 +42,14 @@ const actions = {
getZyData
({
getZyData
({
commit
commit
},
payload
)
{
},
payload
)
{
state
.
loading
=
true
;
state
.
finished
=
false
;
let
p
=
payload
.
data
.
params
;
console
Services
.
getZyData
(
qs
.
stringify
(
payload
.
data
)).
then
((
res
)
=>
{
Services
.
getZyData
(
qs
.
stringify
(
payload
.
data
)).
then
((
res
)
=>
{
state
.
loading
=
false
;
let
data
=
res
.
data
;
let
data
=
res
.
data
;
if
(
data
.
error_code
==
0
)
{
if
(
data
.
error_code
==
0
)
{
state
.
total
=
data
.
data
.
total
;
if
(
data
.
data
.
aggs
)
{
if
(
data
.
data
.
aggs
)
{
commit
(
"xianhuo"
,
{
//过滤数据
commit
(
"xianhuo"
,
{
//过滤数据
type
:
"filter"
,
type
:
"filter"
,
...
@@ -83,6 +88,7 @@ const actions = {
...
@@ -83,6 +88,7 @@ const actions = {
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
state
.
loading
=
false
;
});
});
}
}
}
}
...
...
src/views/xianhuo/xianhuo.vue
View file @
5e48c457
...
@@ -143,12 +143,10 @@
...
@@ -143,12 +143,10 @@
</div>
</div>
<div
class=
"content_scroll"
>
<div
class=
"content_scroll"
>
<van-list
<van-list
v-model=
"loading"
v-model=
"loading
Xh
"
:finished=
"finished"
:finished=
"finished"
finished-text=
"我是有底线的噢"
finished-text=
"我是有底线的噢"
@
load=
"onLoad"
@
load=
"onLoad"
error-text=
"请求失败,点击重新加载"
:immediate-check=
"true"
>
>
<GoodsOne
:dataList=
"zyData"
></GoodsOne>
<GoodsOne
:dataList=
"zyData"
></GoodsOne>
</van-list>
</van-list>
...
@@ -203,9 +201,8 @@ export default {
...
@@ -203,9 +201,8 @@ export default {
isResetData
:
false
,
//是否重置数据
isResetData
:
false
,
//是否重置数据
isShowRight
:
false
,
//是否展示右侧
isShowRight
:
false
,
//是否展示右侧
list
:
[],
list
:
[],
loading
:
false
,
loadingXh
:
false
,
finished
:
false
,
p
:
0
p
:
1
};
};
},
},
created
()
{},
created
()
{},
...
@@ -218,10 +215,15 @@ export default {
...
@@ -218,10 +215,15 @@ export default {
classLight
:
state
=>
state
.
xianhuo
.
classLight
,
classLight
:
state
=>
state
.
xianhuo
.
classLight
,
zyFilterData
:
state
=>
state
.
xianhuo
.
zyFilterData
,
zyFilterData
:
state
=>
state
.
xianhuo
.
zyFilterData
,
zyData
:
state
=>
state
.
xianhuo
.
zyData
,
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
:
{
watch
:
{
loading
(
now
)
{
this
.
loadingXh
=
now
;
},
zyRankInit
(
now
)
{
zyRankInit
(
now
)
{
this
.
getZyData
();
this
.
getZyData
();
},
},
...
@@ -244,6 +246,8 @@ export default {
...
@@ -244,6 +246,8 @@ export default {
},
},
methods
:
{
methods
:
{
onLoad
()
{
onLoad
()
{
console
.
log
(
this
.
loadingXh
);
this
.
p
++
;
this
.
getZyData
();
this
.
getZyData
();
},
},
toSearch
()
{},
toSearch
()
{},
...
@@ -298,7 +302,7 @@ export default {
...
@@ -298,7 +302,7 @@ export default {
}
}
},
},
getZyData
(
rightFilter
=
{})
{
getZyData
(
rightFilter
=
{})
{
let
params
=
{
p
:
1
,
offset
:
10
};
let
params
=
{
p
:
this
.
p
,
offset
:
10
};
let
rightFilterStr
=
JSON
.
stringify
(
rightFilter
);
let
rightFilterStr
=
JSON
.
stringify
(
rightFilter
);
if
(
this
.
addClassStr
)
{
if
(
this
.
addClassStr
)
{
params
[
"class_id/condition"
]
=
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