123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- {template 'common/header'}
- <div class="front-download">
- <ul class="we7-page-tab">
- <li class="{if $type == 'apk'}active{/if}"><a
- href="{php echo url('phoneapp/front-download', array('version_id' => $version_id, 'type' => 'apk'))}">安卓APP下载</a></li>
- <li class="{if $type == 'ipa'}active{/if}"><a
- href="{php echo url('phoneapp/front-download', array('version_id' => $version_id, 'type' => 'ipa'))}">苹果APP下载</a></li>
-
- </ul>
- {if $type == 'apk'}
- <div class="alert we7-page-alert">
- <p><i class="wi wi-info-sign"></i>以360市场为例,下载“360加固保”对下载的文件进行加固。地址:<a href="http://jiagu.360.cn/" target="_blank">http://jiagu.360.cn/</a> </p>
- <p><i class="wi wi-info-sign"></i>加固后,请对apk文件重新配置签名。<a href="javascript:;" class="showSetting">配置APK</a></p>
- </div>
- {/if}
- <div class="app-down-box">
- <img src="{$module['logo']}" alt="{$module['title']}" class="logo">
- <div class="title">{if $type == 'ipa'}苹果{else}安卓{/if}APP应用{$type}包</div>
- <a class="btn btn-primary"
- href="{php echo url('phoneapp/front-download/getpackage', array('version_id' => $version_id, 'type' => $type))}">
- 立即下载
- </a>
- </div>
- <div class="modal apk-select-modal" id="ApkSelect">
- <div class="modal-dialog we7-modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h3 class="modal-title">配置APK</h3>
- </div>
- <div class="modal-body we7-form">
- <div class="alert we7-page-alert">
- <i class="wi wi-info-sign"></i> 上传加固后的apk,配置签名后重新下载apk。
- </div>
- <div class="form-group">
- <label for="" class="control-label col-sm-3">上传APK文件</label>
- <div class="form-controls col-sm-8">
- <div class="input-group">
- <input type="text" readonly name="cname" id="apkName" class="form-control " autocomplete="off" />
- <div class="input-group-addon">
- <input type="file" name="apk" id="apk" accept=".apk" class="form-control hidden" autocomplete="off" />
- <label for="apk" >选择文件</label>
- </div>
- </div>
-
- <span class="help-block"></span>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button class="btn btn-primary js-ApkSelect" disabled>下载配置APK</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- var siteinfo = '{php echo json_encode($siteinfo)}';
- $('.showSetting').click(function() {
- $('#ApkSelect').modal('show')
- })
- $('#apk').change(function(event) {
- var file = event.target.files[0];
- if (file) {
- $('#apkName').val(file.name);
- $('.js-ApkSelect').attr('disabled', false)
- }
- })
- $('.js-ApkSelect').click(function(event) {
- var file = document.getElementById("apk").files[0];
- if (file) {
- require(['jszip', 'fileSaver'], function(JSZip, fileSaver){
- JSZip.loadAsync(file).then(function(zip){
- console.log(zip.comment);
- zip.generateAsync({comment: siteinfo,type:"blob"})
- .then(function (blob) {
- saveAs(blob, "配置.apk");
- });
- });
- });
- }
- })
- </script>
- {template 'common/footer'}
|