feat: 初始化

This commit is contained in:
George
2025-07-07 15:55:44 +08:00
commit 9b7bfcfe5a
969 changed files with 123036 additions and 0 deletions

15
pages/fts/index.css Normal file
View File

@ -0,0 +1,15 @@
.container {
padding: 0 16px;
}
.title {
margin: 14px 0;
}
.ftsSegmentedWrapper {
z-index: 999;
padding-top: 12px;
background: #fff;
height: 49px;
}
.webViewWrapper {
flex: 1;
}

58
pages/fts/index.nvue Normal file
View File

@ -0,0 +1,58 @@
<template>
<NNavBar />
<view class="container" style="padding-bottom: 0;">
<view class="title">
<PageTitle :title="t('menu.fts')" style="flex-direction: row;" />
</view>
<view class="ftsSegmentedWrapper" :style="{'width': contentWidth+'px'}">
<NSegmented styleType="text" fontSize="16px" gap="13px" :current="current" :values="items"
@clickItem="onClickItem" inActiveColor="#999999" activeColor="#000"></NSegmented>
</view>
<view class="webViewWrapper" v-if="current == 0">
<web-view :style="{'width': 'calc(750rpx - 32px)', 'height': wbHeight+'px'}"
:webview-styles="{'progress': {color:'#29bbe4'}}" :fullscreen="false" :src="ftsUrl"></web-view>
</view>
<view class="webViewWrapper" v-if="current == 1">
<web-view :style="{'width': 'calc(750rpx - 32px)', 'height': wbHeight+'px'}"
:webview-styles="{'progress': {color:'#29bbe4'}}" :fullscreen="false" :src="loginUrl"></web-view>
</view>
</view>
</template>
<script>
import NNavBar from '@/components/nvue/NavBar/index.nvue'
import NSegmented from '@/components/nvue/segmented/index.nvue';
import {i18n} from '@/locale/index.ts'
import {app_host} from '@/utils/request'
export default {
data() {
return {
t: i18n.global.t,
current: 0,
items: [i18n.global.t('fts.fts'), i18n.global.t('fts.login')],
ftsUrl: 'https://ratings.htfx.co/widgets/ratings?widgetKey=social-ratings',
loginUrl: 'https://copytrade.htfx.co/portal/login?redirectUrl=%2F',
wbHeight: uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 164,
contentWidth: uni.getSystemInfoSync().windowWidth - 32
};
},
methods: {
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
}
}
},
created() {
},
components: {
NNavBar,
NSegmented
}
}
</script>
<style scoped>
@import url('./index.css');
</style>

21
pages/fts/index.scss Normal file
View File

@ -0,0 +1,21 @@
.container {
padding: 0 16px;
.swiper {
margin: 14px 0 18px;
}
.title {
margin: 14px 0 21px;
}
}
.ftsSegmentedWrapper {
position: sticky;
top: 44px;
z-index: 999;
padding-top: 12px;
background-color: #fff;
}
.webViewWrapper {
flex: 1;
width: 100%;
height: calc(100vh - 90px);
}

73
pages/fts/index.vue Normal file
View File

@ -0,0 +1,73 @@
<template>
<NavBar />
<view class="container">
<view class="swiper">
<HomeSwiper :position="1" />
</view>
<view class="title">
<PageTitle :title="$t('menu.fts')" />
</view>
<view class="ftsSegmentedWrapper">
<Segmented
styleType="text"
fontSize="16px"
gap="13px"
:current="current"
:values="items"
@clickItem="onClickItem"
inActiveColor="#999999"
activeColor="#000"
></Segmented>
</view>
<view class="webViewWrapper" v-if="current == 0">
<!-- #ifdef H5 -->
<iframe :src="ftsUrl" frameborder="0" style="width: 100%; height: 100%"></iframe>
<!-- #endif -->
</view>
<view class="webViewWrapper" v-if="current == 1">
<!-- #ifdef H5 -->
<iframe :src="loginUrl" frameborder="0" style="width: 100%; height: 100%"></iframe>
<!-- #endif -->
</view>
</view>
</template>
<script>
import Segmented from '@/pages/components/segmented/index.vue';
export default {
data() {
return {
current: 0,
items: [this.$t('fts.fts'), this.$t('fts.login')],
ftsUrl: 'https://ratings.htfx.co/widgets/ratings?widgetKey=social-ratings',
loginUrl: 'https://copytrade.htfx.co/portal/login?redirectUrl=%2F',
webviewStyles: {
width: '100%',
height: '100%'
}
};
},
methods: {
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
}
}
},
created() {
// #ifdef H5
const tempArr = window.location.origin.split('.');
const domain = tempArr?.[tempArr?.length - 1] ?? 'co';
this.ftsUrl = `https://ratings.htfx.${domain}/widgets/ratings?widgetKey=social-ratings`;
this.loginUrl = `https://copytrade.htfx.${domain}/portal/login?redirectUrl=%2F`;
// #endif
},
components: {
Segmented
}
};
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>