huanggang 7 rokov pred
rodič
commit
c8726db9e9

+ 3 - 1
pages/components/blockItem/blockItem.js

@@ -32,8 +32,10 @@ Component({
       if(!type)return;
       switch(type){
         case "url":{
+          let attr = encodeURIComponent(`${target_data}&title=${title}`);
+          console.log(attr);
           wx.navigateTo({
-            url: `/pages/webView/webView?url=${target_data}&title=${title}`
+            url: '/pages/webView/webView?url='+attr
           })
           break;
         }

+ 1 - 3
pages/shopCart/shopCart.wxml

@@ -1,4 +1,2 @@
 <!--logs.wxml-->
-<view class="container log-list">
-  shop_cart
-</view>
+<web-view src="https://passport.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=28971520821035338917&title=%E6%AF%8F%E5%A4%A9%E5%8D%81%E7%82%B9%20%E8%AF%95%E8%AF%95%E6%89%8B%E6%B0%94"></web-view>

+ 6 - 4
pages/webView/webView.js

@@ -12,9 +12,11 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    
+    let url = decodeURIComponent(options.url);
+    var reg = /[\u4E00-\u9FA5]/g;
+    var result = url.replace(reg, '');
     this.setData({
-      webViewUrl: options.url
+      webViewUrl: result
     })
   },
 
@@ -22,14 +24,14 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-  
+
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-  
+
   },
 
   /**

+ 5 - 5
project.config.json

@@ -21,16 +21,16 @@
 			"current": -1,
 			"list": []
 		},
-		"game": {
-			"currentL": -1,
-			"list": []
-		},
 		"plugin": {
 			"current": -1,
 			"list": []
 		},
+		"game": {
+			"currentL": -1,
+			"list": []
+		},
 		"miniprogram": {
-			"current": 1,
+			"current": -1,
 			"list": [
 				{
 					"id": 0,