ufutx_love_mp/src/pages/tabBar/welcome.wpy

55 lines
1004 B
Plaintext
Raw Normal View History

2024-08-16 09:14:13 +08:00
<style lang="less">
page {
background-color: #F8F8F8 !important;
}
</style>
<template>
<view></view>
</template>
<!--x-->
<script>
import wepy from '@wepy/core'
import https from '../../mixins/https'
import base from '../../mixins/base'
2024-08-16 18:00:23 +08:00
import {wx_login} from '../../utils/util'
import { IM } from '../../utils/im'
2024-08-16 09:14:13 +08:00
wepy.page({
config: {},
mixins: [https, base],
data: {},
watch: {},
2024-08-16 18:00:23 +08:00
methods: {
appLogin() {
let vm = this
let app = vm.$app.$options
wx_login().then((e) => {
wx.hideLoading()
let {accid, token} = e.data.user.wyy_user
app.globalData.nim = IM(accid, token)
setTimeout(() => {
wx.switchTab({url: `/pages/tabBar/home`})
}, 100)
}).catch(() => {
})
}
2024-08-16 09:14:13 +08:00
},
2024-08-16 18:00:23 +08:00
onLoad() {
let vm = this
vm.appLogin()
},
onShow() {},
2024-08-16 09:14:13 +08:00
created() {
}
})
</script>
<config>
{
navigationBarTitleText: '加载中...',
navigationBarBackgroundColor: '#f8f8f8',
enablePullDownRefresh: true,
}
</config>