refactor: remove font-size utility file and replace with inline text classes

Delete the src/static/scss/font-size.scss utility file, and replace all legacy `font-size-*` class usages across the codebase with inline `text-[numberpx]` styling to consolidate font size definitions and remove redundant utility code.
This commit is contained in:
duanshuwen
2026-07-24 22:10:16 +08:00
parent 872a3fac18
commit 157b4f7e22
69 changed files with 255 additions and 324 deletions

View File

@@ -2,19 +2,19 @@
<view class="bg-white rounded-[12px] p-[12px] mb-[12px]">
<view class="flex flex-items-center flex-justify-between">
<view class="flex flex-items-center">
<text class="font-size-16 text-[#171717] leading-[24px] font-[500]">
<text class="text-[16px] text-[#171717] leading-[24px] font-[500]">
订单金额
</text>
<text class="amt font-size-18 font-bold text-[#ff3d60] ml-[4px]">
<text class="amt text-[18px] font-bold text-[#ff3d60] ml-[4px]">
{{ orderData.payAmt }}
</text>
</view>
</view>
<view v-if="orderData.orderStatus === '0'" class="font-size-11 text-[#99a0ae] mt-[4px]">
<view v-if="orderData.orderStatus === '0'" class="text-[11px] text-[#99a0ae] mt-[4px]">
超时后订单将自动取消
</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-[12px]">
class="border-box border-top flex flex-items-center flex-justify-between text-[12px] pt-[12px] mt-[12px]">
<view class="text-[#525866]">取消政策及说明</view>
<view class="flex flex-items-center" @click="emit('click')">
<text class="theme-color-500 mr-[4px]">查看详情</text>

View File

@@ -1,12 +1,12 @@
<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-[10px] flex flex-items-center flex-justify-center font-size-14 font-[500] text-[#525866] mr-[12px]"
class="left border-none bg-white rounded-[10px] flex flex-items-center flex-justify-center text-[14px] font-[500] text-[#525866] mr-[12px]"
@click="emit('refund', orderData)">
申请退款
</button>
<button :class="[
'right border-none rounded-[10px] flex flex-full flex-items-center flex-justify-center font-size-14 font-[500] bg-[#0CCD58]',
'right border-none rounded-[10px] flex flex-full flex-items-center flex-justify-center text-[14px] font-[500] bg-[#0CCD58]',
{
'bg-[#ff3d60]': statusCode === '0',
'text-white': ['1', '2', '3', '4', '5', '6'].includes(statusCode),

View File

@@ -3,17 +3,17 @@
<!-- 酒店类型入住离店日期部分 -->
<DateRangeSection v-if="orderData.orderType == 0" :selectedDate="selectedDate" />
<view class="font-size-16 font-[500] text-[#000000] leading-[24px] ellipsis-1">
<view class="text-[16px] font-[500] text-[#000000] leading-[24px] ellipsis-1">
{{ orderData.commodityName }}
</view>
<view class="border-box border-bottom font-size-12 text-[#99a0ae] leading-[16px] pb-[12px]">
<view class="border-box border-bottom text-[12px] text-[#99a0ae] leading-[16px] pb-[12px]">
{{ orderData.commodityDescription }}
</view>
<!-- 权益部分 -->
<view class="border-box flex flex-items-center pt-[12px]">
<text class="bg-[#f7f7f7] rounded-[4px] font-size-11 text-[#525866] mr-[4px] pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
<text class="bg-[#f7f7f7] rounded-[4px] text-[11px] text-[#525866] mr-[4px] 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-[12px] mb-[12px]">
<view class="font-size-16 font-[500] text-[#000000] leading-[24px] ellipsis-1 mb-[8px]">
<view class="text-[16px] font-[500] text-[#000000] leading-[24px] ellipsis-1 mb-[8px]">
{{ orderData.commodityName }}
</view>
<view class="flex font-size-12">
<view class="flex text-[12px]">
<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] text-[#171717] mt-[12px]">[电子凭证]直接验证使用</view>
class="border-box border-top pt-[12px] text-[14px] font-[500] text-[#171717] mt-[12px]">[电子凭证]直接验证使用</view>
</view>
</template>

View File

@@ -1,7 +1,7 @@
<template>
<view class="info-row flex items-center mt-[8px]">
<text class="label font-size-12 text-[#99a0ae]">{{ label }}</text>
<text class="value flex-full font-size-12 text-[#99a0ae]">{{ value }}</text>
<text class="label text-[12px] text-[#99a0ae]">{{ label }}</text>
<text class="value flex-full text-[12px] text-[#99a0ae]">{{ value }}</text>
</view>
</template>

View File

@@ -1,11 +1,11 @@
<template>
<view class="card-content pt-[12px]">
<view class="flex items-center justify-between">
<view class="left flex-full font-size-14 leading-[20px] text-[#171717] mr-[12px]">
<view class="left flex-full text-[14px] leading-[20px] text-[#171717] mr-[12px]">
{{ orderData.commodityName }}
</view>
<view :class="[
'right font-size-18 font-bold leading-[20px]',
'right text-[18px] font-bold leading-[20px]',
orderData.orderStatus === '0' ? 'text-[#ff3d60]' : 'text-[#525866]',
]">
{{ orderData.orderAmt }}

View File

@@ -4,12 +4,12 @@
<view class="card-header flex items-center">
<view class="status-info flex items-center flex-full">
<image class="status-icon mr-[4px]" :src="getStatusIcon()" />
<view class="order-title font-size-14 leading-[20px] text-[#525866]">
<view class="order-title text-[14px] leading-[20px] text-[#525866]">
{{ getOrderTypeName() }}
</view>
</view>
<view v-if="orderData.status !== 'pending'" :class="[
'status-tag font-size-12',
'status-tag text-[12px]',
`tag-${orderData.orderStatus || orderData.workOrderStatus}`,
]">
{{ getStatusText(orderData.orderStatus || orderData.workOrderStatus) }}
@@ -21,7 +21,7 @@
<view v-if="orderData.orderStatus === '0'" class="text-right">
<button
class="go-pay border-none font-size-14 text-white bg-[#ff3d60] rounded-[5px] inline-block text-center leading-[30px]"
class="go-pay border-none text-[14px] text-white bg-[#ff3d60] rounded-[5px] inline-block text-center leading-[30px]"
@click.stop="handleCardClick">
去支付
</button>

