You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
<template>
|
|
<web-view :src="url"></web-view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
url: ""
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
},
|
|
onLoad(e) {
|
|
// 获取传递的网址
|
|
this.url = this.getWEBExtra(e)
|
|
if (this.url.indexOf("?") != -1) {
|
|
// 代表有拼接,传递登录的sid给网页,让网页去保存sid
|
|
this.url += ("&loginSid=" + getApp().globalData.memberSid)
|
|
this.url += ("&writeLogin=" + true)
|
|
} else {
|
|
// 代表无拼接,传递登录的sid给网页,让网页去保存sid
|
|
this.url += ("?loginSid=" + getApp().globalData.memberSid)
|
|
this.url += ("&writeLogin=" + true)
|
|
}
|
|
|
|
|
|
let _this = this
|
|
// $on 监听事件
|
|
uni.$on('login', (data) => {
|
|
// 这里加载登录状态保存的页面
|
|
_this.url = "https://www.ourpyw.com/hide/#/pages/login/LoginState?loginSid=" + getApp().globalData
|
|
.memberSid + "&writeLogin=" + true + "&refresh=" + true
|
|
})
|
|
},
|
|
onUnload() {
|
|
// 移除监听事件
|
|
uni.$off('login');
|
|
}
|
|
// 不能支持分享,否则可能把登录状态页分享出去
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|
|
|