li.shaoyi před 2 roky
rodič
revize
32f90e139d

binární
ios/thjzsx_Aoc_Profile.mobileprovision


+ 3 - 3
src/packages/mobile/views/home/components/main/index.vue

@@ -43,8 +43,8 @@
           </li>
         </ul>
       </app-block>
-      <app-block class="home-main__market" v-if="spotQuoteList.length">
-        <section class="scrollbar">
+      <app-block class="home-main__market">
+        <section class="scrollbar" v-if="spotQuoteList.length">
           <h4 class="scrollbar-title">
             <img src="@mobile/assets/icons/spot.png" />
             <span>现货行情</span>
@@ -68,7 +68,7 @@
             </SwipeItem>
           </Swipe>
         </section>
-        <section class="scrollbar">
+        <section class="scrollbar" v-if="dataList.length">
           <h4 class="scrollbar-title">
             <img src="@mobile/assets/icons/futures.png" />
             <span>期货行情</span>

+ 3 - 1
src/packages/mobile/views/rules/ccwl/index.vue

@@ -22,12 +22,14 @@
 <script lang="ts" setup>
 import { Tab, Tabs, Button } from 'vant'
 import { defineAsyncComponent } from 'vue'
+import { getServiceUrl } from '@/services/http'
 import plus from '@/utils/h5plus'
 
 const asyncComponent = defineAsyncComponent(() => import('@mobile/components/base/html-panel/index.vue'))
 
 const download = () => {
-    plus.openFile('./html/yswtmb.docx')
+    const url = getServiceUrl('mobileOpenUrl')
+    plus.openURL(url + '/html/yswtmb.docx')
 }
 </script>
 

+ 3 - 1
src/packages/mobile/views/rules/cght/index.vue

@@ -14,9 +14,11 @@
 
 <script lang="ts" setup>
 import { Button } from 'vant'
+import { getServiceUrl } from '@/services/http'
 import plus from '@/utils/h5plus'
 
 const download = () => {
-  plus.openFile('./html/ht_cg.docx')
+  const url = getServiceUrl('mobileOpenUrl')
+  plus.openURL(url + '/html/ht_cg.docx')
 }
 </script>

+ 5 - 3
src/packages/mobile/views/rules/xhht/index.vue

@@ -6,11 +6,11 @@
     <div style="padding: .2rem;">
       <div style="text-align: center;background-color: #fff;padding: 1rem 0;margin-bottom: .2rem;">
         <h4 style="margin-bottom: .32rem;">现货贸易合同(买方).docx</h4>
-        <Button type="primary" style="width: 50%;" round @click="download('./html/ht_xh_b.docx')">下载文档</Button>
+        <Button type="primary" style="width: 50%;" round @click="download('/html/ht_xh_b.docx')">下载文档</Button>
       </div>
       <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
         <h4 style="margin-bottom: .32rem;">现货贸易合同(卖方).docx</h4>
-        <Button type="primary" style="width: 50%;" round @click="download('./html/ht_xh_s.docx')">下载文档</Button>
+        <Button type="primary" style="width: 50%;" round @click="download('/html/ht_xh_s.docx')">下载文档</Button>
       </div>
     </div>
   </app-view>
@@ -18,9 +18,11 @@
 
 <script lang="ts" setup>
 import { Button } from 'vant'
+import { getServiceUrl } from '@/services/http'
 import plus from '@/utils/h5plus'
 
 const download = (filePath: string) => {
-  plus.openFile(filePath)
+  const url = getServiceUrl('mobileOpenUrl')
+  plus.openURL(url + filePath)
 }
 </script>

+ 3 - 1
src/packages/mobile/views/rules/zrht/index.vue

@@ -14,9 +14,11 @@
 
 <script lang="ts" setup>
 import { Button } from 'vant'
+import { getServiceUrl } from '@/services/http'
 import plus from '@/utils/h5plus'
 
 const download = () => {
-  plus.openFile('./html/ht_zr.docx')
+  const url = getServiceUrl('mobileOpenUrl')
+  plus.openURL(url + '/html/ht_zr.docx')
 }
 </script>

+ 15 - 1
src/utils/h5plus/index.ts

@@ -225,7 +225,7 @@ export default new (class {
     }
 
     /**
-     * 打开本地文件
+     * 打开本地文件(安卓正式包可能无效)
      * https://www.html5plus.org/doc/zh_cn/runtime.html#plus.runtime.openFile
      * @param filePath 
      */
@@ -240,6 +240,20 @@ export default new (class {
     }
 
     /**
+     * https://www.html5plus.org/doc/zh_cn/runtime.html#plus.runtime.openURL
+     * @param url 
+     */
+    openURL(url: string) {
+        if (this.hasPlus()) {
+            this.onPlusReady((plus) => {
+                plus.runtime.openURL(url)
+            })
+        } else {
+            window.open(url)
+        }
+    }
+
+    /**
      * 读取本地文件内容
      * @param filePath 
      * @returns