From c5c6fa800cedd37cea0e3cc3e68df78b47ee2813 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 28 八月 2023 10:37:59 +0800
Subject: [PATCH] 111
---
minipro_standard/pages/index/index.vue | 71 ++++++++++-------------------------
1 files changed, 21 insertions(+), 50 deletions(-)
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index c6d7304..225d435 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -1,73 +1,44 @@
<template>
- <view>
+ <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
},
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