li.shaoyi пре 2 година
родитељ
комит
350add0c96

+ 14 - 4
src/hooks/hqchart/candlestick/dataset.ts

@@ -66,7 +66,7 @@ export function useDataset(goodsCode: string, cycleType = ChartCycleType.Minutes
             const preclose = data[i - 1] // 上一个收盘价
             const close = preclose ? preclose.c : e.c
             switch (protocol) {
-                // https://blog.csdn.net/jones2000/article/details/100557649
+                // https://blog.csdn.net/jones2000/article/details/103966271
                 case networkProtocol.historyData:
                     return [
                         date, // 日期
@@ -79,7 +79,7 @@ export function useDataset(goodsCode: string, cycleType = ChartCycleType.Minutes
                         e.tt || null, // 成交金额
                         e.hv || null // 持仓量
                     ]
-                // https://blog.csdn.net/jones2000/article/details/100557649
+                // https://blog.csdn.net/jones2000/article/details/103882063
                 case networkProtocol.historyMinuteData:
                     return [
                         date, // 日期
@@ -174,8 +174,18 @@ export function useDataset(goodsCode: string, cycleType = ChartCycleType.Minutes
             }
 
             const lastValue = cache.value.slice(-1)
-            if (state.cycleType === ChartCycleType.Day) {
-                return handleChartData(networkProtocol.historyData, lastValue)
+            if ([ChartCycleType.Day, ChartCycleType.Week, ChartCycleType.Month].includes(state.cycleType)) {
+                // https://blog.csdn.net/jones2000/article/details/106064879
+                return lastValue.map((e) => ({
+                    symbol: state.symbol,
+                    date: Number(moment(e.ts).format('YYYYMMDD')),
+                    price: e.c,
+                    open: e.o,
+                    high: e.h,
+                    low: e.l,
+                    vol: e.tv,
+                    amount: e.tt || null
+                }))
             }
             return handleChartData(networkProtocol.historyMinuteData, lastValue)
         }

+ 7 - 2
src/packages/mobile/components/base/uploader/index.vue

@@ -1,11 +1,12 @@
 <template>
-    <Uploader v-model="fileList" :max-count="1" :max-size="5 * 1024 * 1024" @oversize="onOversize" :after-read="afterRead"
-        @delete="onDelete" />
+    <Uploader v-model="fileList" :max-count="1" :max-size="5 * 1024 * 1024" @click-upload="onClickUpload"
+        @oversize="onOversize" :after-read="afterRead" @delete="onDelete" />
 </template>
 
 <script lang="ts" setup>
 import { ref } from 'vue'
 import { showFailToast, Uploader, UploaderFileListItem } from 'vant'
+import plus from '@/utils/h5plus'
 import service from '@/services'
 import axios from 'axios'
 
@@ -16,6 +17,10 @@ const onOversize = () => {
     showFailToast('图片大小不能超过 5Mb')
 }
 
+const onClickUpload = (e: MouseEvent) => {
+    plus.checkPermission()
+}
+
 // eslint-disable-next-line
 const afterRead = (file: any) => {
     const data = new FormData()

+ 11 - 4
src/packages/mobile/components/modules/hqchart/candlestick/index.vue

@@ -177,10 +177,17 @@ quoteWatch(props.goodsCode, (q) => {
     const { JSChartContainer } = chartInstance.value ?? {}
     // 在 SetOption 之后才会出现 JSChartContainer 属性
     if (JSChartContainer && data.length) {
-        JSChartContainer.RecvMinuteRealtimeDataV2({
-            symbol: props.symbol,
-            data
-        })
+        if ([0, 1, 2].includes(period.value)) {
+            JSChartContainer.RecvRealtimeData({
+                symbol: props.symbol,
+                stock: data
+            })
+        } else {
+            JSChartContainer.RecvMinuteRealtimeDataV2({
+                symbol: props.symbol,
+                data
+            })
+        }
     }
 })
 

+ 41 - 44
src/packages/mobile/views/order/position/components/swap/close/Index.vue

@@ -3,16 +3,12 @@
     <app-modal direction="right-top" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="掉期持仓-明细" @back="closed" />
+                <app-navbar :title="`${selectedRow.goodscode}/${selectedRow.goodsname}`" @back="closed" />
             </template>
-            <div style="padding: 0.15rem 0.2rem; color: #333;">
-                <span>商品:{{ selectedRow.goodsname }}/{{ selectedRow.goodscode }}</span>
-                <span>{{ lastPrice }}</span>
-            </div>
             <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error"
                 v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="run">
                 <div class="g-order-list">
-                    <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                    <div class="g-order-list__box" v-for="(item, index) in computedList" :key="index">
                         <div class="g-order-list__titlebar">
                             <div class="left">
                                 <h4>{{ item.tradeid }}</h4>
@@ -24,33 +20,36 @@
                         <div class="g-order-list__content">
                             <ul>
                                 <li>
-                                    <span>持有数量</span>
-                                    <span>{{ formatDecimal(item.holderqty) }}</span>
+                                    <span>持有数量</span>
+                                    <span>{{ item.holderqty }}</span>
                                 </li>
                                 <li>
-                                    <span>持仓均价</span>
+                                    <span>持仓均价</span>
                                     <span>{{ formatDecimal(item.holderprice) }}</span>
                                 </li>
                                 <li>
-                                    <span>可用数量</span>
-                                    <span>{{ formatDecimal(item.holderqty - item.freezeqty) }}</span>
+                                    <span>可用数量</span>
+                                    <span>{{ item.holderqty - item.freezeqty }}</span>
                                 </li>
                                 <li>
-                                    <span>持仓金额</span>
+                                    <span>持仓金额</span>
                                     <span>{{ formatDecimal(item.holderamount) }}</span>
                                 </li>
                                 <li>
-                                    <span>到期日</span>
+                                    <span>到期日</span>
                                     <span>{{ formatDate(item.expiredate, 'YYYY/MM/DD') }}</span>
                                 </li>
                                 <li>
-                                    <span>参考损益:</span>
-                                    <span :class="handlePriceColor(closepl(item))">{{ formatDecimal(closepl(item)) }}</span>
+                                    <span>参考损益</span>
+                                    <span :class="handlePriceColor(item.closepl)">
+                                        {{ formatDecimal(item.closepl, quote?.decimalplace) }}
+                                    </span>
                                 </li>
                             </ul>
                         </div>
                         <div class="g-order-list__btnbar">
-                            <Button size="small" v-if="useStore.userType === 5" @click="onCloseSubmit(item)" round>平仓</Button>
+                            <Button size="small" v-if="useStore.userType === 5" @click="onCloseSubmit(item)"
+                                round>平仓</Button>
                         </div>
                     </div>
                 </div>
@@ -60,48 +59,39 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType, computed, onMounted } from 'vue'
+import { shallowRef, PropType, computed } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryTradeHolderDetail } from '@/services/api/order'
 import { ETradeMode } from '@/constants/client';
 import { Button } from 'vant'
 import { getBuyOrSellName } from '@/constants/order'
-import { formatDate, formatDecimal, handleRequestBigNumber, handlePriceColor } from '@/filters'
+import { formatDate, formatDecimal, handleRequestBigNumber, handlePriceColor, round } from '@/filters'
 import { useHolderClose } from '@/business/trade'
 import { dialog, fullloading } from '@/utils/vant'
 import { useFuturesStore, useUserStore } from '@/stores'
 import { BuyOrSell } from '@/constants/order'
-import quoteSocket from '@/services/websocket/quote'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.TradePositionRsp>,
+        required: true,
+    }
+})
+
 const futuresStore = useFuturesStore()
 const dataList = shallowRef<Model.TradeHolderDetailRsp[]>([])
 const showModal = shallowRef(true)
 /// 是否刷新父组件数据
 const refresh = shallowRef(false)
 const error = shallowRef(false)
