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
a360a115
Commit
a360a115
authored
Sep 09, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购买成功修改
parent
ae111fe4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
buySuccess.vue
src/components/buy/buySuccess.vue
+2
-0
passShop.vue
src/components/buy/passShop.vue
+4
-10
No files found.
src/components/buy/buySuccess.vue
View file @
a360a115
...
...
@@ -105,6 +105,7 @@ export default {
this
.
groupDetail
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'groupDetail'
));
if
(
sessionStorage
.
getItem
(
"buyindex"
)
==
1
)
{
getUserDetailApi
().
then
(
res
=>
{
console
.
log
(
9999
)
localStorage
.
setItem
(
"userDesc"
,
JSON
.
stringify
(
res
));
this
.
userDesc
=
res
;
this
.
subscribe
=
this
.
userDesc
.
open_info
.
is_subscribe
;
...
...
@@ -121,6 +122,7 @@ export default {
this
.
userDesc
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
this
.
subscribe
=
this
.
userDesc
.
open_info
.
is_subscribe
;
getOrderDetailApi
(
this
.
orderNo
).
then
(
res
=>
{
console
.
log
(
3333
)
this
.
goods_id
=
res
.
goods_id
;
this
.
invite_code
=
`CC-
${
res
.
invite_type
}
-
${
res
.
invite_id
}
`
;
this
.
money
=
res
.
money
;
...
...
src/components/buy/passShop.vue
View file @
a360a115
<
template
>
<div>
<div
style=
"height: 100vh;overflow: auto"
>
<div
class=
"group-index"
ref=
"index"
v-if=
"g
etUserDetailApi
"
style=
"min-height: 120vh"
>
<div
class=
"group-index"
ref=
"index"
v-if=
"g
roupDetail
"
style=
"min-height: 120vh"
>
<swiper
:options=
"swiperOption"
class=
"banner"
ref=
"mySwiper"
>
<swiper-slide
v-if=
"groupDetail.goods_desc"
...
...
@@ -341,10 +341,11 @@ export default {
// this.
},
goToBuyPage
()
{
console
.
log
(
this
.
groupDetail
.
is_real
);
if
(
this
.
groupDetail
.
is_real
){
console
.
log
(
2323
)
let
query
=
{
shopId
:
this
.
shopId
,
invite_code
:
this
.
invite_code
};
let
invite
=
this
.
invite_code
;
this
.
$sa
.
track
(
"buyCourse"
,
{
buyType
:
this
.
groupDetail
.
goods_type
===
2
&&
this
.
buyType
===
0
...
...
@@ -358,6 +359,7 @@ export default {
if
(
this
.
groupId
)
{
query
.
group_order_id
=
this
.
groupId
;
}
console
.
log
(
this
.
buyType
);
if
(
this
.
buyType
===
0
&&
!
this
.
groupId
)
{
query
.
type
=
"single"
;
this
.
buyType
=
"single"
;
...
...
@@ -375,7 +377,6 @@ export default {
// window.location.reload();
return
false
;
}
else
{
query
.
type
=
""
;
}
if
(
localStorage
.
getItem
(
"gdt_vid"
))
{
...
...
@@ -430,11 +431,7 @@ export default {
this
.
orderFlag
=
false
;
payApi
(
json
).
then
(
res
=>
{
// console.log(res)
console
.
log
(
res
)
console
.
log
(
res
.
appId
)
if
(
res
.
out_trade_no
&&
!
res
.
appId
){
console
.
log
(
352345234
)
console
.
log
(
this
.
groupDetail
.
goods_type
)
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
){
...
...
@@ -443,17 +440,14 @@ export default {
this
.
$router
.
push
({
name
:
'buySuccess'
,
query
:{
out_trade_no
:
res
.
out_trade_no
,
invite_code
:
this
.
invite_code
}});
}
}
else
{
console
.
log
(
99999
)
let
that
=
this
;
this
.
orderNo
=
res
.
out_trade_no
;
this
.
jsApiParameters
=
res
;
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
if
(
res
.
miniprogram
){
console
.
log
(
2342345
)
let
payParam
=
encodeURIComponent
(
JSON
.
stringify
(
json
));
wx
.
miniProgram
.
navigateTo
({
url
:
`pages/wxPay/main?payParam=
${
payParam
}
`
})
}
else
if
(
typeof
WeixinJSBridge
===
'undefined'
)
{
console
.
log
(
8983
)
if
(
document
.
addEventListener
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
that
.
jsApiCall
,
false
)
}
else
if
(
document
.
attachEvent
)
{
...
...
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