From 282e032b5771da13d224214d3b0b71f3efde9a42 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 25 八月 2023 18:45:42 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes

---
 minipro_standard/pages/index/index.vue |   79 ++++++++++++---------------------------
 1 files changed, 25 insertions(+), 54 deletions(-)

diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index c6d7304..74356de 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -1,73 +1,44 @@
 <template>
-	<view>
-		<myTabbar :index="0" />
+	<view class="index">
+		<web-view v-if="show" @onPostMessage="onMessage" :src="'https://dmtest.ahapp.net/doumeeplant_h5/#/appletLogin?code=' + code"></web-view>
+		<!-- <myTabbar :index="0" /> -->
 	</view>
 </template>
 
 <script>
-	import myTabbar from "@/components/myTabber.vue"
+	// import myTabbar from "@/components/myTabber.vue"	
 	export default {
-		components: {
-			myTabbar
-		},
+		// components: {
+		// 	myTabbar
+		// },
 		data() {
 			return {
-				form: {
-					account: '',
-					password: '',
-				},
-				logining: false,
-				openId: ''
+				code: '',
+				show: false
 			}
 		},
 		onLoad() {
-			// uni.login({
-			// 	success: data => {
-			// 		this.wxLogin(data.code)
-			// 	},
-			// 	fail: err => {
-			// 		uni.$u.toast(err)
-			// 	}
-			// })
+			var that = this
+			uni.login({
+				provider: 'weixin',
+				success: function (loginRes) {
+					// console.log(loginRes);
+					that.code = loginRes.code
+					that.show = true
+				}
+			});
 		},
 		methods: {
-			// loginAction() {
-			// 	if (!this.form.account || !this.form.password) {
-			// 		uni.$u.toast('璐﹀彿鎴栬�呭瘑鐮佷笉鑳戒负绌�')
-			// 	}
-			// 	this.logining = true
-			// 	coustomLogin({...this.form, openid: this.openId})
-			// 		.then(res => {
-			// 			this.$store.commit('SETTOKEN', res.token)
-			// 			this.$store.commit('SETUSERINFO', res)
-			// 			uni.navigateTo({
-			// 				url:'/pages/projectList/projectList'
-			// 			})
-			// 		})
-			// 		.finally(() => {
-			// 			this.logining = false
-			// 		})
-			// },
-			// wxLogin(code) {
-			// 	wxEmpower({code})
-			// 		.then(res => {
-			// 			this.openId = res.openid
-			// 			if (res.userInfo) {
-			// 				this.$store.commit('SETTOKEN', res.userInfo.token)
-			// 				this.$store.commit('SETUSERINFO', res.userInfo)
-			// 				uni.navigateTo({
-			// 					url:'/pages/projectList/projectList'
-			// 				})
-			// 			} 
-			// 		})
-			// 		.catch(err => {
-			// 			uni.$u.toast(err)
-			// 		})
-			// }
+			onMessage(e) {
+				console.log('12345654321')
+			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	
+	.index {
+		width: 100vw;
+		height: 100vh;
+	}
 </style>

--
Gitblit v1.9.3