my.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. $(document).ready(function () {
  2. var a = $_CONFIG.template;
  3. if (a == "my/shieldcompany" || a == "my/searchshieldcompany") {
  4. alert(1);
  5. var b = $("#total").val();
  6. if (b > 0) {
  7. $("#pageWp").addClass("hhint")
  8. }
  9. $(".coid").click(function () {
  10. $(this).toggleClass("checked");
  11. return false
  12. });
  13. $(".qx").click(function () {
  14. var d = false;
  15. $(".coid").each(function () {
  16. if (!$(this).hasClass("checked")) {
  17. d = true;
  18. return false
  19. }
  20. });
  21. if (d) {
  22. $(this).addClass("on");
  23. $(".coid").addClass("checked")
  24. } else {
  25. $(this).removeClass("on");
  26. $(".coid").removeClass("checked")
  27. }
  28. });
  29. $(".del").click(function () {
  30. if ($(".checked").length < 1) {
  31. pop.ini([
  32. ["你没有选择任何公司", "warn"]
  33. ], ["确定"]);
  34. return false
  35. }
  36. pop.ini(["你确定要删除吗?"], [
  37. ["取消", "确定"],
  38. ["pop.close()", "delshieldcompany()"]
  39. ])
  40. });
  41. $(".add").click(function () {
  42. if ($(".checked").length < 1) {
  43. pop.ini([
  44. ["你没有选择任何公司", "warn"]
  45. ], ["确定"]);
  46. return false
  47. }
  48. addshieldcompany()
  49. });
  50. $(".j").click(function () {
  51. gotosearch()
  52. })
  53. } else {
  54. if (a == "my/hrletter") {
  55. alert(2);
  56. $(".close").click(function () {
  57. var e = $(this).attr("value");
  58. var d = "";
  59. $(".close").each(function (f) {
  60. if ($(this).attr("value") == e) {
  61. d = f;
  62. return false
  63. }
  64. });
  65. pop.ini(["你确定要删除吗?"], [
  66. ["取消", "确定"],
  67. ["pop.close()", "delmessage(" + e + "," + d + ")"]
  68. ])
  69. })
  70. } else {
  71. if (a == "my/mycollection") {
  72. var c = $("input[name='isadd']").val();
  73. if (c == 1) {
  74. $("#pageWp").addClass("hfloat")
  75. }
  76. $(".jobid").click(function () {
  77. $(this).toggleClass("checked");
  78. return false
  79. });
  80. $(".qx").click(function () {
  81. var d = false;
  82. $(".jobid").each(function () {
  83. if (!$(this).hasClass("checked")) {
  84. d = true;
  85. return false
  86. }
  87. });
  88. if (d) {
  89. $(this).addClass("on");
  90. $(".jobid").addClass("checked")
  91. } else {
  92. $(this).removeClass("on");
  93. $(".jobid").removeClass("checked")
  94. }
  95. return false
  96. });
  97. $(".remove").click(function () {
  98. if ($(".checked").length < 1) {
  99. pop.ini([
  100. ["你没有选择任何职位", "warn"]
  101. ], ["确定"]);
  102. return false
  103. }
  104. pop.ini(["你确定要删除吗?"], [
  105. ["取消", "确定"],
  106. ["pop.close()", "delcollection()"]
  107. ])
  108. });
  109. $(document).on("click", ".toapply", function () {
  110. if ($(".checked").length < 1) {
  111. pop.ini([
  112. ["你没有选择任何职位", "warn"]
  113. ], ["确定"]);
  114. return false
  115. }
  116. var d = new Array();
  117. $(".checked").each(function () {
  118. d.push($(this).attr("value"))
  119. });
  120. jobid = d.toString();
  121. applyjob(jobid)
  122. });
  123. $(".apply_job").click(function () {
  124. if ($(".checked").length < 1) {
  125. pop.ini([
  126. ["你没有选择任何职位", "warn"]
  127. ], ["确定"]);
  128. return false
  129. }
  130. var d = new Array();
  131. $(".checked").each(function () {
  132. d.push($(this).attr("value"))
  133. });
  134. jobid = d.toString();
  135. applyjob(jobid)
  136. });
  137. $(".favorite").click(function () {
  138. var d = $(this).siblings(".cname").text();
  139. var e = $(this).attr("data-id");
  140. var g = $(this).attr("data-type");
  141. var f = $(this).attr("data-ind");
  142. pop.ini(["是否取消收藏心愿公司 “" + d + "”"], [
  143. ["取消", "确定"],
  144. ["pop.close()", "delFavoriteCo('" + e + "', '" + g + "','" + f + "');"]
  145. ]);
  146. return false
  147. })
  148. } else {
  149. if (a == "my/applyhistory") {
  150. $(".pipei").click(function () {
  151. var i = $(this).attr("value");
  152. var f = $(this).attr("value1");
  153. var e = window.location.href;
  154. var g = $_CONFIG.domain + "ajax/search/compete.ajax.php";
  155. var h = {
  156. jobid: i,
  157. url: e,
  158. resumeid: f
  159. };
  160. var d = ajaxRequest(g, h, "post", "json");
  161. if (d.status == 1) {
  162. location.href = $_CONFIG.domain + "my/rsmmatch.php?jobid=" + i + "&resumeid=" + f;
  163. return false
  164. } else {
  165. if (d.url) {
  166. location.href = d.url
  167. } else {
  168. pop.ini([
  169. [d.desc, "warn"]
  170. ], ["确定"])
  171. }
  172. return false
  173. }
  174. })
  175. } else {
  176. if (a == "my/my51job") {
  177. $("#pageWp").addClass("htab")
  178. }
  179. }
  180. }
  181. }
  182. }
  183. });
  184. var delshieldcompany = function () {
  185. var c = new Array();
  186. var d = new Array();
  187. $(".checked").each(function () {
  188. if ($(this).attr("data-type") == 1) {
  189. c.push($(this).attr("value"))
  190. } else {
  191. d.push($(this).next().text())
  192. }
  193. });
  194. coid = c.toString();
  195. keyword = JSON.stringify(d);
  196. var b = $_CONFIG.domain + "/ajax/my/shieldcompany.ajax.php";
  197. var e = {
  198. coid: coid,
  199. keyword: keyword,
  200. type: 1
  201. };
  202. var a = ajaxRequest(b, e, "post", "json");
  203. if (a.status == 1) {
  204. $(".checked").parent().remove();
  205. pop.close();
  206. if ($(".coid").length < 1) {
  207. window.location.reload()
  208. }
  209. return false
  210. } else {
  211. if (a.url) {
  212. location.href = a.url;
  213. return false
  214. }
  215. pop.ini([
  216. [a.desc, "warn"]
  217. ], ["确定"])
  218. }
  219. };
  220. var delmessage = function (d, b) {
  221. var f = $("#pageno").val();
  222. var c = $_CONFIG.domain + "/ajax/my/delhrletter.ajax.php";
  223. var e = {
  224. msgid: d
  225. };
  226. var a = ajaxRequest(c, e, "post", "json");
  227. if (a.status == 1) {
  228. $(".p").eq(b).remove();
  229. if ($(".close").length < 1) {
  230. f = f > 1 ? f - 1 : f;
  231. window.location.href = $_CONFIG.domain + "/my/hrletter.php?pageno=" + f
  232. }
  233. pop.close()
  234. } else {
  235. if (a.url) {
  236. location.href = a.url;
  237. return false
  238. }
  239. pop.ini([
  240. [a.desc, "warn"]
  241. ], ["确定"])
  242. }
  243. };
  244. var delcollection = function () {
  245. var f = $("#pageno").val();
  246. var c = new Array();
  247. var b = window.location.href;
  248. $(".checked").each(function () {
  249. c.push($(this).attr("value"))
  250. });
  251. jobid = c.toString();
  252. var d = $_CONFIG.domain + "/ajax/my/mycollection.ajax.php";
  253. var e = {
  254. jobid: jobid,
  255. url: b,
  256. type: 1
  257. };
  258. var a = ajaxRequest(d, e, "post", "json");
  259. if (a.status == 1) {
  260. $(".checked").parent().remove();
  261. pop.close();
  262. if ($(".jobid").length < 1) {
  263. f = f > 1 ? f - 1 : f;
  264. window.location.href = $_CONFIG.domain + "/my/mycollection.php?pageno=" + f
  265. }
  266. return false
  267. } else {
  268. if (a.url) {
  269. location.href = a.url;
  270. return false
  271. }
  272. pop.ini([
  273. ["删除失败", "warn"]
  274. ], ["确定"])
  275. }
  276. };
  277. function hint() {
  278. pop.ini([
  279. ["未提交的申请请访问电脑版", "warn"]
  280. ], ["确定"])
  281. }
  282. function gotosearch() {
  283. var a = $("#keyword").val();
  284. if ($.trim(a) == "") {
  285. pop.ini([
  286. ["请输入关键字", "warn"]
  287. ], ["确定"]);
  288. return false
  289. }
  290. document.cosearch.submit();
  291. return false
  292. }
  293. function addshieldcompany() {
  294. var d = new Array();
  295. var b = $("#keyword").val();
  296. $(".checked").each(function () {
  297. d.push($(this).attr("value"))
  298. });
  299. coid = d.toString();
  300. var c = $_CONFIG.domain + "ajax/my/shieldcompany.ajax.php";
  301. var e = {
  302. coid: coid,
  303. type: 3,
  304. url: $_CONFIG.domain + "searchshieldcompany.php?keyword=" + b
  305. };
  306. var a = ajaxRequest(c, e, "post", "json");
  307. if (a.status == 1) {
  308. pop.ini([
  309. ["已成功添加到屏蔽公司"]
  310. ], ["确定", "gotosheildcompany()"]);
  311. return false
  312. } else {
  313. if (a.url) {
  314. location.href = a.url;
  315. return false
  316. }
  317. pop.ini([
  318. [a.desc, "warn"]
  319. ], ["确定"])
  320. }
  321. }
  322. function gotosheildcompany() {
  323. location.href = $_CONFIG.domain + "my/shieldcompany.php";
  324. pop.close();
  325. return false
  326. }
  327. function showHr(c) {
  328. var b = [$(c).next().val(), "HR兴趣度"],
  329. a = ["确定"];
  330. pop.ini(b, a);
  331. return false
  332. }
  333. var delFavoriteCo = function (c, f, d) {
  334. var b = $_CONFIG.domain + "ajax/my/editFavoriteCo.ajax.php";
  335. var e = {
  336. coid: c,
  337. type: f,
  338. indtype: d,
  339. action: "del"
  340. };
  341. var a = ajaxRequest(b, e, "post", "json");
  342. if (a.status == 1) {
  343. window.location.reload()
  344. } else {
  345. pop.ini([
  346. [a.desc, "warn"]
  347. ], ["确定"])
  348. }
  349. return false
  350. };