From 073797c3bf9304cb6e8bb0b2713f3ac62636b4b1 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 13 May 2026 17:16:21 +0800
Subject: [PATCH 1/4] =?UTF-8?q?feat:=E5=AF=8C=E6=96=87=E6=9C=AC=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 10 ++---
pnpm-lock.yaml | 43 ++++++++++++++++++++
src/pages/integrated/lostAndFound/detail.vue | 21 +++-------
src/pages/integrated/sysbanner/detail.vue | 6 +--
4 files changed, 54 insertions(+), 26 deletions(-)
diff --git a/.env b/.env
index 4d20a67..90b11a9 100644
--- a/.env
+++ b/.env
@@ -24,17 +24,17 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
# VITE_ZZD_CORP_ID=
# --------------------------- 开发环境 api地址 ----------------------------------
-# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
+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 = https://dzc-test-1.fy.takin.cc # 邓-本地
-VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
+# VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地
+# 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 # 域名线上
+VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
#VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上
#VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
-VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
+# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
# VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上
# --------------------------- 生产环境 api地址 ----------------------------------
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f6b52f4..538df35 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,9 @@ importers:
.:
dependencies:
+ '@babel/runtime':
+ specifier: ^7.26.0
+ version: 7.26.7
'@dcloudio/uni-app':
specifier: 3.0.0-4020920240930001
version: 3.0.0-4020920240930001(@dcloudio/types@3.4.14)(postcss@8.5.1)(rollup@4.34.2)(vue@3.5.13(typescript@4.9.5))
@@ -65,6 +68,9 @@ importers:
dayjs:
specifier: ^1.11.13
version: 1.11.13
+ gdt-jsapi:
+ specifier: ^1.9.55-beta.14
+ version: 1.9.55-beta.14
luch-request:
specifier: ^3.1.1
version: 3.1.1
@@ -80,6 +86,9 @@ importers:
radash:
specifier: ^12.1.0
version: 12.1.0
+ vconsole:
+ specifier: ^3.15.1
+ version: 3.15.1
vue:
specifier: ^3.3.11
version: 3.5.13(typescript@4.9.5)
@@ -1304,6 +1313,9 @@ packages:
'@polka/url@1.0.0-next.28':
resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
+ '@remax/mini-types@0.1.0':
+ resolution: {integrity: sha512-bVDcbUrp6p0PZwfS0xGVQS6k9f8B35BtZaYt/W/IGKh7VALYQ+tS2KcytLRmIJ/Vmohaw5ikIRN89I+frPdh4g==}
+
'@rollup/pluginutils@5.1.4':
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
engines: {node: '>=14.0.0'}
@@ -2071,6 +2083,10 @@ packages:
copy-anything@2.0.6:
resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}
+ copy-text-to-clipboard@3.2.2:
+ resolution: {integrity: sha512-T6SqyLd1iLuqPA90J5N4cTalrtovCySh58iiZDGJ6FGznbclKh4UI+FGacQSgFzwKG77W7XT5gwbVEbd9cIH1A==}
+ engines: {node: '>=12'}
+
core-js-compat@3.40.0:
resolution: {integrity: sha512-0XEDpr5y5mijvw8Lbc6E5AkjrHfp7eEoPlu36SWeAbcL8fn1G1ANe8DBlo2XoNN89oVpxWwOjYIPVzR4ZvsKCQ==}
@@ -2430,6 +2446,9 @@ packages:
function-bind@1.1.2:
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
+ gdt-jsapi@1.9.55-beta.14:
+ resolution: {integrity: sha512-OJ9EVvDGEVuBbV8LimUeMjjBgA2Fx9rChrzS1OyxZ1gKsc9pHp9T0hl1QeUfk2vZyOzK3EvAX4G8iUspy2XJRA==}
+
generic-names@4.0.0:
resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==}
@@ -3051,6 +3070,9 @@ packages:
muggle-string@0.3.1:
resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==}
+ mutation-observer@1.0.3:
+ resolution: {integrity: sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==}
+
nanoid@3.3.8:
resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -3872,6 +3894,9 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
+ vconsole@3.15.1:
+ resolution: {integrity: sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==}
+
vite@5.2.8:
resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -6066,6 +6091,8 @@ snapshots:
'@polka/url@1.0.0-next.28': {}
+ '@remax/mini-types@0.1.0': {}
+
'@rollup/pluginutils@5.1.4(rollup@4.34.2)':
dependencies:
'@types/estree': 1.0.6
@@ -6980,6 +7007,8 @@ snapshots:
dependencies:
is-what: 3.14.1
+ copy-text-to-clipboard@3.2.2: {}
+
core-js-compat@3.40.0:
dependencies:
browserslist: 4.24.4
@@ -7327,6 +7356,11 @@ snapshots:
function-bind@1.1.2: {}
+ gdt-jsapi@1.9.55-beta.14:
+ dependencies:
+ '@babel/runtime': 7.26.7
+ '@remax/mini-types': 0.1.0
+
generic-names@4.0.0:
dependencies:
loader-utils: 3.3.1
@@ -8151,6 +8185,8 @@ snapshots:
muggle-string@0.3.1: {}
+ mutation-observer@1.0.3: {}
+
nanoid@3.3.8: {}
natural-compare@1.4.0: {}
@@ -8981,6 +9017,13 @@ snapshots:
vary@1.1.2: {}
+ vconsole@3.15.1:
+ dependencies:
+ '@babel/runtime': 7.26.7
+ copy-text-to-clipboard: 3.2.2
+ core-js: 3.40.0
+ mutation-observer: 1.0.3
+
vite@5.2.8(@types/node@18.19.75)(less@4.3.0)(sass@1.71.1)(terser@5.37.0):
dependencies:
esbuild: 0.20.2
diff --git a/src/pages/integrated/lostAndFound/detail.vue b/src/pages/integrated/lostAndFound/detail.vue
index e0e68fd..e2fe667 100644
--- a/src/pages/integrated/lostAndFound/detail.vue
+++ b/src/pages/integrated/lostAndFound/detail.vue
@@ -13,14 +13,8 @@
-
+
@@ -95,8 +89,8 @@ const imageList = computed(() => {
const rawList = Array.isArray(imgs)
? imgs
: imgs
- .split(',')
- .map((item) => item.trim())
+ .split(',')
+ .map((item) => item.trim())
return rawList
.map((item) => toAbsoluteUrl(item))
@@ -106,11 +100,7 @@ const imageList = computed(() => {
const descriptionNodes = computed(() => {
const desc = detail.value?.description
if (!desc) return ''
- return desc.replace(/
]*src=["']([^"']+)["']/gi, (match, src) => {
- const fullSrc = toAbsoluteUrl(src)
- if (!fullSrc) return match
- return match.replace(src, fullSrc)
- })
+ return desc?.replaceAll(`
{
@@ -274,4 +264,3 @@ onLoad((options: Record) => {
white-space: pre-wrap;
}
-
diff --git a/src/pages/integrated/sysbanner/detail.vue b/src/pages/integrated/sysbanner/detail.vue
index 6099e12..d60b0c7 100644
--- a/src/pages/integrated/sysbanner/detail.vue
+++ b/src/pages/integrated/sysbanner/detail.vue
@@ -31,11 +31,7 @@ const toAbsoluteUrl = (url?: string | null) => {
const richTextNodes = computed(() => {
const html = detail.value.richTextContent
if (!html) return ""
- return html.replace(/
]*src=["']([^"']+)["']/gi, (match, src) => {
- const fullSrc = toAbsoluteUrl(src)
- if (!fullSrc) return match
- return match.replace(src, fullSrc)
- })
+ return html?.replaceAll(`
{
From e4f6e32c57c49f4f050b54af300a44bea34a62c2 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Tue, 26 May 2026 18:24:41 +0800
Subject: [PATCH 2/4] =?UTF-8?q?feat:=E6=94=AF=E4=BB=98=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 8 +-
src/pages/merchant/components/coupon-card.vue | 48 +++--
src/pages/merchant/merchant-activity.vue | 88 ++++++--
src/pages/merchant/my-act-list.vue | 20 +-
.../pay/components/select-coupon-card.vue | 193 ++++++++++++++++++
src/pages/pay/scanPay.vue | 153 ++++++++++++--
src/pages/tabbar/index.vue | 2 +-
src/pages/tabbar/order.vue | 9 +-
src/sheep/api/act-coupon.ts | 9 +
src/sheep/constant/service-enum.ts | 1 +
10 files changed, 474 insertions(+), 57 deletions(-)
create mode 100644 src/pages/pay/components/select-coupon-card.vue
diff --git a/.env b/.env
index 90b11a9..09f6da3 100644
--- a/.env
+++ b/.env
@@ -24,17 +24,17 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
# VITE_ZZD_CORP_ID=
# --------------------------- 开发环境 api地址 ----------------------------------
-VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
+# 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 = https://dzc-test-1.fy.takin.cc # 邓-本地
-# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
+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 # 域名线上
+# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
#VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上
#VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
-# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
+VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
# VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上
# --------------------------- 生产环境 api地址 ----------------------------------
diff --git a/src/pages/merchant/components/coupon-card.vue b/src/pages/merchant/components/coupon-card.vue
index 229d8de..27051f8 100644
--- a/src/pages/merchant/components/coupon-card.vue
+++ b/src/pages/merchant/components/coupon-card.vue
@@ -2,19 +2,25 @@
import { reactive, ref, computed } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
+import { hooks, router } from "@/sheep"
import { serviceEnum } from "@@/constant"
const { actCouponTypeEnum } = serviceEnum
-const emit = defineEmits(["doVisibleQrcode"])
+const emit = defineEmits(["doVisibleQrcode", "doUse"])
-const props = withDefaults(defineProps<{ detail: any }>(), {
+const props = withDefaults(defineProps<{ mode?: 'list' | 'select', detail: any }>(), {
+ mode: "list",
detail: {},
})
const doVisibleQrcode = () => {
emit("doVisibleQrcode", { type: 'ACT_COUPON', detail: props.detail })
}
+
+const doUse = () => {
+ emit("doUse", { type: 'ACT_COUPON', detail: props.detail })
+}
@@ -36,17 +42,23 @@ const doVisibleQrcode = () => {
-
- ¥
- {{ detail.faceValue }}
+
+
+ 立减
+ {{ detail.faceValue }}%
+
+
+ ¥
+ {{ hooks.useMoney(detail.faceValue) }}
+
{{ detail.couponName }}
- 满{{ detail.minPoint }}可用
+ 满{{ hooks.useMoney(detail.minPoint) }}可用
+ {{ actCouponTypeEnum[detail.couponType] }}
- {{ actCouponTypeEnum[detail.couponType] }}
在{{ detail.startTime }}至{{ detail.endTime }}时间段使用
@@ -58,10 +70,18 @@ const doVisibleQrcode = () => {
-
- 核销码
- 已使用
- 已过期
+
+
+
+ 核销码
+ 去使用
+
+ 已使用
+ 已过期
+
+
+ 使用
+
@@ -119,7 +139,7 @@ const doVisibleQrcode = () => {
}
.amount {
- font-size: 48rpx;
+ font-size: 28rpx;
font-weight: bold;
margin: 0 8rpx 0 2rpx;
line-height: 1;
@@ -136,6 +156,8 @@ const doVisibleQrcode = () => {
}
.condition {
+ display: flex;
+ align-items: center;
font-size: 24rpx;
color: #0094ff;
opacity: 0.8;
@@ -190,7 +212,7 @@ const doVisibleQrcode = () => {
/* 右侧按钮区 */
.coupon-right {
- width: 160rpx;
+ width: 140rpx;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/pages/merchant/merchant-activity.vue b/src/pages/merchant/merchant-activity.vue
index 4a94024..6efbaa9 100644
--- a/src/pages/merchant/merchant-activity.vue
+++ b/src/pages/merchant/merchant-activity.vue
@@ -30,24 +30,39 @@
class="card relative rounded-lb-0! rounded-rb-0! w-full activity-card overflow-hidden">
{{ actCouponTypeEnum[state.actDetail.type] }}
- {{ state.actDetail.name }}
-
-
- {{ state.actDetail.validStartTime }}
- ~
- {{ state.actDetail.validEndTime }}
-
+ {{ state.actDetail.name }}
+
+
+ 剩余
+ {{ state.actDetail.surplusCount }}
+ /
+ {{ state.actDetail.totalCount }}
+ 张
+
+
+
+
+ 满{{ hooks.useMoney(state.actDetail.minPoint) }}元,
+
+ 立减{{ state.actDetail.faceValue }}%
+
+
+
+ 满减{{ hooks.useMoney(state.actDetail.faceValue) }}元
+
+
+ 立减{{ hooks.useMoney(state.actDetail.faceValue) }}元
-
-
+
+
领取后请在
{{ state.actDetail.validStartTime }}
~
{{ state.actDetail.validEndTime }}
时间段内使用
-
+
领取后请在
{{ state.actDetail.validDays }}
天内使用
@@ -244,18 +259,10 @@ const modifyUserClose = () => {
background-image: url("../../static/page/activity-card-bg.png");
background-repeat: no-repeat;
background-size: contain;
- background-position: 150%;
+ background-position: 130%;
background-color: #1879ff77;
}
-.activity-sr-card {
- /* background-image: url("../../static/page/act_li_quan.jpg");
- background-repeat: no-repeat;
- background-size: contain;
- background-position: 150%;
- background-color: red; */
-}
-
.ribbon {
width: 160rpx;
height: 40rpx;
@@ -268,4 +275,47 @@ const modifyUserClose = () => {
color: #fff;
font-size: 24rpx;
}
+
+.coupon-stock-badge {
+ display: flex;
+ align-items: center;
+ padding: 8rpx 18rpx;
+ border-radius: 9999rpx;
+ background: rgba(238, 238, 238, 0.28);
+ backdrop-filter: blur(2px);
+ color: #fff;
+}
+
+.coupon-stock-dot {
+ width: 12rpx;
+ height: 12rpx;
+ margin-right: 10rpx;
+ border-radius: 9999rpx;
+ background: #0094ff;
+}
+
+.coupon-stock-label,
+.coupon-stock-unit,
+.coupon-stock-split,
+.coupon-stock-total {
+ font-size: 24rpx;
+ line-height: 1;
+}
+
+.coupon-stock-value {
+ margin: 0 4rpx 0 8rpx;
+ font-size: 24rpx;
+ font-weight: 700;
+ line-height: 1;
+}
+
+.coupon-stock-total {
+ margin-left: 4rpx;
+ opacity: 0.9;
+}
+
+.coupon-stock-unit {
+ margin-left: 6rpx;
+ opacity: 0.9;
+}
diff --git a/src/pages/merchant/my-act-list.vue b/src/pages/merchant/my-act-list.vue
index 060d009..3786bd6 100644
--- a/src/pages/merchant/my-act-list.vue
+++ b/src/pages/merchant/my-act-list.vue
@@ -18,6 +18,8 @@ import CouponCard from "./components/coupon-card.vue"
const { actCouponTypeEnum } = serviceEnum
+const { scanCodeAction, processUrlScanResult, processBase64ScanResult } = hooks.useScanCode(false)
+
const pageRef = ref(null)
const showQrCodeDialog = ref(false)
@@ -70,6 +72,22 @@ const doTab = (e: any) => {
getUserTotal()
}
+// 去使用
+const doUse = async (detail: any) => {
+ const { type, detail: actDetail } = detail
+ console.log("去使用:", type, actDetail);
+ const scanResult = await scanCodeAction()
+ if (!scanResult) return uni.showToast({ title: "扫码错误", icon: "none" })
+ // 判断扫码结果
+ if (scanResult.startsWith("http")) {
+ // 扫码结果是url链接
+ processUrlScanResult(scanResult.replace("/#", ""))
+ } else {
+ // 扫码结果是base64字符串
+ processBase64ScanResult(scanResult)
+ }
+}
+
const doVisibleQrcode = async (detail: any) => {
const { type, detail: actDetail } = detail
console.log("生成二维码:", type, actDetail);
@@ -155,7 +173,7 @@ const genVerificationCode = async (params: Record) => {
+ @do-visible-qrcode="doVisibleQrcode" @doUse="doUse" />
+import { hooks } from "@/sheep"
+
+const emit = defineEmits(["doSelect"])
+
+const props = withDefaults(defineProps<{ selectId?: any, detail: any, disabled?: boolean }>(), {
+ selectId: null,
+ detail: {},
+ disabled: false,
+})
+
+const doSelect = () => {
+ if (props.disabled) return
+ emit("doSelect", { type: 'ACT_COUPON', detail: props.detail })
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 立减
+ {{ detail.faceValue }}%
+
+
+ ¥
+ {{ hooks.useMoney(detail.faceValue) }}
+
+
+ {{ detail.couponName }}
+
+
+ 满{{ hooks.useMoney(detail.minPoint) }}可用
+
+
+
+
+
+
+
+
+
+
+
+ {{ disabled ? "不可用" : "使用" }}
+
+
+
+
+
diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue
index 7ed7401..e1223df 100644
--- a/src/pages/pay/scanPay.vue
+++ b/src/pages/pay/scanPay.vue
@@ -1,24 +1,33 @@
-
-
+
+
{{ scanPayState.mchName }}
-
-
- ¥
- {{ displayAmount }}
+
+
+ ¥
+ {{ displayAmount }}
+
+
+
+ 已优惠 ¥{{ couponDiscountDisplay }}
+
+
+ 券后实付
+ ¥{{ couponPayableDisplay }}
+
+
+
+ {{ couponUnavailableText }}
+
-
选择支付钱包:
-
+
-
+
{{ v.walletTypeName }}
@@ -28,7 +37,14 @@
+
+ 选择优惠券:
+
+
+
支 付
+
@@ -36,17 +52,19 @@