Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
c75b14ed
提交
c75b14ed
authored
7月 02, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updata
上级
d20ccbeb
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
146 行增加
和
10 行删除
+146
-10
.config.pro.js
.config.pro.js
+2
-2
.config.test.js
.config.test.js
+1
-1
pay.js
src/api/pay.js
+7
-0
tx.png
src/assets/images/tx.png
+0
-0
buyCourses.vue
src/pages/my/buyCourses.vue
+42
-0
index.vue
src/pages/my/index.vue
+77
-1
index.vue
src/pages/pay/index.vue
+11
-6
routes.js
src/router/routes.js
+6
-0
没有找到文件。
.config.pro.js
浏览文件 @
c75b14ed
module
.
exports
=
{
url
:
'/
/api.ezijing.com
'
,
url
:
'/'
,
DesDir
:
'./client-dist'
,
apiBaseURL
:
'/
/api.ezijing.com/
'
,
apiBaseURL
:
'/'
,
isUploadStatic
:
false
,
webpack
:
{
externals
:
{
...
...
.config.test.js
浏览文件 @
c75b14ed
module
.
exports
=
{
url
:
'https://transport2.ezijing.com/api'
,
DesDir
:
'./client-dist'
,
//
apiBaseURL: 'https://transport2.ezijing.com/api',
apiBaseURL
:
'https://transport2.ezijing.com/api'
,
isUploadStatic
:
false
,
webpack
:
{
externals
:
{
...
...
src/api/pay.js
浏览文件 @
c75b14ed
...
...
@@ -9,6 +9,13 @@ export function getGoodsDetails(id) {
return
httpRequest
.
get
(
`/zy/v2/mall/product/
${
id
}
`
)
}
/**
* 获取我的购买订单
*/
export
function
getMyOrder
()
{
return
httpRequest
.
get
(
'/zy/v2/mall/order/my'
)
}
/* 模拟考试设置角色 */
export
function
setRole
(
data
)
{
return
httpRequest
.
post
(
'/zy/v2/examination/role'
,
data
,
{
...
...
src/assets/images/tx.png
0 → 100644
浏览文件 @
c75b14ed
4.7 KB
src/pages/my/buyCourses.vue
0 → 100644
浏览文件 @
c75b14ed
<
template
>
<div>
<div
class=
"order-list"
>
<ul>
<li>
<div
class=
"order-info"
>
<img
src=
"../../assets/images/tx.png"
alt=
""
>
<div
class=
"txt"
>
课程标题道路旅客运输企业课
程标题道路旅客运输企业
</div>
</div>
</li>
</ul>
</div>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
lang=
"scss"
scoped
>
.order-list
{
li
{
padding
:
.1rem
.4rem
;
margin-bottom
:
.4rem
;
}
.order-info
{
display
:
flex
;
img
{
width
:
2
.4rem
;
height
:
2
.4rem
;
}
.txt
{
margin-left
:
.2rem
;
font-size
:
.3rem
;
color
:
#222
;
word-wrap
:
break-word
;
}
}
}
</
style
>
src/pages/my/index.vue
浏览文件 @
c75b14ed
<
template
>
<van-button
type=
"default"
@
click=
"logout"
>
退出登录
</van-button>
<div>
<div
class=
"info-box"
>
<img
src=
"../../assets/images/tx.png"
alt=
""
>
<div
class=
"name"
>
点击登录
</div>
</div>
<ul>
<li
v-for=
"(item, index) in navList"
:key=
"index"
@
click=
"go(item.url)"
>
<div
class=
"title"
>
{{
item
.
title
}}
</div>
<van-icon
name=
"arrow"
class=
"icon"
/>
</li>
</ul>
<!--
<van-button
type=
"default"
@
click=
"logout"
>
退出登录
</van-button>
-->
</div>
</
template
>
<
script
>
import
{
logout
}
from
'@/api/account.js'
export
default
{
name
:
'my'
,
data
()
{
return
{
navList
:
[
{
title
:
'已购课程'
,
url
:
'/my/buyCourses'
},
{
title
:
'已做试题'
,
url
:
'/my/buyCourses'
},
{
title
:
'已学课程'
,
url
:
'/my/buyCourses'
},
{
title
:
'消息/通知'
,
url
:
'/my/buyCourses'
},
{
title
:
'意见反馈'
,
url
:
'/my/buyCourses'
}
]
}
},
methods
:
{
logout
()
{
logout
().
then
(
response
=>
{
this
.
$toast
(
'退出成功'
)
})
},
go
(
url
)
{
this
.
$router
.
push
(
url
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.info-box
{
display
:
flex
;
align-items
:
center
;
height
:
2rem
;
img
{
width
:
1
.2rem
;
height
:
1
.2rem
;
margin
:
0
.2rem
0
.4rem
;
}
.name
{
font-size
:
.34rem
;
color
:
#222
;
}
}
ul
{
padding
:
0
.4rem
;
li
{
height
:
1
.1rem
;
border-bottom
:
.01rem
solid
rgba
(
238
,
238
,
238
,
1
);
display
:
flex
;
align-items
:
center
;
.title
{
font-size
:
.3rem
;
color
:
#222
;
}
.icon
{
margin-left
:
auto
;
}
}
li
:last-child
{
border
:
none
;
}
}
</
style
>
src/pages/pay/index.vue
浏览文件 @
c75b14ed
...
...
@@ -4,8 +4,7 @@
</div>
</
template
>
<
script
>
import
Cookies
from
'js-cookie'
import
*
as
api
from
'@/api/pay.js'
// import * as api from '@/api/pay.js'
export
default
{
components
:
{
},
...
...
@@ -14,14 +13,20 @@ export default {
}
},
mounted
()
{
console
.
log
(
Cookies
.
get
(
'TGC'
)
)
this
.
getOpenid
(
)
this
.
getGoodsDetail
()
},
methods
:
{
getOpenid
()
{
console
.
log
(
window
.
G
,
'======'
)
// api.getOpenid().then(res => {
// console.log(res)
// })
},
getGoodsDetail
()
{
api
.
getGoodsDetails
(
'6682927830365372416'
).
then
(
res
=>
{
console
.
log
(
res
)
})
//
api.getGoodsDetails('6682927830365372416').then(res => {
//
console.log(res)
//
})
}
}
}
...
...
src/router/routes.js
浏览文件 @
c75b14ed
...
...
@@ -76,6 +76,12 @@ export default [
name
:
'my'
,
component
:
()
=>
import
(
'../pages/my/index.vue'
)
},
// 我的-已购课程
{
path
:
'/my/buyCourses'
,
name
:
'buyCourses'
,
component
:
()
=>
import
(
'../pages/my/buyCourses.vue'
)
},
// 支付
{
path
:
'/pay'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论