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
3765f84b
Commit
3765f84b
authored
Jul 08, 2019
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
liwei
parent
a166e3b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
112 deletions
+137
-112
activity.vue
src/components/buy/activity.vue
+1
-0
index.vue
src/components/buy/index.vue
+94
-83
inviteFriends.vue
src/components/buy/inviteFriends.vue
+42
-29
No files found.
src/components/buy/activity.vue
View file @
3765f84b
...
...
@@ -238,6 +238,7 @@
},
// 分享
enableShare
:
function
()
{
debugger
;
let
that
=
this
;
getwechatParam
({
api_list
:
'onMenuShareAppMessage,onMenuShareTimeline'
,
...
...
src/components/buy/index.vue
View file @
3765f84b
...
...
@@ -8,7 +8,7 @@
v-for=
"(data,index) in groupDetail.goods_desc.img"
:key=
"index"
>
<img
:src=
"data.url"
>
<img
:src=
"data.url"
/
>
</swiper-slide>
<div
class=
"swiper-pagination"
slot=
"pagination"
></div>
</swiper>
...
...
@@ -16,12 +16,13 @@
:src=
"refIcon"
class=
"ref-icon shake"
@
click=
"goToActivity();buttonClick('功能','生成海报')"
v-if=
"groupDetail.is_auth_user === 1&&!closeStatus"
>
-->
<img
v-if=
"groupDetail.is_auth_user === 1&&!closeStatus"
>
-->
<img
:src=
"couponTipImg"
class=
"ref-icon shake"
@
click=
"couponPopup=true"
v-if=
"closeStatus"
>
v-if=
"closeStatus"
/>
<div
class=
"head"
>
<div
class=
"title"
>
{{
groupDetail
.
name
}}
</div>
<span
class=
"detail"
>
{{
groupDetail
.
goods_desc
.
desc
}}
</span>
...
...
@@ -40,8 +41,8 @@
v-if=
"index
<5
"
:src=
"data"
:key=
"data"
>
<img
class=
"more"
:src=
"moreUrl"
>
/
>
<img
class=
"more"
:src=
"moreUrl"
/
>
<span
class=
"has"
>
已售
{{
groupDetail
.
has_group_num
}}
件
</span>
</div>
<div
...
...
@@ -69,13 +70,13 @@
<div
v-if=
"groupDetail.desc.customer_service[0]"
>
<mt-popup
v-model=
"popupVisible"
>
<div
class=
"pop-block"
>
<img
v-if=
"popType"
:src=
"qrCode"
>
<img
v-if=
"!popType"
:src=
"groupDetail.desc.customer_service[0].url"
>
<img
v-if=
"popType"
:src=
"qrCode"
/
>
<img
v-if=
"!popType"
:src=
"groupDetail.desc.customer_service[0].url"
/
>
<div>
<span
v-if=
"popType"
v-html=
"popcontentW"
></span>
<span
v-if=
"!popType"
v-html=
"popcontentT"
></span>
</div>
<img
class=
"close"
:src=
"closeUrl"
@
click=
"popupVisible = false"
>
<img
class=
"close"
:src=
"closeUrl"
@
click=
"popupVisible = false"
/
>
</div>
</mt-popup>
</div>
...
...
@@ -87,19 +88,25 @@
</div>
</div>
</mt-popup>
<mt-popup
class=
"couponPop"
popup-transition=
"popup-fade"
v-model=
"couponPopup"
:closeOnClickModal=
"false"
>
<mt-popup
class=
"couponPop"
popup-transition=
"popup-fade"
v-model=
"couponPopup"
:closeOnClickModal=
"false"
>
<div
class=
"box"
>
<img
class=
"bg"
:src=
"couponBg"
alt
=
""
>
<img
class=
"closeImg"
@
click=
"closeCouponPop"
:src=
"closeImg"
alt
=
""
>
<img
class=
"bg"
:src=
"couponBg"
alt
/
>
<img
class=
"closeImg"
@
click=
"closeCouponPop"
:src=
"closeImg"
alt
/
>
<div
class=
"content"
>
<p>
您的好友
{{
shareName
}}
赠您
</p>
<img
class=
"btn"
@
click=
"getCoupon"
:src=
"couponBtn"
alt
=
""
>
<img
class=
"btn"
@
click=
"getCoupon"
:src=
"couponBtn"
alt
/
>
</div>
</div>
</mt-popup>
<mt-popup
v-model=
"refVisible"
style=
"background-color: transparent;margin-top: -80vw;margin-left: -40vw;transform: none"
>
style=
"background-color: transparent;margin-top: -80vw;margin-left: -40vw;transform: none"
>
<div
:style=
"
{backgroundImage:`url(${refBg})`}"
class="ref-content"
...
...
@@ -113,10 +120,10 @@
ref=
"imageWrapper"
v-if=
"groupDetail.share_desc.refImg && groupDetail.share_desc.refImg.length > 0"
>
<img
:src=
"groupDetail.share_desc.refImg[0].url"
>
<img
:src=
"groupDetail.share_desc.refImg[0].url"
/
>
<div
id=
"qrcode"
class=
"qrcode"
></div>
</div>
<img
:src=
"dataURL"
class=
"cvs-img"
>
<img
:src=
"dataURL"
class=
"cvs-img"
/
>
</mt-popup>
<div
v-if=
"groupDetail.status === 1 && invite_code_f"
>
<div
v-if=
"couponShadow"
class=
"couponBox"
>
您有
{{
couponInfo
.
money
/
100
}}
元优惠券可使用
</div>
...
...
@@ -126,7 +133,7 @@
@
click=
"showTeacher();buttonClick('老师','客服')"
v-if=
"groupDetail.desc.customer_service[0]"
>
<img
:src=
"weChatIcon"
>
<img
:src=
"weChatIcon"
/
>
</div>
<div
class=
"btn big price full"
v-if=
"groupData && groupData.status !== 0"
>
<div
v-if=
"groupId"
>
该团已满
</div>
...
...
@@ -158,7 +165,7 @@
@
click=
"showTeacher();buttonClick('功能','客服')"
v-if=
"groupDetail.desc.customer_service[0]"
>
<img
:src=
"weChatIcon"
>
<img
:src=
"weChatIcon"
/
>
</div>
<div
class=
"btn big price"
...
...
@@ -171,7 +178,8 @@
<div
class=
"btn big price"
v-if=
"groupDetail.current_price==0"
@
click=
"groupPay(1);buttonClick('购买按钮','直购购买')"
>
@
click=
"groupPay(1);buttonClick('购买按钮','直购购买')"
>
<!--
<span>
¥
{{
groupDetail
.
current_price
/
100
}}
</span>
-->
<div
class=
"free"
>
免费领
</div>
</div>
...
...
@@ -188,17 +196,17 @@
:bind-mobile=
"bindMobile"
v-if=
"groupDetail"
:groupDetail=
"groupDetail"
@
goToBuyPage=
"goToBuyPage"
>
</login-page>
@
goToBuyPage=
"goToBuyPage"
>
</login-page>
</div>
</
template
>
<
script
>
import
"swiper/dist/css/swiper.css"
;
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
;
import
{
Popup
}
from
'mint-ui'
import
{
Popup
}
from
"mint-ui"
;
import
comment
from
"../../util/common"
;
import
{
Toast
}
from
'vant'
;
import
{
Toast
}
from
"vant"
;
import
{
getwechatParam
,
getGoodsDetailApi
,
...
...
@@ -230,7 +238,7 @@ export default {
swiper
,
swiperSlide
,
loginPage
,
[
Popup
.
name
]:
Popup
[
Popup
.
name
]:
Popup
},
data
()
{
return
{
...
...
@@ -274,14 +282,14 @@ export default {
groupData
:
null
,
couponInfo
:
{},
couponShadow
:
false
,
groupSuc
:
''
,
couponBg
:
couponBg
,
couponBtn
:
couponBtn
,
couponPopup
:
false
,
shareName
:
this
.
$route
.
query
.
nickname
,
closeImg
:
closeImg
,
couponTipImg
:
couponTip
,
closeStatus
:
false
groupSuc
:
""
,
couponBg
:
couponBg
,
couponBtn
:
couponBtn
,
couponPopup
:
false
,
shareName
:
this
.
$route
.
query
.
nickname
,
closeImg
:
closeImg
,
couponTipImg
:
couponTip
,
closeStatus
:
false
};
},
mounted
()
{
...
...
@@ -289,22 +297,22 @@ export default {
// document.body.addEventListener('focusout', () => { //软键盘关闭事件
// document.documentElement.scrollTop = 0
// document.body.scrollTop = 0
// console.log("键盘收起")
// console.log("键盘收起")
// })
},
methods
:
{
getCoupon
(){
getReceiveCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
getCoupon
()
{
getReceiveCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
this
.
couponShadow
=
true
;
this
.
couponPopup
=
false
;
this
.
closeStatus
=
false
Toast
(
'领取成功'
)
})
this
.
couponPopup
=
false
;
this
.
closeStatus
=
false
;
Toast
(
"领取成功"
);
})
;
},
closeCouponPop
(){
this
.
couponPopup
=
false
this
.
closeStatus
=
true
// this.refIcon =
closeCouponPop
()
{
this
.
couponPopup
=
false
;
this
.
closeStatus
=
true
;
// this.refIcon =
// this.
},
goToBuyPage
()
{
...
...
@@ -326,22 +334,20 @@ export default {
if
(
this
.
buyType
===
0
&&
!
this
.
groupId
)
{
query
.
type
=
"single"
;
this
.
buyType
=
"single"
;
}
else
if
(
this
.
buyType
===
0
&&
this
.
groupId
)
{
}
else
if
(
this
.
buyType
===
0
&&
this
.
groupId
)
{
// 已购买生成团
this
.
$router
.
push
({
name
:
"buy"
,
query
:
{
shopId
:
this
.
shopId
,
invite_code
:
this
.
invite_code
,
type
:
""
type
:
""
}
});
// debugger
// window.location.reload();
return
false
;
}
else
{
}
else
{
query
.
type
=
""
;
}
if
(
localStorage
.
getItem
(
"gdt_vid"
))
{
...
...
@@ -352,7 +358,7 @@ export default {
if
(
window
.
location
.
href
.
indexOf
(
"cct_user_id"
)
>
-
1
)
{
query
.
cct_user_id
=
comment
.
getUrlParam
().
cct_user_id
;
}
console
.
log
(
query
)
console
.
log
(
query
)
;
// debugger
this
.
$router
.
push
({
name
:
"buy"
,
...
...
@@ -436,9 +442,7 @@ export default {
},
onShare
:
function
(
type
)
{
this
.
handleInviteCode
();
let
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
this_code
}
`
;
let
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
this_code
}
`
;
this
.
enableShare
({
product_title
:
this
.
groupDetail
.
share_desc
.
title
,
desc
:
this
.
groupDetail
.
share_desc
.
content
,
...
...
@@ -573,32 +577,31 @@ export default {
}
let
userCourse
=
JSON
.
parse
(
localStorage
.
getItem
(
"userCourse"
));
if
(
userCourse
&&
!
userCourse
.
periods_list
)
{
if
(
userCourse
&&
!
userCourse
.
periods_list
)
{
// 优惠券
getCouponListApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
if
(
res
.
length
)
{
this
.
couponInfo
=
res
[
0
]
if
(
res
.
length
)
{
this
.
couponInfo
=
res
[
0
]
;
this
.
couponShadow
=
true
;
}
console
.
log
(
this
.
couponInfo
);
});
}
getInvitedCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
&&
res
.
code
==
100
)
{
if
(
res
.
data
.
flag
==
0
)
{
getInvitedCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
console
.
log
(
res
)
;
if
(
res
.
code
&&
res
.
code
==
100
)
{
if
(
res
.
data
.
flag
==
0
)
{
this
.
couponShadow
=
true
;
this
.
couponInfo
.
money
=
res
.
data
.
original_price
console
.
log
(
this
.
couponInfo
)
this
.
couponInfo
.
money
=
res
.
data
.
original_price
;
console
.
log
(
this
.
couponInfo
);
}
}
else
if
(
this
.
$route
.
query
.
invite_code
){
this
.
couponInfo
=
res
this
.
couponInfo
.
money
=
res
.
original_price
this
.
couponPopup
=
true
}
else
if
(
this
.
$route
.
query
.
invite_code
)
{
this
.
couponInfo
=
res
;
this
.
couponInfo
.
money
=
res
.
original_price
;
this
.
couponPopup
=
true
;
// res.original_price
}
})
})
;
},
showTeacher
()
{
this
.
popType
=
false
;
...
...
@@ -612,10 +615,10 @@ export default {
buttonName
:
buttonName
});
},
groupPay
(
type
,
status
)
{
groupPay
(
type
,
status
)
{
this
.
buyType
=
type
;
if
(
status
)
{
this
.
groupSuc
=
status
if
(
status
)
{
this
.
groupSuc
=
status
;
// console.log(status)
}
if
(
...
...
@@ -667,28 +670,36 @@ video {
</
style
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.child-view{
.child-view
{
// position: relative;
}
.couponPop{
.couponPop
{
background: transparent;
.box{
.box
{
width: 319 * @toVw;
.bg{width: 100%;}
.content{
.bg {
width: 100%;
}
.content {
position: absolute;
top: 170 * @toVw;
padding: 0 40 * @toVw;
p{
color: #
FFEFA
8;
p
{
color: #
ffefa
8;
font-size: 22 * @toVw;
}
.btn{margin-top: 150 * @toVw;}
.btn {
margin-top: 150 * @toVw;
}
}
.closeImg {
position: absolute;
top: -26 * @toVw;
right: 10 * @toVw;
width: 27 * @toVw;
}
.closeImg{position: absolute;top: -26 * @toVw;right: 10 * @toVw;width: 27 * @toVw;}
}
}
}
.img-cvs {
position: absolute;
width: 233 * @toVw;
...
...
@@ -852,10 +863,10 @@ video {
position: fixed;
width: 100%;
height: 25 * @toVw;
background: #
FFE83C
;
background: #
ffe83c
;
bottom: 70 * @toVw;
text-align: center;
color: #
FF4D4F
;
color: #
ff4d4f
;
line-height: 25 * @toVw;
font-size: 12px;
}
...
...
src/components/buy/inviteFriends.vue
View file @
3765f84b
...
...
@@ -81,7 +81,36 @@ export default {
return
{
earnings
:
0
,
userNum
:
0
,
records
:
[],
records
:
[
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
},
{
nickname
:
"test1111111111"
,
pay_at
:
"2019.07.08 14:28:50"
}
],
shareTitle
:
"钜惠来袭!唱唱21天英语训练营,全勤学习返66元现金"
,
shareDesc
:
"21天让宝宝爱上说英语,报课即送教具礼盒,包邮送到家!"
,
invite_code
:
""
,
...
...
@@ -104,7 +133,10 @@ export default {
lookMyInviteRecords
()
{
this
.
$refs
.
inviteRecord
.
scrollIntoView
();
},
lookMoreRecord
()
{},
lookMoreRecord
()
{
let
query
=
{
shopId
:
this
.
shopId
};
this
.
$router
.
push
({
name
:
"inviteRecordList"
,
query
:
query
});
},
getInviteResult
()
{
getInviteResultApi
({},
this
.
shopId
).
then
(
res
=>
{
this
.
earnings
=
res
.
earnings
;
...
...
@@ -200,43 +232,24 @@ export default {
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
let
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&groupId=
${
this
.
groupId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
if
(
!
this
.
invite_code
)
{
// debugger
this
.
user_id
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)).
user_id
;
this
.
invite_code
=
"CC-USER-"
+
this
.
user_id
;
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
this
.
enableShare
({
shareUrl
:
URL
});
console
.
log
(
194
);
}
else
{
console
.
log
(
196
);
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
this
.
enableShare
({
shareUrl
:
URL
});
}
// if(type === 1 ){
// }
this
.
enableShare
({
shareUrl
:
URL
});
}
},
onShare
:
function
(
type
)
{
let
ownDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
let
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&groupId=
${
this
.
groupId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
if
(
!
this
.
invite_code
)
{
// debugger
this
.
user_id
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)).
user_id
;
this
.
invite_code
=
"CC-USER-"
+
this
.
user_id
;
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
this
.
enableShare
({
shareUrl
:
URL
});
console
.
log
(
194
);
}
else
{
console
.
log
(
196
);
URL
=
`
${
process
.
env
.
BUY_URL
}
shopId=
${
this
.
shopId
}
&invite_code=
${
this
.
invite_code
}
&nickname=
${
ownDetail
.
nickname
}
`
;
this
.
enableShare
({
shareUrl
:
URL
});
}
// if(type === 1 ){
// }
}
};
</
script
>
...
...
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