瀏覽代碼

fix: build环节错误修复

zhangyuhan 4 年之前
父節點
當前提交
879cc4408a

+ 0 - 0
.drone.yml


+ 2 - 1
.gitignore

@@ -27,4 +27,5 @@ yarn-error.log*
 *.rar
 *.zip
 *.7z
-.vscode
+.vscode
+jydocs-mobile/page_docs_app

+ 3 - 3
jydocs-mobile/src/store/modules/main.ts

@@ -75,21 +75,21 @@ const modulesOption: modulesOption = {
   actions: {
     // 首页数据
     async getHome (state) {
-      getHomeHot({ sign: 'new', num: 5 }).then(res => {
+      getHomeHot({ sign: 'new', num: 5 }).then((res: APIStructure) => {
         if (!res.data.error_msg.length) {
           state.commit('saveHomeData', {
             new: res.data.data.map((v: APIStructure) => formatData(v))
           })
         }
       })
-      getHomeHot({ sign: 'hot', num: 5 }).then(res => {
+      getHomeHot({ sign: 'hot', num: 5 }).then((res: APIStructure) => {
         if (!res.data.error_msg.length) {
           state.commit('saveHomeData', {
             hot: res.data.data.map((v: APIStructure) => formatData(v))
           })
         }
       })
-      getHomeActivity({ code: 3, size: 3, num: 1 }).then(res => {
+      getHomeActivity({ code: 3, size: 3, num: 1 }).then((res: APIStructure) => {
         if (!res.data.error_msg.length) {
           state.commit('saveHomeData', {
             keep: res.data.data.map((v: APIStructure) => formatData(v))

+ 2 - 2
jydocs-mobile/src/views/details/details.vue

@@ -83,9 +83,9 @@ export default class extends Vue {
 
   uploaded () {
     if (this.nums === 0) {
-      this.$refs.charge.show = true
+      ;(this.$refs.charge as any).show = true
     } else {
-      this.$refs.buys.show = true
+      ;(this.$refs.buys as any).show = true
     }
   }
 }

+ 1 - 1
jydocs-mobile/vue.config.js

@@ -39,7 +39,7 @@ module.exports = {
   publicPath: process.env.BASE_URL,
   parallel: false,
   productionSourceMap: false,
-  outputDir: 'page_partner',
+  outputDir: 'page_docs_app',
   devServer: {
     port: '8080',
     open: false,

+ 5 - 9
jydocs-pc/src/views/Home.vue

@@ -124,7 +124,6 @@
 import { ajaxGetTest } from '../api/modules/user'
 import { Button } from 'element-ui'
 import SearchInput from '../components/Search'
-import ListItem from '../components/ListItem'
 import { getHomeActivity, getHomeHot } from '../api/modules/home'
 function recoveryPageData (key, defaultValues = {}) {
   return sessionStorage.getItem(key) ? JSON.parse(sessionStorage.getItem(key) || '') : defaultValues
@@ -147,7 +146,6 @@ function formatData (v) {
 export default {
   name: 'home',
   components: {
-    ListItem,
     SearchInput,
     [Button.name]: Button
   },
@@ -157,7 +155,7 @@ export default {
       pageData: {}
     }
   },
-  created() {
+  created () {
     this.pageData = recoveryPageData('jy-docs-home-page-pc')
     this.getHome()
   },
@@ -170,16 +168,16 @@ export default {
   },
   computed: {
     newList1 () {
-      return this.pageData?.new && this.pageData?.new.slice(0,5)
+      return this.pageData?.new && this.pageData?.new.slice(0, 5)
     },
     newList2 () {
-      return this.pageData?.new && this.pageData?.new.slice(0,5)
+      return this.pageData?.new && this.pageData?.new.slice(0, 5)
     },
     hotList1 () {
-      return this.pageData?.hot && this.pageData?.hot.slice(0,5)
+      return this.pageData?.hot && this.pageData?.hot.slice(0, 5)
     },
     hotList2 () {
-      return this.pageData?.hot && this.pageData?.hot.slice(0,5)
+      return this.pageData?.hot && this.pageData?.hot.slice(0, 5)
     }
   },
   methods: {
@@ -241,10 +239,8 @@ export default {
     padding-bottom: 40px;
     box-sizing: border-box;
 
-
     @include diy-icon('iconJianYu', 24, 24);
 
-
     @include diy-icon('pdf', 24);
     @include diy-icon('word', 24);
     @include diy-icon('excel', 24);