list_download.html 13 KB

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