|
@@ -4,10 +4,10 @@
|
|
|
<view class="rnwdList">
|
|
|
<view class="list" @tap="goDetails(item)" v-for="(item, index1) in dataSource" :key="index1">
|
|
|
<span class="lb">{{ item.popular == '1' ? '热门' : '非热门' }}</span>
|
|
|
- <span class="listTitle" v-if="item.imgUrlList != null">{{ item.titleName }}</span>
|
|
|
- <view class="onePic" v-if="item.imgUrlList != null && item.imgUrlList.split(',').length == 1">
|
|
|
+ <span class="listTitle">{{ item.titleName }}</span>
|
|
|
+ <view class="onePic" v-if="item.imgUrlList !=null && item.imgUrlList.split(',').length == 1">
|
|
|
<image :src="loadImgSrcLocalhost(itemurl)" v-for="(itemurl, index1) in item.imgUrlList.split(',')" :key="index1">
|
|
|
- </image>
|
|
|
+ </image>、
|
|
|
</view>
|
|
|
|
|
|
<view class="twoPic" v-if="item.imgUrlList != null && item.imgUrlList.split(',').length == 2">
|
|
@@ -42,7 +42,8 @@
|
|
|
<script>
|
|
|
import {
|
|
|
list,
|
|
|
- knowledgePay
|
|
|
+ knowledgePay,
|
|
|
+ getDetails
|
|
|
} from '@/api/knowledge/knowledge.js';
|
|
|
export default {
|
|
|
data() {
|
|
@@ -101,9 +102,13 @@
|
|
|
}
|
|
|
knowledgePay(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/highServer/knowledgeDetails/knowledgeDetails?id=' + item.id,
|
|
|
- });
|
|
|
+ getDetails(item.id).then(res => {
|
|
|
+ let data = res.data
|
|
|
+ data.urls = data.imgUrlList.split(',')
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/common/articleDetail/articleDetail?data=${this.encodify(data)}`
|
|
|
+ });
|
|
|
+ })
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg
|