|
|
@@ -8,6 +8,14 @@
|
|
|
</div>
|
|
|
<!-- 设计资源 -->
|
|
|
<div class="resource-content">
|
|
|
+ <div class="resource-block" v-if="showNutuiCat">
|
|
|
+ <h4 class="sub-title">模板资源</h4>
|
|
|
+ <p class="sub-desc">
|
|
|
+ 目前已提供京东大促模板工程
|
|
|
+ <a target="_blank" href="http://mtw.so/6tgTiw">NutUI-Cat</a
|
|
|
+ >,含有开发京东大促项目过程中使用到的通用模块、组件、模板,可以在未来的大促项目中复用,达到提效降本的效果。
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
<div class="resource-block" v-if="articleList.length === 0">
|
|
|
<h4 class="sub-title">设计资源</h4>
|
|
|
<p class="sub-desc"
|
|
|
@@ -85,6 +93,7 @@ import Header from '@/sites/doc/components/Header.vue';
|
|
|
import Footer from '@/sites/doc/components/Footer.vue';
|
|
|
import { RefData } from '@/sites/assets/util/ref';
|
|
|
import { ApiService } from '@/sites/service/ApiService';
|
|
|
+import axios from 'axios';
|
|
|
export default defineComponent({
|
|
|
name: 'doc',
|
|
|
components: {
|
|
|
@@ -108,7 +117,8 @@ export default defineComponent({
|
|
|
// title: '性能体验'
|
|
|
// }
|
|
|
],
|
|
|
- activeIndex: 0
|
|
|
+ activeIndex: 0,
|
|
|
+ showNutuiCat: false
|
|
|
});
|
|
|
const watchDemoUrl = (router: RouteLocationNormalized) => {
|
|
|
RefData.getInstance().currentRoute.value = router.name as string;
|
|
|
@@ -120,6 +130,11 @@ export default defineComponent({
|
|
|
|
|
|
// 文章列表接口
|
|
|
const apiService = new ApiService();
|
|
|
+ axios('https://relayapi.jd.com/').then(res => {
|
|
|
+ if (res) {
|
|
|
+ data.showNutuiCat = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
apiService.getArticle().then(res => {
|
|
|
if (res?.state == 0) {
|
|
|
(res.value.data.arrays as any[]).forEach(element => {
|