index.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // url生成二维码
  2. var qrcode = new QRCode(document.getElementById("qrcode"), {
  3. width : 100,
  4. height : 100
  5. });
  6. $(".download").click( function() {
  7. var p_text = $(this).find("#text-1").text();
  8. var p_title = $(this).find("#text-2").text();
  9. var p_page = $(this).find("#download-page").text();
  10. qrcode.makeCode(p_page);
  11. $('.az_hover a').attr('href',p_text);
  12. $('.download_popup p').html(p_title);
  13. });
  14. $(function () {
  15. $("#J_rank_list").load('/Layout/gameRankList');
  16. $(".public_nav li").removeClass('current_page').eq(4).addClass('current_page')
  17. });
  18. $(".no_colgift").click(function(){
  19. $("#no_giftpack").show();
  20. });
  21. function kf_tip(id,kfkc){
  22. $.ajax({
  23. type: "POST",
  24. timeOut: 10000,
  25. url: "/service/subscribe",
  26. data: {
  27. "id": id,
  28. "type": kfkc
  29. },
  30. async: false,
  31. success: function (res) {
  32. // console.log(res);
  33. if (res.code == 1 || res.code == 4 || res.code == 5) {
  34. $(".success").show();
  35. $("#success_txt").text(res.msg)
  36. }else if (res.code == 2){
  37. window.location.href = res.data;
  38. }
  39. else if (res.code == 3){
  40. $("#bind_phone_href").attr('href',res.data);
  41. $("#bind_phone_txt").text(res.msg)
  42. $("#bind_phone_href").text("去绑定");
  43. $(".bind_phone").show();
  44. }
  45. /*else if (res.code == 4){
  46. $(".order").show();
  47. }else if (res.code == 5){
  48. $(".overtime").show();
  49. }*/else {
  50. alert(res.msg);
  51. }
  52. },
  53. error: function () {
  54. layer.msg('网络错误,请刷新页面重试');
  55. }
  56. });
  57. }