优惠券使用
parent
7456b65bb4
commit
86a2a9e3d6
@ -0,0 +1,105 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const stor_Coupons_coupons = require("../../stor/Coupons/coupons.js");
|
||||
if (!Array) {
|
||||
const _easycom_windows2 = common_vendor.resolveComponent("windows");
|
||||
_easycom_windows2();
|
||||
}
|
||||
const _easycom_windows = () => "../../components/windows/windows.js";
|
||||
if (!Math) {
|
||||
_easycom_windows();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "payCoupons",
|
||||
setup(__props) {
|
||||
const c = stor_Coupons_coupons.coupons();
|
||||
const {
|
||||
isShowCoupons,
|
||||
couponsData,
|
||||
que,
|
||||
isShow
|
||||
} = common_vendor.storeToRefs(c);
|
||||
c.getcouponsData();
|
||||
common_vendor.onLoad(() => {
|
||||
console.log(isShowCoupons, isShow);
|
||||
});
|
||||
const headerindex = common_vendor.ref(1);
|
||||
common_vendor.ref("券列表");
|
||||
common_vendor.ref("#fff");
|
||||
common_vendor.ref("#000");
|
||||
const ccc = common_vendor.ref(0);
|
||||
const quan = common_vendor.ref(0);
|
||||
const couponsIndex = common_vendor.ref(0);
|
||||
const checkCoupons = (index) => {
|
||||
couponsIndex.value = index;
|
||||
};
|
||||
const goPlays = () => {
|
||||
c.wxPlay(couponsData.value[quan.value]);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o((...args) => _ctx.getNavs && _ctx.getNavs(...args)),
|
||||
b: common_vendor.f(common_vendor.unref(couponsData), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.status === 1 && headerindex.value === 1 && item.couponName
|
||||
}, item.status === 1 && headerindex.value === 1 && item.couponName ? common_vendor.e({
|
||||
b: item.couponName === "拉新洗车券"
|
||||
}, item.couponName === "拉新洗车券" ? {} : {}, {
|
||||
c: item.couponName === "拉新洗车券"
|
||||
}, item.couponName === "拉新洗车券" ? {} : {}, {
|
||||
d: item.couponName === "停车场优惠卷"
|
||||
}, item.couponName === "停车场优惠卷" ? {} : {}, {
|
||||
e: item.couponName === "停车场优惠卷"
|
||||
}, item.couponName === "停车场优惠卷" ? {} : {}, {
|
||||
f: item.couponName === "拉新折扣券"
|
||||
}, item.couponName === "拉新折扣券" ? {} : {}, {
|
||||
g: item.couponName === "拉新折扣券"
|
||||
}, item.couponName === "拉新折扣券" ? {} : {}, {
|
||||
h: common_vendor.t(item.couponName),
|
||||
i: common_vendor.t(item.endTime),
|
||||
j: common_vendor.t(item.rule),
|
||||
k: common_vendor.t(item.freeTime),
|
||||
l: common_vendor.t(item.freeTime),
|
||||
m: couponsIndex.value === index ? 1 : ""
|
||||
}) : {}, {
|
||||
n: item.status === 0 && headerindex.value === 2
|
||||
}, item.status === 0 && headerindex.value === 2 ? common_vendor.e({
|
||||
o: item.couponName === "拉新洗车券"
|
||||
}, item.couponName === "拉新洗车券" ? {} : {}, {
|
||||
p: item.couponName === "拉新洗车券"
|
||||
}, item.couponName === "拉新洗车券" ? {} : {}, {
|
||||
q: item.couponName === "停车场优惠卷"
|
||||
}, item.couponName === "停车场优惠卷" ? {} : {}, {
|
||||
r: item.couponName === "停车场优惠卷"
|
||||
}, item.couponName === "停车场优惠卷" ? {} : {}, {
|
||||
s: common_vendor.t(item.couponName),
|
||||
t: common_vendor.t(item.endTime),
|
||||
v: common_vendor.t(item.rule),
|
||||
w: item.status === 2 ? 1 : "",
|
||||
x: item.status === 0 ? 1 : ""
|
||||
}) : {}, {
|
||||
y: item.id,
|
||||
z: common_vendor.o(($event) => checkCoupons(index), item.id)
|
||||
});
|
||||
}),
|
||||
c: headerindex.value === 1 && common_vendor.unref(isShow) === 3
|
||||
}, headerindex.value === 1 && common_vendor.unref(isShow) === 3 ? {} : {}, {
|
||||
d: headerindex.value === 2 && common_vendor.unref(isShowCoupons) === 0
|
||||
}, headerindex.value === 2 && common_vendor.unref(isShowCoupons) === 0 ? {} : {}, {
|
||||
e: common_vendor.t(common_vendor.unref(couponsData)[couponsIndex.value].rule),
|
||||
f: common_vendor.t(common_vendor.unref(couponsData)[couponsIndex.value].freeTime),
|
||||
g: common_vendor.t(common_vendor.unref(couponsData)[couponsIndex.value].amount),
|
||||
h: common_vendor.o(goPlays),
|
||||
i: ccc.value === 1
|
||||
}, ccc.value === 1 ? {
|
||||
j: common_vendor.o(_ctx.cloSe),
|
||||
k: common_vendor.o(_ctx.oks),
|
||||
l: common_vendor.p({
|
||||
titleMsg: _ctx.titleMsg
|
||||
})
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/carwashingThree/pages/payCoupons/payCoupons.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"windows": "../../components/windows/windows"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<view class="charge"><view class="tops"><image class="nav-img" src="https://www.jiubaotongxue.love/image/nav10.png" alt="" bindtap="{{a}}"/><view class="title" style="font-size:36rpx"> 拉新券使用 </view></view><view class="topss"></view><scroll-view scroll-y="true" class="scrol"><view class="big"><view wx:for="{{b}}" wx:for-item="item" wx:key="y" class="card" bindtap="{{item.z}}"><view wx:if="{{item.a}}" class="{{['boxs', item.m && 'couponsActive']}}"><view class="boxs-left"><text wx:if="{{item.b}}" class="boxs-left-top">新</text><text wx:if="{{item.c}}" class="boxs-left-tops">拉新券</text><text wx:if="{{item.d}}" class="boxs-left-top">停</text><text wx:if="{{item.e}}" class="boxs-left-tops">停车券</text><text wx:if="{{item.f}}" class="boxs-left-top">拉</text><text wx:if="{{item.g}}" class="boxs-left-tops">拉新折扣券</text></view><view class="boxs-right"><view class="boxs-right-top">{{item.h}}</view><view class="boxs-right-tops">{{item.i}}</view><view class="line"></view><view class="boxs-right-bottom">{{item.j}}({{item.k}}分钟) </view></view><view class="boxs-Btn">{{item.l}}分钟 </view></view><view wx:if="{{item.n}}" class="boxs"><view class="boxs-left"><text wx:if="{{item.o}}" class="boxs-left-top">新</text><text wx:if="{{item.p}}" class="boxs-left-tops">拉新券</text><text wx:if="{{item.q}}" class="boxs-left-top">停</text><text wx:if="{{item.r}}" class="boxs-left-tops">停车券</text></view><view class="boxs-right"><view class="boxs-right-top">{{item.s}}</view><view class="boxs-right-tops"> 有效期:{{item.t}}</view><view class="line"></view><view class="boxs-right-bottom">{{item.v}}</view></view><view class="{{['boxs-Btns', item.w && 'boxsBtnsActives', item.x && 'boxsBtnsActive']}}"></view></view></view><view wx:if="{{c}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view><view wx:if="{{d}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view></view></scroll-view><view class="charge-play"><view class="charge-body-title">{{e}}可洗车{{f}}分钟 </view><view class="charge-play-icon"><view class="icon-left"><image class="icon-img" src="https://www.jiubaotongxue.love/image/demo54.png" alt=""/><text>微信支付</text></view><view class="icon-right icon-active"></view></view></view><view class="charge-btnPlay"><text class="charge-btnPlay-left">支付:<text class="pricess">{{g}}</text></text><view class="plays" bindtap="{{h}}"> 去支付 </view></view></view><windows wx:if="{{i}}" bindcloSe="{{j}}" bindoks="{{k}}" u-i="7a608c0e-0" bind:__l="__l" u-p="{{l}}"></windows>
|
||||
Loading…
Reference in New Issue