|
@@ -38,10 +38,11 @@ import { useComponent } from '@/hooks/component'
|
|
|
import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
|
|
import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
|
|
|
import { useFuturesStore, useUserStore } from '@/stores'
|
|
import { useFuturesStore, useUserStore } from '@/stores'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
-import { queryQuoteGoodsList } from '@/services/api/swap'
|
|
|
|
|
|
|
+import { queryQuoteGoodsList, queryMdUserSwapProtocol } from '@/services/api/swap'
|
|
|
import quoteSocket from '@/services/websocket/quote'
|
|
import quoteSocket from '@/services/websocket/quote'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
+import { getUserId } from '@/services/methods/user'
|
|
|
|
|
|
|
|
const subscribe = quoteSocket.createSubscribe()
|
|
const subscribe = quoteSocket.createSubscribe()
|
|
|
const futuresStore = useFuturesStore()
|
|
const futuresStore = useFuturesStore()
|
|
@@ -54,6 +55,13 @@ const componentMap = new Map<string, unknown>([
|
|
|
['detail', defineAsyncComponent(() => import('./detail/index.vue'))], // 详情
|
|
['detail', defineAsyncComponent(() => import('./detail/index.vue'))], // 详情
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
|
|
+/// 查询用户掉期协议签署表
|
|
|
|
|
+const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
|
|
|
|
|
+ params: {
|
|
|
|
|
+ userId: getUserId()
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const { dataList, run } = useRequest(queryQuoteGoodsList, {
|
|
const { dataList, run } = useRequest(queryQuoteGoodsList, {
|
|
|
manual: true,
|
|
manual: true,
|
|
|
params: {
|
|
params: {
|
|
@@ -110,9 +118,13 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
const onRowClick = (row: Model.QuoteGoodsListRsp) => {
|
|
const onRowClick = (row: Model.QuoteGoodsListRsp) => {
|
|
|
/// 这里要去判断是否已经实名认证
|
|
/// 这里要去判断是否已经实名认证
|
|
|
if (userStore.hasAuth) {
|
|
if (userStore.hasAuth) {
|
|
|
- futuresStore.selectedGoodsId = row.refgoodsid
|
|
|
|
|
- selectedRow.value = row
|
|
|
|
|
- openComponent('detail')
|
|
|
|
|
|
|
+ if (protocolList.value.length != 0) {
|
|
|
|
|
+ futuresStore.selectedGoodsId = row.refgoodsid
|
|
|
|
|
+ selectedRow.value = row
|
|
|
|
|
+ openComponent('detail')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage('请前往手机App进入‘我的’-’合同签署‘功能,进行签署相应的合同条例才能进行交易!')
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage('未实名认证,请先去实名认证,如果已提交实名认证,请耐心等待审核通过!')
|
|
ElMessage('未实名认证,请先去实名认证,如果已提交实名认证,请耐心等待审核通过!')
|
|
|
}
|
|
}
|