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
b688d37a
Commit
b688d37a
authored
Sep 10, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航
parent
2ff7e558
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
99 deletions
+12
-99
buy.vue
src/components/buy/buy.vue
+3
-84
index.vue
src/components/map/index.vue
+9
-15
No files found.
src/components/buy/buy.vue
View file @
b688d37a
...
@@ -69,19 +69,6 @@
...
@@ -69,19 +69,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 支付方式选择 -->
<!--
<div
class=
"pay-list"
>
<div
class=
"pay-choice"
>
支付方式选择
</div>
<ul
class=
"pay"
>
<li
v-for=
"item in payList"
:key=
"item.value"
@
click=
"payListClick(item.value)"
>
<img
:src=
"item.icon"
alt=
""
>
<span>
{{
item
.
title
}}
</span>
<div
class=
"icon-re"
>
<img
:src=
"payIndex === item.value ? icon_re_acitve : iconRe"
alt=
""
>
</div>
</li>
</ul>
</div>
-->
<footer>
<footer>
<div
class=
"sub-block"
>
<div
class=
"sub-block"
>
...
@@ -90,10 +77,7 @@
...
@@ -90,10 +77,7 @@
class=
"tips-price"
class=
"tips-price"
v-if=
"groupDetail.goods_desc"
v-if=
"groupDetail.goods_desc"
>
{{
groupDetail
.
goods_desc
.
tips
?
groupDetail
.
goods_desc
.
tips
:
''
}}
</span>
>
{{
groupDetail
.
goods_desc
.
tips
?
groupDetail
.
goods_desc
.
tips
:
''
}}
</span>
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
>
提交订单
</div>
v-clipboard:copy=
"payIndex !== 0 ? payUrl : ''"
v-clipboard:success=
"copy"
v-clipboard:error=
"onError"
>
提交订单
</div>
</div>
</div>
</footer>
</footer>
<transition
name=
"slide-fade"
>
<transition
name=
"slide-fade"
>
...
@@ -136,8 +120,7 @@ import {
...
@@ -136,8 +120,7 @@ import {
getwechatParam
,
getwechatParam
,
getStatusWechatApi
,
getStatusWechatApi
,
getCouponListApi
,
getCouponListApi
,
getCourseInfoApi
,
getCourseInfoApi
postPayBillApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
addAddress
from
"./address"
;
import
addAddress
from
"./address"
;
import
loginPage
from
"./login"
;
import
loginPage
from
"./login"
;
...
@@ -245,20 +228,6 @@ export default {
...
@@ -245,20 +228,6 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
copy
(
e
)
{
if
(
this
.
payIndex
===
1
)
{
Toast
(
"支付宝支付获取成功,请把粘贴到支付宝里"
);
}
},
onError
()
{
if
(
this
.
payIndex
===
1
)
{
Toast
(
"支付宝支付获取成功,请把粘贴到支付宝里"
);
}
},
// 支付方式
payListClick
(
val
)
{
this
.
payIndex
=
val
},
recursion
()
{
recursion
()
{
getCourseInfoApi
().
then
(
res
=>
{
getCourseInfoApi
().
then
(
res
=>
{
if
(
res
.
status
){
if
(
res
.
status
){
...
@@ -374,57 +343,7 @@ export default {
...
@@ -374,57 +343,7 @@ export default {
json
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
json
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
}
}
this
.
orderFlag
=
false
;
this
.
orderFlag
=
false
;
payApi
(
json
).
then
(
res
=>
{
/* let payTypeArr = ['WX', 'ALI', '卡分期']
let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id }
postPayBillApi(data).then(res => {
if(this.payIndex === 0) {
this.orderNo = res.out_trade_no;
if (res.out_trade_no && !res.appId) {
getCourseInfoApi().then(res => {
this.userCourse = res;
localStorage.setItem(
"userCourse",
JSON.stringify(this.userCourse)
);
this.navPage(res);
});
} else {
let that = this;
this.orderNo = res.out_trade_no;
this.jsApiParameters = res;
wx.miniProgram.getEnv(function(res) {
if (res.miniprogram) {
let payParam = encodeURIComponent(JSON.stringify(json));
wx.miniProgram.navigateTo({
url: `pages/wxPay/main?payParam=${payParam}`
});
} else if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener(
"WeixinJSBridgeReady",
that.jsApiCall,
false
);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", that.jsApiCall);
document.attachEvent(
"onWeixinJSBridgeReady",
that.jsApiCall
);
}
} else {
that.jsApiCall();
}
});
}
}else if(this.payIndex === 1){
this.payUrl = res.pay_url;
}
})
return false*/
payApi
(
json
)
.
then
(
res
=>
{
this
.
orderNo
=
res
.
out_trade_no
;
this
.
orderNo
=
res
.
out_trade_no
;
if
(
res
.
out_trade_no
&&
!
res
.
appId
)
{
if
(
res
.
out_trade_no
&&
!
res
.
appId
)
{
getCourseInfoApi
().
then
(
res
=>
{
getCourseInfoApi
().
then
(
res
=>
{
...
...
src/components/map/index.vue
View file @
b688d37a
...
@@ -6,13 +6,7 @@
...
@@ -6,13 +6,7 @@
@
select=
"onSelect"
@
select=
"onSelect"
/>
/>
<div
class=
"unit-block"
>
<div
class=
"unit-block"
>
<div
class=
"course_title"
@
click=
"actionsheetShow=true"
>
{{
secActions
.
name
}}
<i
class=
"iconfont icon-below-s"
></i>
<div
class=
"course_title"
@
click=
"actionsheetShow=true"
>
{{
secActions
.
name
}}
<i
class=
"iconfont icon-below-s"
></i></div>
<!--
<router-link
:to=
"
{path: '/promptTime', query: { periods_id: secActions.id }}">
<div
class=
"zhongbian-kuang"
>
<img
class=
"zhongbian"
:src=
"zhong"
alt=
""
>
</div>
</router-link>
-->
</div>
<!--竖屏 主题栏-->
<!--竖屏 主题栏-->
<swiper
:options=
"swiperOption"
class=
"banner"
v-if=
"shopType==0&&unitList.length>0"
ref=
"mySwiper"
>
<swiper
:options=
"swiperOption"
class=
"banner"
v-if=
"shopType==0&&unitList.length>0"
ref=
"mySwiper"
>
<swiper-slide
v-for=
"(data,index) in unitList"
:key=
"index"
>
<swiper-slide
v-for=
"(data,index) in unitList"
:key=
"index"
>
...
@@ -185,7 +179,7 @@
...
@@ -185,7 +179,7 @@
</div>
</div>
</div>
</div>
</van-popup>
</van-popup>
<bottom-tab></bottom-tab>
</div>
</div>
</
template
>
</
template
>
...
@@ -203,7 +197,6 @@
...
@@ -203,7 +197,6 @@
import
nextUnitUrl
from
'../../assets/newLesson/nextUnit.png'
import
nextUnitUrl
from
'../../assets/newLesson/nextUnit.png'
import
btn_kechegn
from
'../../assets/btn_kechegn.png'
import
btn_kechegn
from
'../../assets/btn_kechegn.png'
import
zhong
from
'../../assets/evaluate/timer.png'
import
zhong
from
'../../assets/evaluate/timer.png'
import
promptTime
from
'./promptTime'
export
default
{
export
default
{
name
:
"mapDefault"
,
name
:
"mapDefault"
,
...
@@ -211,8 +204,7 @@
...
@@ -211,8 +204,7 @@
swiper
,
swiper
,
swiperSlide
,
swiperSlide
,
bottomTab
,
bottomTab
,
[
Actionsheet
.
name
]:
Actionsheet
,
[
Actionsheet
.
name
]:
Actionsheet
promptTime
},
},
data
()
{
data
()
{
let
that
=
this
;
let
that
=
this
;
...
@@ -234,7 +226,7 @@
...
@@ -234,7 +226,7 @@
push_time
:
''
,
push_time
:
''
,
course_name
:
''
,
course_name
:
''
,
nextUnitUrl
:
nextUnitUrl
,
nextUnitUrl
:
nextUnitUrl
,
periods_id
:
this
.
$route
.
query
.
periods_id
,
// periods_id:
this.$route.query.periods_id,
parent_category_id
:
this
.
$route
.
query
.
parent_category_id
,
parent_category_id
:
this
.
$route
.
query
.
parent_category_id
,
unitList
:[],
unitList
:[],
more
:
false
,
more
:
false
,
...
@@ -291,7 +283,6 @@
...
@@ -291,7 +283,6 @@
}
}
},
},
created
(){
created
(){
console
.
log
(
this
.
periods_id
,
77777
)
this
.
initPage
();
this
.
initPage
();
},
},
filters
:{
filters
:{
...
@@ -756,6 +747,9 @@
...
@@ -756,6 +747,9 @@
}
}
}
}
},
},
timerClick
()
{
alert
(
999
)
}
}
}
}
}
</
script
>
</
script
>
...
@@ -876,8 +870,8 @@
...
@@ -876,8 +870,8 @@
.zhongbian {
.zhongbian {
width: 22 * @toVw;
width: 22 * @toVw;
height: 22 * @toVw;
height: 22 * @toVw;
margin-top:
15
* @toVw;
margin-top:
24
* @toVw;
margin-left: 34 * @toVh;
}
}
}
}
}
}
...
...
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