球星卡微信小程序
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.
 
 
 
 

52 lines
1.0 KiB

<script>
export default {
globalData: {
wxlogin: () => {}, // 登录方法
},
onLaunch: function() {
console.log('App Launch');
this.globalData.wxlogin = this.wxlogin;
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods: {
wxlogin(){
return new Promise((resolve, rejecj) => {
uni.login({
complete: result => {
if(result.errMsg == 'login:ok'){
let code = result.code;
console.log("login.code", code);
// this.$http(this.API.API_WXLOGIN, { code }).then(res => {
// console.log("获得用户信息", res);
// uni.setStorageSync('userinfo', res.data);
// resolve(res.data);
// })
}
}
})
})
},
}
}
</script>
<style>
@import url("styles/common.css");
@import url("styles/lanhu.css");
@import url("styles/iconFont.css");
/*每个页面公共css */
page{
background-color: #F6F6F6;
}
.splitLine{
background-color: rgba(0,0,0,0.06);
height: 1rpx;
}
</style>