|
@@ -1,48 +1,48 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
|
|
|
|
|
- <app-view class="pricing-detail g-form">
|
|
|
|
|
- <template #header>
|
|
|
|
|
- <app-navbar :title="quote ? quote.goodscode + '/' + quote.goodsname : $t('quote.listinghall')" @back="closed" />
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <app-view class="market-detail">
|
|
|
|
|
+ <template v-if="isShow">
|
|
|
<component :is="Price" v-bind="{ goodsCode }" />
|
|
<component :is="Price" v-bind="{ goodsCode }" />
|
|
|
<component :is="Chart" v-bind="{ goodsCode }" />
|
|
<component :is="Chart" v-bind="{ goodsCode }" />
|
|
|
- </app-view>
|
|
|
|
|
- </app-modal>
|
|
|
|
|
|
|
+ <component :is="Tik" v-bind="{ goodsCode }" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { useFuturesStore } from '@/stores'
|
|
|
|
|
-import { shallowRef, defineAsyncComponent } from 'vue'
|
|
|
|
|
-import AppModal from '@/components/base/modal/index.vue'
|
|
|
|
|
|
|
+import { defineAsyncComponent, onMounted, PropType, shallowRef, watch,nextTick } from 'vue'
|
|
|
|
|
+import { useNavigation } from '@mobile/router/navigation'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
- goodsCode: {
|
|
|
|
|
- type: String,
|
|
|
|
|
|
|
+ quote: {
|
|
|
|
|
+ type: Object as PropType<Model.GoodsQuote>,
|
|
|
required: true
|
|
required: true
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-// 是否刷新父组件数据
|
|
|
|
|
-const refresh = shallowRef(true)
|
|
|
|
|
-const showModal = shallowRef(true)
|
|
|
|
|
-const futuresStore = useFuturesStore()
|
|
|
|
|
-const quote = futuresStore.getGoodsQuote(props.goodsCode)
|
|
|
|
|
-
|
|
|
|
|
const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
|
|
const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
|
|
|
const Chart = defineAsyncComponent(() => import('@mobile/components/modules/hqchart/index.vue'))
|
|
const Chart = defineAsyncComponent(() => import('@mobile/components/modules/hqchart/index.vue'))
|
|
|
|
|
+const Tik = defineAsyncComponent(() => import('@mobile/components/modules/quote/tik/index.vue'))
|
|
|
|
|
+
|
|
|
|
|
+const { getQueryString } = useNavigation()
|
|
|
|
|
+const isShow = shallowRef(true)
|
|
|
|
|
|
|
|
-// 关闭弹窗
|
|
|
|
|
-const closed = (isRefresh = false) => {
|
|
|
|
|
- refresh.value = isRefresh
|
|
|
|
|
- showModal.value = false
|
|
|
|
|
-}
|
|
|
|
|
|
|
+const goodsCode = shallowRef('')
|
|
|
|
|
|
|
|
-// 暴露组件属性给父组件调用
|
|
|
|
|
-defineExpose({
|
|
|
|
|
- closed,
|
|
|
|
|
|
|
+watch(() => props.quote, (val) => {
|
|
|
|
|
+ isShow.value=false
|
|
|
|
|
+ goodsCode.value = val.goodscode
|
|
|
|
|
+ nextTick(()=>{
|
|
|
|
|
+ isShow.value=true
|
|
|
|
|
+ })
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ const code = getQueryString('goodscode')
|
|
|
|
|
+ if ( code != '' && code != undefined ) {
|
|
|
|
|
+ goodsCode.value = code ?? ''
|
|
|
|
|
+ } else {
|
|
|
|
|
+ goodsCode.value = props.quote.goodscode
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
-</script>
|
|
|
|
|
|
|
|
|
|
-<style lang="less">
|
|
|
|
|
-@import './index.less';
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+</script>
|