Browse Source

修正bug

lipengtao 6 years ago
parent
commit
fe4747ee51

+ 8 - 2
src/components/subTemplate/BaseCompany.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'company.html?id='+companyInfo.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head">
4 4
      <div class="item-pic-org">
5 5
        <img :src="companyInfo.logo">
@ -26,7 +26,8 @@
26 26
    },
27 27
    data() {
28 28
      return {
29
        objKey: []
29
        objKey: [],
30
        urlHref: ''
30 31
      }
31 32
    },
32 33
    computed: {
@ -43,6 +44,11 @@
43 44
    },
44 45
    created() {
45 46
      this.getCompanyKeyword()
47
      if (this.noBlank) {
48
        this.urlHref = `h5.html#/company?id=${this.companyInfo.id}`;
49
      } else {
50
        this.urlHref = `company.html?id=${this.companyInfo.id}`
51
      }
46 52
    },
47 53
    methods: {
48 54
      getCompanyKeyword() {

+ 10 - 2
src/components/subTemplate/BaseContent.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :class="isShowImg(itemSingle.catalog)" :href="'content.html?id='+itemSingle.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :class="isShowImg(itemSingle.catalog)" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head" :style="{backgroundImage: 'url(' + imgUrl + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit">{{itemSingle.title}}</div>
@ -24,9 +24,17 @@
24 24
    },
25 25
    data() {
26 26
      return {
27
        imgUrl: this.itemSingle.imgUrl || defaultSet.img.article
27
        imgUrl: this.itemSingle.imgUrl || defaultSet.img.article,
28
        urlHref: ''
28 29
      };
29 30
    },
31
    created() {
32
      if (this.noBlank) {
33
        this.urlHref = `h5.html#/content?id=${this.itemSingle.id}`;
34
      } else {
35
        this.urlHref = `content.html?id=${this.itemSingle.id}`
36
      }
37
    },
30 38
    methods: {
31 39
      isShowImg(catalog) {
32 40
        if (catalog === '1' || catalog === '2' || catalog === '5') {

+ 9 - 2
src/components/subTemplate/BaseExpert.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'expert.html?id='+itemSingle.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head list-circular-head" :style="{backgroundImage: 'url(' + imgUrl + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit list-topic">{{itemSingle.name}}</div>
@ -22,7 +22,9 @@
22 22
      }
23 23
    },
24 24
    data() {
25
      return {};
25
      return {
26
        urlHref: ''
27
      };
26 28
    },
27 29
    computed: {
28 30
      imgUrl() {
@ -34,6 +36,11 @@
34 36
      }
35 37
    },
36 38
    created() {
39
      if (this.noBlank) {
40
        this.urlHref = `h5.html#/expert?id=${this.itemSingle.id}`;
41
      } else {
42
        this.urlHref = `expert.html?id=${this.itemSingle.id}`
43
      }
37 44
    },
38 45
    methods: {
39 46
    }

+ 9 - 2
src/components/subTemplate/BaseOrg.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'org.html?id='+orgInfo.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head">
4 4
      <div class="item-pic-org">
5 5
        <img :src="orgInfo.logo">
@ -25,7 +25,9 @@
25 25
      }
26 26
    },
27 27
    data() {
28
      return {};
28
      return {
29
        urlHref: ''
30
      };
29 31
    },
30 32
    computed: {
31 33
      orgInfo() {
@ -42,6 +44,11 @@
42 44
      }
43 45
    },
44 46
    created() {
47
      if (this.noBlank) {
48
        this.urlHref = `h5.html#/org?id=${this.orgInfo.id}`;
49
      } else {
50
        this.urlHref = `org.html?id=${this.orgInfo.id}`
51
      }
45 52
    },
46 53
    methods: {
47 54
    }

+ 8 - 2
src/components/subTemplate/BaseProduct.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'product.html?id='+itemSingle.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head" :style="{backgroundImage: 'url(' + imgUrl + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit list-topic">{{itemSingle.name}}</div>
@ -27,10 +27,16 @@
27 27
    },
28 28
    data() {
29 29
      return {
30
        imgUrl: this.itemSingle.img ? strToArr(this.itemSingle.img)[0] : defaultSet.img.product
30
        imgUrl: this.itemSingle.img ? strToArr(this.itemSingle.img)[0] : defaultSet.img.product,
31
        urlHref: ''
31 32
      };
32 33
    },
33 34
    created() {
35
      if (this.noBlank) {
36
        this.urlHref = `h5.html#/product?id=${this.itemSingle.id}`;
37
      } else {
38
        this.urlHref = `product.html?id=${this.itemSingle.id}`
39
      }
34 40
    },
35 41
    methods: {
36 42
    }

+ 8 - 2
src/components/subTemplate/BaseResource.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'resource.html?id='+resourceInfo.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head" :style="{backgroundImage: 'url(' + resourceInfo.firstImg + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit list-topic">{{resourceInfo.name}}</div>
@ -26,7 +26,8 @@
26 26
    data() {
27 27
      return {
28 28
        ownerName: '',
29
        ownerAuth: ''
29
        ownerAuth: '',
30
        urlHref: ''
30 31
      };
31 32
    },
32 33
    computed: {
@ -54,6 +55,11 @@
54 55
    },
55 56
    created() {
56 57
      this.ownerByond();
58
      if (this.noBlank) {
59
        this.urlHref = `h5.html#/resource?id=${this.resourceInfo.id}`;
60
      } else {
61
        this.urlHref = `resource.html?id=${this.resourceInfo.id}`
62
      }
57 63
    },
58 64
    methods: {
59 65
      ownerByond() {

+ 8 - 2
src/components/subTemplate/BaseResult.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'result.html?id='+itemSingle.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head" :style="{backgroundImage: 'url(' + imgUrl + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit list-topic">{{itemSingle.name}}</div>
@ -24,10 +24,16 @@
24 24
    },
25 25
    data() {
26 26
      return {
27
        imgUrl: defaultSet.img.patent
27
        imgUrl: defaultSet.img.patent,
28
        urlHref: ''
28 29
      };
29 30
    },
30 31
    created() {
32
      if (this.noBlank) {
33
        this.urlHref = `h5.html#/result?id=${this.itemSingle.id}`;
34
      } else {
35
        this.urlHref = `result.html?id=${this.itemSingle.id}`
36
      }
31 37
    },
32 38
    methods: {
33 39
    }

+ 8 - 2
src/components/subTemplate/BaseService.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <a class="list-item" :href="'serve.html?id='+serveInfo.id" :target="noBlank ? '' : '_blank'">
2
  <a class="list-item" :href="urlHref" :target="noBlank ? '' : '_blank'">
3 3
    <div class="list-head" :style="{backgroundImage: 'url(' + serveInfo.firstImg + ')'}"></div>
4 4
    <div class="list-info">
5 5
      <div class="list-tit list-topic">{{serveInfo.name}}</div>
@ -27,11 +27,17 @@
27 27
      return {
28 28
        ownerName: '',
29 29
        ownerAuth: '',
30
        serveInfo: ''
30
        serveInfo: '',
31
        urlHref: ''
31 32
      };
32 33
    },
33 34
    created() {
34 35
      this.itmeList();
36
      if (this.noBlank) {
37
        this.urlHref = `h5.html#/serve?id=${this.serveInfo.id}`;
38
      } else {
39
        this.urlHref = `serve.html?id=${this.serveInfo.id}`
40
      }
35 41
    },
36 42
    methods: {
37 43
      itmeList() {

+ 1 - 1
src/pages/h5/style/index.scss

@ -95,7 +95,6 @@
95 95
        vertical-align: middle;
96 96
        text-align: center;
97 97
        overflow: hidden;
98
99 98
        img {
100 99
          max-width: 100%;
101 100
          max-height: 100%;
@ -104,6 +103,7 @@
104 103
          overflow-y: auto;
105 104
          color: transparent;
106 105
          font-size: 0;
106
          margin: auto;
107 107
        }
108 108
      }
109 109
    }

+ 8 - 6
src/pages/h5/views/company/company.vue

@ -38,7 +38,7 @@
38 38
            </div>
39 39
            <div class="content">{{orgInfo.descp}}</div>
40 40
          </div>
41
          <div class="inner-wrapper" v-if="keywordObj && keywordObj[2].length">
41
          <div class="inner-wrapper" v-if="keywordObj[2] && keywordObj[2].length">
42 42
            <div class="content-title">
43 43
              <span>专注领域</span>
44 44
            </div>
@ -50,11 +50,13 @@
50 50
          </div>
51 51
        </div>
52 52
        <div class="content-wrapper" v-if="compContents && compContents.length">
53
          <div class="content-title">
54
            <span>相关文章</span>
55
          </div>
56
          <div class="content content-nf" v-if="compContents.length">
57
            <baseContent v-for="item in compContents" :key="item.index" :itemSingle="item" :noBlank="true"></baseContent>
53
          <div class="inner-wrapper">
54
            <div class="content-title">
55
              <span>相关文章</span>
56
            </div>
57
            <div class="content content-nf" v-if="compContents.length">
58
              <baseContent v-for="item in compContents" :key="item.index" :itemSingle="item" :noBlank="true"></baseContent>
59
            </div>
58 60
          </div>
59 61
        </div>
60 62
      </div>

+ 4 - 1
src/pages/h5/views/content/content.vue

@ -9,6 +9,7 @@
9 9
                <div class="info-tit info-tit-big">{{contentInfo.title}}</div>
10 10
                <div class="info-tag">
11 11
                  <span>{{contentInfo.modifyTime}}</span>
12
                  <pageView v-if="contentId" :pageObj="{ tn: 'article', id: contentId, src: '2'}"></pageView>
12 13
                  <span>作者/来源:{{contentInfo.source}}</span>
13 14
                </div>
14 15
              </div>
@ -79,6 +80,7 @@
79 80
  import baseOrg from '@/components/subTemplate/BaseOrg';
80 81
  import baseCompany from '@/components/subTemplate/BaseCompany';
81 82
  import baseContent from '@/components/subTemplate/BaseContent';
83
  import pageView from '@/components/pageView';
82 84
  export default {
83 85
    data() {
84 86
      return {
@ -103,7 +105,8 @@
103 105
      baseExpert,
104 106
      baseOrg,
105 107
      baseCompany,
106
      baseContent
108
      baseContent,
109
      pageView
107 110
    },
108 111
    methods: {
109 112
      queryPaltNews() {

+ 60 - 52
src/pages/h5/views/org/org.vue

@ -18,59 +18,67 @@
18 18
        </div>
19 19
      </div>
20 20
    </div>
21
    <div class="content-wrapper split-other" v-if="platServices.length || platResources.length">
22
      <div class="inner-wrapper" v-if="platServices.length">
23
        <div class="content-title">
24
          <span>可提供服务</span>
25
        </div>
26
        <div class="content content-nf" v-if="platServices.length">
27
          <baseService v-for="item in platServices" :key="item.index" :itemSingle="item" :noBlank="true"></baseService>
28
          <p class="moretype" @click="moreService" v-show="loadingModalShow">查看更多服务</p>
29
        </div>
30
      </div>
31
      <div class="inner-wrapper" v-if="platResources.length">
32
        <div class="content-title">
33
          <span>可共享资源</span>
34
        </div>
35
        <div class="content content-nf" v-if="platResources.length">
36
          <baseResource v-for="item in platResources" :key="item.index" :itemSingle="item" :noBlank="true"></baseResource>
37
          <p class="moretype" @click="moreProduct" v-show="loadingModalShow2">查看更多资源</p>
38
        </div>
39
      </div>
40
    </div>
41
    <div class="content-wrapper" v-if="orgInfo.descp">
42
      <div class="inner-wrapper">
43
        <div class="content-title">
44
          <span>机构简介</span>
45
        </div>
46
        <div class="content">{{orgInfo.descp}}</div>
47
      </div>
48
      <div class="inner-wrapper" v-if="orgInfo.subject && orgInfo.subject.length">
49
        <div class="content-title">
50
          <span>专注领域</span>
51
        </div>
52
        <div class="content">
53
          <el-row class="tag-item">
54
            <el-tag v-for="sub in orgInfo.subject" :key="sub.index">{{sub}}</el-tag>
55
          </el-row>
21
    <div class="block-wrapper">
22
        <div class="left-main">
23
          <div class="content-wrapper split-other" v-if="platServices.length || platResources.length">
24
            <div class="inner-wrapper" v-if="platServices.length">
25
              <div class="content-title">
26
                <span>可提供服务</span>
27
              </div>
28
              <div class="content content-nf" v-if="platServices.length">
29
                <baseService v-for="item in platServices" :key="item.index" :itemSingle="item" :noBlank="true"></baseService>
30
                <p class="moretype" @click="moreService" v-show="loadingModalShow">查看更多服务</p>
31
              </div>
32
            </div>
33
            <div class="inner-wrapper" v-if="platResources.length">
34
              <div class="content-title">
35
                <span>可共享资源</span>
36
              </div>
37
              <div class="content content-nf" v-if="platResources.length">
38
                <baseResource v-for="item in platResources" :key="item.index" :itemSingle="item" :noBlank="true"></baseResource>
39
                <p class="moretype" @click="moreProduct" v-show="loadingModalShow2">查看更多资源</p>
40
              </div>
41
            </div>
42
          </div>
43
          <div class="content-wrapper" v-if="orgInfo.descp">
44
            <div class="inner-wrapper">
45
              <div class="content-title">
46
                <span>机构简介</span>
47
              </div>
48
              <div class="content">{{orgInfo.descp}}</div>
49
            </div>
50
            <div class="inner-wrapper" v-if="orgInfo.subject && orgInfo.subject.length">
51
              <div class="content-title">
52
                <span>专注领域</span>
53
              </div>
54
              <div class="content">
55
                <el-row class="tag-item">
56
                  <el-tag v-for="sub in orgInfo.subject" :key="sub.index">{{sub}}</el-tag>
57
                </el-row>
58
              </div>
59
            </div>
60
          </div>
61
          <div class="content-wrapper" v-if="orgContents && orgContents.length">
62
            <div class="inner-wrapper">
63
              <div class="content-title">
64
                <span>相关文章</span>
65
              </div>
66
              <div class="content content-nf" v-if="orgContents.length">
67
                <baseContent v-for="item in orgContents" :key="item.index" :itemSingle="item" :noBlank="true"></baseContent>
68
              </div>
69
            </div>  
70
          </div>
71
          <div class="content-wrapper" v-if="likeOrgs && likeOrgs.length">
72
            <div class="inner-wrapper">
73
              <div class="content-title">
74
                <span>您可能感兴趣的机构</span>
75
              </div>
76
              <div class="content">
77
                <BaseOrg v-for="item in likeOrgs" :key="item.index" :itemSingle="item" :noBlank="true"></BaseOrg>>
78
              </div>
79
            </div>
80
          </div>
56 81
        </div>
57
      </div>
58
    </div>
59
    <div class="content-wrapper" v-if="orgContents && orgContents.length">
60
      <div class="content-title">
61
        <span>相关文章</span>
62
      </div>
63
      <div class="content content-nf" v-if="orgContents.length">
64
        <baseContent v-for="item in orgContents" :key="item.index" :itemSingle="item" :noBlank="true"></baseContent>
65
      </div>
66
    </div>
67
    <div class="content-wrapper" v-if="likeOrgs && likeOrgs.length">
68
      <div class="content-title">
69
        <span>您可能感兴趣的机构</span>
70
      </div>
71
      <div class="content">
72
        <BaseOrg v-for="item in likeOrgs" :key="item.index" :itemSingle="item" :noBlank="true"></BaseOrg>>
73
      </div>
74 82
    </div>
75 83
  </div>
76 84
</template>

+ 1 - 1
src/pages/h5/views/resource/resource.vue

@ -61,7 +61,7 @@
61 61
              <div class="content-title">
62 62
                <span>热门资源</span>
63 63
              </div>
64
              <div class="content">
64
              <div class="content content-nf">
65 65
                  <baseResource v-for="item in hotResources" :key="item.index" :itemSingle="item" :noBlank="true"></baseResource>
66 66
              </div>
67 67
            </div>

+ 2 - 0
src/pages/h5/views/search/search.vue

@ -289,6 +289,7 @@ export default {
289 289
      }, (res) => {
290 290
        if (res.success && res.data) {
291 291
          if (res.data.pageNo !== that.pageNo) {
292
            that.scrollData.loading = false
292 293
            return;
293 294
          }
294 295
          var $info = res.data.data;
@ -431,6 +432,7 @@ export default {
431 432
      }, (res) => {
432 433
        if (res.success) {
433 434
          if (res.data.pageNo !== that.pageNo) {
435
            that.scrollData.loading = false
434 436
            return;
435 437
          }
436 438
          var $info = res.data.data;