"use strict";
const common_vendor = require("../../../common/vendor.js");
const sheep_index = require("../../../sheep/index.js");
const sheep_hooks_useGoods = require("../../../sheep/hooks/useGoods.js");
require("../../../sheep/request/index.js");
require("../../../sheep/api/index.js");
require("../../../sheep/api/distri/score.js");
require("../../../sheep/api/distri/share.js");
require("../../../sheep/api/distri/team.js");
require("../../../sheep/api/infra/file.js");
require("../../../sheep/config/index.js");
require("../../../sheep/api/member/address.js");
require("../../../sheep/api/member/auth.js");
require("../../../sheep/api/member/point.js");
require("../../../sheep/api/member/signin.js");
require("../../../sheep/api/member/social.js");
require("../../../sheep/api/member/user.js");
require("../../../sheep/api/migration/app.js");
require("../../../sheep/api/migration/chat.js");
require("../../../sheep/api/migration/index.js");
require("../../../sheep/api/migration/third.js");
require("../../../sheep/api/pay/channel.js");
require("../../../sheep/api/pay/order.js");
require("../../../sheep/api/pay/wallet.js");
require("../../../sheep/api/product/category.js");
require("../../../sheep/api/product/comment.js");
require("../../../sheep/api/product/favorite.js");
require("../../../sheep/api/product/history.js");
require("../../../sheep/api/product/spu.js");
require("../../../sheep/api/promotion/activity.js");
require("../../../sheep/api/promotion/article.js");
require("../../../sheep/api/promotion/bargain.js");
require("../../../sheep/api/promotion/combination.js");
require("../../../sheep/api/promotion/coupon.js");
require("../../../sheep/api/promotion/diy.js");
require("../../../sheep/api/promotion/rewardActivity.js");
require("../../../sheep/api/promotion/seckill.js");
require("../../../sheep/api/system/area.js");
require("../../../sheep/api/system/voice.js");
require("../../../sheep/api/trade/afterSale.js");
require("../../../sheep/api/trade/brokerage.js");
require("../../../sheep/api/trade/cart.js");
require("../../../sheep/api/trade/config.js");
require("../../../sheep/api/trade/delivery.js");
require("../../../sheep/api/trade/order.js");
require("../../../sheep/url/index.js");
require("../../../sheep/store/index.js");
require("../../../sheep/store/app.js");
require("../../../sheep/platform/index.js");
require("../../../sheep/platform/provider/wechat/index.js");
require("../../../sheep/platform/provider/wechat/miniProgram.js");
require("../../../sheep/platform/provider/apple/index.js");
require("../../../sheep/platform/share.js");
require("../../../sheep/router/index.js");
require("../../../sheep/hooks/useModal.js");
require("../../../sheep/helper/index.js");
require("../../../sheep/helper/test.js");
require("../../../sheep/helper/digit.js");
require("../../../sheep/helper/throttle.js");
require("../../../sheep/platform/pay.js");
require("../../../sheep/store/user.js");
require("../../../sheep/store/cart.js");
require("../../../sheep/store/sys.js");
require("../../../sheep/store/modal.js");
require("../../../sheep/config/zIndex.js");
require("../../../sheep/util/index.js");
if (!Array) {
  const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
  const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
  const _easycom_su_popup2 = common_vendor.resolveComponent("su-popup");
  const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");
  (_easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_su_popup2 + _easycom_s_layout2)();
}
const _easycom_uni_list_item = () => "../../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
const _easycom_uni_list = () => "../../../uni_modules/uni-list/components/uni-list/uni-list.js";
const _easycom_su_popup = () => "../../../sheep/ui/su-popup/su-popup.js";
const _easycom_s_layout = () => "../../../sheep/components/s-layout/s-layout.js";
if (!Math) {
  (_easycom_uni_list_item + _easycom_uni_list + common_vendor.unref(richtext) + _easycom_su_popup + _easycom_s_layout)();
}
const richtext = () => "../../public/richtext2.js";
const _sfc_main = {
  __name: "score",
  setup(__props) {
    const userWallet = common_vendor.computed(() => sheep_index.sheep.$store("user").userWallet);
    sheep_index.sheep.$platform.device.statusBarHeight * 2;
    common_vendor.computed(() => sheep_index.sheep.$store("user").userInfo);
    sheep_index.sheep.$platform.navbar;
    const state = common_vendor.reactive({
      currentTab: 0,
      pagination: {
        list: [],
        total: 0,
        pageSize: 10,
        pageNo: 1
      },
      loadStatus: "",
      showModel: false
    });
    function close() {
      state.showModel = false;
    }
    const pointsPercentage = common_vendor.computed(() => {
      const currentQuota = parseFloat(sheep_hooks_useGoods.points2point(userWallet.value.integralDO.accumulatedQuota + userWallet.value.integralDO.ancestorQuota));
      const highQuotaTotal = parseFloat(sheep_hooks_useGoods.points2point(userWallet.value.integralDO.highQuotaTotal));
      const percentage = currentQuota / highQuotaTotal * 100;
      return Math.min(percentage, 100);
    });
    const percentageColor = common_vendor.computed(() => {
      if (pointsPercentage.value >= 90) {
        return "#fe0000";
      } else if (pointsPercentage.value >= 75) {
        return "#d8b800";
      } else {
        return "#0c912f";
      }
    });
    const circleStyle = common_vendor.computed(() => {
      return {
        // background: `conic-gradient(${percentageColor.value} ${pointsPercentage.value}%, #ddd ${pointsPercentage.value}%)`
        background: percentageColor.value
      };
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.s(circleStyle.value),
        b: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.currentQuota)),
        c: percentageColor.value,
        d: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/goods/list", {
          categoryId: 98
        })),
        e: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.accumulatedQuota + userWallet.value.integralDO.ancestorQuota)),
        f: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.highQuotaTotal)),
        g: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/wallet/maxScoreLog")),
        h: common_vendor.p({
          clickable: true,
          title: "当前可获得峰值",
          showArrow: true,
          border: false
        }),
        i: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.freezeQuota)),
        j: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/wallet/ScoreLog", {
          isFreeze: true
        })),
        k: common_vendor.p({
          clickable: true,
          title: "待确权",
          showArrow: true,
          border: false
        }),
        l: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/wallet/ScoreLog", {
          isFreeze: false
        })),
        m: common_vendor.p({
          clickable: true,
          title: "积分来源记录",
          showArrow: true,
          border: false
        }),
        n: common_vendor.o(($event) => state.showModel = true),
        o: common_vendor.p({
          clickable: true,
          title: "积分计算规则",
          border: false
        }),
        p: common_vendor.p({
          border: false
        }),
        q: common_vendor.n(state.navIndex == 0 ? "activite" : ""),
        r: common_vendor.o(($event) => _ctx.checkIndex(0)),
        s: common_vendor.p({
          title: "积分计算规则",
          type: "tab"
        }),
        t: common_vendor.o(close),
        v: common_vendor.p({
          show: state.showModel,
          type: "center",
          round: "10",
          isMaskClick: false,
          showClose: true
        }),
        w: common_vendor.p({
          bgStyle: {
            "backgroundColor": "#ffffff"
          },
          title: "我的积分",
          navbar: "normal"
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-aa108703"], ["__file", "D:/zx/mall-front-app/pages/user/wallet/score.vue"]]);
wx.createPage(MiniProgramPage);
