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
be6a69c0
Commit
be6a69c0
authored
Jul 05, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.singsingenglish.com/new-sing/wechat
parents
0fda9e9c
62a31627
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
507 additions
and
4 deletions
+507
-4
icon_back.png
src/assets/inviteFriends/icon_back.png
+0
-0
img_bg.png
src/assets/inviteFriends/img_bg.png
+0
-0
img_title1.png
src/assets/inviteFriends/img_title1.png
+0
-0
img_title2.png
src/assets/inviteFriends/img_title2.png
+0
-0
img_title3.png
src/assets/inviteFriends/img_title3.png
+0
-0
img_title4.png
src/assets/inviteFriends/img_title4.png
+0
-0
img_title5.png
src/assets/inviteFriends/img_title5.png
+0
-0
img_title6.png
src/assets/inviteFriends/img_title6.png
+0
-0
inviteFriends.vue
src/components/buy/inviteFriends.vue
+286
-0
inviteRecordList.vue
src/components/buy/inviteRecordList.vue
+198
-0
index.vue
src/components/index.vue
+1
-0
main.js
src/main.js
+3
-3
index.js
src/router/index.js
+18
-0
index.js
src/service/index.js
+1
-1
No files found.
src/assets/inviteFriends/icon_back.png
0 → 100755
View file @
be6a69c0
790 Bytes
src/assets/inviteFriends/img_bg.png
0 → 100755
View file @
be6a69c0
815 KB
src/assets/inviteFriends/img_title1.png
0 → 100755
View file @
be6a69c0
86.9 KB
src/assets/inviteFriends/img_title2.png
0 → 100755
View file @
be6a69c0
587 KB
src/assets/inviteFriends/img_title3.png
0 → 100755
View file @
be6a69c0
1000 KB
src/assets/inviteFriends/img_title4.png
0 → 100755
View file @
be6a69c0
174 KB
src/assets/inviteFriends/img_title5.png
0 → 100755
View file @
be6a69c0
62.6 KB
src/assets/inviteFriends/img_title6.png
0 → 100755
View file @
be6a69c0
168 KB
src/components/buy/inviteFriends.vue
0 → 100644
View file @
be6a69c0
<
template
>
<div
class=
"invite-friends"
>
<div
class=
"invite-friends header"
>
<img
src=
"../../assets/inviteFriends/img_bg.png"
alt
/>
</div>
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title1.png"
alt
/>
<p
class=
"cell-content money"
>
<span>
{{
earnings
}}
</span>
<span>
元
</span>
</p>
<p
class=
"cell-content people"
>
<span>
{{
userNum
}}
</span>
<span>
人
</span>
</p>
<div
class=
"invite-record-btn"
@
click=
"lookMyInviteRecords"
>
<p>
查看我的邀请记录
</p>
<img
src=
"../../assets/inviteFriends/icon_back.png"
/>
</div>
</div>
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title2.png"
alt
/>
</div>
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title3.png"
alt
/>
</div>
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title4.png"
alt
/>
</div>
<div
class=
"invite-friends cell"
ref=
"inviteRecord"
>
<img
src=
"../../assets/inviteFriends/img_title5.png"
alt
/>
<div
class=
"invite-record-list"
>
<div
class=
"container"
>
<div
class=
"record-content"
>
<div
class=
"record-title"
>
<span>
邀请记录
</span>
<span>
购买时间
</span>
</div>
<div
class=
"no-record"
v-if=
"records.length == 0"
>
您还没有成功邀请好友,快去邀请吧!
</div>
<ul
class=
"record"
v-if=
"records.length > 0"
>
<li
v-for=
"(item,index) in records"
:key=
"index"
>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
buy_date
}}
</p>
</li>
</ul>
<div
class=
"look-more-record"
@
click=
"lookMoreRecord"
v-if=
"records.length >=6"
>
<p>
查看更多
</p>
<img
src=
"../../assets/inviteFriends/icon_back.png"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
"invite-friends cell"
>
<img
src=
"../../assets/inviteFriends/img_title6.png"
alt
/>
</div>
</div>
</
template
>
<
script
>
import
{
getInviteResultApi
,
getInviteListApi
}
from
"../../service/api"
;
export
default
{
name
:
"inviteFriends"
,
components
:
{},
data
()
{
return
{
earnings
:
0
,
userNum
:
0
,
records
:
[
{
name
:
"test"
,
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
:
"test11111111111111111111111111"
,
buy_date
:
"2019.7.5"
},
{
name
:
"test"
,
buy_date
:
"2019.7.5"
}
]
};
},
mounted
()
{
this
.
getInviteResult
();
this
.
getInviteList
();
},
methods
:
{
lookMyInviteRecords
()
{
this
.
$refs
.
inviteRecord
.
scrollIntoView
();
},
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
>
<
style
lang=
"less"
scoped
>
@import "../../util/public";
@tocurrentvw : 1/2 * @toVw;
@tocurrentvh : 1/2 * @toVh;
.invite-friends {
margin: 0;
display: flex;
flex-direction: column;
background-color: #fedbcd;
img {
display: block;
width: 100%;
height: 100%;
}
.header {
width: 100%;
}
.cell {
width: 676 * @tocurrentvw;
margin: 10 * @tocurrentvh auto 64 * @tocurrentvh;
position: relative;
.cell-content {
position: absolute;
width: 40%;
font-size: 72 * @tocurrentvw;
font-weight: bold;
color: #eb7162;
display: flex;
letter-spacing: 1vw;
span {
&:nth-child(1) {
flex: 1;
text-align: right;
}
&:nth-child(2) {
flex: 1;
font-weight: 500;
font-size: 30 * @tocurrentvw;
padding-top: 0.8vh;
margin-left: 0.2vw;
}
}
}
.cell-content.money {
top: 24vw;
left: 9vw;
}
.cell-content.people {
top: 24vw;
right: -1vw;
}
.invite-record-btn {
position: absolute;
width: 100%;
color: #eb7162;
display: flex;
align-items: center;
font-size: 26 * @tocurrentvw;
bottom: 26 * @tocurrentvh;
p {
margin-left: 28%;
}
img {
margin-right: 35%;
display: block;
width: 12 * @tocurrentvw;
height: 20 * @tocurrentvh;
}
}
.invite-record-list {
width: 676 * @tocurrentvw;
// height: 592 * @tocurrentvh;
border-radius: 10 * @tocurrentvw;
background-color: #fff;
margin-top: 40 * @tocurrentvh;
.container {
border: 1px dotted #ee8273;
width: 654 * @tocurrentvw;
// height: 570 * @tocurrentvh;
margin: 10 * @tocurrentvh 10 * @tocurrentvw;
border-radius: 10 * @tocurrentvw;
.record-content {
margin: 19 * @tocurrentvh 15 * @tocurrentvw;
margin-bottom: 0;
width: 626 * @tocurrentvw;
.no-record {
height: 76 * @tocurrentvh;
line-height: 76 * @tocurrentvh;
text-align: center;
font-size: 28 * @tocurrentvw;
}
.record-title {
height: 76 * @tocurrentvh;
width: 100%;
display: flex;
align-items: center;
background-color: #fbebe3;
border-radius: 5 * @tocurrentvw;
font-size: 28 * @tocurrentvw;
font-weight: 400;
color: #eb7162;
}
ul {
max-height: 390 * @tocurrentvh;
overflow: hidden;
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;
}
}
}
.look-more-record {
height: 65 * @tocurrentvh;
width: 100%;
font-size: 26 * @tocurrentvw;
color: #eb7162;
display: flex;
justify-content: center;
align-items: center;
position: relative;
img {
// display: none;
position: absolute;
width: 12 * @tocurrentvw;
height: 20 * @tocurrentvh;
transform: translatex(80 * @tocurrentvw);
}
}
}
}
}
}
}
</
style
>
src/components/buy/inviteRecordList.vue
0 → 100644
View file @
be6a69c0
<
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/components/index.vue
View file @
be6a69c0
...
@@ -1325,6 +1325,7 @@ export default {
...
@@ -1325,6 +1325,7 @@ export default {
margin-top: 18 * @toVw;
margin-top: 18 * @toVw;
margin-right: 19*@toVw;
margin-right: 19*@toVw;
position: relative;
position: relative;
margin-left: 0;
img{width: 146 * @toVw;height:146 * @toVw;position: absolute;top: 0;left: 37 * @toVw;border-radius:73 * @toVw ; }
img{width: 146 * @toVw;height:146 * @toVw;position: absolute;top: 0;left: 37 * @toVw;border-radius:73 * @toVw ; }
.white{position: absolute;background: white;width: 26 * @toVw;height: 26 * @toVw;border-radius: 13 * @toVw;top:61.5 * @toVw ; left: 98 * @toVw;}
.white{position: absolute;background: white;width: 26 * @toVw;height: 26 * @toVw;border-radius: 13 * @toVw;top:61.5 * @toVw ; left: 98 * @toVw;}
.text{
.text{
...
...
src/main.js
View file @
be6a69c0
...
@@ -40,9 +40,9 @@ Vue.component('scroll', scroll);
...
@@ -40,9 +40,9 @@ Vue.component('scroll', scroll);
// Vue.prototype.$throw = (error)=> errorHandler(error,this);
// Vue.prototype.$throw = (error)=> errorHandler(error,this);
/* eslint-disable no-new */
/* eslint-disable no-new */
//
if (process.env.NODE_ENV != 'production') {
if
(
process
.
env
.
NODE_ENV
!=
'production'
)
{
//
new VConsole();
new
VConsole
();
//
}
}
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
()
next
()
...
...
src/router/index.js
View file @
be6a69c0
...
@@ -308,6 +308,24 @@ const router = new Router({
...
@@ -308,6 +308,24 @@ const router = new Router({
noNew
:
true
,
noNew
:
true
,
}
}
},
},
{
path
:
'/inviteFriends'
,
name
:
'inviteFriends'
,
component
:
e
=>
require
([
'@/components/buy/inviteFriends'
],
e
),
//
meta
:
{
deep
:
0
,
noNew
:
true
,
}
},
{
path
:
'/inviteRecordList'
,
name
:
'inviteRecordList'
,
component
:
e
=>
require
([
'@/components/buy/inviteRecordList'
],
e
),
//
meta
:
{
deep
:
0
,
noNew
:
true
,
}
},
{
{
path
:
'/activityInvite'
,
path
:
'/activityInvite'
,
name
:
'activityInvite'
,
name
:
'activityInvite'
,
...
...
src/service/index.js
View file @
be6a69c0
...
@@ -15,7 +15,7 @@ axios.interceptors.request.use(
...
@@ -15,7 +15,7 @@ axios.interceptors.request.use(
config
=>
{
config
=>
{
// 获取token
// 获取token
// process.env.versionTime
// process.env.versionTime
let
versiontime
=
'07021
621
'
let
versiontime
=
'07021
707
'
const
token
=
localStorage
.
getItem
(
'cc_token'
);
const
token
=
localStorage
.
getItem
(
'cc_token'
);
// 设置参数格式
// 设置参数格式
if
(
!
config
.
headers
[
'Content-Type'
])
{
if
(
!
config
.
headers
[
'Content-Type'
])
{
...
...
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