1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // components/My_navBar/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- },
- lifetimes: {
- attached: function () {
- // 在组件实例进入页面节点树时执行
- //获取当前登录用户名
- /* const userName = getApp().globalData.accountList[wx.getStorageSync('userIndex')].fname;
- this.setData({
- userName
- }) */
- },
- detached: function () {
- // 在组件实例被从页面节点树移除时执行
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- userName: "", //用户名
- NavHeight: getApp().globalData.myNavBorHeight, //头部导航高度
- capsule: wx.getMenuButtonBoundingClientRect(), //胶囊位置
- },
- /**
- * 组件的方法列表
- */
- methods: {
- a1212() {
- //跳转到选择账号
- wx.navigateTo({
- url: '/pages/login/index?type=' + 2,
- })
- }
- }
- })
|