zhaojs
2023-04-27 0ae224b305087a8d1be405445d06621a07f78bbd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"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);