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
85c5542f
Commit
85c5542f
authored
Dec 26, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pythonClass' into dev
parents
06c512bc
dee252cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
35 deletions
+14
-35
src/components/pythonShare/index.js
+13
-35
src/components/pythonShare/index.scss
+1
-0
No files found.
src/components/pythonShare/index.js
View file @
85c5542f
...
...
@@ -87,8 +87,7 @@ class PythonClass extends Component {
if
(
browser
.
isWeixin
)
{
history
.
push
(
`/pythonShare?id=
${
getParam
(
'id'
)}
&type=
${
getParam
(
'type'
)}
&ques=
${
getParam
(
'ques'
)}
&origin=python`
);
this
.
setState
({
isGuide
:
true
,
entryMode
:
1
isGuide
:
true
});
let
title
=
''
;
let
labelName
=
this
.
formatTitle
(
params
);
...
...
@@ -197,31 +196,10 @@ function PythonContent(props) {
handleToExecute
,
handleToHide
}
=
props
;
return
(
<
div
className
=
"python-container"
>
{
/* 微信 */
}
{
// (entryMode === 0 && isWechat) &&
// <div className="python-header">
// <p className="python-wechat__title">请点击右上角分享</p>
// <i className="iconfont iconyindao"></i>
// </div>
}
{
/* 非微信 */
}
{
// (entryMode === 0 && !isWechat) &&
// <div className="python-header">
// <p className="python-wechat__title">
// {isShare? '快分享给好友吧' : '快发给好友求助吧'}
// </p>
// </div>
}
{
(
entryMode
===
1
&&
isWechat
&&
isGuide
)
&&
isGuide
&&
<
div
className
=
"python-popup"
onClick
=
{
handleToHide
}
>
<
div
className
=
"python-header"
>
<
p
className
=
"python-wechat__title"
>
请点击右上角分享
<
/p
>
...
...
@@ -231,9 +209,7 @@ function PythonContent(props) {
}
<
div
className
=
"python-content"
>
<
div
className
=
"python-user"
>
<
div
className
=
"python-user__portrait"
>
<
img
src
=
{
head_img
}
alt
=
""
/>
<
/div
>
<
i
className
=
"python-user__portrait"
style
=
{{
backgroundImage
:
`url(
${
head_img
}
)`
}}
><
/i
>
<
h2
className
=
"python-user__id"
>
{
nickname
}
<
/h2
>
{
/* 分享 */
}
...
...
@@ -245,7 +221,7 @@ function PythonContent(props) {
<
/p
>
}
{
(
entryMode
!==
0
&&
isShare
)
&&
(
entryMode
===
1
&&
isShare
)
&&
<
p
className
=
"python-user__desc"
>
在
<
span
>
【
{
course_name
}
】
<
/span>完成了<br /
>
...
...
@@ -263,7 +239,7 @@ function PythonContent(props) {
<
/p
>
}
{
(
entryMode
!==
0
&&
!
isShare
)
&&
(
entryMode
===
1
&&
!
isShare
)
&&
<
p
className
=
"python-user__desc"
>
在
<
span
>
【
{
course_name
}
】
<
/span>的<br /
>
...
...
@@ -272,20 +248,22 @@ function PythonContent(props) {
}
<
/div
>
<
h4
className
=
"python-code__title"
>
{
entryMode
!==
0
&&
isShare
&&
!
isWechat
?
`这是Ta的第
${
code_lines
}
行代码`
:
'运行结果'
}
{
entryMode
===
1
&&
isShare
?
`这是Ta的第
${
code_lines
}
行代码`
:
'运行结果'
}
<
/h4
>
<
div
className
=
"python-code__content"
>
<
SelfAceEditor
code
=
{
entryMode
!==
0
&&
isShare
&&
!
isWechat
?
code
:
result
}
/
>
<
SelfAceEditor
code
=
{
entryMode
===
1
&&
isShare
?
code
:
result
}
/
>
<
/div
>
<
h4
className
=
"python-code__title"
>
{
entryMode
!==
0
&&
isShare
&&
!
isWechat
?
'运行结果'
:
'代码'
}
<
/h4
>
<
h4
className
=
"python-code__title"
>
{
entryMode
===
1
&&
isShare
?
'运行结果'
:
'代码'
}
<
/h4
>
<
div
className
=
"python-code__content"
>
{
entryMode
!==
0
&&
isShare
&&
!
isWechat
entryMode
===
1
&&
isShare
?
<
SelfAceEditor
code
=
{
isExecute
?
result
:
''
}
/
>
:
<
SelfAceEditor
code
=
{
code
}
/
>
}
{
(
entryMode
!==
0
&&
isShare
&&
!
isWechat
&&
!
isExecute
)
&&
(
entryMode
===
1
&&
isShare
&&
!
isExecute
)
&&
<
button
className
=
"python-button python-button__execute"
onClick
=
{
handleToExecute
}
>
运行看看
<
/button
>
}
<
/div
>
...
...
@@ -316,7 +294,7 @@ function PythonContent(props) {
}
{
entryMode
!==
0
&&
entryMode
===
1
&&
<
Link
className
=
"python-button python-button__study"
to
=
{
`/python?id=
${
course_id
}
`
}
>
我也要学
Python
<
/Link
>
}
<
/div
>
...
...
src/components/pythonShare/index.scss
View file @
85c5542f
...
...
@@ -56,6 +56,7 @@
border-radius
:
50%
;
box-sizing
:
border-box
;
background-color
:
#fff
;
background-size
:
cover
;
img
{
display
:
block
;
...
...
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