city_card/pages/columnlist/columnlist.js
2023-07-15 14:25:28 +08:00

55 lines
1.4 KiB
JavaScript

var t = getApp();
Page({
data: {
groupId: "",
menuList: [],
title: "栏目",
imgUrl: t.baseUrls.baseCardUrl
},
onLoad: function(t) {
this.setData({
groupId: t.id,
title: t.title
}), wx.setNavigationBarTitle({
title: t.title
}), this.getList();
},
getList: function() {
wx.showLoading({
title: "加载中..."
});
var e = this;
t.http.get(t.urls.getColumnListByGroupId, {
header: {
token: t.globalData.token
},
data: {
configColumnGroupId: e.data.groupId
}
}).then(function(t) {
wx.hideLoading({}), e.setData({
menuList: t.data
});
}).catch(function(t) {
wx.hideLoading({});
});
},
choosePage: function(t) {
var e = t.currentTarget.dataset.path, a = t.currentTarget.dataset.type, i = t.currentTarget.dataset.item;
switch (a) {
case "1":
case "3":
wx.navigateTo({
url: e + "?id=" + i.configColumnId + "&mode=" + i.configTableMode + "&type=" + i.configColumnType + "&title=" + i.configColumnName
});
break;
case "2":
wx.navigateToMiniProgram({
appId: "",
success: function(t) {}
});
}
}
});