wangxy 5 일 전
부모
커밋
c35c35cb46
2개의 변경된 파일71개의 추가작업 그리고 2개의 파일을 삭제
  1. 35 1
      pages/xydtXueyuanxinwenInfo/xydtXueyuanxinwenInfo.vue
  2. 36 1
      pages/zypxTongzhigonggaoInfo/zypxTongzhigonggaoInfo.vue

+ 35 - 1
pages/xydtXueyuanxinwenInfo/xydtXueyuanxinwenInfo.vue

@@ -24,6 +24,22 @@
 					<MtaMpHtml class="dljt-editor-box" :content="data.info.content" ></MtaMpHtml>
 					
 				</view>
+				
+				<!-- table -->
+				<view class="dljt-table-box" v-if="isHasLink(data.info.ziliao)">
+					<view class="table-th-row">
+						<view style="width: 15%">序号</view>
+						<view style="width: 60%">资料名称</view>
+						<view style="width: 25%">下载</view>
+					</view>
+					<view class="table-td-row" v-for="(ccIte,index) in data.info.ziliao">
+						<view style="width: 15%" class="item-center"><view>{{index+1}}</view></view>
+						<view style="width: 60%"><view>{{ccIte.name}}</view></view>
+						<view style="width: 25%">
+							<a class="table-btn" @click="handleDownFile(ccIte)" >文件下载</a>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 		<!-- 底部导航 -->
@@ -64,8 +80,26 @@
 		data.id = id;
 		pageInit();
 	})
-
+	function handleDownFile(ccite) {
+		window.location.href = ccite.url;
+	}
   
+  function isHasLink(list) {
+    if (!list) {
+      return false;
+    }
+    if (list.length>1) {
+      return true
+    }
+    if (list.length == 0 ) {
+      return false
+    }
+    if (list.length == 1 && list[0].name && list[0].url) {
+      return true
+    }
+  
+    return false
+  }
   function handleGo(code) {
 	  if (code == 'shouye') {
 		  uni.navigateTo({

+ 36 - 1
pages/zypxTongzhigonggaoInfo/zypxTongzhigonggaoInfo.vue

@@ -24,6 +24,22 @@
 					<MtaMpHtml class="dljt-editor-box" :content="data.info.content"></MtaMpHtml>
 
 				</view>
+				
+				<!-- table -->
+				<view class="dljt-table-box" v-if="isHasLink(data.info.ziliao)">
+					<view class="table-th-row">
+						<view style="width: 15%">序号</view>
+						<view style="width: 60%">资料名称</view>
+						<view style="width: 25%">下载</view>
+					</view>
+					<view class="table-td-row" v-for="(ccIte,index) in data.info.ziliao">
+						<view style="width: 15%" class="item-center"><view>{{index+1}}</view></view>
+						<view style="width: 60%"><view>{{ccIte.name}}</view></view>
+						<view style="width: 25%">
+							<a class="table-btn" @click="handleDownFile(ccIte)" >文件下载</a>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 		<!-- 底部导航 -->
@@ -69,7 +85,26 @@
 		data.id = id;
 		pageInit();
 	})
-
+	
+	function handleDownFile(ccite) {
+		window.location.href = ccite.url;
+	}
+  function isHasLink(list) {
+    if (!list) {
+      return false;
+    }
+    if (list.length>1) {
+      return true
+    }
+    if (list.length == 0 ) {
+      return false
+    }
+    if (list.length == 1 && list[0].name && list[0].url) {
+      return true
+    }
+  
+    return false
+  }
 
 	function handleGo(code) {
 		if (code == 'shouye') {