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
cad00273
Commit
cad00273
authored
Sep 10, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付提交8
parent
91356804
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
89 deletions
+89
-89
fenqi.png
src/assets/evaluate/fenqi.png
+0
-0
icon_re_acitve.png
src/assets/evaluate/icon_re_acitve.png
+0
-0
xinyongka.png
src/assets/evaluate/xinyongka.png
+0
-0
buy.vue
src/components/buy/buy.vue
+24
-34
buySuccess.vue
src/components/buy/buySuccess.vue
+13
-20
passShop.vue
src/components/buy/passShop.vue
+4
-3
promptTime.vue
src/components/map/promptTime.vue
+42
-20
api.js
src/service/api.js
+6
-12
No files found.
src/assets/evaluate/fenqi.png
0 → 100755
View file @
cad00273
935 Bytes
src/assets/evaluate/icon_re_acitve.png
0 → 100755
View file @
cad00273
816 Bytes
src/assets/evaluate/xinyongka.png
0 → 100755
View file @
cad00273
717 Bytes
src/components/buy/buy.vue
View file @
cad00273
...
...
@@ -70,39 +70,18 @@
</div>
</div>
<
!--
<
div
class=
"pay-list"
>
<div
class=
"pay-list"
>
<div
class=
"pay-choice"
>
支付方式选择
</div>
<ul
class=
"pay"
>
<li>
<img
:src=
"
weixi
n"
alt=
""
>
<span>
微信支付
</span>
<li
v-for=
"item in payList"
:key=
"item.value"
@
click=
"payListClick(item.value)"
>
<img
:src=
"
item.ico
n"
alt=
""
>
<span>
{{
item
.
title
}}
</span>
<div
class=
"icon-re"
>
<img
:src=
"iconRe"
alt=
""
>
</div>
</li>
<li>
<img
:src=
"weixin"
alt=
""
>
<span>
微信支付
</span>
<div
class=
"icon-re"
>
<img
:src=
"iconRe"
alt=
""
>
</div>
</li>
<li>
<img
:src=
"weixin"
alt=
""
>
<span>
微信支付
</span>
<div
class=
"icon-re"
>
<img
:src=
"iconRe"
alt=
""
>
</div>
</li>
<li>
<img
:src=
"weixin"
alt=
""
>
<span>
微信支付
</span>
<div
class=
"icon-re"
>
<img
:src=
"iconRe"
alt=
""
>
<img
:src=
"payIndex === item.value ? icon_re_acitve : iconRe"
alt=
""
>
</div>
</li>
</ul>
</div>
-->
</div>
<footer>
<div
class=
"sub-block"
>
...
...
@@ -154,7 +133,8 @@ import {
getwechatParam
,
getStatusWechatApi
,
getCouponListApi
,
getCourseInfoApi
getCourseInfoApi
,
postPayBillApi
}
from
"../../service/api"
;
import
addAddress
from
"./address"
;
import
loginPage
from
"./login"
;
...
...
@@ -167,8 +147,12 @@ import leftG from "../../assets/shop/leftg.png";
import
popup_img
from
"../../assets/shop/popup_img@2x.png"
;
import
weixin
from
"../../assets/evaluate/weixin.png"
;
import
zhifubao
from
"../../assets/evaluate/zhifubao.png"
;
import
xinyongka
from
"../../assets/evaluate/xinyongka.png"
;
import
fenqi
from
"../../assets/evaluate/fenqi.png"
;
import
icon_re
from
"../../assets/evaluate/icon_re.png"
;
import
icon_re_acitve
from
"../../assets/evaluate/icon_re_acitve.png"
;
import
{
Popup
}
from
"mint-ui"
;
export
default
{
name
:
"buy"
,
components
:
{
...
...
@@ -187,7 +171,7 @@ export default {
flag
:
false
},
iconRe
:
icon_re
,
weixin
:
weixin
,
icon_re_acitve
:
icon_re_acitve
,
lineImage
:
lineImage
,
youHuiUrl
:
youHuiUrl
,
leftG
:
leftG
,
...
...
@@ -221,8 +205,11 @@ export default {
userCourse
:
{},
payList
:
[
{
icon
:
weixin
,
title
:
'微信支付'
,
value
:
1
},
{
icon
:
zhifubao
,
title
:
'支付宝支付'
,
value
:
1
},
]
{
icon
:
zhifubao
,
title
:
'支付宝支付'
,
value
:
2
},
{
icon
:
xinyongka
,
title
:
'信用卡分期'
,
value
:
3
},
{
icon
:
fenqi
,
title
:
'其他分期'
,
value
:
4
},
],
payIndex
:
1
};
},
mounted
()
{
...
...
@@ -254,6 +241,10 @@ export default {
}
},
methods
:
{
// 支付方式
payListClick
(
val
)
{
this
.
payIndex
=
val
},
recursion
()
{
getCourseInfoApi
().
then
(
res
=>
{
if
(
res
.
status
){
...
...
@@ -352,8 +343,7 @@ export default {
}
let
invite
=
this
.
$route
.
query
.
invite_code
;
this
.
$sa
.
track
(
"placeOrder"
,
{
buyType
:
this
.
groupDetail
.
goods_type
===
2
&&
!
this
.
type
?
"团购"
:
"直购"
,
buyType
:
this
.
groupDetail
.
goods_type
===
2
&&
!
this
.
type
?
"团购"
:
"直购"
,
couponAmount
:
this
.
saleObj
?
Number
(
this
.
saleObj
.
money
/
100
)
:
0
,
paymentAmount
:
Number
(
this
.
priceTotal
),
goodsID
:
this
.
shopId
.
toString
(),
...
...
@@ -370,12 +360,12 @@ export default {
json
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
}
this
.
orderFlag
=
false
;
payApi
(
json
)
.
then
(
res
=>
{
this
.
orderNo
=
res
.
out_trade_no
;
if
(
res
.
out_trade_no
&&
!
res
.
appId
)
{
getCourseInfoApi
().
then
(
res
=>
{
console
.
log
(
res
);
this
.
userCourse
=
res
;
localStorage
.
setItem
(
"userCourse"
,
...
...
src/components/buy/buySuccess.vue
View file @
cad00273
<
template
>
<div
class=
"buy-success"
>
{{
subscribe
}}
<div
v-if=
"subscribe==0"
>
<div
class=
"topTop"
>
<div>
...
...
@@ -101,42 +100,35 @@ export default {
mask
:
true
,
message
:
""
});
console
.
log
(
sessionStorage
.
getItem
(
'groupDetail'
),
2222
);
console
.
log
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'groupDetail'
)),
333
);
// this.groupDetail = JSON.parse(sessionStorage.getItem('groupDetail'));
console
.
log
(
this
.
$route
.
query
.
shopId
,
'id+'
+
87897
)
getGoodsDetailApi
(
this
.
$route
.
query
.
shopId
).
then
(
data
=>
{
console
.
log
(
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
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
this
.
groupDetail
=
data
})
if
(
this
.
$route
.
query
.
shopId
)
{
getGoodsDetailApi
(
this
.
$route
.
query
.
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
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
this
.
groupDetail
=
data
})
}
else
{
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
;
conosle
.
log
(
this
.
userDesc
.
open_info
,
786876
)
getOrderDetailApi
(
this
.
orderNo
).
then
(
res
=>
{
this
.
goods_id
=
res
.
goods_id
;
this
.
invite_code
=
`CC-
${
res
.
invite_type
}
-
${
res
.
invite_id
}
`
;
this
.
money
=
res
.
money
;
this
.
invite_type
=
res
.
invite_type
console
.
log
(
117
)
Toast
.
clear
()
});
});
}
else
{
this
.
userDesc
=
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
));
this
.
subscribe
=
this
.
userDesc
.
open_info
.
is_subscribe
;
console
.
log
(
this
.
userDesc
.
open_info
)
console
.
log
(
this
.
subscribe
,
87687678
)
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
;
...
...
@@ -151,7 +143,7 @@ export default {
};
</
script
>
<
style
scoped
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../util/public";
.topTop {
line-height: 17 * @toVw;
...
...
@@ -164,6 +156,7 @@ export default {
height: 12px;
}
}
.step2Box {
width: 343 * @toVw;
height: 360 * @toVw;
...
...
src/components/buy/passShop.vue
View file @
cad00273
...
...
@@ -341,9 +341,8 @@ 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"
,
{
...
...
@@ -398,6 +397,7 @@ export default {
this
.
payFlag
=
true
;
});
}
else
{
let
json
=
{
goods_id
:
Number
(
this
.
shopId
)
};
...
...
@@ -704,12 +704,12 @@ export default {
this
.
onShare
(
1
);
this
.
handleInviteCode
();
}
console
.
log
(
sessionStorage
.
getItem
(
'clickTag'
),
979876896
)
if
(
sessionStorage
.
getItem
(
'clickTag'
)){
console
.
log
(
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)))
if
(
!
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)).
mobile
||
JSON
.
parse
(
localStorage
.
getItem
(
"userDesc"
)).
mobile
===
""
)
{
this
.
bindMobile
.
flag
=
sessionStorage
.
getItem
(
'type'
);
this
.
bindMobile
.
show
=
true
;
console
.
log
(
700
)
setTimeout
(()
=>
{
this
.
$sa
.
track
(
"ViewRegisterpage"
,
{});
},
1000
);
...
...
@@ -765,6 +765,7 @@ export default {
this
.
groupSuc
=
status
;
// console.log(status)
}
if
(
!
localStorage
.
getItem
(
"userDesc"
)){
sessionStorage
.
setItem
(
'clickTag'
,
1
)
sessionStorage
.
setItem
(
'type'
,
type
)
...
...
src/components/map/promptTime.vue
View file @
cad00273
...
...
@@ -4,7 +4,7 @@
<div
class=
"tishi-timer"
>
<img
:src=
"tishiTimer"
alt=
""
>
</div>
<div
class=
"time-setting"
@
click=
"dateShowClick"
>
<div
class=
"time-setting"
ref=
"timeSetting"
@
click=
"dateShowClick"
>
<div
class=
"time-setting-text"
>
当前设定的时间
</div>
...
...
@@ -13,22 +13,16 @@
<img
:src=
"youjiantou"
alt=
""
>
</div>
</div>
<div
class=
"preservation"
@
click=
"preservationClick"
>
保存
</div>
<div
class=
"preservation"
@
click=
"preservationClick"
>
保存
</div>
<van-popup
v-model=
"dateShow"
position=
"bottom"
>
<van-datetime-picker
@
confirm=
"dateConfirm"
@
cancel=
"dateShow=false"
v-model=
"currentTime"
type=
"time"
/>
<van-datetime-picker
@
confirm=
"dateConfirm"
@
cancel=
"dateConfirmNo"
v-model=
"currentTime"
type=
"time"
/>
</van-popup>
</div>
</
template
>
<
script
>
import
{
DatetimePicker
,
Popup
}
from
'vant'
;
import
{
postNotifySettingApi
}
from
"../../service/api"
;
import
{
DatetimePicker
,
Popup
,
Toast
}
from
'vant'
;
import
tishiTimer
from
'../../assets/evaluate/tishi_timer.png'
import
youjiantou
from
'../../assets/evaluate/youjiantou.png'
...
...
@@ -36,7 +30,7 @@
name
:
"promptTime"
,
data
()
{
return
{
currentTime
:
'
--:--
'
,
currentTime
:
''
,
dateVal
:
''
,
dateShow
:
false
,
selectedValue
:
''
,
...
...
@@ -54,32 +48,60 @@
this
.
$nextTick
(()
=>
{
document
.
querySelectorAll
(
'.van-picker-column'
)[
1
].
style
.
display
=
'none'
;
let
oLi
=
document
.
querySelectorAll
(
'.van-picker-column'
)[
0
].
querySelectorAll
(
'li'
);
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
console
.
log
(
oLi
[
i
].
innerText
);
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
oLi
[
i
].
innerText
=
oLi
[
i
].
innerText
+
':00'
}
})
},
dateConfirm
(
val
)
{
this
.
currentTime
=
val
this
.
dateShow
=
false
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
console
.
log
(
oLi
[
i
].
innerText
);
this
.
currentTime
=
val
==
'aN:aN'
?
'00:00'
:
val
this
.
contentFn
()
},
dateConfirmNo
()
{
this
.
contentFn
()
},
contentFn
()
{
this
.
dateShow
=
false
;
this
.
$refs
.
timeSetting
.
style
.
borderBottom
=
'1px solid #E2E2E2'
let
oLi
=
document
.
querySelectorAll
(
'.van-picker-column'
)[
0
].
querySelectorAll
(
'li'
);
for
(
var
i
=
0
;
i
<
oLi
.
length
;
i
++
)
{
oLi
[
i
].
innerText
=
oLi
[
i
].
innerText
.
split
(
':'
)[
0
]
}
},
preservationClick
()
{
if
(
this
.
currentTime
)
{
let
pushAtData
=
{
time
:
this
.
currentTime
}
postNotifySettingApi
(
pushAtData
).
then
(
res
=>
{
Toast
(
"时间设定完成"
);
this
.
$router
.
go
(
-
1
);
})
}
else
{
Toast
(
"请先设定时间"
);
console
.
log
(
this
.
$refs
.
timeSetting
);
this
.
$refs
.
timeSetting
.
style
.
borderBottom
=
'1px solid red'
}
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../util/public";
.van-picker {
border-radius: 30 * @toVw 30 * @toVw 0 0;
}
.van-picker-column__item {
color: #666666;
font-size: 20 * @toVw;
}
.van-picker-column__item--selected {
color: #40A9FF;
font-size: 26 * @toVw;
}
.prompt-time {
width: 100%;
height: 100%;
...
...
src/service/api.js
View file @
cad00273
...
...
@@ -370,19 +370,13 @@ export const postErrorLogApi = function (json) {
return
Vue
.
prototype
.
$post
(
`api/client/report/errors/log`
,
json
)
};
//
用户成长记录添加
export
const
post
UserGrowthAddApi
=
function
(
periods_id
,
category_id
,
element_id
,
json
)
{
return
Vue
.
prototype
.
$post
(
`
api/client/user/growth/record/
${
periods_id
}
/
${
category_id
}
/
${
element_id
}
`
,
json
)
//
设置课程提醒时间
export
const
post
NotifySettingApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
/api/client/user/notify/setting
`
,
json
)
};
// 用户成长记录列表
export
const
getUserGrowthListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/client/user/growth/record/list`
)
};
//
const
getUserGrowthRecordUrl
=
`
${
_baseUrl
}
api/client/growth/record/`
export
const
getUserGrowthRecordApi
=
function
(
periods_id
,
category_id
,
element_id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getUserGrowthRecordUrl
}${
periods_id
}
/
${
category_id
}
/
${
element_id
}
`
)
// 支付
export
const
postPayBillApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`/client/bill/create`
,
json
)
};
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