|
|
@@ -48,6 +48,7 @@ import quoteSocket from '@/services/websocket/quote'
|
|
|
import AppList from '@mobile/components/base/list/index.vue'
|
|
|
import { showToast } from 'vant'
|
|
|
import { getUserId } from '@/services/methods/user'
|
|
|
+import { shallowRef } from 'vue'
|
|
|
|
|
|
defineProps({
|
|
|
showBackButton: {
|
|
|
@@ -60,13 +61,7 @@ const { router, setGlobalUrlParams } = useNavigation()
|
|
|
const futuresStore = useFuturesStore()
|
|
|
const userStore = useUserStore()
|
|
|
const subscribe = quoteSocket.createSubscribe()
|
|
|
-
|
|
|
-/// 查询用户掉期协议签署表
|
|
|
-const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
|
|
|
- params: {
|
|
|
- userId: getUserId()
|
|
|
- }
|
|
|
-})
|
|
|
+const canBankSign = shallowRef(false)
|
|
|
|
|
|
const { dataList, run } = useRequest(queryQuoteGoodsList, {
|
|
|
manual: true,
|
|
|
@@ -123,8 +118,7 @@ const columns: Model.TableColumn[] = [
|
|
|
const rowClick = (row: Model.QuoteGoodsListRsp) => {
|
|
|
/// 这里要去判断是否已经实名认证
|
|
|
if (userStore.hasAuth) {
|
|
|
- const list = protocolList.value.filter(e => { return e.protocolstatus === 4 })
|
|
|
- if (userStore.userInfo.usertype != 2 && list.length === 0) {
|
|
|
+ if (userStore.userInfo.usertype != 2 && !canBankSign.value) {
|
|
|
showToast('请先通过“我的”-“合同签署”功能菜单签署相应的合同!')
|
|
|
} else {
|
|
|
setGlobalUrlParams(row)
|
|
|
@@ -142,6 +136,14 @@ onActivated(() => {
|
|
|
} else {
|
|
|
run()
|
|
|
}
|
|
|
+
|
|
|
+ queryMdUserSwapProtocol({
|
|
|
+ data: {
|
|
|
+ userId: getUserId()
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ canBankSign.value = res.data.some(e => e.protocolstatus === 4)
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
onUnmounted(() => subscribe.stop())
|