url_helper.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/11/3
  6. * Time: 下午8:55
  7. */
  8. require_once (BASE_ROOT_PATH . '/helper/session_helper.php');
  9. require_once (BASE_ROOT_PATH . '/helper/util_helper.php');
  10. class url_helper
  11. {
  12. public static function member_index($member_id)
  13. {
  14. $data = util::encrypt_data($member_id);
  15. $data = urlencode($data);
  16. $relay_id = session_helper::share_id();
  17. $url = BASE_SITE_URL . "/mobile/index.php?act=index&op=member&member_id={$data}&relay_id={$relay_id}";
  18. return $url;
  19. }
  20. public static function bonus_open_url($type_sn)
  21. {
  22. $relay_id = session_helper::share_id();
  23. $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
  24. return $url;
  25. }
  26. public static function bonus_grab_url($type_sn)
  27. {
  28. $relay_id = session_helper::share_id();
  29. $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
  30. return $url;
  31. }
  32. public static function fcode_url($common_id,$batch_code)
  33. {
  34. $relay_id = session_helper::share_id();
  35. $url = BASE_SITE_URL . "/mobile/index.php?act=fcode&op=index&client_type=wap&common_id={$common_id}&batch_code={$batch_code}&relay_id={$relay_id}";
  36. return $url;
  37. }
  38. public static function mshop_special($special_id)
  39. {
  40. $relay_id = session_helper::share_id();
  41. $url = BASE_SITE_URL . "/mobile/index.php?act=mshop&op=special&special_id={$special_id}&relay_id={$relay_id}";
  42. return $url;
  43. }
  44. public static function mshop_goods($goods_id)
  45. {
  46. $relay_id = session_helper::share_id();
  47. $url = BASE_SITE_URL . "/mobile/index.php?act=mshop&op=goods&goods_id={$goods_id}&relay_id={$relay_id}";
  48. return $url;
  49. }
  50. public static function ugc_url($special_id)
  51. {
  52. $relay_id = session_helper::share_id();
  53. $url = BASE_SITE_URL . "/mobile/index.php?act=special&op=index&special_id={$special_id}&client_type=wap&relay_id={$relay_id}";
  54. return $url;
  55. }
  56. public static function inviter_url()
  57. {
  58. $relay_id = session_helper::share_id();
  59. $url = BASE_SITE_URL . "/mobile/index.php?act=invite_friend&op=index&client_type=wap&curuser={$relay_id}&relay_id={$relay_id}";
  60. return $url;
  61. }
  62. public static function bargain_detail_url($bargain_id)
  63. {
  64. $url = BASE_SITE_URL . "/mobile/index.php?act=bargain&op=detail&client_type=wap&bargain_id={$bargain_id}";
  65. return $url;
  66. }
  67. }
  68. class author_url
  69. {
  70. public static function member_index($member_id)
  71. {
  72. $data = util::encrypt_data($member_id);
  73. $data = urlencode($data);
  74. $relay_id = session_helper::relay_id();
  75. $url = BASE_SITE_URL . "/mobile/index.php?act=index&op=member&member_id={$data}&relay_id={$relay_id}";
  76. return $url;
  77. }
  78. public static function bonus_open_url($type_sn)
  79. {
  80. $relay_id = session_helper::relay_id();
  81. $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
  82. return $url;
  83. }
  84. public static function bonus_grab_url($type_sn)
  85. {
  86. $relay_id = session_helper::relay_id();
  87. $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$type_sn}&relay_id={$relay_id}";
  88. return $url;
  89. }
  90. public static function fcode_url($common_id,$batch_code)
  91. {
  92. $relay_id = session_helper::relay_id();
  93. $url = BASE_SITE_URL . "/mobile/index.php?act=fcode&op=index&client_type=wap&common_id={$common_id}&batch_code={$batch_code}&relay_id={$relay_id}";
  94. return $url;
  95. }
  96. public static function mshop_special($special_id)
  97. {
  98. $relay_id = session_helper::relay_id();
  99. $url = BASE_SITE_URL . "/mobile/index.php?act=mshop&op=special&special_id={$special_id}&relay_id={$relay_id}";
  100. return $url;
  101. }
  102. public static function mshop_goods($goods_id)
  103. {
  104. $relay_id = session_helper::relay_id();
  105. $url = BASE_SITE_URL . "/mobile/index.php?act=mshop&op=goods&goods_id={$goods_id}&relay_id={$relay_id}";
  106. return $url;
  107. }
  108. public static function ugc_url($special_id)
  109. {
  110. $relay_id = session_helper::relay_id();
  111. $url = BASE_SITE_URL . "/mobile/index.php?act=special&op=index&special_id={$special_id}&client_type=wap&relay_id={$relay_id}";
  112. return $url;
  113. }
  114. public static function inviter_url($user)
  115. {
  116. $relay_id = session_helper::relay_id();
  117. $url = BASE_SITE_URL . "/mobile/index.php?act=invite_friend&op=index&client_type=wap&curuser={$user}&relay_id={$relay_id}";
  118. return $url;
  119. }
  120. public static function bargain_url($bargain_id)
  121. {
  122. $relay_id = session_helper::relay_id();
  123. $url = BASE_SITE_URL . "/mobile/index.php?act=bargain&op=open_bargain&client_type=wap&bargain_id={$bargain_id}&relay_id={$relay_id}";
  124. return $url;
  125. }
  126. }