123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- <?php
- namespace app\index;
- class publish extends BaseUser
- {
- function index()
- {
- $_var_0 = $_var_1 = $_var_2 = "";
- if (SafeRequest("id", "get")) {
- $_var_0 = SafeRequest("id", "get");
- $_var_3 = db("appid")->where("in_uid", $this->userid)->where("in_id", bees_decrypt($_var_0))->find();
- $_var_3 || exit(header("location:" . IN_PATH));
- $_var_1 = $_var_3["in_bid"];
- $_var_2 = $_var_3["in_form"] == "Android" ? "apk" : "ipa";
- }
- ?>
- <!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>上传app - <?php echo IN_NAME; ?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
- <?php
- $this->static_();
- ?>
- <style>
- .upload-file .upload-btn .iconfont.icon-upload {
- position: relative;
- padding-left: 20px;
- }
- .upload-file .iconfont.icon-upload::before {
- content: '';
- position: absolute;
- top: 4px;
- left: 0;
- width: 20px;
- height: 20px;
- background: url(/static/index/image/my-app/icon-upload.png) center/100% no-repeat;
- }
- #_drop1, #_drop2 {
- color: rgba(21, 21, 21, 1);
- font-family: Source Han Sans SC;
- font-weight: 400;
- font-size: 16px;
- line-height: 25px;
- }
- #_drop2 span {
- color: rgba(33, 104, 251, 1);
- }
- .release-app2 .qq-upload-button-selector {
- margin-top: 0 !important;
- }
- .release-app2 .warn-prompt-wrap {
- color: rgba(143, 149, 159, 1);
- font-family: Source Han Sans SC;
- font-weight: 500;
- font-size: 13px;
- line-height: 20px;
- margin-top: 14px;
- }
- .release-app2 .warn-prompt-wrap span {
- color: rgba(33, 104, 251, 1);
- }
- .release-app2 .warn-prompt-wrap {
- padding-bottom: 167px;
- }
- .upload-app-icon img {
- border: 1px solid rgba(221, 221, 221, 1);
- width: 100px;
- height: 100px;
- border-radius: 24px;
- }
- .qq-upload-list-selector {
- margin-top: 12px !important;
- }
- .release-app2 .qq-upload-list li {
- padding: 0;
- }
- .app-name {
- margin-bottom: 12px;
- color: rgba(0, 0, 0, 1);
- font-family: Source Han Sans SC;
- font-weight: 700;
- font-size: 16px;
- line-height: 25px;
- margin-bottom: 12px;
- }
- .tips {
- color: rgba(0, 0, 0, 1);
- font-family: Source Han Sans SC;
- font-weight: 400;
- font-size: 14px;
- line-height: 25px;
- margin-bottom: 20px;
- }
- .release-app .progress {
- margin-top: 20px !important;
- width: 854px;
- height: 20px !important;
- margin: 0 auto;
- background-color: rgba(234, 236, 239, 1);
- border-radius: 0;
- margin-bottom: 20px;
- max-width: 80%;
- }
- .release-app .progress .progress-bar {
- background-color: rgba(33, 104, 251, 1) !important;
- border-radius: 0;
- height: 100% !important;
- animation: unset;
- background-image: unset;
- }
- .qq-upload-size {
- color: rgba(143, 149, 159, 1);
- font-family: Source Han Sans SC;
- font-weight: 400;
- font-size: 16px;
- line-height: 25px;
- margin-bottom: 30px;
- }
- #changest {
- width: 62px;
- height: 34px;
- border-radius: 4px;
- font-family: Source Han Sans SC;
- font-weight: 500;
- font-size: 16px;
- line-height: 34px;
- background-color: rgba(33, 104, 251, 1);
- color: rgba(255, 255, 255, 1);
- border: unset;
- padding: 0 10px;
- }
- .release-app2 .tag-box-v5 {
- margin: 0;
- }
- #container {
- height: 450px !important;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- }
- .qq-uploader-selector {
- margin-bottom: 20px;
- height: auto!important;
- }
- </style>
- </head>
- <body>
- <?php
- $this->header();
- $_var_4 = $this->action == "apps" && IN_REMOTE && (IN_MANDATORY_REMOTE || $this->user["in_svip"] > 0);
- ?>
- <link rel="stylesheet" href="/static/index/css/fineuploader.css" />
- <div class="release-app-wrap">
- <div class="container">
- <div class="release-app2 ">
- <div class="crumbs">
- <a href="/index/apps/apps">我的应用</a><span>/</span>上传应用
- </div>
- <div class="row clearfix">
- <?php
- $this->left();
- ?> <div class="col-sm-10">
- <div class="aside-right">
- <div class="release-app">
- <div class="upload-file">
- <div class="row tag-box tag-box-v5" id="container"
- style="height: 450px !important;">
- <div class="span12" style="max-width: 100%;">
- <div id="bootstrapped-fine-uploader">
- </div>
- <div class="qq-uploader-selector qq-uploader span12">
- <div id="upprocess" style="display: none;">
- <span class="qq-drop-processing-selector qq-drop-processing">
- <span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
- </span>
- <div class="upload-app-icon" id="loading">
- <img src="<?php echo IN_PATH; ?>static/index/image/loadicon.png">
- </div>
- <div class="loadend">
- </div>
- <ul class="qq-upload-list-selector qq-upload-list">
- <li>
- <div class="app-name">
- <span id="upload-app-name">正在解析...</span>
- </div>
- <div class="tips">
- 正在上传中,请不要关闭浏览器
- </div>
- <div class="qq-progress-bar-container-selector progress progress-striped active">
- <div class="growing qq-progress-bar-selector progress-bar progress-bar-warning"
- role="progressbar">
- </div>
- </div>
- <span class="qq-upload-spinner-selector qq-upload-spinner alreadyup"
- style="width: auto;font-size: 14px"></span>
- <span class="qq-upload-file-selector qq-upload-file"></span>
- <span class="qq-upload-size-selector qq-upload-size tolsize"
- style="width: auto;font-size: 14px"
- id="speed-uploadify"></span>
- <br />
- <br />
- <a class="turbo-upload qq-upload-cancel-selector btn-u btn-u-default ms-btn ms-btn-default"
- href="javascript:;" id="changest"
- style="display: none;">暂停上传</a>
- <span class="qq-upload-status-text-selector qq-upload-status-text"></span>
- <div id="retry" style="display:none; margin-top:20px;">
- <a class="btn-u btn-u-default"
- href="javascript:void(0);"
- onclick="javascript:retry();">重新上传</a>
- </div>
- </li>
- </ul>
- </div>
- <div class="col-md-12" id="upbtn">
- <div class="qq-upload-button-selector">
- <button class="ms-btn ms-btn-primary upload-btn"
- id="uploadstart"
- style="padding: 0px; font-size: 18px; line-height: 50px; z-index: 1; width: 148px; height: 50px; border-radius: 4px; background-color: rgba(33, 104, 251, 1);">
- <span class="iconfont icon-upload"></span>
- <span class="text" style="top: -5px; font-size: 18px; font-family: Source Han Sans SC">立即上传</span>
- </button>
- <div style="width: 120px;margin:20px auto">
- <?php
- if ($_var_4 && $this->action == "apps" && !IN_MANDATORY_REMOTE) {
- ?> <label onclick="change_remote()">
- <span class="icon icon-radio" id="cdnradio"></span>
- <span class="">开启CDN加速</span>
- </label>
- <?php
- }
- ?>
- </div>
- <div id="_drop1">点击按钮选择应用的安装包,或拖拽文件到此区域</div>
- <div id="_drop2">
- 支持<?php echo $this->action == "apps" ? "{ipa,apk,mobileconfig}" : "{ipa}"; ?> 文件,单个文件最大支持
- <span><?php echo get_user_in_filesize($this->user, true); ?></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="warn-prompt-wrap clearfix">
- <dl class="clearfix fr warn-prompt-1">
- <dt class="fl">提示:</dt>
- <dd>请您确认上传的APP,符合
- 《<a href="/index/about/specification" target="_blank"
- class="color-hover"><?php echo IN_NAME; ?>应用审核规范</a>》,如违反规范,APP将做删除处理,屡次上传将被封禁账号。
- <br />根据最新审核规范,不接受如下APP上传本平台:色情类、直播类、金融类、区块链虚拟币等。如已上传,将做删除处理。
- </dd>
- </dl>
- </div>
- </div>
- </div>
- </div>
- <script src="/static/index/js/publish/app-info-parser.min.js"></script>
- <script src="/static/index/js/publish/plupload.full.min.js"></script>
- <?php
- if ($_var_4 && IN_REMOTE == 1) {
- ?> <script src="/static/index/js/publish/qiniu.min.js"></script>
- <?php
- }
- ?> <script src="/static/index/js/publish/packageParser.js"></script>
- <script>
- var allowsize = <?php echo get_user_in_spacetotal($this->user) - $this->user["in_spaceuse"]; ?>; //存储空间剩余
- var singlesize = <?php echo get_user_in_filesize($this->user); ?>; //单文件上传限制
- var iLocalId = "<?php echo $_var_0; ?>"; //更新应用ID
- var mandatory = <?php echo IN_VERIFY; ?>; //强制认证状态
- var certification = <?php echo $this->user["in_verify"]; ?>; //实名认证状态
- let bundleId = "<?php echo $_var_1; ?>"; //更新应用包名
- let ext = "<?php echo $_var_2; ?>"; //更新应用类型
- var remote = <?php echo $_var_4 ? IN_REMOTE : 0; ?>;
- var in_sign_type = "<?php echo $this->action == "apps" ? 0 : ($this->action == "sign" ? 1 : 2); ?>";
- var IN_SIGNMETHOD = "<?php echo IN_SIGNMETHOD; ?>";
- var IN_API = "<?php echo IN_API; ?>";
- var IN_SECRET = "<?php echo IN_SECRET; ?>";
- var IN_MANDATORY_REMOTE = <?php echo intval(IN_MANDATORY_REMOTE && IN_REMOTE && $this->action == "apps"); ?>;
- var uploader;
- var parser_config = {
- qndomain: "<?php echo IN_REMOTEDK; ?>",
- upload: "/upload/index/saveinfo",
- autoClickUploadStart: iLocalId, //应用id更新
- postField: {
- iLocalId: iLocalId,
- in_sign_type
- },
- parseCallback: function(file, appInfo) {
- if (file.size > singlesize) {
- throw new Error("单文件大小,超过" + Math.floor((singlesize / 1024 / 1024) * 100) / 100 + "MB,请开通或升级会员。");
- } else {
- if (file.size > allowsize) {
- throw new Error('应用空间容量不足,请开通或升级会员。');
- }
- }
- if (iLocalId && (bundleId != appInfo.packageName || ext != appInfo.ext)) {
- throw new Error('不是同一个应用无法更新');
- }
- if (mandatory == 1 && certification != 1) {
- throw new Error('未进行实名认证或认证审核中');
- }
- },
- saveCallback: function(ret) {
- if (ret.code == 1) {
- window.location.href = "/index/publish_success?id=" + ret.data.id;
- } else {
- if (ret.msg) {
- Modal.determineModal({
- iconClass: "icon-modal-error2", // success: icon-modal-success1, error: icon-modal-error2
- title: data.msg,
- align: 'left',
- btnText: '确定'
- });
- } else {
- alert('上传文件失败,请稍后重试');
- }
- }
- },
- };
- function parser_init(remote) {
- if (uploader) {
- uploader.destroy()
- }
- parser = new packageParser(uploader);
- parser_config.remote = remote || 0;
- parser.init(parser_config);
- }
- //初始化
- parser_init(IN_MANDATORY_REMOTE ? remote : 0);
- function change_remote() {
- $('#cdnradio').toggleClass('icon-radio-checked');
- if ($('#cdnradio').hasClass('icon-radio-checked')) {
- parser_init(remote);
- } else {
- parser_init(0);
- }
- }
- </script>
- <?php
- $this->footer();
- ?> <script>
- window.onload = checkIsBanned;
- </script>
- </body>
- </html>
- <?php
- }
- }
|