|
@@ -6,17 +6,23 @@ Page({
|
|
|
*/
|
|
|
data: {
|
|
|
frameStyle: { useTop: true, name: '我的', leftArrow: false, useBar: true },
|
|
|
- icon: '/image/icon.jpg'
|
|
|
+ icon: '/image/icon.jpg',
|
|
|
+ btnList: [
|
|
|
+ { title: '我的赛事', route: 'usermymatch' },
|
|
|
+ { title: '账号设置', route: 'setting' }
|
|
|
+ ]
|
|
|
},
|
|
|
// 跳转菜单
|
|
|
tabPath(e) {
|
|
|
let { route } = e.detail.detail;
|
|
|
if (route) wx.redirectTo({ url: `/${route}` })
|
|
|
},
|
|
|
- // 详细信息
|
|
|
- toView: function (e) {
|
|
|
- const { item } = e.currentTarget.dataset;
|
|
|
- wx.navigateTo({ url: `/pages/my/userInfo` })
|
|
|
+ toCommon: function (e) {
|
|
|
+ const { route, type } = e.currentTarget.dataset;
|
|
|
+ // 自定义路径
|
|
|
+ if (type == '0') { wx.navigateTo({ url: `${route}` }) }
|
|
|
+ // 默认路径
|
|
|
+ else if (type == '1') { wx.navigateTo({ url: `/pages/${route}/index` }) }
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|