140 lines
4.9 KiB
JavaScript
140 lines
4.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const store_index = require("../../store/index.js");
|
|
if (!Array) {
|
|
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
|
_easycom_wd_navbar2();
|
|
}
|
|
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
|
if (!Math) {
|
|
_easycom_wd_navbar();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "equity",
|
|
setup(__props) {
|
|
const store = store_index.Store();
|
|
const userInfo = common_vendor.computed(
|
|
() => store.userInfo || {
|
|
inviteCode: "",
|
|
nickname: "",
|
|
mobile: "",
|
|
avatar: "",
|
|
paywallet: {
|
|
balance: 0
|
|
}
|
|
}
|
|
);
|
|
common_vendor.onShow(async () => {
|
|
await store.usersGetInfo();
|
|
});
|
|
const list = [
|
|
{
|
|
name: "加盟",
|
|
info: "购买、批发商品享5折折扣",
|
|
text: "赠送货值抵扣券10000元",
|
|
icon: "/static/equity/icon1.png",
|
|
bei: "/static/equity/bei1.png",
|
|
img: "/static/equity/img1.png",
|
|
qy: "/static/equity/iconY1.png",
|
|
discount: 0.5,
|
|
debitVoucher: 1e4
|
|
},
|
|
{
|
|
name: "总代",
|
|
info: "购买、批发商品享3.5折折扣",
|
|
text: "赠送货值抵扣券40000元",
|
|
icon: "/static/equity/icon2.png",
|
|
bei: "/static/equity/bei2.png",
|
|
img: "/static/equity/img2.png",
|
|
qy: "/static/equity/iconY2.png",
|
|
discount: 0.35,
|
|
debitVoucher: 4e4
|
|
},
|
|
{
|
|
name: "官方",
|
|
info: "购买、批发商品享2.5折折扣",
|
|
text: "赠送货值抵扣券100000元",
|
|
icon: "/static/equity/icon3.png",
|
|
bei: "/static/equity/bei3.png",
|
|
img: "/static/equity/img3.png",
|
|
qy: "/static/equity/iconY3.png",
|
|
discount: 0.25,
|
|
debitVoucher: 1e5
|
|
}
|
|
];
|
|
const current = common_vendor.ref(0);
|
|
const back = () => {
|
|
common_vendor.index.navigateBack();
|
|
};
|
|
const toCon = () => {
|
|
common_vendor.index.showModal({
|
|
title: "提示",
|
|
content: "请联系客服开通权益包",
|
|
showCancel: false
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_assets._imports_0$7,
|
|
b: common_vendor.o(back),
|
|
c: common_vendor.p({
|
|
title: "权益包",
|
|
bordered: false,
|
|
["left-arrow"]: true,
|
|
["custom-style"]: "background-color: transparent !important;",
|
|
safeAreaInsetTop: true
|
|
}),
|
|
d: !userInfo.value.userRights
|
|
}, !userInfo.value.userRights ? {
|
|
e: common_assets._imports_1$5
|
|
} : {}, {
|
|
f: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 1
|
|
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 1 ? {
|
|
g: common_assets._imports_2$2
|
|
} : {}, {
|
|
h: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 2
|
|
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 2 ? {
|
|
i: common_assets._imports_3$1
|
|
} : {}, {
|
|
j: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3
|
|
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3 ? {
|
|
k: common_assets._imports_4$2
|
|
} : {}, {
|
|
l: userInfo.value.userRights
|
|
}, userInfo.value.userRights ? {
|
|
m: common_vendor.t(userInfo.value.userRights.rightsDiscount / 10),
|
|
n: userInfo.value.userRights.rightsLevel == 1 ? "#754023" : userInfo.value.userRights.rightsLevel == 2 ? "#3874AF" : userInfo.value.userRights.rightsLevel == 3 ? "#AF3838" : ""
|
|
} : {}, {
|
|
o: userInfo.value.userRights
|
|
}, userInfo.value.userRights ? {
|
|
p: common_vendor.t(userInfo.value.userRights.pice),
|
|
q: userInfo.value.userRights.rightsLevel == 1 ? "#754023" : userInfo.value.userRights.rightsLevel == 2 ? "#3874AF" : userInfo.value.userRights.rightsLevel == 3 ? "#AF3838" : ""
|
|
} : {}, {
|
|
r: common_assets._imports_5$1,
|
|
s: common_vendor.f(list, (item, index, i0) => {
|
|
return common_vendor.e({
|
|
a: item.qy,
|
|
b: current.value == index
|
|
}, current.value == index ? {
|
|
c: common_assets._imports_6$1
|
|
} : {}, {
|
|
d: item.bei,
|
|
e: item.icon,
|
|
f: common_vendor.t(item.info),
|
|
g: common_vendor.t(item.text),
|
|
h: common_vendor.t(item.name),
|
|
i: item.img,
|
|
j: index,
|
|
k: common_vendor.o(($event) => current.value = index, index)
|
|
});
|
|
}),
|
|
t: common_vendor.o(toCon)
|
|
});
|
|
};
|
|
}
|
|
});
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-abdc3dd4"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/equity/equity.js.map
|