diff --git a/.env.development b/.env.development
index 962b3b9..a7a5b3c 100644
--- a/.env.development
+++ b/.env.development
@@ -2,6 +2,6 @@ VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.gxwebsoft.com
VITE_SERVER_URL=https://gxtyzx-server.websoft.top/api
VITE_API_URL=https://gxtyzx-modules.websoft.top/api
-#VITE_THINK_URL=https://gxtyzx-api2.websoft.top/api
+VITE_THINK_URL=https://gxtyzx-api2.websoft.top/api
-VITE_THINK_URL=http://127.0.0.1:9099/api
+#VITE_THINK_URL=http://127.0.0.1:9099/api
diff --git a/.idea/AugmentWebviewStateStore.xml b/.idea/AugmentWebviewStateStore.xml
new file mode 100644
index 0000000..9a918c3
--- /dev/null
+++ b/.idea/AugmentWebviewStateStore.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml
index ae96833..f9d2690 100644
--- a/.idea/UniappTool.xml
+++ b/.idea/UniappTool.xml
@@ -4,11 +4,13 @@
+
+
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 1882325..279078b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -24,19 +24,25 @@ export default {
// 无感登录
// #ifdef MP-WEIXIN
// 1. 判断openid是否存在
- if(!uni.getStorageSync('openid')){
+ if (!uni.getStorageSync('openid')) {
uni.login({
success: (res) => {
loginByOpenId({
code: res.code
}).then((response) => {
- console.log(response,'登录成功')
- const openId = response.openId;
- this.openId = openId;
- uni.setStorageSync('uid',response.id);
- uni.setStorageSync('openid',openId);
- uni.setStorageSync('username',response.username);
- uni.setStorageSync('avatarUrl',response.avatarUrl);
+ console.log(response, '登录成功')
+ // const openId = response.openId;
+ // this.openId = openId;
+ // uni.setStorageSync('uid',response.id);
+ // uni.setStorageSync('openid',openId);
+ // uni.setStorageSync('username',response.username);
+ // uni.setStorageSync('avatarUrl',response.avatarUrl);
+ if (response.user.uid) {
+ uni.setStorageSync('access_token', response.access_token)
+ uni.setStorageSync('user_id', response.user.userId)
+ uni.setStorageSync('phone', response.user.phone)
+ uni.setStorageSync('uid', response.user.uid)
+ }
});
}
});
diff --git a/src/api/booking/userInvoice/index.ts b/src/api/booking/userInvoice/index.ts
index e64adfd..0ade0a8 100644
--- a/src/api/booking/userInvoice/index.ts
+++ b/src/api/booking/userInvoice/index.ts
@@ -120,6 +120,17 @@ export async function doInvoice(data: ThinkInvoice) {
return Promise.reject(new Error(res.data.message));
}
+export async function doInvoiceByList(data: ThinkInvoice) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-invoice/doInvoiceByList',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
/**
* 根据orderNo查询发票
diff --git a/src/api/shop/balanceChargeLog/index.ts b/src/api/shop/balanceChargeLog/index.ts
new file mode 100644
index 0000000..4a2def8
--- /dev/null
+++ b/src/api/shop/balanceChargeLog/index.ts
@@ -0,0 +1,50 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { BalanceChargeLog, BalanceChargeLogParam } from './model';
+import { THINK_API_URL } from '@/config/setting';
+
+/**
+ * 发起余额充值
+ */
+export async function rechargeBalance(data: BalanceChargeLog) {
+ const res = await request.post>(
+ THINK_API_URL + '/shop/balance-charge-log/recharge',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 分页查询余额充值记录
+ */
+export async function pageBalanceChargeLog(params: BalanceChargeLogParam) {
+ const res = await request.get>>(
+ THINK_API_URL + '/shop/balance-charge-log/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询余额充值记录列表
+ */
+export async function listBalanceChargeLog(params?: BalanceChargeLogParam) {
+ const res = await request.get>(
+ THINK_API_URL + '/shop/balance-charge-log',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/shop/balanceChargeLog/model/index.ts b/src/api/shop/balanceChargeLog/model/index.ts
new file mode 100644
index 0000000..ba6e803
--- /dev/null
+++ b/src/api/shop/balanceChargeLog/model/index.ts
@@ -0,0 +1,37 @@
+import type { PageParam } from '@/api';
+
+/**
+ *
+ */
+export interface BalanceChargeLog {
+ //
+ id?: number;
+ //
+ amount?: string;
+ //
+ orderNo?: string;
+ //
+ isPaid?: number;
+ //
+ paidNumber?: string;
+ //
+ userId?: number;
+ // 商城ID
+ tenantId?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+ //
+ remark?: string;
+ // 交易流水号
+ transactionId?: string;
+}
+
+/**
+ * 搜索条件
+ */
+export interface BalanceChargeLogParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/shop/userBalanceLog/model/index.ts b/src/api/shop/userBalanceLog/model/index.ts
new file mode 100644
index 0000000..13b7952
--- /dev/null
+++ b/src/api/shop/userBalanceLog/model/index.ts
@@ -0,0 +1,45 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 用户余额变动明细表
+ */
+export interface UserBalanceLog {
+ // 主键ID
+ logId?: number;
+ // 用户ID
+ userId?: number;
+ // 余额变动场景(0 用户充值 1用户消费 2管理员操作 3订单退款)
+ scene?: number;
+ // 变动金额
+ money?: string;
+ // 变动后余额
+ balance?: string;
+ // 管理员备注
+ remark?: string;
+ //
+ orderId?: number;
+ // 操作人ID
+ adminId?: number;
+ // 排序(数字越小越靠前)
+ sortNumber?: number;
+ // 备注
+ comments?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 注册时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 用户余额变动明细表搜索条件
+ */
+export interface UserBalanceLogParam extends PageParam {
+ logId?: number;
+ keywords?: string;
+}
diff --git a/src/api/system/file/index.ts b/src/api/system/file/index.ts
index a38530f..ac87e76 100644
--- a/src/api/system/file/index.ts
+++ b/src/api/system/file/index.ts
@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { FileRecord, FileRecordParam } from './model';
-import { FILE_SERVER, SERVER_API_URL } from '@/config/setting';
+import {FILE_SERVER, SERVER_API_URL, TENANT_ID, THINK_API_URL} from '@/config/setting';
import { getCache } from '@/api/system/cache';
import md5 from "md5";
import crypto from 'crypto-js';
@@ -218,4 +218,38 @@ export async function uploadOssByPath(filePath: string) {
error: (err) => reject(err)
})
})
-}
\ No newline at end of file
+}
+
+/**
+ * 上传人脸图片(返回 base64)
+ */
+export async function uploadFaceByPath(filePath: string): Promise {
+ return new Promise((resolve, reject) => {
+ const token = uni.getStorageSync('access_token');
+ uni.uploadFile({
+ url: THINK_API_URL + '/file/upload/face',
+ name: 'file',
+ filePath,
+ header: {
+ TenantId: TENANT_ID,
+ ...(token ? { Authorization: token } : {})
+ },
+ success: (res) => {
+ try {
+ const data =
+ typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
+ if (data?.code === 0) {
+ return resolve(data?.data ?? data?.message ?? data?.base64 ?? '');
+ }
+ return reject(new Error(data?.message || '上传失败'));
+ } catch (err) {
+ if (typeof res.data === 'string' && res.data) {
+ return resolve(res.data);
+ }
+ return reject(err);
+ }
+ },
+ fail: (err) => reject(err)
+ });
+ });
+}
diff --git a/src/api/think/thinkCardBalance/index.ts b/src/api/think/thinkCardBalance/index.ts
new file mode 100644
index 0000000..58f9b85
--- /dev/null
+++ b/src/api/think/thinkCardBalance/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkCardBalance, ThinkCardBalanceParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询卡余额记录
+ */
+export async function pageThinkCardBalance(params: ThinkCardBalanceParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/think/think-card-balance/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询卡余额记录列表
+ */
+export async function listThinkCardBalance(params?: ThinkCardBalanceParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-card-balance',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加卡余额记录
+ */
+export async function addThinkCardBalance(data: ThinkCardBalance) {
+ const res = await request.post>(
+ MODULES_API_URL + '/think/think-card-balance',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改卡余额记录
+ */
+export async function updateThinkCardBalance(data: ThinkCardBalance) {
+ const res = await request.put>(
+ MODULES_API_URL + '/think/think-card-balance',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除卡余额记录
+ */
+export async function removeThinkCardBalance(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-card-balance/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除卡余额记录
+ */
+export async function removeBatchThinkCardBalance(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-card-balance/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询卡余额记录
+ */
+export async function getThinkCardBalance(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-card-balance/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkCardBalance/model/index.ts b/src/api/think/thinkCardBalance/model/index.ts
new file mode 100644
index 0000000..d6015ec
--- /dev/null
+++ b/src/api/think/thinkCardBalance/model/index.ts
@@ -0,0 +1,31 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 卡余额记录
+ */
+export interface ThinkCardBalance {
+ //
+ id?: number;
+ //
+ cid?: number;
+ //
+ vid?: number;
+ //
+ uid?: number;
+ //
+ balance?: string;
+ // 每次减少金额
+ reduceEach?: string;
+ // 下单时间
+ createTime?: number;
+ //
+ updateTime?: number;
+}
+
+/**
+ * 卡余额记录搜索条件
+ */
+export interface ThinkCardBalanceParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/think/thinkFtpCheckBill/index.ts b/src/api/think/thinkFtpCheckBill/index.ts
new file mode 100644
index 0000000..1348919
--- /dev/null
+++ b/src/api/think/thinkFtpCheckBill/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkFtpCheckBill, ThinkFtpCheckBillParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询
+ */
+export async function pageThinkFtpCheckBill(params: ThinkFtpCheckBillParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/think/think-ftp-check-bill/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询列表
+ */
+export async function listThinkFtpCheckBill(params?: ThinkFtpCheckBillParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-ftp-check-bill',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加
+ */
+export async function addThinkFtpCheckBill(data: ThinkFtpCheckBill) {
+ const res = await request.post>(
+ MODULES_API_URL + '/think/think-ftp-check-bill',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改
+ */
+export async function updateThinkFtpCheckBill(data: ThinkFtpCheckBill) {
+ const res = await request.put>(
+ MODULES_API_URL + '/think/think-ftp-check-bill',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function removeThinkFtpCheckBill(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-ftp-check-bill/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除
+ */
+export async function removeBatchThinkFtpCheckBill(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-ftp-check-bill/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询
+ */
+export async function getThinkFtpCheckBill(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-ftp-check-bill/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkFtpCheckBill/model/index.ts b/src/api/think/thinkFtpCheckBill/model/index.ts
new file mode 100644
index 0000000..6e0dc2d
--- /dev/null
+++ b/src/api/think/thinkFtpCheckBill/model/index.ts
@@ -0,0 +1,53 @@
+import type { PageParam } from '@/api';
+
+/**
+ *
+ */
+export interface ThinkFtpCheckBill {
+ //
+ id?: number;
+ // 终端号
+ deviceNo?: string;
+ // 卡号
+ cardNo?: string;
+ //
+ amount?: string;
+ // 结算金额
+ settleAmount?: string;
+ // 手续费
+ feeAmount?: string;
+ // 实际支付金额
+ paidAmount?: string;
+ // 参考号
+ refNo?: string;
+ // 流水号
+ flowNo?: string;
+ // 卡类型
+ cardType?: string;
+ // 发卡行
+ postCardType?: string;
+ // 支付方式
+ payType?: string;
+ // 银商订单号
+ orderNo?: string;
+ //
+ payTime?: string;
+ // 租户id
+ tenantId?: number;
+ // 状态, 0已发布, 1待审核 2已驳回 3违规内容
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 搜索条件
+ */
+export interface ThinkFtpCheckBillParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/think/thinkGate/index.ts b/src/api/think/thinkGate/index.ts
index 53aac42..c15c1e3 100644
--- a/src/api/think/thinkGate/index.ts
+++ b/src/api/think/thinkGate/index.ts
@@ -104,3 +104,17 @@ export async function getThinkGate(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
+
+/**
+ * 人脸检测
+ */
+export async function detectFace(data: { personPhoto: string }) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/gate-control/detectFace',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkInvoice/index.ts b/src/api/think/thinkInvoice/index.ts
index 028bdb2..44248eb 100644
--- a/src/api/think/thinkInvoice/index.ts
+++ b/src/api/think/thinkInvoice/index.ts
@@ -104,3 +104,13 @@ export async function getThinkInvoice(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
+
+export async function getThinkInvoiceRes(data: ThinkInvoice) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-invoice/getRes', data
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkOrder/index.ts b/src/api/think/thinkOrder/index.ts
index f881b63..573ae3a 100644
--- a/src/api/think/thinkOrder/index.ts
+++ b/src/api/think/thinkOrder/index.ts
@@ -134,3 +134,13 @@ export async function thinkOrderCheckCode(data: ThinkOrder) {
}
return Promise.reject(new Error(res.data.message));
}
+
+export async function thinkOrderSetInterval() {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-order/setInterval'
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkOrderOffCheck/index.ts b/src/api/think/thinkOrderOffCheck/index.ts
new file mode 100644
index 0000000..24fbde2
--- /dev/null
+++ b/src/api/think/thinkOrderOffCheck/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkOrderOffCheck, ThinkOrderOffCheckParam } from './model';
+import { THINK_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询折扣审核
+ */
+export async function pageThinkOrderOffCheck(params: ThinkOrderOffCheckParam) {
+ const res = await request.get>>(
+ THINK_API_URL + '/think/think-order-off-check/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询折扣审核列表
+ */
+export async function listThinkOrderOffCheck(params?: ThinkOrderOffCheckParam) {
+ const res = await request.get>(
+ THINK_API_URL + '/think/think-order-off-check',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加折扣审核
+ */
+export async function addThinkOrderOffCheck(data: ThinkOrderOffCheck) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-order-off-check',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改折扣审核
+ */
+export async function updateThinkOrderOffCheck(data: ThinkOrderOffCheck) {
+ const res = await request.put>(
+ THINK_API_URL + '/think/think-order-off-check',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除折扣审核
+ */
+export async function removeThinkOrderOffCheck(id?: number) {
+ const res = await request.delete>(
+ THINK_API_URL + '/think/think-order-off-check/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除折扣审核
+ */
+export async function removeBatchThinkOrderOffCheck(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ THINK_API_URL + '/think/think-order-off-check/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询折扣审核
+ */
+export async function getThinkOrderOffCheck(id: number) {
+ const res = await request.get>(
+ THINK_API_URL + '/think/think-order-off-check/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkOrderOffCheck/model/index.ts b/src/api/think/thinkOrderOffCheck/model/index.ts
new file mode 100644
index 0000000..2cf132f
--- /dev/null
+++ b/src/api/think/thinkOrderOffCheck/model/index.ts
@@ -0,0 +1,43 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 折扣审核
+ */
+export interface ThinkOrderOffCheck {
+ //
+ id?: number;
+ //
+ oid?: number;
+ //
+ userId?: number;
+ // 原价
+ originAmount?: string;
+ // 折扣
+ rate?: string;
+ // 折后价
+ offAmount?: string;
+ // 申请原因
+ reqReason?: string;
+ // 拒绝原因
+ refuseReason?: string;
+ // 审核人
+ checkUid?: number;
+ // 租户id
+ tenantId?: number;
+ // 状态, 0已发布, 1待审核 2已驳回 3违规内容
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 创建时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * 折扣审核搜索条件
+ */
+export interface ThinkOrderOffCheckParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/think/thinkSmallRecharge/index.ts b/src/api/think/thinkSmallRecharge/index.ts
new file mode 100644
index 0000000..8f1eff9
--- /dev/null
+++ b/src/api/think/thinkSmallRecharge/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkSmallRecharge, ThinkSmallRechargeParam } from './model';
+import { THINK_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询
+ */
+export async function pageThinkSmallRecharge(params: ThinkSmallRechargeParam) {
+ const res = await request.get>>(
+ THINK_API_URL + '/think/think-small-recharge/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询列表
+ */
+export async function listThinkSmallRecharge(params?: ThinkSmallRechargeParam) {
+ const res = await request.get>(
+ THINK_API_URL + '/think/think-small-recharge',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加
+ */
+export async function addThinkSmallRecharge(data: ThinkSmallRecharge) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-small-recharge',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改
+ */
+export async function updateThinkSmallRecharge(data: ThinkSmallRecharge) {
+ const res = await request.put>(
+ THINK_API_URL + '/think/think-small-recharge',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function removeThinkSmallRecharge(id?: number) {
+ const res = await request.delete>(
+ THINK_API_URL + '/think/think-small-recharge/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除
+ */
+export async function removeBatchThinkSmallRecharge(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ THINK_API_URL + '/think/think-small-recharge/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询
+ */
+export async function getThinkSmallRecharge(id: number) {
+ const res = await request.get>(
+ THINK_API_URL + '/think/think-small-recharge/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkSmallRecharge/model/index.ts b/src/api/think/thinkSmallRecharge/model/index.ts
new file mode 100644
index 0000000..c38bb9a
--- /dev/null
+++ b/src/api/think/thinkSmallRecharge/model/index.ts
@@ -0,0 +1,29 @@
+import type { PageParam } from '@/api';
+
+/**
+ *
+ */
+export interface ThinkSmallRecharge {
+ //
+ id?: number;
+ //
+ cid?: number;
+ //
+ vid?: number;
+ //
+ uid?: number;
+ //
+ amount?: string;
+ // 下单时间
+ createTime?: number;
+ //
+ updateTime?: number;
+}
+
+/**
+ * 搜索条件
+ */
+export interface ThinkSmallRechargeParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/think/thinkUserInAccess/index.ts b/src/api/think/thinkUserInAccess/index.ts
new file mode 100644
index 0000000..74087e4
--- /dev/null
+++ b/src/api/think/thinkUserInAccess/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkUserInAccess, ThinkUserInAccessParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询能刷脸开闸的用户列表
+ */
+export async function pageThinkUserInAccess(params: ThinkUserInAccessParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/think/think-user-in-access/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询能刷脸开闸的用户列表列表
+ */
+export async function listThinkUserInAccess(params?: ThinkUserInAccessParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-user-in-access',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加能刷脸开闸的用户列表
+ */
+export async function addThinkUserInAccess(data: ThinkUserInAccess) {
+ const res = await request.post>(
+ MODULES_API_URL + '/think/think-user-in-access',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改能刷脸开闸的用户列表
+ */
+export async function updateThinkUserInAccess(data: ThinkUserInAccess) {
+ const res = await request.put>(
+ MODULES_API_URL + '/think/think-user-in-access',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除能刷脸开闸的用户列表
+ */
+export async function removeThinkUserInAccess(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-user-in-access/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除能刷脸开闸的用户列表
+ */
+export async function removeBatchThinkUserInAccess(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-user-in-access/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询能刷脸开闸的用户列表
+ */
+export async function getThinkUserInAccess(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-user-in-access/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkUserInAccess/model/index.ts b/src/api/think/thinkUserInAccess/model/index.ts
new file mode 100644
index 0000000..939d183
--- /dev/null
+++ b/src/api/think/thinkUserInAccess/model/index.ts
@@ -0,0 +1,19 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 能刷脸开闸的用户列表
+ */
+export interface ThinkUserInAccess {
+ //
+ id?: number;
+ //
+ uid?: number;
+}
+
+/**
+ * 能刷脸开闸的用户列表搜索条件
+ */
+export interface ThinkUserInAccessParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/think/thinkUsers/index.ts b/src/api/think/thinkUsers/index.ts
index 96d551c..68dddaa 100644
--- a/src/api/think/thinkUsers/index.ts
+++ b/src/api/think/thinkUsers/index.ts
@@ -5,7 +5,7 @@ import {THINK_API_URL} from '@/config/setting';
// 微信小程序登录
export async function loginByOpenId(data: any) {
- const res = await request.post>(THINK_API_URL + '/think/think-users/loginByOpenId', data);
+ const res = await request.post>('/wx-login/loginByOpenId', data);
if (res.data.code === 0) {
return res.data.data;
}
@@ -121,3 +121,17 @@ export async function getThinkUsers(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
+
+/**
+ * 设置人脸已上传
+ */
+export async function setHasFace(data: { uid: number | string; personPhoto: string }) {
+ const res = await request.post>(
+ THINK_API_URL + '/think/think-users/setHasFace',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.data ?? res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkUsersVipBuyLog/index.ts b/src/api/think/thinkUsersVipBuyLog/index.ts
new file mode 100644
index 0000000..21f5025
--- /dev/null
+++ b/src/api/think/thinkUsersVipBuyLog/index.ts
@@ -0,0 +1,106 @@
+import request from '@/utils/request';
+import type { ApiResult, PageResult } from '@/api';
+import type { ThinkUsersVipBuyLog, ThinkUsersVipBuyLogParam } from './model';
+import { MODULES_API_URL } from '@/config/setting';
+
+/**
+ * 分页查询Vip购卡记录
+ */
+export async function pageThinkUsersVipBuyLog(params: ThinkUsersVipBuyLogParam) {
+ const res = await request.get>>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询Vip购卡记录列表
+ */
+export async function listThinkUsersVipBuyLog(params?: ThinkUsersVipBuyLogParam) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加Vip购卡记录
+ */
+export async function addThinkUsersVipBuyLog(data: ThinkUsersVipBuyLog) {
+ const res = await request.post>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改Vip购卡记录
+ */
+export async function updateThinkUsersVipBuyLog(data: ThinkUsersVipBuyLog) {
+ const res = await request.put>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除Vip购卡记录
+ */
+export async function removeThinkUsersVipBuyLog(id?: number) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除Vip购卡记录
+ */
+export async function removeBatchThinkUsersVipBuyLog(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询Vip购卡记录
+ */
+export async function getThinkUsersVipBuyLog(id: number) {
+ const res = await request.get>(
+ MODULES_API_URL + '/think/think-users-vip-buy-log/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/think/thinkUsersVipBuyLog/model/index.ts b/src/api/think/thinkUsersVipBuyLog/model/index.ts
new file mode 100644
index 0000000..e869248
--- /dev/null
+++ b/src/api/think/thinkUsersVipBuyLog/model/index.ts
@@ -0,0 +1,39 @@
+import type { PageParam } from '@/api';
+
+/**
+ * Vip购卡记录
+ */
+export interface ThinkUsersVipBuyLog {
+ //
+ id?: number;
+ //
+ uid?: number;
+ //
+ orderNumber?: string;
+ //
+ wechetNumber?: string;
+ //
+ amount?: string;
+ //
+ payStatus?: number;
+ //
+ payTime?: string;
+ // 状态, 0正常, 1冻结
+ status?: number;
+ // 是否删除, 0否, 1是
+ deleted?: number;
+ // 租户id
+ tenantId?: number;
+ // 注册时间
+ createTime?: string;
+ // 修改时间
+ updateTime?: string;
+}
+
+/**
+ * Vip购卡记录搜索条件
+ */
+export interface ThinkUsersVipBuyLogParam extends PageParam {
+ id?: number;
+ keywords?: string;
+}
diff --git a/src/api/user/balance-log/index.ts b/src/api/user/balance-log/index.ts
index b11fd4f..c20a26b 100644
--- a/src/api/user/balance-log/index.ts
+++ b/src/api/user/balance-log/index.ts
@@ -1,13 +1,13 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserBalanceLog, UserBalanceLogParam } from './model';
-import { MODULES_API_URL } from '../../../config/setting';
+import { THINK_API_URL } from '../../../config/setting';
/**
* 分页查询余额明细
*/
export async function pageUserBalanceLog(params: UserBalanceLogParam) {
- const res = await request.get>>(MODULES_API_URL + '/shop/user-balance-log/page', { params });
+ const res = await request.get>>(THINK_API_URL + '/shop/user-balance-log/page', { params });
if (res.data.code === 0) {
return res.data.data;
}
@@ -18,7 +18,7 @@ export async function pageUserBalanceLog(params: UserBalanceLogParam) {
* 查询余额明细列表
*/
export async function listUserBalanceLog(params?: UserBalanceLogParam) {
- const res = await request.get>(MODULES_API_URL + '/shop/user-balance-log', {
+ const res = await request.get>(THINK_API_URL + '/shop/user-balance-log', {
params
});
if (res.data.code === 0 && res.data.data) {
@@ -31,7 +31,7 @@ export async function listUserBalanceLog(params?: UserBalanceLogParam) {
* 根据id查询余额明细
*/
export async function getUserBalanceLog(id: number) {
- const res = await request.get>(MODULES_API_URL + '/shop/user-balance-log/' + id);
+ const res = await request.get>(THINK_API_URL + '/shop/user-balance-log/' + id);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
@@ -42,7 +42,7 @@ export async function getUserBalanceLog(id: number) {
* 添加余额明细
*/
export async function addUserBalanceLog(data: UserBalanceLog) {
- const res = await request.post>(MODULES_API_URL + '/shop/user-balance-log', data);
+ const res = await request.post>(THINK_API_URL + '/shop/user-balance-log', data);
if (res.data.code === 0) {
return res.data.message;
}
@@ -53,7 +53,7 @@ export async function addUserBalanceLog(data: UserBalanceLog) {
* 修改余额明细
*/
export async function updateUserBalanceLog(data: UserBalanceLog) {
- const res = await request.put>(MODULES_API_URL + '/shop/user-balance-log', data);
+ const res = await request.put>(THINK_API_URL + '/shop/user-balance-log', data);
if (res.data.code === 0) {
return res.data.message;
}
@@ -64,7 +64,7 @@ export async function updateUserBalanceLog(data: UserBalanceLog) {
* 删除余额明细
*/
export async function removeUserBalanceLog(id?: number) {
- const res = await request.delete>(MODULES_API_URL + '/shop/user-balance-log/' + id);
+ const res = await request.delete>(THINK_API_URL + '/shop/user-balance-log/' + id);
if (res.data.code === 0) {
return res.data.message;
}
@@ -75,7 +75,7 @@ export async function removeUserBalanceLog(id?: number) {
* 批量删除余额明细
*/
export async function removeUserBalanceLogs(data: (number | undefined)[]) {
- const res = await request.delete>(MODULES_API_URL + '/shop/user-balance-log/batch', {
+ const res = await request.delete>(THINK_API_URL + '/shop/user-balance-log/batch', {
data
});
if (res.data.code === 0) {
diff --git a/src/api/user/balance-log/model/index.ts b/src/api/user/balance-log/model/index.ts
index 987885f..e47da5e 100644
--- a/src/api/user/balance-log/model/index.ts
+++ b/src/api/user/balance-log/model/index.ts
@@ -8,6 +8,7 @@ export interface UserBalanceLog {
userId?: number;
scene?: number;
money?: string;
+ balance?: string;
describe?: string;
remark?: string;
sortNumber?: number;
diff --git a/src/package/booking/checkout.vue b/src/package/booking/checkout.vue
index b0857ec..911a805 100644
--- a/src/package/booking/checkout.vue
+++ b/src/package/booking/checkout.vue
@@ -49,24 +49,6 @@
-
-
- 18:00 - 20:00
-
-
- 1号场地
- 580元
-
-
- 2号场地
- 580元
-
-
- 3号场地
- 580元
-
-
-
@@ -169,6 +151,7 @@ export default {
where: {},
// 时段
periodList: [],
+ periodListOrigin: [],
// 场地
fieldList: [],
// 选中的场地
@@ -199,9 +182,10 @@ export default {
const app = this
let totalPrice = 0;
app.selection.map(d => {
- if (app.isHalf === 1) totalPrice += d.halfPrice
- else totalPrice += d.price
+ if (app.isHalf === 1) totalPrice += parseFloat(d.halfPrice)
+ else totalPrice += parseFloat(d.price)
})
+ totalPrice = totalPrice.toFixed(2)
carStore.totalPrice = totalPrice
// console.log('totalPrice: ', totalPrice);
return totalPrice;
@@ -264,6 +248,7 @@ export default {
this.next7day = []
let day = 7
if (this.merchantId === 37) day = 1
+ // else if (this.merchantId === 28) day = 30
for (let i = 0; i < day; i++) {
const day = dayjs().add(i, 'day')
this.next7day.push({
@@ -293,18 +278,26 @@ export default {
const weekList = JSON.parse(item.week)
if (parseInt(this.merchantId) === 37) {
const today = dayjs().format('YYYY-MM-DD')
- if ((dayjs().isBefore(dayjs(today + ' 21:00:00')) || dayjs(this.dateTime).isAfter(dayjs())) && weekList.includes(this.week)) this.periodList.push(item)
+ if ((dayjs().isBefore(dayjs(today + ' 21:30:00')) || dayjs(this.dateTime).isAfter(dayjs())) && weekList.includes(this.week)) this.periodList.push(item)
} else {
// console.log(this.dateTime + ' ' + item.timePeriod.split(' - ')[0])
// console.log(dayjs().isBefore(dayjs(this.dateTime + ' ' + item.timePeriod.split(' - ')[0])))
if (weekList.includes(this.week) && dayjs().isBefore(dayjs(this.dateTime + ' ' + item.timePeriod.split(' - ')[0]))) this.periodList.push(item)
}
})
- const month = dayjs().format('YYYY-MM')
- this.periodList.map(item => {
+ console.log('this.periodList', this.periodList)
+ // console.log(this.dateTime)
+ const month = dayjs(this.dateTime).format('YYYY-MM')
+ this.periodListOrigin = JSON.parse(JSON.stringify(this.periodList))
+ this.periodList.map((item, index) => {
+ item.price = item.priceOrigin
+ item.halfPrice = item.halfPriceOrigin
if (item.prices && item.prices.includes('{')) {
const dataList = JSON.parse(item.prices)[month]
+ console.log(JSON.parse(item.prices), month)
if (dataList) {
+ console.log(dayjs(this.dateTime).format('D'))
+ console.log(dataList[dayjs(this.dateTime).format('D') - 1])
const price = dataList[dayjs(this.dateTime).format('D') - 1]
if (price && price !== '') {
item.price = price
@@ -320,9 +313,10 @@ export default {
}
}
}
-
+ // console.log('item', item)
return item
})
+ console.log('this.timeListOrigin', this.timeListOrigin)
},
onDisabled() {
this.disabled = !this.disabled;
@@ -469,7 +463,8 @@ export default {
orderCode: key,
siteTimeId: siteTime.id,
dateTime: `${this.dateTime}`,
- comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
+ // comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
+ comments: `${this.dateTime} ${item.timePeriod}`,
week
})
console.log(app.selection);
diff --git a/src/package/booking/confirm.vue b/src/package/booking/confirm.vue
index b2943ac..0408914 100644
--- a/src/package/booking/confirm.vue
+++ b/src/package/booking/confirm.vue
@@ -80,6 +80,18 @@
+
+
+ 余额不足
+
+
+
@@ -182,10 +194,11 @@ import {checkPayPassword} from '@/api/passport/login';
import {getWeek, getKey} from '@/utils/common';
import {useUserStore} from '@/store/modules/user';
import dayjs from "dayjs";
-import {addThinkOrder} from "@/api/think/thinkOrder";
+import {addThinkOrder, updateThinkOrder} from "@/api/think/thinkOrder";
import {listUserThinkCard} from "@/api/think/thinkCard";
import {listThinkUsersVip} from "@/api/think/thinkUsersVip";
import {number} from "@/uni_modules/uv-ui-tools/libs/function/test";
+import md5 from 'md5'
const userStore = useUserStore();
// const carStore = useCarStore();
@@ -195,6 +208,15 @@ export default {
computed: {
dayjs() {
return dayjs
+ },
+ currentBalance() {
+ return Number(this.userInfo?.balance || this.userInfo?.money || 0);
+ },
+ canUseBalancePay() {
+ return this.currentBalance >= Number(this.payPrice || 0);
+ },
+ balancePayTitle() {
+ return `余额支付(当前余额¥${this.currentBalance.toFixed(2)})`;
}
},
data() {
@@ -558,6 +580,13 @@ export default {
},
// 切换支付方式
async onPayType(index) {
+ if (index === 19 && !this.canUseBalancePay) {
+ uni.showToast({
+ title: '当前余额不足',
+ icon: 'none'
+ });
+ return false;
+ }
// app.payType = index;
this.form.payType = index;
console.log(this.form.payType)
@@ -643,10 +672,6 @@ export default {
return false;
}
- if (form.payType === 0 && !this.isPayPasswordCorrect) {
- app.$refs.payPasswordForm.open('center');
- return false;
- }
uni.showLoading({
title: '订单提交中.'
});
@@ -663,13 +688,15 @@ export default {
}
return item
})
+ const postTime = dayjs().valueOf()
+ form.postTime = postTime
+ form.sign = md5(postTime + "wxd38cc38c54fa7370" + form.startTime + this.userInfo.uid)
addThinkOrder(form)
.then((data) => {
const orderInfo = data;
console.log(data)
// 调起微信支付
if (form.payType === 1) {
- // #ifdef MP-WEIXIN
uni.requestPayment({
provider: orderInfo.provider, // 服务提供商
timeStamp: orderInfo.timeStamp, // 时间戳
@@ -683,34 +710,30 @@ export default {
title: '支付成功',
icon: 'success'
});
- setTimeout(function () {
+ setTimeout(() => {
app.disabled = false;
- // uni.reLaunch({
- // url: '/pages/order/order',
- // success: function (e) {
- // var page = getCurrentPages()[0];
- // if (page == undefined || page == null) return;
- // page.onLoad();
- // }
- // });
uni.switchTab({url: '/pages/order'})
}, 1500);
},
- fail: function (err) {
+ fail: async (err) => {
+ uni.showToast({
+ title: '取消支付',
+ icon: 'error'
+ });
+ await updateThinkOrder({
+ id: orderInfo.orderId,
+ orderStatus: 3
+ })
console.log('支付失败', err);
app.disabled = false;
uni.switchTab({
url: '/pages/order'
});
- // uni.switchTab({
- // url: '/pages/order/order'
- // })
}
});
- // #endif
}
// 使用余额支付
- if (form.payType === 0) {
+ if (form.payType === 19) {
if (!orderInfo) {
return uni.showToast({
title: '支付失败',
@@ -724,7 +747,6 @@ export default {
});
setTimeout(function () {
app.disabled = false;
- app.$refs.payPasswordForm.close();
uni.switchTab({url: '/pages/order'})
}, 1500);
}
@@ -757,6 +779,11 @@ export default {
title: res.message || '请检查您的网络.',
icon: 'none'
});
+ if (res.message === '未绑定人脸') {
+ setTimeout(() => {
+ uni.switchTab({url: '/pages/user'})
+ }, 1500)
+ }
});
},
selectVipCard(card) {
@@ -807,6 +834,11 @@ page {
.container {
}
+.balance-tip {
+ font-size: 24rpx;
+ color: #fa3534;
+}
+
.checkout-car {
width: 700rpx;
left: 25rpx;
diff --git a/src/package/booking/index.vue b/src/package/booking/index.vue
index 761ae7d..5339581 100644
--- a/src/package/booking/index.vue
+++ b/src/package/booking/index.vue
@@ -14,15 +14,18 @@
-->
-
-
-
+
+
+
+
+
+
+
+
@@ -108,6 +111,7 @@ import X2js from 'x2js';
import {getArticle, pageArticle} from "@/api/cms/article";
import coordtransform from "coordtransform";
import dayjs from "dayjs";
+import {thinkOrderSetInterval} from "@/api/think/thinkOrder";
const carStore = useCarStore();
@@ -131,9 +135,9 @@ export default {
async onLoad(option) {
this.id = option.id
carStore.merchantId = option.id
- const {longitude, latitude} = await getLocationAction()
- this.lat = latitude
- this.lng = longitude
+ // const {longitude, latitude} = await getLocationAction()
+ // this.lat = latitude
+ // this.lng = longitude
await this.getProtocol()
await this.reload();
},
@@ -152,13 +156,16 @@ export default {
}
},
openProtocol() {
- const hour = dayjs().format('H')
- if (hour < 8 || hour === 23) {
- return uni.showModal({
- showCancel: false,
- title: '场地预定时间为:8:00-23:00。',
- })
+ if (!this.isLogin) {
+ return this.$refs.login.open('bottom');
}
+ const hour = dayjs().format('H')
+ // if (parseInt(hour) < 8 || parseInt(hour) === 23) {
+ // return uni.showModal({
+ // showCancel: false,
+ // title: '场地预定时间为:8:00-23:00。',
+ // })
+ // }
if (this.timer) {
clearInterval(this.timer)
this.timer = null
@@ -201,7 +208,7 @@ export default {
carStore.merchantId = merchant.merchantId
carStore.merchantName = merchant.merchantName
carStore.merchantCode = merchant.merchantCode
- this.getDuration()
+ // this.getDuration()
})
},
async getDuration() {
@@ -269,7 +276,7 @@ export default {
}
});
},
- save() {
+ async save() {
// if (!this.disabled) {
// uni.showToast({
// title: '请先阅读并同意订票协议',
@@ -278,6 +285,7 @@ export default {
// return false
// }
if (this.timer) clearTimeout(this.timer)
+ await thinkOrderSetInterval()
this.$refs.protocolPopup.close()
uni.navigateTo({
url: '/package/booking/checkout?id=' + this.id
@@ -323,7 +331,7 @@ page {
.booking-tel {
position: fixed;
z-index: 1;
- top: 270px;
+ top: 270rpx;
right: 0;
width: 80px;
height: 38px;
diff --git a/src/package/card/index.vue b/src/package/card/index.vue
index 864b0cf..eb0b4b5 100644
--- a/src/package/card/index.vue
+++ b/src/package/card/index.vue
@@ -5,43 +5,49 @@
inActiveColor="#808080" @clickItem="onClickItem"/>
-
-
- {{ group.siteNames }}
-
-
-
-
- {{ item.name }}
+
+
+
+ {{ group.siteNames }}
+
+
+
+
+ {{ item.name }}
+
+ {{
+ item.term
+ }}年
+
+ {{
+ item.month
+ }}个月
+
+
+ {{ item.count }}次
+
+ {{
+ item.discount
+ }}折
+
- {{
- item.term
- }}年
-
- {{
- item.month
- }}个月
-
-
- {{ item.count }}次
-
- {{
- item.discount
- }}折
+
+ {{ `¥${item.price}` }}
-
- {{ `¥${item.price}` }}
+
+ 可用场馆: {{ item.siteNames }}
+
+
+ {{ item.info }}
-
-
- {{ item.info }}
-
-
-
+
+
+
+
@@ -72,6 +78,8 @@ import * as Api from '@/api/booking/card';
import {pageWechatDeposit} from '@/api/shop/wechatDeposit';
import {getWeek, getKey} from '@/utils/common';
import {listThinkVip, listThinkVipByGroup} from "@/api/think/thinkVip";
+import {listThinkUsersVip} from "@/api/think/thinkUsersVip";
+import dayjs from "dayjs";
export default {
components: {},
@@ -79,6 +87,7 @@ export default {
return {
isRefresh: false,
isLogin: false,
+ loading: true,
userId: 0,
where: {
page: 1,
@@ -109,7 +118,8 @@ export default {
styleType: 'text',
getWeek,
// 骨架屏
- hideTools: true
+ hideTools: true,
+ userVipList: []
};
},
onLoad(option) {
@@ -143,48 +153,15 @@ export default {
},
methods: {
async getCardList() {
+ this.loading = true
this.cardList = await listThinkVipByGroup({
type: this.where.type
})
+ this.loading = false
+ this.getUserVipList()
},
- reload() {
- return;
- const app = this;
- const {where, userId} = this;
- if (userId == 0) {
- app.openLogin();
- return;
- }
- // where.userId = userId;
- // uni.showLoading({
- // title: '数据读取中.'
- // });
- app.loadMore = 'loading';
- Api.pageCard(where)
- .then((res) => {
- const list = res.list.map((d) => {
- return d;
- });
- if (app.cardList.length < res.count) {
- app.cardList = app.cardList.concat(list);
- app.canReset = true;
- app.loadMore = 'no-more';
- } else {
- app.canReset = false;
- app.loadMore = 'no-more';
- }
- // uni.hideLoading();
- app.isRefresh = false;
- app.hideTools = false;
- })
- .catch(() => {
- uni.showToast({
- title: '请检查您的网络.',
- icon: 'none'
- });
- app.isRefresh = false;
- app.hideTools = false;
- });
+ async getUserVipList() {
+ this.userVipList = await listThinkUsersVip()
},
onClickItem({currentIndex}) {
@@ -209,38 +186,6 @@ export default {
url
});
},
- toPay(orderId) {
- uni.navigateTo({
- url: '/package/booking/confirm?id=' + orderId
- });
- },
- closeOrder(item) {
- uni.showModal({
- title: '确定取消此订单?',
- success(o) {
- if (o.confirm) {
- // Api.updateOrder({
- // orderStatus: 2,
- // orderId: item.orderId
- // })
- // .then((msg) => {
- // uni.showToast({
- // title: msg,
- // icon: 'none'
- // });
- // item.orderStatus = 2;
- // })
- // .catch(() => {
- // uni.showToast({
- // title: '请检查您的网络.',
- // icon: 'none'
- // });
- // uni.hideLoading();
- // });
- }
- }
- });
- },
// 弹出登录提示框
async openLogin() {
this.userId = uni.getStorageSync('user_id');
@@ -248,6 +193,20 @@ export default {
this.$refs.login.open('bottom');
return false;
}
+ },
+ doBuy(id) {
+ const hasCard = this.userVipList.find(item => item.vid === id)
+ if (hasCard) {
+ uni.showModal({
+ title: '提示',
+ content: `您已有该会员卡(${dayjs(hasCard.expireTime * 1000).format('YYYY-MM-DD HH:mm:ss')}过期),继续购买将在该卡上叠加过期时间/次数/金额,是否继续?`,
+ success: (res) => {
+ if (res.confirm) {
+ this.openUrl(`/package/card/checkout?cardId=${id}`)
+ }
+ }
+ })
+ } else this.openUrl(`/package/card/checkout?cardId=${id}`)
}
}
};
diff --git a/src/package/order/check.vue b/src/package/order/check.vue
index 56bbe1d..f828afb 100644
--- a/src/package/order/check.vue
+++ b/src/package/order/check.vue
@@ -16,7 +16,7 @@
+ v-if="info.payStatus === 1 && info.orderStatus === 2 && (hasMerchantRole || hasMerchantClerkRole || hasSuperAdminRole)">
核销
diff --git a/src/package/order/detail.vue b/src/package/order/detail.vue
index 690f9b6..e08db1e 100644
--- a/src/package/order/detail.vue
+++ b/src/package/order/detail.vue
@@ -3,8 +3,18 @@
{{ countDown }}秒后自动刷新
-
+
+
+
+
+
+
核销码(每30秒刷新,点击二维码手动刷新)
+
+ 缩小
+ 放大
+
@@ -39,7 +49,7 @@
-
+
@@ -53,7 +63,8 @@
-
@@ -143,7 +154,8 @@ export default {
activeColor: '#108001',
styleType: 'text',
countDown: 30,
- interval: null
+ interval: null,
+ qrSize: 500
};
},
onLoad(option) {
@@ -228,7 +240,7 @@ export default {
clearInterval(this.interval)
this.getOrder()
}
- }else clearInterval(this.interval)
+ } else clearInterval(this.interval)
}, 1000)
},
async openPay() {
@@ -255,6 +267,17 @@ export default {
console.log('支付失败', err);
}
})
+ },
+ changeSize(dir) {
+ if (dir === '-') {
+ if (this.qrSize > 200) {
+ this.qrSize -= 100
+ }
+ } else {
+ if (this.qrSize < 700) {
+ this.qrSize += 100
+ }
+ }
}
},
diff --git a/src/package/order/doMultiInvoice.vue b/src/package/order/doMultiInvoice.vue
new file mode 100644
index 0000000..508da02
--- /dev/null
+++ b/src/package/order/doMultiInvoice.vue
@@ -0,0 +1,318 @@
+
+
+ 注:开具会员卡发票后,无法再次开具使用该卡订场的订单发票。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/package/order/multiInvoice.vue b/src/package/order/multiInvoice.vue
new file mode 100644
index 0000000..fb0281b
--- /dev/null
+++ b/src/package/order/multiInvoice.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+
+ 订单号: {{ item.orderNum }}
+
+
+
+
+
+
+
+
+
+
+ 实付:¥{{ item.payPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开票金额: {{ item.price }}元
+ {{
+ item.isOpen === 1 ? '已开票' : '开票中'
+ }}
+
+
+ 税号/身份证号: {{ item.code }}
+ 名称: {{ item.name }}
+ 手机号码: {{ item.phone }}
+
+
+ 复制PDF链接
+
+
+ 复制XML链接
+
+
+
+
+ 查询状态
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/package/parking/index.vue b/src/package/parking/index.vue
new file mode 100644
index 0000000..bd41893
--- /dev/null
+++ b/src/package/parking/index.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/src/package/user/balance.vue b/src/package/user/balance.vue
new file mode 100644
index 0000000..d276d5a
--- /dev/null
+++ b/src/package/user/balance.vue
@@ -0,0 +1,432 @@
+
+
+
+ 当前余额
+ ¥{{ balanceText }}
+
+
+
+
+
+
+
+
+
+ {{ dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') || '--' }}
+
+
+
+ {{ isIncome(item) ? '+' : '-' }}¥{{ formatMoney(item.money) }}
+
+ 余额 ¥{{ formatMoney(item.balance) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item }}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/package/user/card.vue b/src/package/user/card.vue
index d2491e8..bf8664c 100644
--- a/src/package/user/card.vue
+++ b/src/package/user/card.vue
@@ -34,7 +34,7 @@
item.remainingMoney
}}
-
{{ dayjs(item.expireTime * 1000).format('YYYY-MM-DD HH:mm') }}过期
@@ -70,7 +70,7 @@
-
+
diff --git a/src/package/user/invoice-show.vue b/src/package/user/invoice-show.vue
index 646ba14..8dc95a5 100644
--- a/src/package/user/invoice-show.vue
+++ b/src/package/user/invoice-show.vue
@@ -3,7 +3,13 @@
- 复制发票链接
+
+
+ 复制PDF链接
+
+ 复制XML链接
+
+ 开票中
@@ -48,6 +54,7 @@ export default {
if (res && res.list && res.list.length > 0) {
const invoiceRes = await showInvoice(res.list[0].id)
this.list = JSON.parse(invoiceRes)
+ console.log(this.list)
}
});
},
diff --git a/src/package/user/invoice-type.vue b/src/package/user/invoice-type.vue
index 6b1e30b..cf1d648 100644
--- a/src/package/user/invoice-type.vue
+++ b/src/package/user/invoice-type.vue
@@ -5,7 +5,7 @@
:title="`场地发票`"
:cellStyle="{ padding: '5px 0' }"
:border="false"
- @click="switchTabTo(`/pages/order`)"
+ @click="navTo(`/package/order/multiInvoice`)"
icon="https://oss.wsdns.cn/20241206/eb94f79b4d9049999554e11bc355480e.png"
>
@@ -13,19 +13,19 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/package/user/invoice.vue b/src/package/user/invoice.vue
index a5f5b72..c4431d1 100644
--- a/src/package/user/invoice.vue
+++ b/src/package/user/invoice.vue
@@ -23,24 +23,24 @@
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -65,6 +65,7 @@
+ 注:开具会员卡发票后,无法再次开具使用该卡订场的订单发票。
@@ -102,7 +104,7 @@ export default {
// 表单数据
formData: {
incoiveNum: null,
- incoiveCode: null,
+ incoiveCode: '91450100737617400R',
orderNum: null,
oid: null,
uid: null,
@@ -114,10 +116,11 @@ export default {
account: null,
code: null,
phone: null,
- email: null,
+ email: '',
type: 2,
itype: null,
invoicetype: 1,
+ isOpen: 2,
},
// 发票类型
type: [
@@ -134,11 +137,13 @@ export default {
invoiceType: [
{
text: '普票',
- value: 1
+ value: 1,
+ disabled: false
},
{
text: '专票',
- value: 2
+ value: 2,
+ disabled: false
}
],
rules: {
@@ -162,6 +167,7 @@ export default {
}
},
userInvoice: null,
+ disabled: false,
};
},
onLoad(e) {
@@ -169,6 +175,9 @@ export default {
this.formData.orderNum = e.orderNum
this.formData.itype = e.itype
this.formData.price = e.price
+ if (parseInt(this.formData.itype) === 2) {
+ this.invoiceType[1].disabled = true
+ }
},
onShow() {
this.reload();
@@ -192,7 +201,7 @@ export default {
app.formData[key] = res.list[0][key];
}
}
- if (this.userInvoice.invoiceCode) this.formData.incoiveCode = this.userInvoice.invoiceCode
+ if (this.userInvoice.invoiceCode) this.formData.code = this.userInvoice.invoiceCode
if (this.userInvoice.bankName) this.formData.bank = this.userInvoice.bankName
if (this.userInvoice.bankAccount) this.formData.account = this.userInvoice.bankAccount
}
@@ -254,23 +263,47 @@ export default {
// 触发提交表单
submit() {
const {formData} = this
+ this.disabled = true
this.$refs.form
.validate()
.then(async () => {
+ formData.code.replace(/\s/g,"")
uni.showLoading({title: '保存中'})
+ if (!formData.phone) {
+ this.disabled = false
+ return uni.showToast({
+ title: '请输入手机号',
+ icon: 'success'
+ });
+ }
+ // 手机号校验
+ if (!/^1[3456789]\d{9}$/.test(formData.phone)) {
+ this.disabled = false
+ return uni.showToast({
+ title: '请输入正确的手机号',
+ icon: 'success'
+ })
+ }
+ if (!formData.email) formData.email = ''
const res = await addThinkInvoice(formData)
uni.hideLoading()
if (res && res.data) {
uni.showLoading({title: '申请开票中'})
- await doInvoice(res.data)
- uni.hideLoading()
- uni.showToast({
- title: '开票成功',
- icon: 'success'
- });
- setTimeout(() => {
- uni.navigateBack()
- }, 1000)
+ const openRes = await doInvoice(res.data).catch(() => {
+ this.disabled = true
+ uni.hideLoading()
+ })
+ if (openRes) {
+ this.disabled = true
+ uni.hideLoading()
+ uni.showToast({
+ title: '已申请',
+ icon: 'success'
+ });
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
}
})
.catch((err) => {
diff --git a/src/package/user/offReq.vue b/src/package/user/offReq.vue
new file mode 100644
index 0000000..4ce7924
--- /dev/null
+++ b/src/package/user/offReq.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+ 订单号: {{ item.thinkOrder.orderNum }}
+ 下单时间: {{
+ dayjs(item.thinkOrder.createTime * 1000).format('YYYY-MM-DD HH:mm:ss')
+ }}
+
+ 下申请时间: {{ dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') }}
+ 申请原因: {{ item.reqReason }}
+ 场馆: {{ item.thinkOrder.siteName }}
+
+ 预定信息:
+
+ {{
+ booking
+ }}
+
+
+
+
+ 审核状态:
+ 待审核
+ 已同意
+ 已拒绝
+
+ 拒绝原因: {{ item.refuseReason }}
+
+
+ 通过
+
+
+ 拒绝
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/package/user/recharge-record.vue b/src/package/user/recharge-record.vue
new file mode 100644
index 0000000..f6ba7d9
--- /dev/null
+++ b/src/package/user/recharge-record.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+ 加载中...
+ 没有更多了
+
+
+
+
+
+
diff --git a/src/package/user/recharge.vue b/src/package/user/recharge.vue
new file mode 100644
index 0000000..3a2836e
--- /dev/null
+++ b/src/package/user/recharge.vue
@@ -0,0 +1,485 @@
+
+
+
+ 充值记录
+ >
+
+
+
+ 选择卡类型
+
+
+ VIP卡
+
+
+ IC卡
+
+
+
+
+
+ 手机号搜索
+
+
+
+
+
+
+
+ 选择卡片
+
+
+ {{ item.name || item.cardNo }}
+
+ 有效期至: {{ formatTime(item.expireTime) }}
+
+
+ 卡号: {{ item.cardNo }}
+
+
+ 余额: ¥{{ item.remainingMoney }}
+
+
+
+
+
+
+ 充值金额
+
+ ¥
+
+
+
+
+ {{ item }}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/packageAdmin/admin/order-scan.vue b/src/packageAdmin/admin/order-scan.vue
index 84654ee..f5ad19b 100644
--- a/src/packageAdmin/admin/order-scan.vue
+++ b/src/packageAdmin/admin/order-scan.vue
@@ -49,7 +49,7 @@
-
+
- 热门活动
+ 公告
{{ activity.title }}
@@ -331,21 +331,47 @@ export default {
this.openUrl(pathList[index]);
},
openUrl(url) {
- if (!this.isLogin) {
- this.$refs.login.open('bottom');
- return false;
- } else {
+ // if (!this.isLogin) {
+ // this.$refs.login.open('bottom');
+ // return false;
+ // } else {
uni.navigateTo({
url
});
- }
+ // }
},
onLayout({mpMenus, ads}) {
- this.mpMenus = mpMenus;
+ this.mpMenus = this.applyParkingMenu(mpMenus);
this.ads = ads;
this.hideTools = false;
this.ad279 = this.getAdImageUrl(ads.find(d => d.adId === 279));
},
+ applyParkingMenu(mpMenus) {
+ if (!mpMenus || typeof mpMenus !== 'object') {
+ return mpMenus;
+ }
+ const icon = 'https://oss.wsdns.cn/20261013/566ec0e5017e4c698079d9403300d5cd.png?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90';
+ const next = {...mpMenus};
+ Object.keys(next).forEach((key) => {
+ const menus = next[key];
+ if (!Array.isArray(menus)) {
+ return;
+ }
+ next[key] = menus.map((item) => {
+ if (!item || String(item.title || '').trim() !== '热点新闻') {
+ return item;
+ }
+ return {
+ ...item,
+ title: '停车缴费',
+ avatar: icon,
+ path: '/package/parking/index',
+ target: 'uni.navigateTo'
+ };
+ });
+ });
+ return next;
+ },
getAdImageUrl(item) {
if (!item) {
return [];
@@ -497,7 +523,6 @@ page {
.merchant-card {
margin: 12rpx auto;
background: #ffffff;
- border-radius: 10rpx;
border-color: slategrey;
border-radius: 16rpx;
@@ -512,6 +537,7 @@ page {
font-weight: 500;
font-size: 26rpx;
text-align: center;
+ min-height: 70rpx;
}
.merchant-desc {
diff --git a/src/pages/order.vue b/src/pages/order.vue
index 0573b94..98cc1ad 100644
--- a/src/pages/order.vue
+++ b/src/pages/order.vue
@@ -42,6 +42,32 @@
+
+
+
+ {{ item.orderNum }}
+ 已支付,未退款
+ 未支付
+ 已退款
+
+
+ {{ item.vipName }}
+ ¥{{ item.money }}
+
+
+ {{ dayjs(item.createTime * 1000).format('YYYY-MM-DD HH:mm:ss') }}
+
+
+
+
+
+
+
@@ -118,7 +144,8 @@
@click="refund(item, index)" :disabled="item.disabled">
{{ item.payType === 1 ? '申请退款' : '取消订单' }}
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ v.title }}
-
-
-
-
-
-
-
-
- 扫码核销
-
-
+
-
-
-
-
-
-
-
-
-
- {{ v.title }}
-
-
-
-
-
-
-
-
-
+
+
@@ -83,25 +54,23 @@