Commit b34fc07b by hank

temp 修改

parent f2eec6e6
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"unit": "jest --config test/unit/jest.conf.js --coverage", "unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js", "e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e", "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" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
......
...@@ -5,35 +5,35 @@ ...@@ -5,35 +5,35 @@
</template> </template>
<script> <script>
import page from "./components/page/index.vue"; import page from './components/page/index.vue'
var self = null; var self = null
window.getQuery = function(key) { window.getQuery = function (key) {
var url = location.search; //获取url中"?"符后的字串 var url = location.search // 获取url中"?"符后的字串
var theRequest = new Object(); var theRequest = new Object()
if (url.indexOf("?") != -1) { if (url.indexOf('?') != -1) {
var str = url.substr(1); var str = url.substr(1)
var strs = str.split("&"); var strs = str.split('&')
for (var i = 0; i < strs.length; i++) { 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) { if (key) {
return theRequest[key] === "undefined" || theRequest[key] == "0" return theRequest[key] === 'undefined' || theRequest[key] == '0'
? "" ? ''
: theRequest[key]; : theRequest[key]
} else { } else {
return theRequest; return theRequest
} }
}; }
export default { export default {
name: "App", name: 'App',
data() { data () {
return {}; return {}
}, },
components: { components: {
page: page page: page
} }
}; }
</script> </script>
<style> <style>
......
import request from 'src/config/request' import request from 'src/config/request'
import { CLIENT_CHOOSE_IMAGE } from 'src/config/jsBridge' import { CLIENT_CHOOSE_IMAGE } from 'src/config/jsBridge'
import { upLoad } from 'src/api/files' import { upLoad } from 'src/api/files'
export function getAllCity() { // 获取所有城市 export function getAllCity () { // 获取所有城市
return request({ return request({
url: '/city/all', url: '/city/all',
method: 'get', method: 'get',
...@@ -9,8 +9,8 @@ export function getAllCity() { // 获取所有城市 ...@@ -9,8 +9,8 @@ export function getAllCity() { // 获取所有城市
}) })
} }
export function avatarUpload(token) { export function avatarUpload (token) {
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
CLIENT_CHOOSE_IMAGE().then((res) => { CLIENT_CHOOSE_IMAGE().then((res) => {
var src = JSON.parse(res)[0].data var src = JSON.parse(res)[0].data
upLoad(src, 3).then(res => { upLoad(src, 3).then(res => {
...@@ -31,9 +31,8 @@ export function avatarUpload(token) { ...@@ -31,9 +31,8 @@ export function avatarUpload(token) {
}) })
}) })
}) })
} }
export function getcityList(parentcode) { export function getcityList (parentcode) {
return request({ return request({
url: '/area/parentcode/' + parentcode, url: '/area/parentcode/' + parentcode,
method: 'get', method: 'get',
...@@ -41,7 +40,7 @@ export function getcityList(parentcode) { ...@@ -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({ return request({
url: '/user/updateBasicInfo', url: '/user/updateBasicInfo',
method: 'post', method: 'post',
...@@ -59,7 +58,7 @@ export function updateInfo(name, gendar, age, education, experience, ticket, int ...@@ -59,7 +58,7 @@ export function updateInfo(name, gendar, age, education, experience, ticket, int
}) })
} }
export function getDict() { // 获取字典 export function getDict () { // 获取字典
return request({ return request({
url: '/dict/all', url: '/dict/all',
method: 'get', method: 'get',
...@@ -67,7 +66,7 @@ export function getDict() { // 获取字典 ...@@ -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({ return request({
url: '/userexpect/add', url: '/userexpect/add',
method: 'post', method: 'post',
...@@ -84,7 +83,7 @@ export function addUserHope(jobType, dictCityId, salary, ticket, minSalary, maxS ...@@ -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({ return request({
url: '/userexpect/update', url: '/userexpect/update',
method: 'post', method: 'post',
...@@ -102,7 +101,7 @@ export function updateUserHope(jobType, dictCityId, salary, ticket, id, minSalar ...@@ -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({ return request({
url: '/user/getBasicInfo', url: '/user/getBasicInfo',
method: 'get', method: 'get',
...@@ -112,7 +111,7 @@ export function getUserInfo(userId, ticket) { ...@@ -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({ return request({
url: '/workexperience/add', url: '/workexperience/add',
method: 'post', method: 'post',
...@@ -126,7 +125,7 @@ export function addWork(companyName, position, startTime, endTime, content, tick ...@@ -126,7 +125,7 @@ export function addWork(companyName, position, startTime, endTime, content, tick
} }
}) })
} }
export function editWork(data) { export function editWork (data) {
return request({ return request({
url: '/workexperience/modify', url: '/workexperience/modify',
method: 'post', method: 'post',
...@@ -136,8 +135,7 @@ export function editWork(data) { ...@@ -136,8 +135,7 @@ export function editWork(data) {
}) })
} }
export function getWork (userId, ticket) {
export function getWork(userId, ticket) {
return request({ return request({
url: '/workexperience/find', url: '/workexperience/find',
method: 'get', method: 'get',
...@@ -147,7 +145,7 @@ export function getWork(userId, ticket) { ...@@ -147,7 +145,7 @@ export function getWork(userId, ticket) {
} }
}) })
} }
export function getUserExpect(userId, ticket) { export function getUserExpect (userId, ticket) {
return request({ return request({
url: '/userexpect/find', url: '/userexpect/find',
method: 'get', method: 'get',
...@@ -157,7 +155,7 @@ export function getUserExpect(userId, ticket) { ...@@ -157,7 +155,7 @@ export function getUserExpect(userId, ticket) {
} }
}) })
} }
export function selectType(type, ticket) { export function selectType (type, ticket) {
return request({ return request({
url: '/user/selectType', url: '/user/selectType',
method: 'post', method: 'post',
...@@ -167,4 +165,3 @@ export function selectType(type, ticket) { ...@@ -167,4 +165,3 @@ export function selectType(type, ticket) {
} }
}) })
} }
...@@ -241,10 +241,10 @@ export function addContract (data) { ...@@ -241,10 +241,10 @@ export function addContract (data) {
export function getContract (id, isview = true) { export function getContract (id, isview = true) {
// 获取录用协议 // 获取录用协议
return request({ return request({
url: '/contract/' + id , url: '/contract/' + id,
method: 'get', method: 'get',
params: { params: {
view : isview view: isview
}, },
data: {} data: {}
}) })
...@@ -404,7 +404,7 @@ export function getCompanyComment (companyId, pageNo, pageSize) { ...@@ -404,7 +404,7 @@ export function getCompanyComment (companyId, pageNo, pageSize) {
}) })
} }
export function getComment(contractId) { export function getComment (contractId) {
return request({ return request({
url: `/comment/${contractId}`, url: `/comment/${contractId}`,
method: 'get' method: 'get'
......
import request from 'src/config/request' 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({ return request({
url: '/api/feedback', url: '/api/feedback',
method: 'post', method: 'post',
...@@ -16,7 +16,7 @@ export function addFeedback(term_id, categories, type, title, content, contact, ...@@ -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({ return request({
url: 'api/front/classes/class_appoint', url: 'api/front/classes/class_appoint',
method: 'get', method: 'get',
...@@ -26,7 +26,7 @@ export function getClassInfo(class_id, term_id) { ...@@ -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({ return request({
url: '/api/front/classes/class_students', url: '/api/front/classes/class_students',
method: 'get', method: 'get',
...@@ -38,7 +38,7 @@ export function getClassStudent(class_id, term_id, limit, page) { ...@@ -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({ return request({
url: 'api/front/class/attendance?search=class_id:' + class_id, url: 'api/front/class/attendance?search=class_id:' + class_id,
method: 'get', method: 'get',
...@@ -50,7 +50,7 @@ export function getClassAtt(class_id, term_id, limit, page) { ...@@ -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({ return request({
url: '/api/front/expulsion', url: '/api/front/expulsion',
method: 'post', method: 'post',
...@@ -62,13 +62,13 @@ export function appExpulsion(term_id, student_ids, apply_description, expulsion_ ...@@ -62,13 +62,13 @@ export function appExpulsion(term_id, student_ids, apply_description, expulsion_
} }
}) })
} }
export function getSudentDetail() { export function getSudentDetail () {
return request({ return request({
url: '/api/front/student/me', url: '/api/front/student/me',
method: 'get' 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({ return request({
url: '/api/front/transfer', url: '/api/front/transfer',
method: 'post', method: 'post',
...@@ -80,40 +80,40 @@ export function getStransfer(term_id, student_ids, target_class_id, apply_descri ...@@ -80,40 +80,40 @@ export function getStransfer(term_id, student_ids, target_class_id, apply_descri
} }
}) })
} }
export function getLeaves() { // 请假列表 export function getLeaves () { // 请假列表
return request({ return request({
url: 'api/front/leaves', url: 'api/front/leaves',
method: 'get' method: 'get'
}) })
} }
export function getLeaveinfo(id) { // 请假详情 export function getLeaveinfo (id) { // 请假详情
return request({ return request({
url: 'api/approve/' + id, url: 'api/approve/' + id,
method: 'get' method: 'get'
}) })
} }
export function getMeettingLeave(data) { // 班会请假 export function getMeettingLeave (data) { // 班会请假
return request({ return request({
url: 'api/front/meetingleave', url: 'api/front/meetingleave',
method: 'post', method: 'post',
data data
}) })
} }
export function getAssignmentleave(data) { // 作业请假 export function getAssignmentleave (data) { // 作业请假
return request({ return request({
url: '/api/front/assignmentleave', url: '/api/front/assignmentleave',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function getClassmeeting() { // 班级班会 export function getClassmeeting () { // 班级班会
return request({ return request({
url: 'api/front/classmeeting', url: 'api/front/classmeeting',
method: 'get' 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({ return request({
url: 'api/front/notes', url: 'api/front/notes',
method: 'get', method: 'get',
...@@ -126,7 +126,7 @@ export function getNotes(term_id, course_id, note_type, limit, page) { // 笔记 ...@@ -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({ return request({
url: 'api/front/mynotes', url: 'api/front/mynotes',
method: 'get', method: 'get',
...@@ -135,7 +135,7 @@ export function getMyNote(term_id) { ...@@ -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({ return request({
url: '/api/front/notes', url: '/api/front/notes',
method: 'post', method: 'post',
...@@ -148,7 +148,7 @@ export function addNotes(term_id, course_id, note_type, limit, page) { // 笔记 ...@@ -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({ return request({
url: '/api/front/notes/' + id, url: '/api/front/notes/' + id,
method: 'put', method: 'put',
...@@ -158,13 +158,13 @@ export function editNotes(id, content, is_public) { // 笔记编辑 ...@@ -158,13 +158,13 @@ export function editNotes(id, content, is_public) { // 笔记编辑
} }
}) })
} }
export function deleteNotes(id) { // 笔记删除 export function deleteNotes (id) { // 笔记删除
return request({ return request({
url: '/api/front/notes/' + id, url: '/api/front/notes/' + id,
method: 'delete' method: 'delete'
}) })
} }
export function getChildren(data) { export function getChildren (data) {
return request({ return request({
url: '/api/comment/childcomment', url: '/api/comment/childcomment',
method: 'get', method: 'get',
...@@ -173,7 +173,7 @@ export function getChildren(data) { ...@@ -173,7 +173,7 @@ export function getChildren(data) {
} }
}) })
} }
export function editUser(id, icon) { export function editUser (id, icon) {
return request({ return request({
url: '/api/user/' + id, url: '/api/user/' + id,
method: 'put', method: 'put',
......
import request from 'src/config/request' import request from 'src/config/request'
export function upLoad(file, type) { export function upLoad (file, type) {
// let formData = new FormData() // let formData = new FormData()
// formData.append('uploadType', type) // formData.append('uploadType', type)
// formData.append('file', [convertBase64UrlToBlob(file)]) // formData.append('file', [convertBase64UrlToBlob(file)])
...@@ -16,22 +15,22 @@ export function upLoad(file, type) { ...@@ -16,22 +15,22 @@ export function upLoad(file, type) {
// } // }
}) })
} }
export function convertBase64UrlToBlob(urlData) { export function convertBase64UrlToBlob (urlData) {
var bytes = window.atob(urlData.split(',')[1]); // 去掉url的头,并转换为byte var bytes = window.atob(urlData.split(',')[1]) // 去掉url的头,并转换为byte
// 处理异常,将ascii码小于0的转换为大于0 // 处理异常,将ascii码小于0的转换为大于0
var ab = new ArrayBuffer(bytes.length); var ab = new ArrayBuffer(bytes.length)
var ia = new Uint8Array(ab); var ia = new Uint8Array(ab)
for (var i = 0; i < bytes.length; i++) { for (var i = 0; i < bytes.length; i++) {
ia[i] = bytes.charCodeAt(i); ia[i] = bytes.charCodeAt(i)
} }
console.log(new Blob([ab], { console.log(new Blob([ab], {
type: 'image/png' type: 'image/png'
})) }))
return new Blob([ab], { return new Blob([ab], {
type: 'image/png' type: 'image/png'
}); })
} }
export function downLoad(token, url) { export function downLoad (token, url) {
var iframe = document.createElement('iframe') var iframe = document.createElement('iframe')
iframe.style.display = 'none' iframe.style.display = 'none'
console.log(process.env.BASE_API) console.log(process.env.BASE_API)
...@@ -39,15 +38,15 @@ export function downLoad(token, url) { ...@@ -39,15 +38,15 @@ export function downLoad(token, url) {
document.body.appendChild(iframe) document.body.appendChild(iframe)
} }
export function baseUrl() { export function baseUrl () {
return process.env.BASE_API return process.env.BASE_API
} }
export function getawayUrl() { export function getawayUrl () {
return process.env.GETAWAY return process.env.GETAWAY
} }
export function resetUrl() { export function resetUrl () {
console.log(process.env, '?callback=' + process.env.CALLBACKURL) console.log(process.env, '?callback=' + process.env.CALLBACKURL)
return process.env.RESET_URL + '?callback=' + process.env.CALLBACKURL return process.env.RESET_URL + '?callback=' + process.env.CALLBACKURL
} }
...@@ -15,4 +15,3 @@ export default { ...@@ -15,4 +15,3 @@ export default {
<style> <style>
</style> </style>
export default { 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: { watch: {
cancelEdit (value) { cancelEdit (value) {
console.log('cancels') console.log('cancels')
......
import data from './pages.js' import data from './pages.js'
// console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
export default { export default {
data: function () { data: function () {
......
...@@ -94,26 +94,26 @@ ...@@ -94,26 +94,26 @@
</template> </template>
<script> <script>
import methods from "./methods"; import methods from './methods'
export default { export default {
props: ["list", "page", "isEditMode", "cancelEdit"], props: ['list', 'page', 'isEditMode', 'cancelEdit'],
mixins: [methods], mixins: [methods],
created() { created () {
console.log(this.list); // console.log(this.list);
}, },
mounted() { mounted () {
}, },
data() { data () {
return { return {
currentIndex: "", currentIndex: '',
date: "2019.07.04", date: '2019.07.04',
img: img:
"data:image/png;base64,iVBORw0KGgoAAAAN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ldLHwDLD/wCNnsS3EvSf4AAAAABJRU5ErkJggg==',
currentIndex: "" currentIndex: ''
};
} }
}; }
}
</script> </script>
<style> <style>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,9 +6,9 @@ import store from 'src/store' ...@@ -6,9 +6,9 @@ import store from 'src/store'
const service = axios.create({ const service = axios.create({
baseURL: process.env.BASE_API, // api的base_url baseURL: process.env.BASE_API, // api的base_url
timeout: 10000 // 请求超时时间 timeout: 10000 // 请求超时时间
}) })
// console.log(service) // console.log(service)
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
// Do something before request is sent // Do something before request is sent
// console.log(config.url) // console.log(config.url)
......
...@@ -7,6 +7,6 @@ const getters = { ...@@ -7,6 +7,6 @@ const getters = {
userInfo: state => state.user.userInfo, userInfo: state => state.user.userInfo,
noticeList: state => state.user.noticeList, noticeList: state => state.user.noticeList,
city: state => state.user.cityList, city: state => state.user.cityList,
dict: state => state.user.dict, dict: state => state.user.dict
} }
export default getters export default getters
export function formatDate(date, fmt) { export function formatDate (date, fmt) {
if (/(y+)/.test(fmt)) { if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
} }
...@@ -18,10 +18,10 @@ export function formatDate(date, fmt) { ...@@ -18,10 +18,10 @@ export function formatDate(date, fmt) {
return fmt return fmt
} }
function padLeftZero(str) { function padLeftZero (str) {
return ('00' + str).substr(str.length) return ('00' + str).substr(str.length)
} }
export function getTime(time) { export function getTime (time) {
var time = time.replace('-', '/') var time = time.replace('-', '/')
return new Date(time).getTime() return new Date(time).getTime()
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Created by jiachenpan on 16/11/18. * Created by jiachenpan on 16/11/18.
*/ */
export function parseTime(time, cFormat) { export function parseTime (time, cFormat) {
if (arguments.length === 0) { if (arguments.length === 0) {
return null return null
} }
...@@ -34,7 +34,7 @@ export function parseTime(time, cFormat) { ...@@ -34,7 +34,7 @@ export function parseTime(time, cFormat) {
return time_str return time_str
} }
export function formatTime(time, option) { export function formatTime (time, option) {
time = +time * 1000 time = +time * 1000
const d = new Date(time) const d = new Date(time)
const now = Date.now() const now = Date.now()
...@@ -57,11 +57,11 @@ export function formatTime(time, option) { ...@@ -57,11 +57,11 @@ export function formatTime(time, option) {
} }
} }
export function isCard(card) { export function isCard (card) {
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
return reg.test(card) return reg.test(card)
} }
export function isPhone(phone) { export function isPhone (phone) {
var reg = /^1[3-8][0-9]\d{4,8}$/; var reg = /^1[3-8][0-9]\d{4,8}$/
return reg.test(phone) return reg.test(phone)
} }
import axios from 'axios' import axios from 'axios'
import Vue from 'vue' import Vue from 'vue'
Vue.use(axios)
import { Message } from 'mint-ui' import { Message } from 'mint-ui'
import store from '@/store' import store from '@/store'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
Vue.use(axios)
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
......
//本插件由www.swiper.com.cn提供 // 本插件由www.swiper.com.cn提供
//版本1.03 // 版本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," "))} 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
...@@ -2,32 +2,31 @@ ...@@ -2,32 +2,31 @@
* Created by jiachenpan on 16/11/18. * Created by jiachenpan on 16/11/18.
*/ */
export function isvalidUsername(str) { export function isvalidUsername (str) {
const valid_map = ['admin', 'editor'] const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0 return valid_map.indexOf(str.trim()) >= 0
} }
/* 合法uri*/ /* 合法uri */
export function validateURL(textval) { 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.,?'\\+&%$#=~_-]+))*$/ 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) return urlregex.test(textval)
} }
/* 小写字母*/ /* 小写字母 */
export function validateLowerCase(str) { export function validateLowerCase (str) {
const reg = /^[a-z]+$/ const reg = /^[a-z]+$/
return reg.test(str) return reg.test(str)
} }
/* 大写字母*/ /* 大写字母 */
export function validateUpperCase(str) { export function validateUpperCase (str) {
const reg = /^[A-Z]+$/ const reg = /^[A-Z]+$/
return reg.test(str) return reg.test(str)
} }
/* 大小写字母*/ /* 大小写字母 */
export function validatAlphabets(str) { export function validatAlphabets (str) {
const reg = /^[A-Za-z]+$/ const reg = /^[A-Za-z]+$/
return reg.test(str) return reg.test(str)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment