123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420 |
- <?php
- // by 请勿倒卖,已申请软著,否则追究法律责任
- namespace app\index;
- class publish_detail extends BaseUser
- {
- function index()
- {
- $id = bees_decrypt(SafeRequest("id", "get"));
- $row = db("appid")->where("in_uid", $this->userid)->where("in_id", $id)->find();
- $row or exit(include_once dirname(__FILE__) . "/../pack/error/404.php");
- $page = SafeRequest("page", "get");
- $tab = SafeRequest("tab", "get");
-
- // 如果没有指定tab,默认显示应用版本tab
- if (empty($tab)) {
- $tab = "version";
- }
- $fnum = $this->action != "super" ? $row["in_deduct"] : 1;
- $ftype = $this->action != "super" ? IN_POINTNAME : "设备";
- $durl = getlink($row["in_id"], $this->action == "super");
- ?>
- <!DOCTYPE html>
- <html lang="">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" />
- <meta name="keywords" content="<?php echo IN_KEYWORDS; ?>" />
- <meta name="description" content="<?php echo IN_DESCRIPTION; ?>" />
- <title><?php echo $row["in_name"]; ?> - 应用详情 - <?php echo IN_NAME; ?></title>
- <?php
- $this->static_();
- ?>
- <link rel="stylesheet" href="/static/index/css/apps-detail.css" />
- </head>
- <body>
- <?php
- $this->header();
- ?>
- <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css" />
- <link rel="stylesheet" type="text/css" href="/static/index/css/jquery.datetimepicker.css?20190530" />
- <script src="/static/index/js/jquery.form.js"></script>
- <script src="/static/index/js/jquery.datetimepicker.js?20190530"></script>
- <div class="release-app-wrap">
- <div class="container">
- <div class="release-app2">
- <div class="crumbs">
- <a href="/index/apps/apps">我的应用</a>
- <span>/</span>
- <a href="/index/apps/apps">应用列表</a>
- <span>/</span>
- <?php echo $row["in_name"]; ?>
- </div>
- <div class="row clearfix">
- <?php
- $this->publish_app_list();
- ?> <div class="col-sm-10">
- <div class="aside-right">
- <div class="app-details app-details2">
- <?php
- $this->publish_top($row);
- ?> <div class="app-information">
- <hr>
- <div class="details-bottom">
- <div class="d-table-wrap">
- <div class="table-responsive">
- <table>
- <tr>
- <th>
- <span class="th-line">包名(BundleID)</span>
- </th>
- <th>
- <span class="th-line">状态</span>
- </th>
- <th>
- <span class="th-line">下载链接</span>
- </th>
- </tr>
- <tr>
- <td>
- <span id="copy" class="bundle-length bundle-length1"
- data-container="body" data-toggle="popover"
- data-placement="bottom"
- data-content="<?php echo $row["in_bid"]; ?>"
- data-trigger="hover"><?php echo $row["in_bid"]; ?></span>
- <span class="copy top-5" data-clipboard-action="copy"
- data-clipboard-target="#copy">复制</span>
- </td>
- <td>
- <div>
- <?php echo [-1 => "审核中", "正常", "封禁"][$row["in_applock"]]; ?> </div>
- </td>
- <td>
- <?php
- if (!$row["in_applock"]) {
- ?> <div class="test-download clearfix">
- <a href="<?php echo $durl; ?>"
- target="_blank"
- class="fl link bundle-length1"
- data-container="body" data-toggle="popover"
- data-placement="bottom"
- data-content="<?php echo $durl; ?>"
- data-trigger="hover"><?php echo $durl; ?></a>
- <span class="copy top-5" data-clipboard-text="<?php echo $durl; ?>">复制</span>
- </div>
- <?php
- } else {
- ?><?php echo [-1 => "审核中", "正常", "封禁"][$row["in_applock"]]; ?><?php
- }
- ?> </td>
- </tr>
- </table>
- <?php
- if ($row["in_form"] == "iOS" && strstr($row["in_app"], "ipa") && $this->action != "super") {
- ?> <table>
- <tr>
- <th>
- <span class="th-line" title="苹果企业证书公司名称">公司名称</span>
- </th>
- <th>
- <span class="th-line" title="苹果企业证书集团信息">集团信息</span>
- </th>
- <th>
- <span class="th-line">下载二维码</span>
- </th>
- </tr>
- <tr>
- <td>
- <span id="copy1" class="bundle-length bundle-length1"
- data-container="body" data-toggle="popover"
- data-placement="bottom"
- data-content="<?php echo $row["in_nick"]; ?>"
- data-trigger="hover"><?php echo $row["in_nick"]; ?></span>
- <span class="copy top-5"
- data-clipboard-action="copy"
- data-clipboard-target="#copy1">复制</span>
- </td>
- <td>
- <span id="copy2" class="bundle-length bundle-length1"
- data-container="body" data-toggle="popover"
- data-placement="bottom"
- data-content="<?php echo $row["in_team"]; ?>"
- data-trigger="hover"><?php echo $row["in_team"]; ?></span>
- <span class="copy top-5"
- data-clipboard-action="copy"
- data-clipboard-target="#copy2">复制</span>
- </td>
- <td>
- <span href="javascript:;" class="more-wrap">
- <a class="more"> </a>
- <img src="/qrcode?link=<?php echo $durl; ?>">
- </span>
- </td>
- </tr>
- </table>
- <?php
- }
- ?> <table>
- <tr>
- <th>
- <span class="th-line" title="当前app下载次数">下载次数</span>
- </th>
- <th>
- <span class="th-line">下载扣除</span>
- </th>
- <?php
- if (IN_SIGN && $row["in_form"] == "iOS") {
- ?> <th>
- <span class="th-line">签名期限</span>
- </th>
- <?php
- } else {
- ?><th></th>
- <?php } ?>
- </td>
- </tr>
- <tr>
- <td>
- <div class="bundle-length bundle-length2"
- data-container="body"
- data-toggle="popover" data-placement="bottom"
- data-content="已下载<?php echo $row["in_downloads"]; ?>次"
- data-trigger="hover">
- <?php echo $row["in_downloads"]; ?> </div>
- </td>
- <td>
- <div class="bundle-length bundle-length2"
- data-container="body"
- data-toggle="popover" data-placement="bottom"
- data-content="单次下载扣除<?php echo $fnum; ?><?php echo $ftype; ?>"
- data-trigger="hover">
- <?php echo $fnum; ?><?php echo $ftype; ?> </div>
- </td>
- <?php
- if (IN_SIGN && $row["in_form"] == "iOS") {
- ?> <td>
- <div class="test-download clearfix">
- <a href="/index/publish_sign?id=<?php echo bees_encrypt($row["in_id"]); ?>"
- class="fl link bundle-length1"
- data-container="body"
- data-toggle="popover"
- data-placement="bottom"
- data-content="<?php echo $row["in_sign"] ? date("Y-m-d H:i:s", $row["in_sign"]) : "未开通在线签名"; ?>"
- data-trigger="hover"><?php echo $row["in_sign"] ? date("Y-m-d H:i:s", $row["in_sign"]) : "未开通在线签名"; ?></a>
- </div>
- </td>
- <?php
- } else {
- ?><th></th>
- <?php } ?>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <!-- 应用版本 基本设置 高级设置 模板设置 下载明细 -->
- <div class="tabs">
- <ul class="nav nav-tabs" role="tablist">
- <li role="presentation" class="<?php echo ($tab == 'version') ? 'active' : ''; ?>">
- <a href="?id=<?php echo bees_encrypt($id); ?>&tab=version" aria-controls="tab-version" role="tab">应用版本</a>
- </li>
- <li role="presentation" class="<?php echo ($tab == 'basic') ? 'active' : ''; ?>">
- <a href="?id=<?php echo bees_encrypt($id); ?>&tab=basic" aria-controls="tab-basic" role="tab">基本设置</a>
- </li>
- <li role="presentation" class="<?php echo ($tab == 'advanced') ? 'active' : ''; ?>">
- <a href="?id=<?php echo bees_encrypt($id); ?>&tab=advanced" aria-controls="tab-advanced" role="tab">高级设置</a>
- </li>
- <li role="presentation" class="<?php echo ($tab == 'template') ? 'active' : ''; ?>">
- <a href="?id=<?php echo bees_encrypt($id); ?>&tab=template" aria-controls="tab-template" role="tab">模板设置</a>
- </li>
- <li role="presentation" class="<?php echo ($tab == 'download') ? 'active' : ''; ?>">
- <a href="?id=<?php echo bees_encrypt($id); ?>&tab=download" aria-controls="tab-download" role="tab">下载明细</a>
- </li>
- </ul>
- <div class="tab-content">
- <?php if ($tab == 'version'): ?>
- <div role="tabpanel" class="tab-pane active" id="tab-version">
- <?php include_once 'publish_tab_version.php'; ?>
- </div>
- <?php endif; ?>
-
- <?php if ($tab == 'basic'): ?>
- <div role="tabpanel" class="tab-pane active" id="tab-basic">
- <?php include_once 'publish_tab_basic.php'; ?>
- </div>
- <?php endif; ?>
-
- <?php if ($tab == 'advanced'): ?>
- <div role="tabpanel" class="tab-pane active" id="tab-advanced">
- <?php include_once 'publish_tab_advanced.php'; ?>
- </div>
- <?php endif; ?>
-
- <?php if ($tab == 'template'): ?>
- <div role="tabpanel" class="tab-pane active" id="tab-template">
- <?php include_once 'publish_tab_template.php'; ?>
- </div>
- <?php endif; ?>
-
- <?php if ($tab == 'download'): ?>
- <div role="tabpanel" class="tab-pane active" id="tab-download">
- <?php include_once 'publish_tab_download.php'; ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="adhocUDIDBox" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
- aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
- aria-hidden="true">×</span>
- </button>
- <h4 class="modal-title" id="myModalLabel">UDIDs</h4>
- </div>
- <div class="modal-body">
- <code><?php
- $row["in_udids"] = str_replace(",", "</code><br /><code>", $row["in_udids"]);
- ?><?php echo $row["in_udids"]; ?></code><br />
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" role="dialog" id="updateModal">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
- </button>
- <h4>版本编辑</h4>
- </div>
- <div class="modal-body">
- <div class="app-details-update">
- <div class="form-group clearfix">
- <label class="col-sm-2 control-label">更新说明</label>
- <div class="col-sm-10">
- <textarea rows="6" name="desc" class="form-control"></textarea>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="ms-btn ms-btn-primary w120 plugin-save mr20" data-dismiss="modal">
- 保存
- </button>
- </div>
- </div>
- </div>
- </div>
- <?php
- $this->inc_merge();
- ?> <script src="/static/index/js/clipboard.min.js"></script>
- <script>
- var clipboard = new ClipboardJS('.copy-btn');
- clipboard.on('success', function(e) {
- alert('复制成功');
- });
- clipboard.on('error', function(e) {
- alert('复制失败');
- });
- var app_id = '<?php echo bees_encrypt($id); ?>';
- $('.icon-fabu').click(function() {
- var history_id = $(this).parent().find('input').val();
- $.post('/index/ajax_profile/setUseHistory', {
- id: history_id,
- app_id: app_id
- }, function(data) {
- if (data.code == 200) {
- alert('发布版本成功', function() {
- window.location.reload();
- });
- return true;
- }
- }, 'json');
- });
- $('.icon-shanchu').click(function() {
- var history_id = $(this).parent().find('input').val();
- alert('<b>你确定要删除该版本信息吗?</b><br/>删除后将无法恢复!', function() {
- $.post('/index/ajax_profile/delHistory', {
- 'id': history_id,
- app_id: app_id
- }, function(data) {
- if (data.code == 200) {
- alert('删除版本成功', function() {
- window.location.reload();
- });
- return true;
- } else {
- alert(data.msg);
- }
- }, 'json');
- }, function() {}, 'center', '删除', '取消');
- });
- $('.icon-edit').click(function() {
- var history_id = $(this).parent().find('input').val();
- $.get('/index/ajax_profile/getHistory?id=' + history_id + '&app_id=' + app_id, function(data) {
- if (data.code != 200) {
- alert('系统繁忙,请稍后重试');
- return true;
- }
- $("#updateModal textarea[name='desc']").val('').val(data.data.desc);
- $('#updateModal').modal('show');
- $('#updateModal .ms-btn-primary').unbind().click(function() {
- var desc = $("#updateModal textarea[name='desc']").val();
- alert(desc);
- $.post('/index/ajax_profile/updateHistory', {
- 'id': history_id,
- app_id: app_id,
- desc: desc
- }, function(data) {
- if (data.code == 200) {
- alert('更新说明操作成功', function() {
- window.location.reload();
- });
- return true;
- }
- }, 'json');
- })
- }, 'json');
- });
- //自动删除版本
- var del_vid = <?php echo $del_vid; ?>;
- if (del_vid > 0) {
- $.post('/index/ajax_profile/delHistory', {
- 'id': del_vid,
- app_id: app_id
- }, function(data) {
- if (data.code == 200) {
- return true;
- } else {
- console.log(data.msg);
- }
- }, 'json');
- }
- </script>
- <?php
- $this->footer();
- ?>
- </body>
- </html>
- <?php
- }
- }
|