|
@@ -1,6 +1,6 @@
|
|
|
var urls = function() {
|
|
|
var host = "http://192.168.100.3:7979";
|
|
|
- //var host = "http://192.168.5.102:7979";
|
|
|
+ //var host = "http://192.168.5.100:7979";
|
|
|
//var host = "http://192.168.0.83:7979";
|
|
|
var url = {
|
|
|
"path": host,
|
|
@@ -19,12 +19,16 @@ var urls = function() {
|
|
|
"news_list": host + "/app/news/jsonList", //新闻列表
|
|
|
"news_detail": host + "/app/news/detail", //新闻详情
|
|
|
"resume_detail": host + "/app/resume/my_resume", //简历信息
|
|
|
+ "resume_list": host + "/app/resume/resume_list", //企业收到的简历列表
|
|
|
+ "resume_preview": host + "/app/resume/resume_preview", //企业预览用户的简历
|
|
|
"resume_save": host + "/app/resume/save_resume", //保存简历
|
|
|
+ "resume_delivery": host + "/app/resume/resume_delivery", //投递简历
|
|
|
+ "resume_delivery_list": host + "/app/resume/resume_delivery_list", //用户投递简历列表
|
|
|
+ "resume_delivery_delete": host + "/app/resume/resume_delivery_delete", //用户删除投递的简历
|
|
|
"position_push": host + "/app/position/push_position", //发布职位
|
|
|
- "position_json_list": host + "/app/position/jsonList", //职位列表
|
|
|
- "position_list": host + "/app/position/position_list", //职位列表
|
|
|
- "position_my_list": host + "/app/position/position_my_list", //收到的简历
|
|
|
- "position_detail": host + "/app/position/position_detail", //职位详情
|
|
|
+ "position_json_list": host + "/app/position/jsonList", //全部职位列表
|
|
|
+ "position_list": host + "/app/position/position_list", //企业用户发布的职位列表
|
|
|
+ "position_detail": host + "/app/position/position_detail", //职位预览
|
|
|
"position_delete": host + "/app/position/position_delete", //删除职位
|
|
|
"feedback": host + "/app/other/feedback", //意见反馈
|
|
|
"agreement": host + "/app/other/agreement", //服务条款
|
|
@@ -93,7 +97,13 @@ var getUser = function() {
|
|
|
var user = localStorage.getItem("user");
|
|
|
return JSON.parse(user);
|
|
|
}
|
|
|
-
|
|
|
+/**
|
|
|
+ *获取用户简历
|
|
|
+ */
|
|
|
+var getResume = function() {
|
|
|
+ var resume = localStorage.getItem("resume");
|
|
|
+ return JSON.parse(resume);
|
|
|
+}
|
|
|
var getToken = function() {
|
|
|
return localStorage.getItem("token");
|
|
|
}
|
|
@@ -143,19 +153,19 @@ function xw() {
|
|
|
}
|
|
|
//工作经验
|
|
|
function gzyl() {
|
|
|
- return ['不限','一年以下','1-2年','2-3年','3-5年','6-7年','8-10年','10年以上'];
|
|
|
+ return ['不限', '一年以下', '1-2年', '2-3年', '3-5年', '6-7年', '8-10年', '10年以上'];
|
|
|
}
|
|
|
//学历要求
|
|
|
function xlyq() {
|
|
|
- return ['不限','高中','技校','中专','大专','本科','硕士','博士'];
|
|
|
+ return ['不限', '高中', '技校', '中专', '大专', '本科', '硕士', '博士'];
|
|
|
}
|
|
|
//薪资待遇
|
|
|
function xzdy() {
|
|
|
- return ['不限','500-1000','1000-2000','2000-3000','3000-5000','5000-8000','8000-12000','12000-20000','20000-25000','25000以上'];
|
|
|
+ return ['不限', '500-1000', '1000-2000', '2000-3000', '3000-5000', '5000-8000', '8000-12000', '12000-20000', '20000-25000', '25000以上'];
|
|
|
}
|
|
|
//工作经验
|
|
|
function gzyl() {
|
|
|
- return ['不限','1年以下','1-2年','2-3年','3-5年','6-7年','8-10年','10年以上'];
|
|
|
+ return ['不限', '1年以下', '1-2年', '2-3年', '3-5年', '6-7年', '8-10年', '10年以上'];
|
|
|
}
|
|
|
/**
|
|
|
* 复制文本到剪贴板
|
|
@@ -232,7 +242,7 @@ function pickImg(callback, limit) {
|
|
|
* @param url 上传地址
|
|
|
* @param callback
|
|
|
*/
|
|
|
-function upload(url,path,callback) {
|
|
|
+function upload(url, path, callback) {
|
|
|
var task = plus.uploader.createUpload(url, {
|
|
|
method: "POST",
|
|
|
blocksize: 204800,
|
|
@@ -250,6 +260,7 @@ function upload(url,path,callback) {
|
|
|
* @param per 压缩率
|
|
|
*/
|
|
|
function compress(callback, path, per) {
|
|
|
+ plus.nativeUI.showWaiting("正在上传...");
|
|
|
var name = path.substr(path.lastIndexOf('/') + 1);
|
|
|
plus.zip.compressImage({
|
|
|
src: path,
|
|
@@ -258,4 +269,33 @@ function compress(callback, path, per) {
|
|
|
overwrite: true
|
|
|
}, callback,
|
|
|
function(error) {});
|
|
|
+}
|
|
|
+
|
|
|
+function deleteEmptyProperty(object) {
|
|
|
+ for(var i in object) {
|
|
|
+ var value = object[i];
|
|
|
+ if(typeof value === 'object') {
|
|
|
+ if(Array.isArray(value)) {
|
|
|
+ if(value.length == 0) {
|
|
|
+ delete object[i];
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deleteEmptyProperty(value);
|
|
|
+ if(this.isEmpty(value)) {
|
|
|
+ delete object[i];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if(value === '' || value === null || value === undefined) {
|
|
|
+ delete object[i];
|
|
|
+ } else {}
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function isEmpty(object) {
|
|
|
+ for(var name in object) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|