Ver código fonte

部分文章不对处理

elis 1 ano atrás
pai
commit
8993e5fa27

+ 1 - 1
nnzwminiapp/pages/publics/index/index.js

@@ -255,7 +255,7 @@ Page({
 			case 0:
 				// 文字解读
 				wx.request({
-					url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=3&channelId=222894',
+					url: 'https://data.cqna.gov.cn/mini/hlw/send?page=1&limit=3&channelId=158048',
 					method: 'GET',
 					success: res => {
 						this.setData({

+ 13 - 13
nnzwminiapp/pages/publics/interpretation/interpretation.js

@@ -12,7 +12,7 @@ Page({
 		imgUrl: imgUrl,
 		interpretationList: [{
 				title: '文字解读',
-				channelId: '222894'
+				channelId: '158048'
 			},
 			{
 				title: '图文解读',
@@ -71,22 +71,22 @@ Page({
 			url: 'https://data.cqna.gov.cn/mini/hlw/send?page=' + this.data.page + '&limit=20&channelId=' + this.data.interpretationList[this.data.currentTab].channelId,
 			method: 'GET',
 			success: res => {
-      
+
 				if (res.data.data.DATA.length > 0) {
 					let temp = res.data.data.DATA;
-					if (this.data.currentTab == 1||this.data.currentTab == 2) {
+					if (this.data.currentTab == 1 || this.data.currentTab == 2) {
 						// 图文解读
-						for (let i=0;i<temp.length;i++) {
+						for (let i = 0; i < temp.length; i++) {
 							// 截取logo图片
-              let url = temp[i].DOCPUBURL.substring(0, temp[i].DOCPUBURL.lastIndexOf("/") + 1)
-            //   console.log(url);
-              let logo = temp[i].LOGOURL.substring(temp[i].LOGOURL.lastIndexOf("FileName=") + "fileName=".length)
-            //   console.log(logo);
-              if (logo==''||logo==null) {
-                temp[i].logoImg = '../../images/zw.jpg'
-              }else{
-                temp[i].logoImg = url + logo
-              }
+							let url = temp[i].DOCPUBURL.substring(0, temp[i].DOCPUBURL.lastIndexOf("/") + 1)
+							//   console.log(url);
+							let logo = temp[i].LOGOURL.substring(temp[i].LOGOURL.lastIndexOf("FileName=") + "fileName=".length)
+							//   console.log(logo);
+							if (logo == '' || logo == null) {
+								temp[i].logoImg = '../../images/zw.jpg'
+							} else {
+								temp[i].logoImg = url + logo
+							}
 						}
 					}
 					temp = this.data.interpretationListInfo.concat(temp);

+ 1 - 1
nnzwminiapp/pages/publics/interpretation/interpretation.wxml

@@ -11,7 +11,7 @@
 		<!-- 文字解读 -->
 		<swiper-item>
 			<scroll-view scroll-y="true" style="height: 100%;padding:0;margin:0;" bindscrolltolower="scrollBottom">
-				<view bindtap="gotoDetail" data-channelid="{{item.CHNLID}}" wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{interpretationListInfo}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 120rpx;font-size: 28rpx;color: #666666;width: 700rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
+				<view bindtap="gotoDetailByDocId" data-url="{{item.DOCPUBURL}}" data-channelid="{{item.CHNLID}}" data-docid="{{item.DOCID}}" wx:for-item="item" wx:for-index="index" wx:key="index" wx:for="{{interpretationListInfo}}" style="display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;height: 120rpx;font-size: 28rpx;color: #666666;width: 700rpx;margin-left: 23rpx;border-bottom: 2rpx solid #CCCCCC;">
 					<view class="limit-text-1" style="width: 600rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient:vertical;">{{item.DOCTITLE}}</view>
 					<view>{{filter.formateDate(item.DOCRELTIME)}}</view>
 				</view>