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
bd0af7ae
Commit
bd0af7ae
authored
Feb 28, 2019
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投放 去除客服
parent
31bd8272
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
260 additions
and
206 deletions
+260
-206
index.html
index.html
+3
-1
indexMaster.html
indexMaster.html
+3
-0
buy.vue
src/components/buy/buy.vue
+57
-62
index.vue
src/components/buy/index.vue
+197
-143
No files found.
index.html
View file @
bd0af7ae
...
...
@@ -9,7 +9,9 @@
<title>
唱唱启蒙英语
</title>
<link
rel=
"stylesheet"
href=
"https://at.alicdn.com/t/font_822651_g9r2j7kybxu.css"
>
<style>
.mint-toast
{
z-index
:
10001
!important
;
}
</style>
</head>
<body>
...
...
indexMaster.html
View file @
bd0af7ae
...
...
@@ -12,6 +12,9 @@
*
{
-webkit-overflow-scrolling
:
touch
;
}
.mint-toast
{
z-index
:
10001
!important
;
}
</style>
</head>
<body>
...
...
src/components/buy/buy.vue
View file @
bd0af7ae
...
...
@@ -42,17 +42,17 @@
</div>
<footer>
<!--
<div
v-if=
"groupDetail.is_real !== 1"
class=
"phone-block"
>
-->
<!--
<input
placeholder=
"请输入手机号"
class=
"phone-input"
v-model=
"mobile"
/>
-->
<!--
<input
placeholder=
"请输入手机号"
class=
"phone-input"
v-model=
"mobile"
/>
-->
<!--
</div>
-->
<div
class=
"sub-block"
>
合计金额:
<span>
¥
{{
priceTotal
}}
</span>
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
>
提交订单
</div>
合计金额:
<span>
¥
{{
priceTotal
}}
</span>
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
>
确认支付
</div>
</div>
</footer>
<transition
name=
"slide-fade"
>
<sale-div
:salePop=
"salePop"
@
chooseSale=
"chooseSale"
></sale-div>
<sale-div
:salePop=
"salePop"
@
chooseSale=
"chooseSale"
></sale-div>
</transition>
<transition
name=
"slide-fade"
>
<div
v-if=
"addressPop"
class=
"address-pop"
>
...
...
@@ -213,9 +213,9 @@
if
(
this
.
groupDetail
.
goods_type
===
2
&&
!
this
.
type
){
this
.
$router
.
push
({
name
:
'success'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
}
else
if
(
this
.
groupDetail
.
goods_type
===
4
){
this
.
$router
.
push
({
name
:
'saleSuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
this
.
$router
.
push
({
name
:
'saleSuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
}
else
{
this
.
$router
.
push
({
name
:
'buySuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
this
.
$router
.
push
({
name
:
'buySuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
}
}
else
{
let
that
=
this
;
...
...
@@ -249,63 +249,58 @@
this
.
addressPop
=
true
},
initPage
(){
if
(
!
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
||
JSON
.
parse
(
localStorage
.
getItem
(
'userDesc'
)).
mobile
===
''
){
this
.
$router
.
push
({
name
:
'bindMobile'
,
query
:{
retUrl
:
this
.
$route
.
fullPath
}})
}
else
{
getwechatParam
({
api_list
:
'chooseWXPay'
}).
then
(
res
=>
{
wx
.
config
({
debug
:
false
,
appId
:
res
.
appId
,
timestamp
:
parseInt
(
res
.
timestamp
),
nonceStr
:
res
.
nonceStr
,
signature
:
res
.
signature
,
jsApiList
:
res
.
jsApiList
});
});
getwechatParam
({
api_list
:
'chooseWXPay'
}).
then
(
res
=>
{
wx
.
config
({
debug
:
false
,
appId
:
res
.
appId
,
timestamp
:
parseInt
(
res
.
timestamp
),
nonceStr
:
res
.
nonceStr
,
signature
:
res
.
signature
,
jsApiList
:
res
.
jsApiList
});
});
getUserAdressApi
().
then
(
res
=>
{
this
.
addressObj
=
res
});
this
.
shopId
=
this
.
$route
.
query
.
shopId
;
this
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
getCouponListApi
(
this
.
shopId
).
then
(
res
=>
{
if
(
res
.
length
>
0
){
let
x
=
{
money
:
0
};
for
(
let
k
=
0
;
k
<
res
.
length
;
k
++
){
x
=
res
[
k
].
money
>
x
.
money
?
res
[
k
]
:
x
;
}
this
.
saleObj
=
x
;
this
.
canSale
=
true
}
});
getStatusWechatApi
({
goods_id
:
this
.
shopId
}).
then
(
res
=>
{
if
(
res
.
out_trade_no
){
if
(
res
.
has_buy_goods_info
.
goods_type
===
2
){
this
.
$router
.
push
({
name
:
'success'
,
query
:{
out_trade_no
:
res
.
out_trade_no
}});
}
else
if
(
res
.
has_buy_goods_info
.
goods_type
===
4
){
this
.
$router
.
push
({
name
:
'saleSuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
$route
.
query
.
invite_code
}});
}
else
if
(
res
.
has_buy_goods_info
.
goods_type
!==
5
){
this
.
$router
.
push
({
name
:
'buySuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
}});
}
}
});
getGoodsDetailApi
(
this
.
shopId
).
then
(
data
=>
{
data
.
desc
=
JSON
.
parse
(
data
.
desc
);
data
.
goods_desc
=
JSON
.
parse
(
data
.
goods_desc
);
data
.
share_desc
=
JSON
.
parse
(
data
.
share_desc
);
this
.
groupDetail
=
data
;
this
.
invite_code
=
this
.
$route
.
query
.
invite_code
;
if
(
this
.
type
&&
this
.
type
===
0
){
this
.
price
=
data
.
single_price
/
100
}
else
{
this
.
price
=
data
.
group_price
/
100
}
this
.
$nextTick
(()
=>
{
this
.
orderFlag
=
true
})
});
getUserAdressApi
().
then
(
res
=>
{
this
.
addressObj
=
res
});
this
.
shopId
=
this
.
$route
.
query
.
shopId
;
this
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
getCouponListApi
(
this
.
shopId
).
then
(
res
=>
{
if
(
res
.
length
>
0
){
let
x
=
{
money
:
0
};
for
(
let
k
=
0
;
k
<
res
.
length
;
k
++
){
x
=
res
[
k
].
money
>
x
.
money
?
res
[
k
]
:
x
;
}
this
.
saleObj
=
x
;
this
.
canSale
=
true
}
});
getStatusWechatApi
({
goods_id
:
this
.
shopId
}).
then
(
res
=>
{
if
(
res
.
out_trade_no
){
if
(
res
.
has_buy_goods_info
.
goods_type
===
2
){
this
.
$router
.
push
({
name
:
'success'
,
query
:{
out_trade_no
:
res
.
out_trade_no
}});
}
else
if
(
res
.
has_buy_goods_info
.
goods_type
===
4
){
this
.
$router
.
push
({
name
:
'saleSuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
$route
.
query
.
invite_code
}});
}
else
if
(
res
.
has_buy_goods_info
.
goods_type
!==
5
){
this
.
$router
.
push
({
name
:
'buySuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
}});
}
}
});
getGoodsDetailApi
(
this
.
shopId
).
then
(
data
=>
{
data
.
desc
=
JSON
.
parse
(
data
.
desc
);
data
.
goods_desc
=
JSON
.
parse
(
data
.
goods_desc
);
data
.
share_desc
=
JSON
.
parse
(
data
.
share_desc
);
this
.
groupDetail
=
data
;
this
.
invite_code
=
this
.
$route
.
query
.
invite_code
;
if
(
this
.
type
&&
this
.
type
===
0
){
this
.
price
=
data
.
single_price
/
100
}
else
{
this
.
price
=
data
.
group_price
/
100
}
this
.
$nextTick
(()
=>
{
this
.
orderFlag
=
true
})
});
}
}
}
...
...
src/components/buy/index.vue
View file @
bd0af7ae
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