-const subscribe = quoteSocket.createSubscribe()
 const useStore = useUserStore()
 const { holderCloseSubmit, formData } = useHolderClose()
 
-const props = defineProps({
-    selectedRow: {
-        type: Object as PropType<Model.TradePositionRsp>,
-        required: true,
-    }
-})
 /// 当前行情
+const refQuote = futuresStore.getGoodsQuote(props.selectedRow.refgoodscode)
 const quote = futuresStore.getGoodsQuote(props.selectedRow.goodscode)
-// 损益
-const closepl = (row: Model.TradeHolderDetailRsp) => {
-    const { presettle = 0, last = 0 } = quote.value ?? {}
-    const { holderqty, holderamount, agreeunit, buyorsell } = row
-    const price = last || presettle // 没有最新价取昨结价
-    // 计算市值 = 现价 * 数量 * 合约单位
-    const marketValue = price ? price * holderqty * agreeunit : 0
-    return price ? (marketValue - holderamount) * (buyorsell === BuyOrSell.Buy ? 1 : -1) : 0
-}
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryTradeHolderDetail, {
     params: {
@@ -120,19 +110,28 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryTradeHolderDetail
             dataList.value = []
         }
         dataList.value.push(...res.data)
-        /// 订阅行情
-        subscribe.start(props.selectedRow.refgoodscode)
     },
     onError: () => {
         error.value = true
     }
 })
 
