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
752ba09b
authored
Oct 10, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
1c2aa189
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
30 deletions
src/assets/css/sample/sample.css
src/assets/css/sample/sample.less
src/views/sample/sample.vue
view/14.js
src/assets/css/sample/sample.css
View file @
752ba09b
...
...
@@ -26,6 +26,15 @@
height
:
20px
;
line-height
:
20px
;
}
.sample
.fx_text
{
color
:
#999
;
}
.sample
.fx_text
div
{
padding
:
0
15px
10px
;
}
.sample
.fx_text
span
{
color
:
#ffa200
;
}
.sample
.nav
{
padding
:
0
15px
;
}
...
...
src/assets/css/sample/sample.less
View file @
752ba09b
...
...
@@ -11,6 +11,15 @@
span{color:#333;font-size: 16px;}
font{font-size: 12px;color:#999;margin-left: 10px;height:20px;line-height: 20px;}
}
.fx_text{
color:#999;
div{
padding:0 15px 10px;
}
span{
color:#ffa200
}
}
.nav{
padding:0 15px ;
.van-hairline--top-bottom::after {
...
...
src/views/sample/sample.vue
View file @
752ba09b
...
...
@@ -7,6 +7,21 @@
<span>
猎芯自营
</span>
<font>
品现货 1片起订 3小时发货
</font>
</div>
<div
class=
"fx_text"
v-if=
"fxType"
>
<!-- 邀请记录不为0 -->
<div
class=
"fx_text_one"
v-if=
"fxType == 1"
>
我已邀请好友
<span>
{{
inviteCount
}}
</span>
人,剩余领取次数
<span>
{{
applyCount
}}
</span>
次
</div>
<!-- 邀请记录为0 -->
<div
class=
"fx_text_two"
v-else-if=
"fxType == 2"
>
当前可领取次数为:
<span>
{{
applyCount
}}
</span>
次,分享可额外获得领取机会
</div>
<!-- 未登入 -->
<div
class=
"fx_text_three"
v-else
>
分享可额外获得领取机会
</div>
</div>
<div
class=
"nav"
v-if=
"classList.length"
>
<van-tabs
v-model=
"active"
...
...
@@ -96,8 +111,11 @@ export default {
active
:
0
,
getPop
:
false
,
//获得机会弹窗,没机会时展示
loadingYp
:
false
,
applyCount
:
0
,
inviteCount
:
0
,
p
:
1
,
classId
:
""
,
fxType
:
0
,
shareUrl
:
window
.
location
.
origin
+
"/v3/samplereg?uid="
+
...
...
@@ -117,7 +135,7 @@ export default {
this
.
loadingYp
=
now
;
},
classList
(
now
)
{
if
(
now
.
length
)
{
if
(
now
.
length
)
{
this
.
p
=
1
;
this
.
classId
=
now
[
0
].
id
;
this
.
getGoodList
();
...
...
@@ -128,8 +146,16 @@ export default {
this
.
$store
.
dispatch
({
type
:
"getClasslist"
});
this
.
judgeLogin
();
},
methods
:
{
judgeLogin
()
{
if
(
getCookie
(
"Yo4teW_uid"
))
{
this
.
getCount
();
}
else
{
this
.
fxType
=
3
;
}
},
getGoodList
()
{
this
.
$store
.
dispatch
({
type
:
"getGoodList"
,
...
...
@@ -151,48 +177,41 @@ export default {
getuserf
()
{
this
.
getPop
=
false
;
},
getCount
()
{
let
me
=
this
;
Services
.
getUserSampleInfo
()
.
then
(
res
=>
{
let
data
=
res
.
data
;
if
(
data
.
err_code
==
0
)
{
me
.
applyCount
=
data
.
data
.
apply_count
||
0
;
me
.
inviteCount
=
data
.
data
.
invite_count
||
0
;
if
(
me
.
inviteCount
==
0
)
{
me
.
fxType
=
2
;
}
else
{
me
.
fxType
=
1
;
}
}
else
if
(
data
.
err_code
==
"11012"
)
{
window
.
location
.
href
=
"/v3/login?referer="
+
encodeURIComponent
(
window
.
location
.
href
);
}
})
.
catch
(
function
(
err
)
{});
},
yaoqing
(
id
)
{
let
loginpta
=
util
.
isLogin
()
?
true
:
false
;
let
me
=
this
;
if
(
!
loginpta
)
{
window
.
location
.
href
=
"/v3/login?referer="
+
encodeURIComponent
(
window
.
location
.
href
);
return
;
}
else
{
const
toast
=
Toast
({
type
:
"loading"
,
message
:
"领取中"
,
forbidClick
:
true
,
duration
:
0
});
Services
.
getUserSampleInfo
()
.
then
(
res
=>
{
toast
.
clear
();
let
data
=
res
.
data
;
if
(
data
.
err_code
==
0
)
{
if
(
data
.
data
.
apply_count
!=
0
)
{
if
(
this
.
applyCount
)
{
me
.
$router
.
push
({
path
:
"/sampleapply"
,
query
:
{
id
:
id
}
});
}
else
{
me
.
getPop
=
true
;
}
}
else
if
(
data
.
err_code
==
'11012'
){
Toast
.
fail
(
"登录已超时,请重新登录"
);
window
.
location
.
href
=
"/v3/login?referer="
+
encodeURIComponent
(
window
.
location
.
href
);
}
else
{
Toast
.
fail
(
"领取失败"
);
}
})
.
catch
(
function
(
err
)
{
toast
.
clear
();
Toast
.
fail
(
"领取失败"
);
});
}
}
},
...
...
@@ -205,5 +224,5 @@ export default {
</
script
>
<
style
scoped
>
@import
"../../assets/css/sample/sample.
min.
css"
;
@import
"../../assets/css/sample/sample.css"
;
</
style
>
\ No newline at end of file
view/14.js
View file @
752ba09b
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