Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
h5-base
Commits
62a31627
Commit
62a31627
authored
Jul 05, 2019
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
liwei
parent
c8c8d69a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
244 additions
and
9 deletions
+244
-9
inviteFriends.vue
src/components/buy/inviteFriends.vue
+34
-6
inviteRecordList.vue
src/components/buy/inviteRecordList.vue
+198
-0
main.js
src/main.js
+3
-3
index.js
src/router/index.js
+9
-0
No files found.
src/components/buy/inviteFriends.vue
View file @
62a31627
...
...
@@ -6,11 +6,11 @@
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title1.png"
alt
/>
<p
class=
"cell-content money"
>
<span>
100
</span>
<span>
{{
earnings
}}
</span>
<span>
元
</span>
</p>
<p
class=
"cell-content people"
>
<span>
10
</span>
<span>
{{
userNum
}}
</span>
<span>
人
</span>
</p>
<div
class=
"invite-record-btn"
@
click=
"lookMyInviteRecords"
>
...
...
@@ -57,14 +57,15 @@
</div>
</
template
>
<
script
>
// import Vue from "vue";
// import { Image } from "vant";
// Vue.use(Image);
import
{
getInviteResultApi
,
getInviteListApi
}
from
"../../service/api"
;
export
default
{
name
:
"inviteFriends"
,
components
:
{},
data
()
{
return
{
earnings
:
0
,
userNum
:
0
,
records
:
[
{
name
:
"test"
,
...
...
@@ -93,11 +94,38 @@ export default {
]
};
},
mounted
()
{
this
.
getInviteResult
();
this
.
getInviteList
();
},
methods
:
{
lookMyInviteRecords
()
{
this
.
$refs
.
inviteRecord
.
scrollIntoView
();
},
lookMoreRecord
()
{}
lookMoreRecord
()
{},
getInviteResult
()
{
let
id
=
this
.
$route
.
query
.
shopId
;
id
=
46
;
getInviteResultApi
({},
id
).
then
(
res
=>
{
this
.
earnings
=
res
.
earnings
;
this
.
userNum
=
res
.
user_num
;
});
},
getInviteList
()
{
let
json
=
{
page
:
1
,
limit
:
6
};
let
id
=
this
.
$route
.
query
.
shopId
;
id
=
46
;
getInviteListApi
(
json
,
id
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
.
list
&&
res
.
list
.
length
>
0
)
{
this
.
records
=
res
.
list
;
}
}
});
}
}
};
</
script
>
...
...
src/components/buy/inviteRecordList.vue
0 → 100644
View file @
62a31627
<
template
>
<div
class=
"invite-record-list"
>
<div
class=
"title"
ref=
"title"
>
<span>
邀请记录
</span>
<span>
购买时间
</span>
</div>
<div
class=
"container"
:style=
"
{height: height+'px'}">
<ul>
<li
v-for=
"(item,index) in list"
:key=
"index"
>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
buy_date
}}
</p>
</li>
</ul>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"inviteRecordList"
,
data
()
{
return
{
height
:
0
,
pullup
:
true
,
list
:
[
{
name
:
"test111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test11111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
}
]
};
},
mounted
()
{
let
self
=
this
;
this
.
height
=
window
.
innerHeight
-
this
.
$refs
.
title
.
getBoundingClientRect
().
bottom
-
this
.
$refs
.
title
.
getBoundingClientRect
().
height
;
},
methods
:
{
onReachBottom
()
{
console
.
log
(
"onReachBottom"
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
@import "../../util/public";
@tocurrentvw : 1/2 * @toVw;
@tocurrentvh : 1/2 * @toVh;
.invite-record-list {
display: flex;
flex-direction: column;
margin: 64 * @tocurrentvh auto;
width: 688 * @tocurrentvw;
.title {
margin: 0;
height: 76 * @tocurrentvh;
display: flex;
align-items: center;
background-color: #fbebe3;
border-radius: 5 * @tocurrentvw;
font-size: 28 * @tocurrentvw;
font-weight: 400;
color: #eb7162;
}
.container {
margin: 0;
width: 100%;
overflow: hidden;
ul {
li {
height: 65 * @tocurrentvh;
width: 100%;
display: flex;
align-items: center;
border-radius: 5 * @tocurrentvw;
font-size: 28 * @tocurrentvw;
font-weight: 400;
color: #696765;
&:nth-child(odd) {
background-color: #fff;
}
&:nth-child(even) {
background-color: #fffaf8;
}
p {
text-align: center;
width: 40%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}
}
}
</
style
>
src/main.js
View file @
62a31627
...
...
@@ -40,9 +40,9 @@ Vue.component('scroll', scroll);
// Vue.prototype.$throw = (error)=> errorHandler(error,this);
/* eslint-disable no-new */
//
if (process.env.NODE_ENV != 'production') {
//
new VConsole();
//
}
if
(
process
.
env
.
NODE_ENV
!=
'production'
)
{
new
VConsole
();
}
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
()
...
...
src/router/index.js
View file @
62a31627
...
...
@@ -317,6 +317,15 @@ const router = new Router({
noNew
:
true
,
}
},
{
path
:
'/inviteRecordList'
,
name
:
'inviteRecordList'
,
component
:
e
=>
require
([
'@/components/buy/inviteRecordList'
],
e
),
//
meta
:
{
deep
:
0
,
noNew
:
true
,
}
},
{
path
:
'/activityInvite'
,
name
:
'activityInvite'
,
...
...
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