feat:用户优惠券
This commit is contained in:
1 parent
c9ff397591
commit
29a675f533
16 files changed
+410
-306
No files matched your search
@@ -20,8 +20,8 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
|
||||
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
#VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.174:9999 # 邓-本地
|
||||
#VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
|
||||
VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上
|
||||
VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上
|
||||
|
||||
# --------------------------- 开发环境 图片访问基础地址 ---------------------------
|
||||
# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
|
||||
|
||||
+1
-1
@@ -90,4 +90,4 @@
|
||||
"vite": "5.2.8",
|
||||
"vue-tsc": "^1.0.24"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -706,4 +706,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,18 @@
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<view class="bg-white rounded-20rpx my-20rpx font-bold">
|
||||
<z-tabs
|
||||
:list="[
|
||||
{ name: '浙政钉支付', value: 1 },
|
||||
{ name: '支付宝支付', value: 2, disabled: true },
|
||||
]"
|
||||
bar-width="150"
|
||||
:active-style="{
|
||||
<z-tabs :list="[
|
||||
{ name: '浙政钉支付', value: 1 },
|
||||
{ name: '支付宝支付', value: 2, disabled: true },
|
||||
]" bar-width="150" :active-style="{
|
||||
fontSize: '30rpx',
|
||||
}" :inactive-style="{
|
||||
fontSize: '30rpx',
|
||||
}"
|
||||
:inactive-style="{
|
||||
fontSize: '30rpx',
|
||||
}"
|
||||
@change="payMethodTabChange"
|
||||
/>
|
||||
}" @change="payMethodTabChange" />
|
||||
</view>
|
||||
|
||||
<tm-sheet v-if="!state.isUseDoor && state.isUseDoorTip" borderWidth="2" :margin="[0, 20]" padding="10" color="#0094FF22">
|
||||
<tm-sheet v-if="!state.isUseDoor && state.isUseDoorTip" borderWidth="2" :margin="[0, 20]" padding="10"
|
||||
color="#0094FF22">
|
||||
<view class="flex items-center justify-between pl-4">
|
||||
<tm-text font-size="30 " color="#0779FD">{{ state.isUseDoorTip }}</tm-text>
|
||||
<tm-button size="s" @click="goRecharge">去充值</tm-button>
|
||||
@@ -55,18 +50,8 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<tm-modal
|
||||
v-model:show="state.show"
|
||||
:overlayClick="false"
|
||||
title="你是否同意授权"
|
||||
position="bottom"
|
||||
:showCancel="true"
|
||||
height="800rpx"
|
||||
cancelText="拒绝"
|
||||
confirmText="同意"
|
||||
@confirm="appAuthHardDoor(1)"
|
||||
@cancel="appAuthHardDoor(0)"
|
||||
>
|
||||
<tm-modal v-model:show="state.show" :overlayClick="false" title="你是否同意授权" position="bottom" :showCancel="true"
|
||||
height="800rpx" cancelText="拒绝" confirmText="同意" @confirm="appAuthHardDoor(1)" @cancel="appAuthHardDoor(0)">
|
||||
<tm-text color="#999999">{{ state.authDesc }}</tm-text>
|
||||
</tm-modal>
|
||||
</crud-layout>
|
||||
@@ -147,7 +132,7 @@ const openDoor = async () => {
|
||||
}
|
||||
|
||||
// 支付方式tab改变
|
||||
const payMethodTabChange = (e: number) => {}
|
||||
const payMethodTabChange = (e: number) => { }
|
||||
|
||||
// 确认或拒绝协议
|
||||
const appAuthHardDoor = async (type: 1 | 0) => {
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
{{ detail.title }}
|
||||
</view>
|
||||
<view class="meta">
|
||||
<!-- <text class="type-tag" :class="getTypeClass(detail.type)">{{ getTypeLabel(detail.type) }}</text>-->
|
||||
<text v-if="false" class="type-tag" :class="getTypeClass(detail.type)">{{ getTypeLabel(detail.type)
|
||||
}}</text>
|
||||
<text class="time">{{ formatTime(detail.createTime) }}</text>
|
||||
<text class="view-count">浏览 {{ detail.viewCount }}</text>
|
||||
</view>
|
||||
@@ -18,7 +19,8 @@
|
||||
|
||||
<view v-if="detail.attachments && detail.attachments.length > 0" class="attachments">
|
||||
<view class="attachment-title">附件</view>
|
||||
<view v-for="(file, index) in detail.attachments" :key="index" class="attachment-item" @click="downloadFile(file)">
|
||||
<view v-for="(file, index) in detail.attachments" :key="index" class="attachment-item"
|
||||
@click="downloadFile(file)">
|
||||
<text class="file-name">{{ file.name }}</text>
|
||||
<text class="file-size">{{ formatFileSize(file.size) }}</text>
|
||||
</view>
|
||||
@@ -30,21 +32,33 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { actCancel, noticeApi } from "@/sheep/api"
|
||||
import { actCancel, actComApi, noticeApi } from "@/sheep/api"
|
||||
|
||||
const noticeId = ref("")
|
||||
const detail = ref<any>({})
|
||||
const actDetail = ref<any>({})
|
||||
const actDetail = ref<any>({
|
||||
actId: "",
|
||||
actType: "",
|
||||
detail: {
|
||||
|
||||
onLoad(async (option: any) => {
|
||||
const { id } = option
|
||||
if (!id) return uni.showToast({ title: "参数错误", icon: "error" })
|
||||
const { data = {} }: any = await actCancel.getDetailByNoticeId({ id })
|
||||
actDetail.value = data
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 获取活动详情
|
||||
const getActDetail = async () => {
|
||||
if (!noticeId.value) return
|
||||
try {
|
||||
const { data = {} }: any = await actComApi.getActByNotifyId({ notifyId: noticeId.value })
|
||||
actDetail.value = data
|
||||
} catch (error) {
|
||||
console.log("|获取活动详情|,以外的错误error:", error);
|
||||
}
|
||||
}
|
||||
|
||||
const goGetCoupon = () => {
|
||||
uni.navigateTo({ url: `/pages/merchant/merchant-activity?actId=${actDetail.value.id}&mchId=${actDetail.value.mchId}` })
|
||||
uni.navigateTo({ url: `/pages/merchant/merchant-activity?actId=${actDetail.value.actId}&actType=${actDetail.value.actType}` })
|
||||
}
|
||||
|
||||
const nodes = computed(() => {
|
||||
@@ -110,7 +124,7 @@ onLoad(async (options: any) => {
|
||||
const id = options.id
|
||||
if (!id) return
|
||||
noticeId.value = id
|
||||
|
||||
getActDetail()
|
||||
try {
|
||||
// 增加浏览量
|
||||
await noticeApi.addNoticeView(id)
|
||||
|
||||
@@ -1,35 +1,13 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="10"
|
||||
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
|
||||
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<template #top>
|
||||
<tm-input
|
||||
class="mt-2"
|
||||
v-model="params.receiverUserName"
|
||||
type="text"
|
||||
height="72"
|
||||
minHeight="72"
|
||||
fontSize="28"
|
||||
:showClear="true"
|
||||
:focus="false"
|
||||
placeholder="请输入领取人姓名"
|
||||
style="border: 4rpx solid #0779fd; border-radius: 14rpx"
|
||||
:focus-highlight="false"
|
||||
color="#ECF4F9"
|
||||
@clear="inputClear"
|
||||
>
|
||||
<tm-input class="mt-2" v-model="params.receiverUserName" type="text" height="72" minHeight="72"
|
||||
fontSize="28" :showClear="true" :focus="false" placeholder="请输入领取人姓名"
|
||||
style="border: 4rpx solid #0779fd; border-radius: 14rpx" :focus-highlight="false" color="#ECF4F9"
|
||||
@clear="inputClear">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-button class="mr-1 px-3 py-26rpx text-30rpx!" size="xs" @click="search">搜 索</tm-button>
|
||||
</template>
|
||||
@@ -39,12 +17,9 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view
|
||||
class="card w-full h-400rpx relative activity-card overflow-hidden mb-2 py-2"
|
||||
:style="{ backgroundColor: getActStatus(item.actStatus)?.color }"
|
||||
v-for="(item, index) in pageHook.list"
|
||||
:key="index"
|
||||
>
|
||||
<view class="card w-full h-400rpx relative activity-card overflow-hidden mb-2 py-2"
|
||||
:style="{ backgroundColor: getActStatus(item.actStatus)?.color }" v-for="(item, index) in pageHook.list"
|
||||
:key="index">
|
||||
<view class="ribbon" :style="{ backgroundColor: getActStatus(item.actStatus)?.color }">
|
||||
{{ getActStatus(item.actStatus)?.name }}
|
||||
</view>
|
||||
|
||||
@@ -1,25 +1,69 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view v-if="state.actId" class="px-2 py-4">
|
||||
<view class="card rounded-lb-0! rounded-rb-0! w-full h-400rpx relative activity-card overflow-hidden">
|
||||
<view v-if="state.actType == 'CANCEL_ACT'"
|
||||
class="card rounded-lb-0! rounded-rb-0! w-full h-400rpx relative activity-card overflow-hidden">
|
||||
<view class="ribbon">兑换券</view>
|
||||
<view class="px-8 pt-5 flex justify-between items-center font-bold">
|
||||
<text class="text-32 c-#FF4F3F">限时领取</text>
|
||||
<text class="text-30 c-#FF4F3F px-1 rounded-full bg-#eeeeee44">
|
||||
{{ (state.couponDetail.startTime?.split(" ")[0] || "") + "~" + (state.couponDetail.expireTime?.split(" ")[0] || "") }}
|
||||
{{ (state.actDetail.startTime?.split(" ")[0] || "") + "~" +
|
||||
(state.actDetail.expireTime?.split(" ")[0] || "") }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="w-4/5 px-8 pt-4 text-28 c-#fff">{{ state.couponDetail.actTitle }}</view>
|
||||
<view class="w-4/5 px-8 pt-4 text-28 c-#fff">{{ state.actDetail.actTitle }}</view>
|
||||
<view class="absolute bottom-100 left-60 text-40 italic">
|
||||
<text class="color-red mr-2">¥{{ hooks.useMoney(state.couponDetail.activeCancelPrice) }}</text>
|
||||
<text class="text-30 line-through color-red">¥{{ hooks.useMoney(state.couponDetail.activeOrgPrice) }}</text>
|
||||
<text class="color-red mr-2">¥{{ hooks.useMoney(state.actDetail.activeCancelPrice) }}</text>
|
||||
<text class="text-30 line-through color-red">¥{{ hooks.useMoney(state.actDetail.activeOrgPrice)
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="absolute bottom-40 left-60 text-28 bg-#eeeeee44 c-#fff px-2 rounded-full">限量领取 先领先得</view>
|
||||
</view>
|
||||
<view v-if="state.couponInfo.actStatus == '2'" class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30">已 核 销</view>
|
||||
|
||||
<view v-if="state.actType == 'COUPON_ACT'"
|
||||
class="card relative rounded-lb-0! rounded-rb-0! w-full activity-card overflow-hidden">
|
||||
<view class="ribbon">{{ actCouponTypeEnum[state.actDetail.type] }}</view>
|
||||
<view class="px-8 pt-5 flex justify-between items-center font-bold">
|
||||
<text class="text-32 c-#FF4F3F">{{ state.actDetail.name }}</text>
|
||||
<text class="text-30 c-#FF4F3F px-1 rounded-full bg-#eeeeee44">
|
||||
<view v-if="state.actDetail.validType == 1" class="flex items-center">
|
||||
<text>{{ state.actDetail.validStartTime }}</text>
|
||||
<text>~</text>
|
||||
<text>{{ state.actDetail.validEndTime }}</text>
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
<view class="w-4/5 px-8 pt-4 text-28 c-#fff">
|
||||
<view v-if="state.actDetail.validType == '1'">
|
||||
<text>领取后请在</text>
|
||||
<text>{{ state.actDetail.validStartTime }}</text>
|
||||
<text>~</text>
|
||||
<text>{{ state.actDetail.validEndTime }}</text>
|
||||
<text>时间段内使用</text>
|
||||
</view>
|
||||
<view v-if="state.actDetail.validType == '2'">
|
||||
<text>领取后请在</text>
|
||||
<text>{{ state.actDetail.validDays }}</text>
|
||||
<text>天内使用</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="state.actDetail.description"
|
||||
class="m-l-20rpx m-y-20rpx w-55% text-28 bg-#eeeeee44 c-#fff p-2 rounded-16rpx">
|
||||
{{ state.actDetail.description }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="state.couponInfo.actStatus == '2'"
|
||||
class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30">
|
||||
已 核 销
|
||||
</view>
|
||||
<template v-else>
|
||||
<view v-if="!state.isGet" class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30" @tap="getCoupon">立 即 领 取</view>
|
||||
<view v-if="state.isGet" class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30">已 领 取</view>
|
||||
<view v-if="state.actUserReceiveStatus == '99'"
|
||||
class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30" @tap="doReceive">立 即 领 取</view>
|
||||
<view v-else class="text-center card rounded-lt-0! rounded-rt-0! p-3 sub-text-30">
|
||||
{{ actUserReceiveEnum[state.actUserReceiveStatus] || "未知状态" }}
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
@@ -30,7 +74,8 @@
|
||||
</template>
|
||||
</crud-layout>
|
||||
|
||||
<tm-drawer z-index="100" v-model:show="showQrCodeDialog" title="兑换券核销二维码" :show-close="true" position="bottom" size="60%">
|
||||
<tm-drawer z-index="100" v-model:show="showQrCodeDialog" title="兑换券核销二维码" :show-close="true" position="bottom"
|
||||
size="60%">
|
||||
<view class="flex-col-center">
|
||||
<view class="h-80rpx" />
|
||||
<canvas canvas-id="qrcodeId" class="size-200px" />
|
||||
@@ -41,37 +86,55 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { actCancel } from "@/sheep/api"
|
||||
import { actCancel, actComApi, actCouponApi } from "@/sheep/api"
|
||||
import uqrcode from "@@/utils/uqrcode"
|
||||
import * as CryptoJS from "crypto-js"
|
||||
import { hooks } from "@/sheep"
|
||||
import { serviceEnum } from "@@/constant"
|
||||
|
||||
const { actUserReceiveEnum, actCouponTypeEnum } = serviceEnum
|
||||
|
||||
const state = reactive<any>({
|
||||
actId: "",
|
||||
mchId: "",
|
||||
isGet: false, // 是否已领取
|
||||
couponDetail: {}, // 优惠券详情
|
||||
actType: "",
|
||||
actUserReceiveStatus: "", // 是否已领取
|
||||
actDetail: {}, // 优惠券详情
|
||||
couponInfo: {}, // 优惠券信息
|
||||
})
|
||||
const showQrCodeDialog = ref(false)
|
||||
|
||||
onLoad((option: any) => {
|
||||
const { actId, mchId } = option
|
||||
if (!actId || !mchId) return uni.showToast({ title: "参数错误", icon: "error" })
|
||||
const { actId, actType } = option
|
||||
if (!actId || !actType) return uni.showToast({ title: "参数错误", icon: "error" })
|
||||
state.actId = actId
|
||||
state.mchId = mchId
|
||||
getCouponDetail()
|
||||
getCouponInfo()
|
||||
state.actType = actType
|
||||
getActDetail()
|
||||
getIsEligibleForAct()
|
||||
if (actType == "CANCEL_ACT") {
|
||||
getCouponInfo()
|
||||
}
|
||||
})
|
||||
|
||||
// 获取优惠券详情
|
||||
const getCouponDetail = async () => {
|
||||
const getActDetail = async () => {
|
||||
try {
|
||||
const { data } = await actCancel.getDetailById({
|
||||
id: state.actId,
|
||||
mchId: state.mchId,
|
||||
const { data } = await actComApi.getActDetail({
|
||||
actId: state.actId,
|
||||
actType: state.actType,
|
||||
})
|
||||
state.couponDetail = data
|
||||
state.actDetail = data?.detail
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: error, icon: "error" })
|
||||
}
|
||||
}
|
||||
|
||||
const getIsEligibleForAct = async () => {
|
||||
try {
|
||||
const { data } = await actComApi.isEligibleForAct({
|
||||
actId: state.actId,
|
||||
actType: state.actType,
|
||||
})
|
||||
state.actUserReceiveStatus = data
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: error, icon: "error" })
|
||||
}
|
||||
@@ -83,11 +146,9 @@ const getCouponInfo = async () => {
|
||||
uni.showLoading({ title: "加载中...", mask: true })
|
||||
const { code, data }: any = await actCancel.appFindUnique({ actId: state.actId })
|
||||
if (!data) {
|
||||
state.isGet = false
|
||||
return
|
||||
}
|
||||
state.couponInfo = data
|
||||
state.isGet = true
|
||||
} catch (error) {
|
||||
uni.showToast({ title: "加载失败", icon: "none" })
|
||||
} finally {
|
||||
@@ -95,19 +156,48 @@ const getCouponInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 领取券
|
||||
const getCoupon = async () => {
|
||||
// 领取优惠券
|
||||
const doReceive = () => {
|
||||
// 核销活动
|
||||
if (state.actType == 'CANCEL_ACT') {
|
||||
getCancelReceive()
|
||||
}
|
||||
// 优惠券活动
|
||||
if (state.actType == 'COUPON_ACT') {
|
||||
getCouponReceive()
|
||||
}
|
||||
}
|
||||
|
||||
// 核销活动
|
||||
const getCancelReceive = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: "正在领取...", mask: true })
|
||||
await new Promise((resolve) => setTimeout(resolve, 2_000))
|
||||
const { code, msg }: any = await actCancel.appGet({
|
||||
receiverUserId: uni.getStorageSync("user_info")?.sysUser?.userId,
|
||||
actId: state.actId,
|
||||
mchId: state.mchId,
|
||||
mchId: state.actDetail.mchId,
|
||||
})
|
||||
if (code != 0) return uni.showToast({ title: msg || "领取失败", icon: "none", mask: true })
|
||||
uni.showToast({ title: "领取成功", icon: "success" })
|
||||
await getCouponInfo()
|
||||
await getIsEligibleForAct()
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: "领取失败", icon: "none" })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
// 优惠券活动
|
||||
const getCouponReceive = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: "正在领取...", mask: true })
|
||||
const { code, msg }: any = await actCouponApi.receive({
|
||||
couponId: state.actId,
|
||||
})
|
||||
if (code != 0) return uni.showToast({ title: msg || "领取失败", icon: "none", mask: true })
|
||||
uni.showToast({ title: "领取成功", icon: "success" })
|
||||
await getIsEligibleForAct()
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: "领取失败", icon: "none" })
|
||||
} finally {
|
||||
@@ -124,8 +214,8 @@ const genVerificationCode = async () => {
|
||||
text: CryptoJS.enc.Base64.stringify(words),
|
||||
size: 200,
|
||||
margin: 0,
|
||||
success: (res) => {},
|
||||
complete: () => {},
|
||||
success: (res) => { },
|
||||
complete: () => { },
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
+12
-11
@@ -2,13 +2,10 @@
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<template #main-top>
|
||||
<view class="flex items-center py-3 px-5">
|
||||
<image
|
||||
v-if="state.userInfo?.sysUser?.avatar"
|
||||
class="size-100rpx rounded-full"
|
||||
:src="filePath(state.userInfo.sysUser.avatar)"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image v-else class="w-100rpx h-100rpx rounded-full" src="/static/icon/default-avatar.png" mode="aspectFill" />
|
||||
<image v-if="state.userInfo?.sysUser?.avatar" class="size-100rpx rounded-full"
|
||||
:src="filePath(state.userInfo.sysUser.avatar)" mode="aspectFill" />
|
||||
<image v-else class="w-100rpx h-100rpx rounded-full" src="/static/icon/default-avatar.png"
|
||||
mode="aspectFill" />
|
||||
<view class="ml-30rpx" v-if="state.userInfo?.sysUser?.userId">
|
||||
<view class="sub-text-30">{{ state.userInfo?.sysUser?.name }}</view>
|
||||
<view class="sub-text-26">ID {{ state.userInfo?.sysUser?.userId }}</view>
|
||||
@@ -21,7 +18,8 @@
|
||||
</template>
|
||||
|
||||
<view class="mt-10rpx rounded-20rpx shadow-main p-30rpx pb-40rpx bg-white">
|
||||
<view class="service_item flex items-center justify-between" v-for="(v, i) in state.menuList" :key="i" @tap="onTabMenu(v)">
|
||||
<view class="service_item flex items-center justify-between" v-for="(v, i) in state.menuList" :key="i"
|
||||
@tap="onTabMenu(v)">
|
||||
<view class="flex-row-center">
|
||||
<image class="size-40rpx" :src="v.icon" mode="aspectFill" />
|
||||
<text class="sub-text-28 m-l-20rpx">{{ v.text }}</text>
|
||||
@@ -31,13 +29,15 @@
|
||||
</view>
|
||||
|
||||
<view v-if="isDevEnv()" class="flex-col-center mt-40rpx mx-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doLogout">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff"
|
||||
@tap="doLogout">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
<view v-if="state.appInfo == APPENV.SH" class="flex-col-center mt-40rpx mx-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doChangeRole">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff"
|
||||
@tap="doChangeRole">
|
||||
切换角色
|
||||
</view>
|
||||
</view>
|
||||
@@ -50,7 +50,8 @@
|
||||
</view>
|
||||
</crud-layout>
|
||||
|
||||
<tm-modal :show="state.actModalShow" :showCancel="false" title="核销活动兑换券" zIndex="999" @confirm="" @cancel="" @close="">
|
||||
<tm-modal :show="state.actModalShow" :showCancel="false" title="核销活动兑换券" zIndex="999" @confirm="" @cancel=""
|
||||
@close="">
|
||||
<view class="text-center text-28">是否核销该活动兑换券?</view>
|
||||
<view class="text-center text-28">确认核销将自动对用户的 消费钱包 扣费</view>
|
||||
<template #footer>
|
||||
|
||||
+25
-31
@@ -48,14 +48,14 @@ const pageHook = hooks.usePage(
|
||||
getLaunchParam() == "canteen" // 食堂
|
||||
? orderApi.caneenPage
|
||||
: getLaunchParam() == "selfMerchant"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "coopMerchant"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "onlineShop"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "prosperityShop"
|
||||
? orderApi.farmerSpuPage
|
||||
: async () => [],
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "coopMerchant"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "onlineShop"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "prosperityShop"
|
||||
? orderApi.farmerSpuPage
|
||||
: async () => [],
|
||||
null,
|
||||
"data.records",
|
||||
)
|
||||
@@ -71,7 +71,7 @@ const doToDetail = (v: any) => {
|
||||
router.jump("/pages/order/detail", { id: v.id })
|
||||
}
|
||||
|
||||
const doAppraise = () => {}
|
||||
const doAppraise = () => { }
|
||||
|
||||
const doRefund = (v: any) => {
|
||||
router.jump("/pages/refund/apply", { id: v.id })
|
||||
@@ -80,20 +80,9 @@ const doRefund = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="10"
|
||||
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
|
||||
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<template #top>
|
||||
<view class="bg-white rounded-16rpx px-20rpx my-20rpx">
|
||||
<z-tabs :list="data.tabs" @change="doTab" />
|
||||
@@ -116,15 +105,15 @@ const doRefund = (v: any) => {
|
||||
<view class="flex-row items-center justify-between mt-5rpx second-text-24">
|
||||
<view>
|
||||
<text>下单时间</text>
|
||||
<text class="ml-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</text>
|
||||
<text class="ml-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
||||
}}</text>
|
||||
</view>
|
||||
<view>{{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}</view>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-end mt-1">
|
||||
<text
|
||||
v-if="v.carList?.length && ['5', '20'].includes(v.orderStatus) && ['1', '2'].includes(v.orderType)"
|
||||
class="second-text-30 mr-2"
|
||||
>
|
||||
class="second-text-30 mr-2">
|
||||
共 {{ v.carList.length }} 件
|
||||
</text>
|
||||
<text class="main-text-30 color-red!">¥ {{ hooks.useMoney(v.totalPrice) }}</text>
|
||||
@@ -135,12 +124,16 @@ const doRefund = (v: any) => {
|
||||
<view v-if="['5', '20'].includes(v.orderStatus) && ['1', '2'].includes(v.orderType)">
|
||||
<view class="border-b-2rpx border-dashed border-#eeeeee mt-2"></view>
|
||||
<tm-collapse>
|
||||
<tm-collapse-item :name="i" title="详细购买" titleFontSize="28" activeColor="#000" titleHeight="80" :showBottomLine="false">
|
||||
<view v-if="v.carList.length" class="flex justify-between items-center mb-2 px-3" v-for="(pV, pI) in v.carList" :key="pI">
|
||||
<tm-collapse-item :name="i" title="详细购买" titleFontSize="28" activeColor="#000" titleHeight="80"
|
||||
:showBottomLine="false">
|
||||
<view v-if="v.carList.length" class="flex justify-between items-center mb-2 px-3"
|
||||
v-for="(pV, pI) in v.carList" :key="pI">
|
||||
<view class="flex items-center w-6/10">
|
||||
<view class="size-100rpx">
|
||||
<image v-if="v.payType == '9'" class="size-100rpx rounded-8rpx" :src="pV.productPic" mode="aspectFill" />
|
||||
<image v-else class="size-100rpx rounded-8rpx" :src="filePath(pV.productPic)" mode="aspectFill" />
|
||||
<image v-if="v.payType == '9'" class="size-100rpx rounded-8rpx"
|
||||
:src="pV.productPic" mode="aspectFill" />
|
||||
<image v-else class="size-100rpx rounded-8rpx" :src="filePath(pV.productPic)"
|
||||
mode="aspectFill" />
|
||||
</view>
|
||||
<view class="ml-2 overflow-hidden">
|
||||
<view class="sub-text-26 truncate">{{ pV.productName }}</view>
|
||||
@@ -158,7 +151,8 @@ const doRefund = (v: any) => {
|
||||
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="w-full flex-row items-center justify-end my-1">
|
||||
<!-- <view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款</view> -->
|
||||
<view v-if="v.orderStatus === '5' && ['2', '7'].includes(v.orderType)" class="m-l-20rpx botder_btn" @tap.stop="doToDetail(v)">
|
||||
<view v-if="v.orderStatus === '5' && ['2', '7'].includes(v.orderType)" class="m-l-20rpx botder_btn"
|
||||
@tap.stop="doToDetail(v)">
|
||||
核销码
|
||||
</view>
|
||||
</view>
|
||||
|
||||
+20
-56
@@ -29,7 +29,7 @@ const freezeForm = reactive<any>({
|
||||
remark: "",
|
||||
})
|
||||
|
||||
onLoad(() => {})
|
||||
onLoad(() => { })
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
@@ -140,35 +140,22 @@ const doTransferMoney = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="5"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
||||
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
|
||||
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<view class="h-30rpx" />
|
||||
<view
|
||||
class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="router.jump('/pages/wallet/detail', { id: v.id })"
|
||||
>
|
||||
<view class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx" v-for="(v, i) in pageHook.list"
|
||||
:key="i" @tap="router.jump('/pages/wallet/detail', { id: v.id })">
|
||||
<view class="flex-col">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center">
|
||||
<text v-if="v.cardNumber" class="second-text-28">卡号: {{ v.cardNumber }}</text>
|
||||
</view>
|
||||
<view class="second-text-50">
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi" @tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima" @tap.stop="doPreviewQrCode(v)" />
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi"
|
||||
@tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima"
|
||||
@tap.stop="doPreviewQrCode(v)" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="v.cardNumber" class="h-1px m-t-10rpx bg-#999 bg-opacity-5" />
|
||||
@@ -191,14 +178,12 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="flex-row items-center justify-end space-x-20rpx m-t-10rpx">
|
||||
<!-- <view v-if="v.walletTypeUniqueCode == 1 && !v.cardNumber" class="botder_btn" @tap.stop="openBindDialog(v)">绑定</view> -->
|
||||
<view v-if="v.isRule == '1'" class="botder_btn" @tap.stop="doTransferMoney(v)">转账</view>
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn" @tap.stop="openFreezeDialog(v)">
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn"
|
||||
@tap.stop="openFreezeDialog(v)">
|
||||
申请冻结
|
||||
</view>
|
||||
<view
|
||||
v-if="false && v.walletTypeUniqueCode == 2"
|
||||
class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })"
|
||||
>
|
||||
<view v-if="false && v.walletTypeUniqueCode == 2" class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })">
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
@@ -206,15 +191,8 @@ const doTransferMoney = (v: any) => {
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showBindDialog"
|
||||
:overlayClick="false"
|
||||
title="绑定饭卡"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showBindDialog" :overlayClick="false" title="绑定饭卡" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="bindForm" :rules="bindFormRules">
|
||||
<tm-form-item name="cardNumber" :showLabel="false" :showBottom="false">
|
||||
@@ -224,15 +202,8 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doBind">绑定</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showFreezeDialog"
|
||||
:overlayClick="true"
|
||||
title="申请冻结"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showFreezeDialog" :overlayClick="true" title="申请冻结" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="freezeForm">
|
||||
<tm-form-item name="remark" :showLabel="false" :showBottom="false">
|
||||
@@ -242,15 +213,8 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doFreeze">冻结</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showQrCodeDialog"
|
||||
:overlayClick="false"
|
||||
title="钱包二维码"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="50%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showQrCodeDialog" :overlayClick="false" title="钱包二维码"
|
||||
:show-close="true" position="bottom" size="50%">
|
||||
<view class="flex-col-center">
|
||||
<view class="h-80rpx" />
|
||||
<canvas canvas-id="qrcodeId" class="size-200px" />
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from "@/sheep/utils/request"
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 根据公告id查询对应的活动
|
||||
*/
|
||||
getActByNotifyId: (params: any) =>
|
||||
request({
|
||||
url: "/wallet/act/com/app/get-act-by-notify-id",
|
||||
method: "GET",
|
||||
params,
|
||||
}),
|
||||
/**
|
||||
* 获取活动详情
|
||||
*/
|
||||
getActDetail: (params: any) =>
|
||||
request({
|
||||
url: "/wallet/act/com/app/get-act-detail",
|
||||
method: "GET",
|
||||
params,
|
||||
}),
|
||||
/**
|
||||
* 判断用户是否可以参加活动
|
||||
*/
|
||||
isEligibleForAct: (params: any) =>
|
||||
request({
|
||||
url: "/wallet/act/com/app/is-eligible-for-act",
|
||||
method: "GET",
|
||||
params,
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import request from "@/sheep/utils/request"
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 领取优惠券
|
||||
*/
|
||||
receive: (data: any) =>
|
||||
request({
|
||||
url: "/wallet/act-coupon-record/app/receive",
|
||||
method: "POST",
|
||||
data,
|
||||
}),
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
export { default as actCancel } from "./act-cancel"
|
||||
export { default as actComApi } from "./act-com"
|
||||
export { default as actCouponApi } from "./act-coupon"
|
||||
|
||||
export { default as applyApi } from "./apply"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// #ifdef WEB
|
||||
import { h, render } from "vue"
|
||||
import VerifyDeviceImpModel from "./verify-device-imp-model.vue"
|
||||
|
||||
@@ -24,3 +25,9 @@ const showVerifyDeviceImpModel = (onClose: () => any = () => null) => {
|
||||
}
|
||||
|
||||
export default showVerifyDeviceImpModel
|
||||
// #endif
|
||||
|
||||
// #ifndef WEB
|
||||
const showVerifyDeviceImpModel = (onClose: () => any = () => null) => {}
|
||||
export default showVerifyDeviceImpModel
|
||||
// #endif
|
||||
@@ -55,6 +55,32 @@ const actCancelStatusEnum = {
|
||||
"3": "已过期",
|
||||
}
|
||||
|
||||
const actCouponLimitTypeEnum = {
|
||||
"1": "活动期间一次",
|
||||
"2": "每天",
|
||||
"3": "每周",
|
||||
"4": "每月",
|
||||
"5": "每年",
|
||||
}
|
||||
|
||||
const actCouponTypeEnum = {
|
||||
"1": "满减券",
|
||||
"2": "折扣券",
|
||||
"3": "立减券",
|
||||
"4": "兑换券",
|
||||
}
|
||||
|
||||
// 用户活动状态
|
||||
const actUserReceiveEnum = {
|
||||
"1": "活动不在进行中",
|
||||
"2": "活动不存在",
|
||||
"3": "活动未开启",
|
||||
"4": "用户参加活动已达上限",
|
||||
"5": "用户不能参加此活动",
|
||||
"6": "其他错误",
|
||||
"99": "用户可以参加活动",
|
||||
}
|
||||
|
||||
export default {
|
||||
hardwareOrderStatusEnum,
|
||||
hardwareOrderTypeEnum,
|
||||
@@ -64,4 +90,7 @@ export default {
|
||||
hardwareRefundStatusEnum,
|
||||
carTypeEnum,
|
||||
actCancelStatusEnum,
|
||||
actCouponLimitTypeEnum,
|
||||
actCouponTypeEnum,
|
||||
actUserReceiveEnum,
|
||||
}
|
||||
+99
-100
@@ -1,103 +1,102 @@
|
||||
import presetWeapp from "unocss-preset-weapp";
|
||||
import {
|
||||
extractorAttributify,
|
||||
transformerClass,
|
||||
} from "unocss-preset-weapp/transformer";
|
||||
import { defineConfig } from "unocss"
|
||||
import { presetWeapp } from "unocss-preset-weapp"
|
||||
import { extractorAttributify, transformerClass } from "unocss-preset-weapp/transformer"
|
||||
|
||||
const { presetWeappAttributify, transformerAttributify } =
|
||||
extractorAttributify();
|
||||
const { presetWeappAttributify, transformerAttributify } = extractorAttributify()
|
||||
|
||||
export default {
|
||||
presets: [
|
||||
presetWeapp({
|
||||
whRpx: true,
|
||||
}),
|
||||
presetWeappAttributify(),
|
||||
],
|
||||
shortcuts: [
|
||||
{
|
||||
"border-base": "border border-gray-500_10",
|
||||
"flex-col-center": "flex flex-col justify-center items-center",
|
||||
"flex-row-center": "flex flex-row justify-center items-center",
|
||||
"flex-col": "flex flex-col",
|
||||
"flex-row": "flex flex-row",
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
colors: {
|
||||
blue: {
|
||||
DEFAULT: "#0094ff",
|
||||
},
|
||||
red: {
|
||||
DEFAULT: "#f63a36",
|
||||
},
|
||||
yellow: {
|
||||
DEFAULT: "#F2A817",
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: [
|
||||
[
|
||||
/^main-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 800,
|
||||
color: "#000",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^sub-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 500,
|
||||
color: "#333",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^second-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 500,
|
||||
color: "#999",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
"card",
|
||||
{
|
||||
"background-color": "white",
|
||||
"box-shadow": "0rpx 8rpx 26rpx -4rpx rgba(210,210,210,0.5)",
|
||||
"border-radius": "16rpx",
|
||||
},
|
||||
],
|
||||
[
|
||||
"shadow-main",
|
||||
{
|
||||
"box-shadow": "0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1)",
|
||||
},
|
||||
],
|
||||
[
|
||||
/^show-line$/,
|
||||
([, d]) => ({
|
||||
overflow: "hidden",
|
||||
"white-space": "nowrap",
|
||||
"text-overflow": "ellipsis",
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^show-line-(\d+)$/,
|
||||
([, d]) => ({
|
||||
display: "-webkit-box !important",
|
||||
overflow: "hidden",
|
||||
"text-overflow": "ellipsis !important",
|
||||
"word-break": "break-all",
|
||||
"-webkit-line-clamp": d,
|
||||
"-webkit-box-orient": "vertical !important",
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
transformers: [transformerAttributify(), transformerClass()],
|
||||
};
|
||||
content: {
|
||||
filesystem: ["src/**/*.{vue,js,ts,jsx,tsx}"],
|
||||
},
|
||||
presets: [
|
||||
presetWeapp({
|
||||
whRpx: true,
|
||||
}),
|
||||
presetWeappAttributify(),
|
||||
],
|
||||
transformers: [transformerAttributify(), transformerClass()],
|
||||
shortcuts: [
|
||||
{
|
||||
"border-base": "border border-gray-500_10",
|
||||
"flex-col-center": "flex flex-col justify-center items-center",
|
||||
"flex-row-center": "flex flex-row justify-center items-center",
|
||||
"flex-col": "flex flex-col",
|
||||
"flex-row": "flex flex-row",
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
colors: {
|
||||
blue: {
|
||||
DEFAULT: "#0094ff",
|
||||
},
|
||||
red: {
|
||||
DEFAULT: "#f63a36",
|
||||
},
|
||||
yellow: {
|
||||
DEFAULT: "#F2A817",
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: [
|
||||
[
|
||||
/^main-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 800,
|
||||
color: "#000",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^sub-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 500,
|
||||
color: "#333",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^second-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 500,
|
||||
color: "#999",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
"card",
|
||||
{
|
||||
"background-color": "white",
|
||||
"box-shadow": "0rpx 8rpx 26rpx -4rpx rgba(210,210,210,0.5)",
|
||||
"border-radius": "16rpx",
|
||||
},
|
||||
],
|
||||
[
|
||||
"shadow-main",
|
||||
{
|
||||
"box-shadow": "0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1)",
|
||||
},
|
||||
],
|
||||
[
|
||||
/^show-line$/,
|
||||
([, d]) => ({
|
||||
overflow: "hidden",
|
||||
"white-space": "nowrap",
|
||||
"text-overflow": "ellipsis",
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^show-line-(\d+)$/,
|
||||
([, d]) => ({
|
||||
display: "-webkit-box !important",
|
||||
overflow: "hidden",
|
||||
"text-overflow": "ellipsis !important",
|
||||
"word-break": "break-all",
|
||||
"-webkit-line-clamp": d,
|
||||
"-webkit-box-orient": "vertical !important",
|
||||
}),
|
||||
],
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user