|
@@ -40,7 +40,7 @@
|
|
|
@click.stop="to(`/pages-common/activity/activity?id=${item.activityId}`)">
|
|
@click.stop="to(`/pages-common/activity/activity?id=${item.activityId}`)">
|
|
|
<view class="fs-26 color-999">到期时间:{{ item.endTime }}</view>
|
|
<view class="fs-26 color-999">到期时间:{{ item.endTime }}</view>
|
|
|
<view class="flex-align-center" v-if="mode === 0">
|
|
<view class="flex-align-center" v-if="mode === 0">
|
|
|
- <view class="fs-26 color-999">权益余额:{{ ((item.rightsBalance || 0) / 100).toFixed(2) }}元
|
|
|
|
|
|
|
+ <view class="fs-26 color-999">权益余额:{{ fenToYuan(item.rightsBalance) }}元
|
|
|
<text class="color-primary">详细规则</text>
|
|
<text class="color-primary">详细规则</text>
|
|
|
<text class="fs-24 ml-4 color-primary">>></text>
|
|
<text class="fs-24 ml-4 color-primary">>></text>
|
|
|
</view>
|
|
</view>
|
|
@@ -87,7 +87,7 @@
|
|
|
></image>
|
|
></image>
|
|
|
<view></view>
|
|
<view></view>
|
|
|
<view class="fs-48 lh-58 color-000 fw-500 ml-16" v-if="item.couponType=='FullDiscount'">
|
|
<view class="fs-48 lh-58 color-000 fw-500 ml-16" v-if="item.couponType=='FullDiscount'">
|
|
|
- {{ ((item.discount || 0) / 100).toFixed(2) }}元
|
|
|
|
|
|
|
+ {{ fenToYuan(item.discount) }}元
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="fs-48 lh-58 color-000 fw-500 ml-16" v-else>
|
|
<view class="fs-48 lh-58 color-000 fw-500 ml-16" v-else>
|
|
@@ -106,7 +106,7 @@
|
|
|
@click.stop="to(`/pages-common/activity/activity?id=${item.activityId}`)">
|
|
@click.stop="to(`/pages-common/activity/activity?id=${item.activityId}`)">
|
|
|
<view class="fs-26 color-999">到期时间:{{ item.endTime }}</view>
|
|
<view class="fs-26 color-999">到期时间:{{ item.endTime }}</view>
|
|
|
<view class="flex-align-center">
|
|
<view class="flex-align-center">
|
|
|
- <view class="fs-26 color-999">服务费门槛:{{ ((item.minServiceMoney || 0) / 100).toFixed(2) }}元
|
|
|
|
|
|
|
+ <view class="fs-26 color-999">服务费门槛:{{ fenToYuan(item.minServiceMoney) }}元
|
|
|
<text class="color-primary">详细规则</text>
|
|
<text class="color-primary">详细规则</text>
|
|
|
<text class="fs-24 ml-4 color-primary">>></text>
|
|
<text class="fs-24 ml-4 color-primary">>></text>
|
|
|
</view>
|
|
</view>
|
|
@@ -145,10 +145,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import {onPullDownRefresh} from "@dcloudio/uni-app";
|
|
|
|
|
import {ref} from "vue";
|
|
import {ref} from "vue";
|
|
|
import {listStationAvailableRightsAndCoupons} from "@/api/user";
|
|
import {listStationAvailableRightsAndCoupons} from "@/api/user";
|
|
|
import {to} from "@/utils/navigate";
|
|
import {to} from "@/utils/navigate";
|
|
|
|
|
+import { fenToYuan } from "@/utils/money";
|
|
|
|
|
|
|
|
const mode = ref(0);
|
|
const mode = ref(0);
|
|
|
const couponList = ref<any[]>([]);
|
|
const couponList = ref<any[]>([]);
|
|
@@ -183,15 +183,10 @@ const handleConfirm = () => {
|
|
|
userRights: rightsList.value?.find((k: any) => k.rightsId == rightsId.value ),
|
|
userRights: rightsList.value?.find((k: any) => k.rightsId == rightsId.value ),
|
|
|
userCoupon: couponList.value?.find((k: any) => k.couponId == couponId.value),
|
|
userCoupon: couponList.value?.find((k: any) => k.couponId == couponId.value),
|
|
|
}
|
|
}
|
|
|
- console.log(emitData)
|
|
|
|
|
emits('on-change', emitData)
|
|
emits('on-change', emitData)
|
|
|
handleClose();
|
|
handleClose();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onPullDownRefresh(() => {
|
|
|
|
|
- loadData();
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
const changeTab = (tab: number) => {
|
|
const changeTab = (tab: number) => {
|
|
|
mode.value = tab;
|
|
mode.value = tab;
|
|
|
}
|
|
}
|
|
@@ -203,7 +198,6 @@ const changeTab = (tab: number) => {
|
|
|
* @param urId userRechargeRightsId
|
|
* @param urId userRechargeRightsId
|
|
|
*/
|
|
*/
|
|
|
const handleCheckRights = (val: boolean, rId: any,urId: any) => {
|
|
const handleCheckRights = (val: boolean, rId: any,urId: any) => {
|
|
|
- // console.log("handleCheckRights", userRightsId, val)
|
|
|
|
|
if (rightsId.value == rId) {
|
|
if (rightsId.value == rId) {
|
|
|
rightsId.value = null;
|
|
rightsId.value = null;
|
|
|
userRechargeRightsId.value = null;
|
|
userRechargeRightsId.value = null;
|
|
@@ -221,7 +215,6 @@ const handleCheckRights = (val: boolean, rId: any,urId: any) => {
|
|
|
* @param ucid userCouponId
|
|
* @param ucid userCouponId
|
|
|
*/
|
|
*/
|
|
|
const handleCheckCoupon = (e: any, cid: any,ucid: any) => {
|
|
const handleCheckCoupon = (e: any, cid: any,ucid: any) => {
|
|
|
- // console.log("handleCheckCoupon", userCouponId, e)
|
|
|
|
|
if (couponId.value == cid) {
|
|
if (couponId.value == cid) {
|
|
|
couponId.value = null;
|
|
couponId.value = null;
|
|
|
userCouponId.value = null;
|
|
userCouponId.value = null;
|
|
@@ -255,7 +248,6 @@ const loadData = () => {
|
|
|
mode.value = 1;
|
|
mode.value = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // console.log(res)
|
|
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -274,99 +266,5 @@ defineExpose({
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.page {
|
|
|
|
|
- min-height: 100vh;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- background-color: #f6f7fa;
|
|
|
|
|
-
|
|
|
|
|
- .item {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- min-height: 220rpx;
|
|
|
|
|
- border-radius: 20rpx;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- background: #fff;
|
|
|
|
|
-
|
|
|
|
|
- .left {
|
|
|
|
|
- flex-grow: 1;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .right {
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
-
|
|
|
|
|
- .btn {
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
- border: 1px solid var(--color-primary);
|
|
|
|
|
- color: var(--color-primary);
|
|
|
|
|
- width: 144rpx;
|
|
|
|
|
- height: 56rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .tab-list {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
-
|
|
|
|
|
- .w50 {
|
|
|
|
|
- width: 50%;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .active {
|
|
|
|
|
- color: var(--color-primary);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.item-status {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- padding: 0rpx 6rpx;
|
|
|
|
|
- color: var(--color-primary);
|
|
|
|
|
- border: 2rpx solid var(--color-primary);
|
|
|
|
|
- border-radius: 6rpx;
|
|
|
|
|
-
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.item-header__left {
|
|
|
|
|
- display: inline-flex;
|
|
|
|
|
- align-items: flex-end;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.item-header__right {
|
|
|
|
|
- padding: 5rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- //justify-content: flex-end;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.inactive {
|
|
|
|
|
- cursor: not-allowed;
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
-
|
|
|
|
|
- .item-status {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- padding: 0rpx 6rpx;
|
|
|
|
|
- color: #ccc !important;
|
|
|
|
|
- border: 2rpx solid #ccc;
|
|
|
|
|
- border-radius: 6rpx;
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .color-primary {
|
|
|
|
|
- color: #ccc !important;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.item-content_left {
|
|
|
|
|
- flex-grow: 1;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- justify-content: space-around;
|
|
|
|
|
-
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.item-content_right {
|
|
|
|
|
- width: 120rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- align-content: center;
|
|
|
|
|
-}
|
|
|
|
|
|
|
+@use "../../styles/coupon-card.scss";
|
|
|
</style>
|
|
</style>
|