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
be76e4d5
authored
Sep 10, 2019
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
阿斯达
parent
3163d964
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
70 deletions
src/views/home/Index.vue
view/4.js
src/views/home/Index.vue
View file @
be76e4d5
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
</div>
</div>
<ul
class=
"list boxsiz"
>
<ul
class=
"list boxsiz"
>
<li
class=
"boxsiz"
v-for=
"(v,index) in item.data.pointGoods"
:key=
"index"
>
<li
class=
"boxsiz"
v-for=
"(v,index) in item.data.pointGoods"
:key=
"index"
>
<a
class=
"boxsiz"
:
href=
"/v3/pointmall"
:target=
"v.window_open > 0 ? '_blank':'_self'"
@
click=
"recordFloorFn(ptag+'-floor'+(count * 1 +1))"
>
<a
class=
"boxsiz"
href=
"/v3/pointmall"
:target=
"v.window_open > 0 ? '_blank':'_self'"
@
click=
"recordFloorFn(ptag+'-floor'+(count * 1 +1))"
>
<div
class=
"pic"
>
<div
class=
"pic"
>
<img
v-lazy=
"v.prize_img_url"
:alt=
"v.prize_name"
>
<img
v-lazy=
"v.prize_img_url"
:alt=
"v.prize_name"
>
</div>
</div>
...
@@ -212,7 +212,7 @@
...
@@ -212,7 +212,7 @@
<i
class=
"lineBlock"
></i>
<i
class=
"lineBlock"
></i>
<span
class=
"t1"
>
资讯中心
</span>
<span
class=
"t1"
>
资讯中心
</span>
</div>
</div>
<a
class=
"r"
:href=
"/news?cat_id=11"
@
click=
"recordFloorFn(ptag+'-dynamic')"
>
<a
class=
"r"
href=
"/news?cat_id=11"
>
<span
class=
"va-m"
>
更多
</span>
<span
class=
"va-m"
>
更多
</span>
<i
class=
"lineBlock va-m"
></i>
<i
class=
"lineBlock va-m"
></i>
</a>
</a>
...
@@ -249,78 +249,78 @@
...
@@ -249,78 +249,78 @@
</template>
</template>
<
script
>
<
script
>
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
{
PullRefresh
,
Loading
,
Lazyload
}
from
'vant'
;
import
Navigator
from
'@/views/common/Navigator.vue'
;
import
Slide
from
'@/views/common/Slide.vue'
;
import
SideBar
from
'@/views/common/SideBar.vue'
;
Vue
.
use
(
PullRefresh
).
use
(
Loading
).
use
(
Lazyload
);
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
{
PullRefresh
,
Loading
,
Lazyload
}
from
'vant'
;
import
Navigator
from
'@/views/common/Navigator.vue'
;
import
Slide
from
'@/views/common/Slide.vue'
;
import
SideBar
from
'@/views/common/SideBar.vue'
;
export
default
{
Vue
.
use
(
PullRefresh
).
use
(
Loading
).
use
(
Lazyload
);
name
:
'index'
,
computed
:
mapState
({
index
:
state
=>
state
.
home
.
index
,
loading
:
state
=>
state
.
home
.
loading
,
loginCheck
:
state
=>
state
.
common
.
loginCheck
}),
data
()
{
return
{
ptag
:
'index'
,
isLoading
:
false
,
height
:
33
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
getData
();
})
},
methods
:
{
getData
()
{
this
.
$store
.
dispatch
({
type
:
'index'
})
},
onRefresh
()
{
setTimeout
(()
=>
{
this
.
isLoading
=
false
;
this
.
$store
.
dispatch
({
type
:
'index'
})
},
1000
);
},
recordFn
(
type
)
{
// if (type == 'login') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-登录"
// });
// } else if (type == 'search') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-搜索"
// });
// } else if (type == 'member') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-会员中心"
// });
// }
},
recordFloorFn
(
type
)
{
//神策预留
},
export
default
{
jump
()
{
name
:
'index'
,
this
.
recordFn
(
'search'
);
computed
:
mapState
({
window
.
location
.
href
=
'/v3/search/search_index.html'
;
index
:
state
=>
state
.
home
.
index
,
}
loading
:
state
=>
state
.
home
.
loading
,
},
loginCheck
:
state
=>
state
.
common
.
loginCheck
components
:
{
}),
Navigator
,
data
()
{
Slide
,
return
{
SideBar
ptag
:
'index'
,
isLoading
:
false
,
height
:
33
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
getData
();
})
},
methods
:
{
getData
()
{
this
.
$store
.
dispatch
({
type
:
'index'
})
},
onRefresh
()
{
setTimeout
(()
=>
{
this
.
isLoading
=
false
;
this
.
$store
.
dispatch
({
type
:
'index'
})
},
1000
);
},
recordFn
(
type
)
{
// if (type == 'login') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-登录"
// });
// } else if (type == 'search') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-搜索"
// });
// } else if (type == 'member') {
// sensors.track('TopNavClick', {
// top_nav_click: "h5-会员中心"
// });
// }
},
recordFloorFn
(
type
)
{
//神策预留
},
jump
()
{
this
.
recordFn
(
'search'
);
window
.
location
.
href
=
'/v3/search/search_index.html'
;
}
},
components
:
{
Navigator
,
Slide
,
SideBar
}
}
}
}
</
script
>
</
script
>
...
...
view/4.js
View file @
be76e4d5
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