小程序商品列表页优化;添加我的订单页面
This commit is contained in:
@@ -16,11 +16,17 @@ Page({
|
||||
avatarUrl: defaultAvatarUrl,
|
||||
nickName: "请登录",
|
||||
displayUserId: "",
|
||||
menuList: [{
|
||||
id: "logout",
|
||||
color: 'red',
|
||||
title: "退出登录",
|
||||
}]
|
||||
menuList: [
|
||||
{
|
||||
id: "myOrder",
|
||||
title: "我的订单",
|
||||
},
|
||||
{
|
||||
id: "logout",
|
||||
color: 'red',
|
||||
title: "退出登录",
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -111,6 +117,14 @@ Page({
|
||||
console.log("event.target", event.target)
|
||||
let menuId = event.target.id
|
||||
switch (menuId) {
|
||||
// 我的订单
|
||||
case "myOrder":
|
||||
wx.navigateTo({
|
||||
url: '/pages/shop/myOrder'
|
||||
})
|
||||
break
|
||||
|
||||
// 退出登录
|
||||
case "logout":
|
||||
wx.clearStorageSync()
|
||||
app.globalData.userInfo = null
|
||||
|
Reference in New Issue
Block a user