"use strict"; const common_vendor = require("../../common/vendor.js"); const _sfc_main = { data() { return { activeTab: 0 }; }, onLoad() { common_vendor.index.request({ url: "https://www.example.com/request", //仅为示例,并非真实接口地址。 data: { text: "uni.request" }, header: { "custom-header": "hello" //自定义请求头信息 }, success: (res) => { console.log(res.data); } }); }, methods: { changeActiveTab(activeTab) { this.activeTab = activeTab; } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return common_vendor.e({ a: $data.activeTab == 0 }, $data.activeTab == 0 ? {} : {}, { b: $data.activeTab == 1 }, $data.activeTab == 1 ? { c: common_vendor.f(10, (item, k0, i0) => { return { a: item }; }) } : {}, { d: common_vendor.n($data.activeTab == 0 ? "btn active" : "btn"), e: common_vendor.o(($event) => $options.changeActiveTab(0)), f: common_vendor.n($data.activeTab == 1 ? "btn active" : "btn"), g: common_vendor.o(($event) => $options.changeActiveTab(1)) }); } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cool/Desktop/code/gold-field/pages/index/index.vue"]]); wx.createPage(MiniProgramPage);