Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
eb76699b
Commit
eb76699b
authored
Oct 28, 2021
by
xhx
Browse files
Options
Browse Files
Download
Plain Diff
fix
parents
fd225a99
1b068704
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
369 additions
and
160 deletions
+369
-160
.env.normal
.env.normal
+2
-0
.env.platform
.env.platform
+2
-0
package.json
package.json
+2
-2
index.html
public/index.html
+1
-1
App.vue
src/App.vue
+13
-9
adminLogin_bg.jpeg
src/assets/adminLogin_bg.jpeg
+0
-0
adminLogin_bg.png
src/assets/adminLogin_bg.png
+0
-0
login_background.png
src/assets/login_background.png
+0
-0
editor.scss
src/assets/sass/editor.scss
+263
-81
variables.scss
src/assets/sass/variables.scss
+20
-0
index.vue
src/components/Editor/index.vue
+19
-9
index.vue
src/views/Login/index.vue
+2
-1
detail.vue
src/views/Root/Activity/detail.vue
+5
-3
index.vue
src/views/Root/Banner/index.vue
+1
-1
index.vue
src/views/Root/Chat/index.vue
+7
-19
const.ts
src/views/Root/Home/const.ts
+2
-1
index.vue
src/views/Root/Home/index.vue
+4
-1
detail.vue
src/views/Root/News/detail.vue
+17
-28
publish.vue
src/views/Root/News/publish.vue
+4
-3
tailwind.config.js
tailwind.config.js
+5
-1
No files found.
.env.normal
View file @
eb76699b
VUE_APP_MODE=normal
NODE_ENV=production
\ No newline at end of file
.env.platform
View file @
eb76699b
VUE_APP_MODE=platform
NODE_ENV=production
\ No newline at end of file
package.json
View file @
eb76699b
...
...
@@ -6,8 +6,8 @@
"serve"
:
"vue-cli-service serve"
,
"platform"
:
"vue-cli-service serve --mode platform"
,
"normal"
:
"vue-cli-service serve --mode normal"
,
"buildPlatform"
:
"vue-cli-service build --mode platform"
,
"buildNormal"
:
"vue-cli-service build --mode normal"
,
"buildPlatform"
:
"vue-cli-service build --mode platform
--report
"
,
"buildNormal"
:
"vue-cli-service build --mode normal
--report
"
,
"buildLive"
:
"vue-cli-service build --mode live"
,
"bdPlatform"
:
"npm run buildPlatform & bash deployPlatform.sh"
,
"bdNormal"
:
"npm run buildNormal & bash deployNormal.sh"
,
...
...
public/index.html
View file @
eb76699b
...
...
@@ -13,7 +13,7 @@
</noscript>
<div
id=
"app"
></div>
<script>
console
.
log
(
'v.0.1.
3
'
);
console
.
log
(
'v.0.1.
6
'
);
</script>
<!-- built files will be auto injected -->
</body>
...
...
src/App.vue
View file @
eb76699b
...
...
@@ -7,11 +7,11 @@
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
zh_CN
from
'ant-design-vue/lib/locale-provider/zh_CN'
import
moment
from
'moment'
import
'moment/locale/zh-cn'
moment
.
locale
(
'zh-cn'
)
import
Vue
from
"vue"
;
import
zh_CN
from
"ant-design-vue/lib/locale-provider/zh_CN"
;
import
moment
from
"moment"
;
import
"moment/locale/zh-cn"
;
moment
.
locale
(
"zh-cn"
);
import
{
DatePicker
,
...
...
@@ -29,7 +29,7 @@ import {
Spin
,
Pagination
,
ConfigProvider
,
}
from
'ant-design-vue'
}
from
"ant-design-vue"
;
Vue
.
use
(
DatePicker
)
.
use
(
Button
)
.
use
(
Table
)
...
...
@@ -44,13 +44,16 @@ Vue.use(DatePicker)
.
use
(
Spin
)
.
use
(
Pagination
)
.
use
(
ConfigProvider
)
.
use
(
FormModel
)
.
use
(
FormModel
)
;
export
default
Vue
.
extend
({
data
()
{
return
{
zh_CN
,
}
}
;
},
})
})
;
</
script
>
<
style
lang=
"scss"
>
@import
"./assets/sass/main.scss"
;
</
style
>
\ No newline at end of file
src/assets/adminLogin_bg.jpeg
0 → 100644
View file @
eb76699b
285 KB
src/assets/adminLogin_bg.png
deleted
100644 → 0
View file @
fd225a99
This diff is collapsed.
Click to expand it.
src/assets/login_background.png
View replaced file @
fd225a99
View file @
eb76699b
This image diff could not be displayed because it is too large. You can
view the blob
instead.
src/assets/sass/editor.scss
View file @
eb76699b
.editor
{
.ProseMirror
{
min-height
:
400px
;
@import
'./variables.scss'
;
.el-tiptap-editor
{
word-wrap
:
break-word
;
white-space
:
break-spaces
;
$root
:
&
;
>
*
{
box-sizing
:
border-box
;
}
p
{
margin-bottom
:
0
;
margin-top
:
0
;
outline
:
none
;
line-height
:
40px
;
min-height
:
40px
;
}
h1
,
h2
,
h3
,
h4
,
h5
{
margin-top
:
20px
;
margin-bottom
:
20px
;
&
:first-child
{
margin-top
:
0
;
}
&
:last-child
{
margin-bottom
:
0
;
}
}
ul
,
ol
{
counter-reset
:
none
;
list-style-type
:
none
;
margin-bottom
:
0
;
margin-left
:
24px
;
margin-top
:
0
;
padding-bottom
:
5px
;
padding-left
:
0
;
padding-top
:
5px
;
}
ol
li
>
p
{
margin
:
0
;
&
:first-child::before
{
content
:
counter
(
el-tiptap-counter
)
'.'
!
important
;
display
:
inline-block
;
left
:
-5px
;
line-height
:
1
;
margin-left
:
-24px
;
position
:
relative
;
text-align
:
right
;
top
:
0
;
width
:
24px
;
}
.ProseMirror
img
.ProseMirror-selectednode
{
outline
:
3px
solid
#68cef8
;
}
ul
li
>
p
{
&
:first-child::before
{
content
:
'\2022'
;
text-align
:
center
;
display
:
inline-block
;
left
:
-5px
;
line-height
:
1
;
margin-left
:
-24px
;
position
:
relative
;
max-width
:
70%
;
margin
:
0
auto
5rem
auto
;
text-align
:
right
;
top
:
0
;
width
:
24px
;
}
}
&
__content
{
overflow-wrap
:
break-word
;
word-wrap
:
break-word
;
word-break
:
break-word
;
ol
{
counter-reset
:
el-tiptap-counter
;
*
{
caret-color
:
currentColor
;
li
>
p
:first-child::before
{
counter-increment
:
el-tiptap-counter
;
}
}
a
{
color
:
$primary-color
;
cursor
:
pointer
;
}
blockquote
{
border-left
:
5px
solid
#edf2fc
;
border-radius
:
2px
;
color
:
$regular-text-color
;
margin
:
10px
0
;
padding-left
:
1em
;
}
code
{
background-color
:
$lighter-primary-color
;
border-radius
:
4px
;
color
:
$primary-color
;
display
:
inline-block
;
font-size
:
14px
;
font-weight
:
700
;
padding
:
0
8px
;
}
pre
{
padding
:
0
.7rem
1rem
;
border-radius
:
5px
;
background
:
$color-black
;
color
:
$color-white
;
font-size
:
0
.8rem
;
background-color
:
$primary-text-color
;
color
:
$lighter-primary-color
;
font-size
:
16px
;
overflow-x
:
auto
;
padding
:
14px
20px
;
margin
:
10px
0
;
border-radius
:
5px
;
code
{
background-color
:
transparent
;
border-radius
:
0
;
color
:
inherit
;
display
:
block
;
font-family
:
'Menlo,Monaco,Consolas,Courier,monospace'
;
font-size
:
inherit
;
font-weight
:
normal
;
padding
:
0
;
}
}
p
code
{
padding
:
0
.2rem
0
.4rem
;
border-radius
:
5px
;
font-size
:
0
.8rem
;
font-weight
:
bold
;
background
:
rgba
(
$color-black
,
0
.1
);
color
:
rgba
(
$color-black
,
0
.8
);
ul
[
data-type
=
'todo_list'
]
{
margin-left
:
5px
;
.todo-item
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
margin-bottom
:
0
;
&
[
data-text-align
=
'right'
]
{
justify-content
:
flex-end
!
important
;
}
ul
,
ol
{
padding-left
:
1rem
;
&
[
data-text-align
=
'center'
]
{
justify-content
:
center
!
important
;
}
li
>
p
,
li
>
ol
,
li
>
ul
{
margin
:
0
;
&
[
data-text-align
=
'justify'
]
{
text-align
:
space-between
!
important
;
}
a
{
color
:
inherit
;
.todo-content
{
padding-left
:
10px
;
>
p
{
font-size
:
16px
;
&
:last-of-type
{
margin-bottom
:
0
;
}
}
}
blockquote
{
border-left
:
3px
solid
rgba
(
$color-black
,
0
.1
);
color
:
rgba
(
$color-black
,
0
.8
);
padding-left
:
0
.8rem
;
font-style
:
italic
;
&
--done
{
>
.todo-checkbox
{
color
:
$primary-color
;
}
p
{
margin
:
0
;
>
.todo-content
>
p
{
color
:
$primary-color
;
text-decoration
:
line-through
;
}
}
}
}
img
{
max-width
:
100%
;
border-radius
:
3
px
;
hr
{
margin-top
:
20px
;
margin-bottom
:
20
px
;
}
table
{
border-collapse
:
collapse
;
table-layout
:
fixed
;
width
:
100%
;
margin
:
0
;
overflow
:
hidden
;
@for
$i
from
1
through
7
/*
max-indent
*/
{
$indent-margin-base
:
30px
;
td
,
th
{
min-width
:
1em
;
border
:
2px
solid
$color-grey
;
padding
:
3px
5px
;
vertical-align
:
top
;
box-sizing
:
border-box
;
position
:
relative
;
>
*
{
margin-bottom
:
0
;
*[
data-indent
=
'
#{
$i
}
'
]
{
margin-left
:
$indent-margin-base
*
$i
!
important
;
}
}
th
{
font-weight
:
bold
;
font-weight
:
500
;
text-align
:
left
;
}
.selectedCell
:after
{
z-index
:
2
;
position
:
absolute
;
content
:
''
;
left
:
0
;
right
:
0
;
top
:
0
;
.column-resize-handle
{
background-color
:
$light-primary-color
;
bottom
:
0
;
background
:
rgba
(
200
,
200
,
255
,
0
.4
);
pointer-events
:
none
;
}
.column-resize-handle
{
position
:
absolute
;
right
:
-2px
;
top
:
0
;
bottom
:
0
;
width
:
4px
;
z-index
:
20
;
background-color
:
#adf
;
pointer-events
:
none
;
}
}
.tableWrapper
{
margin
:
1em
0
;
overflow-x
:
auto
;
}
.resize-cursor
{
cursor
:
ew-resize
;
cursor
:
col-resize
;
}
h1
{
font-size
:
1
.4rem
!
important
;
font-weight
:
300
!
important
;
line-height
:
1
.5rem
!
important
;
letter-spacing
:
-0
.01562em
!
important
;
}
h2
{
font-size
:
1
.2rem
!
important
;
font-weight
:
300
!
important
;
line-height
:
1
.5rem
!
important
;
letter-spacing
:
-0
.01562em
!
important
;
}
h3
{
font-size
:
1rem
!
important
;
font-weight
:
300
!
important
;
line-height
:
1
.5rem
!
important
;
letter-spacing
:
-0
.01562em
!
important
;
}
>
*
+
*
{
margin-top
:
0
.75em
;
}
ul
,
ol
{
padding
:
0
1rem
;
}
li
{
line-height
:
2em
!
important
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
line-height
:
1
.1
;
}
code
{
background-color
:
rgba
(
#616161
,
0
.1
);
color
:
#616161
;
}
pre
{
background
:
#0d0d0d
;
color
:
#fff
;
font-family
:
'JetBrainsMono'
,
monospace
;
padding
:
0
.75rem
1rem
;
border-radius
:
0
.5rem
;
code
{
color
:
inherit
;
padding
:
0
;
background
:
none
;
font-size
:
0
.8rem
;
}
}
mark
{
background-color
:
#faf594
;
}
img
{
max-width
:
100%
;
height
:
auto
;
}
hr
{
margin
:
1rem
0
;
}
blockquote
{
padding-left
:
1rem
;
border-left
:
2px
solid
rgba
(
#0d0d0d
,
0
.1
);
}
hr
{
border
:
none
;
border-top
:
2px
solid
rgba
(
#0d0d0d
,
0
.1
);
margin
:
2rem
0
;
}
ul
[
data-type
=
'taskList'
]
{
list-style
:
none
;
padding
:
0
;
li
{
display
:
flex
;
align-items
:
center
;
>
label
{
flex
:
0
0
auto
;
margin-right
:
0
.5rem
;
user-select
:
none
;
}
>
div
{
flex
:
1
1
auto
;
}
}
}
}
src/assets/sass/variables.scss
View file @
eb76699b
$color-black
:
#000000
;
$color-white
:
#ffffff
;
$color-grey
:
#dddddd
;
$black-color
:
#000
;
$white-color
:
#fff
;
$light-background-color
:
#f5f7fA
;
$primary-color
:
#409eff
;
$light-primary-color
:
#b3d8ff
;
$lighter-primary-color
:
#d9ecff
;
$extra-light-primary-color
:
#ecf5ff
;
$danger-color
:
#f56c6c
;
$primary-text-color
:
#303133
;
$regular-text-color
:
#606266
;
$placeholder-text-color
:
#c0c4cc
;
$border-color
:
#dcdfe6
;
$lighter-border-color
:
#ebeef5
;
\ No newline at end of file
src/components/Editor/index.vue
View file @
eb76699b
<
template
>
<div
class=
"border border-gray-300 p-3 rounded"
>
<div
class=
"border border-gray-300 p-3 rounded"
>
<EditorMenuBar
:editor=
"editor"
/>
<editor-content
:editor=
"editor"
class=
"editor__content"
/>
<editor-content
:editor=
"editor"
class=
"editor editor__content el-tiptap-editor"
/>
</div>
</
template
>
...
...
@@ -25,14 +28,16 @@ export default Vue.extend({
text
:
{
type
:
String
,
required
:
true
,
default
:
''
default
:
""
,
},
},
watch
:{
text
(
newV
,
oldV
){
this
.
editor
.
commands
.
setContent
(
newV
)
watch
:
{
text
(
newV
,
oldV
)
{
this
.
editor
.
commands
.
setContent
(
newV
,
false
,
{
preserveWhitespace
:
"full"
,
});
this
.
$emit
(
"update:editorContent"
,
newV
);
}
}
,
},
data
()
{
let
editor
:
any
=
undefined
;
...
...
@@ -42,14 +47,19 @@ export default Vue.extend({
},
mounted
()
{
this
.
editor
=
new
Editor
({
parseOptions
:
{
preserveWhitespace
:
"full"
,
},
onUpdate
:
()
=>
{
const
content
=
this
.
editor
.
getHTML
();
this
.
$emit
(
"update:editorContent"
,
content
);
},
extensions
:
[
StarterKit
,
Timage
],
autofocus
:
"start"
,
})
this
.
editor
.
commands
.
setContent
(
this
.
text
)
});
this
.
editor
.
commands
.
setContent
(
this
.
text
,
false
,
{
preserveWhitespace
:
"full"
,
});
},
beforeDestroy
()
{
this
.
editor
.
destroy
();
...
...
src/views/Login/index.vue
View file @
eb76699b
...
...
@@ -325,6 +325,6 @@ export default Vue.extend({
background-image
:
url(../../assets/login_background.png)
;
}
.adminlogin_background
{
background-image
:
url(../../assets/adminLogin_bg.
pn
g)
;
background-image
:
url(../../assets/adminLogin_bg.
jpe
g)
;
}
</
style
>
\ No newline at end of file
src/views/Root/Activity/detail.vue
View file @
eb76699b
...
...
@@ -2,9 +2,11 @@
<div>
<p
class=
"text-2xl font-bold mb-5"
>
{{
title
}}
</p>
{{
$route
.
query
.
id
}}
<p
class=
"text-gray-400"
>
新增
时间:
{{
time
|
formatDate
}}
</p>
<p
class=
"text-gray-400"
>
操作
时间:
{{
time
|
formatDate
}}
</p>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"mx-auto my-5"
/>
<p
class=
"text-left p-5"
v-html=
"content"
>
{{
content
}}
</p>
<div
class=
"text-left p-5 el-tiptap-editor editor"
v-html=
"content"
>
{{
content
}}
</div>
</div>
</
template
>
...
...
@@ -28,7 +30,7 @@ export default Vue.extend({
async
mounted
()
{
const
item
:
eActivityItem
=
JSON
.
parse
(
this
.
$route
.
query
.
record
as
string
);
this
.
title
=
item
.
title
;
this
.
time
=
item
.
created
_at
;
this
.
time
=
item
.
update
_at
;
this
.
content
=
item
.
content
;
this
.
file_name
=
item
.
file_name
;
if
(
this
.
file_name
)
{
...
...
src/views/Root/Banner/index.vue
View file @
eb76699b
...
...
@@ -205,7 +205,7 @@ export default Vue.extend({
rules
:
{
name
:
[{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'blur'
}],
fileList
:
[
{
required
:
true
,
message
:
'请上传
文件
'
,
trigger
:
'change'
},
{
required
:
true
,
message
:
'请上传
图片
'
,
trigger
:
'change'
},
],
},
PAGE_SIZE
,
...
...
src/views/Root/Chat/index.vue
View file @
eb76699b
...
...
@@ -244,12 +244,14 @@ export default Vue.extend({
},
//发布
onSubmit
()
{
(
this
.
$refs
.
ruleForm
as
FormModel
).
validate
(
valid
=>
{
if
(
valid
)
{
// if(this.total
<
10
&&
this
.
total
+
this
.
forms
.
length
<=
10
){
this
.
show
=
false
for
(
let
i
=
0
;
i
<
this
.
forms
.
length
;
i
++
){
if
(
!
this
.
forms
[
i
].
question
){
message
.
error
(
'第'
+
i
+
'个问题为空'
)
}
else
{
FAQService
.
getInstance
().
AddQueAns
({
answer
:
this
.
forms
[
i
].
answer
,
question
:
this
.
forms
[
i
].
question
...
...
@@ -259,25 +261,11 @@ export default Vue.extend({
}
})
}
// }else if(this.total
<
10
&&
this
.
total
+
this
.
forms
.
length
>
10
){
// this.show = false
// for(let i=0;i
<
10
-
this
.
total
;
i
++
){
// FAQService.getInstance(). AddQueAns({
// answer:this.forms[i].answer,
// question: this.forms[i].question
// }).then((ret) => {
// if (ret.code === 200) {
// this.fetchList()
// }
// })
// }
// }else{
// this.show = true
// this.$message.error('数据数量超出限制!', 3);
// }
}
this
.
resetForm
()
}
else
{
console
.
log
(
'error submit!!'
);
message
.
error
(
'error submit!!'
)
return
false
;
}
});
...
...
src/views/Root/Home/const.ts
View file @
eb76699b
export
enum
eBarChart
{
login_dau
=
"login_dau"
,
not_login_dau
=
"total_dau
"
not_login_dau
=
"total_dau"
}
\ No newline at end of file
src/views/Root/Home/index.vue
View file @
eb76699b
...
...
@@ -131,6 +131,9 @@ export default Vue.extend({
this
.
initEchart
();
this
.
queryRealtime
();
},
beforeDestroy
(){
this
.
myChart
&&
echarts
.
dispose
(
this
.
myChart
)
},
methods
:
{
handleChangeTimeRange
(
e
:
any
)
{
this
.
timeRange
=
e
.
target
!
.
value
;
...
...
@@ -170,7 +173,7 @@ export default Vue.extend({
ret
.
data
.
map
((
data
)
=>
{
// 真实数据
this
.
option
.
series
[
0
].
data
.
push
(
data
.
value
);
this
.
option
.
xAxis
.
data
.
push
(
formatDate
(
data
.
time
));
this
.
option
.
xAxis
.
data
.
push
(
formatDate
(
data
.
time
*
1000
));
});
console
.
log
(
'y'
,
this
.
option
.
series
[
0
].
data
,
'x'
,
this
.
option
.
xAxis
.
data
);
...
...
src/views/Root/News/detail.vue
View file @
eb76699b
...
...
@@ -8,39 +8,28 @@
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
News
from
'@/service/News/index'
import
Filter
from
'@/filter/index'
import
Vue
from
"vue"
;
import
News
from
"@/service/News/index"
;
import
Filter
from
"@/filter/index"
;
const
news
=
new
News
()
const
news
=
new
News
()
;
export
default
Vue
.
extend
({
data
(){
return
{
title
:
''
,
time
:
''
,
name
:
''
,
content
:
''
}
data
()
{
return
{
title
:
""
,
time
:
""
,
name
:
""
,
content
:
""
,
}
;
},
filters
:
{
format
(
value
:
string
)
{
return
Filter
.
formatDate
(
value
)
}
return
Filter
.
formatDate
(
value
)
;
}
,
},
methods
:
{
getDetails
()
{
// const type = this.$route.query.type
// const uuid = this.$route.query.key as string
// const request = +type === 1 ? 'searchPolicy' : 'searchNews'
// news[request](uuid).then(res => {
// console.log(res)
// const { data } = res
// this.time = data.created_at
// this.name = data.writer
// this.content = data.content
// this.title = data.title
// })
const
_str
=
this
.
$route
.
query
.
msg
as
string
const
msg
=
JSON
.
parse
(
_str
)
this
.
time
=
msg
.
update_at
...
...
@@ -50,8 +39,7 @@ export default Vue.extend({
}
},
created
()
{
this
.
getDetails
()
}
})
this
.
getDetails
();
},
});
</
script
>
\ No newline at end of file
src/views/Root/News/publish.vue
View file @
eb76699b
...
...
@@ -134,9 +134,10 @@ export default Vue.extend({
this
.
form
.
imageUrl
=
res
.
file_name
?
new
FileService
().
getImageSrc
(
res
.
file_name
)
:
''
this
.
form
.
summary
=
res
.
desc
this
.
form
.
editableContent
=
res
.
content
this
.
form
.
content
=
res
.
content
.
replace
(
/
(
<p>|<
\/
p>
)
+/g
,
''
)
console
.
log
(
'res'
,
res
)
console
.
log
(
'imageUrl'
,
this
.
form
.
imageUrl
)
this
.
form
.
content
=
res
.
content
// this.form.content = res.content.replace(/(
<
p
>|<
\
/
p
>
)
+
/g,''
)
console
.
log
(
this
.
form
.
content
);
// console.log('imageUrl', this.form.imageUrl)
},
getContent
(
value
:
string
){
this
.
form
.
content
=
value
...
...
tailwind.config.js
View file @
eb76699b
const
colors
=
require
(
'tailwindcss/colors'
)
module
.
exports
=
{
purge
:
[],
purge
:
[
'./src/**/*.html'
,
'./src/**/*.js'
,
'./src/**/*.vue'
,
],
presets
:
[],
darkMode
:
false
,
// or 'media' or 'class'
theme
:
{
...
...
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