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
66c6ae37
Commit
66c6ae37
authored
Jul 05, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
75
parent
524740d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
7 deletions
+38
-7
index.vue
src/components/buy/index.vue
+26
-3
main.js
src/main.js
+3
-3
api.js
src/service/api.js
+9
-1
No files found.
src/components/buy/index.vue
View file @
66c6ae37
...
...
@@ -93,7 +93,7 @@
<img
class=
"closeImg"
@
click=
"closeCouponPop"
:src=
"closeImg"
alt=
""
>
<div
class=
"content"
>
<p>
您的好友
{{
shareName
}}
赠您
</p>
<img
class=
"btn"
:src=
"couponBtn"
alt=
""
>
<img
class=
"btn"
@
click=
"getCoupon"
:src=
"couponBtn"
alt=
""
>
</div>
</div>
</mt-popup>
...
...
@@ -119,7 +119,7 @@
<img
:src=
"dataURL"
class=
"cvs-img"
>
</mt-popup>
<div
v-if=
"groupDetail.status === 1 && invite_code_f"
>
<div
v-if=
"coupon
Info.money
"
class=
"couponBox"
>
您有
{{
couponInfo
.
money
/
100
}}
元优惠券可使用
</div>
<div
v-if=
"coupon
Shadow
"
class=
"couponBox"
>
您有
{{
couponInfo
.
money
/
100
}}
元优惠券可使用
</div>
<footer
v-if=
"groupDetail.goods_type && groupDetail.goods_type === 2"
>
<div
class=
"btn"
...
...
@@ -198,6 +198,7 @@ import "swiper/dist/css/swiper.css";
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
;
import
{
Popup
}
from
'mint-ui'
import
comment
from
"../../util/common"
;
import
{
Toast
}
from
'vant'
;
import
{
getwechatParam
,
getGoodsDetailApi
,
...
...
@@ -208,7 +209,9 @@ import {
getStatusWechatApi
,
payApi
,
getCouponListApi
,
getAutomationCouponApi
getAutomationCouponApi
,
getInvitedCouponApi
,
getReceiveCouponApi
}
from
"../../service/api"
;
import
refBg
from
"../../assets/refBg.png"
;
import
moreUrl
from
"../../assets/moreIcon.png"
;
...
...
@@ -290,6 +293,13 @@ export default {
// })
},
methods
:
{
getCoupon
(){
getReceiveCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
this
.
couponShadow
=
true
;
this
.
couponPopup
=
false
;
Toast
(
'领取成功'
)
})
},
closeCouponPop
(){
this
.
couponPopup
=
false
this
.
closeStatus
=
true
...
...
@@ -572,6 +582,19 @@ export default {
console
.
log
(
this
.
couponInfo
);
});
}
getInvitedCouponApi
(
this
.
$route
.
query
.
shopId
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
&&
res
.
code
==
100
){
this
.
couponShadow
=
true
;
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
// res.original_price
}
})
},
showTeacher
()
{
this
.
popType
=
false
;
...
...
src/main.js
View file @
66c6ae37
...
...
@@ -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/service/api.js
View file @
66c6ae37
...
...
@@ -332,4 +332,12 @@ export const searchAccountinfoApi = function (authorization) {
export
const
getStarInfoApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
`/api/client/user/starActivity`
)
};
//
//获取商品可用优惠券
export
const
getInvitedCouponApi
=
function
(
goods_id
)
{
return
Vue
.
prototype
.
$fetch
(
`/api/client/user/invited/coupon/
${
goods_id
}
`
)
};
//领取商品可用优惠券
export
const
getReceiveCouponApi
=
function
(
goods_id
)
{
return
Vue
.
prototype
.
$fetch
(
`/api/client/user/receive/coupon/
${
goods_id
}
`
)
};
///api/client/user/receive/coupon/
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