View File

@@ -1,14 +1,14 @@
<template>
<view class="bg-white rounded-[10px] p-[12px]">
<view class="flex mb-[8px] font-size-12">
<view class="flex mb-[8px] text-[12px]">
<text class="w-60 text-[#99a0ae]">订单编号</text>
<text class="text-[#525866]">{{ orderData.orderId }}</text>
</view>
<view class="flex mb-[8px] font-size-12">
<view class="flex mb-[8px] text-[12px]">
<text class="w-60 text-[#99a0ae]">下单时间</text>
<text class="text-[#525866]">{{ orderData.createTime }}</text>
</view>
<view class="flex font-size-12">
<view class="flex text-[12px]">
<text class="w-60 text-[#99a0ae]">支付状态</text>
<text :class="[
{

View File

@@ -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-[#0B5C2D] text-center">核销凭证</view>
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-[4px]">请向工作人员出示此码</view>
<view class="flex-full text-[16px] text-[#0B5C2D] text-center">核销凭证</view>
<view class="flex-full text-[12px] text-[#02C34E] text-center mt-[4px]">请向工作人员出示此码</view>
</view>
<!-- 关闭按钮 -->
<uni-icons class="close absolute" type="close" size="20" color="#CACFD8" @click="handleClose" />
@@ -15,18 +15,18 @@
<view class="flex w-full flex-row flex-items-center flex-justify-between py-[4px]">
<view>
<view class="font-size-16 font-[500] text-[#000000] leading-[24px] ellipsis-1">
<view class="text-[16px] 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-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-[4px]">总计{{
<view class="bg-[#f5f7fa] text-[#02C34E] text-[12px] p-[4px] rounded-[4px] mr-[4px]">总计{{
selectedVoucher.count
}}{{
selectedVoucher.unit }}
</view>
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-12 p-[4px] rounded-[4px]">{{ selectedVoucher.count -
<view class="bg-[#F0F8F3] text-[#0CCD58] text-[12px] p-[4px] rounded-[4px]">{{ selectedVoucher.count -
selectedVoucher.writeOffCount }}{{ selectedVoucher.unit }}可用</view>
</view>
</view>
@@ -34,9 +34,9 @@
<view
class="flex flex-col w-full flex-items-center flex-justify-center rounded-[8px] border pt-[16px] pb-[32px] mt-[12px]">
<view class="flex flex-row flex-justify-between w-full px-[12px]">
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">凭证{{
<view class="bg-[#F0F8F3] text-[#0CCD58] text-[14px] px-[12px] leading-[24px] rounded-[12px]">凭证{{
selectedVoucherList.length > 1 ? currentVoucherIndex + 1 : '' }}</view>
<view class="text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">此码仅可核销{{
<view class="text-[#0CCD58] text-[14px] px-[12px] leading-[24px] rounded-[12px]">此码仅可核销{{
selectedVoucher.count
-
selectedVoucher.writeOffCount }}</view>
@@ -49,7 +49,7 @@
</view>
<view v-if="false"
class="mt-[20px] bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">
class="mt-[20px] bg-[#F0F8F3] text-[#0CCD58] text-[14px] px-[12px] leading-[24px] rounded-[12px]">
{{ selectedVoucher.name }}
</view>
</view>
@@ -62,11 +62,11 @@
<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-[#02C34E] font-size-12">/{{ selectedVoucherList.length }}</view>
<view class="theme-color-500 text-[16px]">{{ currentVoucherIndex + 1 }}</view>
<view class="text-[#02C34E] text-[12px]">/{{ selectedVoucherList.length }}</view>
</view>
<view class="text-[#02C34E] font-size-14">扫码后点击下一张</view>
<view class="text-[#02C34E] text-[14px]">扫码后点击下一张</view>
</view>
<view class="actions-btn" @click.stop="downAction">

View File

@@ -1,5 +1,5 @@
<template>
<view class="border-box font-size-24 text-[#171717] leading-[32px] font-[500] pt-[12px] pb-[12px]">
<view class="border-box text-[24px] text-[#171717] leading-[32px] font-[500] pt-[12px] pb-[12px]">
{{ currentStatusText }}
</view>
</template>

View File

@@ -1,12 +1,12 @@
<template>
<view class="bg-white rounded-[10px] p-[12px] mb-[12px]" v-if="hasConsumerData">
<view v-for="(item, index) in consumerList" :key="index">
<view class="flex mb-[8px] font-size-12">
<view class="flex mb-[8px] text-[12px]">
<text class="w-60 text-[#99a0ae]">住客姓名</text>
<text class="text-[#525866]">{{ item.visitorName }}</text>
</view>
</view>
<view class="flex font-size-12">
<view class="flex text-[12px]">
<text class="w-60 text-[#99a0ae]">联系电话</text>
<text class="text-[#525866]">{{ contactPhone }}</text>
</view>

View File

@@ -1,6 +1,6 @@
<template>
<view class="bg-white rounded-[12px] px-[12px] pt-[12px] mb-[12px]">
<text class="font-size-16 text-[#171717] leading-[24px] font-[500]">
<text class="text-[16px] text-[#171717] leading-[24px] font-[500]">
核销凭证列表
</text>
@@ -8,13 +8,13 @@
: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-[#0B5C2D] font-size-16">{{ item.name }}</text>
<text class="text-[#0B5C2D] text-[16px]">{{ item.name }}</text>
<view class="flex flex-row mt-[8px]">
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-[4px]">总计{{ item.count }}{{
<view class="bg-[#f5f7fa] text-[#02C34E] text-[12px] p-[4px] rounded-[4px] mr-[4px]">总计{{ item.count }}{{
item.unit
}}
</view>
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-12 p-[4px] rounded-[4px]">{{ item.count -
<view class="bg-[#F0F8F3] text-[#0CCD58] text-[12px] p-[4px] rounded-[4px]">{{ item.count -
item.writeOffCount
}}{{ item.unit }}可用</view>
</view>
@@ -22,8 +22,8 @@
<view class="flex flex-items-center px-[14px] py-[8px] rounded-[8px]"
:class="[item.packageStatus === 0 ? 'bg-[#0CCD58]' : 'bg-[#f5f5f5]']" @click="handleShowQrcode(item, index)">
<text v-if="item.packageStatus === 0" class="font-size-14 text-white">出示凭证</text>
<text v-else class="font-size-14 text-[#77FEAB]">已核销</text>
<text v-if="item.packageStatus === 0" class="text-[14px] text-white">出示凭证</text>
<text v-else class="text-[14px] text-[#77FEAB]">已核销</text>
</view>
</view>
</view>