|
@@ -1,17 +1,31 @@
|
|
|
var urls = function() {
|
|
|
- //var host = "http://192.168.100.3:7979";
|
|
|
- var host = "http://192.168.5.103:7979";
|
|
|
+ var host = "http://192.168.100.3:7979";
|
|
|
+ //var host = "http://192.168.5.102:7979";
|
|
|
+ //var host = "http://192.168.0.83:7979";
|
|
|
var url = {
|
|
|
"path": host,
|
|
|
- "sendMessage": host + "/app/user/sendMessage", //发送短信
|
|
|
+ "sendMessage": host + "/app/user/sendMessage", //发送注册短信
|
|
|
+ "findPassMessage": host + "/app/user/findPassMessage", //发送找回密码短信
|
|
|
"login": host + "/app/user/login", //用户登录
|
|
|
+ "edit_pass": host + "/app/user/edit_pass", //找回密码
|
|
|
+ "register": host + "/app/user/register", //用户注册
|
|
|
"userInfo": host + "/app/user/userInfo", //用户信息
|
|
|
"edit_info": host + "/app/user/edit", //编辑用户信息
|
|
|
"user_upload": host + "/app/user/uploadHeader", //用户上传头像
|
|
|
+ "uploadFj": host + "/app/user/uploadFj", //上传营业执照
|
|
|
+ "uploadPhoto": host + "/app/resume/uploadPhoto", //上传简历照片
|
|
|
"main": host + "/app/main", //首页加载数据
|
|
|
"column": host + "/app/column", //文章栏目
|
|
|
"news_list": host + "/app/news/jsonList", //新闻列表
|
|
|
"news_detail": host + "/app/news/detail", //新闻详情
|
|
|
+ "resume_detail": host + "/app/resume/my_resume", //简历信息
|
|
|
+ "resume_save": host + "/app/resume/save_resume", //保存简历
|
|
|
+ "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_delete": host + "/app/position/position_delete", //删除职位
|
|
|
"feedback": host + "/app/other/feedback", //意见反馈
|
|
|
"agreement": host + "/app/other/agreement", //服务条款
|
|
|
"guide": host + "/app/other/guide/", //萌新必读2
|
|
@@ -108,33 +122,6 @@ function request(url, param, callback) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-//获取订单状态
|
|
|
-var getState = function(index) {
|
|
|
- if(index == 0) {
|
|
|
- return '等待发货';
|
|
|
- }
|
|
|
- if(index == 1) {
|
|
|
- return '等待收货';
|
|
|
- }
|
|
|
- if(index == 2) {
|
|
|
- return '已确认收货 等待归还衣服';
|
|
|
- }
|
|
|
- if(index == 3) {
|
|
|
- return '等待客服收货';
|
|
|
- }
|
|
|
- if(index == 4) {
|
|
|
- return '客服已确认收货 等待退款';
|
|
|
- }
|
|
|
- if(index == 5) {
|
|
|
- return '交易完成';
|
|
|
- }
|
|
|
- if(index == 6) {
|
|
|
- return '申请取消订单中 等待同意';
|
|
|
- }
|
|
|
- if(index == 7) {
|
|
|
- return '订单已取消';
|
|
|
- }
|
|
|
-}
|
|
|
//手机格式验证
|
|
|
function isPhone(phone) {
|
|
|
var reg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
|
|
@@ -145,32 +132,30 @@ function isPhone(phone) {
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
-/**
|
|
|
- * 切换到指定qq联系人
|
|
|
- * @param {Object} qq
|
|
|
- */
|
|
|
-function callqq(qq) {
|
|
|
- if(plus.os.name == "Android") {
|
|
|
- var main = plus.android.runtimeMainActivity();
|
|
|
- var Intent = plus.android.importClass('android.content.Intent');
|
|
|
- var Uri = plus.android.importClass('android.net.Uri');
|
|
|
- var intent = new Intent(Intent.ACTION_VIEW, Uri.parse("mqqwpa://im/chat?chat_type=wpa&uin=" + qq));
|
|
|
- main.startActivity(intent);
|
|
|
- } else {
|
|
|
- plus.runtime.launchApplication({
|
|
|
- action: "mqq://im/chat?chat_type=wpa&uin=" + qq + "&version=1&src_type=web"
|
|
|
- }, function(e) {
|
|
|
- plus.nativeUI.confirm("检查到您未安装qq,请先到appstore搜索下载?", function(i) {
|
|
|
- if(i.index == 0) {
|
|
|
- iosAppstore("itunes.apple.com/cn/app/mqq/");
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
+//学历
|
|
|
+function xl() {
|
|
|
+ return ['小学', '初级中学', '高级中学', '中专', '专科', '本科', '硕士研究生', '博士研究生'];
|
|
|
+}
|
|
|
+//学位
|
|
|
+function xw() {
|
|
|
+ return ['无', '学士学位', '硕士学位', '博士学位'];
|
|
|
+}
|
|
|
+//工作经验
|
|
|
+function gzyl() {
|
|
|
+ return ['不限','一年以下','1-2年','2-3年','3-5年','6-7年','8-10年','10年以上'];
|
|
|
}
|
|
|
-//当月小于10时,后面加个0;
|
|
|
-function p(s) {
|
|
|
- return s < 10 ? '0' + s : s;
|
|
|
+//学历要求
|
|
|
+function xlyq() {
|
|
|
+ return ['不限','高中','技校','中专','大专','本科','硕士','博士'];
|
|
|
+}
|
|
|
+//薪资待遇
|
|
|
+function xzdy() {
|
|
|
+ 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年以上'];
|
|
|
}
|
|
|
/**
|
|
|
* 复制文本到剪贴板
|
|
@@ -184,7 +169,7 @@ function copy(copy_content) {
|
|
|
var generalPasteboard = UIPasteboard.generalPasteboard();
|
|
|
//设置/获取文本内容:
|
|
|
generalPasteboard.plusCallMethod({
|
|
|
- setValue: ""+copy_content,
|
|
|
+ setValue: "" + copy_content,
|
|
|
forPasteboardType: "public.utf8-plain-text"
|
|
|
});
|
|
|
generalPasteboard.plusCallMethod({
|
|
@@ -213,4 +198,64 @@ function getClipper(ratio, path) {
|
|
|
viewMode: 1,
|
|
|
});
|
|
|
return cropper;
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 直接拍照
|
|
|
+ * @param callback
|
|
|
+ */
|
|
|
+function takePhoto(callback) {
|
|
|
+ mui('#picture').popover('toggle');
|
|
|
+ var cmr = plus.camera.getCamera();
|
|
|
+ var res = cmr.supportedImageResolutions[0];
|
|
|
+ var fmt = cmr.supportedImageFormats[0];
|
|
|
+ cmr.captureImage(callback, function(error) {}, {
|
|
|
+ resolution: res,
|
|
|
+ format: fmt
|
|
|
+ });
|
|
|
+}
|
|
|
+/**
|
|
|
+从相册选择照片,返回files[]数组地址
|
|
|
+ * @param limit 选择数量
|
|
|
+ * @param callback
|
|
|
+ * @param limit 数量
|
|
|
+ */
|
|
|
+function pickImg(callback, limit) {
|
|
|
+ mui('#picture').popover('toggle');
|
|
|
+ plus.gallery.pick(callback, function(error) {}, {
|
|
|
+ multiple: true,
|
|
|
+ maximum: limit,
|
|
|
+ system: false
|
|
|
+ });
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 图片上传
|
|
|
+ * @param url 上传地址
|
|
|
+ * @param callback
|
|
|
+ */
|
|
|
+function upload(url,path,callback) {
|
|
|
+ var task = plus.uploader.createUpload(url, {
|
|
|
+ method: "POST",
|
|
|
+ blocksize: 204800,
|
|
|
+ priority: 100
|
|
|
+ }, callback);
|
|
|
+ task.addFile(path, {
|
|
|
+ key: 'img'
|
|
|
+ });
|
|
|
+ task.start();
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 图片压缩
|
|
|
+ * @param callback
|
|
|
+ * @param path 压缩地址
|
|
|
+ * @param per 压缩率
|
|
|
+ */
|
|
|
+function compress(callback, path, per) {
|
|
|
+ var name = path.substr(path.lastIndexOf('/') + 1);
|
|
|
+ plus.zip.compressImage({
|
|
|
+ src: path,
|
|
|
+ dst: '_doc/' + name,
|
|
|
+ width: "75%",
|
|
|
+ overwrite: true
|
|
|
+ }, callback,
|
|
|
+ function(error) {});
|
|
|
}
|