wujingjing
2024-08-12 9de6cf5226f7df076449a39c5adeb431b12fe923
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { SHARE_CONFIG } from "@/config/constants";
import { getCurrentUrl } from "@/utils/common";
import { clearStorage,getStorage } from "@/utils/storage"
const app = getApp();
// pages/my/my.ts
Page({
 
  /**
   * 页面的初始数据
   */
  data: {
    userName:getStorage('username'),
    phoneNumber: app.globalData.user.phoneNum
  },
  logout(){
    clearStorage();
    wx.reLaunch({
      url: '/pages/login/login',
    })
  },
  onShow(){
    this.setData({
      userName:getStorage('username'),
      phoneNumber:app.globalData.user.phoneNum
    })
  },
 
  onShareAppMessage() {
    return wx.$_.defaults(SHARE_CONFIG, {
      // path: getCurrentUrl(),
    })
  }
})