瀏覽代碼

Merge branch 'dev-cmn' of https://s-20coaj910c.zht2.com/cmy/distribution into dev-ly

luoy 1 天之前
父節點
當前提交
f1a63f4d9f

+ 244 - 173
source/index/BaseUser.php

@@ -5,17 +5,19 @@ namespace app\index;
 
 class BaseUser extends Base
 {
-	function initialize()
-	{
-		parent::initialize();
-		if (!$this->userlogined) {
-			redirect("/index/login");
-		}
-	}
-	function inc_merge()
-	{
-		?>        <div class="modal inmodal fade in" id="selApp" tabindex="-1" role="dialog" aria-hidden="false"
-             style="display: none;">
+    function initialize()
+    {
+        parent::initialize();
+        if (!$this->userlogined) {
+            redirect("/index/login");
+        }
+    }
+    
+
+    function inc_merge()
+    {
+?> <div class="modal inmodal fade in" id="selApp" tabindex="-1" role="dialog" aria-hidden="false"
+            style="display: none;">
             <div class="modal-dialog modal-lg">
                 <div class="modal-content">
                     <div class="modal-header task-sel-app-modal-header">
@@ -71,7 +73,7 @@ class BaseUser extends Base
                     </div>
                     <div class="modal-footer">
                         <button class="btn btn-info" data-dismiss="modal" href="javascript:void(0)"
-                                onclick="$('#myModal').modal('hide');">取消
+                            onclick="$('#myModal').modal('hide');">取消
                         </button>
                         <button type="button" id="btnCancel" class="btn btn-warning">取消合并</button>
                     </div>
@@ -80,18 +82,20 @@ class BaseUser extends Base
         </div>
 
         <script>
-            $('.cancel_merge').click(function (event) {
+            $('.cancel_merge').click(function(event) {
                 event.preventDefault();
                 var id = $(this).attr('app_id');
-                $.get('/index/apps_cancelMerge?id=' + id, function (html) {
+                $.get('/index/apps_cancelMerge?id=' + id, function(html) {
                     $('#btnCancel').unbind();
                     $('#cancel_container').html(html);
                     $('#cancel_dialog').modal('show');
-                    $('#btnCancel').click(function () {
-                        $.post('/index/ajax_profile/each_del', {aid: id}, function (data) {
+                    $('#btnCancel').click(function() {
+                        $.post('/index/ajax_profile/each_del', {
+                            aid: id
+                        }, function(data) {
                             if (data.code == 200) {
                                 $('#cancel_dialog').modal('hide');
-                                alert(data.msg, function () {
+                                alert(data.msg, function() {
                                     window.location.reload();
                                 });
                                 return true;
@@ -104,30 +108,33 @@ class BaseUser extends Base
                 });
             });
 
-            $('.btn-success').click(function (e) {
+            $('.btn-success').click(function(e) {
                 e.preventDefault();
                 var id = $(this).attr('app_id');
-                $.get('/index/apps_merge?id=' + id, function (html) {
+                $.get('/index/apps_merge?id=' + id, function(html) {
                     $("#btnMerge").unbind();
                     $('#appContainer').html(html);
-                    $('#appContainer .ibox').click(function () {
-                        $('#appContainer .ibox .caption').each(function () {
+                    $('#appContainer .ibox').click(function() {
+                        $('#appContainer .ibox .caption').each(function() {
                             $(this).hide();
                         })
                         $(this).find('.caption').show();
                     });
                     $('#selApp').modal('show');
 
-                    $('#btnMerge').click(function () {
+                    $('#btnMerge').click(function() {
                         var kid = $("#appContainer .ibox .caption:visible").find('input').val();
                         if (!kid) {
                             alert('请选择要合并的应用');
                             return false;
                         }
-                        $.post('/index/ajax_profile/each_add', {aid: id, kid: kid}, function (data) {
+                        $.post('/index/ajax_profile/each_add', {
+                            aid: id,
+                            kid: kid
+                        }, function(data) {
                             if (data.code == 200) {
                                 $('#selApp').modal('hide');
-                                alert(data.msg, function () {
+                                alert(data.msg, function() {
                                     window.location.reload();
                                 });
                             } else {
@@ -138,223 +145,287 @@ class BaseUser extends Base
                 });
             });
         </script>
-        <?php 
-	}
-	function left()
-	{
-		?>        <div class="col-sm-2">
+    <?php
+    }
+    function left()
+    {
+    ?> <div class="col-sm-2">
             <aside class="aside-left">
-                <ul>
-                    <?php 
-		if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
-			?>                        <li class="<?php echo $this->module == "publish" || $this->module == "publish_update" ? "active" : "";?>">
-                            <a href="/index/publish/<?php echo $this->action;?>"> <span
+                                <ul>
+                    <?php
+                    if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
+                    ?> <li class="<?php echo $this->module == "publish" || $this->module == "publish_update" ? "active" : ""; ?>">
+                            <a href="/index/publish/<?php echo $this->action; ?>"> <span
                                         class="iconfont icon-upload1"></span>上传应用</a>
                         </li>
-                        <?php 
-		}
-		?>                    <li class="<?php echo $this->module == "apps" ? "active" : "";?>">
-                        <a href="/index/apps/<?php echo $this->action;?>"><span class="iconfont icon-41"></span>应用列表</a>
-                    </li>
-                    <?php 
-		if ($this->action == "apps") {
-			?>                        <li class="<?php echo $this->module == "domain" ? "active" : "";?>">
-                            <a href="/index/domain/<?php echo $this->action;?>">
+                    <?php
+                    }
+                    ?> <li class="<?php echo $this->module == "apps" ? "active" : ""; ?>">
+                            <a href="/index/apps/<?php echo $this->action; ?>"><span class="iconfont icon-41"></span>应用列表</a>
+                        </li>
+                    <?php
+                    if ($this->action == "apps") {
+                    ?> <li class="<?php echo $this->module == "domain" ? "active" : ""; ?>">
+                            <a href="/index/domain/<?php echo $this->action; ?>">
                                 <span class="iconfont icon-liulanqi"></span>绑定域名</a>
                         </li>
-                        <?php 
-		}
-		?>                    <?php 
-		if (IN_SUPER && ($this->action == "super" || strstr($this->module, "super"))) {
-			?>                        <li class="<?php echo $this->module == "super_code" ? "active" : "";?>">
+                    <?php
+                    }
+                    ?> <?php
+                    if (IN_SUPER && ($this->action == "super" || strstr($this->module, "super"))) {
+                    ?> <li class="<?php echo $this->module == "super_code" ? "active" : ""; ?>">
                             <a href="/index/super_code/super"><span class="iconfont icon-pwd"></span>授权码管理</a>
                         </li>
-                        <li class="<?php echo $this->module == "super_cert" ? "active" : "";?>">
+                        <li class="<?php echo $this->module == "super_cert" ? "active" : ""; ?>">
                             <a href="/index/super_cert/super"><span class="iconfont icon-gongju"></span>开发者账号</a>
                         </li>
-                    <?php 
-		}
-		?>                </ul>
+                    <?php
+                    }
+                    ?>
+                </ul>
             </aside>
         </div>
-        <?php 
-	}
-	function publish_left()
-	{
-		$_var_0 = SafeRequest("id", "get");
-		?>        <div class="col-sm-2">
+    <?php
+    }
+    function publish_left()
+    {
+        $_var_0 = SafeRequest("id", "get");
+    ?> <div class="col-sm-2">
+            <link rel="stylesheet" href="/static/index/css/apps-info-top.css" />
             <aside class="aside-left">
-                <ul>
-                    <li class="<?php echo $this->module == "publish_detail" ? "active" : "";?>">
-                        <a href="/index/publish_detail/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
+                                <ul>
+                    <li class="<?php echo $this->module == "publish_detail" ? "active" : ""; ?>">
+                        <a href="/index/publish_detail/<?php echo $this->action; ?>?id=<?php echo $_var_0; ?>">
                             <span class="iconfont icon-41"></span>应用详情
                         </a>
                     </li>
-                    <li class="<?php echo $this->module == "publish_setting" ? "active" : "";?>">
-                        <a href="/index/publish_setting/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
+                    <li class="<?php echo $this->module == "publish_setting" ? "active" : ""; ?>">
+                        <a href="/index/publish_setting/<?php echo $this->action; ?>?id=<?php echo $_var_0; ?>">
                             <span class="iconfont icon-19"></span>应用设置
                         </a>
                     </li>
-                    <li class="<?php echo $this->module == "publish_statistics" ? "active" : "";?>">
-                        <a href="/index/publish_statistics/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
+                    <li class="<?php echo $this->module == "publish_statistics" ? "active" : ""; ?>">
+                        <a href="/index/publish_statistics/<?php echo $this->action; ?>?id=<?php echo $_var_0; ?>">
                             <span class="iconfont icon-download2"></span>下载明细
                         </a>
                     </li>
-                    <?php 
-		if ($this->action == "sign" && IN_SIGN) {
-			?>                        <li class="<?php echo $this->module == "publish_sign" ? "active" : "";?>">
-                            <a href="/index/publish_sign/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
+                    <?php
+                    if ($this->action == "sign" && IN_SIGN) {
+                    ?> <li class="<?php echo $this->module == "publish_sign" ? "active" : ""; ?>">
+                            <a href="/index/publish_sign/<?php echo $this->action; ?>?id=<?php echo $_var_0; ?>">
                                 <span class="iconfont icon-qianming"></span>企业签名</a>
                         </li>
-                    <?php 
-		}
-		?>                    <?php 
-		if ($this->action == "super") {
-			?>                        <li class="<?php echo $this->module == "publish_superlog" ? "active" : "";?>">
-                            <a href="/index/publish_superlog/<?php echo $this->action;?>?id=<?php echo $_var_0;?>">
+                    <?php
+                    }
+                    ?> <?php
+                    if ($this->action == "super") {
+                    ?> <li class="<?php echo $this->module == "publish_superlog" ? "active" : ""; ?>">
+                            <a href="/index/publish_superlog/<?php echo $this->action; ?>?id=<?php echo $_var_0; ?>">
                                 <span class="iconfont icon-qianming"></span>签名记录</a>
                         </li>
-                    <?php 
-		}
-		?>                </ul>
+                    <?php
+                    }
+                    ?>
+                </ul>
             </aside>
         </div>
-        <?php 
-	}
-	function publish_top($_var_1 = [])
-	{
-		?>        <div class="details-top clearfix">
-			<div class="fl upload-icon-common uploaded ">
-				<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'">
-				<input type="file" class="thumbnail" name="icon" value="">
-				<div class="text">
-					上传图标
-				</div>
-				<div class="reset">
-					重新上传
-				</div>
-			</div>	
+    <?php
+    }
+    function publish_top($_var_1 = [])
+    {
+    ?> <div class="details-top clearfix my-apps-detail-top">
+            <div class="fl upload-icon-common uploaded ">
+                <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'">
+                <input type="file" class="thumbnail" name="icon" value="">
+                <div class="text">
+                    上传图标
+                </div>
+                <div class="reset">
+                    重新上传
+                </div>
+            </div>
             <dl class="information fl">
                 <dt>
-									<span class="i-tit">
-									<span class="text"><?php echo $_var_1["in_name"];?></span>
-									<span class="<?php echo $_var_1["in_form"] == "iOS" ? "iconfont icon-iphone" : "iconfont icon-android";?>"></span>
-									<?php 
-		if ($_var_1["in_form"] == "iOS") {
-			?>                                        <span class="version version-private"><span
-                                                    class="font10"><?php echo $this->action == "super" ? "超级版" : ($_var_1["in_type"] == 1 ? "企业版" : "内测版");?></span></span>
-                                    <?php 
-		}
-		?>									</span>
+                    <span class="i-tit">
+                        <span class="text"><?php echo $_var_1["in_name"]; ?></span>
+                        <?php
+                        if ($_var_1["in_form"] == "iOS") {
+                        ?> <span class="version version-private"><span
+                                    class="font10"><?php echo $this->action == "super" ? "超级版" : ($_var_1["in_type"] == 1 ? "企业版" : "内测版"); ?></span></span>
+                        <?php
+                        }
+                        ?>
+                    </span>
                 </dt>
                 <dd>
-                    <span>适用于<?php echo $_var_1["in_form"] == "iOS" ? "苹果" : "安卓";?><?php echo $_var_1["in_mnvs"];?>系统以上的设备</span>
-                    <span>版本<i><?php echo $_var_1["in_bsvs"];?> (Build <?php echo $_var_1["in_bvs"];?>)</i></span>
-                    <span>大小<i><?php echo formatsize($_var_1["in_size"]);?></i></span>
+                    <span>
+                        <span class="<?php echo $_var_1["in_form"] == "iOS" ? "iconfont icon-iphone" : "iconfont icon-android"; ?>"></span>
+                        适用于<?php echo $_var_1["in_form"] == "iOS" ? "苹果" : "安卓"; ?><?php echo $_var_1["in_mnvs"]; ?>系统以上的设备
+                    </span>
+                    <span>版本<i><?php echo $_var_1["in_bsvs"]; ?> (Build <?php echo $_var_1["in_bvs"]; ?>)</i></span>
+                    <span>大小<i><?php echo formatsize($_var_1["in_size"]); ?></i></span>
                 </dd>
-                <?php 
-		if ($_var_1["in_type"] == "2") {
-			?>                    <dd class="clearfix">
-									<span class="add-notes-wrap fl">
-									<span class="add-notes clearfix">
-									<span class="fl"><a href="javascript:void(0);" data-toggle="modal"
-                                                        data-target="#adhocUDIDBox">内测设备查看</a></span>
-									</span>
-									</span>
+                <?php
+                if ($_var_1["in_type"] == "2") {
+                ?> <dd class="clearfix">
+                        <span class="add-notes-wrap fl">
+                            <span class="add-notes clearfix">
+                                <span class="fl"><a href="javascript:void(0);" data-toggle="modal"
+                                        data-target="#adhocUDIDBox">内测设备查看</a></span>
+                            </span>
+                        </span>
                     </dd>
-                <?php 
-		}
-		?>            </dl>
+                <?php
+                }
+                ?>
+            </dl>
             <div class="fr d-right">
-                <?php 
-		if (!$_var_1["in_applock"]) {
-			if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
-				?>                        <a href="<?php echo IN_PATH;?>index/publish/<?php echo $this->action;?>?id=<?php echo bees_encrypt($_var_1["in_id"]);?>"
-                           class="ms-btn details-upload-new-version">
+                <!-- <?php
+                if (!$_var_1["in_applock"]) {
+                    if ($this->action == "apps" && IN_DIST_ON || $this->action == "sign" && IN_SIGN || $this->action == "super" && IN_SUPER) {
+                ?> <a title="上传新版本" href="<?php echo IN_PATH; ?>index/publish/<?php echo $this->action; ?>?id=<?php echo bees_encrypt($_var_1["in_id"]); ?>"
+                            class="ms-btn details-upload-new-version">
                             <span class="iconfont icon-upload1"></span>
                             <span class="text">上传新版本</span>
                         </a>
-                        <?php 
-			}
-			?>                    <a href="<?php echo getlink($_var_1["in_id"]);?>" target="_blank"
-                       class="ms-btn ml10 details-preview">预览</a>
-                    <?php 
-			if ($_var_1["in_kid"]) {
-				?>                        <button app_id="<?php echo bees_encrypt($_var_1["in_id"]);?>"
-                                class="ms-btn ml10 details-merge cancel_merge" data-toggle="modal"
-                                data-target="#myModal2">
-                            取消合并
+                    <?php
+                    }
+                    ?> -->
+                    <a title="上传新版本" href="<?php echo IN_PATH; ?>index/publish/<?php echo $this->action; ?>?id=<?php echo bees_encrypt($_var_1["in_id"]); ?>"
+                            class="ms-btn details-upload-new-version">
+                            <span class="iconfont icon-upload1"></span>
+                            <span class="text">上传新版本</span>
+                        </a>
+
+                    <a title="预览" href="<?php echo getlink($_var_1["in_id"]); ?>" target="_blank"
+                        class="ms-btn ml10 details-preview">
+                        <span class="iconfont icon-preview"></span>
+                        <span class="text">预览</span>
+                    </a>
+                    <?php
+                    if ($_var_1["in_kid"]) {
+                    ?> <button title="取消合并" app_id="<?php echo bees_encrypt($_var_1["in_id"]); ?>"
+                            class="ms-btn ml10 details-merge cancel_merge" data-toggle="modal"
+                            data-target="#myModal2">
+                            <span class="iconfont icon-merge"></span>
+                            <span class="text">取消合并</span>
                         </button>
-                    <?php 
-			} else {
-				?>                        <button class="ms-btn ml10 details-merge btn-success" data-toggle="modal"
-                                data-target="#myModal"
-                                app_id="<?php echo bees_encrypt($_var_1["in_id"]);?>">
-                            合并
+                    <?php
+                    } else {
+                    ?> <button title="合并" class="ms-btn ml10 details-merge btn-success" data-toggle="modal"
+                            data-target="#myModal"
+                            app_id="<?php echo bees_encrypt($_var_1["in_id"]); ?>">
+                            <span class="iconfont icon-merge"></span>
+                            <span class="text">合并</span>
                         </button>
-                    <?php 
-			}
-		}
-		?>            </div>
+                <?php
+                    }
+                }
+                ?> </div>
         </div>
-        <?php 
-	}
-	function user_left()
-	{
-		?>        <div class="col-sm-2">
+    <?php
+    }
+    function publish_app_list()
+    {
+        $id = bees_decrypt(SafeRequest("id", "get"));
+    ?>
+        <link rel="stylesheet" href="/static/index/css/apps-info-top.css" />
+        <link rel="stylesheet" href="/static/index/css/apps-aside.css" />
+        <div class="col-sm-2">
+            <aside class="aside-left">
+                <div class="aside-app-list-tilte">我的应用</div>
+                <ul class="aside-app-list">
+                    <?php
+                    // 根据不同的action过滤应用列表
+                    $where_conditions = [["in_uid", "=", $this->userid]];
+                    
+                    if ($this->action == "sign" && IN_SIGN) {
+                        $where_conditions[] = ["in_sign_type", "=", "1"];
+                    } elseif ($this->action == "super" && IN_SUPER) {
+                        $where_conditions[] = ["in_sign_type", "=", "2"];
+                    } else {
+                        $where_conditions[] = ["in_sign_type", "=", "0"];
+                    }
+                    
+                    $app_list = db("appid")->where($where_conditions)->order("in_applock desc,in_addtime desc")->select();
+                    foreach ($app_list as $app) {
+                        $app_id = bees_encrypt($app['in_id']);
+                        $is_active = ($app['in_id'] == $id) ? "active" : "";
+                    ?>
+                        <li class="<?php echo $is_active; ?>">
+                            <a title="<?php echo $app['in_name']; ?>" href="/index/publish_detail/<?php echo $this->action; ?>?id=<?php echo $app_id; ?>">
+                                <span class="app-img"
+                                    style="background-image: url(<?php echo geticon($app['in_icon']); ?>);"></span>
+                                <div class="app-info">
+                                    <p class="app-name-text"><?php echo $app['in_name']; ?></p>
+                                    <p class="app-form-text"><?php echo $app['in_form']; ?></p>
+                                </div>
+                            </a>
+                        </li>
+                    <?php
+                    }
+                    ?>
+                </ul>
+            </aside>
+        </div>
+    <?php
+    }
+    function user_left()
+    {
+    ?> <div class="col-sm-2">
             <aside class="aside-left">
                 <ul>
-                    <li class="<?php echo $this->module == "user_profile" ? "active" : "";?>">
-                        <a href="<?php echo IN_PATH;?>index/user_profile">
+                    <li class="<?php echo $this->module == "user_profile" ? "active" : ""; ?>">
+                        <a href="<?php echo IN_PATH; ?>index/user_profile">
                             <span class="iconfont icon-user1"></span>账号信息
                         </a>
                     </li>
-                    <li class="<?php echo $this->module == "user_order" ? "active" : "";?>">
-                        <a href="<?php echo IN_PATH;?>index/user_order">
+                    <li class="<?php echo $this->module == "user_order" ? "active" : ""; ?>">
+                        <a href="<?php echo IN_PATH; ?>index/user_order">
                             <span class="iconfont icon-028"></span>我的订单
                         </a>
                     </li>
 
-                    <li class="<?php echo $this->module == "user_aclog" ? "active" : "";?>">
-                        <a href="<?php echo IN_PATH;?>index/user_aclog">
+                    <li class="<?php echo $this->module == "user_aclog" ? "active" : ""; ?>">
+                        <a href="<?php echo IN_PATH; ?>index/user_aclog">
                             <span class="iconfont icon-fapiao"></span>账户记录
                         </a>
                     </li>
-                    <?php 
-		if (IN_PROMOTE) {
-			?>                        <li class="<?php echo $this->module == "user_promote" ? "active" : "";?>">
-                            <a href="<?php echo IN_PATH;?>index/user_promote">
+                    <?php
+                    if (IN_PROMOTE) {
+                    ?> <li class="<?php echo $this->module == "user_promote" ? "active" : ""; ?>">
+                            <a href="<?php echo IN_PATH; ?>index/user_promote">
                                 <span class="iconfont icon-team"></span>代理推广
                             </a>
                         </li>
-                    <?php 
-		}
-		?>                    <li class="<?php echo $this->module == "user_cash" ? "active" : "";?>">
-                        <a href="<?php echo IN_PATH;?>index/user_cash">
+                    <?php
+                    }
+                    ?> <li class="<?php echo $this->module == "user_cash" ? "active" : ""; ?>">
+                        <a href="<?php echo IN_PATH; ?>index/user_cash">
                             <span class="iconfont icon-008"></span>提现记录
                         </a>
                     </li>
                 </ul>
             </aside>
         </div>
-        <?php 
-	}
-	function webview_left()
-	{
-		?>        <div class="col-sm-2">
+    <?php
+    }
+    function webview_left()
+    {
+    ?> <div class="col-sm-2">
             <aside class="aside-left">
                 <ul>
-                    <li class="<?php echo $this->module == "webview" ? "active" : "";?>">
+                    <li class="<?php echo $this->module == "webview" ? "active" : ""; ?>">
                         <a href="/index/webview">
                             <span class="iconfont icon-xiangzi font18 icon-fz"></span>标准封装
                         </a>
                     </li>
-                    <li class="<?php echo $this->module == "webview2" ? "active" : "";?>">
+                    <li class="<?php echo $this->module == "webview2" ? "active" : ""; ?>">
                         <a href="/index/webview2">
                             <span class="iconfont icon-xiangzi font18 icon-fzmianqian"></span>苹果免签封装
                         </a>
                     </li>
-                    <li class="<?php echo $this->module == "webview_log" ? "active" : "";?>">
+                    <li class="<?php echo $this->module == "webview_log" ? "active" : ""; ?>">
                         <a href="/index/webview_log">
                             <span class="iconfont icon-xiangzi font18 icon-fzjilu"></span>封装记录
                         </a>
@@ -363,6 +434,6 @@ class BaseUser extends Base
                 </ul>
             </aside>
         </div>
-        <?php 
-	}
-}
+<?php
+    }
+}

+ 357 - 384
source/index/publish_detail.php

@@ -5,306 +5,270 @@ 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");
-		$result = db("app")->where("in_uid", $this->userid)->where("in_appid", $id)->order("in_addtime desc")->paginate(["page" => $page]);
-		$render = $result->render();
-		$count = $result->total();
-		$del_vid = 0;
-		if ($count > 3) {
-			$del_vid = db("app")->where("in_uid", $this->userid)->where("in_appid", $id)->order("in_addtime asc")->value("in_id");
-		}
-		$fnum = $this->action != "super" ? $row["in_deduct"] : 1;
-		$ftype = $this->action != "super" ? IN_POINTNAME : "设备";
-		$durl = getlink($row["in_id"], $this->action == "super");
-		?>        <!DOCTYPE html>
+    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_();
-		?>        </head>
-        <body>
-        <?php 
-		$this->header();
-		?>        <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css"/>
-        <script src="/static/index/js/jquery.form.js"></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_left();
-		?>                        <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>
-                                                                        <button class="copy-btn" data-clipboard-text="<?php echo $durl;?>"  style="border-radius: 3px;border: 1px solid goldenrod;background: #fff;font-size: 10px;color: goldenrod;padding: 0 5px">复制</button>
+            <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>
 
-                                                                    </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>
+        <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" title="苹果企业证书公司名称">公司名称</span>
+                                                                    <span class="th-line">包名(BundleID)</span>
+                                                                </th>
+                                                                <th>
+                                                                    <span class="th-line">状态</span>
                                                                 </th>
                                                                 <th>
-                                                                    <span class="th-line" title="苹果企业证书集团信息">集团信息</span>
+                                                                    <span class="th-line">下载链接</span>
                                                                 </th>
-                                                                <?php 
-			if (IN_SIGN && $row["in_form"] == "iOS") {
-				?>                                                                    <th>
-                                                                        <span class="th-line">签名期限</span>
+                                                            </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>
-                                                                <?php 
-			}
-			?>                                                            </tr>
+                                                                    <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">&nbsp;</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>
-                                                            <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>
+                                                                    <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>
-                                                            <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>
+                                                                    <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>
+                                                                <?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>
+                                                                            <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 
-			}
-			?>                                                            </tr>
+                                                                <?php
+                                                                } else {
+                                                                    ?><th></th>
+                                                                <?php } ?>
+                                                            </tr>
                                                         </table>
-                                                    <?php 
-		}
-		?>                                                    <table>
-                                                        <tr>
-                                                            <th>
-                                                                <span class="th-line" title="当前app下载次数">下载次数</span>
-                                                            </th>
-                                                            <th>
-                                                                <span class="th-line">下载扣除</span>
-                                                            </th>
-                                                            <th>
-                                                                <span class="th-line">下载二维码</span>
-                                                            </th>
-                                                        </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>
-                                                            <td>
-													<span href="javascript:;" class="more-wrap">
-													<a class="more">&nbsp;</a>
-													<img src="/qrcode?link=<?php echo $durl;?>">
-													</span>
-                                                            </td>
-                                                        </tr>
-                                                    </table>
+                                                    </div>
                                                 </div>
                                             </div>
                                         </div>
-                                    </div>
-                                    <hr>
-                                    <div class="table-list">
-                                        <div class="version-tit">
-                                            <span class="iconfont icon-jilu"></span>发布版本记录
-                                        </div>
-                                        <div class="table-responsive">
-                                            <table class="table version-history-table">
-                                                <tbody>
-                                                <tr>
-                                                    <th>
-                                                        版本
-                                                    </th>
-                                                    <th>
-                                                        大小
-                                                    </th>
-                                                    <th>
-                                                        证书名称
-                                                    </th>
-                                                    <th>
-                                                        更新说明
-                                                    </th>
-                                                    <th>
-                                                        更新时间
-                                                    </th>
-                                                    <th>
-                                                        操作
-                                                    </th>
-                                                </tr>
-                                                <?php 
-		foreach ($result as $key => $value) {
-			?>                                                    <tr>
-                                                        <td class="angle-parent">
-                                                            <?php 
-			if ($value["in_release"] == 1) {
-				?><img class="angle"
-                                                                                                          src="/static/index/image/angle-1.png"><?php 
-			}
-			?><?php echo $value["in_bsvs"];?>                                                            (Build <?php echo $value["in_bvs"];?>)
-                                                        </td>
-                                                        <td>
-                                                            <?php echo formatsize($value["in_size"]);?>                                                        </td>
-                                                        <td>
-                                                            <?php 
-			if ($value["in_form"] == "iOS") {
-				?>                                                                <div class="bundle-length" data-container="body"
-                                                                     data-toggle="popover" data-placement="bottom"
-                                                                     data-content="<?php echo $value["in_team"];?>"
-                                                                     data-trigger="hover" data-original-title=""
-                                                                     title="">
-                                                                    <?php echo $value["in_team"];?>                                                                </div>
-                                                            <?php 
-			} else {
-				?>                                                                -
-                                                            <?php 
-			}
-			?>                                                        </td>
-                                                        <td>
-                                                            <?php 
-			if (empty($value["in_desc"])) {
-				?>                                                                -- --
-                                                            <?php 
-			} else {
-				?>                                                                <?php echo $value["in_desc"];?>                                                            <?php 
-			}
-			?>                                                        </td>
-                                                        <td>
-                                                            <?php echo date("Y-m-d H:i:s", $value["in_addtime"]);?>                                                        </td>
-                                                        <td width="170">
-                                                            <input name="history_id" type="hidden"
-                                                                   value="<?php echo bees_encrypt($value["in_id"]);?>">
-                                                            <?php 
-			if ($value["in_release"] != 1) {
-				?><a
-                                                                    href="javascript:;"
-                                                                    class="iconfont icon-fabu"
-                                                                    title="发布"></a><?php 
-			}
-			?>                                                            <a href="#" data-target="#updateModal" data-toggle="modal"
-                                                               class="iconfont icon-edit" title="编辑"></a>
-                                                            <a href="<?php echo getapp_history($value["in_id"], 1);?>"
-                                                               class="iconfont icon-xiazai3" title="下载"></a>
-                                                            <?php 
-			if ($value["in_release"] != 1) {
-				?><a
-                                                                    href="javascript:;"
-                                                                    class="iconfont icon-shanchu"
-                                                                    title="删除"></a><?php 
-			}
-			?>                                                        </td>
-                                                    </tr>
-                                                <?php 
-		}
-		?>                                                </tbody>
-                                                <tfoot>
-                                                <tr>
-                                                    <td colspan="9"><?php echo getRender($result, $page);?></td>
-                                                </tr>
-                                                </tfoot>
-                                            </table>
+                                        <!-- 应用版本  基本设置  高级设置  模板设置  下载明细 -->
+                                        <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>
@@ -312,136 +276,145 @@ class publish_detail extends BaseUser
                     </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
+            <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">&times;</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/>
+                            </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>
-        <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">&times;</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 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">&times;</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>
-                    <div class="modal-footer">
-                        <button type="button" class="ms-btn ms-btn-primary w120 plugin-save mr20" data-dismiss="modal">
-                            保存
-                        </button>
+                        <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>
-        </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) {
+            <?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 () {
+                            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', {
+                });
+                $('.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,
-                            desc: desc
-                        }, function (data) {
+                            app_id: app_id
+                        }, function(data) {
                             if (data.code == 200) {
-                                alert('更新说明操作成功', function () {
+                                alert('删除版本成功', function() {
                                     window.location.reload();
                                 });
                                 return true;
+                            } else {
+                                alert(data.msg);
                             }
                         }, '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>
+                    }, 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 
-	}
-}
+<?php
+    }
+}

+ 489 - 480
source/index/publish_setting.php

@@ -5,27 +5,29 @@ namespace app\index;
 
 class publish_setting 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");
-		$ssl = is_ssl() ? "https://" : "http://";
-		$link = $ssl . $_SERVER["HTTP_HOST"] . IN_PATH;
-		?>        <!DOCTYPE html>
+    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");
+        $ssl = is_ssl() ? "https://" : "http://";
+        $link = $ssl . $_SERVER["HTTP_HOST"] . IN_PATH;
+?>
+        <!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_();
-		?>            <script charset="utf-8" src="/static/pack/kindeditor/kindeditor-all-min.js"></script>
+            <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_();
+            ?> <script charset="utf-8" src="/static/pack/kindeditor/kindeditor-all-min.js"></script>
             <script>
                 var editor;
-                KindEditor.ready(function (K) {
+                KindEditor.ready(function(K) {
                     editor = K.create('textarea[name="app_intro"]', {
                         resizeType: 1,
                         allowPreviewEmoticons: false,
@@ -33,530 +35,537 @@ class publish_setting extends BaseUser
                         items: [
                             'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                             'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
-                            'insertunorderedlist', '|', 'emoticons', 'image', 'link']
+                            'insertunorderedlist', '|', 'emoticons', 'image', 'link'
+                        ]
                     });
                 })
             </script>
         </head>
+
         <body>
-        <?php 
-		$this->header();
-		?>        <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css"/>
-        <script src="/static/index/js/jquery.form.js"></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_left();
-		?>                        <div class="col-sm-10">
-                            <div class="aside-right">
-                                <form class="form-horizontal" id="app_setting_form"
-                                      action="/index/ajax_profile/edit" method="post">
-                                    <div class="app-details app-details2 app-set1">
-                                        <?php 
-		$this->publish_top($row);
-		?>                                        <hr>
-                                        <div class="app-set">
-                                            <ul class="tab clearfix">
-                                                <li class="active">基本设置</li>
-                                                <li>高级设置</li>
-                                                <li>模板设置</li>
-                                            </ul>
-                                            <div class="tab-con">
-                                                <div class="basic" style="display: block;">
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1"><span>*</span>应用名称</label>
-                                                        <div class="col-sm-6">
-                                                            <input id="app_name" name="app_name" class="form-control"
-                                                                   type="text" placeholder="APP的名字"
-                                                                   value="<?php echo $row["in_name"];?>">
-                                                        </div>
-                                                    </div>
-                                                    <div class="form-group clearfix short-link">
-                                                        <label class="control-label col-sm-1"><span>*</span>短链接</label>
-                                                        <div class="col-sm-6 clearfix">
-                                                            <div class="col-sm-6 link"><?php echo $link;?></div>
+            <?php
+            $this->header();
+            ?>
+            <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css" />
+            <script src="/static/index/js/jquery.form.js"></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_left();
+                            ?> <div class="col-sm-10">
+                                <div class="aside-right">
+                                    <form class="form-horizontal" id="app_setting_form"
+                                        action="/index/ajax_profile/edit" method="post">
+                                        <div class="app-details app-details2 app-set1">
+                                            <?php
+                                            $this->publish_top($row);
+                                            ?>
+                                            <hr>
+                                            <div class="app-set">
+                                                <ul class="tab clearfix">
+                                                    <li class="active">基本设置</li>
+                                                    <li>高级设置</li>
+                                                    <li>模板设置</li>
+                                                </ul>
+                                                <div class="tab-con">
+                                                    <div class="basic" style="display: block;">
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1"><span>*</span>应用名称</label>
                                                             <div class="col-sm-6">
-                                                                <input id="url" name="url" class="form-control"
-                                                                       type="text"
-                                                                       placeholder="例如:abcdef"
-                                                                       value="<?php echo $row["in_link"];?>">
+                                                                <input id="app_name" name="app_name" class="form-control"
+                                                                    type="text" placeholder="APP的名字"
+                                                                    value="<?php echo $row["in_name"]; ?>">
                                                             </div>
                                                         </div>
-                                                    </div>
-                                                </div>
-                                                <div class="senior">
-
-                                                    <div class="form-group clearfix" <?php echo $row["in_form"] == "iOS" && $this->action != "super" ? "" : "style=\"display:none\"";?>>
-                                                        <label class="control-label col-sm-1">信任教程</label>
-                                                        <div class="col-sm-6">
-                                                            <ul class="clearfix trust in_tutorial">
-                                                                <li class="clearfix <?php 
-		if ($row["in_tutorial"] == 1) {
-			?>active<?php 
-		}
-		?>"
-                                                                    data-value="1">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_tutorial"] == 1) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">显示</span>
-                                                                </li>
-                                                                <li class="clearfix <?php 
-		if ($row["in_tutorial"] == 0) {
-			?>active<?php 
-		}
-		?>"
-                                                                    data-value="0">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_tutorial"] == 0) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">不显示</span>
-                                                                </li>
-                                                            </ul>
+                                                        <div class="form-group clearfix short-link">
+                                                            <label class="control-label col-sm-1"><span>*</span>短链接</label>
+                                                            <div class="col-sm-6 clearfix">
+                                                                <div class="col-sm-6 link"><?php echo $link; ?></div>
+                                                                <div class="col-sm-6">
+                                                                    <input id="url" name="url" class="form-control"
+                                                                        type="text"
+                                                                        placeholder="例如:abcdef"
+                                                                        value="<?php echo $row["in_link"]; ?>">
+                                                                </div>
+                                                            </div>
                                                         </div>
-                                                        <input type="hidden" name="show_guide"
-                                                               value="<?php echo $row["in_tutorial"];?>">
                                                     </div>
+                                                    <div class="senior">
 
-                                                    <div class="form-group clearfix" <?php echo $this->action == "super" ? "" : "style=\"display:none\"";?>>
-                                                        <label class="control-label col-sm-1">下载池</label>
-                                                        <div class="col-sm-6">
-                                                            <ul class="clearfix trust in_private">
-                                                                <li class="clearfix <?php 
-		if ($row["in_private"] == 0) {
-			?>active<?php 
-		}
-		?>">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_private"] == 0) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">公有</span>
-                                                                </li>
-                                                                <li class="clearfix <?php 
-		if ($row["in_private"] == 1) {
-			?>active<?php 
-		}
-		?>">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_private"] == 1) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">私有</span>
-                                                                </li>
-                                                            </ul>
+                                                        <div class="form-group clearfix" <?php echo $row["in_form"] == "iOS" && $this->action != "super" ? "" : "style=\"display:none\""; ?>>
+                                                            <label class="control-label col-sm-1">信任教程</label>
+                                                            <div class="col-sm-6">
+                                                                <ul class="clearfix trust in_tutorial">
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_tutorial"] == 1) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>"
+                                                                        data-value="1">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_tutorial"] == 1) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">显示</span>
+                                                                    </li>
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_tutorial"] == 0) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>"
+                                                                        data-value="0">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_tutorial"] == 0) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">不显示</span>
+                                                                    </li>
+                                                                </ul>
+                                                            </div>
+                                                            <input type="hidden" name="show_guide"
+                                                                value="<?php echo $row["in_tutorial"]; ?>">
                                                         </div>
-                                                        <input type="hidden" name="in_private"  value="<?php echo $row["in_private"];?>">
-                                                    </div>
 
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">下载方式</label>
-                                                        <div class="col-sm-10">
-                                                            <ul class="clearfix download-way">
-                                                                <li class="clearfix active" data-value="0">
-                                                                    <span class="icon icon-radio <?php 
-		if (empty($row["in_use_auth_code"]) && empty($row["in_apppwd"])) {
-			?>icon-radio-checked <?php 
-		}
-		?>fl"></span>
-                                                                    <span class="fl">公开安装</span>
-                                                                </li>
-                                                                <li class="clearfix" data-value="1">
-                                                                    <span class="icon icon-radio <?php 
-		if (empty($row["in_use_auth_code"]) && $row["in_apppwd"]) {
-			?>icon-radio-checked <?php 
-		}
-		?>fl"></span>
-                                                                    <span class="fl">密码安装</span>
-                                                                </li>
-                                                                <li class="clearfix" data-value="2" <?php echo $this->action == "super" ? "" : "style=\"display:none\"";?>>
-                                                                    <span class="icon icon-radio <?php 
-		if ($row["in_use_auth_code"]) {
-			?>icon-radio-checked <?php 
-		}
-		?>fl"></span>
-                                                                    <span class="fl">授权码安装</span>
-                                                                </li>
-                                                                <input type="hidden" name="in_use_auth_code" value="<?php echo $row["in_use_auth_code"];?>">
-                                                            </ul>
+                                                        <div class="form-group clearfix" <?php echo $this->action == "super" ? "" : "style=\"display:none\""; ?>>
+                                                            <label class="control-label col-sm-1">下载池</label>
+                                                            <div class="col-sm-6">
+                                                                <ul class="clearfix trust in_private">
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_private"] == 0) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_private"] == 0) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">公有</span>
+                                                                    </li>
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_private"] == 1) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_private"] == 1) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">私有</span>
+                                                                    </li>
+                                                                </ul>
+                                                            </div>
+                                                            <input type="hidden" name="in_private" value="<?php echo $row["in_private"]; ?>">
                                                         </div>
-                                                    </div>
-                                                    <div id="apppwd" class="form-group clearfix" <?php 
-		if (empty($row["in_apppwd"])) {
-			?> style="display: none;"<?php 
-		}
-		?>>
-                                                        <label class="control-label col-sm-1">下载密码</label>
-                                                        <div class="col-sm-6">
-                                                            <input id="password" name="password" class="form-control" autocomplete="false" type="text"  placeholder="请输入下载密码"   value="">
+
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">下载方式</label>
+                                                            <div class="col-sm-10">
+                                                                <ul class="clearfix download-way">
+                                                                    <li class="clearfix active" data-value="0">
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if (empty($row["in_use_auth_code"]) && empty($row["in_apppwd"])) {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl"></span>
+                                                                        <span class="fl">公开安装</span>
+                                                                    </li>
+                                                                    <li class="clearfix" data-value="1">
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if (empty($row["in_use_auth_code"]) && $row["in_apppwd"]) {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl"></span>
+                                                                        <span class="fl">密码安装</span>
+                                                                    </li>
+                                                                    <li class="clearfix" data-value="2" <?php echo $this->action == "super" ? "" : "style=\"display:none\""; ?>>
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if ($row["in_use_auth_code"]) {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl"></span>
+                                                                        <span class="fl">授权码安装</span>
+                                                                    </li>
+                                                                    <input type="hidden" name="in_use_auth_code" value="<?php echo $row["in_use_auth_code"]; ?>">
+                                                                </ul>
+                                                            </div>
                                                         </div>
-                                                    </div>
-                                                    <div class="form-group clearfix auth_code_dispense_url" <?php 
-		if (empty($row["in_use_auth_code"]) || $this->action != "super") {
-			?> style="display: none;"<?php 
-		}
-		?>>
-                                                        <label class="control-label col-sm-1">购码地址</label>
-                                                        <div class="col-sm-6">
-                                                            <input id="auth_code_dispense_url"  name="auth_code_dispense_url"  class="form-control"  autocomplete="false" type="text" placeholder="默认留空,在平台购卡,也可自定义填写"  value="<?php echo $row["auth_code_dispense_url"];?>">
+                                                        <div id="apppwd" class="form-group clearfix" <?php
+                                                                                                        if (empty($row["in_apppwd"])) {
+                                                                                                        ?> style="display: none;" <?php
+                                                                                                        }
+                                        ?>>
+                                                            <label class="control-label col-sm-1">下载密码</label>
+                                                            <div class="col-sm-6">
+                                                                <input id="password" name="password" class="form-control" autocomplete="false" type="text" placeholder="请输入下载密码" value="">
+                                                            </div>
                                                         </div>
-                                                    </div>
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">验证码</label>
-                                                        <div class="col-sm-6">
-                                                            <ul class="clearfix trust in_captcha">
-                                                                <li class="clearfix <?php 
-		if ($row["in_captcha"] == 0) {
-			?>active<?php 
-		}
-		?>"
-                                                                    data-value="0">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_captcha"] == 0) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">不启用</span>
-                                                                </li>
-                                                                <li class="clearfix <?php 
-		if ($row["in_captcha"] == 1) {
-			?>active<?php 
-		}
-		?>"
-                                                                    data-value="1">
-                                                                    <span class="icon icon-radio fl <?php 
-		if ($row["in_captcha"] == 1) {
-			?>icon-radio-checked<?php 
-		}
-		?>"></span>
-                                                                    <span class="fl">启用</span>
-                                                                </li>
-                                                            </ul>
+                                                        <div class="form-group clearfix auth_code_dispense_url" <?php
+                                                                                                                if (empty($row["in_use_auth_code"]) || $this->action != "super") {
+                                                                                                                ?> style="display: none;" <?php
+                                                                                                                }
+                                        ?>>
+                                                            <label class="control-label col-sm-1">购码地址</label>
+                                                            <div class="col-sm-6">
+                                                                <input id="auth_code_dispense_url" name="auth_code_dispense_url" class="form-control" autocomplete="false" type="text" placeholder="默认留空,在平台购卡,也可自定义填写" value="<?php echo $row["auth_code_dispense_url"]; ?>">
+                                                            </div>
                                                         </div>
-                                                        <input type="hidden" name="in_captcha"
-                                                               value="<?php echo $row["in_captcha"];?>">
-                                                    </div>
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">下载限制</label>
-                                                        <div class="col-sm-6">
-                                                            <input id="limit_num" name="limit_num" class="form-control"
-                                                                   type="text" placeholder="请输入限制下载次数,不填或填0表示不限制"
-                                                                   value="<?php echo $row["in_applimit"];?>">
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">验证码</label>
+                                                            <div class="col-sm-6">
+                                                                <ul class="clearfix trust in_captcha">
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_captcha"] == 0) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>"
+                                                                        data-value="0">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_captcha"] == 0) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">不启用</span>
+                                                                    </li>
+                                                                    <li class="clearfix <?php
+                                                                                        if ($row["in_captcha"] == 1) {
+                                                                                        ?>active<?php
+                                                                                        }
+                    ?>"
+                                                                        data-value="1">
+                                                                        <span class="icon icon-radio fl <?php
+                                                                                                        if ($row["in_captcha"] == 1) {
+                                                                                                        ?>icon-radio-checked<?php
+                                                                                                        }
+                                ?>"></span>
+                                                                        <span class="fl">启用</span>
+                                                                    </li>
+                                                                </ul>
+                                                            </div>
+                                                            <input type="hidden" name="in_captcha"
+                                                                value="<?php echo $row["in_captcha"]; ?>">
                                                         </div>
-                                                    </div>
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">联系方式</label>
-                                                        <div class="col-sm-6">
-                                                            <input id="qq" name="qq" class="form-control" type="text"
-                                                                   placeholder="请输入微信/QQ/手机号(格式:微信 123456696)"
-                                                                   value="<?php echo $row["in_contact"];?>">
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">下载限制</label>
+                                                            <div class="col-sm-6">
+                                                                <input id="limit_num" name="limit_num" class="form-control"
+                                                                    type="text" placeholder="请输入限制下载次数,不填或填0表示不限制"
+                                                                    value="<?php echo $row["in_applimit"]; ?>">
+                                                            </div>
                                                         </div>
-                                                    </div>
-                                                    <?php 
-		if ($row["in_form"] == "iOS") {
-			?>                                                        <div class="form-group clearfix">
-                                                            <label class="control-label col-sm-1">苹果商店地址</label>
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">联系方式</label>
                                                             <div class="col-sm-6">
-                                                                <input class="form-control" autocomplete="false"
-                                                                       id="appstore_url" name="appstore_url"
-                                                                       value="<?php echo $row["in_appstore"];?>"
-                                                                       placeholder="请输入苹果商店地址">
+                                                                <input id="qq" name="qq" class="form-control" type="text"
+                                                                    placeholder="请输入微信/QQ/手机号(格式:微信 123456696)"
+                                                                    value="<?php echo $row["in_contact"]; ?>">
                                                             </div>
                                                         </div>
-                                                    <?php 
-		}
-		?>                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">备注</label>
-                                                        <div class="col-sm-6">
-                                                            <input class="form-control" type="text"
-                                                                   placeholder="请输入备注说明"
-                                                                   name="remark"
-                                                                   value="<?php echo $row["in_remark"];?>">
+                                                        <?php
+                                                        if ($row["in_form"] == "iOS") {
+                                                        ?> <div class="form-group clearfix">
+                                                                <label class="control-label col-sm-1">苹果商店地址</label>
+                                                                <div class="col-sm-6">
+                                                                    <input class="form-control" autocomplete="false"
+                                                                        id="appstore_url" name="appstore_url"
+                                                                        value="<?php echo $row["in_appstore"]; ?>"
+                                                                        placeholder="请输入苹果商店地址">
+                                                                </div>
+                                                            </div>
+                                                        <?php
+                                                        }
+                                                        ?> <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">备注</label>
+                                                            <div class="col-sm-6">
+                                                                <input class="form-control" type="text"
+                                                                    placeholder="请输入备注说明"
+                                                                    name="remark"
+                                                                    value="<?php echo $row["in_remark"]; ?>">
+                                                            </div>
                                                         </div>
-                                                    </div>
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">应用介绍</label>
-                                                        <div class="col-sm-6">
-                                                            <textarea class="form-control" rows="4" type="text"
-                                                                      placeholder="请输入应用介绍" id="app_intro"
-                                                                      name="app_intro"
-                                                                      style="width:500px;height:200px;visibility:hidden;"><?php echo $row["in_appintro"];?></textarea>
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">应用介绍</label>
+                                                            <div class="col-sm-6">
+                                                                <textarea class="form-control" rows="4" type="text"
+                                                                    placeholder="请输入应用介绍" id="app_intro"
+                                                                    name="app_intro"
+                                                                    style="width:500px;height:200px;visibility:hidden;"><?php echo $row["in_appintro"]; ?></textarea>
+                                                            </div>
                                                         </div>
                                                     </div>
-                                                </div>
-                                                <div class="download-template">
-                                                    <div class="form-group clearfix">
-                                                        <label class="control-label col-sm-1">设置语言</label>
-                                                        <div class="col-sm-10">
-                                                            <ul class="clearfix template-language radio-round" style="margin-top:7px;">
-                                                                <li class="clearfix active" data-language="zh">
-                                                                    <span class="icon icon-radio <?php 
-		if ($row["template_language"] == "zh") {
-			?>icon-radio-checked <?php 
-		}
-		?>fl"></span>
-                                                                    <span class="fl">简体中文</span>
-                                                                </li>
-                                                                <li class="clearfix " data-language="en">
-                                                                    <span class="icon icon-radio <?php 
-		if ($row["template_language"] == "en") {
-			?>icon-radio-checked <?php 
-		}
-		?>fl "></span>
-                                                                    <span class="fl">English</span>
-                                                                </li>
-                                                                <li class="clearfix " data-language="zh-tw">
-                                                                    <span class="icon icon-radio <?php 
-		if ($row["template_language"] == "zh-tw") {
-			?>icon-radio-checked <?php 
-		}
-		?>fl "></span>
-                                                                    <span class="fl">繁體中文</span>
-                                                                </li>
-                                                                <input type="hidden" name="template_language"
-                                                                       value="<?php echo $row["template_language"];?>">
-                                                            </ul>
+                                                    <div class="download-template">
+                                                        <div class="form-group clearfix">
+                                                            <label class="control-label col-sm-1">设置语言</label>
+                                                            <div class="col-sm-10">
+                                                                <ul class="clearfix template-language radio-round" style="margin-top:7px;">
+                                                                    <li class="clearfix active" data-language="zh">
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if ($row["template_language"] == "zh") {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl"></span>
+                                                                        <span class="fl">简体中文</span>
+                                                                    </li>
+                                                                    <li class="clearfix " data-language="en">
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if ($row["template_language"] == "en") {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl "></span>
+                                                                        <span class="fl">English</span>
+                                                                    </li>
+                                                                    <li class="clearfix " data-language="zh-tw">
+                                                                        <span class="icon icon-radio <?php
+                                                                                                        if ($row["template_language"] == "zh-tw") {
+                                                                                                        ?>icon-radio-checked <?php
+                                                                                                        }
+                                    ?>fl "></span>
+                                                                        <span class="fl">繁體中文</span>
+                                                                    </li>
+                                                                    <input type="hidden" name="template_language"
+                                                                        value="<?php echo $row["template_language"]; ?>">
+                                                                </ul>
+                                                            </div>
                                                         </div>
-                                                    </div>
-                                                    <div class="form-group">
-                                                        <label class="control-label col-sm-1">设置模板</label>
-                                                        <div class="col-sm-10">
-                                                            <ul class="clearfix">
-                                                                <?php 
-		foreach (range(1, 7) as $k => $v) {
-			?>                                                                    <li>
-                                                                        <div class="t-checked-wrap">
-                                                                            <img src="/static/index/image/template-<?php echo $v;?>.jpg"
-                                                                                 class="img-responsive">
-                                                                            <div class="t-checked"
-                                                                                <?php echo $row["template"] == $v ? "style=\"display: flex\"" : "";?>>
-                                                                                <span class="iconfont icon-xuanzhong1"></span>
+                                                        <div class="form-group">
+                                                            <label class="control-label col-sm-1">设置模板</label>
+                                                            <div class="col-sm-10">
+                                                                <ul class="clearfix">
+                                                                    <?php
+                                                                    foreach (range(1, 7) as $k => $v) {
+                                                                    ?> <li>
+                                                                            <div class="t-checked-wrap">
+                                                                                <img src="/static/index/image/template-<?php echo $v; ?>.jpg"
+                                                                                    class="img-responsive">
+                                                                                <div class="t-checked"
+                                                                                    <?php echo $row["template"] == $v ? "style=\"display: flex\"" : ""; ?>>
+                                                                                    <span class="iconfont icon-xuanzhong1"></span>
+                                                                                </div>
                                                                             </div>
-                                                                        </div>
-                                                                        <a href="/index/template/<?php echo bees_encrypt($row["in_id"]);?>/tmp<?php echo $v;?>"
-                                                                           target="_blank" class="text">预览</a>
-                                                                        <input type="radio" name="template"
-                                                                               value="<?php echo $v;?>" <?php 
-			if ($row["template"] == $v) {
-				?>checked<?php 
-			}
-			?> class="hidden">
-                                                                    </li>
-                                                                    <?php 
-		}
-		?>                                                            </ul>
+                                                                            <a href="/index/template/<?php echo bees_encrypt($row["in_id"]); ?>/tmp<?php echo $v; ?>"
+                                                                                target="_blank" class="text">预览</a>
+                                                                            <input type="radio" name="template"
+                                                                                value="<?php echo $v; ?>" <?php
+                                                                                                            if ($row["template"] == $v) {
+                                                                                                            ?>checked<?php
+                                                                                                            }
+                            ?> class="hidden">
+                                                                        </li>
+                                                                    <?php
+                                                                    }
+                                                                    ?> </ul>
+                                                            </div>
                                                         </div>
                                                     </div>
                                                 </div>
-                                            </div>
-                                            <div class="form-group clearfix">
-                                                <input type="hidden" name="id"
-                                                       value="<?php echo bees_encrypt($row["in_id"]);?>"/>
-                                                <label class="control-label col-sm-1"></label>
-                                                <div class="col-sm-6">
-                                                    <button id="submitButton" type="button"
+                                                <div class="form-group clearfix">
+                                                    <input type="hidden" name="id"
+                                                        value="<?php echo bees_encrypt($row["in_id"]); ?>" />
+                                                    <label class="control-label col-sm-1"></label>
+                                                    <div class="col-sm-6">
+                                                        <button id="submitButton" type="button"
                                                             class="ms-btn ms-btn-primary w140">
-                                                        保存
-                                                    </button>
+                                                            保存
+                                                        </button>
+                                                    </div>
                                                 </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </form>
+                                    </form>
+                                </div>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
-        </div>
-        <div class="modal fade ms-modal auto-hide-modal" id="msModalSetting" tabindex="-1" role="dialog"
-             style="display: none;">
-            <div class="modal-dialog modal-sm" role="document">
-                <div class="modal-content">
-                    <div class="modal-body">
-                        <div class="text-center">
-                            <div class="auto-hide">
-                                <span class="icon icon-modal-success3"></span>
-                                <div class="mt5">
-                                    保存成功
+            <div class="modal fade ms-modal auto-hide-modal" id="msModalSetting" tabindex="-1" role="dialog"
+                style="display: none;">
+                <div class="modal-dialog modal-sm" role="document">
+                    <div class="modal-content">
+                        <div class="modal-body">
+                            <div class="text-center">
+                                <div class="auto-hide">
+                                    <span class="icon icon-modal-success3"></span>
+                                    <div class="mt5">
+                                        保存成功
+                                    </div>
                                 </div>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
-        </div>
-        <?php 
-		$this->inc_merge();
-		?>        <script>
-            var app_id = '<?php echo bees_encrypt($id);?>';
-            Layout.initUploadPic();
-            tab.radioRound({
-                el: ".radio-round li",
-                checkedClass: "icon-radio-checked"
-            });
-            // 下载模板选中
-            $(".download-template ul li .t-checked-wrap").click(function () {
-                var i = $(this).parent().index();
-                $(".download-template ul li .t-checked-wrap").find(".t-checked").hide();
-                $(this).find(".t-checked").css("display", "flex");
-                $(".download-template ul li input[type=radio]").prop("checked", false);
-                $(this).parent("li").find("input[type=radio]").prop("checked", true);
-            });
+            <?php
+            $this->inc_merge();
+            ?> <script>
+                var app_id = '<?php echo bees_encrypt($id); ?>';
+                Layout.initUploadPic();
+                tab.radioRound({
+                    el: ".radio-round li",
+                    checkedClass: "icon-radio-checked"
+                });
+                // 下载模板选中
+                $(".download-template ul li .t-checked-wrap").click(function() {
+                    var i = $(this).parent().index();
+                    $(".download-template ul li .t-checked-wrap").find(".t-checked").hide();
+                    $(this).find(".t-checked").css("display", "flex");
+                    $(".download-template ul li input[type=radio]").prop("checked", false);
+                    $(this).parent("li").find("input[type=radio]").prop("checked", true);
+                });
 
-            // 设置模板页语言
-            $(".download-template .template-language li").click(function () {
-                var val = $(this).data('language');
-                $("input[name='template_language']").val(val);
-            });
-            $('#submitButton').click(function () {
-                editor.sync();
-                $('#app_setting_form').ajaxSubmit({
-                    dataType: 'json',
-                    success: function (data) {
-                        if (data.code != 200) {
-                            alert(data.msg);
-                        } else {
-                            // $(".app-details").find(".details-preview").attr('href', '/' + data.data.url);
-                            $("#msModalSetting").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text("保存成功");
-                            autoHideModal('#msModalSetting', 3000);
+                // 设置模板页语言
+                $(".download-template .template-language li").click(function() {
+                    var val = $(this).data('language');
+                    $("input[name='template_language']").val(val);
+                });
+                $('#submitButton').click(function() {
+                    editor.sync();
+                    $('#app_setting_form').ajaxSubmit({
+                        dataType: 'json',
+                        success: function(data) {
+                            if (data.code != 200) {
+                                alert(data.msg);
+                            } else {
+                                // $(".app-details").find(".details-preview").attr('href', '/' + data.data.url);
+                                $("#msModalSetting").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text("保存成功");
+                                autoHideModal('#msModalSetting', 3000);
+                            }
                         }
-                    }
+                    });
                 });
-            });
 
-            $('#password').val('<?php echo $row["in_apppwd"];?>');
-            $('#url').val('<?php echo $row["in_link"];?>');
-            $('#appstore_url').val('<?php echo $row["in_appstore"];?>');
+                $('#password').val('<?php echo $row["in_apppwd"]; ?>');
+                $('#url').val('<?php echo $row["in_link"]; ?>');
+                $('#appstore_url').val('<?php echo $row["in_appstore"]; ?>');
+
+                function fileSelect() {
+                    $("#fileToUpload").click();
+                }
 
-            function fileSelect() {
-                $("#fileToUpload").click();
-            }
+                function fileSelected() {
+                    var $file = $('#fileToUpload');
+                    var fileObj = $file[0];
+                    var windowURL = window.URL || window.webkitURL;
+                    var dataURL;
+                    var $img = $("#icon");
 
-            function fileSelected() {
-                var $file = $('#fileToUpload');
-                var fileObj = $file[0];
-                var windowURL = window.URL || window.webkitURL;
-                var dataURL;
-                var $img = $("#icon");
+                    if (fileObj && fileObj.files && fileObj.files[0]) {
+                        dataURL = windowURL.createObjectURL(fileObj.files[0]);
+                        $img.attr('src', dataURL);
+                    } else {
+                        dataURL = $file.val();
+                        var imgObj = document.getElementById("preview");
+                        // 两个坑:
+                        // 1、在设置filter属性时,元素必须已经存在在DOM树中,动态创建的Node,也需要在设置属性前加入到DOM中,先设置属性在加入,无效;
+                        // 2、src属性需要像下面的方式添加,上面的两种方式添加,无效;
+                        imgObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
+                        imgObj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = dataURL;
+                    }
+                }
 
-                if (fileObj && fileObj.files && fileObj.files[0]) {
-                    dataURL = windowURL.createObjectURL(fileObj.files[0]);
-                    $img.attr('src', dataURL);
-                } else {
-                    dataURL = $file.val();
-                    var imgObj = document.getElementById("preview");
-                    // 两个坑:
-                    // 1、在设置filter属性时,元素必须已经存在在DOM树中,动态创建的Node,也需要在设置属性前加入到DOM中,先设置属性在加入,无效;
-                    // 2、src属性需要像下面的方式添加,上面的两种方式添加,无效;
-                    imgObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
-                    imgObj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = dataURL;
+                function autoHideModal(obj1, time) {
+                    var autoHide = null;
+                    clearTimeout(autoHide);
+                    $(obj1).modal('show');
+                    $(".modal-backdrop").hide();
+                    autoHide = setTimeout(function() {
+                        $(obj1).modal("hide");
+                    }, time);
                 }
-            }
 
-            function autoHideModal(obj1, time) {
-                var autoHide = null;
-                clearTimeout(autoHide);
-                $(obj1).modal('show');
-                $(".modal-backdrop").hide();
-                autoHide = setTimeout(function () {
-                    $(obj1).modal("hide");
-                }, time);
-            }
+                // 信任教程
+                $(".senior .in_tutorial li").click(function() {
+                    var val = $(this).data('value');
+                    $("input[name='show_guide']").val(val);
+                });
+                // 开放安装、有密安装
+                $(".senior .download-way li").click(function() {
+                    var val = $(this).data('value');
+                    if (val == 1) {
+                        $('#apppwd').show();
+                    } else {
+                        $('#apppwd').hide();
+                        $("input[name='password']").val('');
+                    }
+                    if (val == 2) {
+                        $("input[name='in_use_auth_code']").val(1)
+                        $('.auth_code_dispense_url').show()
+                    } else {
+                        $("input[name='in_use_auth_code']").val(0);
+                        $('.auth_code_dispense_url').hide();
+                    }
+                });
 
-            // 信任教程
-            $(".senior .in_tutorial li").click(function () {
-                var val = $(this).data('value');
-                $("input[name='show_guide']").val(val);
-            });
-            // 开放安装、有密安装
-            $(".senior .download-way li").click(function () {
-                var val = $(this).data('value');
-                if (val == 1){
-					$('#apppwd').show();
-				}else{
-					$('#apppwd').hide();
-					$("input[name='password']").val('');
-				}
-                if (val == 2) {
-                    $("input[name='in_use_auth_code']").val(1)
-                    $('.auth_code_dispense_url').show()
-                } else{
-					$("input[name='in_use_auth_code']").val(0);
-					$('.auth_code_dispense_url').hide();
-				}
-            });
+                $(".senior .in_private li").click(function() {
+                    var val = $(this).index();
+                    $("input[name='in_private']").val(val);
+                });
+                $(".senior .in_captcha li").click(function() {
+                    var val = $(this).index();
+                    $("input[name='in_captcha']").val(val);
+                });
+                // 设置模板页语言
+                $(".download-template .template-language li").click(function() {
+                    var val = $(this).data('language');
+                    $("input[name='template_language']").val(val);
+                });
 
-            $(".senior .in_private li").click(function () {
-                var val = $(this).index();
-                $("input[name='in_private']").val(val);
-            });
-            $(".senior .in_captcha li").click(function () {
-                var val = $(this).index();
-                $("input[name='in_captcha']").val(val);
-            });
-            // 设置模板页语言
-            $(".download-template .template-language li").click(function () {
-                var val = $(this).data('language');
-                $("input[name='template_language']").val(val);
-            });
+                $('.control-content .ibox .caption').each(function() {
+                    if ($(this).find('input').val() == 'tmp<?php echo $row["template"]; ?>') {
+                        $(this).show();
+                    }
+                });
 
-            $('.control-content .ibox .caption').each(function () {
-                if ($(this).find('input').val() == 'tmp<?php echo $row["template"];?>') {
-                    $(this).show();
-                }
-            });
+                $('#app_name').focus(function() {
+                    $('.appname-danger').show();
+                }).blur(function() {
+                    $('.appname-danger').hide();
+                });
 
-            $('#app_name').focus(function () {
-                $('.appname-danger').show();
-            }).blur(function () {
-                $('.appname-danger').hide();
-            });
+                $('#url').focus(function() {
+                    $('.url-danger').show();
+                }).blur(function() {
+                    $('.url-danger').hide();
+                });
 
-            $('#url').focus(function () {
-                $('.url-danger').show();
-            }).blur(function () {
-                $('.url-danger').hide();
-            });
+                $('.control-content .ibox').click(function() {
+                    $('.control-content .ibox .caption').each(function() {
+                        $(this).hide();
+                    });
+                    $(this).find('.caption').show();
+                });
 
-            $('.control-content .ibox').click(function () {
-                $('.control-content .ibox .caption').each(function () {
-                    $(this).hide();
+                $('#modifyBtn').click(function() {
+                    $('#appstore_url').removeAttr("readonly");
+                    return false;
+                });
+                $('#modifyUrl').click(function() {
+                    $('#url').removeAttr("readonly");
+                    return false;
+                });
+                $('#modifyPassword').click(function() {
+                    $('#password').removeAttr("readonly");
+                    return false;
                 });
-                $(this).find('.caption').show();
-            });
+            </script>
+            <?php
+            $this->footer();
+            ?>
+        </body>
 
-            $('#modifyBtn').click(function () {
-                $('#appstore_url').removeAttr("readonly");
-                return false;
-            });
-            $('#modifyUrl').click(function () {
-                $('#url').removeAttr("readonly");
-                return false;
-            });
-            $('#modifyPassword').click(function () {
-                $('#password').removeAttr("readonly");
-                return false;
-            });
-        </script>
-        <?php 
-		$this->footer();
-		?>        </body>
         </html>
-    <?php 
-	}
-}
+<?php
+    }
+}

+ 290 - 225
source/index/publish_statistics.php

@@ -5,204 +5,267 @@ namespace app\index;
 
 class publish_statistics extends BaseUser
 {
-	function index()
-	{
-		$id = bees_decrypt(SafeRequest("id", "get"));
-		$row = db('appid')->where('in_uid', $this->userid)->where('in_id', $id)->find();
-		$row || exit(include_once dirname(__FILE__) . '/../pack/error/404.php');
-		$sid = bees_encrypt($row['in_id']);
-		$start_date = SafeRequest("start_date", "get");
-		$end_date = SafeRequest("end_date", "get");
-		$starttime = $start_date . ' 00:00:00';
-		$endtime = $end_date . ' 23:59:59';
-		$specified = '';
-		if (!empty($start_date) && !empty($end_date)) {
-			$specified = "addtime>'" . $starttime . "' and addtime<'" . $endtime . "' ";
-		}
-		$total = db('downhistory')->where($specified)->where('appid', $id)->where('uid', $this->userid)->count();
-		$num = 10;
-		$cpage = isset($_GET['page']) ? $_GET['page'] : 1;
-		$pagenum = ceil($total / $num);
-		$offset = ($cpage - 1) * $num;
-		$result = db('downhistory')->where($specified)->where('appid', $id)->where('uid', $this->userid)->order('addtime desc')->limit($offset, $num)->select();
-		$start = $offset + 1;
-		$end = $cpage == $pagenum ? $total : $cpage * $num;
-		$next = $cpage == $pagenum ? 0 : $cpage + 1;
-		$prev = $cpage == 1 ? 0 : $cpage - 1;
-		?>        <!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_();
-		?>        </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.datetimepicker.js?20190530"></script>
-        <script src="/static/index/js/bootstrap-paginator.js"></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_left();
-		?>                        <div class="col-sm-10">
-                            <div class="aside-right">
-                                <div class="app-details app-details2">
-                                    <?php 
-		$this->publish_top($row);
-		?>                                    <hr>
-                                    <div class="download-details">
-                                        <div class="d-top clearfix">
-                                            <div class="date date1">
-                                                <input class="form-control" type="text" id="datetimepicker1"
-                                                       value="<?php 
-		if (empty($start_date)) {
-			?><?php echo date("Y/m/d", strtotime(date("Y/m/d") . '-1 week'));?><?php 
-		} else {
-			?><?php echo $start_date;?><?php 
-		}
-		?>">
-                                                <span class="iconfont icon-date"></span>
-                                            </div>
-                                            <div class="fl line">
-                                                _
-                                            </div>
-                                            <div class="date date2">
-                                                <input class="form-control" type="text" id="datetimepicker2"
-                                                       value="<?php 
-		if (empty($end_date)) {
-			?><?php echo date("Y/m/d");?><?php 
-		} else {
-			?><?php echo $end_date;?><?php 
-		}
-		?>">
-                                                <span class="iconfont icon-date"></span>
-                                            </div>
-                                            <button type="button" class="ms-btn ms-btn-secondary fl query">查询</button>
-                                            <span class="fl num">累计总下载 <i><?php echo $row['in_downloads'];?></i> 次</span>
-                                            <button type="button" class="ms-btn ms-btn-secondary fr cleanUp"
-                                                    data-app-id="<?php echo bees_encrypt($row['in_id']);?>">清空统计数据
-                                            </button>
+    function index()
+    {
+        $id = bees_decrypt(SafeRequest("id", "get"));
+        $row = db('appid')->where('in_uid', $this->userid)->where('in_id', $id)->find();
+        $row || exit(include_once dirname(__FILE__) . '/../pack/error/404.php');
+        $sid = bees_encrypt($row['in_id']);
+        $start_date = SafeRequest("start_date", "get");
+        $end_date = SafeRequest("end_date", "get");
+        $starttime = $start_date . ' 00:00:00';
+        $endtime = $end_date . ' 23:59:59';
+        $specified = '';
+        if (!empty($start_date) && !empty($end_date)) {
+            $specified = "addtime>'" . $starttime . "' and addtime<'" . $endtime . "' ";
+        }
+        $total = db('downhistory')->where($specified)->where('appid', $id)->where('uid', $this->userid)->count();
+        $num = 10;
+        $cpage = isset($_GET['page']) ? $_GET['page'] : 1;
+        $pagenum = ceil($total / $num);
+        $offset = ($cpage - 1) * $num;
+        $result = db('downhistory')->where($specified)->where('appid', $id)->where('uid', $this->userid)->order('addtime desc')->limit($offset, $num)->select();
+        $start = $offset + 1;
+        $end = $cpage == $pagenum ? $total : $cpage * $num;
+        $next = $cpage == $pagenum ? 0 : $cpage + 1;
+        $prev = $cpage == 1 ? 0 : $cpage - 1;
+        ?>
+<!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_();
+        ?>
+</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.datetimepicker.js?20190530"></script>
+    <script src="/static/index/js/bootstrap-paginator.js"></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);
+                                    ?>
+                                <hr>
+                                <div class="download-details">
+                                    <div class="d-top clearfix">
+                                        <div class="date date1">
+                                            <input class="form-control" type="text" id="datetimepicker1" value="<?php 
+                                                if (empty($start_date)) {
+                                                    ?><?php echo date(" Y/m/d", strtotime(date("Y/m/d") . '-1 week' ));?>
+                                                <?php 
+                                                } else {
+                                                    ?>
+                                                <?php echo $start_date;?>
+                                                <?php 
+                                                }
+                                                ?>">
+                                            <span class="iconfont icon-date"></span>
+                                        </div>
+                                        <div class="fl line">
+                                            _
                                         </div>
-                                        <div class="table-responsive">
-                                            <table class="table">
-                                                <tr>
-                                                    <th>
-                                                        时间
-                                                    </th>
-                                                    <th>
-                                                        应用名称
-                                                    </th>
-                                                    <th>
-                                                        版本
-                                                    </th>
-                                                    <th>
-                                                        大小
-                                                    </th>
-                                                    <th>
-                                                        浏览次数
-                                                    </th>
-                                                    <th>
-                                                        下载次数
-                                                    </th>
-                                                </tr>
+                                        <div class="date date2">
+                                            <input class="form-control" type="text" id="datetimepicker2" value="<?php 
+                                                if (empty($end_date)) {
+                                                    ?><?php echo date(" Y/m/d");?>
                                                 <?php 
-		foreach ($result as $key => $value) {
-			?>                                                    <tr>
-                                                        <td>
-                                                            <?php echo $value['addtime'];?>                                                        </td>
-                                                        <td>
-                                                            <?php echo $value['appname'];?>                                                        </td>
-                                                        <td>
-                                                            <?php echo $value['appversion'];?>                                                        </td>
-                                                        <td>
-                                                            <?php echo formatsize($value['appsize']);?>                                                        </td>
-                                                        <td>
-                                                            <?php echo $value['liulan'];?>                                                        </td>
-                                                        <td>
-                                                            <?php echo $value['down'];?>                                                        </td>
-                                                    </tr>
+                                                } else {
+                                                    ?>
+                                                <?php echo $end_date;?>
                                                 <?php 
-		}
-		?>                                            </table>
-                                            <?php 
-		if ($total == 0) {
-			?>                                                <div class="text-center no-content">
-                                                    <img src="/static/index/image/invoice-1.png" alt="">
-                                                    <p class="color-333 mt10">
-                                                        暂无任何数据
-                                                    </p>
-                                                </div>
-                                            <?php 
-		}
-		?>                                        </div>
+                                                }
+                                                ?>">
+                                            <span class="iconfont icon-date"></span>
+                                        </div>
+                                        <button type="button" class="ms-btn ms-btn-secondary fl query">查询</button>
+                                        <span class="fl num">累计总下载 <i>
+                                                <?php echo $row['in_downloads'];?>
+                                            </i> 次</span>
+                                        <button type="button" class="ms-btn ms-btn-secondary fr cleanUp"
+                                            data-app-id="<?php echo bees_encrypt($row['in_id']);?>">清空统计数据
+                                        </button>
+                                    </div>
+                                    <div class="table-responsive">
+                                        <table class="table">
+                                            <tr>
+                                                <th>时间</th>
+                                                <th>应用名称</th>
+                                                <th>版本</th>
+                                                <th>大小</th>
+                                                <th>浏览次数</th>
+                                                <th>下载次数</th>
+                                            </tr>
+                                            <?php 
+                                                foreach ($result as $key => $value) {
+                                                    ?>
+                                            <tr>
+                                                <td><?php echo $value['addtime'];?></td>
+                                                <td><?php echo $value['appname'];?></td>
+                                                <td><?php echo $value['appversion'];?></td>
+                                                <td><?php echo formatsize($value['appsize']);?></td>
+                                                <td><?php echo $value['liulan'];?></td>
+                                                <td><?php echo $value['down'];?></td>
+                                            </tr>
+                                            <?php 
+                                                }
+                                                ?>
+                                        </table>
+                                        <?php 
+                                            if ($total == 0) {
+                                                ?>
+                                        <div class="text-center no-content">
+                                            <img src="/static/index/image/invoice-1.png" alt="">
+                                            <p class="color-333 mt10">
+                                                暂无任何数据
+                                            </p>
+                                        </div>
                                         <?php 
-		if ($pagenum != 1) {
-			?>                                            <?php 
-			if ($total !== 0) {
-				?>                                                <?php 
-				if (empty($start_date)) {
-					?>                                                    <div style="text-align: center"><ul id="pager" class="pagination"><li><a>共<b><?php echo $total;?></b>条记录</b> <?php echo $cpage;?>/<?php echo $pagenum;?></a></li><?php 
-					if ($cpage == 1) {
-						?><li class='active'><a>首页</a></li><?php 
-					} else {
-						?><li><a href='?page=1&id=<?php echo $sid;?>'>首页</a></li><?php 
-					}
-					if ($prev) {
-						?><li><a href='?page=<?php echo $prev;?>&id=<?php echo $sid;?>'>上一页</a></li><?php 
-					} else {
-					}
-					if ($next) {
-						?><li><a href='?page=<?php echo $next;?>&id=<?php echo $sid;?>'>下一页</a></li><?php 
-					} else {
-					}
-					if ($cpage == $pagenum) {
-						?><li class='active'><a>尾页</a></li><?php 
-					} else {
-						?><li><a href='?page=<?php echo $pagenum;?>&id=<?php echo $sid;?>'>尾页</a></li><?php 
-					}
-					?></ul></div>                                                <?php 
-				} else {
-					?>                                                    <div style="text-align: center"><ul id="pager" class="pagination"><li><a>共<b><?php echo $total;?></b>条记录</b> <?php echo $cpage;?>/<?php echo $pagenum;?></a></li><?php 
-					if ($cpage == 1) {
-						?><li class='active'><a>首页</a></li><?php 
-					} else {
-						?><li><a href='?page=1&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>首页</a></li><?php 
-					}
-					if ($prev) {
-						?><li><a href='?page=<?php echo $prev;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>上一页</a></li><?php 
-					} else {
-					}
-					if ($next) {
-						?><li><a href='?page=<?php echo $next;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>下一页</a></li><?php 
-					} else {
-					}
-					if ($cpage == $pagenum) {
-						?><li class='active'><a>尾页</a></li><?php 
-					} else {
-						?><li><a href='?page=<?php echo $pagenum;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>尾页</a></li><?php 
-					}
-					?></ul></div>                                                <?php 
-				}
-				?>                                            <?php 
-			}
-			?>                                        <?php 
-		}
-		?>                                    </div>
+                                            }
+                                            ?>
+                                    </div>
+                                    <?php 
+                                        if ($pagenum != 1) {
+                                            ?>
+                                    <?php 
+                                            if ($total !== 0) {
+                                                ?>
+                                    <?php 
+                                                if (empty($start_date)) {
+                                                    ?>
+                                    <div style="text-align: center">
+                                        <ul id="pager" class="pagination">
+                                            <li><a>共<b>
+                                                        <?php echo $total;?>
+                                                    </b>条记录</b>
+                                                    <?php echo $cpage;?>/
+                                                    <?php echo $pagenum;?>
+                                                </a></li>
+                                            <?php 
+                                                if ($cpage == 1) {
+                                                    ?>
+                                            <li class='active'><a>首页</a></li>
+                                            <?php 
+                                                } else {
+                                                    ?>
+                                            <li><a href='?page=1&id=<?php echo $sid;?>'>首页</a></li>
+                                            <?php 
+                                                }
+                                                if ($prev) {
+                                                    ?>
+                                            <li><a href='?page=<?php echo $prev;?>&id=<?php echo $sid;?>'>上一页</a></li>
+                                            <?php 
+                                                } else {
+                                                }
+                                                if ($next) {
+                                                    ?>
+                                            <li><a href='?page=<?php echo $next;?>&id=<?php echo $sid;?>'>下一页</a></li>
+                                            <?php 
+                                                } else {
+                                                }
+                                                if ($cpage == $pagenum) {
+                                                    ?>
+                                            <li class='active'><a>尾页</a></li>
+                                            <?php 
+                                                } else {
+                                                    ?>
+                                            <li><a href='?page=<?php echo $pagenum;?>&id=<?php echo $sid;?>'>尾页</a></li>
+                                            <?php 
+                                                }
+                                                ?>
+                                        </ul>
+                                    </div>
+                                    <?php 
+                                                } else {
+                                                    ?>
+                                    <div style="text-align: center">
+                                        <ul id="pager" class="pagination">
+                                            <li><a>共<b>
+                                                        <?php echo $total;?>
+                                                    </b>条记录</b>
+                                                    <?php echo $cpage;?>/
+                                                    <?php echo $pagenum;?>
+                                                </a></li>
+                                            <?php 
+                                                if ($cpage == 1) {
+                                                    ?>
+                                            <li class='active'><a>首页</a></li>
+                                            <?php 
+                                                } else {
+                                                    ?>
+                                            <li><a
+                                                    href='?page=1&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>首页</a>
+                                            </li>
+                                            <?php 
+                                                }
+                                                if ($prev) {
+                                                    ?>
+                                            <li><a
+                                                    href='?page=<?php echo $prev;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>上一页</a>
+                                            </li>
+                                            <?php 
+                                                } else {
+                                                }
+                                                if ($next) {
+                                                    ?>
+                                            <li><a
+                                                    href='?page=<?php echo $next;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>下一页</a>
+                                            </li>
+                                            <?php 
+                                                } else {
+                                                }
+                                                if ($cpage == $pagenum) {
+                                                    ?>
+                                            <li class='active'><a>尾页</a></li>
+                                            <?php 
+                                                } else {
+                                                    ?>
+                                            <li><a
+                                                    href='?page=<?php echo $pagenum;?>&id=<?php echo $sid;?>&start_date=<?php echo $start_date;?>&end_date=<?php echo $end_date;?>'>尾页</a>
+                                            </li>
+                                            <?php 
+                                                }
+                                                ?>
+                                        </ul>
+                                    </div>
+                                    <?php 
+                                                }
+                                                ?>
+                                    <?php 
+                                            }
+                                            ?>
+                                    <?php 
+                                        }
+                                        ?>
                                 </div>
                             </div>
                         </div>
@@ -210,35 +273,37 @@ class publish_statistics extends BaseUser
                 </div>
             </div>
         </div>
-        <?php 
-		$this->inc_merge();
-		?>        <script>
-            $(function () {
-                $(".download-details div:first").on('click', '.query', function () {
-                    var start_date = $(this).parent().find("input:first").val();
-                    var end_date = $(this).parent().find("input:last").val();
-                    window.location.href = "/index/publish_statistics?id=<?php echo bees_encrypt($row['in_id']);?>&start_date=" + start_date + "&end_date=" + end_date + "&page=1";
-                });
-                $(".download-details div:first").on('click', '.cleanUp', function () {
-                    var appId = $(this).data('app-id');
-                    alert('确认清空统计数据吗?', function () {
-                        $.post('/index/ajax_profile/cleanStatistics', {appId: appId}, function (data) {
-                            if (data.code == 200) {
-                                window.location.reload();
-                            } else {
-                                alert(data.msg);
-                            }
-                        }, 'json')
-                    }, function () {
-                    }, 'center', '确定', '取消');
-                });
-            })
-        </script>
-        <?php 
-		$this->footer();
-		?>        </body>
-        </html>
-
-        <?php 
-	}
+    </div>
+    <?php 
+        $this->inc_merge();
+        ?>
+    <script>
+        $(function () {
+            $(".download-details div:first").on('click', '.query', function () {
+                var start_date = $(this).parent().find("input:first").val();
+                var end_date = $(this).parent().find("input:last").val();
+                window.location.href = "/index/publish_statistics?id=<?php echo bees_encrypt($row['in_id']);?>&start_date=" + start_date + "&end_date=" + end_date + "&page=1";
+            });
+            $(".download-details div:first").on('click', '.cleanUp', function () {
+                var appId = $(this).data('app-id');
+                alert('确认清空统计数据吗?', function () {
+                    $.post('/index/ajax_profile/cleanStatistics', { appId: appId }, function (data) {
+                        if (data.code == 200) {
+                            window.location.reload();
+                        } else {
+                            alert(data.msg);
+                        }
+                    }, 'json')
+                }, function () {
+                }, 'center', '确定', '取消');
+            });
+        })
+    </script>
+    <?php 
+        $this->footer();
+        ?>
+</body>
+</html>
+<?php 
+    }
 }

+ 1 - 1
source/index/publish_success.php

@@ -149,7 +149,7 @@ class publish_success extends BaseUser
                                     class="ms-btn ms-btn-secondary"><span class="iconfont icon-download"></span>查看下载页面</a>
                                 <a href="/index/publish/apps" class="ms-btn ms-btn-secondary"><span
                                         class="iconfont icon-upload1"></span>继续上传</a>
-                                <a href="/index/publish_setting?id=<?php echo bees_encrypt($row['in_id']); ?>"
+                                <a href="/index/publish_detail?id=<?php echo bees_encrypt($row['in_id']); ?>"
                                     class="ms-btn ms-btn-secondary"><span class="iconfont icon-set"></span>APP设置</a>
                             </div>
                         </div>

+ 305 - 0
source/index/publish_tab_advanced.php

@@ -0,0 +1,305 @@
+<?php
+// 高级设置表单内容
+// 从 publish_setting.php 复制的高级设置部分
+
+// 获取应用信息
+$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");
+?>
+
+<div class="senior">
+    <!-- 信任教程设置 -->
+    <div class="form-group clearfix" <?php echo $row["in_form"] == "iOS" && $this->action != "super" ? "" : "style=\"display:none\""; ?>>
+        <label class="control-label col-sm-1">信任教程</label>
+        <div class="col-sm-6">
+            <ul class="clearfix trust in_tutorial">
+                <li class="clearfix <?php if ($row["in_tutorial"] == 1) { ?>active<?php } ?>" data-value="1">
+                    <span class="icon icon-radio fl <?php if ($row["in_tutorial"] == 1) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">显示</span>
+                </li>
+                <li class="clearfix <?php if ($row["in_tutorial"] == 0) { ?>active<?php } ?>" data-value="0">
+                    <span class="icon icon-radio fl <?php if ($row["in_tutorial"] == 0) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">不显示</span>
+                </li>
+            </ul>
+        </div>
+        <input type="hidden" name="show_guide" value="<?php echo $row["in_tutorial"]; ?>">
+    </div>
+
+    <!-- 下载池设置 -->
+    <div class="form-group clearfix" <?php echo $this->action == "super" ? "" : "style=\"display:none\""; ?>>
+        <label class="control-label col-sm-1">下载池</label>
+        <div class="col-sm-6">
+            <ul class="clearfix trust in_private">
+                <li class="clearfix <?php if ($row["in_private"] == 0) { ?>active<?php } ?>">
+                    <span class="icon icon-radio fl <?php if ($row["in_private"] == 0) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">公有</span>
+                </li>
+                <li class="clearfix <?php if ($row["in_private"] == 1) { ?>active<?php } ?>">
+                    <span class="icon icon-radio fl <?php if ($row["in_private"] == 1) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">私有</span>
+                </li>
+            </ul>
+        </div>
+        <input type="hidden" name="in_private" value="<?php echo $row["in_private"]; ?>">
+    </div>
+
+    <!-- 下载方式设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">下载方式</label>
+        <div class="col-sm-10">
+            <ul class="clearfix download-way">
+                <li class="clearfix <?php if (empty($row["in_use_auth_code"]) && empty($row["in_apppwd"])) { ?>active<?php } ?>" data-value="0">
+                    <span class="icon icon-radio <?php if (empty($row["in_use_auth_code"]) && empty($row["in_apppwd"])) { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">公开安装</span>
+                </li>
+                <li class="clearfix <?php if (empty($row["in_use_auth_code"]) && $row["in_apppwd"]) { ?>active<?php } ?>" data-value="1">
+                    <span class="icon icon-radio <?php if (empty($row["in_use_auth_code"]) && $row["in_apppwd"]) { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">密码安装</span>
+                </li>
+                <li class="clearfix <?php if ($row["in_use_auth_code"]) { ?>active<?php } ?>" data-value="2" <?php echo $this->action == "super" ? "" : "style=\"display:none\""; ?>>
+                    <span class="icon icon-radio <?php if ($row["in_use_auth_code"]) { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">授权码安装</span>
+                </li>
+                <input type="hidden" name="in_use_auth_code" value="<?php echo $row["in_use_auth_code"]; ?>">
+            </ul>
+        </div>
+    </div>
+
+    <!-- 下载密码设置 -->
+    <div id="apppwd" class="form-group clearfix" <?php if (empty($row["in_apppwd"])) { ?> style="display: none;" <?php } ?>>
+        <label class="control-label col-sm-1">下载密码</label>
+        <div class="col-sm-6">
+            <input id="password" name="password" class="form-control" autocomplete="false" type="text" placeholder="请输入下载密码" value="">
+        </div>
+    </div>
+
+    <!-- 购码地址设置 -->
+    <div class="form-group clearfix auth_code_dispense_url" <?php if (empty($row["in_use_auth_code"]) || $this->action != "super") { ?> style="display: none;" <?php } ?>>
+        <label class="control-label col-sm-1">购码地址</label>
+        <div class="col-sm-6">
+            <input id="auth_code_dispense_url" name="auth_code_dispense_url" class="form-control" autocomplete="false" type="text" placeholder="默认留空,在平台购卡,也可自定义填写" value="<?php echo $row["auth_code_dispense_url"]; ?>">
+        </div>
+    </div>
+
+    <!-- 验证码设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">验证码</label>
+        <div class="col-sm-6">
+            <ul class="clearfix trust in_captcha">
+                <li class="clearfix <?php if ($row["in_captcha"] == 0) { ?>active<?php } ?>" data-value="0">
+                    <span class="icon icon-radio fl <?php if ($row["in_captcha"] == 0) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">不启用</span>
+                </li>
+                <li class="clearfix <?php if ($row["in_captcha"] == 1) { ?>active<?php } ?>" data-value="1">
+                    <span class="icon icon-radio fl <?php if ($row["in_captcha"] == 1) { ?>icon-radio-checked<?php } ?>"></span>
+                    <span class="fl">启用</span>
+                </li>
+            </ul>
+        </div>
+        <input type="hidden" name="in_captcha" value="<?php echo $row["in_captcha"]; ?>">
+    </div>
+
+    <!-- 下载限制设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">下载限制</label>
+        <div class="col-sm-6">
+            <input id="limit_num" name="limit_num" class="form-control" type="text" placeholder="请输入限制下载次数,不填或填0表示不限制" value="<?php echo $row["in_applimit"]; ?>">
+        </div>
+    </div>
+
+    <!-- 联系方式设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">联系方式</label>
+        <div class="col-sm-6">
+            <input id="qq" name="qq" class="form-control" type="text" placeholder="请输入微信/QQ/手机号(格式:微信 123456696)" value="<?php echo $row["in_contact"]; ?>">
+        </div>
+    </div>
+
+    <!-- 苹果商店地址设置 -->
+    <?php if ($row["in_form"] == "iOS") { ?>
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">苹果商店地址</label>
+        <div class="col-sm-6">
+            <input class="form-control" autocomplete="false" id="appstore_url" name="appstore_url" value="<?php echo $row["in_appstore"]; ?>" placeholder="请输入苹果商店地址">
+        </div>
+    </div>
+    <?php } ?>
+
+    <!-- 备注设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">备注</label>
+        <div class="col-sm-6">
+            <input class="form-control" type="text" placeholder="请输入备注说明" name="remark" value="<?php echo $row["in_remark"]; ?>">
+        </div>
+    </div>
+
+    <!-- 应用介绍设置 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">应用介绍</label>
+        <div class="col-sm-6">
+            <textarea class="form-control" rows="4" type="text" placeholder="请输入应用介绍" id="app_intro" name="app_intro" style="width:500px;height:200px;"><?php echo $row["in_appintro"]; ?></textarea>
+        </div>
+    </div>
+
+    <!-- 保存按钮 -->
+    <div class="form-group clearfix">
+        <input type="hidden" name="id" value="<?php echo bees_encrypt($row["in_id"]); ?>" />
+        <label class="control-label col-sm-1"></label>
+        <div class="col-sm-6">
+            <button id="submitAdvancedButton" type="button" class="btn-apps-save">
+                保存
+            </button>
+        </div>
+    </div>
+</div>
+
+<!-- 成功提示模态框 -->
+<div class="modal fade ms-modal auto-hide-modal" id="msModalAdvancedSetting" tabindex="-1" role="dialog" style="display: none;">
+    <div class="modal-dialog modal-sm" role="document">
+        <div class="modal-content">
+            <div class="modal-body">
+                <div class="text-center">
+                    <div class="auto-hide">
+                        <span class="icon icon-modal-success3"></span>
+                        <div class="mt5">
+                            保存成功
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+// 高级设置相关的JavaScript逻辑
+$(document).ready(function() {
+    // 设置初始值
+    $('#password').val('<?php echo $row["in_apppwd"]; ?>');
+    $('#appstore_url').val('<?php echo $row["in_appstore"]; ?>');
+
+    // 通用单选按钮点击事件处理函数
+    function handleRadioClick(container, valueField) {
+        container.find('li').click(function() {
+            // 移除所有active类和icon-radio-checked类
+            container.find('li').removeClass('active');
+            container.find('li .icon-radio').removeClass('icon-radio-checked');
+            
+            // 添加active类和icon-radio-checked类到当前点击的元素
+            $(this).addClass('active');
+            $(this).find('.icon-radio').addClass('icon-radio-checked');
+            
+            // 更新隐藏字段的值
+            if (valueField) {
+                var val = $(this).data('value') !== undefined ? $(this).data('value') : $(this).index();
+                $(valueField).val(val);
+            }
+        });
+    }
+
+    // 信任教程点击事件
+    handleRadioClick($(".senior .in_tutorial"), "input[name='show_guide']");
+
+    // 下载池点击事件
+    handleRadioClick($(".senior .in_private"), "input[name='in_private']");
+
+    // 验证码点击事件
+    handleRadioClick($(".senior .in_captcha"), "input[name='in_captcha']");
+
+    // 下载方式点击事件
+    $(".senior .download-way li").click(function() {
+        // 移除所有active类和icon-radio-checked类
+        $(".senior .download-way li").removeClass('active');
+        $(".senior .download-way li .icon-radio").removeClass('icon-radio-checked');
+        
+        // 添加active类和icon-radio-checked类到当前点击的元素
+        $(this).addClass('active');
+        $(this).find('.icon-radio').addClass('icon-radio-checked');
+        
+        var val = $(this).data('value');
+        $("input[name='in_use_auth_code']").val(val);
+        
+        if (val == 1) {
+            $('#apppwd').show();
+        } else {
+            $('#apppwd').hide();
+            $("input[name='password']").val('');
+        }
+        if (val == 2) {
+            $("input[name='in_use_auth_code']").val(1);
+            $('.auth_code_dispense_url').show();
+        } else {
+            $("input[name='in_use_auth_code']").val(0);
+            $('.auth_code_dispense_url').hide();
+        }
+    });
+
+    // 修改按钮事件
+    $('#modifyBtn').click(function() {
+        $('#appstore_url').removeAttr("readonly");
+        return false;
+    });
+
+    $('#modifyPassword').click(function() {
+        $('#password').removeAttr("readonly");
+        return false;
+    });
+
+    // 保存按钮点击事件
+    $('#submitAdvancedButton').click(function() {
+        // 创建临时表单进行提交,包含所有必要的参数
+        var formData = {
+            id: $('input[name="id"]').val(),
+            // 保持基本设置字段的默认值
+            app_name: '<?php echo addslashes($row["in_name"]); ?>',
+            url: '<?php echo $row["in_link"]; ?>',
+            // 高级设置字段
+            show_guide: $("input[name='show_guide']").val(),
+            in_private: $("input[name='in_private']").val(),
+            in_use_auth_code: $("input[name='in_use_auth_code']").val(),
+            password: $('#password').val(),
+            auth_code_dispense_url: $('#auth_code_dispense_url').val(),
+            in_captcha: $("input[name='in_captcha']").val(),
+            limit_num: $('#limit_num').val(),
+            qq: $('#qq').val(),
+            appstore_url: $('#appstore_url').val(),
+            remark: $('input[name="remark"]').val(),
+            app_intro: $('#app_intro').val(),
+            // 保持模板设置字段的默认值
+            template_language: '<?php echo $row["template_language"]; ?>',
+            template: '<?php echo $row["template"]; ?>'
+        };
+        
+        $.ajax({
+            url: '/index/ajax_profile/edit',
+            type: 'POST',
+            data: formData,
+            dataType: 'json',
+            success: function(data) {
+                if (data.code != 200) {
+                    alert(data.msg);
+                } else {
+                    $("#msModalAdvancedSetting").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text("保存成功");
+                    autoHideModal('#msModalAdvancedSetting', 3000);
+                }
+            },
+            error: function() {
+                alert('保存失败,请重试');
+            }
+        });
+    });
+});
+
+// 自动隐藏模态框函数
+function autoHideModal(obj1, time) {
+    var autoHide = null;
+    clearTimeout(autoHide);
+    $(obj1).modal('show');
+    $(".modal-backdrop").hide();
+    autoHide = setTimeout(function() {
+        $(obj1).modal("hide");
+    }, time);
+}
+</script> 

+ 149 - 0
source/index/publish_tab_basic.php

@@ -0,0 +1,149 @@
+<?php
+// 基本设置表单内容
+// 从 publish_setting.php 复制的基本设置部分
+
+// 获取应用信息
+$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");
+$ssl = is_ssl() ? "https://" : "http://";
+$link = $ssl . $_SERVER["HTTP_HOST"] . IN_PATH;
+?>
+
+<div class="basic" style="display: block;">
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1"><span>*</span>应用名称</label>
+        <div class="col-sm-6">
+            <input id="app_name" name="app_name" class="form-control"
+                type="text" placeholder="APP的名字"
+                value="<?php echo $row["in_name"]; ?>">
+        </div>
+    </div>
+    <div class="form-group clearfix short-link">
+        <label class="control-label col-sm-1"><span>*</span>短链接</label>
+        <div class="col-sm-6 clearfix link-wrap">
+            <div class="link"><?php echo $link; ?></div>
+            <div class="link-input">
+                <input id="url" name="url" class="form-control"
+                    type="text"
+                    placeholder="例如:abcdef"
+                    value="<?php echo $row["in_link"]; ?>">
+            </div>
+        </div>
+    </div>
+    
+    <!-- 保存按钮 -->
+    <div class="form-group clearfix">
+        <input type="hidden" name="id" value="<?php echo bees_encrypt($row["in_id"]); ?>" />
+        <label class="control-label col-sm-1"></label>
+        <div class="col-sm-6">
+            <button id="submitBasicButton" type="button" class="btn-apps-save">
+                保存
+            </button>
+        </div>
+    </div>
+</div>
+
+<!-- 成功提示模态框 -->
+<div class="modal fade ms-modal auto-hide-modal" id="msModalBasicSetting" tabindex="-1" role="dialog" style="display: none;">
+    <div class="modal-dialog modal-sm" role="document">
+        <div class="modal-content">
+            <div class="modal-body">
+                <div class="text-center">
+                    <div class="auto-hide">
+                        <span class="icon icon-modal-success3"></span>
+                        <div class="mt5">
+                            保存成功
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+// 基本设置相关的JavaScript逻辑
+$(document).ready(function() {
+    // 应用名称焦点事件
+    $('#app_name').focus(function() {
+        $('.appname-danger').show();
+    }).blur(function() {
+        $('.appname-danger').hide();
+    });
+
+    // 短链接焦点事件
+    $('#url').focus(function() {
+        $('.url-danger').show();
+    }).blur(function() {
+        $('.url-danger').hide();
+    });
+
+    // 修改短链接按钮
+    $('#modifyUrl').click(function() {
+        $('#url').removeAttr("readonly");
+        return false;
+    });
+
+    // 设置初始值
+    $('#url').val('<?php echo $row["in_link"]; ?>');
+    
+    // 保存按钮点击事件
+    $('#submitBasicButton').click(function() {
+        // 创建临时表单进行提交,包含所有必要的参数
+        var formData = {
+            id: $('input[name="id"]').val(),
+            app_name: $('#app_name').val(),
+            url: $('#url').val(),
+            // 保持其他字段的默认值
+            show_guide: '<?php echo $row["in_tutorial"]; ?>',
+            in_private: '<?php echo $row["in_private"]; ?>',
+            in_use_auth_code: '<?php echo $row["in_use_auth_code"]; ?>',
+            password: '<?php echo $row["in_apppwd"]; ?>',
+            auth_code_dispense_url: '<?php echo $row["auth_code_dispense_url"]; ?>',
+            in_captcha: '<?php echo $row["in_captcha"]; ?>',
+            limit_num: '<?php echo $row["in_applimit"]; ?>',
+            qq: '<?php echo $row["in_contact"]; ?>',
+            appstore_url: '<?php echo $row["in_appstore"]; ?>',
+            remark: '<?php echo $row["in_remark"]; ?>',
+            app_intro: '<?php echo addslashes($row["in_appintro"]); ?>',
+            template_language: '<?php echo $row["template_language"]; ?>',
+            template: '<?php echo $row["template"]; ?>'
+        };
+        
+        $.ajax({
+            url: '/index/ajax_profile/edit',
+            type: 'POST',
+            data: formData,
+            dataType: 'json',
+            success: function(data) {
+                if (data.code != 200) {
+                    alert(data.msg);
+                } else {
+                    $("#msModalBasicSetting").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text("保存成功");
+                    autoHideModal('#msModalBasicSetting', 3000);
+                    
+                    // 保存成功后刷新整个页面
+                    setTimeout(function() {
+                        window.location.reload();
+                    }, 1000);
+                }
+            },
+            error: function() {
+                alert('保存失败,请重试');
+            }
+        });
+    });
+});
+
+// 自动隐藏模态框函数
+function autoHideModal(obj1, time) {
+    var autoHide = null;
+    clearTimeout(autoHide);
+    $(obj1).modal('show');
+    $(".modal-backdrop").hide();
+    autoHide = setTimeout(function() {
+        $(obj1).modal("hide");
+    }, time);
+}
+</script>

+ 123 - 0
source/index/publish_tab_download.php

@@ -0,0 +1,123 @@
+<?php
+// 获取应用ID
+$id = bees_decrypt(SafeRequest("id", "get"));
+$row = db('appid')->where('in_uid', $this->userid)->where('in_id', $id)->find();
+
+// 获取日期参数
+$start_date = SafeRequest("start_date", "get");
+$end_date = SafeRequest("end_date", "get");
+$starttime = $start_date . ' 00:00:00';
+$endtime = $end_date . ' 23:59:59';
+$specified = '';
+if (!empty($start_date) && !empty($end_date)) {
+    $specified = "addtime>'" . $starttime . "' and addtime<'" . $endtime . "' ";
+}
+
+// 查询下载记录 - 使用 paginate 方法
+$page = SafeRequest("page", "get");
+$result = db('downhistory')->where($specified)->where('appid', $id)->where('uid', $this->userid)->order('addtime desc')->paginate(["page" => $page, 'list_rows' => 5]);
+$render = $result->render();
+$count = $result->total();
+$sid = bees_encrypt($row['in_id']);
+?>
+
+<div class="download-details">
+    <div class="d-top clearfix">
+        <div class="date date1">
+            <input class="form-control" type="text" id="datetimepicker1" value="<?php if (empty($start_date)) { echo date("Y/m/d", strtotime(date("Y/m/d") . '-1 week')); } else { echo $start_date; } ?>">
+            <span class="iconfont icon-date"></span>
+        </div>
+        <div class="fl line">
+            _
+        </div>
+        <div class="date date2">
+            <input class="form-control" type="text" id="datetimepicker2" value="<?php if (empty($end_date)) { echo date("Y/m/d"); } else { echo $end_date; } ?>">
+            <span class="iconfont icon-date"></span>
+        </div>
+        <button type="button" class="ms-btn ms-btn-secondary fl query">查询</button>
+        <span class="fl num">累计总下载 <i>
+                <?php echo $row['in_downloads'];?>
+            </i> 次</span>
+        <button type="button" class="ms-btn ms-btn-secondary fr cleanUp"
+            data-app-id="<?php echo bees_encrypt($row['in_id']);?>">清空统计数据
+        </button>
+    </div>
+    <div class="table-responsive">
+        <table class="table">
+            <tbody>
+                <tr>
+                    <th>时间</th>
+                    <th>应用名称</th>
+                    <th>版本</th>
+                    <th>大小</th>
+                    <th>浏览次数</th>
+                    <th>下载次数</th>
+                </tr>
+                <?php 
+                foreach ($result as $key => $value) {
+                ?>
+                <tr>
+                    <td><?php echo $value['addtime'];?></td>
+                    <td><?php echo $value['appname'];?></td>
+                    <td><?php echo $value['appversion'];?></td>
+                    <td><?php echo formatsize($value['appsize']);?></td>
+                    <td><?php echo $value['liulan'];?></td>
+                    <td><?php echo $value['down'];?></td>
+                </tr>
+                <?php 
+                }
+                ?>
+            </tbody>
+            <tfoot>
+                <tr>
+                    <td colspan="6"><?php echo getRender($result, $page); ?></td>
+                </tr>
+            </tfoot>
+        </table>
+        <?php 
+        if ($count == 0) {
+        ?>
+        <div class="text-center no-content">
+            <img src="/static/index/image/invoice-1.png" alt="">
+            <p class="color-333 mt10">
+                暂无任何数据
+            </p>
+        </div>
+        <?php 
+        }
+        ?>
+    </div>
+</div>
+
+<script>
+$(function () {
+    // 初始化日期选择器
+    $('#datetimepicker1, #datetimepicker2').datetimepicker({
+        format: 'Y/m/d',
+        timepicker: false,
+        datepicker: true
+    });
+    
+    // 查询按钮点击事件
+    $(".download-details div:first").on('click', '.query', function () {
+        var start_date = $(this).parent().find("input:first").val();
+        var end_date = $(this).parent().find("input:last").val();
+        window.location.href = "/index/publish_detail?id=<?php echo bees_encrypt($row['in_id']);?>&tab=download&start_date=" + start_date + "&end_date=" + end_date + "&page=1";
+    });
+    
+         // 清空统计数据按钮点击事件
+     $(".download-details div:first").on('click', '.cleanUp', function () {
+         var appId = $(this).data('app-id');
+         alert('确认清空统计数据吗?', function () {
+             $.post('/index/ajax_profile/cleanStatistics', { appId: appId }, function (data) {
+                 if (data.code == 200) {
+                     window.location.reload();
+                 } else {
+                     alert(data.msg);
+                 }
+             }, 'json')
+         }, function () {
+         }, 'center', '确定', '取消');
+     });
+});
+</script>

+ 166 - 0
source/index/publish_tab_template.php

@@ -0,0 +1,166 @@
+<?php
+// 模板设置表单内容
+// 从 publish_setting.php 复制的模板设置部分
+
+// 获取应用信息
+$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");
+?>
+
+<div class="download-template">
+    <!-- 设置语言 -->
+    <div class="form-group clearfix">
+        <label class="control-label col-sm-1">设置语言</label>
+        <div class="col-sm-10">
+            <ul class="clearfix template-language radio-round">
+                <li class="clearfix <?php if ($row["template_language"] == "zh") { ?>active<?php } ?>" data-language="zh">
+                    <span class="icon icon-radio <?php if ($row["template_language"] == "zh") { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">简体中文</span>
+                </li>
+                <li class="clearfix <?php if ($row["template_language"] == "en") { ?>active<?php } ?>" data-language="en">
+                    <span class="icon icon-radio <?php if ($row["template_language"] == "en") { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">English</span>
+                </li>
+                <li class="clearfix <?php if ($row["template_language"] == "zh-tw") { ?>active<?php } ?>" data-language="zh-tw">
+                    <span class="icon icon-radio <?php if ($row["template_language"] == "zh-tw") { ?>icon-radio-checked <?php } ?>fl"></span>
+                    <span class="fl">繁體中文</span>
+                </li>
+                <input type="hidden" name="template_language" value="<?php echo $row["template_language"]; ?>">
+            </ul>
+        </div>
+    </div>
+
+    <!-- 设置模板 -->
+    <div class="form-group">
+        <label class="control-label col-sm-1">设置模板</label>
+        <div class="col-sm-10">
+            <ul class="clearfix template-list">
+                <?php
+                foreach (range(1, 7) as $k => $v) {
+                ?>
+                <li class="<?php echo $row["template"] == $v ? "active" : ""; ?>">
+                    <div class="t-checked-wrap">
+                        <img src="/static/index/image/template-<?php echo $v; ?>.jpg" class="img-responsive">
+                        <div class="t-checked" style="<?php if ($row["template"] == $v) { ?>display: flex;<?php } ?>"></div>
+                    </div>
+                    <a style="display: none;" href="/index/template/<?php echo bees_encrypt($row["in_id"]); ?>/tmp<?php echo $v; ?>" target="_blank" class="text">预览</a>
+                    <input type="radio" name="template" value="<?php echo $v; ?>" <?php if ($row["template"] == $v) { ?>checked<?php } ?> class="hidden">
+                </li>
+                <?php
+                }
+                ?>
+            </ul>
+        </div>
+    </div>
+
+    <!-- 保存按钮 -->
+    <div class="form-group clearfix">
+        <input type="hidden" name="id" value="<?php echo bees_encrypt($row["in_id"]); ?>" />
+        <label class="control-label col-sm-1"></label>
+        <div class="col-sm-6">
+            <button id="submitTemplateButton" type="button" class="btn-apps-save">
+                保存
+            </button>
+        </div>
+    </div>
+</div>
+
+<!-- 成功提示模态框 -->
+<div class="modal fade ms-modal auto-hide-modal" id="msModalTemplateSetting" tabindex="-1" role="dialog" style="display: none;">
+    <div class="modal-dialog modal-sm" role="document">
+        <div class="modal-content">
+            <div class="modal-body">
+                <div class="text-center">
+                    <div class="auto-hide">
+                        <span class="icon icon-modal-success3"></span>
+                        <div class="mt5">
+                            保存成功
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+// 模板设置相关的JavaScript逻辑
+$(document).ready(function() {
+    // 初始化单选按钮样式
+    tab.radioRound({
+        el: ".radio-round li",
+        checkedClass: "icon-radio-checked"
+    });
+
+    // 下载模板选中
+    $(".download-template ul li .t-checked-wrap").click(function() {
+        var i = $(this).parent().index();
+        $(".download-template ul li .t-checked-wrap").find(".t-checked").hide();
+        $(this).find(".t-checked").css("display", "flex");
+        $(".download-template ul li input[type=radio]").prop("checked", false);
+        $(this).parent("li").find("input[type=radio]").prop("checked", true);
+    });
+
+    // 设置模板页语言
+    $(".download-template .template-language li").click(function() {
+        var val = $(this).data('language');
+        $("input[name='template_language']").val(val);
+    });
+
+    // 保存按钮点击事件
+    $('#submitTemplateButton').click(function() {
+        // 创建临时表单进行提交,包含所有必要的参数
+        var formData = {
+            id: $('input[name="id"]').val(),
+            // 保持基本设置字段的默认值
+            app_name: '<?php echo addslashes($row["in_name"]); ?>',
+            url: '<?php echo $row["in_link"]; ?>',
+            // 保持高级设置字段的默认值
+            show_guide: '<?php echo $row["in_tutorial"]; ?>',
+            in_private: '<?php echo $row["in_private"]; ?>',
+            in_use_auth_code: '<?php echo $row["in_use_auth_code"]; ?>',
+            password: '<?php echo $row["in_apppwd"]; ?>',
+            auth_code_dispense_url: '<?php echo $row["auth_code_dispense_url"]; ?>',
+            in_captcha: '<?php echo $row["in_captcha"]; ?>',
+            limit_num: '<?php echo $row["in_applimit"]; ?>',
+            qq: '<?php echo $row["in_contact"]; ?>',
+            appstore_url: '<?php echo $row["in_appstore"]; ?>',
+            remark: '<?php echo $row["in_remark"]; ?>',
+            app_intro: '<?php echo addslashes($row["in_appintro"]); ?>',
+            // 模板设置字段
+            template_language: $("input[name='template_language']").val(),
+            template: $("input[name='template']:checked").val()
+        };
+        
+        $.ajax({
+            url: '/index/ajax_profile/edit',
+            type: 'POST',
+            data: formData,
+            dataType: 'json',
+            success: function(data) {
+                if (data.code != 200) {
+                    alert(data.msg);
+                } else {
+                    $("#msModalTemplateSetting").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text("保存成功");
+                    autoHideModal('#msModalTemplateSetting', 3000);
+                }
+            },
+            error: function() {
+                alert('保存失败,请重试');
+            }
+        });
+    });
+});
+
+// 自动隐藏模态框函数
+function autoHideModal(obj1, time) {
+    var autoHide = null;
+    clearTimeout(autoHide);
+    $(obj1).modal('show');
+    $(".modal-backdrop").hide();
+    autoHide = setTimeout(function() {
+        $(obj1).modal("hide");
+    }, time);
+}
+</script>

+ 186 - 0
source/index/publish_tab_version.php

@@ -0,0 +1,186 @@
+<?php
+// 应用版本列表查询逻辑
+$page = SafeRequest("page", "get");
+$result = db("app")->where("in_uid", $this->userid)->where("in_appid", $id)->order("in_addtime desc")->paginate(["page" => $page, 'list_rows' => 5]);
+$render = $result->render();
+$count = $result->total();
+$del_vid = 0;
+if ($count > 3) {
+    $del_vid = db("app")->where("in_uid", $this->userid)->where("in_appid", $id)->order("in_addtime asc")->value("in_id");
+}
+?>
+
+<div class="table-list">
+    <div class="table-responsive">
+        <table class="table version-history-table">
+            <tbody>
+                <tr>
+                    <th>版本</th>
+                    <th>大小</th>
+                    <th>证书名称</th>
+                    <th>更新说明</th>
+                    <th>更新时间</th>
+                    <th>操作</th>
+                </tr>
+                <?php
+                foreach ($result as $key => $value) {
+                ?> 
+                <tr>
+                    <td class="angle-parent">
+                        <?php
+                        if ($value["in_release"] == 1) {
+                        ?><img class="angle" src="/static/index/image/angle-1.png"><?php
+                        }
+                        ?>
+                        <?php echo $value["in_bsvs"]; ?> (Build <?php echo $value["in_bvs"]; ?>)
+                    </td>
+                    <td><?php echo formatsize($value["in_size"]); ?></td>
+                    <td>
+                        <?php
+                        if ($value["in_form"] == "iOS") {
+                        ?> 
+                        <div class="bundle-length" data-container="body"
+                             data-toggle="popover" data-placement="bottom"
+                             data-content="<?php echo $value["in_team"]; ?>"
+                             data-trigger="hover" data-original-title=""
+                             title="">
+                            <?php echo $value["in_team"]; ?>
+                        </div>
+                        <?php
+                        } else {
+                        ?> -
+                        <?php
+                        }
+                        ?>
+                    </td>
+                    <td>
+                        <?php
+                        if (empty($value["in_desc"])) {
+                        ?> -- --
+                        <?php
+                        } else {
+                        ?> <?php echo $value["in_desc"]; ?>
+                        <?php
+                        }
+                        ?>
+                    </td>
+                    <td><?php echo date("Y-m-d H:i:s", $value["in_addtime"]); ?></td>
+                    <td>
+                        <input name="history_id" type="hidden" value="<?php echo bees_encrypt($value["in_id"]); ?>">
+                        <?php
+                        if ($value["in_release"] != 1) {
+                        ?><a href="javascript:;" class="btn-fabu" title="发布">发布</a><?php
+                        }
+                        ?> 
+                        <a href="#" data-target="#updateModal" data-toggle="modal" class="btn-edit" title="编辑">编辑</a>
+                        <a href="<?php echo getapp_history($value["in_id"], 1); ?>" title="下载">下载</a>
+                        <?php
+                        if ($value["in_release"] != 1) {
+                        ?><a href="javascript:;" class="btn-shanchu" title="删除">删除</a><?php
+                        }
+                        ?>
+                    </td>
+                </tr>
+                <?php
+                }
+                ?>
+            </tbody>
+            <tfoot>
+                <tr>
+                    <td colspan="9"><?php echo getRender($result, $page); ?></td>
+                </tr>
+            </tfoot>
+        </table>
+    </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">&times;</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>
+
+<script>
+    var app_id = '<?php echo bees_encrypt($id);?>';
+    
+    // 发布功能
+    $('.btn-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');
+    });
+    
+    // 删除功能
+    $('.btn-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', '删除', '取消');
+    });
+    
+    // 编辑功能
+    $('.btn-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();
+                $.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');
+    });
+</script>

+ 82 - 0
static/index/css/apps-aside.css

@@ -0,0 +1,82 @@
+.release-app2>.row>.col-sm-2 {
+    background-color: transparent;
+}
+
+.aside-left {
+    background-color: #ffffff;
+}
+
+.aside-app-list {
+    max-height: calc(100vh - 300px);
+    overflow-y: auto;
+}
+
+.aside-app-list::-webkit-scrollbar {
+    width: 4px;
+    background-color: #e5e5e5;
+    border-radius: 2px;
+}
+
+.aside-app-list::-webkit-scrollbar-thumb {
+    background-color: #157df1;
+    border-radius: 2px;
+}
+
+.aside-app-list-tilte {
+    color: rgba(21, 21, 21, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 700;
+    font-style: Bold;
+    font-size: 14px;
+    line-height: 25.6px;
+    text-align: center;
+    margin-top: -6px;
+    margin-bottom: 14px;
+}
+
+aside.aside-left .aside-app-list li a {
+    display: flex;
+    align-items: center;
+    padding-left: 26px;
+}
+
+aside.aside-left .aside-app-list li a .app-img {
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    background-position: center;
+    width: 36px;
+    height: 36px;
+    border-radius: 8px;
+    margin-right: 12px;
+    flex-shrink: 0;
+}
+
+aside.aside-left .aside-app-list li a .app-info {
+    padding-right: 12px;
+    flex: 1;
+    min-width: 0;
+}
+
+aside.aside-left .aside-app-list li a .app-info .app-name-text {
+    color: rgba(21, 21, 21, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 700;
+    font-style: Bold;
+    font-size: 14px;
+    line-height: 15.4px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+aside.aside-left .aside-app-list li a .app-info .app-form-text {
+    color: rgba(143, 149, 159, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    font-size: 13px;
+    line-height: 13px;
+    margin-top: 4px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}

+ 757 - 0
static/index/css/apps-detail.css

@@ -0,0 +1,757 @@
+.app-details2 {
+    background-color: unset;
+}
+
+.app-details2 .details-top,
+.app-details2 .app-information,
+.app-details2 .tabs {
+    background-color: #ffffff;
+}
+
+.app-details .details-bottom table th .th-line {
+    border-left: unset;
+    height: 23px;
+    display: inline-block;
+    padding-left: unset;
+    color: rgba(21, 21, 21, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 23px;
+    vertical-align: middle;
+}
+
+.app-details2 .d-table-wrap table td {
+    padding: 0;
+}
+
+.app-details2 .d-table-wrap table td>div,
+.app-details2 .d-table-wrap table td>span,
+.app-details2 .d-table-wrap table td .test-download {
+    padding: 0;
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 23px;
+    vertical-align: middle;
+    color: rgba(143, 149, 159, 1);
+}
+
+.app-details2 .copy.top-5 {
+    color: rgba(33, 104, 251, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 13px;
+    line-height: 23px;
+    top: 0px;
+}
+
+.app-details2 .app-information .more-wrap img {
+    width: 50px;
+    height: 50px;
+    position: absolute;
+    left: 90px;
+    top: -30px;
+    transition: all 500ms;
+    background-color: #fff;
+}
+
+.app-details2 .app-information .more-wrap img {
+    width: 50px;
+    height: 50px;
+    position: absolute;
+    left: 82px;
+    top: -22px;
+    transition: all 500ms;
+    background-color: #fff;
+}
+
+/* 标签页样式 */
+.tabs {
+    margin: 12px 0;
+    padding: 10px 30px;
+}
+
+.tabs .nav-tabs {
+    border-bottom: 0 solid #e5e5e5;
+}
+
+.tabs .nav-tabs>li>a {
+    border: none;
+    padding: 12px 2px;
+    margin-right: 24px;
+    border-radius: 0;
+    color: rgba(143, 149, 159, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 15px;
+    line-height: 20px;
+}
+
+.tabs .nav-tabs>li>a:hover {
+    border: none;
+    background-color: #ffffff;
+    color: rgba(75, 132, 255, 1);
+}
+
+.tabs .nav-tabs>li.active>a,
+.tabs .nav-tabs>li.active>a:hover,
+.tabs .nav-tabs>li.active>a:focus {
+    border: none;
+    border-bottom: 2px solid rgba(75, 132, 255, 1);
+    color: rgba(75, 132, 255, 1);
+    font-weight: 700;
+}
+
+.tabs .tab-content {
+    padding: 24px 0 0 0;
+}
+
+.tabs .tab-pane {
+    min-height: 200px;
+}
+
+.app-details2 .table-list {
+    padding: 0;
+}
+
+/* 设置区域样式 */
+.settings-section {
+    margin-bottom: 30px;
+    padding: 20px;
+    background: #fff;
+    border: 1px solid #e5e5e5;
+    border-radius: 5px;
+}
+
+.section-title {
+    margin: 0 0 20px 0;
+    padding-bottom: 10px;
+    border-bottom: 1px solid #e5e5e5;
+    color: #333;
+    font-size: 16px;
+    font-weight: 600;
+}
+
+.section-title .iconfont {
+    margin-right: 8px;
+    color: #007AFF;
+}
+
+.form-group {
+    margin-bottom: 15px;
+}
+
+.form-group .control-label {
+    font-weight: 500;
+    color: #555;
+    margin-bottom: 5px;
+}
+
+.form-control-static {
+    color: #333;
+    padding: 8px 0;
+}
+
+.help-block {
+    margin-top: 5px;
+    color: #999;
+    font-size: 12px;
+}
+
+.text-muted {
+    color: #999;
+    text-align: center;
+    padding: 40px 0;
+}
+
+/* 通用icon样式 */
+.iconfont {
+    background: url(/static/index/image/inner-nav/icon1.svg) no-repeat center center;
+    background-size: 100% 100%;
+    width: 23px;
+    height: 23px;
+    display: inline-block;
+    vertical-align: middle;
+    position: absolute;
+    pointer-events: none;
+}
+
+.iconfont::before {
+    content: '';
+}
+
+.icon-date {
+    background-image: url(/static/index/image/my-app/icon-date.svg);
+    margin-right: 0;
+    top: 6px;
+    right: 12px;
+}
+
+/* 通用表格设置 */
+.table {
+    border: 1px solid #e5e5e5;
+}
+
+.table>tbody>tr>th {
+    background: rgba(245, 246, 247, 1);
+    height: 36px;
+    color: rgba(143, 149, 159, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 18px;
+    text-align: center;
+    vertical-align: middle !important;
+}
+
+.table>tbody>tr>td {
+    color: rgba(0, 0, 0, 1);
+    box-sizing: border-box;
+    padding: 0 15px !important;
+    height: 50px;
+    text-align: center;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    font-size: 14px;
+    line-height: 13px;
+    border-top: unset;
+    border-bottom: 1px solid rgba(232, 234, 236, 1);
+    vertical-align: middle !important;
+}
+
+.table>tfoot>tr>td {
+    padding: 0 15px !important;
+    vertical-align: middle !important;
+    text-align: center;
+}
+
+.table>tbody>tr:hover>td {
+    background-color: #ebf7ff;
+}
+
+.table>tbody>tr>td.angle-parent {
+    color: rgba(75, 132, 255, 1);
+}
+
+.table>tbody>tr>td>a {
+    color: rgba(33, 104, 251, 1);
+    font-weight: 500;
+    font-size: 14px;
+}
+
+.table>tbody>tr>td>a+a {
+    margin-left: 14px;
+}
+
+/* 翻页 */
+.pagination {
+    margin: 10px 0 10px;
+}
+
+.pagination>li>a,
+.pagination>li>span
+ {
+    color: rgba(33, 104, 251, 1);
+}
+
+.pagination>.active>a,
+.pagination>.active>a:focus,
+.pagination>.active>a:hover,
+.pagination>.active>span,
+.pagination>.active>span:focus,
+.pagination>.active>span:hover {
+    background-color: rgba(33, 104, 251, 1);
+    border-color: rgba(33, 104, 251, 1);
+}
+
+.pagination>li:first-child {
+    display: inline-block;
+    padding: 7px 12px;
+    background-color: transparent!important;
+    border: unset;
+    color: rgba(33, 104, 251, 1);
+    pointer-events: none;
+}
+
+/* 通用表单样式 */
+.form-group .control-label {
+    padding: 0;
+    margin-bottom: 0;
+    text-align: right;
+    color: rgba(0, 0, 0, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 30px;
+}
+
+.form-control {
+    border: 1px solid rgba(232, 234, 236, 1);
+    width: 512px;
+    height: 34px;
+    padding: 0 20px;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    font-size: 14px;
+    vertical-align: middle;
+    color: rgba(0, 0, 0, 1);
+}
+
+.form-control:focus {
+    border-color: #157df1;
+    outline: 0;
+    box-shadow: 0 0 0 2px rgba(21, 125, 241, 0.2);
+}
+
+.btn-apps-save {
+    background: rgba(33, 104, 251, 1);
+    line-height: 34px;
+    border-radius: 4px;
+    padding: 0 20px;
+    color: #ffffff;
+    border: unset;
+}
+
+/* 应用版本 */
+.app-details-update .form-control {
+    width: 450px;
+}
+
+/* 基本设置 - 表单样式 */
+.basic {
+    /* padding: 20px 0; */
+}
+
+.basic .form-group {
+    margin-bottom: 20px;
+}
+
+.basic .form-group .control-label {
+    width: 65px;
+}
+
+.basic .form-group .control-label span {
+    color: #ff4222;
+    margin-right: 2px;
+}
+
+.basic .short-link .link {
+    background: rgba(246, 248, 250, 1);
+    width: 278px;
+    height: 34px;
+    line-height: 34px;
+    padding-left: 20px;
+    color: rgba(0, 0, 0, 1);
+    font-size: 14px;
+}
+
+.basic .short-link .link-wrap {
+    display: flex;
+    width: 640px;
+}
+
+#url {
+    width: 234px;
+}
+
+.form-group ul li .icon.icon-radio {
+    background: url('/static/index/image/my-app/icon-radio-off.svg') no-repeat center;
+    background-size: 100% 100%;
+    width: 20px;
+    height: 20px;
+    margin-right: 12px;
+    top: 0;
+}
+
+.form-group ul li .icon.icon-radio-checked {
+    background-image: url('/static/index/image/my-app/icon-radio-on.svg');
+}
+
+/* 模态框样式 */
+.ms-modal .modal-sm {
+    width: 320px;
+}
+
+.ms-modal .modal-dialog {
+    margin-top: 100px;
+}
+
+.ms-modal .modal-body {
+    padding: 30px;
+}
+
+.ms-modal .modal-content {
+    border-radius: 8px;
+    border: none;
+    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
+}
+
+.auto-hide-modal .modal-content {
+    background-color: transparent;
+    box-shadow: none;
+    border: none;
+}
+
+.auto-hide-modal .auto-hide {
+    background-color: #666;
+    padding: 20px 25px;
+    border-radius: 5px;
+    display: inline-block;
+    color: #fff;
+    text-align: center;
+}
+
+.auto-hide .mt5 {
+    margin-top: 5px;
+    font-size: 14px;
+}
+
+/* 响应式样式 */
+@media (max-width: 768px) {
+    .basic .form-group .control-label {
+        text-align: left;
+        margin-bottom: 5px;
+    }
+
+    .basic .short-link .col-sm-6 {
+        margin-bottom: 10px;
+    }
+
+    .ms-modal .modal-dialog {
+        margin: 50px 15px 10px;
+    }
+}
+
+/* 高级设置样式 */
+
+.senior .form-group {
+    margin-bottom: 30px;
+}
+
+/* 单选按钮样式 */
+.senior .trust {
+    list-style: none;
+    padding: 0;
+    margin: 0;
+}
+
+.senior .trust li {
+    float: left;
+    margin-right: 56px;
+    cursor: pointer;
+    padding: 8px 0;
+    transition: all 0.3s ease;
+}
+
+.senior .trust li:hover {
+    color: #157df1;
+}
+
+.senior .trust li.active {
+    color: #157df1;
+}
+
+.senior .form-group .control-label {
+    width: 84px;
+}
+
+
+/* 下载方式样式 */
+.senior .download-way {
+    list-style: none;
+    padding: 0;
+    margin: 0;
+}
+
+.senior .download-way li {
+    float: left;
+    margin-right: 30px;
+    cursor: pointer;
+    padding: 10px 0;
+    transition: all 0.3s ease;
+}
+
+.senior .download-way li:hover {
+    color: #157df1;
+}
+
+.senior .download-way li.active {
+    color: #157df1;
+}
+
+/* 表单控件样式 */
+.senior textarea.form-control {
+    height: auto;
+    min-height: 120px;
+    resize: vertical;
+    padding: 12px 20px;
+    line-height: 1.5;
+}
+
+/* 条件显示元素 */
+#apppwd,
+.auth_code_dispense_url {
+    transition: all 0.3s ease;
+}
+
+/* 响应式高级设置 */
+@media (max-width: 768px) {
+    .senior .form-group .control-label {
+        text-align: left;
+        margin-bottom: 5px;
+    }
+
+    .senior .trust li,
+    .senior .download-way li {
+        float: none;
+        margin-right: 0;
+        margin-bottom: 10px;
+    }
+
+    .senior .download-way {
+        margin-bottom: 20px;
+    }
+}
+
+/* 模板设置样式 */
+
+.download-template .form-group {
+    margin-bottom: 30px;
+}
+
+.download-template .form-group .control-label {
+    width: 56px;
+}
+
+/* 模板语言设置样式 */
+.download-template .template-language {
+    list-style: none;
+}
+
+.download-template .template-language li {
+    float: left;
+    margin-right: 56px;
+    cursor: pointer;
+    padding: 8px 0;
+}
+
+.download-template .template-language li:hover {
+    color: #157df1;
+}
+
+.download-template .template-language li.active {
+    color: #157df1;
+}
+
+.download-template .template-language li .icon-radio {
+    background: url('/static/index/image/my-app/icon-radio-off.svg') no-repeat center;
+    background-size: 100% 100%;
+    width: 20px;
+    height: 20px;
+    margin-right: 12px;
+    top: 0;
+}
+
+.download-template .template-language li .icon-radio-checked {
+    background-image: url('/static/index/image/my-app/icon-radio-on.svg');
+}
+
+/* 模板选择样式 */
+.download-template .template-list {
+    list-style: none;
+    padding: 0;
+    margin: 0;
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.download-template .template-list li {
+    position: relative;
+    text-align: center;
+    cursor: pointer;
+    margin: 0 20px 20px 0;
+    width: 120px;
+    height: 151px;
+}
+
+.download-template .template-list li .t-checked {
+    border: 2px solid rgba(43, 194, 101, 1);
+}
+
+.download-template .template-list li:hover,
+.download-template .template-list li.active {}
+
+.download-template .template-list li .t-checked::after {
+    content: '';
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    background-image: url('/static/index/image/my-app/icon-review.svg');
+    background-size: 100% 100%;
+    width: 25px;
+    height: 25px;
+}
+
+.download-template .t-checked-wrap {
+    position: relative;
+    overflow: hidden;
+    height: 100%;
+    width: 100%;
+}
+
+.download-template .t-checked-wrap img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+    display: block;
+}
+
+.download-template .t-checked {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: none;
+    align-items: center;
+    justify-content: center;
+    color: #fff;
+}
+
+.download-template .t-checked .icon-xuanzhong1 {
+    font-size: 24px;
+}
+
+.download-template ul li .text {
+    display: block;
+    margin-top: 8px;
+    color: #157df1;
+    text-decoration: none;
+    font-size: 14px;
+    font-weight: 500;
+}
+
+.download-template ul li .text:hover {
+    text-decoration: underline;
+}
+
+.download-template input[type="radio"] {
+    display: none;
+}
+
+/* 响应式模板设置 */
+@media (max-width: 768px) {
+    .download-template .form-group .control-label {
+        text-align: left;
+        margin-bottom: 5px;
+    }
+
+    .download-template .template-language li {
+        float: none;
+        margin-right: 0;
+        margin-bottom: 10px;
+    }
+
+    .download-template ul {
+        justify-content: center;
+    }
+
+    .download-template .t-checked-wrap img {
+        width: 150px;
+        height: 90px;
+    }
+}
+
+/* 下载记录样式 */
+.download-details {
+    background-color: #fff;
+    padding: 0;
+    min-height: 360px;
+}
+
+.download-details .date {
+    float: left;
+    width: 150px;
+    position: relative;
+}
+
+.download-details .date1 {
+    margin-right: 8px;
+}
+
+.download-details .date2 {
+    margin-right: 24px;
+}
+
+.download-details .date input {
+    position: relative;
+    z-index: 1;
+    background-color: transparent;
+    cursor: pointer;
+}
+
+.download-details .d-top {
+    margin-bottom: 15px;
+}
+
+.download-details .d-top .form-control {
+    height: 34px;
+    width: 149px;
+    padding: 0 35px 0 20px;
+    box-sizing: border-box;
+}
+
+.download-details .d-top .line {
+    margin-right: 8px;
+    color: #aaa;
+    width: 16px;
+    height: 18px;
+    border-bottom: 1px solid rgba(143, 149, 159, 1);
+    font-size: 0;
+}
+
+.download-details .d-top button {
+    color: rgba(33, 104, 251, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 16px;
+    text-align: center;
+    vertical-align: middle;
+    height: 34px;
+    line-height: 32px;
+    border-radius: 4px;
+    border-width: 1px;
+    padding: 0 20px;
+    border: 1px solid rgba(33, 104, 251, 1)
+}
+
+.download-details .d-top button:hover {
+    color: #ffffff;
+}
+
+.download-details .d-top .num {
+    margin-left: 40px;
+    color: rgba(21, 21, 21, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 34px;
+    text-align: center;
+    vertical-align: middle;
+}
+
+.download-details .d-top .num i {
+    color: rgba(33, 104, 251, 1);
+}
+
+.download-details .no-content {
+    text-align: center;
+    margin-top: 100px;
+}
+
+.download-details .no-content img {
+    width: 100px;
+    height: 100px;
+    margin-bottom: 20px;
+}

+ 167 - 0
static/index/css/apps-info-top.css

@@ -0,0 +1,167 @@
+.app-details .details-top.my-apps-detail-top {
+    padding: 36px 20px 36px 30px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.app-details .my-apps-detail-top .upload-icon-common {
+    width: 72px;
+    height: 72px;
+    border-radius: 18px;
+    flex-shrink: 0;
+}
+
+.app-details .my-apps-detail-top .information dt {
+    margin-bottom: 10px;
+}
+
+.app-details .my-apps-detail-top .information dt .i-tit {
+    line-height: 26px;
+    height: 26px;
+    display: block;
+}
+
+.app-details .my-apps-detail-top .information dt .text {
+    color: rgba(21, 21, 21, 1);
+    font-family: Arial;
+    font-weight: 700;
+    font-size: 24px;
+    line-height: 23px;
+    margin-right: 13px;
+}
+
+.app-details .my-apps-detail-top .information dt .version {
+    background: rgba(255, 116, 41, 1);
+    width: 63px;
+    height: 26px;
+    border-radius: 6px;
+    top: -4px;
+    line-height: 26px;
+    left: 0;
+    position: relative;
+    display: inline-block;
+}
+
+.app-details .my-apps-detail-top .information dd {
+    color: rgba(143, 149, 159, 1) !important;
+    font-family: Source Han Sans SC;
+    font-weight: 400;
+    font-size: 13px;
+    line-height: 13px;
+    margin-top: 4px !important;
+}
+
+.app-details .my-apps-detail-top .information dd span {
+    margin-right: 20px !important;
+}
+
+.app-details .my-apps-detail-top .information dd span.iconfont {
+    margin-right: 2px !important;
+    width: 14px;
+    height: 14px;
+    background: url(/static/index/image/my-app/icon-android.svg) no-repeat center center;
+    background-size: 100% 100%;
+    width: 14px;
+    height: 14px;
+    display: inline-block;
+    vertical-align: middle;
+    position: relative;
+    top: -2px !important;
+}
+
+.app-details .my-apps-detail-top .information dd span.iconfont::before {
+    content: '';
+}
+
+.app-details .my-apps-detail-top .information dd span.iconfont.icon-android {
+    background-image: url(/static/index/image/my-app/icon-android.svg);
+    margin-right: 0;
+}
+
+.app-details .my-apps-detail-top .information dd span.iconfont.icon-iphone {
+    background-image: url(/static/index/image/my-app/icon-ios.svg);
+    top: -1px !important;
+}
+
+.app-details .my-apps-detail-top .details-upload-new-version,
+.app-details .my-apps-detail-top .details-preview,
+.app-details .my-apps-detail-top .details-merge {
+    width: unset;
+    background: rgba(33, 104, 251, 1);
+    /* width: 154px; */
+    height: 40px;
+    border-radius: 4px;
+    color: rgba(255, 255, 255, 1);
+    font-family: Source Han Sans SC;
+    font-weight: 500;
+    font-size: 16px;
+    line-height: 40px;
+    padding: 0 20px;
+}
+
+.app-details .my-apps-detail-top .details-merge {
+    background: rgba(255, 116, 41, 1);
+}
+
+.app-details .my-apps-detail-top .information {
+    flex: 1;
+    margin: 0 20px;
+    min-width: 0; /* 防止内容溢出 */
+}
+
+.app-details .my-apps-detail-top .d-right {
+    width: 399px;
+    margin-top: 0;
+    flex-shrink: 0;
+}
+
+.my-apps-detail-top .iconfont {
+    background: url(/static/index/image/inner-nav/icon1.svg) no-repeat center center;
+    background-size: 100% 100%;
+    width: 24px;
+    height: 24px;
+    display: inline-block;
+    vertical-align: middle;
+    position: relative;
+    top: -3px !important;
+}
+
+.my-apps-detail-top .d-right .iconfont::before {
+    content: '';
+}
+
+.my-apps-detail-top .icon-upload1 {
+    background-image: url(/static/index/image/inner-nav/icon1.svg);
+    margin-right: 0;
+}
+
+.my-apps-detail-top .icon-preview {
+    background-image: url(/static/index/image/inner-nav/icon2.svg);
+}
+
+.my-apps-detail-top .icon-merge {
+    background-image: url(/static/index/image/inner-nav/icon3.svg);
+}
+
+.my-apps-detail-top .iconfont+.text {
+    position: relative;
+    top: -1px !important;
+    margin-left: 6px;
+}
+
+@media (min-width: 768px) and (max-width: 1199px) {
+    .app-details .my-apps-detail-top .d-right {
+        width: 230px;
+    }
+
+    .app-details .my-apps-detail-top .d-right>button,
+    .app-details .my-apps-detail-top .d-right>a {
+        width: 67px;
+    }
+
+    .my-apps-detail-top .iconfont+.text {
+        font-size: 0;
+        margin-left: 0;
+    }
+}

+ 4 - 72
static/index/css/main.css

@@ -10595,75 +10595,7 @@ aside.aside-left ul li:hover a .iconfont {
 }
 
 /*下载明细*/
-.download-details {
-    background-color: #fff;
-    padding: 20px;
-    min-height: 360px;
-}
-
-.download-details .date {
-    float: left;
-    width: 140px;
-    position: relative;
-}
-
-.download-details .date1 {
-    margin-right: 10px;
-}
-
-.download-details .date2 {
-    margin-right: 20px;
-}
-
-.download-details .date input {
-    position: relative;
-    z-index: 1;
-    background-color: transparent;
-    cursor: pointer;
-}
-
-.download-details .date .icon-date {
-    color: #aaa;
-    position: absolute;
-    right: 10px;
-    top: 4px;
-    z-index: 0;
-}
-
-.download-details .date:hover .icon-date {
-    color: #157df1;
-}
-
-.download-details .d-top {
-    margin-bottom: 15px;
-}
-
-.download-details .d-top .form-control {
-    height: 30px;
-}
-
-.download-details .d-top .line {
-    margin-right: 10px;
-    color: #aaa;
-}
-
-.download-details .d-top .query {
-    font-size: 13px;
-    padding: 5px 12px;
-}
-
-.download-details .d-top .num {
-    line-height: 34px;
-    margin-left: 30px;
-    color: #333;
-    font-size: 13px;
-}
-
-.download-details .d-top .num i {
-    color: #157df1;
-}
-
-.download-details .table {
+/* .download-details .table {
     border: 1px solid #e5e5e5;
     table-layout: fixed;
 }
@@ -10695,7 +10627,7 @@ aside.aside-left ul li:hover a .iconfont {
 .download-details .no {
     text-align: center;
     margin-top: 100px;
-}
+} */
 
 /*/下载明细*/
 
@@ -10732,7 +10664,7 @@ aside.aside-left ul li:hover a .iconfont {
 
 /*/详情页 签名*/
 
-.release-app2 .aside-right .version-history-table td {
+/* .release-app2 .aside-right .version-history-table td {
     position: relative;
     height: 50px;
     border-color: #e5e5e5;
@@ -10742,7 +10674,7 @@ aside.aside-left ul li:hover a .iconfont {
     position: absolute;
     left: 0;
     top: 0;
-}
+} */
 
 /*
 .release-app2 .aside-right .app-details .downloads{padding: 10px 0; background-color: #fff; margin-bottom: 20px; box-shadow: 0 0 5px rgba(0,0,0,.05);}

+ 7 - 0
static/index/image/inner-nav/icon1.svg

@@ -0,0 +1,7 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M5.83885 10.1355C3.63738 10.659 2 12.6383 2 15C2 17.7614 4.23857 20 7 20C7.4737 20 7.932 19.9341 8.36625 19.811" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M18.0274 10.1355C20.2289 10.659 21.8662 12.6383 21.8662 15C21.8662 17.7614 19.6277 20 16.8662 20C16.3925 20 15.9342 19.9341 15.5 19.811" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M18 10C18 6.6863 15.3137 4 12 4C8.6863 4 6 6.6863 6 10" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M8.53271 13.9406L12 10.4619L15.5659 14.0001" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M12 19.0001V12.231" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+</svg>

+ 7 - 0
static/index/image/inner-nav/icon2.svg

@@ -0,0 +1,7 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 20.5C16.9706 20.5 21 16.339 21 13.5C21 10.661 16.9706 6.5 12 6.5C7.02945 6.5 3 10.6639 3 13.5C3 16.3361 7.02945 20.5 12 20.5Z" stroke="white" stroke-width="1.5"/>
+<path d="M12 16.5C13.6568 16.5 15 15.1568 15 13.5C15 11.8432 13.6568 10.5 12 10.5C10.3432 10.5 9 11.8432 9 13.5C9 15.1568 10.3432 16.5 12 16.5Z" stroke="white" stroke-width="1.5"/>
+<path d="M6.63184 5.63306L7.92909 7.44316" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M17.8124 5.85522L16.5151 7.66537" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M12.0044 3.5V6.5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+</svg>

+ 5 - 0
static/index/image/inner-nav/icon3.svg

@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M19.5 3H4.5C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3Z" stroke="white" stroke-width="1.5"/>
+<path d="M12 8V16" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M8 12H16" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
+</svg>

+ 3 - 0
static/index/image/my-app/icon-android.svg

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.9779 4.56633C11.5182 4.56633 11.1374 4.93033 11.1374 5.37233V8.50681C11.1374 8.94881 11.5052 9.31311 11.9779 9.31311C12.4374 9.31311 12.8182 8.94881 12.8182 8.50652V5.37262C12.8052 4.93062 12.4374 4.56662 11.9779 4.56662V4.56633ZM1.84027 4.56633C1.38114 4.56633 1 4.93033 1 5.37203V8.50681C1 8.94881 1.36755 9.31311 1.84027 9.31311C2.313 9.31311 2.68084 8.94881 2.68084 8.50652V5.37262C2.68084 4.93062 2.313 4.56662 1.84027 4.56662V4.56633ZM3.19287 4.59233V10.3271C3.19287 10.6651 3.48182 10.9511 3.84937 10.9511H4.59805V12.6937C4.59805 13.136 4.9656 13.5 5.43832 13.5C5.89805 13.5 6.27889 13.136 6.27889 12.6937V10.9511H7.5919V12.6937C7.5919 13.136 7.95974 13.5 8.43247 13.5C8.8916 13.5 9.27274 13.136 9.27274 12.6937V10.9511H10.0211C10.389 10.9511 10.6779 10.6781 10.6779 10.3271V4.59203H3.19287V4.59233ZM8.68183 1.62714L9.37792 0.690845C9.40392 0.625844 9.40392 0.547844 9.33833 0.521844C9.28574 0.482844 9.20715 0.508844 9.16756 0.560844L8.45847 1.53614C7.96146 1.35707 7.43738 1.26472 6.9091 1.26314C6.35748 1.26314 5.83246 1.35414 5.35973 1.53614L4.65064 0.56114C4.61105 0.49614 4.53246 0.482844 4.47987 0.521844C4.45429 0.540995 4.4372 0.569375 4.43223 0.600941C4.42726 0.632506 4.43481 0.664764 4.45328 0.690845L5.14937 1.62744C4.05973 2.10844 3.28505 3.01873 3.19287 4.08503H10.6649C10.5467 3.01844 9.78476 2.10844 8.68183 1.62714ZM5.33344 3.10973C5.09707 3.10973 4.9263 2.94073 4.9263 2.71973C4.9263 2.49844 5.11007 2.32973 5.33344 2.32973C5.5698 2.32973 5.74028 2.49844 5.74028 2.71973C5.74028 2.94073 5.55651 3.10973 5.33344 3.10973ZM8.53735 3.10973C8.30099 3.10973 8.13021 2.94073 8.13021 2.71973C8.13021 2.49844 8.31428 2.32973 8.53735 2.32973C8.77372 2.32973 8.94449 2.49844 8.94449 2.71973C8.94449 2.94073 8.76072 3.10973 8.53735 3.10973Z" fill="#8F959F"/>
+</svg>

+ 10 - 0
static/index/image/my-app/icon-date.svg

@@ -0,0 +1,10 @@
+<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M2.39551 9.10413H20.6038V19.1666C20.6038 19.6959 20.1748 20.125 19.6455 20.125H3.35384C2.82457 20.125 2.39551 19.6959 2.39551 19.1666V9.10413Z" stroke="#8F959F" stroke-width="1.5"/>
+<path d="M2.39551 4.31246C2.39551 3.78319 2.82457 3.35413 3.35384 3.35413H19.6455C20.1748 3.35413 20.6038 3.78319 20.6038 4.31246V9.10413H2.39551V4.31246Z" stroke="#8F959F" stroke-width="1.5"/>
+<path d="M7.66699 1.91663V5.74996" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M15.333 1.91663V5.74996" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M13.417 16.2916H16.292" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M6.70801 16.2916H9.58301" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M13.417 12.4584H16.292" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+<path d="M6.70801 12.4584H9.58301" stroke="#8F959F" stroke-width="1.5" stroke-linecap="round"/>
+</svg>

+ 15 - 0
static/index/image/my-app/icon-ios.svg

@@ -0,0 +1,15 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="mask0_112_1086" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="14" height="14">
+<rect width="14" height="14" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask0_112_1086)">
+</g>
+<g clip-path="url(#clip0_112_1086)">
+<path d="M12.1084 9.31416C11.9198 9.9187 11.6223 10.5232 11.2161 11.1278C10.5922 12.0757 9.97075 12.5496 9.3517 12.5496C9.11472 12.5496 8.77618 12.4723 8.33608 12.3175C7.92015 12.1627 7.55501 12.0854 7.24065 12.0854C6.94564 12.0854 6.60226 12.1652 6.21052 12.3248C5.81878 12.4892 5.49958 12.5714 5.25293 12.5714C4.51781 12.5714 3.78995 11.9451 3.06934 10.6925C2.3584 9.43023 2.00293 8.2139 2.00293 7.04351C2.00293 5.94083 2.27618 5.03644 2.82268 4.33034C3.36919 3.63391 4.05594 3.2857 4.88295 3.2857C5.23117 3.2857 5.65918 3.35824 6.16699 3.50333C6.66997 3.64842 7.00367 3.72097 7.16811 3.72097C7.38574 3.72097 7.73154 3.63875 8.2055 3.47431C8.6988 3.30988 9.11714 3.22766 9.46052 3.22766C10.036 3.22766 10.5511 3.38484 11.0057 3.6992C11.2572 3.87331 11.5087 4.11512 11.7602 4.42465C11.3781 4.74868 11.1024 5.03402 10.9332 5.28067C10.6188 5.73529 10.4616 6.23585 10.4616 6.78235C10.4616 7.38205 10.6285 7.9213 10.9622 8.40009C11.2959 8.87889 11.678 9.18358 12.1084 9.31416ZM9.38072 0.80467C9.38072 1.09969 9.31059 1.42855 9.17034 1.79128C9.02525 2.154 8.80036 2.48771 8.49568 2.79239C8.23451 3.05355 7.97335 3.22766 7.71219 3.31472C7.53325 3.36791 7.28176 3.40902 6.95773 3.43804C6.97224 2.71743 7.16085 2.09597 7.52358 1.57364C7.88146 1.05616 8.486 0.698272 9.33719 0.499983C9.34203 0.514492 9.34807 0.541092 9.35533 0.579782C9.36258 0.618472 9.36863 0.645072 9.37347 0.659581C9.37347 0.678926 9.37467 0.703108 9.37709 0.732125C9.37951 0.761144 9.38072 0.785325 9.38072 0.80467Z" fill="#8F959F"/>
+</g>
+<defs>
+<clipPath id="clip0_112_1086">
+<rect width="10.22" height="13" fill="white" transform="matrix(1 0 0 -1 2 13.5)"/>
+</clipPath>
+</defs>
+</svg>

+ 3 - 0
static/index/image/my-app/icon-radio-off.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" stroke="#C6C6C6"/>
+</svg>

+ 4 - 0
static/index/image/my-app/icon-radio-on.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="20" height="20" rx="10" fill="#2168FB"/>
+<rect x="6" y="6" width="8" height="8" rx="4" fill="white"/>
+</svg>

+ 4 - 0
static/index/image/my-app/icon-review.svg

@@ -0,0 +1,4 @@
+<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M5.96046e-06 25C2.66859e-06 11.1929 11.1929 0 25 0V25H5.96046e-06Z" fill="#2BC265"/>
+<path d="M20.5758 9.29907L22.431 11.2009L13.3795 20.0351L8.63281 15.5025L10.4677 13.5815L13.3593 16.3429L20.5758 9.29907Z" fill="white"/>
+</svg>