-const lastPrice = computed(() => {
-    const quote = futuresStore.getGoodsQuote(props.selectedRow.refgoodscode)
-    const { last } = quote.value ?? {}
-    return last
-})
+const computedList = computed(() => dataList.value.map((item) => {
+    const last = refQuote.value?.last || quote.value?.last || 0 // 有 refgoodscode 的优先取 refgoodscode 行情
+    const presettle = quote.value?.presettle || 0
+    const price = last || presettle // 没有最新价取昨结价
+
+    // 计算市值 = 现价 * 数量 * 合约单位
+    const marketValue = price ? price * item.holderqty * item.agreeunit : 0
+    const roundedMarketValue = round(marketValue, quote.value?.decimalplace)
+    // 计算浮动盈亏
+    const closepl = price ? (roundedMarketValue - item.holderamount) * (item.buyorsell === BuyOrSell.Buy ? 1 : -1) : 0
+
+    return {
+        ...item,
+        closepl
+    }
+}))
 
 const onCloseSubmit = (row: Model.TradeHolderDetailRsp) => {
     dialog({
@@ -163,8 +162,6 @@ const closed = (isRefresh = false) => {
     showModal.value = false
 }
 
-onMounted(() => subscribe.stop())
-
 // 暴露组件属性给父组件调用
 defineExpose({
     closed,

+ 14 - 24
src/packages/mobile/views/order/position/components/swap/list/Index.vue

@@ -13,32 +13,33 @@
                 </div>
                 <div class="g-order-list__content">
                     <ul>
-                        <li :class="lastColor(item.refgoodscode)">{{ last(item.refgoodscode) }}</li>
-                    </ul>
-                    <ul>
                         <li>
-                            <span>持有数量:</span>
+                            <span>持仓均价</span>
+                            <span>{{ handleNumberValue(formatDecimal(item.averageprice)) }}</span>
+                        </li>
+                        <li>
+                            <span>持有数量</span>
                             <span>{{ item.curpositionqty }}</span>
                         </li>
                         <li>
-                            <span>持仓均价:</span>
-                            <span>{{ handleNumberValue(formatDecimal(item.averageprice)) }}</span>
+                            <span>持仓金额</span>
+                            <span>{{ formatDecimal(item.curholderamount) }}</span>
                         </li>
                         <li>
-                            <span>冻结数量</span>
+                            <span>冻结数量</span>
                             <span>{{ item.frozenqty }}</span>
                         </li>
                         <li>
-                            <span>持仓金额:</span>
-                            <span>{{ formatDecimal(item.curholderamount) }}</span>
+                            <span>参考价格</span>
+                            <span :class="item.lastColor">{{ handleNumberValue(item.lastprice) }}</span>
                         </li>
                         <li>
-                            <span>可用数量</span>
+                            <span>可用数量</span>
                             <span>{{ item.enableqty }}</span>
                         </li>
                         <li>
-                            <span>参考损益</span>
-                            <span :class="handlePriceColor(item.closepl, 0)">
+                            <span>参考损益</span>
+                            <span :class="item.closeplColor">
                                 {{ formatDecimal(item.closepl, item.decimalplace) }}
                             </span>
                         </li>
@@ -60,29 +61,18 @@ import { Button } from 'vant'
 import { useComponent } from '@/hooks/component'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getBuyOrSellName } from '@/constants/order'
-import { formatDecimal, handleNumberValue, handlePriceColor } from '@/filters'
+import { formatDecimal, handleNumberValue } from '@/filters'
 import { usePosition } from '@/business/position'
-import { useFuturesStore } from '@/stores'
 import eventBus from '@/services/bus'
 
 const componentMap = new Map<string, unknown>([
     ['close', defineAsyncComponent(() => import('../close/Index.vue'))],
 ])
 
-const futuresStore = useFuturesStore()
-
 const { positionList, loading } = usePosition(46)
 const selectedRow = shallowRef<Model.TradePositionRsp>()
 const pullRefreshRef = shallowRef()
 
-const last = (goodsCode: string) => {
-    return futuresStore.getQuotePrice(goodsCode)
-}
-
-const lastColor = (goodsCode: string) => {
-    return futuresStore.getGoodsQuote(goodsCode).value?.lastColor
-}
-
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
     pullRefreshRef.value?.refresh()
 })

+ 13 - 0
src/packages/mobile/views/swap/detail/components/delisting/Index.less

@@ -0,0 +1,13 @@
+.swap-delisting {
+  &__form {
+      .van-stepper {
+          display: flex;
+          align-items: center;
+          width: 100%;
+
+          &__input {
+              flex: 1;
+          }
+      }
+  }
+}

+ 18 - 1
src/packages/pc/components/base/drawer/index.less

@@ -74,7 +74,24 @@
 
     .app-table .el-table {
         --el-table-header-text-color: #88a0ae; // 表头文字颜色
-        --el-table-header-bg-color: transparent; // 表头背景颜色
+        --el-table-header-bg-color: #0f1a25; // 表头背景颜色
         --el-table-border-color: #213141; // 表格边框颜色
+
+        .el-table-fixed-column {
+
+            &--left,
+            &--right {
+                --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, .7);
+            }
+        }
+
+
+        td.el-table-fixed-column {
+
+            &--left,
+            &--right {
+                --el-bg-color: #0f1a25; // 非全局待处理
+            }
+        }
     }
 }

