feat: 初始化

This commit is contained in:
George
2025-07-07 16:05:18 +08:00
commit c169958240
986 changed files with 132574 additions and 0 deletions

View File

@ -0,0 +1,49 @@
.container {
padding: 0 16px 24px;
.swiper {
margin: 14px 0 18px;
}
.title {
margin: 14px 0 15px;
}
.sizeList {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 8px;
row-gap: 14px;
.sizeCard {
display: flex;
flex-direction: column;
align-items: center;
row-gap: 4px;
height: 214px;
padding: 15px 8px 16px;
box-sizing: border-box;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
.sizeName {
font-size: 18px;
font-weight: 700;
line-height: 26px;
}
.sizeImg {
width: 100%;
height: 100%;
margin-top: 16px;
margin-bottom: 4px;
word-break: break-all;
font-size: 14px;
}
.btnWrapper {
width: 100%;
padding: 0 16px;
box-sizing: border-box;
.download {
column-gap: 5px;
height: 30px;
width: 100%;
font-size: 14px;
}
}
}
}
}

View File

@ -0,0 +1,61 @@
<template>
<NavBar />
<view class="container">
<view class="title">
<PageTitle :title="$t('menu.partner')" />
</view>
<view class="sizeList">
<view class="sizeCard" v-for="(imgUrl, index) in materialImgs" :key="imgUrl">
<view class="sizeName">{{ $t('partner.promotionLink.size') }}{{ index + 1 }}</view>
<image :src="imgUrl" mode="aspectFit" class="sizeImg"></image>
<view class="btnWrapper">
<button class="primaryButton download" @click="() => downLoadImage(imgUrl)">
<image src="/static/partner/download.png" mode="aspectFit" style="width: 16px; height: 16px"></image>
{{ $t('common.download') }}
</button>
</view>
</view>
</view>
<view v-if="!materialImgs.length" style="display: flex; justify-content: center; align-items: center; width: 100%">
<image src="/static/empty.png" mode="aspectFit" style="width: 200px; height: 200px"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
materialImgs: []
};
},
methods: {
downLoadImage(imgUrl) {
uni.saveImageToPhotosAlbum({
filePath: imgUrl,
success: () => {
uni.showToast({
icon: 'success',
title: this.$t('common.success.saveDone'),
});
},
fail() {
uni.showToast({
icon: 'none',
title: this.$t('common.success.saveFail')
});
}
});
}
},
onLoad(params) {
if (params.imgUrl) {
this.materialImgs = params.imgUrl?.split(',');
}
}
};
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>