From f954bbd145e357a5b38257a30334e046dc8d8137 Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Fri, 12 Dec 2025 10:32:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=A7=AF=E5=88=86=E9=94=81?=
=?UTF-8?q?=E5=AE=A2=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/my-components/my-footer-btn.vue | 1 +
http/api/market/point.js | 24 +++
pageMarket/points/components/productPage.vue | 2 +-
pageMarket/points/components/record.vue | 44 +++--
pageMarket/points/components/userRecord.vue | 147 +++++++++++++++
pageMarket/points/index.vue | 17 +-
pageMarket/points/userPointDetail.vue | 178 +++++++++++++++++++
pages.json | 7 +
8 files changed, 399 insertions(+), 21 deletions(-)
create mode 100644 pageMarket/points/components/userRecord.vue
create mode 100644 pageMarket/points/userPointDetail.vue
diff --git a/components/my-components/my-footer-btn.vue b/components/my-components/my-footer-btn.vue
index 02360e2..be1a74c 100644
--- a/components/my-components/my-footer-btn.vue
+++ b/components/my-components/my-footer-btn.vue
@@ -54,6 +54,7 @@ const numValue = computed(() => {
num = 0;
return num;
}
+ return num;
});
const emits = defineEmits(['confirm', 'cancel']);
diff --git a/http/api/market/point.js b/http/api/market/point.js
index b55bc86..ea94724 100644
--- a/http/api/market/point.js
+++ b/http/api/market/point.js
@@ -118,4 +118,28 @@ export function goodsRecordRejectRefund(data) {
method: "post",
data
})
+}
+
+/**
+ * 积分:获取用户所有门店下积分列表
+ * @param {Object} data
+ */
+export function pointUserPage(data) {
+ return request({
+ url: `${MARKET_URL}/admin/points/userPage`,
+ method: "GET",
+ data
+ })
+}
+
+/**
+ * 积分:积分详情
+ * @param {Object} data
+ */
+export function pointUserRecord(data) {
+ return request({
+ url: `${MARKET_URL}/admin/points/userRecord`,
+ method: "GET",
+ data
+ })
}
\ No newline at end of file
diff --git a/pageMarket/points/components/productPage.vue b/pageMarket/points/components/productPage.vue
index ff7cf50..354e00a 100644
--- a/pageMarket/points/components/productPage.vue
+++ b/pageMarket/points/components/productPage.vue
@@ -15,7 +15,7 @@
-
+
{{ item.goodsName }}
diff --git a/pageMarket/points/components/record.vue b/pageMarket/points/components/record.vue
index bfefe00..f23318d 100644
--- a/pageMarket/points/components/record.vue
+++ b/pageMarket/points/components/record.vue
@@ -20,7 +20,7 @@
-
+
{{ item.pointsGoodsName }}
@@ -176,28 +176,33 @@ function checkoutHandle(item) {
uni.showModal({
title: '注意',
content: `确认要核销吗?`,
- success: async (res) => {
- try {
- if (res.confirm) {
- uni.showLoading({
- title: '核销中...',
- mask: true
- });
- await goodsRecordCkecout(item.couponCode);
- goodsRecordPageAjax();
- uni.showToast({
- title: '已核销',
- icon: 'none'
- });
- }
- } catch (error) {
- console.log(error);
+ success: (res) => {
+ if (res.confirm) {
+ checkoutAjax(item.couponCode);
}
- uni.hideLoading();
}
});
}
+// 核销请求
+async function checkoutAjax(couponCode) {
+ try {
+ uni.showLoading({
+ title: '核销中...',
+ mask: true
+ });
+ await goodsRecordCkecout(couponCode);
+ goodsRecordPageAjax();
+ uni.showToast({
+ title: '已核销',
+ icon: 'none'
+ });
+ } catch (error) {
+ console.log(error);
+ }
+ uni.hideLoading();
+}
+
const refundLoading = ref(false);
const showRefundPopup = ref(false);
const refundForm = ref({
@@ -264,7 +269,8 @@ async function goodsRecordPageAjax(page = listData.page) {
defineExpose({
reachBottom,
- goodsRecordPageAjax
+ goodsRecordPageAjax,
+ checkoutAjax
});
onMounted(() => {
diff --git a/pageMarket/points/components/userRecord.vue b/pageMarket/points/components/userRecord.vue
new file mode 100644
index 0000000..0f147b3
--- /dev/null
+++ b/pageMarket/points/components/userRecord.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+ 用户ID:{{ item.userId }}
+
+
+
+
+
+ {{ item.nickName }}
+ {{ item.phone }}
+
+
+
+ 当前积分
+ {{ item.pointBalance }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/points/index.vue b/pageMarket/points/index.vue
index 6974ff4..13944f4 100644
--- a/pageMarket/points/index.vue
+++ b/pageMarket/points/index.vue
@@ -12,6 +12,7 @@
+
@@ -22,6 +23,7 @@
+
@@ -31,13 +33,15 @@ import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
import setting from './components/setting.vue';
import productPage from './components/productPage.vue';
import record from './components/record.vue';
+import userRecord from './components/userRecord.vue';
const settingRef = ref(null);
const productPageRef = ref(null);
const recordRef = ref(null);
+const userRecordRef = ref(null);
const headHeight = ref(0);
-const tabsActive = ref(2);
+const tabsActive = ref(3);
const tabs = ref([
{
value: 1,
@@ -71,6 +75,16 @@ function toAddProduct() {
});
}
+// 扫码核销
+function scanHandle() {
+ uni.scanCode({
+ success: (res) => {
+ console.log('扫码核销===', res.result);
+ recordRef.value.checkoutAjax(res.result);
+ }
+ });
+}
+
onReachBottom(() => {
switch (tabsActive.value) {
case 0:
@@ -82,6 +96,7 @@ onReachBottom(() => {
recordRef.value.reachBottom();
break;
case 3:
+ userRecordRef.value.reachBottom();
break;
default:
break;
diff --git a/pageMarket/points/userPointDetail.vue b/pageMarket/points/userPointDetail.vue
new file mode 100644
index 0000000..a242b6d
--- /dev/null
+++ b/pageMarket/points/userPointDetail.vue
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+ {{ item.content }}
+
+
+
+
+ {{ item.shopName }}
+ {{ item.createTime }}
+
+
+
+ {{ item.floatPoints }}
+ 变动后积分:{{ item.balancePoints }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 6d076e2..c50bde9 100644
--- a/pages.json
+++ b/pages.json
@@ -822,6 +822,13 @@
"style": {
"navigationBarTitleText": "添加商品"
}
+ },
+ {
+ "pageId": "PAGES_MARKET_POINTS_USER_POINT_DETAIL",
+ "path": "points/userPointDetail",
+ "style": {
+ "navigationBarTitleText": "查看明细"
+ }
}
]
},