xjc 3 tahun lalu
induk
melakukan
2cea087469
4 mengubah file dengan 19 tambahan dan 13 penghapusan
  1. 6 0
      pages/index/index.js
  2. 2 2
      pages/index/index.wxml
  3. 2 2
      pages/knowledge/knowledge.wxml
  4. 9 9
      project.config.json

+ 6 - 0
pages/index/index.js

@@ -353,6 +353,12 @@ Page({
   toDetail:function(e){
     // console.log(e)
   },
+  toBanner:function(e){
+    var url = e.target.dataset.id
+    wx.navigateTo({
+      url: url,
+    })
+  },
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */

+ 2 - 2
pages/index/index.wxml

@@ -4,10 +4,10 @@
     <image  mode="widthFix" src="../images/search.png"></image>
 </view>
 
-<swiper class="banner" indicator-dots="{{true}}" autoplay="" indicator-active-color='#ffffff'>
+<swiper catchtap="toBanner" class="banner" indicator-dots="{{true}}" autoplay="" indicator-active-color='#ffffff'>
         <block wx:for="{{lb}}" wx:key="*this">
           <swiper-item>
-            <image  src="{{item.img}}"></image>
+            <image  src="{{item.img}}" data-id="{{item.url}}"></image>
             <!-- <view class="swiper-item">{{item.text}}</view> -->
           </swiper-item>
         </block>

+ 2 - 2
pages/knowledge/knowledge.wxml

@@ -31,9 +31,9 @@
                   <view class="title"> <rich-text nodes="{{item.name}}"></rich-text></view>
                   <view class="ly"> 
                               <view>
-                                  <text>2018.5.28</text>
+                                  <text>{{item.publish_time}}</text>
                               </view>
-                              <text>作者:</text>
+                              <text>作者:{{item.author}}</text>
                               <text></text> 
                   </view>
                   <text class="">主办单位:{{item.desc}}</text>

+ 9 - 9
project.config.json

@@ -6,34 +6,34 @@
 	"setting": {
 		"urlCheck": true,
 		"es6": true,
-		"enhance": false,
 		"postcss": true,
 		"preloadBackgroundData": false,
 		"minified": true,
 		"newFeature": true,
 		"coverView": true,
-		"nodeModules": false,
 		"autoAudits": false,
 		"showShadowRootInWxmlPanel": true,
 		"scopeDataCheck": false,
-		"uglifyFileName": false,
 		"checkInvalidKey": true,
 		"checkSiteMap": true,
 		"uploadWithSourceMap": true,
-		"compileHotReLoad": false,
-		"useMultiFrameRuntime": true,
-		"useApiHook": true,
-		"useApiHostProcess": true,
 		"babelSetting": {
 			"ignore": [],
 			"disablePlugins": [],
 			"outputPath": ""
 		},
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false,
+		"enhance": false,
+		"nodeModules": false,
+		"uglifyFileName": false,
+		"compileHotReLoad": false,
+		"useMultiFrameRuntime": true,
+		"useApiHook": true,
+		"useApiHostProcess": true,
 		"enableEngineNative": false,
 		"bundle": false,
 		"useIsolateContext": true,
-		"useCompilerModule": false,
-		"userConfirmedUseCompilerModuleSwitch": false,
 		"userConfirmedBundleSwitch": false,
 		"packNpmManually": false,
 		"packNpmRelationList": [],