From 690ff14f1f75bc163393762bfa66853fada905cd Mon Sep 17 00:00:00 2001 From: Megghy Date: Sat, 24 Feb 2024 12:02:46 +0800 Subject: [PATCH] allow give point directly --- src/Utils.ts | 7 +- .../manage/point/PointUserDetailCard.vue | 35 +++++---- src/views/manage/point/PointUserManage.vue | 78 ++++++++++++++++++- 3 files changed, 100 insertions(+), 20 deletions(-) diff --git a/src/Utils.ts b/src/Utils.ts index 3442dc4..1374175 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -127,12 +127,9 @@ export class GuidUtils { // 将GUID转换为数字 public static guidToLong(guid: string): number { - if (!GuidUtils.isGuidFromUserId(guid)) { - throw new Error('The provided GUID was not generated from a long value.') - } const buffer = GuidUtils.guidToBuffer(guid) const view = new DataView(buffer) - return Number(view.getBigUint64(8)) // 读取后8个字节的long值 + return Number(view.getBigUint64(8)) } // 辅助方法:将ArrayBuffer转换为GUID字符串 @@ -140,7 +137,7 @@ export class GuidUtils { const bytes = new Uint8Array(buffer) const guid = bytes.reduce((str, byte, idx) => { const pair = byte.toString(16).padStart(2, '0') - return str + (idx === 4 || idx === 6 || idx === 8 || idx === 10 ? '-' : '') + pair + return str + pair + (idx === 3 || idx === 5 || idx === 7 || idx === 9 ? '-' : '') }, '') return guid } diff --git a/src/views/manage/point/PointUserDetailCard.vue b/src/views/manage/point/PointUserDetailCard.vue index e2ce0bf..b6023d5 100644 --- a/src/views/manage/point/PointUserDetailCard.vue +++ b/src/views/manage/point/PointUserDetailCard.vue @@ -1,4 +1,5 @@ @@ -154,13 +196,19 @@ onMounted(async () => { 确定要恢复默认设置吗? + 只显示已认证用户 { + + + + 目标用户 + + + + 积分数量 + + + + 给予 + +