Commit db219844 authored by 罗成兵's avatar 罗成兵

Merge branch 'dev' of http://gitlab.yiboshi.com/ynby/folacin-front

 Conflicts:
	.env.dev
	package.json
	public/index.html
	src/main.js
	src/views/Home.vue
	src/views/components/allAreaCascader.vue
	src/views/indexComponent/folviteApply/folviteApply.vue
	src/views/indexComponent/folviteDistribution/components/addFolviteDistribution.vue
	src/views/indexComponent/folviteDistribution/components/folviteDistributionDetail.vue
	src/views/indexComponent/folviteDistribution/folviteDistribution.vue
parents 82962834 7dee496f
.DS_Store
node_modules
/dist
dist.zip
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
import md5 from 'js-md5'
//常用工具方法
export const ApiUtils = {
isBlank: function (obj) {
if (obj == null || obj == undefined || obj == "" || obj == {} || obj == []) {
return true;
}
if (obj === null || obj === undefined || obj === "" || obj === {} || obj === []) {
return true;
}
return false;
},
isNotBlank: function (obj) {
return !this.isBlank(obj);
},
copyObject: function (obj) {
if (this.isBlank(obj)) {
return null;
}
let jsonData = JSON.stringify(obj);
let newObj = JSON.parse(jsonData);
return newObj;
},
getLoginInfo: function () {
let info = sessionStorage.getItem('loginInfo');
let newObj = JSON.parse(info);
return newObj;
},
getAddDayDate(tempDate, dayCount) {
let resultDate = new Date((tempDate / 1000 + (86400 * dayCount)) * 1000);//增加n天后的日期
let mouth = resultDate.getMonth() + 1;
let day = resultDate.getDate();
if (mouth < 10) {
mouth = "0" + mouth;
}
if (day < 10) {
day = "0" + day;
}
let resultDateStr = resultDate.getFullYear() + "-" + mouth + "-" + day;//将日期转化为字符串格式
return resultDateStr;
},
getDateStr(date) {
let mouth = date.getMonth() + 1;
let day = date.getDate();
if (mouth < 10) {
mouth = "0" + mouth;
}
if (day < 10) {
day = "0" + day;
}
let resultDateStr = date.getFullYear() + "-" + mouth + "-" + day;//将日期转化为字符串格式
return resultDateStr;
}
}
\ No newline at end of file
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 to comment