| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <cwg-header title="推广素材" />
- <!-- 顶部 Tabs -->
- <cwg-asset-tabs v-model="activeTab" :tabs="tabsConfig" />
- <view class="main-container">
- <!-- 工具栏:筛选与排序 -->
- <view class="toolbar">
- </view>
- <!-- 视频 (Tab 3) -->
- <view v-if="activeTab === 3" class="media-grid">
- <view class="media-card" v-for="item in videoList" :key="item.id">
- <view class="media-cover">
- <image class="cover-img" :src="item.cover" mode="aspectFill"></image>
- <view class="play-btn">
- <cwg-icon name="crm-play" :size="32" color="#fff" />
- </view>
- <view v-if="item.isNew" class="badge-new">新</view>
- </view>
- <view class="media-info">
- <view class="info-row">
- <text class="label">语言</text>
- <text class="value">{{ item.languages }}</text>
- </view>
- <view class="info-row">
- <text class="label">长宽比</text>
- <text class="value tag">{{ item.aspectRatio }}</text>
- </view>
- <view class="info-row">
- <text class="label">类型</text>
- <text class="value tag">{{ item.type }}</text>
- </view>
- </view>
- <view class="media-actions">
- <checkbox class="action-checkbox" style="transform:scale(0.8)" />
- <button class="action-btn main-btn">选择视频</button>
- <button class="action-btn icon-btn">
- <cwg-icon name="crm-download" :size="18" color="#333" />
- </button>
- </view>
- </view>
- </view>
- <!-- GIFs (Tab 5) -->
- <view v-if="activeTab === 5" class="media-grid">
- <view class="media-card" v-for="item in gifList" :key="item.id">
- <view class="media-cover checkerboard">
- <image class="cover-img contain" :src="item.cover" mode="aspectFit"></image>
- <view v-if="item.isNew" class="badge-new">新</view>
- </view>
- <view class="media-info">
- <view class="info-title">{{ item.title }}</view>
- <view class="info-desc">{{ item.desc }}</view>
- <view class="info-row mt-10">
- <text class="label">语言</text>
- <text class="value">{{ item.languages }}</text>
- </view>
- <view class="info-row">
- <text class="label">尺寸</text>
- <text class="value">{{ item.size }}</text>
- </view>
- <view class="info-row">
- <text class="label">类型</text>
- <text class="value tag">{{ item.type }}</text>
- </view>
- </view>
- <view class="media-actions">
- <checkbox class="action-checkbox" style="transform:scale(0.8)" />
- <button class="action-btn main-btn">选择GIF</button>
- <button class="action-btn icon-btn">
- <cwg-icon name="crm-download" :size="18" color="#333" />
- </button>
- </view>
- </view>
- </view>
- <!-- 标志 (Tab 6) -->
- <view v-if="activeTab === 6" class="media-grid logo-grid">
- <view class="media-card logo-card" v-for="item in logoList" :key="item.id">
- <view class="logo-cover" :class="item.theme">
- <image class="logo-img" :src="item.cover" mode="aspectFit"></image>
- </view>
- <view class="media-actions logo-actions">
- <button class="action-btn main-btn">下载</button>
- </view>
- </view>
- </view>
- </view>
- </cwg-page-wrapper>
- </template>
- <script setup lang="ts">
- import { ref, computed } from 'vue'
- const activeTab = ref(3)
- const tabsConfig = computed(() => [
- { text: '视频 (790)', value: 3 },
- { text: 'GIFs (30)', value: 5 },
- { text: '标志 (4)', value: 6 },
- ])
- // 模拟数据:视频
- const videoList = ref([
- {
- id: 1,
- isNew: true,
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=A%20person%20writing%20in%20a%20notebook%20on%20a%20wooden%20desk%20with%20a%20laptop%20and%20headphones%2C%20top-down%20view&image_size=landscape_16_9',
- languages: '中文(简体)、孟加拉语、英语 +2',
- aspectRatio: '纵向',
- type: "Exness' unique features"
- },
- {
- id: 2,
- isNew: true,
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=A%20person%20using%20a%20trading%20app%20on%20a%20smartphone%20with%20a%20laptop%20in%20the%20background&image_size=landscape_16_9',
- languages: '中文(简体)、孟加拉语、英语 +2',
- aspectRatio: '纵向',
- type: "Fast execution"
- },
- {
- id: 3,
- isNew: false,
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=A%20professional%20trading%20setup%20with%20multiple%20monitors%20displaying%20charts&image_size=landscape_16_9',
- languages: '英语、西班牙语、葡萄牙语',
- aspectRatio: '横向',
- type: "Trading conditions"
- }
- ])
- // 模拟数据:GIFs
- const gifList = ref([
- {
- id: 1,
- isNew: true,
- title: '节省交易成本',
- desc: '提供小点差和热门资产的无隔夜利息交易,助您保留更多收益。',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=A%20clean%20financial%20trading%20chart%20with%20green%20and%20blue%20lines%20on%20a%20dark%20background%20with%20currency%20symbols&image_size=square',
- languages: '英语、印尼语、西班牙语(拉丁美洲) +2',
- size: '300x300、300x600、728x90',
- type: 'Lower your trading cost'
- },
- {
- id: 2,
- isNew: true,
- title: '掌控您的外汇交易',
- desc: '以小点差和灵活杠杆交易直盘、交叉盘及小众外汇对。',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=A%20minimalist%20blue%20line%20chart%20on%20a%20white%20background%20with%20UK%20and%20EU%20flags&image_size=square',
- languages: '英语、印尼语、西班牙语(拉丁美洲) +2',
- size: '300x300、300x600、728x90',
- type: '外汇'
- }
- ])
- // 模拟数据:标志
- const logoList = ref([
- {
- id: 1,
- theme: 'light',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=The%20word%20EXNESS%20in%20black%20bold%20minimalist%20typography%20on%20a%20white%20background&image_size=landscape_16_9'
- },
- {
- id: 2,
- theme: 'dark',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=The%20word%20EXNESS%20in%20white%20bold%20minimalist%20typography%20on%20a%20dark%20navy%20background&image_size=landscape_16_9'
- },
- {
- id: 3,
- theme: 'light',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=The%20word%20IB%20EXNESS%20in%20black%20bold%20minimalist%20typography%20on%20a%20white%20background&image_size=landscape_16_9'
- },
- {
- id: 4,
- theme: 'dark',
- cover: 'https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=The%20word%20IB%20EXNESS%20in%20white%20bold%20minimalist%20typography%20on%20a%20dark%20navy%20background&image_size=landscape_16_9'
- }
- ])
- </script>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .promotion-page {
- background-color: #f7f8fa;
- min-height: 100vh;
- }
- .main-container {
- padding: px2rpx(20);
- }
- .toolbar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: px2rpx(20);
- .filter-btn {
- display: flex;
- align-items: center;
- background-color: #f5f5f5;
- padding: px2rpx(8) px2rpx(16);
- border-radius: px2rpx(4);
- font-size: px2rpx(14);
- color: var(--bs-heading-color);
- }
- .sort-group {
- display: flex;
- border: 1px solid #e4e7ed;
- border-radius: px2rpx(4);
- overflow: hidden;
- background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
- .sort-item {
- padding: px2rpx(8) px2rpx(16);
- font-size: px2rpx(14);
- color: var(--bs-heading-color);
- border-right: 1px solid #e4e7ed;
- cursor: pointer;
- &:last-child {
- border-right: none;
- }
- &.active {
- background-color: #f5f5f5;
- font-weight: 500;
- color: var(--bs-heading-color);
- }
- }
- }
- }
- .media-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(px2rpx(320), 1fr));
- gap: px2rpx(20);
- &.logo-grid {
- grid-template-columns: repeat(auto-fill, minmax(px2rpx(400), 1fr));
- }
- }
- .media-card {
- background: #fff;
- border-radius: px2rpx(8);
- border: 1px solid #ebeef5;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- .media-cover {
- position: relative;
- height: px2rpx(220);
- background-color: #000;
- display: flex;
- align-items: center;
- justify-content: center;
- &.checkerboard {
- background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
- linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee);
- background-size: 20px 20px;
- background-position: 0 0, 10px 10px;
- background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
- }
- .cover-img {
- width: 100%;
- height: 100%;
- &.contain {
- object-fit: contain;
- }
- }
- .play-btn {
- position: absolute;
- width: px2rpx(50);
- height: px2rpx(50);
- background-color: rgba(255, 255, 255, 0.3);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- backdrop-filter: blur(4px);
- }
- .badge-new {
- position: absolute;
- top: px2rpx(10);
- right: px2rpx(10);
- background-color: #d32f2f;
- color: var(--bs-emphasis-color);
- font-size: px2rpx(12);
- padding: px2rpx(2) px2rpx(8);
- border-radius: px2rpx(4);
- }
- }
- .media-info {
- padding: px2rpx(16);
- flex: 1;
- .info-title {
- font-size: px2rpx(16);
- font-weight: bold;
- color: var(--bs-heading-color);
- margin-bottom: px2rpx(8);
- }
- .info-desc {
- font-size: px2rpx(13);
- color: var(--bs-heading-color);
- line-height: 1.5;
- margin-bottom: px2rpx(12);
- }
- .info-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: px2rpx(10) 0;
- border-bottom: 1px solid var(--bs-border-color);
- font-size: px2rpx(13);
- &.mt-10 {
- margin-top: px2rpx(10);
- }
- &:last-child {
- border-bottom: none;
- padding-bottom: 0;
- }
- .label {
- color: var(--bs-heading-color);
- }
- .value {
- color: var(--bs-heading-color);
- font-weight: 500;
- text-align: right;
- &.tag {
- background-color: #f5f5f5;
- padding: px2rpx(2) px2rpx(8);
- border-radius: px2rpx(12);
- font-weight: normal;
- }
- }
- }
- }
- .media-actions {
- display: flex;
- align-items: center;
- padding: px2rpx(16);
- gap: px2rpx(10);
- border-top: 1px solid #ebeef5;
- &.logo-actions {
- justify-content: center;
- }
- .action-checkbox {
- flex-shrink: 0;
- }
- .action-btn {
- height: px2rpx(36);
- line-height: px2rpx(36);
- font-size: px2rpx(14);
- margin: 0;
- border-radius: px2rpx(4);
- background-color: #f5f5f5;
- color: var(--bs-heading-color);
- border: none;
- &::after {
- border: none;
- }
- &.main-btn {
- flex: 1;
- }
- &.icon-btn {
- width: px2rpx(36);
- padding: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- }
- }
- .logo-card {
- .logo-cover {
- height: px2rpx(260);
- display: flex;
- align-items: center;
- justify-content: center;
- padding: px2rpx(40);
- &.light {
- background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
- }
- &.dark {
- background-color: #0b101e;
- }
- .logo-img {
- width: 100%;
- height: 100%;
- }
- }
- }
- </style>
|