Browse Source

问吧详情积分icon
知识库详情fixed 标题名称 fixed

付宇航 1 năm trước cách đây
mục cha
commit
8a09385d57
2 tập tin đã thay đổi với 16 bổ sung8 xóa
  1. 4 1
      pages/asking/questiondetails.vue
  2. 12 7
      pages/highServer/knowledge/knowledge.vue

+ 4 - 1
pages/asking/questiondetails.vue

@@ -14,7 +14,10 @@
           </view>
         </view>
         <!-- 积分 -->
-        <span class="jf">{{ form.score }}</span>
+		<span class="jf">
+		    {{ form.score }}
+		    <em class="iconfont icon-jifen"></em>
+		</span>
       </view>
       <view class="wenzhangCont">
         <view v-html="form.text" class="rich-text"></view>

+ 12 - 7
pages/highServer/knowledge/knowledge.vue

@@ -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