| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 | "use strict";const common_vendor = require("../../../common/vendor.js");require("../../../sheep/index.js");const sheep_api_promotion_bargain = require("../../../sheep/api/promotion/bargain.js");require("../../../sheep/url/index.js");require("../../../sheep/store/index.js");require("../../../sheep/store/app.js");require("../../../sheep/api/promotion/diy.js");require("../../../sheep/request/index.js");require("../../../sheep/config/index.js");require("../../../sheep/platform/index.js");require("../../../sheep/platform/provider/wechat/index.js");require("../../../sheep/platform/provider/wechat/miniProgram.js");require("../../../sheep/api/member/auth.js");require("../../../sheep/api/member/social.js");require("../../../sheep/api/member/user.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/api/pay/order.js");require("../../../sheep/store/user.js");require("../../../sheep/store/cart.js");require("../../../sheep/api/trade/cart.js");require("../../../sheep/api/pay/wallet.js");require("../../../sheep/api/trade/order.js");require("../../../sheep/api/promotion/coupon.js");require("../../../sheep/store/sys.js");require("../../../sheep/store/modal.js");require("../../../sheep/config/zIndex.js");if (!Array) {  const _easycom_s_count_down2 = common_vendor.resolveComponent("s-count-down");  const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");  (_easycom_s_count_down2 + _easycom_s_layout2)();}const _easycom_s_count_down = () => "../../../sheep/components/s-count-down/s-count-down.js";const _easycom_s_layout = () => "../../../sheep/components/s-layout/s-layout.js";if (!Math) {  (_easycom_s_count_down + _easycom_s_layout)();}const _sfc_main = {  __name: "detail",  setup(__props) {    const state = common_vendor.reactive({      id: "",      buyPrice: "",      bargainInfo: {},      bgColor: {        "bgColor": "#333333",        "Color": "#fff",        "width": "44rpx",        "timeTxtwidth": "16rpx",        "isDay": true      },      bargainUserHelpList: [],      couponsHidden: true    });    async function getBargainDetails() {      let {        data,        code      } = await sheep_api_promotion_bargain.BargainApi.getBargainActivityDetail({        id: state.id      });      if (code == 0) {        state.bargainInfo = data;        state.buyPrice = state.bargainInfo.bargainFirstPrice;      }    }    common_vendor.onLoad(function(options) {      if (options.hasOwnProperty("id")) {        options.id ? state.id = options.id : state.id = "";      }      getBargainDetails();    });    function fen2yuan(price) {      return (price / 100).toFixed(2);    }    return (_ctx, _cache) => {      return common_vendor.e({        a: state.bargainInfo.picUrl,        b: common_vendor.t(state.bargainInfo.name),        c: common_vendor.t(fen2yuan(state.bargainInfo.bargainMinPrice)),        d: common_vendor.t(state.bargainInfo.stock),        e: common_vendor.t(state.bargainInfo.unitName),        f: common_vendor.t(fen2yuan(state.buyPrice)),        g: state.bargainInfo.endTime > (/* @__PURE__ */ new Date()).getTime() && state.bargainInfo.stock > 0      }, state.bargainInfo.endTime > (/* @__PURE__ */ new Date()).getTime() && state.bargainInfo.stock > 0 ? {        h: common_vendor.p({          tipText: " ",          bgColor: state.bgColor,          dayText: ":",          hourText: ":",          minuteText: ":",          secondText: " ",          datatime: state.bargainInfo.endTime / 1e3,          isDay: true        })      } : state.bargainInfo.endTime <= (/* @__PURE__ */ new Date()).getTime() ? {        j: common_vendor.o((...args) => _ctx.currentBargainUser && _ctx.currentBargainUser(...args))      } : state.bargainInfo.stock <= 0 ? {        l: common_vendor.o((...args) => _ctx.currentBargainUser && _ctx.currentBargainUser(...args))      } : {}, {        i: state.bargainInfo.endTime <= (/* @__PURE__ */ new Date()).getTime(),        k: state.bargainInfo.stock <= 0,        m: common_vendor.o((...args) => _ctx.goProduct && _ctx.goProduct(...args)),        n: state.bargainUserHelpList.length > 0      }, state.bargainUserHelpList.length > 0 ? common_vendor.e({        o: _ctx.index < 3 || !state.couponsHidden      }, _ctx.index < 3 || !state.couponsHidden ? {        p: common_vendor.f(state.bargainUserHelpList, (item, index, i0) => {          return {            a: item.avatar,            b: common_vendor.t(item.nickname),            c: common_vendor.t(_ctx.formatDate(item.createTime)),            d: common_vendor.t(fen2yuan(item.reducePrice)),            e: index          };        })      } : {}, {        q: state.bargainUserHelpList.length > 3      }, state.bargainUserHelpList.length > 3 ? {        r: common_vendor.t(state.couponsHidden ? "展开更多" : "关闭展开"),        s: common_vendor.n(state.couponsHidden ? "icon-xiangxia" : "icon-xiangshang"),        t: common_vendor.o((...args) => _ctx.openTap && _ctx.openTap(...args))      } : {}) : {}, {        v: state.bargainUserHelpList.length === 0      }, state.bargainUserHelpList.length === 0 ? {} : {}, {        w: common_vendor.p({          title: "砍价详情"        })      });    };  }};const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6d33792e"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/pages/activity/bargain/detail.vue"]]);wx.createPage(MiniProgramPage);
 |