+ 44 - 59
src/packages/pc/views/footer/swap/position/close/index.vue

@@ -1,65 +1,58 @@
 <!-- 掉期市场-持仓汇总-平仓 -->
 <template>
-    <app-drawer title="明细" v-model:show="show" :width="1200" :loading="loading" :refresh="refresh">
-        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
-        :expand-row-keys="expandKeys" @row-click="rowClick">
-            <!-- 商品代码/名称 -->
-            <template #goodsname="{ row }">
-                {{ row.goodscode }}/{{ row.goodsname }}
-            </template>
+    <app-drawer :title="`${position.goodscode}/${position.goodsname}`" v-model:show="show" :width="1200" :loading="loading"
+        :refresh="refresh">
+        <app-table :data="computedList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+            :expand-row-keys="expandKeys" @row-click="rowClick">
             <!-- 方向 -->
             <template #buyorsell="{ value }">
                 {{ getBuyOrSellName(value) }}
             </template>
-            <!-- 最新价 -->
+            <!-- 持仓金额 -->
             <template #holderamount="{ value }">
-                <span>
-                    {{ formatDecimal(value) }}
-                </span>
+                {{ formatDecimal(value) }}
             </template>
             <!-- 可用数量 -->
             <template #enableqty="{ row }">
-                {{ row.holderqty - row.freezeqty  }}
+                {{ row.holderqty - row.freezeqty }}
             </template>
             <!-- 到期日 -->
             <template #expiredate="{ value }">
