| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <style lang="scss">
- /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
- @import "uview-ui/index.scss";
- </style>
- <script>
- export default {
- onLaunch: function() {
- let that = this;
- wx.login({
- success(re) {
- that.$api.wxLogin({code:re.code}).then(res=>{
- uni.setStorageSync('userInfo',res.data.data.userInfo)
- uni.setStorageSync('accessToken',res.data.data.access_token)
- uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
- uni.removeStorageSync('parent_member_id');
- if (!res.data.data.phoneIsBind){
- uni.showModal({
- title:'温馨提示',
- content:'请绑定手机号,以便为你提供服务',
- success:res=>{
- if (res.confirm){
- uni.navigateTo({
- url: '/myPages/setting/setting-telphone',
- })
- }
- }
- })
- }
- })
- },
- })
- console.log('App Launch')
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
|