BaseUser.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. namespace app\index;
  4. class BaseUser extends Base
  5. {
  6. function initialize()
  7. {
  8. parent::initialize();
  9. if (!$this->userlogined) {
  10. redirect("/index/login");
  11. }
  12. }
  13. function inc_merge()
  14. {
  15. ?> <div class="modal inmodal fade in" id="selApp" tabindex="-1" role="dialog" aria-hidden="false"
  16. style="display: none;">
  17. <div class="modal-dialog modal-lg">
  18. <div class="modal-content">
  19. <div class="modal-header task-sel-app-modal-header">
  20. <h4 class="modal-title">选择 App</h4>
  21. </div>
  22. <form id="selForm" novalidate="novalidate">
  23. <input id="appid" name="appid" value="20802" type="hidden">
  24. <input id="mType" name="mType" value="ipa" type="hidden">
  25. <div class="modal-body task-sel-app-modal-body">
  26. <div class="panel-body">
  27. <div class="tab-content" style="border: 0">
  28. <div id="tab-1" class="tab-pane active" mtype="app">
  29. <div class="row" style="height:340px; overflow-y:auto;overflow-x:hidden">
  30. <div class="wrapper wrapper-content" style="padding-bottom:0px;">
  31. <div id="loading" style="display: none;">
  32. <div class="sk-spinner sk-spinner-wandering-cubes">
  33. <div class="sk-cube1">
  34. </div>
  35. <div class="sk-cube2">
  36. </div>
  37. </div>
  38. </div>
  39. <div class="row" id="appContainer">
  40. </div>
  41. </div>
  42. </div>
  43. <input id="mAKey" name="mAKey" value="" type="hidden">
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="modal-footer">
  49. <p style="float:left;padding-top:10px;padding-left:10px;">
  50. 合并后的两个应用,进入任一个应用的单页,扫描二维码,会根据你的手机系统自动帮你下载相应的版本。</p>
  51. <button class="btn btn-info" data-dismiss="modal" href="javascript:void(0)">取消</button>
  52. <button type="button" id="btnMerge" class="btn btn-success">合并应用</button>
  53. </div>
  54. </form>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="modal inmodal fade in" id="cancel_dialog" tabindex="-1" role="dialog">
  59. <div class="modal-dialog modal-lg">
  60. <div class="modal-content">
  61. <div class="modal-header task-sel-app-modal-header">
  62. <h4 class="modal-title">解除合并</h4>
  63. </div>
  64. <div class="modal-body task-sel-app-modal-body">
  65. <div class="panel-body">
  66. <div id="cancel_container">
  67. </div>
  68. </div>
  69. </div>
  70. <div class="modal-footer">
  71. <button class="btn btn-info" data-dismiss="modal" href="javascript:void(0)"
  72. onclick="$('#myModal').modal('hide');">取消
  73. </button>
  74. <button type="button" id="btnCancel" class="btn btn-warning">取消合并</button>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <script>
  80. $('.cancel_merge').click(function (event) {
  81. event.preventDefault();
  82. var id = $(this).attr('app_id');
  83. $.get('/index/apps_cancelMerge?id=' + id, function (html) {
  84. $('#btnCancel').unbind();
  85. $('#cancel_container').html(html);
  86. $('#cancel_dialog').modal('show');
  87. $('#btnCancel').click(function () {
  88. $.post('/index/ajax_profile/each_del', {aid: id}, function (data) {
  89. if (data.code == 200) {
  90. $('#cancel_dialog').modal('hide');
  91. alert(data.msg, function () {
  92. window.location.reload();
  93. });
  94. return true;
  95. } else {
  96. alert(data.msg);
  97. }
  98. }, 'json');
  99. return true;
  100. });
  101. });
  102. });
  103. $('.btn-success').click(function (e) {
  104. e.preventDefault();
  105. var id = $(this).attr('app_id');
  106. $.get('/index/apps_merge?id=' + id, function (html) {
  107. $("#btnMerge").unbind();
  108. $('#appContainer').html(html);
  109. $('#appContainer .ibox').click(function () {
  110. $('#appContainer .ibox .caption').each(function () {
  111. $(this).hide();
  112. })
  113. $(this).find('.caption').show();
  114. });
  115. $('#selApp').modal('show');
  116. $('#btnMerge').click(function () {
  117. var kid = $("#appContainer .ibox .caption:visible").find('input').val();
  118. if (!kid) {
  119. alert('请选择要合并的应用');
  120. return false;
  121. }
  122. $.post('/index/ajax_profile/each_add', {aid: id, kid: kid}, function (data) {
  123. if (data.code == 200) {
  124. $('#selApp').modal('hide');
  125. alert(data.msg, function () {
  126. window.location.reload();
  127. });
  128. } else {
  129. alert(data.msg);
  130. }
  131. }, 'json');
  132. });
  133. });
  134. });
  135. </script>
  136. <?php
  137. }
  138. function left()
  139. {
  140. ?> <div class="col-sm-2">
  141. <aside class="aside-left">
  142. <ul>
  143. <?php
  144. if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
  145. ?> <li class="<?php echo $this->module == "publish" || $this->module == "publish_update" ? "active" : "";?>">
  146. <a href="/index/publish/<?php echo $this->action;?>"> <span
  147. class="iconfont icon-upload1"></span>上传应用</a>
  148. </li>
  149. <?php
  150. }
  151. ?> <li class="<?php echo $this->module == "apps" ? "active" : "";?>">
  152. <a href="/index/apps/<?php echo $this->action;?>"><span class="iconfont icon-41"></span>应用列表</a>
  153. </li>
  154. <?php
  155. if ($this->action == "apps") {
  156. ?> <li class="<?php echo $this->module == "domain" ? "active" : "";?>">
  157. <a href="/index/domain/<?php echo $this->action;?>">
  158. <span class="iconfont icon-liulanqi"></span>绑定域名</a>
  159. </li>
  160. <?php
  161. }
  162. ?> <?php
  163. if (IN_SUPER && ($this->action == "super" || strstr($this->module, "super"))) {
  164. ?> <li class="<?php echo $this->module == "super_code" ? "active" : "";?>">
  165. <a href="/index/super_code/super"><span class="iconfont icon-pwd"></span>授权码管理</a>
  166. </li>
  167. <li class="<?php echo $this->module == "super_cert" ? "active" : "";?>">
  168. <a href="/index/super_cert/super"><span class="iconfont icon-gongju"></span>开发者账号</a>
  169. </li>
  170. <?php
  171. }
  172. ?> </ul>
  173. </aside>
  174. </div>
  175. <?php
  176. }
  177. function publish_left()
  178. {
  179. $_var_0 = SafeRequest("id", "get");
  180. ?> <div class="col-sm-2">
  181. <aside class="aside-left">
  182. <ul>
  183. <li class="<?php echo $this->module == "publish_detail" ? "active" : "";?>">
  184. <a href="/index/publish_detail/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
  185. <span class="iconfont icon-41"></span>应用详情
  186. </a>
  187. </li>
  188. <li class="<?php echo $this->module == "publish_setting" ? "active" : "";?>">
  189. <a href="/index/publish_setting/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
  190. <span class="iconfont icon-19"></span>应用设置
  191. </a>
  192. </li>
  193. <li class="<?php echo $this->module == "publish_statistics" ? "active" : "";?>">
  194. <a href="/index/publish_statistics/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
  195. <span class="iconfont icon-download2"></span>下载明细
  196. </a>
  197. </li>
  198. <?php
  199. if ($this->action == "sign" && IN_SIGN) {
  200. ?> <li class="<?php echo $this->module == "publish_sign" ? "active" : "";?>">
  201. <a href="/index/publish_sign/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
  202. <span class="iconfont icon-qianming"></span>企业签名</a>
  203. </li>
  204. <?php
  205. }
  206. ?> <?php
  207. if ($this->action == "super") {
  208. ?> <li class="<?php echo $this->module == "publish_superlog" ? "active" : "";?>">
  209. <a href="/index/publish_superlog/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
  210. <span class="iconfont icon-qianming"></span>签名记录</a>
  211. </li>
  212. <?php
  213. }
  214. ?> </ul>
  215. </aside>
  216. </div>
  217. <?php
  218. }
  219. function publish_top($_var_1 = [])
  220. {
  221. ?> <div class="details-top clearfix">
  222. <div class="fl upload-icon-common uploaded ">
  223. <img class="fl" src="<?php echo geticon($_var_1["in_icon"]);?>" onerror="javascript:this.src='<?php echo IN_PATH;?>static/index/image/<?php echo $_var_1["in_form"];?>.png'">
  224. <input type="file" class="thumbnail" name="icon" value="">
  225. <div class="text">
  226. 上传图标
  227. </div>
  228. <div class="reset">
  229. 重新上传
  230. </div>
  231. </div>
  232. <dl class="information fl">
  233. <dt>
  234. <span class="i-tit">
  235. <span class="text"><?php echo $_var_1["in_name"];?></span>
  236. <span class="<?php echo $_var_1["in_form"] == "iOS" ? "iconfont icon-iphone" : "iconfont icon-android";?>"></span>
  237. <?php
  238. if ($_var_1["in_form"] == "iOS") {
  239. ?> <span class="version version-private"><span
  240. class="font10"><?php echo $this->action == "super" ? "超级版" : ($_var_1["in_type"] == 1 ? "企业版" : "内测版");?></span></span>
  241. <?php
  242. }
  243. ?> </span>
  244. </dt>
  245. <dd>
  246. <span>适用于<?php echo $_var_1["in_form"] == "iOS" ? "苹果" : "安卓";?><?php echo $_var_1["in_mnvs"];?>系统以上的设备</span>
  247. <span>版本<i><?php echo $_var_1["in_bsvs"];?> (Build <?php echo $_var_1["in_bvs"];?>)</i></span>
  248. <span>大小<i><?php echo formatsize($_var_1["in_size"]);?></i></span>
  249. </dd>
  250. <?php
  251. if ($_var_1["in_type"] == "2") {
  252. ?> <dd class="clearfix">
  253. <span class="add-notes-wrap fl">
  254. <span class="add-notes clearfix">
  255. <span class="fl"><a href="javascript:void(0);" data-toggle="modal"
  256. data-target="#adhocUDIDBox">内测设备查看</a></span>
  257. </span>
  258. </span>
  259. </dd>
  260. <?php
  261. }
  262. ?> </dl>
  263. <div class="fr d-right">
  264. <?php
  265. if (!$_var_1["in_applock"]) {
  266. if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
  267. ?> <a href="<?php echo IN_PATH;?>index/publish/<?php echo $this->action;?>?id=<?php echo bees_encrypt($_var_1["in_id"]);?>"
  268. class="ms-btn details-upload-new-version">
  269. <span class="iconfont icon-upload1"></span>
  270. <span class="text">上传新版本</span>
  271. </a>
  272. <?php
  273. }
  274. ?> <a href="<?php echo getlink($_var_1["in_id"]);?>" target="_blank"
  275. class="ms-btn ml10 details-preview">预览</a>
  276. <?php
  277. if ($_var_1["in_kid"]) {
  278. ?> <button app_id="<?php echo bees_encrypt($_var_1["in_id"]);?>"
  279. class="ms-btn ml10 details-merge cancel_merge" data-toggle="modal"
  280. data-target="#myModal2">
  281. 取消合并
  282. </button>
  283. <?php
  284. } else {
  285. ?> <button class="ms-btn ml10 details-merge btn-success" data-toggle="modal"
  286. data-target="#myModal"
  287. app_id="<?php echo bees_encrypt($_var_1["in_id"]);?>">
  288. 合并
  289. </button>
  290. <?php
  291. }
  292. }
  293. ?> </div>
  294. </div>
  295. <?php
  296. }
  297. function user_left()
  298. {
  299. ?> <div class="col-sm-2">
  300. <aside class="aside-left">
  301. <ul>
  302. <li class="<?php echo $this->module == "user_profile" ? "active" : "";?>">
  303. <a href="<?php echo IN_PATH;?>index/user_profile">
  304. <span class="iconfont icon-user1"></span>账号信息
  305. </a>
  306. </li>
  307. <li class="<?php echo $this->module == "user_order" ? "active" : "";?>">
  308. <a href="<?php echo IN_PATH;?>index/user_order">
  309. <span class="iconfont icon-028"></span>我的订单
  310. </a>
  311. </li>
  312. <li class="<?php echo $this->module == "user_aclog" ? "active" : "";?>">
  313. <a href="<?php echo IN_PATH;?>index/user_aclog">
  314. <span class="iconfont icon-fapiao"></span>账户记录
  315. </a>
  316. </li>
  317. <?php
  318. if (IN_PROMOTE) {
  319. ?> <li class="<?php echo $this->module == "user_promote" ? "active" : "";?>">
  320. <a href="<?php echo IN_PATH;?>index/user_promote">
  321. <span class="iconfont icon-team"></span>代理推广
  322. </a>
  323. </li>
  324. <?php
  325. }
  326. ?> <li class="<?php echo $this->module == "user_cash" ? "active" : "";?>">
  327. <a href="<?php echo IN_PATH;?>index/user_cash">
  328. <span class="iconfont icon-008"></span>提现记录
  329. </a>
  330. </li>
  331. </ul>
  332. </aside>
  333. </div>
  334. <?php
  335. }
  336. function webview_left()
  337. {
  338. ?> <div class="col-sm-2">
  339. <aside class="aside-left">
  340. <ul>
  341. <li class="<?php echo $this->module == "webview" ? "active" : "";?>">
  342. <a href="/index/webview">
  343. <span class="iconfont icon-xiangzi font18 icon-fz"></span>标准封装
  344. </a>
  345. </li>
  346. <li class="<?php echo $this->module == "webview2" ? "active" : "";?>">
  347. <a href="/index/webview2">
  348. <span class="iconfont icon-xiangzi font18 icon-fzmianqian"></span>苹果免签封装
  349. </a>
  350. </li>
  351. <li class="<?php echo $this->module == "webview_log" ? "active" : "";?>">
  352. <a href="/index/webview_log">
  353. <span class="iconfont icon-xiangzi font18 icon-fzjilu"></span>封装记录
  354. </a>
  355. </li>
  356. <div class="details-top clearfix"></div>
  357. </ul>
  358. </aside>
  359. </div>
  360. <?php
  361. }
  362. }