category_download.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. {include file="header" /}
  2. <link rel="stylesheet" href="/assets/xtu/download-center.css?v=20260513-2">
  3. {php}
  4. $downloadProductId = (int)request()->param('product_id/d', request()->param('project_id/d', request()->param('pid/d', request()->param('id/d', 0))));
  5. $downloadBaseWhere = '`status` = 1';
  6. $productWhere = '`status` = 1';
  7. $currentProductWhere = '`id` = ' . $downloadProductId . ' AND `status` = 1';
  8. $productDownloadWhere = '';
  9. if ($downloadProductId > 0) {
  10. $productDownloadWhere = ' AND `project_id` = ' . $downloadProductId;
  11. }
  12. $downloadDocWhere = '`status` = 1 AND `catid` = 40' . $productDownloadWhere;
  13. $downloadFirmwareWhere = '`status` = 1 AND `catid` = 57' . $productDownloadWhere;
  14. {/php}
  15. <main class="download-center-page support-page download-category-page">
  16. <div class="cooperation-topbar download-topbar">
  17. <div class="cooperation-topbar-inner">
  18. <div class="cooperation-topbar-title">{$title|default=cms_t('download_center','下载中心')}</div>
  19. </div>
  20. </div>
  21. <section class="download-center-section">
  22. <div class="content-1300-wrap download-center-layout">
  23. <aside class="download-filter-panel">
  24. <div class="download-filter-card">
  25. <div class="download-filter-meta download-filter-meta-standalone">
  26. <span><i class="bi bi-phone"></i> {:getCategory(42,'catname')}</span>
  27. <span><i class="bi bi-journal-text"></i> {:getCategory(40,'catname')}</span>
  28. <span><i class="bi bi-cpu"></i> {:getCategory(57,'catname')}</span>
  29. </div>
  30. </div>
  31. <div class="download-filter-card download-product-card">
  32. <div class="download-filter-title">
  33. <i class="bi bi-camera-video"></i>
  34. <span>{:cms_t('select_product','选择产品')}</span>
  35. </div>
  36. <div class="download-product-list download-product-category-list">
  37. {yzn module="cms" action="category" where="modelid=2" order="listorder DESC,id ASC" num="6" return="productCategories"}
  38. {volist name="productCategories" id="productCat"}
  39. {yzn module="cms" action="lists" catid="$productCat['id']" order="listorder DESC,id DESC" num="30" return="downloadProducts" moreinfo="1"}
  40. {if !empty($downloadProducts)}
  41. {php}
  42. $downloadGroupOpen = false;
  43. foreach ($downloadProducts as $downloadProductItem) {
  44. if ((int)$downloadProductItem['id'] === $downloadProductId) {
  45. $downloadGroupOpen = true;
  46. break;
  47. }
  48. }
  49. {/php}
  50. <div class="download-product-group {if $downloadGroupOpen}is-open{/if}">
  51. <button class="download-product-group-title" type="button" aria-expanded="{if $downloadGroupOpen}true{else /}false{/if}">
  52. <span>{$productCat.catname}</span>
  53. <i class="bi bi-chevron-down"></i>
  54. </button>
  55. <div class="download-product-group-items">
  56. {volist name="downloadProducts" id="product"}
  57. <a class="download-product-link {if $downloadProductId == $product.id}active{/if}" href="?product_id={$product.id}">
  58. <span>{$product.title}</span>
  59. <i class="bi bi-chevron-right"></i>
  60. </a>
  61. {/volist}
  62. </div>
  63. </div>
  64. {/if}
  65. {/yzn}
  66. {/volist}
  67. {/yzn}
  68. </div>
  69. </div>
  70. </aside>
  71. <div class="download-content-panel">
  72. {if $downloadProductId <= 0}
  73. <div class="download-overview-card">
  74. {yzn module="cms" action="lists" catid="42" order="listorder DESC,id ASC" num="1" return="xtugoDownloadData" moreinfo="1"}
  75. {volist name="xtugoDownloadData" id="vo"}
  76. <div class="download-overview-copy">
  77. <span class="download-pill">XTU GO</span>
  78. <h2>{$vo.title|default=cms_t('xtugo_default_title','骁途用户必备的手机应用')}</h2>
  79. <p>{$vo.description|default=cms_t('xtugo_default_desc','一站连接设备、管理素材、获取教程与售后服务,让拍摄体验从开机到分享都更顺手。')}</p>
  80. <div class="xtugo-store-list download-store-list">
  81. <a class="xtugo-store-btn xtugo-store-btn-android" href="{$vo.andiordurl|default='#'}" target="_blank" rel="noopener">
  82. <span class="xtugo-store-icon"><i class="bi bi-android2"></i></span>
  83. <span class="xtugo-store-copy"><small>{:cms_t('download_for','Download for')}</small><strong>Android</strong></span>
  84. </a>
  85. <a class="xtugo-store-btn xtugo-store-btn-ios" href="{$vo.appstore|default='#'}" target="_blank" rel="noopener">
  86. <span class="xtugo-store-icon"><i class="bi bi-apple"></i></span>
  87. <span class="xtugo-store-copy"><small>{:cms_t('download_on_the','Download on the')}</small><strong>App Store</strong></span>
  88. </a>
  89. </div>
  90. </div>
  91. <div class="download-overview-visual">
  92. <img src="{$vo.thumb|default='/assets/xtu/vendor/img/xtugo.png'}" alt="XTU GO">
  93. </div>
  94. {/volist}
  95. {/yzn}
  96. </div>
  97. <div class="download-doc-section">
  98. <div class="download-section-head">
  99. <h2>{:cms_t('latest_downloads_prefix','最新')}{:getCategory($catid,'catname')}</h2>
  100. <p>{:cms_t('download_select_product_tip','选择左侧产品后,可查看该产品专属资料。')}</p>
  101. </div>
  102. <div class="download-file-grid">
  103. {yzn module="cms" action="lists" catid="$catid" where="$downloadBaseWhere" cache="3600" order="$order['data']??'listorder DESC,publish_time DESC,id DESC'" num="12" page="$page" return="data" moreinfo="1"}
  104. {volist name="data" id="vo"}
  105. <article class="download-file-card">
  106. <div class="download-file-icon"><i class="bi bi-file-earmark-arrow-down"></i></div>
  107. <div class="download-file-copy">
  108. <h3>{$vo.title}</h3>
  109. <p>{:date('Y-m-d',$vo.publish_time)}</p>
  110. </div>
  111. <a href="{$vo.fileaddress}" target="_blank" rel="noopener" class="download-file-action">{:cms_t('download','下载')}</a>
  112. </article>
  113. {/volist}
  114. {/yzn}
  115. </div>
  116. <div class="text-center download-pages">{$pages|raw}</div>
  117. </div>
  118. {else /}
  119. {yzn module="cms" action="lists" modelid="2" where="$currentProductWhere" num="1" return="currentProduct" moreinfo="1"}
  120. {volist name="currentProduct" id="product"}
  121. {php}
  122. $downloadHeroLabel = getCategory($product['catid'], 'catname');
  123. {/php}
  124. <div class="download-product-hero-card">
  125. <div>
  126. <span class="download-pill">{$downloadHeroLabel|default=cms_t('product_download_label','产品下载')}</span>
  127. <h2>{$product.title}</h2>
  128. <p>{$product.description|default=cms_t('product_download_default_desc','请选择下方分类获取对应下载内容。')}</p>
  129. </div>
  130. {if $product.thumb}<img src="{$product.thumb}" alt="{$product.title}">{/if}
  131. </div>
  132. {/volist}
  133. {/yzn}
  134. <div class="download-tabs-card">
  135. <div class="download-tabs" role="tablist">
  136. <button class="download-tab active" type="button" data-tab="app"><i class="bi bi-phone"></i>{:getCategory(42,'catname')}</button>
  137. <button class="download-tab" type="button" data-tab="manual"><i class="bi bi-journal-text"></i>{:getCategory(40,'catname')}</button>
  138. <button class="download-tab" type="button" data-tab="firmware"><i class="bi bi-cpu"></i>{:getCategory(57,'catname')}</button>
  139. </div>
  140. <div class="download-tab-panel active" id="download-tab-app">
  141. {yzn module="cms" action="lists" catid="42" order="listorder DESC,id ASC" num="1" return="xtugoAppData" moreinfo="1"}
  142. {volist name="xtugoAppData" id="vo"}
  143. <div class="download-app-panel">
  144. <div>
  145. <span class="download-pill">XTU GO {:getCategory(42,'catname')}</span>
  146. <h3>{$vo.title|default='XTU GO'}</h3>
  147. <p>{$vo.description|default=cms_t('xtugo_app_default_desc','配套移动应用,支持设备连接、素材管理、教程与服务支持。')}</p>
  148. </div>
  149. <div class="xtugo-store-list download-store-list">
  150. <a class="xtugo-store-btn xtugo-store-btn-android" href="{$vo.andiordurl|default='#'}" target="_blank" rel="noopener"><span class="xtugo-store-icon"><i class="bi bi-android2"></i></span><span class="xtugo-store-copy"><small>{:cms_t('download_for','Download for')}</small><strong>Android</strong></span></a>
  151. <a class="xtugo-store-btn xtugo-store-btn-ios" href="{$vo.appstore|default='#'}" target="_blank" rel="noopener"><span class="xtugo-store-icon"><i class="bi bi-apple"></i></span><span class="xtugo-store-copy"><small>{:cms_t('download_on_the','Download on the')}</small><strong>App Store</strong></span></a>
  152. </div>
  153. </div>
  154. {/volist}
  155. {/yzn}
  156. </div>
  157. <div class="download-tab-panel" id="download-tab-manual">
  158. <div class="download-file-grid compact">
  159. {yzn module="cms" action="lists" catid="40" where="$downloadDocWhere" order="listorder DESC,publish_time DESC,id DESC" num="30" return="manualFiles" moreinfo="1"}
  160. {volist name="manualFiles" id="vo"}
  161. <article class="download-file-card">
  162. <div class="download-file-icon"><i class="bi bi-file-earmark-pdf"></i></div>
  163. <div class="download-file-copy"><h3>{$vo.title}</h3><p>{:date('Y-m-d',$vo.publish_time)}</p></div>
  164. <a href="{if !empty($vo.fileaddress)}{$vo.fileaddress}{else /}{$vo.url}{/if}" target="_blank" rel="noopener" class="download-file-action">{:cms_t('download','下载')}</a>
  165. </article>
  166. {/volist}
  167. {/yzn}
  168. </div>
  169. </div>
  170. <div class="download-tab-panel" id="download-tab-firmware">
  171. <div class="download-file-grid compact">
  172. {yzn module="cms" action="lists" catid="57" where="$downloadFirmwareWhere" order="listorder DESC,publish_time DESC,id DESC" num="30" return="firmwareFiles" moreinfo="1"}
  173. {volist name="firmwareFiles" id="vo"}
  174. <article class="download-file-card">
  175. <div class="download-file-icon"><i class="bi bi-hdd-network"></i></div>
  176. <div class="download-file-copy"><h3>{$vo.title}</h3><p>{:date('Y-m-d',$vo.publish_time)}</p></div>
  177. <a href="{$vo.fileaddress}" target="_blank" rel="noopener" class="download-file-action">{:cms_t('download','下载')}</a>
  178. </article>
  179. {/volist}
  180. {/yzn}
  181. </div>
  182. </div>
  183. </div>
  184. {/if}
  185. </div>
  186. </div>
  187. </section>
  188. {include file="footer-links" /}
  189. </main>
  190. <script>
  191. document.body.classList.add('download-category-body');
  192. (function () {
  193. var siteHeader = document.getElementById('siteHeader');
  194. var syncTopbarPosition = function () {
  195. if (!siteHeader) return;
  196. var headerRect = siteHeader.getBoundingClientRect();
  197. document.documentElement.style.setProperty('--xtu-header-height', Math.max(0, Math.ceil(headerRect.bottom)) + 'px');
  198. };
  199. syncTopbarPosition();
  200. window.addEventListener('load', syncTopbarPosition);
  201. window.addEventListener('resize', syncTopbarPosition);
  202. window.addEventListener('scroll', syncTopbarPosition, { passive: true });
  203. if (window.ResizeObserver && siteHeader) { new ResizeObserver(syncTopbarPosition).observe(siteHeader); }
  204. })();
  205. </script>
  206. <script>
  207. document.addEventListener('DOMContentLoaded', function () {
  208. document.querySelectorAll('.download-product-group-title').forEach(function (trigger) {
  209. trigger.addEventListener('click', function () {
  210. var group = trigger.closest('.download-product-group');
  211. if (!group) return;
  212. var isOpen = group.classList.contains('is-open');
  213. document.querySelectorAll('.download-product-group.is-open').forEach(function (item) {
  214. item.classList.remove('is-open');
  215. var itemTrigger = item.querySelector('.download-product-group-title');
  216. if (itemTrigger) itemTrigger.setAttribute('aria-expanded', 'false');
  217. });
  218. if (!isOpen) {
  219. group.classList.add('is-open');
  220. trigger.setAttribute('aria-expanded', 'true');
  221. }
  222. });
  223. });
  224. document.querySelectorAll('.download-tab').forEach(function (tab) {
  225. tab.addEventListener('click', function () {
  226. var name = tab.getAttribute('data-tab');
  227. document.querySelectorAll('.download-tab').forEach(function (item) { item.classList.remove('active'); });
  228. document.querySelectorAll('.download-tab-panel').forEach(function (panel) { panel.classList.remove('active'); });
  229. tab.classList.add('active');
  230. var target = document.getElementById('download-tab-' + name);
  231. if (target) target.classList.add('active');
  232. });
  233. });
  234. });
  235. </script>
  236. {include file="footer" /}