diff --git a/src/api/appUser/index.ts b/src/api/appUser/index.ts new file mode 100644 index 0000000..d58903b --- /dev/null +++ b/src/api/appUser/index.ts @@ -0,0 +1,111 @@ +import type { AppUserBindingVO, AppUserForm, AppUserQuery, AppUserVO } from '@/api/appUser/types'; +import type { PageResult } from '@/api/types'; +import type { AxiosPromise } from '@/utils/api-types'; +import request from '@/utils/request'; + +/** + * 查询小程序用户列表 + * @param query + * @returns {*} + */ +export const listAppUser = (query?: AppUserQuery): AxiosPromise> => { + return request({ + url: '/userManage/appUser/list', + method: 'get', + params: query + }); +}; + +/** + * 查询小程序用户详细 + * @param userId + */ +export const getAppUser = (userId: string | number): AxiosPromise => { + return request({ + url: '/userManage/appUser/' + userId, + method: 'get' + }); +}; + +/** + * 查询小程序用户详情(头部概要信息) + * @param userId + */ +export const getAppUserDetail = (userId: string | number): AxiosPromise => { + return request({ + url: '/userManage/appUser/detail/' + userId, + method: 'get' + }); +}; + +/** + * 查询用户已绑定的设备列表 + * @param userId + */ +export const getAppUserBindings = (userId: string | number): AxiosPromise> => { + return request({ + url: '/userManage/appUser/bindings/' + userId, + method: 'get' + }); +}; + +/** + * 查询用户可绑定的设备列表 + * @param userId + */ +export const getBindableDevices = (userId: string | number): AxiosPromise => { + return request({ + url: '/userManage/appUser/bindableDevices/' + userId, + method: 'get' + }); +}; + +/** + * 绑定用户设备 + * @param userId + * @param deviceIds + */ +export const bindAppUserDevices = (userId: string | number, deviceIds: Array) => { + return request({ + url: '/userManage/appUser/bindings/' + userId, + method: 'post', + data: { deviceIds } + }); +}; + +/** + * 新增小程序用户 + * @param data + */ +export const addAppUser = (data: AppUserForm) => { + return request({ + url: '/userManage/appUser', + method: 'post', + data: data + }); +}; + +/** + * 修改小程序用户 + * @param data + */ +export const updateAppUser = (data: AppUserForm) => { + return request({ + url: '/userManage/appUser', + method: 'put', + data: data + }); +}; + + + +/** + * 删除小程序用户 + * @param userId + */ +export const delAppUser = (userId: string | number | Array) => { + return request({ + url: '/userManage/appUser/' + userId, + method: 'delete' + }); +}; diff --git a/src/api/appUser/types.ts b/src/api/appUser/types.ts new file mode 100644 index 0000000..c664c8e --- /dev/null +++ b/src/api/appUser/types.ts @@ -0,0 +1,310 @@ +export interface AppUserVO { + /** + * 小程序用户ID + */ + userId: string | number; + /** + * 用户类型(0租客 1房东) + */ + userType: string; + /** + * 手机号 + */ + phoneNumber: string; + /** + * 登录密码哈希 + */ + passwordHash: string; + /** + * 昵称 + */ + nickName: string; + /** + * 实名姓名 + */ + realName: string; + /** + * 头像地址 + */ + avatarUrl: string; + /** + * 微信OpenID + */ + wxOpenId: string | number; + /** + * 微信UnionID + */ + wxUnionId: string | number; + /** + * 状态(0正常 1停用) + */ + status: string; + /** + * 最后登录时间 + */ + lastLoginTime: string; + /** + * 最后登录IP + */ + lastLoginIp: string; + /** + * 房间号(列表展示,后端未返回时前端显示占位) + */ + roomNo?: string; + /** + * 注册时间(详情页展示) + */ + createTime?: string; + /** + * 房间名称(列表展示用) + */ + roomName?: string; + /** + * 最近缴费时间(列表展示,后端未返回时前端显示占位) + */ + lastRechargeTime?: string; +} + +/** + * 用户绑定 / 缴费 / 抄表 / 清零记录(后端 /userManage/appUser/bindings/{userId} 返回的行结构) + */ +export interface AppUserBindingVO { + /** + * 记录ID + */ + id: string | number; + /** + * 设备ID + */ + deviceId: string | number; + /** + * 设备名称 + */ + deviceName?: string; + /** + * 设备编号 + */ + deviceNo?: string; + /** + * 设备类型(0:电表,1:水表) + */ + deviceType?: string; + /** + * 计量单位(0:度,1:吨) + */ + unitName?: string; + /** + * 剩余金额 + */ + remainingBalance?: number; + /** + * 当前剩余量 + */ + currentQuantity?: number; + /** + * 当前单价 + */ + currentUnitPrice?: number; + /** + * 控制状态(0正常,1强制拉闸,2欠费拉闸,3离线) + */ + switchStatus?: string; + /** + * 绑定状态 + */ + bindingStatus?: string; + /** + * 绑定时间 + */ + boundAt?: string; + /** + * 解绑时间(历史设备用) + */ + unboundAt?: string; + /** + * 订单号(支付记录用) + */ + orderNo?: string; + /** + * 能源类型 + */ + energyType?: string; + /** + * 支付方式 + */ + paymentMethod?: string; + /** + * 订单状态 + */ + orderStatus?: string; + /** + * 充值金额 + */ + rechargeAmount?: number; + /** + * 实付金额 + */ + actualPaymentAmount?: number; + /** + * 支付时间 + */ + paidAt?: string; + /** + * 上次读数 + */ + previousReadingValue?: number; + /** + * 本次读数 + */ + readingValue?: number; + /** + * 本期用量 + */ + usageQuantity?: number; + /** + * 抄表时间 + */ + readingTime?: string; + /** + * 清零前读数 + */ + beforeReadingValue?: number; + /** + * 清零后读数 + */ + afterReadingValue?: number; + /** + * 清零时间 + */ + resetTime?: string; + /** + * 备注 + */ + remark?: string; + /** + * 房间号 + */ + roomNo?: string; +} + +export interface AppUserForm extends BaseEntity { + /** + * 小程序用户ID + */ + userId?: string | number; + /** + * 用户类型(0租客 1房东) + */ + userType?: string; + /** + * 手机号 + */ + phoneNumber?: string; + /** + * 登录密码哈希 + */ + passwordHash?: string; + /** + * 昵称 + */ + nickName?: string; + /** + * 实名姓名 + */ + realName?: string; + /** + * 头像地址 + */ + avatarUrl?: string; + /** + * 微信OpenID + */ + wxOpenId?: string | number; + /** + * 微信UnionID + */ + wxUnionId?: string | number; + /** + * 状态(0正常 1停用) + */ + status?: string; + /** + * 最后登录时间 + */ + lastLoginTime?: string; + /** + * 最后登录IP + */ + lastLoginIp?: string; + /** + * 注册时间 + */ + createTime?: string; + /** + * 更新时间 + */ + updateTime?: string; +} + +export interface AppUserQuery extends PageQuery { + /** + * 用户列表关键字(手机号、昵称或姓名) + */ + keyword?: string; + /** + * 用户类型(0租客 1房东) + */ + userType?: string; + /** + * 手机号 + */ + phoneNumber?: string; + /** + * 登录密码哈希 + */ + passwordHash?: string; + /** + * 昵称 + */ + nickName?: string; + /** + * 实名姓名 + */ + realName?: string; + /** + * 头像地址 + */ + avatarUrl?: string; + /** + * 微信OpenID + */ + wxOpenId?: string | number; + /** + * 微信UnionID + */ + wxUnionId?: string | number; + /** + * 状态(0正常 1停用) + */ + status?: string; + /** + * 最后登录时间 + */ + lastLoginTime?: string; + /** + * 最后登录IP + */ + lastLoginIp?: string; + /** + * 注册时间 + */ + createTime?: string; + /** + * 更新时间 + */ + updateTime?: string; + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/deviceManage/device/index.ts b/src/api/deviceManage/device/index.ts new file mode 100644 index 0000000..c692dd7 --- /dev/null +++ b/src/api/deviceManage/device/index.ts @@ -0,0 +1,123 @@ +import type { DeviceForm, DeviceQuery, DeviceVO } from '@/api/deviceManage/device/types'; +import type { PageResult } from '@/api/types'; +import type { AxiosPromise } from '@/utils/api-types'; +import request from '@/utils/request'; + +/** + * 查询智能水电设备列表 + * @param query + * @returns {*} + */ +export const listDevice = (query?: DeviceQuery): AxiosPromise> => { + return request({ + url: '/deviceManage/device/list', + method: 'get', + params: query + }); +}; + +/** + * 查询智能水电设备详细 + * @param deviceId + */ +export const getDevice = (deviceId: string | number): AxiosPromise => { + return request({ + url: '/deviceManage/device/' + deviceId, + method: 'get' + }); +}; + +/** + * 新增智能水电设备 + * @param data + */ +export const addDevice = (data: DeviceForm) => { + return request({ + url: '/deviceManage/device', + method: 'post', + data: data + }); +}; + +/** + * 修改智能水电设备 + * @param data + */ +export const updateDevice = (data: DeviceForm) => { + return request({ + url: '/deviceManage/device', + method: 'put', + data: data + }); +}; + + + +/** + * 批量导入设备(multipart 上传 Excel) + * @param file 导入文件 + */ +export const importDeviceData = (file: File) => { + const formData = new FormData(); + formData.append('file', file); + return request({ + url: '/deviceManage/device/importData', + method: 'post', + data: formData + }); +}; + +/** + * 设备拉闸(强制断电) + * @param deviceId + */ +export const forceOffDevice = (deviceId: string | number) => { + return request({ + url: '/deviceManage/device/' + deviceId + '/forceOff', + method: 'post' + }); +}; + +/** + * 设备恢复供电(拉闸后合闸) + * @param deviceId + */ +export const restoreDevice = (deviceId: string | number) => { + return request({ + url: '/deviceManage/device/' + deviceId + '/restore', + method: 'post' + }); +}; + +/** + * 设备抄表(下发抄表指令,返回本次读表结果) + * @param deviceId + */ +export const readDevice = (deviceId: string | number) => { + return request({ + url: '/deviceManage/device/' + deviceId + '/read', + method: 'post' + }); +}; + +/** + * 设备清零(总用量、剩余用量、剩余金额归零) + * @param deviceId + */ +export const resetDevice = (deviceId: string | number) => { + return request({ + url: '/deviceManage/device/' + deviceId + '/reset', + method: 'post' + }); +}; + +/** + * 删除智能水电设备 + * @param deviceId + */ +export const delDevice = (deviceId: string | number | Array) => { + return request({ + url: '/deviceManage/device/' + deviceId, + method: 'delete' + }); +}; diff --git a/src/api/deviceManage/device/types.ts b/src/api/deviceManage/device/types.ts new file mode 100644 index 0000000..8ffb8c3 --- /dev/null +++ b/src/api/deviceManage/device/types.ts @@ -0,0 +1,336 @@ +export interface DeviceVO { + /** + * 设备ID + */ + deviceId: string | number; + /** + * 所属商户ID + */ + merchantId: string | number; + /** + * 所属商户名称(列表展示用) + */ + merchantName?: string; + /** + * 当前房间ID + */ + roomId: string | number; + /** + * 房间名称(详情页展示,后端未返回时前端回退) + */ + roomName?: string; + /** + * 绑定房东(详情页展示) + */ + landlordName?: string; + /** + * 安装位置(详情页展示) + */ + installAddress?: string; + /** + * 安装位置(后端详情接口返回字段,详情页优先展示) + */ + installLocation?: string; + /** + * 累计用量(详情页展示) + */ + totalQuantity?: number; + /** + * 最近充值时间(详情页展示) + */ + lastRechargeTime?: string; + /** + * 欠费金额(欠费拉闸时展示) + */ + arrearsAmount?: number; + /** + * 欠费天数(欠费拉闸时展示,后端未返回时前端不再兜底计算) + */ + arrearsDays?: number; + /** + * 设备编号 + */ + deviceNo: string; + /** + * 设备名称 + */ + deviceName: string; + /** + * 设备类型(0:电表,1:水表) + */ + deviceType: string; + /** + * 通讯类型 + */ + communicationType: string; + /** + * 计量单位(0:度,1:吨) + */ + unitName: string; + /** + * 设备二维码内容 + */ + qrCode: string; + /** + * 剩余金额 + */ + remainingBalance: number; + /** + * 当前剩余量或电量 + */ + currentQuantity: number; + /** + * 本次抄表读数(抄表弹窗展示) + */ + currentReadingValue?: number; + /** + * 上次抄表读数(抄表弹窗展示) + */ + previousReadingValue?: number; + /** + * 本期用量(抄表弹窗展示,由后端计算返回) + */ + usageQuantity?: number; + /** + * 当前功率 + */ + currentPower: number; + /** + * 当前单价 + */ + currentUnitPrice: number; + /** + * 控制状态(0正常,1强制拉闸,2欠费拉闸,3离线) + */ + switchStatus: string; + /** + * 在线状态(0离线 1在线) + */ + onlineStatus: boolean; + /** + * 最后在线时间 + */ + lastOnlineTime: string; + /** + * 离线时长(后端已格式化,如「2小时30分钟」,离线时展示) + */ + offlineDuration?: string; + /** + * 最后抄表时间 + */ + lastReadingTime: string; + /** + * 安装时间 + */ + installedAt: string; + /** + * 设备状态(0正常 1禁用 2已删除) + */ + status: boolean; + /** + * 备注 + */ + remark: string; +} + +export interface DeviceForm extends BaseEntity { + /** + * 设备ID + */ + deviceId?: string | number; + /** + * 所属商户ID + */ + merchantId?: string | number; + /** + * 所属商户名称(列表展示用) + */ + merchantName?: string; + /** + * 当前房间ID + */ + roomId?: string | number; + /** + * 设备编号 + */ + deviceNo?: string; + /** + * 设备名称 + */ + deviceName?: string; + /** + * 设备类型(0:电表,1:水表) + */ + deviceType?: string; + /** + * 通讯类型 + */ + communicationType?: string; + /** + * 计量单位(0:度,1:吨) + */ + unitName?: string; + /** + * 设备二维码内容 + */ + qrCode?: string; + /** + * 剩余金额 + */ + remainingBalance?: number; + /** + * 当前剩余量或电量 + */ + currentQuantity?: number; + /** + * 当前功率 + */ + currentPower?: number; + /** + * 当前单价 + */ + currentUnitPrice?: number; + /** + * 控制状态(0正常,1强制拉闸,2欠费拉闸,3离线) + */ + switchStatus?: string; + /** + * 在线状态(0离线 1在线) + */ + onlineStatus?: boolean; + /** + * 最后在线时间 + */ + lastOnlineTime?: string; + /** + * 最后抄表时间 + */ + lastReadingTime?: string; + /** + * 安装时间 + */ + installedAt?: string; + /** + * 设备状态(0正常 1禁用 2已删除) + */ + status?: boolean; + /** + * 备注 + */ + remark?: string; + /** + * 创建后台账号ID + */ + createBy?: number; + /** + * 创建时间 + */ + createTime?: string; + /** + * 更新后台账号ID + */ + updateBy?: number; + /** + * 更新时间 + */ + updateTime?: string; +} + +export interface DeviceQuery extends PageQuery { + /** + * 所属商户ID + */ + merchantId?: string | number; + /** + * 所属商户名称(列表展示用) + */ + merchantName?: string; + /** + * 当前房间ID + */ + roomId?: string | number; + /** + * 设备编号 + */ + deviceNo?: string; + /** + * 设备名称 + */ + deviceName?: string; + /** + * 设备类型(0:电表,1:水表) + */ + deviceType?: string; + /** + * 通讯类型 + */ + communicationType?: string; + /** + * 计量单位(0:度,1:吨) + */ + unitName?: string; + /** + * 设备二维码内容 + */ + qrCode?: string; + /** + * 剩余金额 + */ + remainingBalance?: number; + /** + * 当前剩余量或电量 + */ + currentQuantity?: number; + /** + * 当前功率 + */ + currentPower?: number; + /** + * 当前单价 + */ + currentUnitPrice?: number; + /** + * 控制状态(0正常,1强制拉闸,2欠费拉闸,3离线) + */ + switchStatus?: string; + /** + * 在线状态(0离线 1在线) + */ + onlineStatus?: boolean; + /** + * 最后在线时间 + */ + lastOnlineTime?: string; + /** + * 最后抄表时间 + */ + lastReadingTime?: string; + /** + * 安装时间 + */ + installedAt?: string; + /** + * 设备状态(0正常 1禁用 2已删除) + */ + status?: boolean; + /** + * 创建后台账号ID + */ + createBy?: number; + /** + * 创建时间 + */ + createTime?: string; + /** + * 更新后台账号ID + */ + updateBy?: number; + /** + * 更新时间 + */ + updateTime?: string; + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/assets/styles/components/_detail-panels.scss b/src/assets/styles/components/_detail-panels.scss new file mode 100644 index 0000000..0deb1e8 --- /dev/null +++ b/src/assets/styles/components/_detail-panels.scss @@ -0,0 +1,148 @@ +/* 用户详情页各页签共用的列表 / 卡片样式。 + 在组件 diff --git a/src/views/biz/appUser/components/detail/DeviceTab.vue b/src/views/biz/appUser/components/detail/DeviceTab.vue new file mode 100644 index 0000000..3d70c20 --- /dev/null +++ b/src/views/biz/appUser/components/detail/DeviceTab.vue @@ -0,0 +1,158 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/HistoryTab.vue b/src/views/biz/appUser/components/detail/HistoryTab.vue new file mode 100644 index 0000000..08e642c --- /dev/null +++ b/src/views/biz/appUser/components/detail/HistoryTab.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/PaymentTab.vue b/src/views/biz/appUser/components/detail/PaymentTab.vue new file mode 100644 index 0000000..3ed90d9 --- /dev/null +++ b/src/views/biz/appUser/components/detail/PaymentTab.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/ReadingTab.vue b/src/views/biz/appUser/components/detail/ReadingTab.vue new file mode 100644 index 0000000..1a28c70 --- /dev/null +++ b/src/views/biz/appUser/components/detail/ReadingTab.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/ResetTab.vue b/src/views/biz/appUser/components/detail/ResetTab.vue new file mode 100644 index 0000000..107420a --- /dev/null +++ b/src/views/biz/appUser/components/detail/ResetTab.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/UserSummaryCard.vue b/src/views/biz/appUser/components/detail/UserSummaryCard.vue new file mode 100644 index 0000000..389cc25 --- /dev/null +++ b/src/views/biz/appUser/components/detail/UserSummaryCard.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/views/biz/appUser/components/detail/helpers.ts b/src/views/biz/appUser/components/detail/helpers.ts new file mode 100644 index 0000000..5e6ad7b --- /dev/null +++ b/src/views/biz/appUser/components/detail/helpers.ts @@ -0,0 +1,33 @@ +import type { AppUserBindingVO } from '@/api/appUser/types'; + +/** 空值统一显示占位符 */ +export const valueOrDash = (value?: string | number | null) => (value === undefined || value === null || value === '' ? '—' : value); + +/** 日期展示成「2026年9月21日」 */ +export const formatDate = (value?: string) => { + if (!value) return '—'; + const matched = String(value).match(/^(\d{4})-(\d{1,2})-(\d{1,2})/); + return matched ? `${matched[1]}年${Number(matched[2])}月${Number(matched[3])}日` : String(value); +}; + +/** 计量单位:电表按度、水表按吨,优先后端 unitName */ +export const quantityUnit = (device: AppUserBindingVO) => { + if (String(device.unitName) === '0') return '度'; + if (String(device.unitName) === '1') return '吨'; + return String(device.deviceType) === '1' ? '吨' : '度'; +}; + +export const formatQuantity = (device: AppUserBindingVO) => + device.currentQuantity === undefined || device.currentQuantity === null ? '—' : `${device.currentQuantity}${quantityUnit(device)}`; + +export const formatPrice = (device: AppUserBindingVO) => + device.currentUnitPrice === undefined || device.currentUnitPrice === null + ? '—' + : `${device.currentUnitPrice}元/${quantityUnit(device)}`; + +/** 电表、水表分别用不同图标,其余统一用采集器图标 */ +export const deviceIcon = (device: AppUserBindingVO) => { + if (String(device.deviceType) === '0') return 'Lightning'; + if (String(device.deviceType) === '1') return 'Drizzling'; + return 'Monitor'; +}; diff --git a/src/views/biz/appUser/detail.vue b/src/views/biz/appUser/detail.vue new file mode 100644 index 0000000..bb9dec3 --- /dev/null +++ b/src/views/biz/appUser/detail.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/views/biz/appUser/index.vue b/src/views/biz/appUser/index.vue new file mode 100644 index 0000000..e4610bb --- /dev/null +++ b/src/views/biz/appUser/index.vue @@ -0,0 +1,210 @@ + + + + + + diff --git a/src/views/biz/device/components/DeviceFormDialog.vue b/src/views/biz/device/components/DeviceFormDialog.vue new file mode 100644 index 0000000..903267a --- /dev/null +++ b/src/views/biz/device/components/DeviceFormDialog.vue @@ -0,0 +1,122 @@ + + + diff --git a/src/views/biz/device/components/MeterReadingDialog.vue b/src/views/biz/device/components/MeterReadingDialog.vue new file mode 100644 index 0000000..44bd008 --- /dev/null +++ b/src/views/biz/device/components/MeterReadingDialog.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/views/biz/device/constants.ts b/src/views/biz/device/constants.ts new file mode 100644 index 0000000..6fbadf3 --- /dev/null +++ b/src/views/biz/device/constants.ts @@ -0,0 +1,47 @@ +import { toRefs, type Ref } from 'vue'; +import { useDict } from '@/utils/dict'; + +/** + * 设备模块字典:设备类型走后端字典管理(ur_device_type,字典项只有电表/水表), + * 控制状态后端字典尚未建立,先用本地兜底选项;列表页与详情页共用这里的定义。 + */ +export const DEVICE_TYPE_DICT = 'ur_device_type'; + +/** 设备类型字典(字典未加载时为空数组,类型列会回显原始值) */ +export const useDeviceTypeDict = () => { + return toRefs(useDict(DEVICE_TYPE_DICT))[DEVICE_TYPE_DICT] as Ref; +}; + +/** 控制状态(0正常,1强制拉闸,2欠费拉闸,3离线) */ +export const switchStatusOptions: DictDataOption[] = [ + { label: '正常', value: '0', elTagType: 'success' }, + { label: '强制拉闸', value: '1', elTagType: 'danger' }, + { label: '欠费拉闸', value: '2', elTagType: 'warning' }, + { label: '离线', value: '3', elTagType: 'info' } +]; + +/** 只有电表、水表支持清零/抄表/拉闸 */ +export const METER_TYPES = ['0', '1']; + +/** 已拉闸的状态:强制拉闸、欠费拉闸 */ +export const CUT_OFF_STATUS = ['1', '2']; + +/** 是否水表:deviceType 为 1 表示水表,0 为电表 */ +export const isWaterMeter = (deviceType?: string) => String(deviceType) === '1'; + +/** 恢复文案:水表叫恢复供水,电表叫恢复供电(拉闸动作水电统一叫拉闸) */ +export const getRestoreLabel = (deviceType?: string) => (isWaterMeter(deviceType) ? '恢复供水' : '恢复供电'); + +/** 设备类型文案:字典里找不到时回显原始值 */ +export const getDeviceTypeLabel = (options: DictDataOption[], value?: string) => { + return options.find(item => item.value === String(value))?.label || (value ? String(value) : '—'); +}; + +/** 控制状态选项 */ +export const getSwitchStatusOption = (value?: string) => switchStatusOptions.find(item => item.value === String(value)); + +/** 控制状态文案 */ +export const getSwitchStatusLabel = (value?: string) => getSwitchStatusOption(value)?.label || '—'; + +/** 控制状态配色 */ +export const getSwitchStatusClass = (value?: string) => `switch-status--${getSwitchStatusOption(value)?.elTagType || 'info'}`; diff --git a/src/views/biz/device/detail.vue b/src/views/biz/device/detail.vue new file mode 100644 index 0000000..1d5b351 --- /dev/null +++ b/src/views/biz/device/detail.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue new file mode 100644 index 0000000..cc81fa1 --- /dev/null +++ b/src/views/biz/device/index.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/src/views/biz/help/index.vue b/src/views/biz/help/index.vue new file mode 100644 index 0000000..9f375c1 --- /dev/null +++ b/src/views/biz/help/index.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/src/views/biz/income/index.vue b/src/views/biz/income/index.vue new file mode 100644 index 0000000..de25bc4 --- /dev/null +++ b/src/views/biz/income/index.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/src/views/biz/merchant/index.vue b/src/views/biz/merchant/index.vue new file mode 100644 index 0000000..c7000e5 --- /dev/null +++ b/src/views/biz/merchant/index.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/views/biz/withdrawal/index.vue b/src/views/biz/withdrawal/index.vue new file mode 100644 index 0000000..0039637 --- /dev/null +++ b/src/views/biz/withdrawal/index.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/src/views/login.vue b/src/views/login.vue index c67483f..a3f9276 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,96 +1,97 @@ @@ -98,9 +99,7 @@ import { to } from 'await-to-js'; import { useI18n } from 'vue-i18n'; import { getCodeImg } from '@/api/login'; -import { authRouterUrl } from '@/api/system/social/auth'; import { LoginData } from '@/api/types'; -import { HttpStatus } from '@/enums/RespEnum'; import { useUserStore } from '@/store/modules/user'; const title = import.meta.env.VITE_APP_TITLE; @@ -201,23 +200,13 @@ const getLoginData = () => { const rememberMe = localStorage.getItem('rememberMe'); localStorage.removeItem('password'); loginForm.value = { - // 仅回填勾选“记住密码”时保存的用户名,密码一律不回填 + // 仅回填勾选“记住账号”时保存的用户名,密码一律不回填 username: username === null ? '' : username, password: '', rememberMe: rememberMe === 'true' } as LoginData; }; -const doSocialLogin = (type: string) => { - authRouterUrl(type).then((res: any) => { - if (res.code === HttpStatus.SUCCESS) { - window.location.href = res.data; - } else { - ElMessage.error(res.msg); - } - }); -}; - onMounted(() => { getCode(); getLoginData(); @@ -226,93 +215,191 @@ onMounted(() => {