瀏覽代碼

bug 修复

lilei 4 年之前
父節點
當前提交
cabfa77828
共有 4 個文件被更改,包括 16 次插入7 次删除
  1. 5 1
      project.config.json
  2. 2 1
      src/components/swiper.vue
  3. 7 4
      src/pages/h5Page/index.vue
  4. 2 1
      src/pages/index/index.vue

+ 5 - 1
project.config.json

@@ -22,7 +22,9 @@
 			"ignore": [],
 			"disablePlugins": [],
 			"outputPath": ""
-		}
+		},
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.14.1",
@@ -37,6 +39,8 @@
 		"hidedInDevtools": []
 	},
 	"scripts": {},
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
 	"condition": {
 		"search": {
 			"current": -1,

+ 2 - 1
src/components/swiper.vue

@@ -39,8 +39,9 @@ export default {
        wx.navigateTo({ url });
      }else if(type == 'web_view'){
        // webview
+       wx.setStorageSync('webviewUrl', item.redirectPath)
        wx.navigateTo({
-         url: '/pages/h5Page/main?src='+url
+         url: '/pages/h5Page/main'
        })
      }
     }

+ 7 - 4
src/pages/h5Page/index.vue

@@ -19,17 +19,20 @@ export default {
   },
   onHide() {
   },
-  onUnload() {
+  onShareAppMessage: function (res) {
+  },
+  onShareTimeline: function(res) {
   },
   onShow() {
+    wx.show
   },
   onLoad(options) {
      wx.showLoading({
        title: '加载中',
      })
-     console.log(options.src)
-     this.src = options.src
-
+     // 获取页面地址
+     this.src =  wx.getStorageSync('webviewUrl') + '&win=mini'
+     console.log(this.src)
      setTimeout(function() {
        wx.hideLoading()
      }, 3000);

+ 2 - 1
src/pages/index/index.vue

@@ -95,8 +95,9 @@ export default {
         wx.navigateTo({ url });
       }else if(type == 'web_view'){
         // webview
+        wx.setStorageSync('webviewUrl', item.redirectPath)
         wx.navigateTo({
-          url: '/pages/h5Page/main?src='+url
+          url: '/pages/h5Page/main'
         })
       }
     },