feat: 初始化
This commit is contained in:
39
pages/download/index.scss
Normal file
39
pages/download/index.scss
Normal file
@ -0,0 +1,39 @@
|
||||
.container {
|
||||
padding: 0 16px 24px;
|
||||
.swiper {
|
||||
margin: 14px 0 18px;
|
||||
}
|
||||
.title {
|
||||
margin: 14px 0 15px;
|
||||
}
|
||||
.downListWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 19px;
|
||||
.downList {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 14px;
|
||||
margin-top: 20px;
|
||||
.downItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
row-gap: 13px;
|
||||
padding: 23px 29px 14px;
|
||||
width: 105px;
|
||||
min-height: 117px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
.downItemImg {
|
||||
flex-shrink: 0;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
84
pages/download/index.vue
Normal file
84
pages/download/index.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<NavBar />
|
||||
<view class="container">
|
||||
<view class="swiper">
|
||||
<HomeSwiper :position="1" />
|
||||
</view>
|
||||
<view class="title">
|
||||
<PageTitle :title="$t('menu.download')" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<Segmented
|
||||
styleType="text"
|
||||
:activeFontWeight="700"
|
||||
gap="13px"
|
||||
thumbHeight="3px"
|
||||
underLineHeight="0px"
|
||||
:current="current"
|
||||
:values="items"
|
||||
@clickItem="onClickItem"
|
||||
inActiveColor="#999999"
|
||||
activeColor="#000"
|
||||
></Segmented>
|
||||
<view v-show="current === 0" class="downListWrapper">
|
||||
<image src="/static/download/MT4.png" mode="aspectFit" style="width: 151px; height: 151px"></image>
|
||||
<view class="downList">
|
||||
<view v-for="item in MT4DownList" :key="item.id" class="downItem">
|
||||
<image :src="item.logo_name" mode="aspectFit" class="downItemImg"></image>
|
||||
<view class="">
|
||||
<uni-link :href="item.file_url" :text="item.title" :showUnderLine="false" color="#333333"></uni-link>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="current === 1" class="downListWrapper">
|
||||
<image src="/static/download/MT5.png" mode="aspectFit" style="width: 172px; height: 146px"></image>
|
||||
<view class="downList">
|
||||
<view v-for="item in MT5DownList" :key="item.id" class="downItem">
|
||||
<image :src="item.logo_name" mode="aspectFit" class="downItemImg"></image>
|
||||
<view class="">
|
||||
<uni-link :href="item.file_url" :text="item.title" :showUnderLine="false" color="#333333"></uni-link>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Segmented from '@/pages/components/segmented/index.vue';
|
||||
import { getDownList } from '@/services/download/download';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
items: ['MT4', 'MT5'],
|
||||
MT4DownList: [],
|
||||
MT5DownList: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getDownListData() {
|
||||
const res = await getDownList();
|
||||
if (res && res.code === 0) {
|
||||
this.MT4DownList = res.data.mt4List;
|
||||
this.MT5DownList = res.data.mt5List;
|
||||
}
|
||||
},
|
||||
onClickItem(e) {
|
||||
if (this.current != e.currentIndex) {
|
||||
this.current = e.currentIndex;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDownListData();
|
||||
},
|
||||
components: { Segmented }
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
</style>
|
Reference in New Issue
Block a user