Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-template
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b34fc07b
authored
Jul 17, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp 修改
parent
f2eec6e6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
119 additions
and
112 deletions
+119
-112
package.json
+1
-1
src/App.vue
+18
-18
src/api/city.js
+14
-17
src/api/company.js
+3
-3
src/api/feedback.js
+19
-19
src/api/files.js
+11
-12
src/components/Index.vue
+0
-1
src/components/page/index.vue
+0
-0
src/components/page/methods.js
+14
-0
src/components/page/mixin.js
+1
-1
src/components/page/page1.vue
+12
-12
src/components/page/pages.js
+0
-0
src/config/request.js
+3
-3
src/store/getters.js
+1
-1
src/utils/format.js
+3
-3
src/utils/index.js
+6
-6
src/utils/request.js
+1
-1
src/utils/swiper.animate1.0.3.min.js
+3
-4
src/utils/validate.js
+9
-10
No files found.
package.json
View file @
b34fc07b
...
...
@@ -10,7 +10,7 @@
"unit"
:
"jest --config test/unit/jest.conf.js --coverage"
,
"e2e"
:
"node test/e2e/runner.js"
,
"test"
:
"npm run unit && npm run e2e"
,
"lint"
:
"eslint --ext .js,.vue src test/unit test/e2e/specs"
,
"lint"
:
"eslint --
fix --
ext .js,.vue src test/unit test/e2e/specs"
,
"build"
:
"node build/build.js"
},
"dependencies"
:
{
...
...
src/App.vue
View file @
b34fc07b
...
...
@@ -5,35 +5,35 @@
</
template
>
<
script
>
import
page
from
"./components/page/index.vue"
;
var
self
=
null
;
window
.
getQuery
=
function
(
key
)
{
var
url
=
location
.
search
;
//
获取url中"?"符后的字串
var
theRequest
=
new
Object
()
;
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
)
;
var
strs
=
str
.
split
(
"&"
);
import
page
from
'./components/page/index.vue'
var
self
=
null
window
.
getQuery
=
function
(
key
)
{
var
url
=
location
.
search
//
获取url中"?"符后的字串
var
theRequest
=
new
Object
()
if
(
url
.
indexOf
(
'?'
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
)
var
strs
=
str
.
split
(
'&'
)
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"="
)[
0
]]
=
decodeURI
(
strs
[
i
].
split
(
"="
)[
1
]);
theRequest
[
strs
[
i
].
split
(
'='
)[
0
]]
=
decodeURI
(
strs
[
i
].
split
(
'='
)[
1
])
}
}
if
(
key
)
{
return
theRequest
[
key
]
===
"undefined"
||
theRequest
[
key
]
==
"0"
?
""
:
theRequest
[
key
]
;
return
theRequest
[
key
]
===
'undefined'
||
theRequest
[
key
]
==
'0'
?
''
:
theRequest
[
key
]
}
else
{
return
theRequest
;
return
theRequest
}
}
;
}
export
default
{
name
:
"App"
,
data
()
{
return
{}
;
name
:
'App'
,
data
()
{
return
{}
},
components
:
{
page
:
page
}
}
;
}
</
script
>
<
style
>
...
...
src/api/city.js
View file @
b34fc07b
import
request
from
'src/config/request'
import
{
CLIENT_CHOOSE_IMAGE
}
from
'src/config/jsBridge'
import
{
upLoad
}
from
'src/api/files'
export
function
getAllCity
()
{
// 获取所有城市
export
function
getAllCity
()
{
// 获取所有城市
return
request
({
url
:
'/city/all'
,
method
:
'get'
,
...
...
@@ -9,8 +9,8 @@ export function getAllCity() { // 获取所有城市
})
}
export
function
avatarUpload
(
token
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
export
function
avatarUpload
(
token
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
CLIENT_CHOOSE_IMAGE
().
then
((
res
)
=>
{
var
src
=
JSON
.
parse
(
res
)[
0
].
data
upLoad
(
src
,
3
).
then
(
res
=>
{
...
...
@@ -31,9 +31,8 @@ export function avatarUpload(token) {
})
})
})
}
export
function
getcityList
(
parentcode
)
{
export
function
getcityList
(
parentcode
)
{
return
request
({
url
:
'/area/parentcode/'
+
parentcode
,
method
:
'get'
,
...
...
@@ -41,7 +40,7 @@ export function getcityList(parentcode) {
})
}
export
function
updateInfo
(
name
,
gendar
,
age
,
education
,
experience
,
ticket
,
introduce
,
identityNo
,
portrait
)
{
export
function
updateInfo
(
name
,
gendar
,
age
,
education
,
experience
,
ticket
,
introduce
,
identityNo
,
portrait
)
{
return
request
({
url
:
'/user/updateBasicInfo'
,
method
:
'post'
,
...
...
@@ -59,7 +58,7 @@ export function updateInfo(name, gendar, age, education, experience, ticket, int
})
}
export
function
getDict
()
{
// 获取字典
export
function
getDict
()
{
// 获取字典
return
request
({
url
:
'/dict/all'
,
method
:
'get'
,
...
...
@@ -67,7 +66,7 @@ export function getDict() { // 获取字典
})
}
export
function
addUserHope
(
jobType
,
dictCityId
,
salary
,
ticket
,
minSalary
,
maxSalary
)
{
export
function
addUserHope
(
jobType
,
dictCityId
,
salary
,
ticket
,
minSalary
,
maxSalary
)
{
return
request
({
url
:
'/userexpect/add'
,
method
:
'post'
,
...
...
@@ -84,7 +83,7 @@ export function addUserHope(jobType, dictCityId, salary, ticket, minSalary, maxS
}
})
}
export
function
updateUserHope
(
jobType
,
dictCityId
,
salary
,
ticket
,
id
,
minSalary
,
maxSalary
)
{
export
function
updateUserHope
(
jobType
,
dictCityId
,
salary
,
ticket
,
id
,
minSalary
,
maxSalary
)
{
return
request
({
url
:
'/userexpect/update'
,
method
:
'post'
,
...
...
@@ -102,7 +101,7 @@ export function updateUserHope(jobType, dictCityId, salary, ticket, id, minSalar
}
})
}
export
function
getUserInfo
(
userId
,
ticket
)
{
export
function
getUserInfo
(
userId
,
ticket
)
{
return
request
({
url
:
'/user/getBasicInfo'
,
method
:
'get'
,
...
...
@@ -112,7 +111,7 @@ export function getUserInfo(userId, ticket) {
}
})
}
export
function
addWork
(
companyName
,
position
,
startTime
,
endTime
,
content
,
ticket
)
{
export
function
addWork
(
companyName
,
position
,
startTime
,
endTime
,
content
,
ticket
)
{
return
request
({
url
:
'/workexperience/add'
,
method
:
'post'
,
...
...
@@ -126,7 +125,7 @@ export function addWork(companyName, position, startTime, endTime, content, tick
}
})
}
export
function
editWork
(
data
)
{
export
function
editWork
(
data
)
{
return
request
({
url
:
'/workexperience/modify'
,
method
:
'post'
,
...
...
@@ -136,8 +135,7 @@ export function editWork(data) {
})
}
export
function
getWork
(
userId
,
ticket
)
{
export
function
getWork
(
userId
,
ticket
)
{
return
request
({
url
:
'/workexperience/find'
,
method
:
'get'
,
...
...
@@ -147,7 +145,7 @@ export function getWork(userId, ticket) {
}
})
}
export
function
getUserExpect
(
userId
,
ticket
)
{
export
function
getUserExpect
(
userId
,
ticket
)
{
return
request
({
url
:
'/userexpect/find'
,
method
:
'get'
,
...
...
@@ -157,7 +155,7 @@ export function getUserExpect(userId, ticket) {
}
})
}
export
function
selectType
(
type
,
ticket
)
{
export
function
selectType
(
type
,
ticket
)
{
return
request
({
url
:
'/user/selectType'
,
method
:
'post'
,
...
...
@@ -167,4 +165,3 @@ export function selectType(type, ticket) {
}
})
}
src/api/company.js
View file @
b34fc07b
...
...
@@ -241,10 +241,10 @@ export function addContract (data) {
export
function
getContract
(
id
,
isview
=
true
)
{
// 获取录用协议
return
request
({
url
:
'/contract/'
+
id
,
url
:
'/contract/'
+
id
,
method
:
'get'
,
params
:
{
view
:
isview
view
:
isview
},
data
:
{}
})
...
...
@@ -404,7 +404,7 @@ export function getCompanyComment (companyId, pageNo, pageSize) {
})
}
export
function
getComment
(
contractId
)
{
export
function
getComment
(
contractId
)
{
return
request
({
url
:
`/comment/
${
contractId
}
`
,
method
:
'get'
...
...
src/api/feedback.js
View file @
b34fc07b
import
request
from
'src/config/request'
export
function
addFeedback
(
term_id
,
categories
,
type
,
title
,
content
,
contact
,
images
,
client
)
{
// 添加反馈
export
function
addFeedback
(
term_id
,
categories
,
type
,
title
,
content
,
contact
,
images
,
client
)
{
// 添加反馈
return
request
({
url
:
'/api/feedback'
,
method
:
'post'
,
...
...
@@ -16,7 +16,7 @@ export function addFeedback(term_id, categories, type, title, content, contact,
})
}
export
function
getClassInfo
(
class_id
,
term_id
)
{
export
function
getClassInfo
(
class_id
,
term_id
)
{
return
request
({
url
:
'api/front/classes/class_appoint'
,
method
:
'get'
,
...
...
@@ -26,7 +26,7 @@ export function getClassInfo(class_id, term_id) {
}
})
}
export
function
getClassStudent
(
class_id
,
term_id
,
limit
,
page
)
{
export
function
getClassStudent
(
class_id
,
term_id
,
limit
,
page
)
{
return
request
({
url
:
'/api/front/classes/class_students'
,
method
:
'get'
,
...
...
@@ -38,7 +38,7 @@ export function getClassStudent(class_id, term_id, limit, page) {
}
})
}
export
function
getClassAtt
(
class_id
,
term_id
,
limit
,
page
)
{
export
function
getClassAtt
(
class_id
,
term_id
,
limit
,
page
)
{
return
request
({
url
:
'api/front/class/attendance?search=class_id:'
+
class_id
,
method
:
'get'
,
...
...
@@ -50,7 +50,7 @@ export function getClassAtt(class_id, term_id, limit, page) {
}
})
}
export
function
appExpulsion
(
term_id
,
student_ids
,
apply_description
,
expulsion_cate
)
{
// 申请除名
export
function
appExpulsion
(
term_id
,
student_ids
,
apply_description
,
expulsion_cate
)
{
// 申请除名
return
request
({
url
:
'/api/front/expulsion'
,
method
:
'post'
,
...
...
@@ -62,13 +62,13 @@ export function appExpulsion(term_id, student_ids, apply_description, expulsion_
}
})
}
export
function
getSudentDetail
()
{
export
function
getSudentDetail
()
{
return
request
({
url
:
'/api/front/student/me'
,
method
:
'get'
})
}
export
function
getStransfer
(
term_id
,
student_ids
,
target_class_id
,
apply_description
,
apply_status_name
)
{
// 转班
export
function
getStransfer
(
term_id
,
student_ids
,
target_class_id
,
apply_description
,
apply_status_name
)
{
// 转班
return
request
({
url
:
'/api/front/transfer'
,
method
:
'post'
,
...
...
@@ -80,40 +80,40 @@ export function getStransfer(term_id, student_ids, target_class_id, apply_descri
}
})
}
export
function
getLeaves
()
{
// 请假列表
export
function
getLeaves
()
{
// 请假列表
return
request
({
url
:
'api/front/leaves'
,
method
:
'get'
})
}
export
function
getLeaveinfo
(
id
)
{
// 请假详情
export
function
getLeaveinfo
(
id
)
{
// 请假详情
return
request
({
url
:
'api/approve/'
+
id
,
method
:
'get'
})
}
export
function
getMeettingLeave
(
data
)
{
// 班会请假
export
function
getMeettingLeave
(
data
)
{
// 班会请假
return
request
({
url
:
'api/front/meetingleave'
,
method
:
'post'
,
data
})
}
export
function
getAssignmentleave
(
data
)
{
// 作业请假
export
function
getAssignmentleave
(
data
)
{
// 作业请假
return
request
({
url
:
'/api/front/assignmentleave'
,
method
:
'post'
,
data
:
data
})
}
export
function
getClassmeeting
()
{
// 班级班会
export
function
getClassmeeting
()
{
// 班级班会
return
request
({
url
:
'api/front/classmeeting'
,
method
:
'get'
})
}
export
function
getNotes
(
term_id
,
course_id
,
note_type
,
limit
,
page
)
{
// 笔记列表
export
function
getNotes
(
term_id
,
course_id
,
note_type
,
limit
,
page
)
{
// 笔记列表
return
request
({
url
:
'api/front/notes'
,
method
:
'get'
,
...
...
@@ -126,7 +126,7 @@ export function getNotes(term_id, course_id, note_type, limit, page) { // 笔记
}
})
}
export
function
getMyNote
(
term_id
)
{
export
function
getMyNote
(
term_id
)
{
return
request
({
url
:
'api/front/mynotes'
,
method
:
'get'
,
...
...
@@ -135,7 +135,7 @@ export function getMyNote(term_id) {
}
})
}
export
function
addNotes
(
term_id
,
course_id
,
note_type
,
limit
,
page
)
{
// 笔记添加
export
function
addNotes
(
term_id
,
course_id
,
note_type
,
limit
,
page
)
{
// 笔记添加
return
request
({
url
:
'/api/front/notes'
,
method
:
'post'
,
...
...
@@ -148,7 +148,7 @@ export function addNotes(term_id, course_id, note_type, limit, page) { // 笔记
}
})
}
export
function
editNotes
(
id
,
content
,
is_public
)
{
// 笔记编辑
export
function
editNotes
(
id
,
content
,
is_public
)
{
// 笔记编辑
return
request
({
url
:
'/api/front/notes/'
+
id
,
method
:
'put'
,
...
...
@@ -158,13 +158,13 @@ export function editNotes(id, content, is_public) { // 笔记编辑
}
})
}
export
function
deleteNotes
(
id
)
{
// 笔记删除
export
function
deleteNotes
(
id
)
{
// 笔记删除
return
request
({
url
:
'/api/front/notes/'
+
id
,
method
:
'delete'
})
}
export
function
getChildren
(
data
)
{
export
function
getChildren
(
data
)
{
return
request
({
url
:
'/api/comment/childcomment'
,
method
:
'get'
,
...
...
@@ -173,7 +173,7 @@ export function getChildren(data) {
}
})
}
export
function
editUser
(
id
,
icon
)
{
export
function
editUser
(
id
,
icon
)
{
return
request
({
url
:
'/api/user/'
+
id
,
method
:
'put'
,
...
...
src/api/files.js
View file @
b34fc07b
import
request
from
'src/config/request'
export
function
upLoad
(
file
,
type
)
{
export
function
upLoad
(
file
,
type
)
{
// let formData = new FormData()
// formData.append('uploadType', type)
// formData.append('file', [convertBase64UrlToBlob(file)])
...
...
@@ -16,22 +15,22 @@ export function upLoad(file, type) {
// }
})
}
export
function
convertBase64UrlToBlob
(
urlData
)
{
var
bytes
=
window
.
atob
(
urlData
.
split
(
','
)[
1
])
;
// 去掉url的头,并转换为byte
export
function
convertBase64UrlToBlob
(
urlData
)
{
var
bytes
=
window
.
atob
(
urlData
.
split
(
','
)[
1
])
// 去掉url的头,并转换为byte
// 处理异常,将ascii码小于0的转换为大于0
var
ab
=
new
ArrayBuffer
(
bytes
.
length
)
;
var
ia
=
new
Uint8Array
(
ab
)
;
var
ab
=
new
ArrayBuffer
(
bytes
.
length
)
var
ia
=
new
Uint8Array
(
ab
)
for
(
var
i
=
0
;
i
<
bytes
.
length
;
i
++
)
{
ia
[
i
]
=
bytes
.
charCodeAt
(
i
)
;
ia
[
i
]
=
bytes
.
charCodeAt
(
i
)
}
console
.
log
(
new
Blob
([
ab
],
{
type
:
'image/png'
}))
return
new
Blob
([
ab
],
{
type
:
'image/png'
})
;
})
}
export
function
downLoad
(
token
,
url
)
{
export
function
downLoad
(
token
,
url
)
{
var
iframe
=
document
.
createElement
(
'iframe'
)
iframe
.
style
.
display
=
'none'
console
.
log
(
process
.
env
.
BASE_API
)
...
...
@@ -39,15 +38,15 @@ export function downLoad(token, url) {
document
.
body
.
appendChild
(
iframe
)
}
export
function
baseUrl
()
{
export
function
baseUrl
()
{
return
process
.
env
.
BASE_API
}
export
function
getawayUrl
()
{
export
function
getawayUrl
()
{
return
process
.
env
.
GETAWAY
}
export
function
resetUrl
()
{
export
function
resetUrl
()
{
console
.
log
(
process
.
env
,
'?callback='
+
process
.
env
.
CALLBACKURL
)
return
process
.
env
.
RESET_URL
+
'?callback='
+
process
.
env
.
CALLBACKURL
}
src/components/Index.vue
View file @
b34fc07b
...
...
@@ -15,4 +15,3 @@ export default {
<
style
>
</
style
>
src/components/page/index.vue
View file @
b34fc07b
This diff is collapsed.
Click to expand it.
src/components/page/methods.js
View file @
b34fc07b
export
default
{
created
()
{
window
.
addEventListener
(
'message'
,
(
e
)
=>
{
if
(
e
.
source
!=
window
.
parent
)
return
if
(
typeof
e
.
data
===
'object'
&&
e
.
data
[
'type'
]
===
'editPage'
)
{
if
(
this
.
page
===
e
.
data
[
'page'
])
{
this
.
currentIndex
=
e
.
data
[
'index'
]
}
}
},
false
)
},
watch
:
{
cancelEdit
(
value
)
{
console
.
log
(
'cancels'
)
...
...
src/components/page/mixin.js
View file @
b34fc07b
import
data
from
'./pages.js'
//
console.log(JSON.stringify(data))
console
.
log
(
JSON
.
stringify
(
data
))
export
default
{
data
:
function
()
{
...
...
src/components/page/page1.vue
View file @
b34fc07b
...
...
@@ -94,26 +94,26 @@
</
template
>
<
script
>
import
methods
from
"./methods"
;
import
methods
from
'./methods'
export
default
{
props
:
[
"list"
,
"page"
,
"isEditMode"
,
"cancelEdit"
],
props
:
[
'list'
,
'page'
,
'isEditMode'
,
'cancelEdit'
],
mixins
:
[
methods
],
created
()
{
console
.
log
(
this
.
list
);
created
()
{
//
console.log(this.list);
},
mounted
()
{
mounted
()
{
},
data
()
{
data
()
{
return
{
currentIndex
:
""
,
date
:
"2019.07.04"
,
currentIndex
:
''
,
date
:
'2019.07.04'
,
img
:
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAJSUlEQVR4nOWda4xV1RXHf3MdBIGBAR1AbBWtCKalBSXBZwoTS6mxVi2ofZimtAyCFGJo07QfmvRLXwmmhTRpNf3WJj4QI7Zgbaw0Wo1KCcrDDkhAio3yGphpkdfw74d1T+8++55779y55zXDP1mZ2ffsc/Y6/7POPvusvfY6TZLIAUYC1wHTgKnAJODjwMVACzDaqdsN9ABHgL1AJ7AL+CfwdnFbpmjKiNShwM1AOzAbmAU0x3Dcs8CbwEtFeQU4GcNx60KapDYBNwLfAOYDY1NoswdYD/wB+DNwLoU2UyF1FNABPAh8os59u4D/Av8p/gXrDlqxruGCOo61H1gD/KZ4vMSQJKljgJXAcoyIangf+CuwBdgG7AEOYLdzJTQDV2J98BSsP56D9cXVcARYjRHcVaNu/yApbrlA0jJJXaqMs5I2SnpQ0jUxtz9ZUoekPxXbqYQuSSskNcfNQdyEzpL0jyonsk3SSkkT4z6RCjJB0sPFdithq6Sb8kjqMEm/ktRbQfEXJd2WEpGVpF3SCxX0OydptaSheSF1qqTtFZTdLGl2xmT6cquk1yrou0XWfWRK6t2SuiOUOyRpoaRCDkiMkiZJDxT19HFc0vysSF2q6AfBOknjckBcX6RN0lMR53BO0g/TJvXHEYp8JGlxDojqjyyUdCLinNbIrDpxUldHNP4vSTNzQE4jMl3SexHn9li9xNbbcJSFblV6Q6SkZYKkNyPO8adJkbokorGXJY3OARlxSouklyLOdXncpN6p8ofSK5JG5ICEJGR4BLHnJC3oy/59efefArxO2Ke5DbgVOJ7Iu3M+0AL8BXNLBugGrgferbZjLVKHAW9gzooABzAX3oH+aDrA0AZsBi53ftsC3AScqrRTocZBf0aY0FPA3ZwfhAIcAr4EnHB+uw5YVXWvKn3DzSp/lx+o49BGZWFE/zq73j51CPAWcK3z27PAXQ1d94GNp7AZiwC7gE8T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fnYV9Om0E8X047jWUmfhGLwHuVDNbaZkWqjxHAdKxfnILFx07Euo4R2KrEVsyPeQq7fQ9h37Hah33fbxuwldLHwDLD/wCNnsS3EvSf4AAAAABJRU5ErkJggg=='
,
currentIndex
:
""
};
currentIndex
:
''
}
};
}
}
</
script
>
<
style
>
...
...
src/components/page/pages.js
View file @
b34fc07b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/config/request.js
View file @
b34fc07b
...
...
@@ -6,9 +6,9 @@ import store from 'src/store'
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
BASE_API
,
// api的base_url
timeout
:
10000
// 请求超时时间
})
// console.log(service)
// request拦截器
})
// console.log(service)
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
// Do something before request is sent
// console.log(config.url)
...
...
src/store/getters.js
View file @
b34fc07b
...
...
@@ -7,6 +7,6 @@ const getters = {
userInfo
:
state
=>
state
.
user
.
userInfo
,
noticeList
:
state
=>
state
.
user
.
noticeList
,
city
:
state
=>
state
.
user
.
cityList
,
dict
:
state
=>
state
.
user
.
dict
,
dict
:
state
=>
state
.
user
.
dict
}
export
default
getters
src/utils/format.js
View file @
b34fc07b
export
function
formatDate
(
date
,
fmt
)
{
export
function
formatDate
(
date
,
fmt
)
{
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
''
).
substr
(
4
-
RegExp
.
$1
.
length
))
}
...
...
@@ -18,10 +18,10 @@ export function formatDate(date, fmt) {
return
fmt
}
function
padLeftZero
(
str
)
{
function
padLeftZero
(
str
)
{
return
(
'00'
+
str
).
substr
(
str
.
length
)
}
export
function
getTime
(
time
)
{
export
function
getTime
(
time
)
{
var
time
=
time
.
replace
(
'-'
,
'/'
)
return
new
Date
(
time
).
getTime
()
}
src/utils/index.js
View file @
b34fc07b
...
...
@@ -2,7 +2,7 @@
* Created by jiachenpan on 16/11/18.
*/
export
function
parseTime
(
time
,
cFormat
)
{
export
function
parseTime
(
time
,
cFormat
)
{
if
(
arguments
.
length
===
0
)
{
return
null
}
...
...
@@ -34,7 +34,7 @@ export function parseTime(time, cFormat) {
return
time_str
}
export
function
formatTime
(
time
,
option
)
{
export
function
formatTime
(
time
,
option
)
{
time
=
+
time
*
1000
const
d
=
new
Date
(
time
)
const
now
=
Date
.
now
()
...
...
@@ -57,11 +57,11 @@ export function formatTime(time, option) {
}
}
export
function
isCard
(
card
)
{
var
reg
=
/
(
^
\d{15}
$
)
|
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
;
export
function
isCard
(
card
)
{
var
reg
=
/
(
^
\d{15}
$
)
|
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
return
reg
.
test
(
card
)
}
export
function
isPhone
(
phone
)
{
var
reg
=
/^1
[
3-8
][
0-9
]\d{4,8}
$/
;
export
function
isPhone
(
phone
)
{
var
reg
=
/^1
[
3-8
][
0-9
]\d{4,8}
$/
return
reg
.
test
(
phone
)
}
src/utils/request.js
View file @
b34fc07b
import
axios
from
'axios'
import
Vue
from
'vue'
Vue
.
use
(
axios
)
import
{
Message
}
from
'mint-ui'
import
store
from
'@/store'
import
{
getToken
}
from
'@/utils/auth'
Vue
.
use
(
axios
)
// 创建axios实例
const
service
=
axios
.
create
({
...
...
src/utils/swiper.animate1.0.3.min.js
View file @
b34fc07b
//本插件由www.swiper.com.cn提供
//版本1.03
function
swiperAnimateCache
(
a
){
for
(
j
=
0
;
j
<
a
.
slides
.
length
;
j
++
)
for
(
allBoxes
=
a
.
slides
[
j
].
querySelectorAll
(
".ani"
),
i
=
0
;
i
<
allBoxes
.
length
;
i
++
)
allBoxes
[
i
].
attributes
[
"style"
]?
allBoxes
[
i
].
setAttribute
(
"swiper-animate-style-cache"
,
allBoxes
[
i
].
attributes
[
"style"
].
value
):
allBoxes
[
i
].
setAttribute
(
"swiper-animate-style-cache"
,
" "
),
allBoxes
[
i
].
style
.
visibility
=
"hidden"
}
function
swiperAnimate
(
a
){
clearSwiperAnimate
(
a
);
var
b
=
a
.
slides
[
a
.
activeIndex
].
querySelectorAll
(
".ani"
);
for
(
i
=
0
;
i
<
b
.
length
;
i
++
)
b
[
i
].
style
.
visibility
=
"visible"
,
effect
=
b
[
i
].
attributes
[
"swiper-animate-effect"
]?
b
[
i
].
attributes
[
"swiper-animate-effect"
].
value
:
""
,
b
[
i
].
className
=
b
[
i
].
className
+
" "
+
effect
+
" "
+
"animated"
,
style
=
b
[
i
].
attributes
[
"style"
].
value
,
duration
=
b
[
i
].
attributes
[
"swiper-animate-duration"
]?
b
[
i
].
attributes
[
"swiper-animate-duration"
].
value
:
""
,
duration
&&
(
style
=
style
+
"animation-duration:"
+
duration
+
";-webkit-animation-duration:"
+
duration
+
";"
),
delay
=
b
[
i
].
attributes
[
"swiper-animate-delay"
]?
b
[
i
].
attributes
[
"swiper-animate-delay"
].
value
:
""
,
delay
&&
(
style
=
style
+
"animation-delay:"
+
delay
+
";-webkit-animation-delay:"
+
delay
+
";"
),
b
[
i
].
setAttribute
(
"style"
,
style
)}
function
clearSwiperAnimate
(
a
){
for
(
j
=
0
;
j
<
a
.
slides
.
length
;
j
++
)
for
(
allBoxes
=
a
.
slides
[
j
].
querySelectorAll
(
".ani"
),
i
=
0
;
i
<
allBoxes
.
length
;
i
++
)
allBoxes
[
i
].
attributes
[
"swiper-animate-style-cache"
]
&&
allBoxes
[
i
].
setAttribute
(
"style"
,
allBoxes
[
i
].
attributes
[
"swiper-animate-style-cache"
].
value
),
allBoxes
[
i
].
style
.
visibility
=
"hidden"
,
allBoxes
[
i
].
className
=
allBoxes
[
i
].
className
.
replace
(
"animated"
,
" "
),
allBoxes
[
i
].
attributes
[
"swiper-animate-effect"
]
&&
(
effect
=
allBoxes
[
i
].
attributes
[
"swiper-animate-effect"
].
value
,
allBoxes
[
i
].
className
=
allBoxes
[
i
].
className
.
replace
(
effect
,
" "
))}
\ No newline at end of file
// 本插件由www.swiper.com.cn提供
// 版本1.03
function
swiperAnimateCache
(
a
)
{
for
(
j
=
0
;
j
<
a
.
slides
.
length
;
j
++
)
for
(
allBoxes
=
a
.
slides
[
j
].
querySelectorAll
(
'.ani'
),
i
=
0
;
i
<
allBoxes
.
length
;
i
++
)
allBoxes
[
i
].
attributes
[
'style'
]
?
allBoxes
[
i
].
setAttribute
(
'swiper-animate-style-cache'
,
allBoxes
[
i
].
attributes
[
'style'
].
value
)
:
allBoxes
[
i
].
setAttribute
(
'swiper-animate-style-cache'
,
' '
),
allBoxes
[
i
].
style
.
visibility
=
'hidden'
}
function
swiperAnimate
(
a
)
{
clearSwiperAnimate
(
a
);
var
b
=
a
.
slides
[
a
.
activeIndex
].
querySelectorAll
(
'.ani'
);
for
(
i
=
0
;
i
<
b
.
length
;
i
++
)
b
[
i
].
style
.
visibility
=
'visible'
,
effect
=
b
[
i
].
attributes
[
'swiper-animate-effect'
]
?
b
[
i
].
attributes
[
'swiper-animate-effect'
].
value
:
''
,
b
[
i
].
className
=
b
[
i
].
className
+
' '
+
effect
+
' '
+
'animated'
,
style
=
b
[
i
].
attributes
[
'style'
].
value
,
duration
=
b
[
i
].
attributes
[
'swiper-animate-duration'
]
?
b
[
i
].
attributes
[
'swiper-animate-duration'
].
value
:
''
,
duration
&&
(
style
=
style
+
'animation-duration:'
+
duration
+
';-webkit-animation-duration:'
+
duration
+
';'
),
delay
=
b
[
i
].
attributes
[
'swiper-animate-delay'
]
?
b
[
i
].
attributes
[
'swiper-animate-delay'
].
value
:
''
,
delay
&&
(
style
=
style
+
'animation-delay:'
+
delay
+
';-webkit-animation-delay:'
+
delay
+
';'
),
b
[
i
].
setAttribute
(
'style'
,
style
)
}
function
clearSwiperAnimate
(
a
)
{
for
(
j
=
0
;
j
<
a
.
slides
.
length
;
j
++
)
for
(
allBoxes
=
a
.
slides
[
j
].
querySelectorAll
(
'.ani'
),
i
=
0
;
i
<
allBoxes
.
length
;
i
++
)
allBoxes
[
i
].
attributes
[
'swiper-animate-style-cache'
]
&&
allBoxes
[
i
].
setAttribute
(
'style'
,
allBoxes
[
i
].
attributes
[
'swiper-animate-style-cache'
].
value
),
allBoxes
[
i
].
style
.
visibility
=
'hidden'
,
allBoxes
[
i
].
className
=
allBoxes
[
i
].
className
.
replace
(
'animated'
,
' '
),
allBoxes
[
i
].
attributes
[
'swiper-animate-effect'
]
&&
(
effect
=
allBoxes
[
i
].
attributes
[
'swiper-animate-effect'
].
value
,
allBoxes
[
i
].
className
=
allBoxes
[
i
].
className
.
replace
(
effect
,
' '
))
}
src/utils/validate.js
View file @
b34fc07b
...
...
@@ -2,32 +2,31 @@
* Created by jiachenpan on 16/11/18.
*/
export
function
isvalidUsername
(
str
)
{
export
function
isvalidUsername
(
str
)
{
const
valid_map
=
[
'admin'
,
'editor'
]
return
valid_map
.
indexOf
(
str
.
trim
())
>=
0
}
/* 合法uri*/
export
function
validateURL
(
textval
)
{
/* 合法uri
*/
export
function
validateURL
(
textval
)
{
const
urlregex
=
/^
(
https
?
|ftp
)
:
\/\/([
a-zA-Z0-9.-
]
+
(
:
[
a-zA-Z0-9.&%$-
]
+
)
*@
)
*
((
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
][
0-9
]?)(\.(
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
]?[
0-9
])){3}
|
([
a-zA-Z0-9-
]
+
\.)
*
[
a-zA-Z0-9-
]
+
\.(
com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|
[
a-zA-Z
]{2}))(
:
[
0-9
]
+
)
*
(\/(
$|
[
a-zA-Z0-9.,?'
\\
+&%$#=~_-
]
+
))
*$/
return
urlregex
.
test
(
textval
)
}
/* 小写字母*/
export
function
validateLowerCase
(
str
)
{
/* 小写字母
*/
export
function
validateLowerCase
(
str
)
{
const
reg
=
/^
[
a-z
]
+$/
return
reg
.
test
(
str
)
}
/* 大写字母*/
export
function
validateUpperCase
(
str
)
{
/* 大写字母
*/
export
function
validateUpperCase
(
str
)
{
const
reg
=
/^
[
A-Z
]
+$/
return
reg
.
test
(
str
)
}
/* 大小写字母*/
export
function
validatAlphabets
(
str
)
{
/* 大小写字母
*/
export
function
validatAlphabets
(
str
)
{
const
reg
=
/^
[
A-Za-z
]
+$/
return
reg
.
test
(
str
)
}
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