|
|
@@ -63,7 +63,35 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div class="doc-content-more" v-if="articleList.length > 0">
|
|
|
+ <div class="doc-content-cases" v-if="casesImages.length">
|
|
|
+ <div class="doc-content-hd">
|
|
|
+ <h4 class="doc-content-title">赋能案例</h4>
|
|
|
+ </div>
|
|
|
+ <div class="doc-content-cases-content">
|
|
|
+ <div class="doc-content-cases-content__main">
|
|
|
+ <div
|
|
|
+ class="doc-content-cases-content__main-lefticon"
|
|
|
+ @click="onLeft"
|
|
|
+ ></div>
|
|
|
+ <div class="doc-content-cases-content__main-iconinfo">
|
|
|
+ <h4>{{ currentCaseItem.product_name }}</h4>
|
|
|
+ <p>{{ currentCaseItem.product_info }}</p>
|
|
|
+ <img :src="currentCaseItem.logo" />
|
|
|
+ </div>
|
|
|
+ <div class="doc-content-cases-content__main-iphone"></div>
|
|
|
+ <div
|
|
|
+ class="doc-content-cases-content__main-righticon"
|
|
|
+ @click="onRight"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
+ <ul class="doc-content-cases-content__list">
|
|
|
+ <li v-for="img in casesImages">
|
|
|
+ <img :src="img" />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="doc-content-more" v-if="articleList.length">
|
|
|
<div class="doc-content-hd">
|
|
|
<h4 class="doc-content-title">更多内容</h4>
|
|
|
<a class="sub-more" href="#/resource">More</a>
|
|
|
@@ -89,7 +117,7 @@ import Header from '@/sites/doc/components/Header.vue';
|
|
|
import Footer from '@/sites/doc/components/Footer.vue';
|
|
|
import router from '../router';
|
|
|
import { themeColor } from '@/sites/assets/util/ref';
|
|
|
-import { ArticleApiService } from '@/sites/service/ArticleApiService';
|
|
|
+import { ApiService } from '@/sites/service/ApiService';
|
|
|
export default defineComponent({
|
|
|
name: 'main',
|
|
|
components: {
|
|
|
@@ -98,14 +126,19 @@ export default defineComponent({
|
|
|
},
|
|
|
setup() {
|
|
|
const articleList: any[] = [];
|
|
|
+ let casesList: any[] = [];
|
|
|
+ const casesImages: string[] = [];
|
|
|
+ const currentCaseItem: any = {};
|
|
|
const data = reactive({
|
|
|
// theme: 'white',
|
|
|
- articleList
|
|
|
+ articleList,
|
|
|
+ casesImages,
|
|
|
+ currentCaseItem
|
|
|
});
|
|
|
onMounted(() => {
|
|
|
// 文章列表接口
|
|
|
- const articleApiService = new ArticleApiService();
|
|
|
- articleApiService.getArticle().then(res => {
|
|
|
+ const apiService = new ApiService();
|
|
|
+ apiService.getArticle().then(res => {
|
|
|
if (res?.state == 0) {
|
|
|
data.articleList = (res.value.data.arrays as any[])
|
|
|
.map(item => {
|
|
|
@@ -116,7 +149,33 @@ export default defineComponent({
|
|
|
.filter(i => i);
|
|
|
}
|
|
|
});
|
|
|
+ apiService.getCases().then(res => {
|
|
|
+ if (res?.state == 0) {
|
|
|
+ data.casesImages = (res.value.data.arrays as any[])
|
|
|
+ .map(item => {
|
|
|
+ return item.cover_image.split(',');
|
|
|
+ })
|
|
|
+ .toString()
|
|
|
+ .split(',');
|
|
|
+ casesList = res.value.data.arrays as any[];
|
|
|
+ data.currentCaseItem = casesList[0];
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
+ const findCasesItem = (url: string) => {
|
|
|
+ data.currentCaseItem = casesList.find(i => i.cover_image.includes(url));
|
|
|
+ };
|
|
|
+ const onLeft = () => {
|
|
|
+ let url = data.casesImages.shift() as string;
|
|
|
+ findCasesItem(url);
|
|
|
+ data.casesImages.push(url);
|
|
|
+ };
|
|
|
+ const onRight = () => {
|
|
|
+ let url = data.casesImages.pop() as string;
|
|
|
+ findCasesItem(url);
|
|
|
+ data.casesImages.unshift(url);
|
|
|
+ };
|
|
|
+
|
|
|
const themeName = computed(() => {
|
|
|
return function() {
|
|
|
return `doc-content-${themeColor.value}`;
|
|
|
@@ -132,7 +191,9 @@ export default defineComponent({
|
|
|
toIntro,
|
|
|
...toRefs(data),
|
|
|
themeName,
|
|
|
- toLink
|
|
|
+ toLink,
|
|
|
+ onLeft,
|
|
|
+ onRight
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
@@ -191,7 +252,6 @@ export default defineComponent({
|
|
|
&-title {
|
|
|
display: inline-block;
|
|
|
font-size: 26px;
|
|
|
- font-family: PingFangSC-Medium;
|
|
|
}
|
|
|
&-features {
|
|
|
width: 1200px;
|
|
|
@@ -212,7 +272,6 @@ export default defineComponent({
|
|
|
}
|
|
|
.features-title {
|
|
|
margin-bottom: 20px;
|
|
|
- font-family: PingFangSC-Medium;
|
|
|
font-size: 24px;
|
|
|
}
|
|
|
.features-desc {
|
|
|
@@ -220,6 +279,96 @@ export default defineComponent({
|
|
|
line-height: 18px;
|
|
|
}
|
|
|
}
|
|
|
+ &-cases {
|
|
|
+ width: 1200px;
|
|
|
+ overflow: hidden;
|
|
|
+ margin: 0 auto 90px;
|
|
|
+ &-content {
|
|
|
+ height: 463px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ &__main {
|
|
|
+ padding: 0 22px;
|
|
|
+ width: 590px;
|
|
|
+ height: 463px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ background: rgba(71, 71, 83, 1);
|
|
|
+ border-radius: 29px 20px 20px 29px;
|
|
|
+ &-iphone {
|
|
|
+ width: 210px;
|
|
|
+ height: 420px;
|
|
|
+ background-image: url('../../assets/images/iphone-cases.png');
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+ &-lefticon {
|
|
|
+ margin-right: 20px;
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ background-image: url('../../assets/images/left-arrow.png');
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ &-righticon {
|
|
|
+ margin-left: 20px;
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ background-image: url('../../assets/images/right-arrow.png');
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+ &-iconinfo {
|
|
|
+ width: 190px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ > h4 {
|
|
|
+ line-height: 42px;
|
|
|
+ font-size: 26px;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ }
|
|
|
+ > p {
|
|
|
+ font-size: 18px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ }
|
|
|
+ > img {
|
|
|
+ width: 114px;
|
|
|
+ height: 114px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 29px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &__list {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ margin-left: -274px;
|
|
|
+ > li {
|
|
|
+ width: 180px;
|
|
|
+ height: 390px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-right: 20px;
|
|
|
+ box-shadow: 0px 1px 7px 0px #edeef1;
|
|
|
+ transition: all 0.5s;
|
|
|
+ &:first-child {
|
|
|
+ margin-right: 120px;
|
|
|
+ transform: scale(1.04);
|
|
|
+ }
|
|
|
+ > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
&-more {
|
|
|
width: 1200px;
|
|
|
margin: 0 auto 80px;
|
|
|
@@ -268,7 +417,6 @@ export default defineComponent({
|
|
|
min-width: 550px;
|
|
|
.content-title {
|
|
|
// line-height: 36px;
|
|
|
- font-family: PingFangSC-Medium;
|
|
|
font-size: 42px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
|
}
|
|
|
@@ -282,7 +430,6 @@ export default defineComponent({
|
|
|
}
|
|
|
.content-subTitle {
|
|
|
margin-top: 12px;
|
|
|
- font-family: PingFangSC-Regular;
|
|
|
font-size: 20px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
|
}
|
|
|
@@ -301,7 +448,6 @@ export default defineComponent({
|
|
|
font-size: 14px;
|
|
|
color: rgba(255, 255, 255, 1);
|
|
|
}
|
|
|
- font-family: PingFangSC-Regular;
|
|
|
width: 150px;
|
|
|
height: 40px;
|
|
|
background: linear-gradient(
|