refactor: migrate legacy color classes to inline tailwind text utilities
Replace all usages of legacy `.color-*` and `.text-color-*` SCSS utility classes with inline Tailwind `text-[#hexcode]` arbitrary value classes. Remove the deprecated `src/static/scss/colors.scss` file, and fix minor formatting/indentation issues across multiple component files.
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
<view class="bg-white rounded-12 p-[12px] mb-12">
|
||||
<view class="flex flex-items-center flex-justify-between">
|
||||
<view class="flex flex-items-center">
|
||||
<text class="font-size-16 color-171717 leading-[24px] font-500">
|
||||
<text class="font-size-16 text-[#171717] leading-[24px] font-500">
|
||||
订单金额
|
||||
</text>
|
||||
<text class="amt font-size-18 font-bold color-FF3D60 ml-4">
|
||||
<text class="amt font-size-18 font-bold text-[#ff3d60] ml-4">
|
||||
{{ orderData.payAmt }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderData.orderStatus === '0'" class="font-size-11 color-99A0AE mt-4">
|
||||
<view v-if="orderData.orderStatus === '0'" class="font-size-11 text-[#99a0ae] mt-4">
|
||||
超时后,订单将自动取消
|
||||
</view>
|
||||
<view v-if="['1', '2'].includes(orderData.orderStatus)"
|
||||
class="border-box border-top flex flex-items-center flex-justify-between font-size-12 pt-[12px] mt-12">
|
||||
<view class="color-525866">取消政策及说明</view>
|
||||
<view class="text-[#525866]">取消政策及说明</view>
|
||||
<view class="flex flex-items-center" @click="emit('click')">
|
||||
<text class="theme-color-500 mr-4">查看详情</text>
|
||||
<uni-icons type="right" size="12" color="#99A0AE" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="footer bg-white flex flex-items-center flex-justify-between p-[12px]">
|
||||
<button v-if="['1', '2'].includes(statusCode)"
|
||||
class="left border-none bg-white rounded-10 flex flex-items-center flex-justify-center font-size-14 font-500 color-525866 mr-12"
|
||||
class="left border-none bg-white rounded-10 flex flex-items-center flex-justify-center font-size-14 font-500 text-[#525866] mr-12"
|
||||
@click="emit('refund', orderData)">
|
||||
申请退款
|
||||
</button>
|
||||
@@ -9,7 +9,7 @@
|
||||
'right border-none rounded-10 flex flex-full flex-items-center flex-justify-center font-size-14 font-500 bg-[#0CCD58]',
|
||||
{
|
||||
'bg-[#ff3d60]': statusCode === '0',
|
||||
'color-white': ['1', '2', '3', '4', '5', '6'].includes(statusCode),
|
||||
'text-white': ['1', '2', '3', '4', '5', '6'].includes(statusCode),
|
||||
},
|
||||
]" @click="handleButtonClick(orderData)">
|
||||
{{ buttonText }}
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
<!-- 酒店类型入住离店日期部分 -->
|
||||
<DateRangeSection v-if="orderData.orderType == 0" :selectedDate="selectedDate" />
|
||||
|
||||
<view class="font-size-16 font-500 color-000 leading-[24px] ellipsis-1">
|
||||
<view class="font-size-16 font-500 text-[#000000] leading-[24px] ellipsis-1">
|
||||
{{ orderData.commodityName }}
|
||||
</view>
|
||||
|
||||
<view class="border-box border-bottom font-size-12 color-99A0AE leading-[16px] pb-[12px]">
|
||||
<view class="border-box border-bottom font-size-12 text-[#99a0ae] leading-[16px] pb-[12px]">
|
||||
{{ orderData.commodityDescription }}
|
||||
</view>
|
||||
|
||||
<!-- 权益部分 -->
|
||||
<view class="border-box flex flex-items-center pt-[12px]">
|
||||
<text class="bg-[#f7f7f7] rounded-4 font-size-11 color-525866 mr-4 pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
|
||||
<text class="bg-[#f7f7f7] rounded-4 font-size-11 text-[#525866] mr-4 pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
|
||||
v-for="(item, index) in commodityFacilityList" :key="index">
|
||||
{{ item }}
|
||||
</text>
|
||||
@@ -21,17 +21,17 @@
|
||||
</view>
|
||||
|
||||
<view v-if="orderType != 0" class="border-box bg-white p-[12px] rounded-12 mb-12">
|
||||
<view class="font-size-16 font-500 color-000 leading-[24px] ellipsis-1 mb-8">
|
||||
<view class="font-size-16 font-500 text-[#000000] leading-[24px] ellipsis-1 mb-8">
|
||||
{{ orderData.commodityName }}
|
||||
</view>
|
||||
|
||||
<view class="flex font-size-12">
|
||||
<text class="w-60 color-99A0AE">购买数量</text>
|
||||
<text class="color-525866">{{ commodityAmount }}</text>
|
||||
<text class="w-60 text-[#99a0ae]">购买数量</text>
|
||||
<text class="text-[#525866]">{{ commodityAmount }}</text>
|
||||
</view>
|
||||
|
||||
<view v-if="orderData.orderStatus === '0'"
|
||||
class="border-box border-top pt-[12px] font-size-14 font-500 color-171717 mt-12">凭[电子凭证]直接验证使用</view>
|
||||
class="border-box border-top pt-[12px] font-size-14 font-500 text-[#171717] mt-12">凭[电子凭证]直接验证使用</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="info-row flex items-center mt-8">
|
||||
<text class="label font-size-12 color-99A0AE">{{ label }}:</text>
|
||||
<text class="value flex-full font-size-12 color-99A0AE">{{ value }}</text>
|
||||
<text class="label font-size-12 text-[#99a0ae]">{{ label }}:</text>
|
||||
<text class="value flex-full font-size-12 text-[#99a0ae]">{{ value }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<view class="card-content pt-[12px]">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="left flex-full font-size-14 leading-[20px] color-171717 mr-12">
|
||||
<view class="left flex-full font-size-14 leading-[20px] text-[#171717] mr-12">
|
||||
{{ orderData.commodityName }}
|
||||
</view>
|
||||
<view :class="[
|
||||
'right font-size-18 font-bold leading-[20px]',
|
||||
orderData.orderStatus === '0' ? 'color-FF3D60' : 'color-525866',
|
||||
orderData.orderStatus === '0' ? 'text-[#ff3d60]' : 'text-[#525866]',
|
||||
]">
|
||||
{{ orderData.orderAmt }}
|
||||
</view>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="card-header flex items-center">
|
||||
<view class="status-info flex items-center flex-full">
|
||||
<image class="status-icon mr-4" :src="getStatusIcon()" />
|
||||
<view class="order-title font-size-14 leading-[20px] color-525866">
|
||||
<view class="order-title font-size-14 leading-[20px] text-[#525866]">
|
||||
{{ getOrderTypeName() }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<view v-if="orderData.orderStatus === '0'" class="text-right">
|
||||
<button
|
||||
class="go-pay border-none font-size-14 color-white bg-[#ff3d60] rounded-5 inline-block text-center leading-[30px]"
|
||||
class="go-pay border-none font-size-14 text-white bg-[#ff3d60] rounded-5 inline-block text-center leading-[30px]"
|
||||
@click.stop="handleCardClick">
|
||||
去支付
|
||||
</button>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-10 p-[12px]">
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<text class="w-60 color-99A0AE">订单编号</text>
|
||||
<text class="color-525866">{{ orderData.orderId }}</text>
|
||||
<text class="w-60 text-[#99a0ae]">订单编号</text>
|
||||
<text class="text-[#525866]">{{ orderData.orderId }}</text>
|
||||
</view>
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<text class="w-60 color-99A0AE">下单时间</text>
|
||||
<text class="color-525866">{{ orderData.createTime }}</text>
|
||||
<text class="w-60 text-[#99a0ae]">下单时间</text>
|
||||
<text class="text-[#525866]">{{ orderData.createTime }}</text>
|
||||
</view>
|
||||
<view class="flex font-size-12">
|
||||
<text class="w-60 color-99A0AE">支付状态</text>
|
||||
<text class="w-60 text-[#99a0ae]">支付状态</text>
|
||||
<text :class="[
|
||||
{
|
||||
'color-FF3D60': statusCode === '0' || statusCode === '3',
|
||||
'text-[#ff3d60]': statusCode === '0' || statusCode === '3',
|
||||
'color-21B466': ['1', '2', '4', '5', '6'].includes(statusCode),
|
||||
},
|
||||
]">
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<view class="refund-popup bg-[#f5f7fa] border-box">
|
||||
<view class="border-box flex flex-items-center justify-between pt-[12px] pb-[12px] relative">
|
||||
<view class="flex flex-col flex-items-center flex-full ">
|
||||
<view class="flex-full font-size-16 text-color-900 text-center">核销凭证</view>
|
||||
<view class="flex-full font-size-12 text-color-600 text-center mt-4">请向工作人员出示此码</view>
|
||||
<view class="flex-full font-size-16 text-[#0B5C2D] text-center">核销凭证</view>
|
||||
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-4">请向工作人员出示此码</view>
|
||||
</view>
|
||||
<!-- 关闭按钮 -->
|
||||
<uni-icons class="close absolute" type="close" size="20" color="#CACFD8" @click="handleClose" />
|
||||
@@ -14,17 +14,17 @@
|
||||
|
||||
<view class="flex w-full flex-row flex-items-center flex-justify-between py-[4px]">
|
||||
<view>
|
||||
<view class="font-size-16 font-500 color-000 leading-[24px] ellipsis-1">
|
||||
<view class="font-size-16 font-500 text-[#000000] leading-[24px] ellipsis-1">
|
||||
{{ selectedVoucher.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="selectedVoucher" class="flex flex-row">
|
||||
<view class="bg-[#f5f7fa] text-color-600 font-size-12 p-[4px] rounded-4 mr-4">总计{{ selectedVoucher.count
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-4 mr-4">总计{{ selectedVoucher.count
|
||||
}}{{
|
||||
selectedVoucher.unit }}
|
||||
</view>
|
||||
<view class="bg-[#F0F8F3] theme-color-500 font-size-12 p-[4px] rounded-4">剩{{ selectedVoucher.count -
|
||||
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-12 p-[4px] rounded-4">剩{{ selectedVoucher.count -
|
||||
selectedVoucher.writeOffCount }}{{ selectedVoucher.unit }}可用</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,9 +32,9 @@
|
||||
<view
|
||||
class="flex flex-col w-full flex-items-center flex-justify-center rounded-8 border pt-[16px] pb-[32px] mt-12">
|
||||
<view class="flex flex-row flex-justify-between w-full px-[12px]">
|
||||
<view class="bg-[#F0F8F3] theme-color-500 font-size-14 px-[12px] leading-[24px] rounded-12">凭证{{
|
||||
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-12">凭证{{
|
||||
selectedVoucherList.length > 1 ? currentVoucherIndex + 1 : '' }}</view>
|
||||
<view class="text-color-500 font-size-14 px-[12px] leading-[24px] rounded-12">此码仅可核销{{ selectedVoucher.count
|
||||
<view class="text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-12">此码仅可核销{{ selectedVoucher.count
|
||||
-
|
||||
selectedVoucher.writeOffCount }}份</view>
|
||||
</view>
|
||||
@@ -45,8 +45,7 @@
|
||||
:onval="true" />
|
||||
</view>
|
||||
|
||||
<view v-if="false"
|
||||
class="mt-20 bg-[#F0F8F3] theme-color-500 font-size-14 px-[12px] leading-[24px] rounded-12">
|
||||
<view v-if="false" class="mt-20 bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-12">
|
||||
{{ selectedVoucher.name }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -60,10 +59,10 @@
|
||||
<view class="flex flex-col">
|
||||
<view class="flex flex-row flex-justify-center flex-items-center">
|
||||
<view class="theme-color-500 font-size-16">{{ currentVoucherIndex + 1 }}</view>
|
||||
<view class="text-color-600 font-size-12">/{{ selectedVoucherList.length }}</view>
|
||||
<view class="text-[#02C34E] font-size-12">/{{ selectedVoucherList.length }}</view>
|
||||
</view>
|
||||
|
||||
<view class="text-color-600 font-size-14">扫码后点击下一张</view>
|
||||
<view class="text-[#02C34E] font-size-14">扫码后点击下一张</view>
|
||||
</view>
|
||||
|
||||
<view class="actions-btn" @click.stop="downAction">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="border-box font-size-24 color-171717 leading-[32px] font-500 pt-[12px] pb-[12px]">
|
||||
<view class="border-box font-size-24 text-[#171717] leading-[32px] font-500 pt-[12px] pb-[12px]">
|
||||
{{ currentStatusText }}
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<view class="bg-white rounded-10 p-[12px] mb-12" v-if="hasConsumerData">
|
||||
<view v-for="(item, index) in consumerList" :key="index">
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<text class="w-60 color-99A0AE">住客姓名</text>
|
||||
<text class="color-525866">{{ item.visitorName }}</text>
|
||||
<text class="w-60 text-[#99a0ae]">住客姓名</text>
|
||||
<text class="text-[#525866]">{{ item.visitorName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex font-size-12">
|
||||
<text class="w-60 color-99A0AE">联系电话</text>
|
||||
<text class="color-525866">{{ contactPhone }}</text>
|
||||
<text class="w-60 text-[#99a0ae]">联系电话</text>
|
||||
<text class="text-[#525866]">{{ contactPhone }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-12 px-[12px] pt-[12px] mb-12">
|
||||
<text class="font-size-16 color-171717 leading-[24px] font-500">
|
||||
<text class="font-size-16 text-[#171717] leading-[24px] font-500">
|
||||
核销凭证列表
|
||||
</text>
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
:class="[index + 1 === props.orderData.commodityPackageConfig.length ? '' : 'border-bottom']"
|
||||
v-for="(item, index) in props.orderData.commodityPackageConfig" :key="item.name">
|
||||
<view class="flex flex-col">
|
||||
<text class="text-color-900 font-size-16">{{ item.name }}</text>
|
||||
<text class="text-[#0B5C2D] font-size-16">{{ item.name }}</text>
|
||||
<view class="flex flex-row mt-8">
|
||||
<view class="bg-[#f5f7fa] text-color-600 font-size-12 p-[4px] rounded-4 mr-4">总计{{ item.count }}{{ item.unit
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-4 mr-4">总计{{ item.count }}{{ item.unit
|
||||
}}
|
||||
</view>
|
||||
<view class="bg-[#F0F8F3] theme-color-500 font-size-12 p-[4px] rounded-4">剩{{ item.count - item.writeOffCount
|
||||
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-12 p-[4px] rounded-4">剩{{ item.count - item.writeOffCount
|
||||
}}{{ item.unit }}可用</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-items-center px-[14px] py-[8px] rounded-8"
|
||||
:class="[item.packageStatus === 0 ? 'bg-[#0CCD58]' : 'bg-[#f5f5f5]']" @click="handleShowQrcode(item, index)">
|
||||
<text v-if="item.packageStatus === 0" class="font-size-14 color-white">出示凭证</text>
|
||||
<text v-else class="font-size-14 text-color-300">已核销</text>
|
||||
<text v-if="item.packageStatus === 0" class="font-size-14 text-white">出示凭证</text>
|
||||
<text v-else class="font-size-14 text-[#77FEAB]">已核销</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user