Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
30aab417
Commit
30aab417
authored
Feb 22, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'yoona' into 'master'
意见反馈添加图片,手机号(可选) See merge request pigbigbig/beyond-clouds-front!104
parents
c8352e91
173f3e90
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
8 deletions
+128
-8
pages/web/feedback.vue
+64
-3
pages/web/report.vue
+64
-5
No files found.
pages/web/feedback.vue
View file @
30aab417
...
...
@@ -24,15 +24,20 @@
<textarea
class=
"feedback-header"
placeholder=
"相关链接"
v-model=
"feedLink"
></textarea>
<textarea
class=
"feedback-content"
placeholder=
"我的反馈是..."
v-model=
"feedbackContent"
></textarea>
<div
class=
"main-footer"
>
<p
class=
"img-box"
>
添加反馈图片(可选)
<img
:src=
"imgSrc"
alt=
""
>
<input
type=
"file"
@
change=
"(e)=>changeToUploadCover(e)"
>
</p>
<login-input
style=
"width: 334px;"
style=
"width: 334px;
margin-top: 20px;
"
:error-message=
"phoneErrMsg"
placeholder=
"联系方式"
placeholder=
"联系方式
(可选)
"
v-model=
"mobile"
@
handleCheck=
"checkMobile"
@
cancelCheck=
"phoneErrMsg = ''"
@
keyup
.
enter
.
native=
"handleFeedback"
></login-input>
<!--
<login-input-->
<!--style="width: 334px;"-->
<!--:error-message="verifyErrMsg"-->
...
...
@@ -73,6 +78,7 @@ export default {
mobile
:
''
,
verifyCode
:
''
,
verifyErrMsg
:
''
,
imgSrc
:
''
,
isCount
:
false
}
},
...
...
@@ -116,6 +122,33 @@ export default {
// });
// }
// },
//上传图片
async
changeToUploadCover
(
e
)
{
let
formData
=
new
window
.
FormData
();
formData
.
append
(
'file'
,
e
.
target
.
files
[
0
]);
formData
.
append
(
'type'
,
100
);
const
isLt5M
=
(
e
).
target
.
files
[
0
].
size
/
1024
/
1024
<
5
;
if
(
!
isLt5M
)
{
this
.
$message
.
error
(
'图片大小超过5M,请重新选择图片!'
);
return
false
}
let
imgResponse
=
await
this
.
$axios
.
$post
(
config
.
api
.
post
.
Resource
.
file
,
formData
);
if
(
imgResponse
.
code
===
0
)
{
this
.
imgSrc
=
imgResponse
.
data
;
//图片地址
this
.
$message
({
type
:
'success'
,
message
:
'图片上传成功'
})
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
imgResponse
.
msg
})
}
},
handleFeedback
()
{
if
(
this
.
typePicked
===
''
)
{
this
.
$message
({
...
...
@@ -141,7 +174,8 @@ export default {
content
:
this
.
feedbackContent
,
feedbackReason
:
this
.
typePicked
,
link
:
this
.
feedLink
,
mobile
:
this
.
mobile
mobile
:
this
.
mobile
,
picture
:
this
.
imgSrc
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
...
...
@@ -238,6 +272,33 @@ export default {
.main-footer
{
margin-top
:
24
*$
length
;
@extend
%flex-row-spb;
align-items
:
flex-end
;
.img-box
{
margin-bottom
:
20
*$
length
;
overflow
:
hidden
;
width
:
196
*$
length
;
background-color
:
#F4F8FA
;
@extend
%cursorPointer;
@include
border-radius(4*$length);
@include
fontStyle(12,
130,
500,
#999,
center);
&
input
{
float
:
left
;
height
:
100%
;
width
:
100%
;
opacity
:
0
;
transform
:
translateY
(
-200%
);
@extend
%cursorPointer;
}
&
img
{
float
:
left
;
height
:
100%
;
width
:
100%
;
transform
:
translateY
(
-100%
);
object-fit
:
contain
;
}
}
}
}
.feedback-container__submit
{
...
...
pages/web/report.vue
View file @
30aab417
...
...
@@ -2,8 +2,7 @@
<card-container
title=
"投诉举报"
width=
"938px"
height=
"612px"
style=
"margin-bottom: 100px"
style=
"margin-bottom: 100px;padding-bottom: 40px;"
>
<div
class=
"report-container"
>
<div
class=
"report-center"
>
...
...
@@ -37,10 +36,14 @@
<textarea
class=
"report-header"
placeholder=
"想要举报内容的链接"
v-model=
"reportLink"
></textarea>
<textarea
class=
"report-content"
placeholder=
"请填写详细的举报内容"
v-model=
"reportContent"
></textarea>
<div
class=
"main-footer"
>
<p
class=
"img-box"
>
添加反馈图片(可选)
<img
:src=
"imgSrc"
alt=
""
>
<input
type=
"file"
@
change=
"(e)=>changeToUploadCover(e)"
>
</p>
<login-input
style=
"width: 334px;"
:error-message=
"phoneErrMsg"
placeholder=
"联系方式"
placeholder=
"联系方式
(可选)
"
v-model=
"mobile"
@
handleCheck=
"checkMobile"
@
cancelCheck=
"phoneErrMsg = ''"
...
...
@@ -73,6 +76,7 @@
contact
:
''
,
phoneErrMsg
:
''
,
mobile
:
''
,
imgSrc
:
''
}
},
...
...
@@ -87,8 +91,34 @@
checkMobile
()
{
this
.
phoneErrMsg
=
checkPhone
(
this
.
mobile
);
},
//上传图片
async
changeToUploadCover
(
e
)
{
let
formData
=
new
window
.
FormData
();
formData
.
append
(
'file'
,
e
.
target
.
files
[
0
]);
formData
.
append
(
'type'
,
100
);
const
isLt5M
=
(
e
).
target
.
files
[
0
].
size
/
1024
/
1024
<
5
;
if
(
!
isLt5M
)
{
this
.
$message
.
error
(
'图片大小超过5M,请重新选择图片!'
);
return
false
}
let
imgResponse
=
await
this
.
$axios
.
$post
(
config
.
api
.
post
.
Resource
.
file
,
formData
);
if
(
imgResponse
.
code
===
0
)
{
this
.
imgSrc
=
imgResponse
.
data
;
//图片地址
this
.
$message
({
type
:
'success'
,
message
:
'图片上传成功'
})
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
imgResponse
.
msg
})
}
},
handleReport
()
{
if
(
this
.
phoneErrMsg
!==
''
||
this
.
mobile
===
''
)
{
if
(
this
.
phoneErrMsg
!==
''
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'请检查联系方式'
...
...
@@ -99,8 +129,10 @@
content
:
this
.
reportContent
,
feedbackReason
:
this
.
typePicked
,
link
:
this
.
reportLink
,
mobile
:
this
.
mobile
mobile
:
this
.
mobile
,
picture
:
this
.
imgSrc
,
}).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
...
...
@@ -190,6 +222,33 @@
.main-footer
{
margin-top
:
24
*$
length
;
@extend
%flex-row-spb;
align-items
:
flex-end
;
.img-box
{
margin-bottom
:
20
*$
length
;
overflow
:
hidden
;
width
:
196
*$
length
;
background-color
:
#F4F8FA
;
@extend
%cursorPointer;
@include
border-radius(4*$length);
@include
fontStyle(12,
130,
500,
#999,
center);
&
input
{
float
:
left
;
height
:
100%
;
width
:
100%
;
opacity
:
0
;
transform
:
translateY
(
-200%
);
@extend
%cursorPointer;
}
&
img
{
float
:
left
;
height
:
100%
;
width
:
100%
;
transform
:
translateY
(
-100%
);
object-fit
:
contain
;
}
}
>
input
{
padding
:
15
*$
length
16
*$
length
;
background-color
:
#F4F8FA
;
...
...
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