Browse Source

Merge branch 'master' of http://git.chelingzhu.com/chelingzhu-web/zxyj-mini-html into develop_daping

1004749546@qq.com 4 years ago
parent
commit
0dc15896b5
3 changed files with 53 additions and 3 deletions
  1. 1 1
      App.vue
  2. 9 2
      pages.json
  3. 43 0
      pages/webView/webView.vue

+ 1 - 1
App.vue

@@ -4,7 +4,7 @@
 	const pro_domain = 'https://lese.sxzxyj.net' // 生产
 	const uat_URL = uat_domain+'/gc-shop/' // 预发布
 	const pro_URL = pro_domain+'/gc-shop/'  // 生产
-	const buildType = 1 // 打包环境对应类型,1 生产 0 预发布
+	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url
 	const envText = ['预发布环境','生产环境']
 	const envTips = process.env.NODE_ENV == 'development' ? envText[0] : envText[buildType]

+ 9 - 2
pages.json

@@ -138,7 +138,15 @@
                 "enablePullDownRefresh": false
             }
             
-        }
+        },
+		{
+			"path" : "pages/webView/webView",
+			"style" :                                                                                    
+			{
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		}
     ],
 	"subPackages": [{
 		"root": "pagesA",
@@ -253,7 +261,6 @@
 			        "navigationBarTitleText": "我的礼品卡",
 			        "enablePullDownRefresh": false
 			    }
-			    
 			}
             ]
 	}],

+ 43 - 0
pages/webView/webView.vue

@@ -0,0 +1,43 @@
+<template>
+	 <view>
+		<web-view :src="src"></web-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				src: '' //H5页面路径
+			}
+		},
+		onLoad(option) {
+			// console.log(option,'option')
+			this.src = option.src
+			// 开启分享
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+		},
+		methods: {
+			
+		},
+		onShareAppMessage(res){
+			return {
+				title:'',
+				path:'pages/webView/webView?src='+this.src
+			}
+		},
+		onShareTimeline(res){
+			return {
+				title:'',
+				path:'pages/webView/webView',
+				query:'src='+this.src
+			}
+		}
+	}
+</script>
+
+<style>
+</style>