123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <view class="content">
- <view class="" style="height: 20rpx;">
-
- </view>
- <view class="jj-tit" v-if="gsjjList.length > 0">
- <view class="left">
- <image src="../../static/icon/gsjj.png" mode="" class="jj-log"></image>
- <view class="jj-title">
- 公司简介
- </view>
- </view>
- <!-- <view class="right" @click="navto('/pages/index/artList?cid=1')">
- <view class="jj-more-tit">
- 更多
- </view>
- <image src="../../static/img/img39.png" mode="" class="jj-more"></image>
- </view> -->
- </view>
- <view class="jj-wrap" v-if="gsjjList.length > 0">
- <view class="jj" v-for="gs in gsjjList" @click="navto('/pages/index/artDetail?id=' + gs.id)">
- <image :src="gs.image_input[0]" mode="" class="jj-img"></image>
- <view class="jj-info">
- <view class="jj-tit-tit clamp">
- {{gs.title}}
- </view>
- <view class="jj-val clamp2">
- 更新时间{{gs.add_time}}
- </view>
- </view>
- </view>
- </view>
- <!-- 产品简介 -->
- <view class="jj-tit" style="margin-top: 20rpx;">
- <view class="left">
- <image src="../../static/icon/cpjj.png" mode="" class="jj-log"></image>
- <view class="jj-title">
- 商城简介
- </view>
- </view>
- <!-- <view class="right" @click="navto('/pages/index/artList?cid=2')">
- <view class="jj-more-tit">
- 更多
- </view>
- <image src="../../static/img/img39.png" mode="" class="jj-more"></image>
- </view> -->
- </view>
- <view class="scjj" style="padding: 20rpx;background-color: #fff;">
- <view class="" v-html="content">
-
- </view>
- </view>
- <!-- <view class="jj-wrap" v-if="cpjjList.length > 0">
- <view class="jj" v-for="cp in cpjjList" @click="navto('/pages/index/artDetail?id=' + cp.id)">
- <image :src="cp.image_input[0]" mode="" class="jj-img"></image>
- <view class="jj-info">
- <view class="jj-tit-tit clamp2">
- {{cp.title}}
- </view>
- <view class="jj-val clamp">
- 更新时间{{cp.add_time}}
- </view>
- </view>
- </view>
- </view> -->
- </view>
- </template>
- <script>
- import {
- loadIndexs,
- getArticleList,
- getArtDetai
- } from '@/api/index.js';
- export default {
- data() {
- return {
- cpjjList: [],
- gsjjList: [],
- content: ''
- }
- },
- onShow() {
- this.getArticleList()
- },
- methods: {
- navto(url) {
- console.log(url)
- uni.navigateTo({
- url: url
- })
- },
- getArticleList() {
-
-
-
-
-
-
-
- let obj = this
- getArticleList({
- pages: 1,
- limit: 3
- },1).then(({data}) => {
- console.log(data)
- this.gsjjList = data
- })
- getArtDetai({},6).then(res => {
- console.log(res)
- obj.content = res.data.content
- if(obj.content != null){
- obj.content = obj.content.replace(/<img/g,"<img style='max-width:100%;height:auto;min-width:100%;'");
- }
- })
- },
- }
- }
- </script>
- <style lang="scss">
- .jj-tit {
- display: flex;
-
- justify-content: space-between;
- background-color: #fff;
- padding-top: 20rpx;
- .left {
- padding-left: 20rpx;
- display: flex;
- .jj-log {
- width: 45rpx;
- height: 45rpx;
- }
- .jj-title {
- font-weight: bold;
- font-size: 32rpx;
- padding-left: 15rpx;
- }
- }
- .right {
- display: flex;
- width: 200rpx;
- font-size: 22rpx;
-
- justify-content: flex-end;
- align-items: center;
- padding-right: 20rpx;
- color: #999;
- .jj-more {
- margin-left: 10rpx;
- width: 15rpx;
- height: 22rpx;
- }
- }
- }
- .jj-wrap {
- background-color: #fff;
-
- .jj {
- margin: auto;
- width: 689rpx;
- height: 202rpx;
- border-bottom: 1px solid #e5e5e5;
- padding: 20rpx;
- padding-left: 0;
- display: flex;
- &:last-of-type {
- border-bottom: none;
- }
- .jj-img {
- flex-shrink: 0;
- width: 222rpx;
- height: 158rpx;
- background-color: #bfa;
- border-radius: 10rpx;
- }
- .jj-info {
- width: 450rpx;
-
- padding: 10rpx;
- padding-left: 15rpx;
- font-size: 32rpx;
- font-weight: bold;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .jj-tit-tit {
-
- }
- .jj-val {
- padding-top: 20rpx;
- font-size: 28rpx;
- font-weight: 500;
- }
- }
- }
- }
- </style>
|