"use strict";
|
const common_vendor = require("../../common/vendor.js");
|
const _sfc_main = {
|
data() {
|
return {
|
title: "Hello",
|
lists: [],
|
tabCur: 0,
|
routerr: ""
|
};
|
},
|
mounted() {
|
this.GetSuperCategory();
|
},
|
onLoad() {
|
let rr = getCurrentPages();
|
this.routerr = rr[rr.length - 1].route;
|
console.log("rr", rr);
|
},
|
onShareAppMessage: function() {
|
return {
|
title: "淘券获取",
|
path: " /pages/index/index"
|
// promise
|
};
|
},
|
onShareTimeline() {
|
return {
|
title: "淘券获取",
|
query: "/pages/index/index"
|
};
|
},
|
methods: {
|
GetSuperCategory() {
|
let me = this;
|
common_vendor.index.request({
|
url: "https://h.ushopvip.com/api/TkProduct/GetSuperCategory",
|
method: "POST",
|
// data: {},
|
success(res) {
|
var _a;
|
console.log("GetSuperCategory:", res);
|
if ((_a = res.data) == null ? void 0 : _a.success) {
|
me.lists = res.data.result;
|
}
|
},
|
fail(err) {
|
console.log("获取openid失败:", err);
|
}
|
});
|
},
|
changeTab(i) {
|
this.tabCur = i;
|
},
|
gotogoodDetail(type, id) {
|
if (type == 1) {
|
common_vendor.index.navigateTo({
|
url: "/pages/goodDetail/index?id=" + id
|
});
|
} else if (type == 2) {
|
common_vendor.index.navigateTo({
|
url: "/pages/rankingList/index?id=" + id
|
});
|
} else if (type == 3) {
|
common_vendor.index.navigateTo({
|
url: "/pages/madBuy/index?id=" + id
|
});
|
} else if (type == 4) {
|
common_vendor.index.navigateTo({
|
url: "/pages/index/search/index"
|
});
|
}
|
},
|
gotoPage(keyWords) {
|
common_vendor.index.navigateTo({
|
url: "/pages/index/search/index?keyWords=" + keyWords
|
});
|
}
|
}
|
};
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
var _a;
|
return {
|
a: common_vendor.o(($event) => $options.gotogoodDetail(4, "")),
|
b: common_vendor.f($data.lists, (item, index, i0) => {
|
return {
|
a: common_vendor.t(item == null ? void 0 : item.cname),
|
b: common_vendor.n($data.tabCur === index ? "classify_leftsignalHL" : "classify_leftsignalAN"),
|
c: common_vendor.o(($event) => $options.changeTab(index))
|
};
|
}),
|
c: common_vendor.f((_a = $data.lists[$data.tabCur]) == null ? void 0 : _a.subcategories, (item2, index, i0) => {
|
return {
|
a: item2 == null ? void 0 : item2.scpic,
|
b: common_vendor.t(item2 == null ? void 0 : item2.scname),
|
c: common_vendor.o(($event) => $options.gotoPage(item2.scname))
|
};
|
})
|
};
|
}
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/OPProject/fx_h5_web/pages/classify/index.vue"]]);
|
_sfc_main.__runtimeHooks = 6;
|
wx.createPage(MiniProgramPage);
|