-                <span>{{ formatDate(value, 'YYYY/MM/DD') }}</span>
+                {{ formatDate(value, 'YYYY/MM/DD') }}
             </template>
             <!-- 平仓盈亏 -->
             <template #closepl="{ row }">
-                <span :class="handlePriceColor(closepl(row))">{{ formatDecimal(closepl(row)) }}</span>
+                <span :class="handlePriceColor(row.closepl)">{{ formatDecimal(row.closepl, quote?.decimalplace) }}</span>
             </template>
-            <!-- 展开行 -->
-            <template v-if="useStore.userType === 5"  #expand="{ row }">
-                <div class="buttonbar">
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <div class="buttonbar" v-if="useStore.userType === 5">
                     <el-button type="danger" size="small" @click="onCloseSubmit(row)">平仓</el-button>
                 </div>
+                <span v-else>--</span>
             </template>
         </app-table>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="info" @click="show = false">取消</el-button>
         </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, ref, PropType } from 'vue'
+import { shallowRef, ref, PropType, computed } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { useComposeTable } from '@pc/components/base/table'
 import { useRequest } from '@/hooks/request'
 import { useHolderClose } from '@/business/trade'
 import { queryTradeHolderDetail } from '@/services/api/order'
-import { formatDate, formatDecimal, handlePriceColor, handleRequestBigNumber } from '@/filters'
+import { formatDate, formatDecimal, handlePriceColor, handleRequestBigNumber, round } from '@/filters'
 import { getBuyOrSellName } from '@/constants/order'
 import { ETradeMode } from '@/constants/client'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppTable from '@pc/components/base/table/index.vue'
-import quoteSocket from '@/services/websocket/quote'
 import { useFuturesStore, useUserStore } from '@/stores'
 import { BuyOrSell } from '@/constants/order'
 
