|
|
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
- const _sfc_main = {
- mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
- data() {
- return {
- statusBarHeight: 0,
- navBarHeight: 44,
- // px
- navBarTotalHeight: 44,
- // px
- featureTags: ["收益高", "品类全", "到账快", "城市多"],
- userInfo: {
- avatar: "",
- name: "",
- id: "",
- type: "",
- balance: "",
- totalWithdraw: ""
- },
- tabActive: 0,
- rankList: [],
- status: 0,
- showProgressModal: false
- };
- },
- computed: {
- qrcodeUrl() {
- common_vendor.index.__f__("log", "at pages/subcomponent/promotion.vue:147", getApp().globalData.configData, "getApp().globalData.configData");
- const item = getApp().globalData.configData.find((i) => i.keyName === "kefu_code");
- return item ? item.keyContent : "";
- },
- indexLvxingUrl() {
- common_vendor.index.__f__("log", "at pages/subcomponent/promotion.vue:152", getApp().globalData.configData, "getApp().globalData.configData");
- const item = getApp().globalData.configData.find((i) => i.keyName === "index_lvxing");
- return item ? item.keyContent : "";
- }
- },
- onLoad() {
- const sysInfo = common_vendor.index.getSystemInfoSync();
- this.statusBarHeight = sysInfo.statusBarHeight;
- this.navBarHeight = 44;
- this.navBarTotalHeight = this.statusBarHeight + this.navBarHeight;
- this.getUserInfoByToken();
- this.getRankList();
- this.getMyPromotionInfo();
- },
- onShow() {
- this.getMyPromotionInfo();
- },
- onPullDownRefresh() {
- this.getUserInfoByToken();
- common_vendor.index.stopPullDownRefresh();
- },
- methods: {
- async onRefresh() {
- await new Promise((resolve) => setTimeout(resolve, 1e3));
- common_vendor.index.stopPullRefresh();
- },
- navigateBack() {
- common_vendor.index.navigateBack();
- },
- getRankIcon(idx) {
- return `/static/tui/${idx}.png`;
- },
- goQrcode() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/promo-qrcode" });
- },
- goUpgrade() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/upgrad" });
- },
- getUserInfoByToken() {
- this.$api("getUserByToken", {}, (res) => {
- if (res && res.success && res.result) {
- this.userInfo.avatar = res.result.headImage || "";
- this.userInfo.name = res.result.nickName || "";
- this.userInfo.id = res.result.id || "";
- this.userInfo.intentioCode = res.result.intentioCode || "";
- this.userInfo.money = res.result.money || "";
- this.userInfo.integerPrice = res.result.integerPrice || "";
- }
- });
- },
- goWithdrawRecord() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/promotion-withdraw-record" });
- },
- goWithdraw() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/withdraw?fromPromotion=true" });
- },
- goProfitDetail() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/promotion-profit-detail" });
- },
- goTeam() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/promotion-team" });
- },
- getRankList() {
- this.$api("getRankList", {}, (res) => {
- if (res && res.success && res.result) {
- this.rankList = res.result.records || [];
- }
- });
- },
- getMyPromotionInfo() {
- this.$api("getMyPromotionInfo", {}, (res) => {
- if (res && res.success && res.result) {
- this.status = res.result.status;
- common_vendor.index.__f__("log", "at pages/subcomponent/promotion.vue:228", this.status, "this.status");
- }
- });
- },
- goToFaq() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/admin_faq" });
- }
- }
- };
- if (!Array) {
- const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
- _easycom_uni_icons2();
- }
- const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
- if (!Math) {
- _easycom_uni_icons();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.p({
- type: "left",
- size: "22",
- color: "#222"
- }),
- b: common_vendor.o((...args) => $options.navigateBack && $options.navigateBack(...args)),
- c: common_vendor.p({
- type: "more-filled",
- size: "22",
- color: "#222"
- }),
- d: $data.navBarTotalHeight + "px",
- e: $data.statusBarHeight + "px",
- f: common_vendor.f($data.featureTags, (t, i, i0) => {
- return {
- a: common_vendor.t(t),
- b: i
- };
- }),
- g: $data.navBarTotalHeight + $data.statusBarHeight + "px",
- h: $data.userInfo.avatar,
- i: common_vendor.t($data.userInfo.type),
- j: common_vendor.t($data.userInfo.name),
- k: common_vendor.t($data.userInfo.intentioCode),
- l: common_vendor.t($data.userInfo.money),
- m: common_vendor.o((...args) => $options.goWithdraw && $options.goWithdraw(...args)),
- n: common_vendor.t($data.userInfo.integerPrice),
- o: common_vendor.o((...args) => $options.goWithdrawRecord && $options.goWithdrawRecord(...args)),
- p: common_vendor.p({
- type: "wallet",
- size: "32",
- color: "#fff"
- }),
- q: common_vendor.o((...args) => $options.goProfitDetail && $options.goProfitDetail(...args)),
- r: common_vendor.p({
- type: "person",
- size: "32",
- color: "#fff"
- }),
- s: common_vendor.o((...args) => $options.goTeam && $options.goTeam(...args)),
- t: common_vendor.f($data.rankList.slice(0, 5), (item, idx, i0) => {
- return common_vendor.e({
- a: idx < 3
- }, idx < 3 ? {
- b: $options.getRankIcon(idx + 1)
- } : {
- c: $options.getRankIcon(idx + 1)
- }, {
- d: item.headImage,
- e: common_vendor.t(item.nickName),
- f: common_vendor.t(item.price),
- g: idx
- });
- }),
- v: $options.indexLvxingUrl,
- w: $options.qrcodeUrl,
- x: common_vendor.o((...args) => $options.goQrcode && $options.goQrcode(...args)),
- y: $data.status === ""
- }, $data.status === "" ? {
- z: common_vendor.o((...args) => $options.goUpgrade && $options.goUpgrade(...args))
- } : {}, {
- A: $data.status == 0
- }, $data.status == 0 ? {
- B: common_vendor.o(($event) => $data.showProgressModal = true)
- } : {}, {
- C: $data.showProgressModal
- }, $data.showProgressModal ? {
- D: common_vendor.p({
- type: "right",
- size: "22",
- color: "#bbb"
- }),
- E: common_vendor.o((...args) => $options.goToFaq && $options.goToFaq(...args)),
- F: common_vendor.p({
- type: "right",
- size: "22",
- color: "#bbb"
- }),
- G: common_vendor.o((...args) => $options.goToFaq && $options.goToFaq(...args)),
- H: common_vendor.o(($event) => $data.showProgressModal = false)
- } : {});
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-50cfba12"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/promotion.js.map
|