| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <cwg-header :title="t('Documentary.page_doc.item2')" />
- <view class="info-card">
- <!-- <view class="time-header">-->
- <!-- <text>{{ t('Documentary.console.item2') }}:</text>-->
- <!-- <text class="time-value">{{ time }}</text>-->
- <!-- </view>-->
- <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch" @reset="handleReset" />
- <cwg-tabel ref="tableRef" :columns="currentColumns" :mobilePrimaryFields="mobilePrimaryFields" :immediate="true"
- :queryParams="queryParams" :api="listApi" :show-operation="false" @sort-change="handleSortChange">
- <!-- TOP/推荐 -->
- <template #recommend="{ row }">
- <view v-if="row.top == 1" class="recommend-tag top">TOP</view>
- <view v-else-if="row.recommend == 1" class="recommend-tag green">{{ t('Documentary.tradingCenter.item26') }}
- </view>
- </template>
- <!-- 账户类型 -->
- <template #groupType="{ row }">
- <text v-if="row.groupType == 1">{{ t('AccountType.ClassicAccount') }}</text>
- <text v-else-if="row.groupType == 2">{{ t('AccountType.SeniorAccount') }}</text>
- <text v-else-if="row.groupType == 5 || row.groupType == 6">{{ t('AccountType.SpeedAccount') }}</text>
- <text v-else-if="row.groupType == 7">{{ t('AccountType.StandardAccount') }}</text>
- <text v-else-if="row.groupType == 8">{{ t('AccountType.CentAccount') }}</text>
- <text v-else>--</text>
- </template>
- <!-- 活跃度 -->
- <template #activity="{ row }">
- <text>{{ getActivityText(row.activity) }}</text>
- </template>
- <!-- 查看图表 -->
- <template #view="{ row }">
- <view class="action-icon" @click="toView(row)">
- <cwg-icon name="crm-chart-area" :size="24" color="#000" />
- </view>
- </template>
- <!-- 订阅 -->
- <template #subscribe="{ row }">
- <button class="btn-primary" size="mini" @click="toSubscribe(row)">
- <text>{{ t('Documentary.tradingCenter.item25') }}</text>
- </button>
- </template>
- </cwg-tabel>
- </view>
- <!-- 自动跟随设置弹窗 -->
- <cwg-popup v-model:visible="dialogFllow" type="center" :title="t('Documentary.tradingCenter.item27')"
- :showFooters="true">
- <scroll-view scroll-y class="dia-content" style="max-height: 60vh;">
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.tradingCenter.item27') }}-{{ dialogFllowData1.nickname || '--' }}</text>
- <text class="time">{{ t('Documentary.tradingCenter.item45') }}: {{ time }}</text>
- </view>
- <view class="fllow-info-grid">
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.tradingCenter.item29') }}</text>
- <text class="con">{{ dialogFllowData1.dealLogin }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.console.item3') }}</text>
- <text class="con">{{ dialogFllowData1.dealPlatform || '--' }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.console.item7') }}</text>
- <text class="con">{{ dialogFllowData1.dealBalance || '0.00' }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Label.AccountType') }}</text>
- <text class="con">{{ getAccountTypeText(dialogFllowData1.dealLoginType) }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.console.item6') }}</text>
- <text class="con">{{ dialogFllowData1.dealEquity || '0.00' }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.tradingCenter.item30') }}</text>
- <text class="con">{{ dialogFllowData1.distributionType == 1 ? t('Documentary.TundManagement.item59') : '--'
- }}
- </text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Label.Credit') }}</text>
- <text class="con">{{ dialogFllowData1.dealCredit || '0.00' }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.AgentBackground.item12') }}</text>
- <text class="con">{{ dialogFllowData1.distributionRatio || '0' }}%</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Label.Leverage') }}</text>
- <text class="con">1:{{ dialogFllowData1.dealLeverage || '--' }}</text>
- </view>
- <view class="fllow-content">
- <text class="tit">{{ t('Documentary.tradingCenter.item32') }}</text>
- <text class="con">{{ optObj[dialogFllowData1.settlementCycle] || '--' }}</text>
- </view>
- </view>
- <view class="fllow-title section-title">
- <text class="title">{{ t('Documentary.tradingCenter.item33') }}</text>
- </view>
- <uni-forms ref="formRef" :modelValue="dialogFllowData" :rules="rules" label-position="top" labelWidth="80">
- <view class="form-grid">
- <uni-forms-item :label="t('Documentary.console.item4')" name="followLogin">
- <uni-data-select v-model="dialogFllowData.followLogin" :localdata="followLoginOptions"
- @change="selectLogin"></uni-data-select>
- </uni-forms-item>
- <uni-forms-item :label="t('Documentary.tradingCenter.item34')" name="leverage">
- <uni-easyinput v-model="dialogFllowData.leverage" disabled />
- </uni-forms-item>
- <uni-forms-item :label="t('Documentary.tradingCenter.item35')" name="followType">
- <uni-data-select v-model="dialogFllowData.followType" :localdata="[
- { value: 3, text: t('Documentary.tradingCenter.item118') },
- { value: 2, text: t('Documentary.tradingCenter.item117') },
- { value: 1, text: t('Documentary.tradingCenter.item116') }
- ]"></uni-data-select>
- </uni-forms-item>
- <uni-forms-item v-if="dialogFllowData.followType == 1" :label="t('Documentary.tradingCenter.item119')"
- name="volume">
- <uni-easyinput v-model="dialogFllowData.volume" />
- </uni-forms-item>
- <uni-forms-item v-if="dialogFllowData.followType == 2"
- :label="t('Documentary.tradingCenter.item122') + ' (%)'" name="ratio">
- <uni-easyinput v-model="dialogFllowData.ratio" />
- </uni-forms-item>
- </view>
- <view class="fllow-title section-title">
- <text class="title">{{ t('Documentary.tradingCenter.item37') }}</text>
- <switch :checked="dialogFllowData.protect === 1"
- @change="e => dialogFllowData.protect = e.detail.value ? 1 : 0" color="#368FEC"
- style="transform: scale(0.7)" />
- </view>
- <view class="form-grid" v-if="dialogFllowData.protect === 1">
- <uni-forms-item :label="t('Documentary.tradingCenter.item38')" name="protectType">
- <uni-data-select v-model="dialogFllowData.protectType" :localdata="[
- { value: 1, text: t('Documentary.tradingCenter.item120') }
- ]"></uni-data-select>
- </uni-forms-item>
- <uni-forms-item v-if="dialogFllowData.protectType == 1"
- :label="t('Documentary.tradingCenter.item39') + '($)'" name="protectAmount">
- <uni-easyinput v-model="dialogFllowData.protectAmount" />
- </uni-forms-item>
- <uni-forms-item v-if="dialogFllowData.protectType == 2"
- :label="t('Documentary.tradingCenter.item122') + '(%)'" name="protectRatio">
- <uni-easyinput v-model="dialogFllowData.protectRatio" />
- </uni-forms-item>
- </view>
- <view class="terms-desc">
- <text>{{ t('Documentary.tradingCenter.item130') }}</text>
- </view>
- <uni-forms-item name="agree">
- <label class="agree-label">
- <checkbox :checked="dialogFllowData.agree" @click="dialogFllowData.agree = !dialogFllowData.agree"
- style="transform:scale(0.7)" />
- <text>{{ t('Documentary.tradingCenter.item40') }} -</text>
- <cwg-link type="pdf" title="Documentary.tradingCenter.item41" v-if="['cn', 'zhHant'].indexOf(locale) != -1"
- style="color: #4497ff" url="pdf/CopyTradeUserAgreementcn.pdf" target="_blank" />
- <cwg-link type="pdf" style="color: #4497ff" title="Documentary.tradingCenter.item41"
- url="pdf/CopyTradeUserAgreement.pdf" target="_blank" v-else />
- </label>
- </uni-forms-item>
- </uni-forms>
- </scroll-view>
- <template #footer>
- <button class="cancel-btn" @click="applyFllowCancel">{{ t('Btn.Cancel') }}</button>
- <button class="confirm-btn" type="primary" @click="applyFllow">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- </cwg-page-wrapper>
- </template>
- <script setup lang="ts">
- import { computed, ref, nextTick, onMounted, onUnmounted } from 'vue'
- import { useI18n } from 'vue-i18n'
- import { documentaryApi } from '@/service/documentary'
- import useUserStore from '@/stores/use-user-store'
- import {useFollowEnum} from '@/pages/follow/const/enum'
- const { t, locale } = useI18n()
- const userStore = useUserStore()
- const userInfo = computed(() => userStore.userInfo)
- const {optObj} = useFollowEnum()
- // --- Time fetching ---
- const time = ref('')
- let timer: any = null
- const getLocalTime = () => {
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let year = now.getFullYear()
- let month = String(now.getMonth() + 1).padStart(2, '0')
- let day = String(now.getDate()).padStart(2, '0')
- let hh = String(now.getHours()).padStart(2, '0')
- let mm = String(now.getMinutes()).padStart(2, '0')
- time.value = `${year}/${month}/${day} ${hh}:${mm}`
- }
- const getDate = async () => {
- try {
- let res = await documentaryApi.followDealSignalRefreshDate()
- if (res.code === 200 && res.data) {
- time.value = res.data
- } else {
- getLocalTime()
- }
- } catch (error) {
- getLocalTime()
- }
- }
- onMounted(() => {
- getDate()
- })
- onUnmounted(() => {
- })
- // --- Table Config ---
- const searchParams = ref({
- nickname: '',
- plStart: '', plEnd: '',
- plRateStart: '', plRateEnd: '',
- volumeStart: '', volumeEnd: '',
- winRateStart: '', winRateEnd: '',
- maxDdRateStart: '', maxDdRateEnd: '',
- activityRange: '',
- followsStart: '', followsEnd: '',
- })
- const filterFields = computed(() => [
- { key: 'nickname', type: 'input', label: t('TradingCenter.item13'), placeholder: t('TradingCenter.item13') },
- {
- key: 'plStart',
- type: 'number',
- label: t('TradingCenter.item3') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item3') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'plEnd',
- type: 'number',
- label: t('TradingCenter.item3') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item3') + ' (' + t('TradingCenter.item2') + ')',
- },
- {
- key: 'plRateStart',
- type: 'number',
- label: t('TradingCenter.item4') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item4') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'plRateEnd',
- type: 'number',
- label: t('TradingCenter.item4') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item4') + ' (' + t('TradingCenter.item2') + ')',
- },
- {
- key: 'volumeStart',
- type: 'number',
- label: t('TradingCenter.item5') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item5') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'volumeEnd',
- type: 'number',
- label: t('TradingCenter.item5') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item5') + ' (' + t('TradingCenter.item2') + ')',
- },
- {
- key: 'winRateStart',
- type: 'number',
- label: t('TradingCenter.item6') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item6') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'winRateEnd',
- type: 'number',
- label: t('TradingCenter.item6') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item6') + ' (' + t('TradingCenter.item2') + ')',
- },
- {
- key: 'maxDdRateStart',
- type: 'number',
- label: t('TradingCenter.item7') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item7') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'maxDdRateEnd',
- type: 'number',
- label: t('TradingCenter.item7') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item7') + ' (' + t('TradingCenter.item2') + ')',
- },
- {
- key: 'activityRange',
- type: 'select',
- label: t('TradingCenter.item8'),
- placeholder: t('TradingCenter.item8'),
- options: [
- { value: 'inactive', text: t('activeState.item1') },
- { value: 'active', text: t('activeState.item2') },
- { value: 'very_active', text: t('activeState.item3') },
- ],
- },
- {
- key: 'followsStart',
- type: 'number',
- label: t('TradingCenter.item9') + ' (' + t('TradingCenter.item1') + ')',
- placeholder: t('TradingCenter.item9') + ' (' + t('TradingCenter.item1') + ')',
- },
- {
- key: 'followsEnd',
- type: 'number',
- label: t('TradingCenter.item9') + ' (' + t('TradingCenter.item2') + ')',
- placeholder: t('TradingCenter.item9') + ' (' + t('TradingCenter.item2') + ')',
- },
- ])
- const sortState = ref({
- orderColumn: 1, // 1:plRate, 2:pl, 3:volume, 4:winRate, 5:maxDdRate, 6:activity, 7:follows
- orderType: 1, // 1:asc, 2:desc
- })
- const queryParams = computed(() => {
- const act = searchParams.value.activityRange
- return {
- ...searchParams.value,
- activityStart: act === 'inactive' ? 0 : act === 'active' ? 0.33 : act === 'very_active' ? 0.66 : null,
- activityEnd: act === 'inactive' ? 0.33 : act === 'active' ? 0.66 : act === 'very_active' ? 1 : null,
- orderColumn: sortState.value.orderColumn,
- orderType: sortState.value.orderType,
- }
- })
- const tableRef = ref(null)
- const listApi = ref(documentaryApi.followDealSearchList)
- const handleSearch = (params: any) => {
- searchParams.value = params
- nextTick(() => {
- tableRef.value?.refreshTable()
- })
- }
- const handleReset = (params: any) => {
- searchParams.value = params
- nextTick(() => {
- tableRef.value?.refreshTable()
- })
- }
- const handleSortChange = ({ prop, order }: any) => {
- const propToColumn: Record<string, number> = {
- 'plRate': 1, 'pl': 2, 'volume': 3, 'winRate': 4, 'maxDdRate': 5, 'activity': 6, 'follows': 7,
- }
- sortState.value.orderColumn = propToColumn[prop] || 1
- sortState.value.orderType = order === 'desc' ? 2 : 1
- nextTick(() => {
- tableRef.value?.refreshTable()
- })
- }
- const currentColumns = computed(() => [
- // { prop: 'recommend', label: '', slot: 'recommend', align: 'center', width: 60 },
- { prop: 'nickname', label: t('Documentary.tradingCenter.item1'), align: 'left' },
- { prop: 'maskLogin', label: t('newLoop.item11'), align: 'center' },
- { prop: 'pl', label: t('TradingCenter.item3'), align: 'center', sortable: true },
- { prop: 'volume', label: t('TradingCenter.item5'), align: 'center', sortable: true },
- { prop: 'follows', label: t('TradingCenter.item9'), align: 'center', sortable: true },
- { prop: 'groupType', label: t('Label.AccountType'), slot: 'groupType', align: 'center' },
- { prop: 'plRate', label: t('TradingCenter.item4'), align: 'center', sortable: true },
- { prop: 'winRate', label: t('TradingCenter.item6'), align: 'center', sortable: true },
- { prop: 'maxDdRate', label: t('TradingCenter.item7'), align: 'center', sortable: true },
- { prop: 'activity', label: t('TradingCenter.item8'), slot: 'activity', align: 'center', sortable: true },
- { prop: 'view', label: t('Documentary.tradingCenter.item23'), slot: 'view', align: 'center', width: 80 },
- { prop: 'recommendReason', label: t('Documentary.tradingCenter.item142'), align: 'center', width: 100 },
- { prop: 'subscribe', label: t('Documentary.tradingCenter.item24'), slot: 'subscribe', align: 'center', width: 100 },
- ])
- const mobilePrimaryFields = computed(() => [
- { prop: 'nickname', label: t('Documentary.tradingCenter.item1'), align: 'center' },
- { prop: 'maskLogin', label: t('newLoop.item11'), align: 'center' },
- { prop: 'groupType', label: t('Label.AccountType'), slot: 'groupType', align: 'center' },
- {
- prop: 'more',
- type: 'more',
- width: 20,
- align: 'right',
- },
- ])
- const getAccountTypeText = (type: number) => {
- const accountTypeMap: Record<number, string> = {
- 1: 'AccountType.ClassicAccount',
- 2: 'AccountType.SeniorAccount',
- 3: 'AccountType.AgencyAccount',
- 5: 'AccountType.SpeedAccount',
- 6: 'AccountType.SpeedAccount',
- 7: 'AccountType.StandardAccount',
- 8: 'AccountType.CentAccount',
- }
- return type && accountTypeMap[type] ? t(accountTypeMap[type]) : '--'
- }
- const getActivityText = (activity: number) => {
- if (!activity) return '--'
- switch (activity) {
- case 1:
- return t('activeState.item1')
- case 2:
- return t('activeState.item2')
- case 3:
- return t('activeState.item3')
- default:
- return activity
- }
- }
- const toView = (row: any) => {
- uni.navigateTo({
- url: `/pages/follow/trading-center-single?dealLogin=${row.dealLogin}&id=${row.id}&login=${row.login}`,
- })
- }
- // --- Follow Subscription ---
- const dialogFllow = ref(false)
- const dialogFllowData1 = ref<any>({})
- const dialogFllowLoginData = ref<any[]>([])
- const dialogFllowData = ref({
- followLogin: '',
- protect: 0,
- protectType: 1,
- protectAmount: '',
- protectRatio: '',
- followType: 1,
- volume: '',
- ratio: '',
- leverage: '',
- agree: false,
- })
- const formRef = ref<any>(null)
- const rules = {
- protectAmount: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
- protectRatio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
- volume: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') },{
- validateFunction: (rule, value,data, callback) => {
- if (value) {
- const num = Number(value)
- if (isNaN(num) || num <= 0) {
- callback(t('vu.follow.v1'))
- }else {
- callback()
- }
- }
- }
- }] },
- ratio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
- followLogin: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
- followType: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
- agree: { rules: [{ required: true, errorMessage: t('vaildate.agree.empty') }] },
- }
- const followLoginOptions = computed(() => {
- return dialogFllowLoginData.value.map(item => ({
- value: item.login,
- text: `${item.login} - ${getAccountTypeText(item.loginType)} - ${t('Custom.Deposit.AvailableBalance')}: $${item.balance || 0}`,
- }))
- })
- const toSubscribe = async (row: any) => {
- uni.showLoading({ title: t('State.InTheProcessing') })
- try {
- let res = await documentaryApi.followDealSubscribeInfo({ dealId: row.dealId })
- if (res.code === 200) {
- dialogFllowData1.value = row
- dialogFllowData.value.protect = 0
- dialogFllowLoginData.value = res.data || []
- dialogFllow.value = true
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- } finally {
- uni.hideLoading()
- }
- }
- const selectLogin = (val: string) => {
- const target = dialogFllowLoginData.value.find(item => item.login === val)
- if (target) {
- dialogFllowData.value.leverage = `1:${target.leverage}`
- }
- }
- const openAgreement = () => {
- const lang = locale.value
- const url = ['cn', 'zhHant'].includes(lang) ? 'pdf/CopyTradeUserAgreementcn.pdf' : 'pdf/CopyTradeUserAgreement.pdf'
- // Use plus.runtime.openURL or window.open depending on platform
- // #ifdef H5
- window.open(url, '_blank')
- // #endif
- // #ifndef H5
- uni.showToast({ title: 'Not supported on this platform', icon: 'none' })
- // #endif
- }
- let submitting = false
- const applyFllow = async () => {
- if (submitting) return
- if (!dialogFllowData.value.agree) {
- uni.showToast({ title: t('vaildate.agree.empty'), icon: 'none' })
- return
- }
- try {
- await formRef.value?.validate()
- } catch (e) {
- return
- }
- submitting = true
- uni.showLoading({ title: t('State.InTheProcessing') })
- try {
- const payload = {
- dealId: dialogFllowData1.value.id,
- followLogin: dialogFllowData.value.followLogin,
- protect: dialogFllowData.value.protect,
- protectType: dialogFllowData.value.protect ? dialogFllowData.value.protectType : null,
- protectAmount: dialogFllowData.value.protect ? dialogFllowData.value.protectAmount : null,
- protectRatio: dialogFllowData.value.protect ? dialogFllowData.value.protectRatio : null,
- followType: dialogFllowData.value.followType,
- volume: dialogFllowData.value.followType == 1 ? Number(dialogFllowData.value.volume) * 100 : null,
- ratio: dialogFllowData.value.followType == 2 ? dialogFllowData.value.ratio : null,
- }
- let res = await documentaryApi.followDealSubscriSubscribe(payload)
- if (res.code === 200) {
- uni.showToast({ title: t('Msg.Success'), icon: 'success' })
- applyFllowCancel()
- } else {
- const msg = res.msg == 'EMPTY_POSITION_BEFORE_SUBSCRIBE' ? t('Documentary.tradingCenter.item134') : res.msg
- uni.showToast({ title: msg, icon: 'none' })
- }
- } finally {
- submitting = false
- uni.hideLoading()
- }
- }
- const applyFllowCancel = () => {
- dialogFllow.value = false
- dialogFllowData.value = {
- followLogin: '', protect: 0, protectType: 1, protectAmount: '', protectRatio: '',
- followType: 1, volume: '', ratio: '', leverage: '', agree: false,
- }
- }
- </script>
- <style scoped lang="scss">
- @import "@/uni.scss";
- .time-header {
- display: flex;
- justify-content: flex-end;
- font-size: 14px;
- margin-bottom: 10px;
- font-weight: 500;
- color: var(--bs-heading-color);
- .time-value {
- margin-left: 6px;
- color: var(--bs-heading-color);
- }
- }
- .recommend-tag {
- font-size: 12px;
- color: var(--bs-emphasis-color);
- padding: 2px 6px;
- border-radius: 4px;
- display: inline-block;
- &.top {
- background-color: #eb3f57;
- }
- &.green {
- background-color: #89be30;
- }
- }
- .action-icon {
- display: inline-flex;
- cursor: pointer;
- }
- .btn-primary {
- background-color: #4497ff;
- color: white;
- padding: 0 px2rpx(12);
- border: none;
- font-size: px2rpx(12);
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: px2rpx(4);
- height: 28px;
- line-height: 28px;
- border-radius: 4px;
- }
- .dia-content {
- padding: 10px;
- .fllow-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #eee;
- padding-bottom: 10px;
- margin-bottom: 10px;
- .title {
- font-weight: bold;
- color: var(--bs-heading-color);
- padding-left: 8px;
- border-left: 4px solid #eb3f57;
- font-size: 16px;
- }
- .time {
- font-size: 12px;
- color: #888;
- }
- }
- .section-title {
- margin-top: 20px;
- .title {
- border-left-color: #4497ff;
- }
- }
- .fllow-info-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 10px 20px;
- .fllow-content {
- display: flex;
- justify-content: space-between;
- font-size: 14px;
- border-bottom: 1px dashed #eee;
- padding-bottom: 4px;
- .tit {
- color: var(--bs-heading-color);
- }
- .con {
- font-weight: 500;
- color: var(--bs-heading-color);
- }
- }
- }
- .form-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 10px 20px;
- margin-top: 10px;
- }
- .terms-desc {
- font-size: 12px;
- color: #888;
- margin: 10px 0;
- }
- .agree-label {
- display: flex;
- align-items: center;
- font-size: 14px;
- color: var(--bs-heading-color);
- .link {
- color: #4497ff;
- cursor: pointer;
- }
- }
- }
- .cancel-btn,
- .confirm-btn {
- margin: 0 10px;
- border-radius: 4px;
- }
- .cancel-btn {
- background-color: #f5f5f5;
- color: var(--bs-heading-color);
- }
- .confirm-btn {
- //background-color: #4497ff;
- color: #fff;
- }
- </style>
|