-const { rowKey, expandKeys, rowClick } = useComposeTable<Model.TradeHolderDetailRsp>({ rowKey: 'tradeid' })
-
 const props = defineProps({
     position: {
         type: Object as PropType<Model.TradePositionRsp>,
@@ -67,18 +60,19 @@ const props = defineProps({
     }
 })
 
+const { rowKey, expandKeys, rowClick } = useComposeTable<Model.TradeHolderDetailRsp>({ rowKey: 'tradeid' })
+
+const { holderCloseSubmit, formData } = useHolderClose()
 const show = ref(true)
 const refresh = ref(false)
-const dataList = shallowRef<Model.TradeHolderDetailRsp[]>([])
-const error = shallowRef(false)
-const subscribe = quoteSocket.createSubscribe()
-const { holderCloseSubmit, formData } = useHolderClose()
-const futuresStore = useFuturesStore()
-const quote = futuresStore.getGoodsQuote(props.position.refgoodscode)
 const useStore = useUserStore()
-const { loading, pageIndex } = useRequest(queryTradeHolderDetail, {
+const futuresStore = useFuturesStore()
+
+const refQuote = futuresStore.getGoodsQuote(props.position.refgoodscode)
+const quote = futuresStore.getGoodsQuote(props.position.goodscode)
+
+const { dataList, loading, run } = useRequest(queryTradeHolderDetail, {
     params: {
-        pagesize: 20,
         /// 交易模式, 格式 1,2,3
         trademodes: ETradeMode.TRADEMODE_TJMD.toString(),
         /// marketid
@@ -87,33 +81,28 @@ const { loading, pageIndex } = useRequest(queryTradeHolderDetail, {
         goodsid: props.position.goodsid,
         /// 买卖方向 0-买 1-卖
         buyorsell: props.position.buyorsell
-    },
-    onSuccess: (res) => {
-        if (pageIndex.value === 1) {
-            dataList.value = []
-        }
-        dataList.value.push(...res.data)
-        /// 订阅行情
-        subscribe.start(props.position.refgoodscode)
-    },
-    onError: () => {
-        error.value = true
     }
 })
 
-// 损益
-const closepl = (row: Model.TradeHolderDetailRsp) => {
-    const { presettle = 0, last = 0 } = quote.value ?? {}
-    const { holderqty, holderamount, agreeunit, buyorsell } = row
+const computedList = computed(() => dataList.value.map((item) => {
+    const last = refQuote.value?.last || quote.value?.last || 0 // 有 refgoodscode 的优先取 refgoodscode 行情
+    const presettle = quote.value?.presettle || 0
     const price = last || presettle // 没有最新价取昨结价
+
     // 计算市值 = 现价 * 数量 * 合约单位
-    const marketValue = price ? price * holderqty * agreeunit : 0
-    return price ? (marketValue - holderamount) * (buyorsell === BuyOrSell.Buy ? 1 : -1) : 0
-}
+    const marketValue = price ? price * item.holderqty * item.agreeunit : 0
+    const roundedMarketValue = round(marketValue, quote.value?.decimalplace)
+    // 计算浮动盈亏
+    const closepl = price ? (roundedMarketValue - item.holderamount) * (item.buyorsell === BuyOrSell.Buy ? 1 : -1) : 0
+
+    return {
+        ...item,
+        closepl
+    }
+}))
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'tradeid', label: '单号' },
-    { prop: 'goodsname', label: '商品代码/名称' },
     { prop: 'buyorsell', label: '方向' },
     { prop: 'holderqty', label: '持有数量' },
     { prop: 'freezeqty', label: '冻结数量' },
@@ -121,17 +110,14 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'holderprice', label: '持仓价格' },
     { prop: 'holderamount', label: '持仓金额' },
     { prop: 'closepl', label: '参考损益' },
-    { prop: 'expiredate', label: '到期日' }
+    { prop: 'expiredate', label: '到期日' },
+    { prop: 'operate', label: '操作', fixed: 'right', width: 100 }
 ])
 
-const onCancel = (isRefresh = false) => {
-    show.value = false
-    refresh.value = isRefresh
-}
-
 const onCloseSubmit = (row: Model.TradeHolderDetailRsp) => {
     ElMessageBox.confirm(
-        '是否立即平仓?'
+        '是否立即平仓?',
+        '提示'
     ).then(() => {
         const { marketid, goodsid, buyorsell, tradeid } = row
         formData.Header = { MarketID: marketid, GoodsID: goodsid }
@@ -142,11 +128,10 @@ const onCloseSubmit = (row: Model.TradeHolderDetailRsp) => {
 
         holderCloseSubmit().then(() => {
             ElMessage.success('提交成功')
-            onCancel(true)
+            run()
         }).catch((err) => {
             ElMessage.error('提交失败:' + err)
         })
     })
 }
-
 </script>

+ 1 - 2
src/packages/pc/views/footer/swap/position/index.vue

@@ -13,7 +13,7 @@
         <!-- 最新价 -->
         <template #lastprice="{ row }">
             <span :class="row.lastColor">
-                {{ handleNumberValue(formatDecimal(row.lastprice, row.decimalplace)) }}
+                {{ handleNumberValue(row.lastprice) }}
             </span>
         </template>
         <!-- 持仓均价 -->
@@ -72,5 +72,4 @@ const showComponent = (componentName: string, row: Model.TradePositionRsp) => {
     selectedRow.value = row
     openComponent(componentName)
 }
-
 </script>

+ 12 - 0
src/utils/h5plus/index.ts

@@ -489,6 +489,18 @@ export default new (class {
     }
 
     /**
+     * 检查运行环境的权限
+     * https://www.html5plus.org/doc/zh_cn/navigator.html#plus.navigator.checkPermission
+     */
+    checkPermission() {
+        this.onPlusReady((plus) => {
+            const res = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
+
+            console.log(res)
+        })
+    }
+
+    /**
      * 请求摄像头权限
      */
     requestPermissionCamera(options: Partial<{ onSuccess: () => void; onError: (message: string) => void; }> = {}) {