Quellcode durchsuchen

详情页图片跳转

junyuanz vor 4 Jahren
Ursprung
Commit
0cdcfbfefc

+ 7 - 3
pages/projects/project-detail/project-detail.js

@@ -156,9 +156,9 @@ Page({
     var src = event.currentTarget.dataset.src;
     var imgList = event.currentTarget.dataset.list;
     var imgLists = []
-    for (var i = 0; i < imgList.length; i++) {
-      imgLists.push(imgList[i].img)
-    }
+	for (var i = 0; i < imgList.length; i++) {
+	  imgLists.push(imgList[i].img)
+	}
     wx.previewImage({
       current: src,
       urls: imgLists
@@ -192,11 +192,15 @@ Page({
       //我们可以在这里进行一些路由处理
       if(href){
       	//跳转的方法根据项目需求的不同自己替换,也可以加参数,
+		e.currentTarget.stop
 		wx.navigateTo({
 		  url: href
 		})
 	  }
   },
+  wxParseImgTap:function(e){
+	  return false;
+  },
   getProjectComment() {
     var that = this
     var url = "v1/product/" + that.data.productId +'/commends';

+ 7 - 1
pages/projects/project-detail/project-detail.wxss

@@ -581,6 +581,11 @@ margin-right: 2px;
 	width:100% !important;
 }
 
+.wxParse-p .w33{
+	width:33% !important;
+}
+
+
 .sizeTitle{display: block;font-size:24rpx}
 .checkList{display: inline-block;}
 .checkList span{
@@ -682,4 +687,5 @@ width: 14rpx;
 	    line-height: 36rpx;
 	    color: #666;
 		margin: 20rpx;
-}
+}
+

+ 9 - 5
project.config.json

@@ -14,16 +14,20 @@
     "checkInvalidKey": true,
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
     },
-    "useCompilerModule": false,
-    "userConfirmedUseCompilerModuleSwitch": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true
+    "useIsolateContext": true,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "showES6CompileOption": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.0.7",

+ 1 - 1
utils/wxParse/wxParse.js

@@ -49,7 +49,7 @@ function wxParse(bindName = 'wxParseData', type='html', data='<div class="color:
   bindData[bindName] = transData;
   that.setData(bindData)
   that.wxParseImgLoad = wxParseImgLoad;
-  that.wxParseImgTap = wxParseImgTap;
+  // that.wxParseImgTap = wxParseImgTap;
 }
 // 图片点击事件
 function wxParseImgTap(e) {