Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
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
baiguangyao
mr-julyedu
Commits
85f0e2c0
Commit
85f0e2c0
authored
Jun 13, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并
parent
904554c4
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
172 additions
and
84 deletions
+172
-84
src/components/detail/btnstatus/index.js
+1
-1
src/components/detail/btnstatus/index.scss
+1
-1
src/components/detail/outline/index.js
+4
-1
src/components/detail/shareRank/index.js
+7
-2
src/components/detail/single/index.js
+6
-6
src/components/my/index.js
+58
-53
src/components/my/index.scss
+49
-5
src/components/myOrders/index.js
+11
-5
src/components/myOrders/index.scss
+29
-0
src/components/purchased/index.js
+1
-8
src/components/sharePoster/index.js
+5
-1
src/components/shopCart/cartList.js
+0
-1
No files found.
src/components/detail/btnstatus/index.js
View file @
85f0e2c0
...
...
@@ -70,7 +70,7 @@ class BtnStatus extends Component {
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
<
button
className
=
'btn btn-m bg-09f'
>
开始学习
<
/button
>
<
Link
to
=
{
`/play?id=
${
getParam
(
'id'
)}
`
}
className
=
'btn btn-m bg-09f'
>
开始学习
<
/Link
>
<
/div
>
}
{
/*拼团 未开团*/
}
...
...
src/components/detail/btnstatus/index.scss
View file @
85f0e2c0
...
...
@@ -7,7 +7,7 @@
background-color
:
$bg_fff
;
display
:
flex
;
justify-content
:
space-between
;
border-top
:
1px
solid
$sp_e7eaf1
;
.consult
{
display
:
inline-block
;
...
...
src/components/detail/outline/index.js
View file @
85f0e2c0
import
React
,
{
Component
}
from
'react'
import
{
Tabs
,
WhiteSpace
}
from
'antd-mobile'
import
'./index.scss'
import
{
api
,
getParam
,
http
}
from
"@/utils"
;
import
{
api
,
getParam
,
http
}
from
"@/utils"
import
{
Toast
}
from
'antd-mobile'
class
OutLine
extends
Component
{
...
...
@@ -25,6 +26,8 @@ class OutLine extends Component {
this
.
setState
({
stageInfo
:
res
.
data
.
data
})
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
src/components/detail/shareRank/index.js
View file @
85f0e2c0
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
import
{
api
,
getParam
,
http
}
from
"@/utils"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
api
,
getParam
,
http
}
from
"@/utils"
import
{
withRouter
}
from
"react-router-dom"
import
{
Toast
}
from
'antd-mobile'
class
ShareRank
extends
Component
{
...
...
@@ -23,6 +24,8 @@ class ShareRank extends Component {
rankingslice
:
res
.
data
.
data
.
slice
(
0
,
2
),
courseInfo
:
this
.
props
.
data
.
course_info
})
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
// 获取分销码
...
...
@@ -34,6 +37,8 @@ class ShareRank extends Component {
this
.
setState
({
code
:
res
.
data
.
data
.
code
})
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
src/components/detail/single/index.js
View file @
85f0e2c0
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
import
{
api
,
getParam
,
http
,
is_weixin
}
from
"@/utils"
;
import
{
Toast
,
WhiteSpace
,
WingBlank
,
Button
}
from
'antd-mobile'
;
import
{
Toast
}
from
'antd-mobile'
;
class
Single
extends
Component
{
...
...
@@ -41,7 +41,7 @@ class Single extends Component {
})
this
.
state
.
payType
===
'1'
?
this
.
alipayPay
(
this
.
state
.
orderId
)
:
this
.
weixinPay
(
this
.
state
.
orderId
)
}
else
{
alert
(
res
.
data
.
msg
)
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
@@ -56,7 +56,7 @@ class Single extends Component {
if
(
res
.
data
.
errno
===
0
)
{
window
.
location
.
href
=
res
.
data
.
data
.
url
+
"&redirect_url="
+
encodeURIComponent
(
window
.
location
.
href
+
"&weixinpay=1"
).
toLowerCase
();
}
else
{
alert
(
res
.
data
.
msg
);
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
@@ -67,7 +67,7 @@ class Single extends Component {
if
(
res
.
data
.
errno
===
0
)
{
window
.
location
=
res
.
data
.
data
.
url
;
}
else
{
alert
(
res
.
data
.
msg
);
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
@@ -112,7 +112,7 @@ class Single extends Component {
this
.
onBridgeReady
()
}
}
else
{
alert
(
res
.
data
.
msg
)
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
@@ -145,7 +145,7 @@ class Single extends Component {
status
:
2
})
}
else
{
alert
(
res
.
data
.
data
.
msg
)
Toast
.
info
(
res
.
data
.
data
.
msg
,
2
)
}
})
}
...
...
src/components/my/index.js
View file @
85f0e2c0
...
...
@@ -5,8 +5,7 @@ import Avatar from './image/avatar.png';
import
Vip
from
'./image/vip.png'
;
import
{
WithTab
}
from
'@/HOCs'
import
{
Link
}
from
"react-router-dom"
;
// import UnVip from './image/unVIP.png';
import
{
connect
}
from
"react-redux"
;
const
Item
=
List
.
Item
;
const
Brief
=
Item
.
Brief
;
...
...
@@ -18,70 +17,81 @@ class My extends PureComponent {
data
:
[]
}
}
// 去登录
toLogin
=
()
=>
{
this
.
props
.
history
.
push
(
'/passport'
)
}
render
()
{
let
{
history
}
=
this
.
props
;
return
(
<
div
className
=
"flex-container"
>
<
Flex
>
<
Flex
.
Item
>
<
NavBar
className
=
"my-tab"
mode
=
"light"
>
我的
<
/NavBar
>
{
/* <List className="my-list">
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
const
username
=
user
&&
user
.
data
&&
user
.
data
.
username
const
avatar
=
user
&&
user
.
data
&&
user
.
data
.
avatar
const
isVIP
=
user
&&
user
.
data
&&
user
.
data
.
isVIP
let
list
if
(
!
uid
)
{
list
=
<
List
className
=
"my-list"
>
<
Item
className
=
"avatar-wrap"
arrow
=
"horizontal"
multipleLine
thumb
=
{
Avatar
}
onClick={() => { }
}>
onClick
=
{
this
.
toLogin
}
>
<
Brief
>
点击登录
<
/Brief
>
<
/Item
>
</List> */
}
<
List
className
=
"my-list"
>
<
/List
>
}
else
{
list
=
<
List
className
=
"my-list"
>
<
Item
className
=
"avatar-wrap"
arrow
=
"horizontal"
multipleLine
thumb
=
{
A
vatar
}
thumb
=
{
a
vatar
}
onClick
=
{()
=>
{
}}
>
<
Brief
style
=
{{
fontSize
:
"18px"
}}
>
xuan
先生
<
img
src
=
{
Vip
}
alt
=
""
/>
<
Brief
>
{
username
}
{
isVIP
===
1
&&
<
img
src
=
{
Vip
}
className
=
'vip'
alt
=
""
/>
}
<
/Brief
>
<
Brief
style
=
{{
fontSize
:
"12px"
}}
>
学号
:
410026
<
/Brief
>
<
Brief
style
=
{{
fontSize
:
"12px"
}}
>
学号
:
{
uid
}
<
/Brief
>
<
/Item
>
{
isVIP
===
0
&&
<
div
className
=
"my-isvip"
><
/div
>
{
/* <div className="my-shadow"></div> */
}
}
<
/List
>
<
List
>
<
Item
arrow
=
"horizontal"
onClick
=
{()
=>
{
}}
>
}
return
(
<
div
className
=
"flex-container"
>
<
Flex
>
<
Flex
.
Item
>
<
NavBar
className
=
"my-tab"
mode
=
"light"
>
我的
<
/NavBar
>
{
list
}
<
div
className
=
"am-list-header"
><
/div
>
<
List
className
=
"my-list-content"
>
<
Link
to
=
'/purchased'
>
<
Item
arrow
=
"horizontal"
>
<
i
className
=
"iconfont iconiconfront-27"
><
/i
>
已购课程
<
/Item
>
<
/Link
>
<
Link
to
=
'/shopcart'
>
<
Item
arrow
=
"horizontal"
onClick
=
{()
=>
{
}}
>
<
i
className
=
"iconfont icongouwuche"
><
/i
>
<
Item
arrow
=
"horizontal"
>
<
i
className
=
"iconfont icongouwuche-xianxing"
><
/i
>
购物车
<
/Item
>
<
/Link
>
<
Link
to
=
'/myorders'
>
<
Item
arrow
=
"horizontal"
onClick
=
{()
=>
{
}}
>
<
Item
arrow
=
"horizontal"
>
<
i
className
=
"iconfont iconiconfront-24"
><
/i
>
课程订单
<
/Item
>
...
...
@@ -92,27 +102,20 @@ class My extends PureComponent {
from
:
this
.
props
.
location
.
pathname
}
}}
>
<
Item
arrow
=
"horizontal"
>
<
Item
arrow
=
"horizontal"
className
=
"no-border"
>
<
i
className
=
"iconfont iconiconfront-52"
><
/i
>
优惠券
<
/Item
>
<
/Link
>
<
div
className
=
"am-list-header"
><
/div
>
<
/List
>
<
Link
to
=
'/scholarship'
>
<
List
renderHeader
=
{()
=>
''
}
>
<
Item
arrow
=
"horizontal"
onClick
=
{()
=>
{
}}
>
<
Item
arrow
=
"horizontal"
className
=
'btm-scholarship'
>
<
i
className
=
"iconfont iconiconfront-51"
><
/i
>
赚奖学金
<
/Item
>
<
/List
>
<
/Link
>
<
/List
>
<
/Flex.Item
>
<
/Flex
>
...
...
@@ -123,4 +126,7 @@ class My extends PureComponent {
}
export
default
WithTab
(
My
);
\ No newline at end of file
export
default
connect
(
state
=>
({
user
:
state
.
user
}),
null
)(
WithTab
(
My
))
src/components/my/index.scss
View file @
85f0e2c0
...
...
@@ -7,9 +7,28 @@
background
:
$bg_f7f9fc
;
}
.my-list-content
{
.am-list-item-middle
{
height
:
50px
;
.am-list-line
{
border-bottom
:
1px
solid
$border_e7eaf1
;
padding
:
0
;
}
}
.no-border
{
.am-list-line
{
border-bottom
:
none
;
}
}
}
.my-list
{
.avatar-wrap
{
padding
:
15px
20px
;
height
:
95px
;
}
}
...
...
@@ -29,8 +48,13 @@
// 修改List组件默认样式
.am-list-item
{
padding-left
:
22px
;
padding-right
:
8px
;
padding
:
0
20px
;
.vip
{
width
:
18px
;
height
:
17px
;
margin-left
:
6px
;
}
}
.am-list-item
.am-list-line-multiple
{
...
...
@@ -41,6 +65,7 @@
img
{
width
:
64px
;
height
:
64px
;
border-radius
:
50%
;
}
}
...
...
@@ -54,13 +79,28 @@
}
.am-list-content
{
font-size
:
14px
!
important
;
color
:
$color_333
!
important
;
i
{
vertical-align
:
middle
;
margin-top
:
-1px
;
display
:
inline-block
;
margin-right
:
12px
;
margin
:
10px
12px
10px
0
;
font-size
:
30px
!
important
;
font-size
:
18px
!
important
;
}
}
.my-list
{
.am-list-arrow
{
width
:
8px
!
important
;
height
:
15px
!
important
;
}
}
.am-list-body
{
.am-list-arrow
{
width
:
7px
;
height
:
12px
;
}
}
...
...
@@ -74,6 +114,10 @@
}
}
.
am-list-body
:
:
after
{
background-color
:
$bg_fff
!
important
;
}
.am-list-content
i
{
margin
:
0
;
margin-top
:
-4px
;
...
...
src/components/myOrders/index.js
View file @
85f0e2c0
...
...
@@ -63,7 +63,8 @@ class MyOrders extends Component {
<
div
className
=
'myorders-box'
>
<
HeaderBar
title
=
{
'我的订单'
}
><
/HeaderBar
>
{
this
.
state
.
data
&&
this
.
state
.
data
.
length
>
0
&&
this
.
state
.
data
.
map
((
item
,
index
)
=>
{
this
.
state
.
data
&&
this
.
state
.
data
.
length
>
0
?
this
.
state
.
data
.
map
((
item
,
index
)
=>
{
return
(
<
div
className
=
"order-body"
key
=
{
index
}
>
<
OrderInfo
item
=
{
item
}
/
>
...
...
@@ -72,7 +73,8 @@ class MyOrders extends Component {
const
Info
=
(
<
div
className
=
"order-info"
>
<
p
className
=
'order-title text-overflow-one'
>
<
Link
to
=
{
`/detail?id=
${
item
.
course_id
}
`
}
>
{
item
.
course_title
}
<
/Link
>
<
Link
to
=
{
`/detail?id=
${
item
.
course_id
}
`
}
>
{
item
.
course_title
}
<
/Link
>
<
/p
>
<
p
className
=
'order-content text-overflow-2'
>
{
item
.
description
}
<
/p
>
<
p
className
=
'order-des'
>
...
...
@@ -83,7 +85,8 @@ class MyOrders extends Component {
)
return
(
<
div
className
=
"order-wrap"
key
=
{
index
}
>
<
OrderList
info
=
{
Info
}
src
=
{
item
.
image_name
}
id
=
{
item
.
course_id
}
><
/OrderList
>
<
OrderList
info
=
{
Info
}
src
=
{
item
.
image_name
}
id
=
{
item
.
course_id
}
><
/OrderList
>
<
/div
>
)
})
...
...
@@ -92,7 +95,10 @@ class MyOrders extends Component {
<
PayInfo
item
=
{
item
}
cancel
=
{
this
.
cancel
}
/
>
<
/div
>
)
})
})
:
<
div
className
=
"cart-tip"
>
<
p
className
=
'cart-mess'
>
您还没有订单哦,快去逛逛吧
~<
/p
>
<
Link
to
=
'/classify'
>
去逛逛
<
/Link
>
<
/div
>
}
<
/div
>
...
...
@@ -136,7 +142,7 @@ function PayInfo(props) {
props
.
item
.
pay_time
===
'0'
&&
props
.
item
.
member_num
===
0
&&
<
div
className
=
'btm-right'
>
<
button
className
=
'cancel'
onClick
=
{
event
=>
props
.
cancel
(
props
.
item
.
oid
)}
>
取消订单
<
/button
>
<
Link
to
=
'/'
>
去支付
<
/Link
>
<
Link
to
=
'/
order
'
>
去支付
<
/Link
>
<
/div
>
}
...
...
src/components/myOrders/index.scss
View file @
85f0e2c0
.myorders-box
{
width
:
100%
;
height
:
100%
;
background-color
:
$bg_f5f5f5
;
.order-body
{
...
...
@@ -100,4 +101,31 @@
}
}
.cart-tip
{
color
:
#555
;
margin-top
:
140px
;
text-align
:
center
;
.iconfridge
{
font-size
:
21px
;
}
.cart-mess
{
font-size
:
12px
;
color
:
$color_666
;
}
a
{
display
:
inline-block
;
width
:
130px
;
height
:
30px
;
border
:
1px
solid
$bg_active
;
border-radius
:
15px
;
font-size
:
16px
;
margin-top
:
30px
;
color
:
$active
;
text-align
:
center
;
line-height
:
28px
;
}
}
}
\ No newline at end of file
src/components/purchased/index.js
View file @
85f0e2c0
...
...
@@ -5,7 +5,7 @@ import {VList} from '../../common'
import
{
http
,
api
}
from
"@/utils"
;
import
{
Link
}
from
'react-router-dom'
import
{
Toast
}
from
'antd-mobile'
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
class
Purchased
extends
Component
{
constructor
(
props
)
{
...
...
@@ -19,12 +19,6 @@ class Purchased extends Component {
this
.
getList
()
}
componentDidUpdate
(
prevProps
,
prevState
)
{
const
{
user
}
=
this
.
props
console
.
log
(
user
&&
user
.
data
&&
user
.
data
.
uid
);
}
// 获取订单
getList
=
()
=>
{
http
.
get
(
`
${
api
.
home
}
/m/my/courses`
,).
then
((
res
)
=>
{
...
...
@@ -73,7 +67,6 @@ class Purchased extends Component {
}
<
/div
>
:
<
div
className
=
"cart-tip"
>
<
p
><
i
className
=
'iconfont iconfridge'
><
/i></
p
>
<
p
className
=
'cart-mess'
>
您还没有课程哦,快去逛逛吧
~<
/p
>
<
Link
to
=
'/classify'
>
去逛逛
<
/Link
>
<
/div
>
...
...
src/components/sharePoster/index.js
View file @
85f0e2c0
...
...
@@ -2,7 +2,9 @@ import React, {Component} from 'react'
import
'./index.scss'
import
{
HeaderBar
}
from
'../../common'
import
{
http
,
api
,
getParam
}
from
'@/utils'
import
QRCode
from
'qrcode'
;
import
QRCode
from
'qrcode'
import
{
Toast
}
from
'antd-mobile'
class
SharePoster
extends
Component
{
...
...
@@ -32,6 +34,8 @@ class SharePoster extends Component {
name
:
res
.
data
.
data
.
username
})
this
.
initCanvas
(
this
.
state
.
bgImage
,
0
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
...
...
src/components/shopCart/cartList.js
View file @
85f0e2c0
...
...
@@ -25,7 +25,6 @@ class cartList extends Component {
)
})
:
<
div
className
=
"cart-tip"
>
<
p
><
i
className
=
'iconfont iconfridge'
><
/i></
p
>
<
p
className
=
'cart-mess'
>
这里是空的,快去逛逛吧
~<
/p
>
<
Link
to
=
'/classify'
>
去逛逛
<
/Link
>
<
/div
>
...
...
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