Commit bbb010f2 by Jaxon

refactor: 调整eslint规则,格式化aus-app

1 parent 064099dd
Showing 115 changed files with 1832 additions and 1670 deletions
module.exports = { module.exports = {
presets: [ presets: [
'@vue/cli-plugin-babel/preset' "@vue/cli-plugin-babel/preset"
] ]
} };
/// <reference types='@dcloudio/types' /> // / <reference types='@dcloudio/types' />
import 'vue' import "vue";
declare module '@vue/runtime-core' { declare module "@vue/runtime-core" {
type Hooks = App.AppInstance & Page.PageInstance; type Hooks = App.AppInstance & Page.PageInstance;
interface ComponentCustomOptions extends Hooks { type ComponentCustomOptions = Hooks;
}
} }
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs'; import { AccountInfo } from "lib/src/entity/account/domain/AccountInfo";
import { AccountProfile } from "lib/src/entity/account/domain/AccountProfile";
// region 前端扩展导入包 // region 前端扩展导入包
import {Account} from "lib/src/entity/account/entity/Account"; import { Account } from "lib/src/entity/account/entity/Account";
import {AccountTag} from "lib/src/entity/account/entity/AccountTag"; import { AccountTag } from "lib/src/entity/account/entity/AccountTag";
import {AccountProfile} from "lib/src/entity/account/domain/AccountProfile";
import {Page} from "autumn-vue/lib/core/page/Page";
import {AccountInfo} from "lib/src/entity/account/domain/AccountInfo";
// endregion // endregion
/** /**
* 个人账户(Account) PI接口 * 个人账户(Account) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AccountController{ export const AccountController= {
/** /**
*/ */
static certifyAccount(axios:AxiosStatic, certification: any): Promise<AxiosResponse<Account>> { certifyAccount(axios:AxiosStatic, certification: any): Promise<AxiosResponse<Account>> {
return axios.post('account/certifyAccount', certification); return axios.post("account/certifyAccount", certification);
} },
/** /**
* 根据id查询用户分组 * 根据id查询用户分组
* @param groupId * @param groupId
* @return AccountTag * @return AccountTag
*/ */
static getAccountGroupById(axios:AxiosStatic, groupId: number): Promise<AxiosResponse<AccountTag>> { getAccountGroupById(axios:AxiosStatic, groupId: number): Promise<AxiosResponse<AccountTag>> {
return axios.get('account/getAccountGroupById', {params: {groupId: groupId}}); return axios.get("account/getAccountGroupById", { params: { groupId } });
} },
/** /**
* 查询个人账户信息 * 查询个人账户信息
* @param account * @param account
* @return AccountInfo * @return AccountInfo
*/ */
static getAccountInfo(axios:AxiosStatic): Promise<AxiosResponse<AccountInfo>> { getAccountInfo(axios:AxiosStatic): Promise<AxiosResponse<AccountInfo>> {
return axios.get('account/getAccountInfo'); return axios.get("account/getAccountInfo");
} },
/** /**
* 根据id查询个人账户 * 根据id查询个人账户
* @param account * @param account
* @return AccountProfile * @return AccountProfile
*/ */
static getAccountProfile(axios:AxiosStatic): Promise<AxiosResponse<AccountProfile>> { getAccountProfile(axios:AxiosStatic): Promise<AxiosResponse<AccountProfile>> {
return axios.get('account/getAccountProfile'); return axios.get("account/getAccountProfile");
} },
/** /**
*/ */
static getLoginAccount(axios:AxiosStatic): Promise<AxiosResponse<Account>> { getLoginAccount(axios:AxiosStatic): Promise<AxiosResponse<Account>> {
return axios.get('account/getLoginAccount'); return axios.get("account/getLoginAccount");
} },
/** /**
*/ */
static updateAccountAvatar(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> { updateAccountAvatar(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> {
return axios.post('account/updateAccountAvatar', accountInfo); return axios.post("account/updateAccountAvatar", accountInfo);
} },
/** /**
*/ */
static updateAccountCityCode(axios:AxiosStatic, cityCode: string): Promise<AxiosResponse<string>> { updateAccountCityCode(axios:AxiosStatic, cityCode: string): Promise<AxiosResponse<string>> {
return axios.post('account/updateAccountCityCode', null, {params: {cityCode: cityCode}}); return axios.post("account/updateAccountCityCode", null, { params: { cityCode } });
} },
/** /**
* 修改个人账户 * 修改个人账户
* @param account * @param account
* @return Account * @return Account
*/ */
static updateAccountInfo(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> { updateAccountInfo(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> {
return axios.post('account/updateAccountInfo', accountInfo); return axios.post("account/updateAccountInfo", accountInfo);
} },
/** /**
*/ */
static updateAccountNickName(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> { updateAccountNickName(axios:AxiosStatic, accountInfo: any): Promise<AxiosResponse<Account>> {
return axios.post('account/updateAccountNickName', accountInfo); return axios.post("account/updateAccountNickName", accountInfo);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Agreement} from "lib/src/entity/business/entity/Agreement"; import { Agreement } from "lib/src/entity/business/entity/Agreement";
// endregion // endregion
/** /**
* 协议管理(Agreement) PI接口 * 协议管理(Agreement) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AgreementController{ export const AgreementController= {
/** /**
* 根据id查询协议管理 * 根据id查询协议管理
* @param agreementKey * @param agreementKey
* @return Agreement * @return Agreement
*/ */
static getAgreementByKey(axios:AxiosStatic, agreementKey: any): Promise<AxiosResponse<Agreement>> { getAgreementByKey(axios:AxiosStatic, agreementKey: any): Promise<AxiosResponse<Agreement>> {
return axios.get('agreement/getAgreementByKey', {params: {agreementKey: agreementKey}}); return axios.get("agreement/getAgreementByKey", { params: { agreementKey } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Appeal} from "lib/src/entity/auction/entity/Appeal"; import { Appeal } from "lib/src/entity/auction/entity/Appeal";
// endregion // endregion
/** /**
* 申诉(Appeal) PI接口 * 申诉(Appeal) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AppealController{ export const AppealController= {
/** /**
* 新增申诉 * 新增申诉
* @param appeal * @param appeal
* @return Appeal * @return Appeal
*/ */
static addAppeal(axios:AxiosStatic, appeal: any): Promise<AxiosResponse<Appeal>> { addAppeal(axios:AxiosStatic, appeal: any): Promise<AxiosResponse<Appeal>> {
return axios.post('appeal/addAppeal', appeal); return axios.post("appeal/addAppeal", appeal);
} },
/** /**
* 根据id查询申诉 * 根据id查询申诉
* @param appealId * @param appealId
* @return Appeal * @return Appeal
*/ */
static getAppealById(axios:AxiosStatic, appealId: number): Promise<AxiosResponse<Appeal>> { getAppealById(axios:AxiosStatic, appealId: number): Promise<AxiosResponse<Appeal>> {
return axios.get('appeal/getAppealById', {params: {appealId: appealId}}); return axios.get("appeal/getAppealById", { params: { appealId } });
} },
/** /**
*/ */
static getAppealByOrderId(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<Appeal>> { getAppealByOrderId(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<Appeal>> {
return axios.get('appeal/getAppealByOrderId', {params: {orderId: orderId}}); return axios.get("appeal/getAppealByOrderId", { params: { orderId } });
} },
/** /**
* 分页查询申诉 * 分页查询申诉
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAppeal(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Appeal>>> { pageAppeal(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Appeal>>> {
return axios.post('appeal/pageAppeal', pagination); return axios.post("appeal/pageAppeal", pagination);
} },
static PAGE_APPEAL = 'appeal/pageAppeal'; PAGE_APPEAL : "appeal/pageAppeal",
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import type { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import type {Auction} from "lib/src/entity/auction/entity/Auction"; import type { Auction } from "lib/src/entity/auction/entity/Auction";
import type {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle"; import type { AuctionVehicle } from "lib/src/entity/auction/entity/AuctionVehicle";
import type {Page} from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
// endregion // endregion
/** /**
* 拍卖场次(Auction) PI接口 * 拍卖场次(Auction) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AuctionController{ export const AuctionController= {
/** /**
* 根据id查询拍卖场次 * 根据id查询拍卖场次
* @param auctionId * @param auctionId
* @return Auction * @return Auction
*/ */
static getAuctionById(axios:AxiosStatic, auctionId: number): Promise<AxiosResponse<Auction>> { getAuctionById(axios:AxiosStatic, auctionId: number): Promise<AxiosResponse<Auction>> {
return axios.get('auction/getAuctionById', {params: {auctionId: auctionId}}); return axios.get("auction/getAuctionById", { params: { auctionId } });
} },
/** /**
* 根据id查询拍卖车辆 * 根据id查询拍卖车辆
* @param aucvehId * @param aucvehId
* @return AuctionVehicle * @return AuctionVehicle
*/ */
static getAuctionVehicleById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<AuctionVehicle>> { getAuctionVehicleById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<AuctionVehicle>> {
return axios.get('auction/getAuctionVehicleById', {params: {aucvehId: aucvehId}}); return axios.get("auction/getAuctionVehicleById", { params: { aucvehId } });
} },
/** /**
* 根据id查询拍卖车辆详情 * 根据id查询拍卖车辆详情
* @param aucvehId * @param aucvehId
* @param account * @param account
* @return AuctionVehicle * @return AuctionVehicle
*/ */
static getAuctionVehicleDetailById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<AuctionVehicle>> { getAuctionVehicleDetailById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<AuctionVehicle>> {
return axios.get('auction/getAuctionVehicleDetailById', {params: {aucvehId: aucvehId}}); return axios.get("auction/getAuctionVehicleDetailById", { params: { aucvehId } });
} },
/** /**
* 分页查询暗拍卖车辆 * 分页查询暗拍卖车辆
* @param pagination * @param pagination
* @param account * @param account
* @return Page * @return Page
*/ */
static pageDarkAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> { pageDarkAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> {
return axios.post('auction/pageDarkAuctionVehicle', pagination); return axios.post("auction/pageDarkAuctionVehicle", pagination);
} },
static PAGE_DARK_AUCTION_VEHICLE = 'auction/pageDarkAuctionVehicle'; PAGE_DARK_AUCTION_VEHICLE : "auction/pageDarkAuctionVehicle",
/** /**
* 分页查询明拍卖场次 * 分页查询明拍卖场次
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageLightAuction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Auction>>> { pageLightAuction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Auction>>> {
return axios.post('auction/pageLightAuction', pagination); return axios.post("auction/pageLightAuction", pagination);
} },
static PAGE_LIGHT_AUCTION = 'auction/pageLightAuction'; PAGE_LIGHT_AUCTION : "auction/pageLightAuction",
/** /**
* 分页查询拍卖车辆 * 分页查询拍卖车辆
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageLightAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> { pageLightAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> {
return axios.post('auction/pageLightAuctionVehicle', pagination); return axios.post("auction/pageLightAuctionVehicle", pagination);
} },
static PAGE_LIGHT_AUCTION_VEHICLE = 'auction/pageLightAuctionVehicle'; PAGE_LIGHT_AUCTION_VEHICLE : "auction/pageLightAuctionVehicle",
/** /**
* 首页随机排序拍卖车辆 * 首页随机排序拍卖车辆
* @param pagination * @param pagination
* @param account * @param account
* @return Page * @return Page
*/ */
static pageRandomAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> { pageRandomAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> {
return axios.post('auction/pageRandomAuctionVehicle', pagination); return axios.post("auction/pageRandomAuctionVehicle", pagination);
} },
static PAGE_RANDOM_AUCTION_VEHICLE = 'auction/pageRandomAuctionVehicle'; PAGE_RANDOM_AUCTION_VEHICLE : "auction/pageRandomAuctionVehicle",
/** /**
* 搜索拍卖车辆 * 搜索拍卖车辆
* @param pagination * @param pagination
* @param account * @param account
* @return Page * @return Page
*/ */
static searchAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> { searchAuctionVehicle(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionVehicle>>> {
return axios.post('auction/searchAuctionVehicle', pagination); return axios.post("auction/searchAuctionVehicle", pagination);
} },
static SEARCH_AUCTION_VEHICLE = 'auction/searchAuctionVehicle'; SEARCH_AUCTION_VEHICLE : "auction/searchAuctionVehicle",
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs'; import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder"; import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import type {AuctionOrder_OrderState} from "lib/src/entity/auction/entity/AuctionOrder"; import { Contract } from "lib/src/entity/auction/entity/Contract";
import {Page} from "autumn-vue/lib/core/page/Page";
import {Contract} from "lib/src/entity/auction/entity/Contract";
// endregion // endregion
/** /**
* 拍卖订单(AuctionOrder) PI接口 * 拍卖订单(AuctionOrder) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class AuctionOrderController{ export const AuctionOrderController= {
/** /**
* 发起E签宝合国签署流程 * 发起E签宝合国签署流程
* @param signOrder * @param signOrder
* @return Contract * @return Contract
*/ */
static esignAuctionOrderContract(axios:AxiosStatic, signOrder: any): Promise<AxiosResponse<Contract>> { esignAuctionOrderContract(axios:AxiosStatic, signOrder: any): Promise<AxiosResponse<Contract>> {
return axios.post('order/esignAuctionOrderContract', signOrder); return axios.post("order/esignAuctionOrderContract", signOrder);
} },
/** /**
* 根据id查询拍卖订单 * 根据id查询拍卖订单
* @param orderId * @param orderId
* @return AuctionOrder * @return AuctionOrder
*/ */
static getAuctionOrderById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> { getAuctionOrderById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> {
return axios.get('order/getAuctionOrderById', {params: {orderId: orderId}}); return axios.get("order/getAuctionOrderById", { params: { orderId } });
} },
/** /**
* 取消拍卖订单 * 取消拍卖订单
* @param vehicleId * @param vehicleId
* @return int * @return int
*/ */
static getAuctionOrderByVehicleId(axios:AxiosStatic, vehicleId: number): Promise<AxiosResponse<number>> { getAuctionOrderByVehicleId(axios:AxiosStatic, vehicleId: number): Promise<AxiosResponse<number>> {
return axios.get('order/getAuctionOrderByVehicleId', {params: {vehicleId: vehicleId}}); return axios.get("order/getAuctionOrderByVehicleId", { params: { vehicleId } });
} },
/** /**
*/ */
static getAuctionOrderDetailById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> { getAuctionOrderDetailById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> {
return axios.get('order/getAuctionOrderDetailById', {params: {orderId: orderId}}); return axios.get("order/getAuctionOrderDetailById", { params: { orderId } });
} },
/** /**
* 查询订单状态,用于轮循操作 * 查询订单状态,用于轮循操作
* @param orderId * @param orderId
* @return AuctionOrder.OrderState * @return AuctionOrder.OrderState
*/ */
static getAuctionOrderStateById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder.OrderState>> { getAuctionOrderStateById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder.OrderState>> {
return axios.get('order/getAuctionOrderStateById', {params: {orderId: orderId}}); return axios.get("order/getAuctionOrderStateById", { params: { orderId } });
} },
/** /**
*/ */
static getContractsByOrderId(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<Contract[]>> { getContractsByOrderId(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<Contract[]>> {
return axios.get('order/getContractsByOrderId', {params: {orderId: orderId}}); return axios.get("order/getContractsByOrderId", { params: { orderId } });
} },
/** /**
*/ */
static getLatestAuctionOrders(axios:AxiosStatic): Promise<AxiosResponse<AuctionOrder[]>> { getLatestAuctionOrders(axios:AxiosStatic): Promise<AxiosResponse<AuctionOrder[]>> {
return axios.get('order/getLatestAuctionOrders'); return axios.get("order/getLatestAuctionOrders");
} },
/** /**
* 分页查询拍卖订单 * 分页查询拍卖订单
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageAuctionOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionOrder>>> { pageAuctionOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionOrder>>> {
return axios.post('order/pageAuctionOrder', pagination); return axios.post("order/pageAuctionOrder", pagination);
} },
static PAGE_AUCTION_ORDER = 'order/pageAuctionOrder'; PAGE_AUCTION_ORDER : "order/pageAuctionOrder",
/** /**
* 上传过户资料 * 上传过户资料
* @param auctionOrder * @param auctionOrder
* @return AuctionOrder * @return AuctionOrder
* @throws FieldException * @throws FieldException
*/ */
static uploadTransferAuctionOrder(axios:AxiosStatic, auctionOrder: any): Promise<AxiosResponse<AuctionOrder>> { uploadTransferAuctionOrder(axios:AxiosStatic, auctionOrder: any): Promise<AxiosResponse<AuctionOrder>> {
return axios.post('order/uploadTransferAuctionOrder', auctionOrder); return axios.post("order/uploadTransferAuctionOrder", auctionOrder);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {BankAccount} from "lib/src/entity/finance/entity/BankAccount"; import { BankAccount } from "lib/src/entity/finance/entity/BankAccount";
// endregion // endregion
/** /**
* 银行账户(BankAccount) PI接口 * 银行账户(BankAccount) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-19 11:05:09 * @since 2025-10-19 11:05:09
*/ */
export class BankAccountController{ export const BankAccountController= {
/** /**
* 根据id查询银行账户 * 根据id查询银行账户
* @param accountId * @param accountId
* @return BankAccount * @return BankAccount
*/ */
static getBankAccountById(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<BankAccount>> { getBankAccountById(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<BankAccount>> {
return axios.get('bankAccount/getBankAccountById', {params: {accountId: accountId}}); return axios.get("bankAccount/getBankAccountById", { params: { accountId } });
} },
/** /**
* 查询全部启用$银行账户 * 查询全部启用$银行账户
* @return BankAccount * @return BankAccount
*/ */
static getEnableBankAccount(axios:AxiosStatic, accountType: any): Promise<AxiosResponse<BankAccount>> { getEnableBankAccount(axios:AxiosStatic, accountType: any): Promise<AxiosResponse<BankAccount>> {
return axios.get('bankAccount/getEnableBankAccount', {params: {accountType: accountType}}); return axios.get("bankAccount/getEnableBankAccount", { params: { accountType } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs'; import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {Bid} from "lib/src/entity/auction/entity/Bid"; import { Bid } from "lib/src/entity/auction/entity/Bid";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion // endregion
/** /**
* 投标竞价(Bid) PI接口 * 投标竞价(Bid) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class BidController{ export const BidController= {
/** /**
* 新增投标竞价 * 新增投标竞价
* @param bidRequest * @param bidRequest
* @return Bid * @return Bid
*/ */
static addBid(axios:AxiosStatic, bidRequest: any): Promise<AxiosResponse<Bid>> { addBid(axios:AxiosStatic, bidRequest: any): Promise<AxiosResponse<Bid>> {
return axios.post('bid/addBid', bidRequest); return axios.post("bid/addBid", bidRequest);
} },
/** /**
* 根据id查询投标竞价 * 根据id查询投标竞价
* @param bidId * @param bidId
* @return Bid * @return Bid
*/ */
static getBidById(axios:AxiosStatic, bidId: number): Promise<AxiosResponse<Bid>> { getBidById(axios:AxiosStatic, bidId: number): Promise<AxiosResponse<Bid>> {
return axios.get('bid/getBidById', {params: {bidId: bidId}}); return axios.get("bid/getBidById", { params: { bidId } });
} },
/** /**
*/ */
static getBidsByAuctionVehicle(axios:AxiosStatic, aucvehId: number, auctionType: any): Promise<AxiosResponse<Bid[]>> { getBidsByAuctionVehicle(axios:AxiosStatic, aucvehId: number, auctionType: any): Promise<AxiosResponse<Bid[]>> {
return axios.get('bid/getBidsByAuctionVehicle', {params: {aucvehId: aucvehId,auctionType: auctionType}}); return axios.get("bid/getBidsByAuctionVehicle", { params: { aucvehId, auctionType } });
} },
/** /**
*/ */
static getLastedBidByLoginAccount(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<Bid>> { getLastedBidByLoginAccount(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<Bid>> {
return axios.get('bid/getLastedBidByLoginAccount', {params: {aucvehId: aucvehId}}); return axios.get("bid/getLastedBidByLoginAccount", { params: { aucvehId } });
} },
/** /**
* 分页查询投标竞价 * 分页查询投标竞价
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageBid(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Bid>>> { pageBid(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Bid>>> {
return axios.post('bid/pageBid', pagination); return axios.post("bid/pageBid", pagination);
} },
static PAGE_BID = 'bid/pageBid'; PAGE_BID : "bid/pageBid",
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Carousel} from "lib/src/entity/business/entity/Carousel"; import { Carousel } from "lib/src/entity/business/entity/Carousel";
// endregion // endregion
/** /**
* 轮播图(Carousel) PI接口 * 轮播图(Carousel) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class CarouselController{ export const CarouselController= {
/** /**
* 分页查询轮播图 * 分页查询轮播图
* @return List * @return List
*/ */
static getMiniappCarouselByDate(axios:AxiosStatic): Promise<AxiosResponse<Carousel[]>> { getMiniappCarouselByDate(axios:AxiosStatic): Promise<AxiosResponse<Carousel[]>> {
return axios.get('carousel/getMiniappCarouselByDate'); return axios.get("carousel/getMiniappCarouselByDate");
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs, {Dayjs} from 'dayjs'; import { BusinessConfig } from "lib/src/entity/business/domain/BusinessConfig";
import { DarkBidPriceRange } from "lib/src/entity/business/domain/DarkBidPriceRange";
// region 前端扩展导入包 // region 前端扩展导入包
import {LightBidPriceRange} from "lib/src/entity/business/domain/LightBidPriceRange"; import { LightBidPriceRange } from "lib/src/entity/business/domain/LightBidPriceRange";
import {BusinessConfig} from "lib/src/entity/business/domain/BusinessConfig";
import {DarkBidPriceRange} from "lib/src/entity/business/domain/DarkBidPriceRange";
// endregion // endregion
/** /**
*/ */
export class ConfigController { export const ConfigController = {
/** /**
* 查询SystemConfig * 查询SystemConfig
* @return BusinessConfig * @return BusinessConfig
*/ */
static getBusinessConfig(axios: AxiosStatic): Promise<AxiosResponse<BusinessConfig>> { getBusinessConfig(axios: AxiosStatic): Promise<AxiosResponse<BusinessConfig>> {
return axios.get('config/getBusinessConfig'); return axios.get("config/getBusinessConfig");
} },
/** /**
*/ */
static getDarkBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<DarkBidPriceRange>> { getDarkBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<DarkBidPriceRange>> {
return axios.get('config/getDarkBidPriceRange'); return axios.get("config/getDarkBidPriceRange");
} },
/** /**
*/ */
static getLightBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<LightBidPriceRange>> { getLightBidPriceRange(axios: AxiosStatic): Promise<AxiosResponse<LightBidPriceRange>> {
return axios.get('config/getLightBidPriceRange'); return axios.get("config/getLightBidPriceRange");
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Diction } from "autumn-vue/lib/core/dictionary/Diction";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import {Dictionary} from "autumn-vue/lib/core/dictionary/Dictionary"; import { Dictionary } from "autumn-vue/lib/core/dictionary/Dictionary";
import {Diction} from "autumn-vue/lib/core/dictionary/Diction"; import { AxiosResponse, AxiosStatic } from "axios";
// endregion // endregion
/** /**
* 字典表(Dictionary) 控制层 * 字典表(Dictionary) 控制层
* @author gonglei * @author gonglei
* @since 2022-04-18 16:06:57 * @since 2022-04-18 16:06:57
*/ */
export class DictionaryController{ export const DictionaryController= {
/** /**
* 查询全部启用字典表 * 查询全部启用字典表
* @param dictionaryName * @param dictionaryName
* @return List * @return List
*/ */
static getDictionariesByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Dictionary[]>> { getDictionariesByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Dictionary[]>> {
return axios.get('dictionary/getDictionariesByName', {params: {dictionaryName: dictionaryName}}); return axios.get("dictionary/getDictionariesByName", { params: { dictionaryName } });
} },
/** /**
* 查询租户下简单字典表 * 查询租户下简单字典表
* @param dictionaryName * @param dictionaryName
* @return List * @return List
*/ */
static getEnabledDictionsByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Diction[]>> { getEnabledDictionsByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Diction[]>> {
return axios.get('dictionary/getEnabledDictionsByName', {params: {dictionaryName: dictionaryName}}); return axios.get("dictionary/getEnabledDictionsByName", { params: { dictionaryName } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
// endregion // endregion
/** /**
*/ */
export class ESignController{ export const ESignController= {
/** /**
* E签宝回调 * E签宝回调
* @param signMissionComplete * @param signMissionComplete
* @return String * @return String
*/ */
static notify(axios:AxiosStatic, signMissionComplete: any): Promise<AxiosResponse<string>> { notify(axios:AxiosStatic, signMissionComplete: any): Promise<AxiosResponse<string>> {
return axios.post('/esign/notify', signMissionComplete); return axios.post("/esign/notify", signMissionComplete);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs'; import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {Favorite} from "lib/src/entity/account/entity/Favorite"; import { Favorite } from "lib/src/entity/account/entity/Favorite";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion // endregion
/** /**
* 收藏(Favorite) PI接口 * 收藏(Favorite) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class FavoriteController{ export const FavoriteController= {
/** /**
* 根据id查询收藏 * 根据id查询收藏
* @param aucvehId * @param aucvehId
* @return int * @return int
*/ */
static getFavoriteCountByAucvehId(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<number>> { getFavoriteCountByAucvehId(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<number>> {
return axios.get('favorite/getFavoriteCountByAucvehId', {params: {aucvehId: aucvehId}}); return axios.get("favorite/getFavoriteCountByAucvehId", { params: { aucvehId } });
} },
/** /**
* 分页查询收藏 * 分页查询收藏
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageFavorite(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Favorite>>> { pageFavorite(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Favorite>>> {
return axios.post('favorite/pageFavorite', pagination); return axios.post("favorite/pageFavorite", pagination);
} },
static PAGE_FAVORITE = 'favorite/pageFavorite'; PAGE_FAVORITE : "favorite/pageFavorite",
/** /**
* 删除收藏 * 删除收藏
* @param aucvehId * @param aucvehId
* @return int * @return int
*/ */
static removeFavoriteById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<number>> { removeFavoriteById(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<number>> {
return axios.delete('favorite/removeFavoriteById', {params: {aucvehId: aucvehId}}); return axios.delete("favorite/removeFavoriteById", { params: { aucvehId } });
} },
/** /**
* 新增收藏 * 新增收藏
* @param aucvehId * @param aucvehId
* @return boolean * @return boolean
*/ */
static toggleFavorite(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<boolean>> { toggleFavorite(axios:AxiosStatic, aucvehId: number): Promise<AxiosResponse<boolean>> {
return axios.post('favorite/toggleFavorite', null, {params: {aucvehId: aucvehId}}); return axios.post("favorite/toggleFavorite", null, { params: { aucvehId } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
// endregion // endregion
/** /**
*/ */
export class GscApiController{ export const GscApiController= {
/** /**
*/ */
static getCarBrandComplete(axios:AxiosStatic): Promise<AxiosResponse<string>> { getCarBrandComplete(axios:AxiosStatic): Promise<AxiosResponse<string>> {
return axios.get('gsc/getCarBrandComplete'); return axios.get("gsc/getCarBrandComplete");
} },
/** /**
*/ */
static getCarTypeList(axios:AxiosStatic, csId: string): Promise<AxiosResponse<string>> { getCarTypeList(axios:AxiosStatic, csId: string): Promise<AxiosResponse<string>> {
return axios.get('gsc/getCarTypeList', {params: {csId: csId}}); return axios.get("gsc/getCarTypeList", { params: { csId } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
import Authenticity from "autumn-vue/lib/core/security/Authenticity"; import Authenticity from "autumn-vue/lib/core/security/Authenticity";
import { AxiosResponse, AxiosStatic } from "axios";
// endregion // endregion
/** /**
*/ */
export class LoginController{ export const LoginController= {
/** /**
* 个人账户修改手机原号码校验 * 个人账户修改手机原号码校验
* @param loginRequest * @param loginRequest
* @param request * @param request
* @return String * @return String
* @throws FieldException * @throws FieldException
*/ */
static checkSmsCode(axios:AxiosStatic, loginRequest: any): Promise<AxiosResponse<string>> { checkSmsCode(axios:AxiosStatic, loginRequest: any): Promise<AxiosResponse<string>> {
return axios.post('/api/checkSmsCode', loginRequest); return axios.post("/api/checkSmsCode", loginRequest);
} },
/** /**
* 个人账户修改手机新号码校验 * 个人账户修改手机新号码校验
* @param loginRequest * @param loginRequest
* @param request * @param request
...@@ -28,36 +27,36 @@ export class LoginController{ ...@@ -28,36 +27,36 @@ export class LoginController{
* @return boolean * @return boolean
* @throws FieldException * @throws FieldException
*/ */
static checkSmsCodeByNewMobile(axios:AxiosStatic, loginRequest: any): Promise<AxiosResponse<boolean>> { checkSmsCodeByNewMobile(axios:AxiosStatic, loginRequest: any): Promise<AxiosResponse<boolean>> {
return axios.post('/api/checkSmsCodeByNewMobile', loginRequest); return axios.post("/api/checkSmsCodeByNewMobile", loginRequest);
} },
/** /**
*/ */
static doLogin(axios:AxiosStatic): Promise<AxiosResponse<Authenticity>> { doLogin(axios:AxiosStatic): Promise<AxiosResponse<Authenticity>> {
return axios.post('/api/login', null); return axios.post("/api/login", null);
} },
/** /**
* 个人账户中绑定微信号 * 个人账户中绑定微信号
* @param ticket * @param ticket
* @param login * @param login
* @return boolean * @return boolean
* @throws FieldException * @throws FieldException
*/ */
static getQrCodeStatus(axios:AxiosStatic, ticket: string): Promise<AxiosResponse<boolean>> { getQrCodeStatus(axios:AxiosStatic, ticket: string): Promise<AxiosResponse<boolean>> {
return axios.get('/api/getQrCodeStatus', {params: {ticket: ticket}}); return axios.get("/api/getQrCodeStatus", { params: { ticket } });
} },
/** /**
* <pre> * <pre>
小程序手机号登录 小程序手机号登录
</pre> </pre>
*/ */
static phone(axios:AxiosStatic, maLoginRequest: any): Promise<AxiosResponse<AccountInfo>> { phone(axios:AxiosStatic, maLoginRequest: any): Promise<AxiosResponse<AccountInfo>> {
return axios.post('/api//ma/{appid}/phoneLogin', maLoginRequest); return axios.post("/api//ma/{appid}/phoneLogin", maLoginRequest);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import type { WxPayUnifiedOrderV3Result } from "lib/src/domain/WxPayUnifiedOrderV3Result";
import dayjs,{Dayjs} from 'dayjs';
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {ResponseEntity} from "lib/src/domain/ResponseEntity";
import type {WxPayUnifiedOrderV3Result} from "lib/src/domain/WxPayUnifiedOrderV3Result";
// endregion // endregion
/** /**
*/ */
export class RechargeController{ export const RechargeController= {
/** /**
* 充值接口 * 充值接口
详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856
* @param recharge * @param recharge
* @param account * @param account
* @return WxPayUnifiedOrderV3Result.JsapiResult * @return WxPayUnifiedOrderV3Result.JsapiResult
*/ */
static addRecharge(axios:AxiosStatic, recharge: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> { addRecharge(axios:AxiosStatic, recharge: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> {
return axios.post('recharge/addRecharge', recharge); return axios.post("recharge/addRecharge", recharge);
} },
/** /**
* 调用统一下单接口(JSAPI) * 调用统一下单接口(JSAPI)
详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856 详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856
*/ */
static createOrder(axios:AxiosStatic, request: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> { createOrder(axios:AxiosStatic, request: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> {
return axios.post('recharge/createOrder', request); return axios.post("recharge/createOrder", request);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs'; import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {ReleaseOrder} from "lib/src/entity/auction/entity/ReleaseOrder"; import { ReleaseOrder } from "lib/src/entity/auction/entity/ReleaseOrder";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion // endregion
/** /**
* 解押订单(ReleaseOrder) PI接口 * 解押订单(ReleaseOrder) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class ReleaseOrderController{ export const ReleaseOrderController= {
/** /**
* 根据id查询解押订单 * 根据id查询解押订单
* @param orderId * @param orderId
* @return ReleaseOrder * @return ReleaseOrder
*/ */
static getReleaseOrderById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<ReleaseOrder>> { getReleaseOrderById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<ReleaseOrder>> {
return axios.get('order/getReleaseOrderById', {params: {orderId: orderId}}); return axios.get("order/getReleaseOrderById", { params: { orderId } });
} },
/** /**
* 分页查询解押订单 * 分页查询解押订单
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageReleaseOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ReleaseOrder>>> { pageReleaseOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ReleaseOrder>>> {
return axios.post('order/pageReleaseOrder', pagination); return axios.post("order/pageReleaseOrder", pagination);
} },
static PAGE_RELEASE_ORDER = 'order/pageReleaseOrder'; PAGE_RELEASE_ORDER : "order/pageReleaseOrder",
/** /**
* 修改解押订单 * 修改解押订单
* @param releaseOrder * @param releaseOrder
* @return ReleaseOrder * @return ReleaseOrder
*/ */
static updateReleaseOrder(axios:AxiosStatic, releaseOrder: any): Promise<AxiosResponse<ReleaseOrder>> { updateReleaseOrder(axios:AxiosStatic, releaseOrder: any): Promise<AxiosResponse<ReleaseOrder>> {
return axios.post('order/updateReleaseOrder', releaseOrder); return axios.post("order/updateReleaseOrder", releaseOrder);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { AxiosResponse, AxiosStatic } from "axios";
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
// endregion // endregion
/** /**
* @author kepler * @author kepler
*/ */
export class StorageController{ export const StorageController= {
/** /**
*/ */
static uploadAudio(axios:AxiosStatic, file: any, directory: string): Promise<AxiosResponse<FileInfo>> { uploadAudio(axios:AxiosStatic, file: any, directory: string): Promise<AxiosResponse<FileInfo>> {
return axios.post('upload/uploadAudio', null, {params: {file: file,directory: directory}}); return axios.post("upload/uploadAudio", null, { params: { file, directory } });
} },
/** /**
* 富文本图片上传 * 富文本图片上传
* @param file * @param file
* @param request * @param request
* @return Map * @return Map
* @throws FileStorageException * @throws FileStorageException
*/ */
static uploadPasteImage(axios:AxiosStatic, file: any): Promise<AxiosResponse<any>> { uploadPasteImage(axios:AxiosStatic, file: any): Promise<AxiosResponse<any>> {
return axios.post('upload/uploadRichTextImage', null, {params: {file: file}}); return axios.post("upload/uploadRichTextImage", null, { params: { file } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs'; import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {VehicleBrowserHistory} from "lib/src/entity/track/entity/VehicleBrowserHistory"; import { VehicleBrowserHistory } from "lib/src/entity/track/entity/VehicleBrowserHistory";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion // endregion
/** /**
*/ */
export class TrackController{ export const TrackController= {
/** /**
*/ */
static pageVehicleBrowserHistory(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<VehicleBrowserHistory>>> { pageVehicleBrowserHistory(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<VehicleBrowserHistory>>> {
return axios.post('track/pageVehicleBrowserHistory', pagination); return axios.post("track/pageVehicleBrowserHistory", pagination);
} },
static PAGE_VEHICLE_BROWSER_HISTORY = 'track/pageVehicleBrowserHistory'; PAGE_VEHICLE_BROWSER_HISTORY : "track/pageVehicleBrowserHistory",
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import type { WxPayUnifiedOrderV3Result } from "lib/src/domain/WxPayUnifiedOrderV3Result";
import dayjs,{Dayjs} from 'dayjs';
import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
import { TransactionStat } from "lib/src/entity/finance/domain/TransactionStat";
import { OrderTransaction } from "lib/src/entity/finance/entity/OrderTransaction";
// region 前端扩展导入包 // region 前端扩展导入包
import {Transaction} from "lib/src/entity/finance/entity/Transaction"; import { Transaction } from "lib/src/entity/finance/entity/Transaction";
import {TransactionStat} from "lib/src/entity/finance/domain/TransactionStat";
import {Page} from "autumn-vue/lib/core/page/Page";
import {OrderTransaction} from "lib/src/entity/finance/entity/OrderTransaction";
import type {WxPayUnifiedOrderV3Result} from "lib/src/domain/WxPayUnifiedOrderV3Result";
// endregion // endregion
/** /**
* 交易明细(Transaction) PI接口 * 交易明细(Transaction) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class TransactionController{ export const TransactionController= {
/** /**
* 新增订单交易 * 新增订单交易
* @param orderTransaction * @param orderTransaction
* @return OrderTransaction * @return OrderTransaction
*/ */
static addOrderTransaction(axios:AxiosStatic, orderTransaction: any): Promise<AxiosResponse<OrderTransaction>> { addOrderTransaction(axios:AxiosStatic, orderTransaction: any): Promise<AxiosResponse<OrderTransaction>> {
return axios.post('transaction/addOrderTransaction', orderTransaction); return axios.post("transaction/addOrderTransaction", orderTransaction);
} },
/** /**
* 根据id查询交易明细 * 根据id查询交易明细
* @return TransactionStat * @return TransactionStat
*/ */
static getTransactionStat(axios:AxiosStatic): Promise<AxiosResponse<TransactionStat>> { getTransactionStat(axios:AxiosStatic): Promise<AxiosResponse<TransactionStat>> {
return axios.get('transaction/getTransactionStat'); return axios.get("transaction/getTransactionStat");
} },
/** /**
* 分页查询交易明细 * 分页查询交易明细
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageTransaction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Transaction>>> { pageTransaction(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Transaction>>> {
return axios.post('transaction/pageTransaction', pagination); return axios.post("transaction/pageTransaction", pagination);
} },
static PAGE_TRANSACTION = 'transaction/pageTransaction'; PAGE_TRANSACTION : "transaction/pageTransaction",
/** /**
* 微信支付接口 * 微信支付接口
* @param orderTransaction * @param orderTransaction
* @param account * @param account
* @return WxPayUnifiedOrderV3Result.JsapiResult * @return WxPayUnifiedOrderV3Result.JsapiResult
*/ */
static payOrderTransaction(axios:AxiosStatic, orderTransaction: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> { payOrderTransaction(axios:AxiosStatic, orderTransaction: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> {
return axios.post('transaction/payOrderTransaction', orderTransaction); return axios.post("transaction/payOrderTransaction", orderTransaction);
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios'; import { Page } from "autumn-vue/lib/core/page/Page";
import dayjs,{Dayjs} from 'dayjs'; import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包 // region 前端扩展导入包
import {Withdraw} from "lib/src/entity/finance/entity/Withdraw"; import { Withdraw } from "lib/src/entity/finance/entity/Withdraw";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion // endregion
/** /**
* 提现申请(Withdraw) PI接口 * 提现申请(Withdraw) PI接口
* @author gonglei * @author gonglei
* @since 2025-10-13 12:18:11 * @since 2025-10-13 12:18:11
*/ */
export class WithdrawController{ export const WithdrawController= {
/** /**
* 新增提现申请 * 新增提现申请
* @param withdraw * @param withdraw
* @return Withdraw * @return Withdraw
*/ */
static addWithdraw(axios:AxiosStatic, withdraw: any): Promise<AxiosResponse<Withdraw>> { addWithdraw(axios:AxiosStatic, withdraw: any): Promise<AxiosResponse<Withdraw>> {
return axios.post('withdraw/addWithdraw', withdraw); return axios.post("withdraw/addWithdraw", withdraw);
} },
/** /**
* 根据id查询提现申请 * 根据id查询提现申请
* @param withdrawId * @param withdrawId
* @return Withdraw * @return Withdraw
*/ */
static getWithdrawById(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<Withdraw>> { getWithdrawById(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<Withdraw>> {
return axios.get('withdraw/getWithdrawById', {params: {withdrawId: withdrawId}}); return axios.get("withdraw/getWithdrawById", { params: { withdrawId } });
} },
/** /**
*/ */
static getWithdrawsByWaitUserConfirm(axios:AxiosStatic): Promise<AxiosResponse<Withdraw[]>> { getWithdrawsByWaitUserConfirm(axios:AxiosStatic): Promise<AxiosResponse<Withdraw[]>> {
return axios.get('withdraw/getWithdrawsByWaitUserConfirm'); return axios.get("withdraw/getWithdrawsByWaitUserConfirm");
} },
/** /**
*/ */
static getWxPayMchId(axios:AxiosStatic): Promise<AxiosResponse<string>> { getWxPayMchId(axios:AxiosStatic): Promise<AxiosResponse<string>> {
return axios.get('withdraw/getWxPayMchId'); return axios.get("withdraw/getWxPayMchId");
} },
/** /**
* 分页查询提现申请 * 分页查询提现申请
* @param pagination * @param pagination
* @return Page * @return Page
*/ */
static pageWithdraw(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Withdraw>>> { pageWithdraw(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Withdraw>>> {
return axios.post('withdraw/pageWithdraw', pagination); return axios.post("withdraw/pageWithdraw", pagination);
} },
static PAGE_WITHDRAW = 'withdraw/pageWithdraw'; PAGE_WITHDRAW : "withdraw/pageWithdraw",
/** /**
*/ */
static updateWithdrawStateById(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<number>> { updateWithdrawStateById(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<number>> {
return axios.post('withdraw/updateWithdrawStateById', null, {params: {withdrawId: withdrawId}}); return axios.post("withdraw/updateWithdrawStateById", null, { params: { withdrawId } });
} },
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} };
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包 // region 前端扩展导入包
// endregion // endregion
/** /* eslint-disable */
*/
export class WxpayController{ export class WxpayController{
// region 前端扩展代码区 // region 前端扩展代码区
// endregion // endregion
} }
import {AuthenticationManager} from "autumn-vue/lib/core/security/AuthenticationManager"; import { DefaultTokenInterceptor } from "autumn-vue/lib/core/http/DefaultTokenInterceptor";
import { AuthenticationManager } from "autumn-vue/lib/core/security/AuthenticationManager";
import {DefaultTokenInterceptor} from "autumn-vue/lib/core/http/DefaultTokenInterceptor"; import { AccountInfo } from "lib/src/entity/account/domain/AccountInfo";
import {AccountInfo} from "lib/src/entity/account/domain/AccountInfo";
export class AuthService { export class AuthService {
/** /**
* TOKEN存储KEY * TOKEN存储KEY
*/ */
public static readonly TOKEN = 'token'; public static readonly TOKEN = "token";
private token: string; private accountInfo: AccountInfo = null;
private accountInfo: AccountInfo = null; private token: string;
constructor() { constructor() {
this.loadStorageToken(); this.loadStorageToken();
this.loadStorageAuthentication(); this.loadStorageAuthentication();
} }
/** deleteAuthentication(): void {
* 更新TOKEN this.accountInfo = null;
*/ uni.removeStorageSync(DefaultTokenInterceptor.AUTHORIZATION);
updateToken(token: string): void { }
this.token = token;
uni.setStorageSync(AuthenticationManager.TOKEN, token);
}
/** getAuthentication(): AccountInfo | null {
* 删除TOKEN return this.accountInfo;
*/ }
removeToken() {
this.token = null;
uni.removeStorageSync(AuthenticationManager.TOKEN);
}
/** /**
* 判断是否登录 * 获取TOKEN
*/ */
isLogin(): boolean { getStorageToken(): string {
if (this.token) { return uni.getStorageSync(AuthenticationManager.TOKEN);
return this.getAuthentication() != null; }
} else {
return false;
}
}
getAuthentication(): AccountInfo | null { /**
return this.accountInfo;
}
/**
* 获取TOKEN * 获取TOKEN
*/ */
getStorageToken(): string { getToken() {
return uni.getStorageSync(AuthenticationManager.TOKEN); return this.token;
} }
deleteAuthentication(): void { /**
this.accountInfo = null; * 判断是否登录
uni.removeStorageSync(DefaultTokenInterceptor.AUTHORIZATION); */
} isLogin(): boolean {
if (this.token) {
return this.getAuthentication() != null;
} else {
return false;
}
}
loadStorageAuthentication(): Promise<any> {
if (uni.getStorageSync(DefaultTokenInterceptor.AUTHORIZATION)) {
const authString = uni.getStorageSync(DefaultTokenInterceptor.AUTHORIZATION);
// console.log('本地存储的authString : ' + authString);
if (authString && authString.length > 0) {
this.accountInfo = JSON.parse(authString);
this.token = this.accountInfo.token;
}
} else {
this.accountInfo = null;
}
// console.log('本地存储的authentication : ' + JSON.stringify(this.accountInfo))
return Promise.resolve(this.accountInfo);
}
loadStorageToken(): Promise<any> {
this.token = uni.getStorageSync(AuthenticationManager.TOKEN);
// console.log('本地存储的token : ' + this.token);
return Promise.resolve(this.token);
}
/**
* 删除TOKEN
*/
removeToken() {
this.token = null;
uni.removeStorageSync(AuthenticationManager.TOKEN);
}
saveAuthentication(authentication: AccountInfo): void {
this.accountInfo = authentication;
uni.setStorageSync(DefaultTokenInterceptor.AUTHORIZATION, JSON.stringify(authentication));
}
/** /**
* 获取TOKEN * 更新TOKEN
*/ */
getToken() { updateToken(token: string): void {
return this.token; this.token = token;
} uni.setStorageSync(AuthenticationManager.TOKEN, token);
}
saveAuthentication(authentication: AccountInfo): void {
this.accountInfo = authentication;
uni.setStorageSync(DefaultTokenInterceptor.AUTHORIZATION, JSON.stringify(authentication));
}
loadStorageAuthentication(): Promise<any> {
if (uni.getStorageSync(DefaultTokenInterceptor.AUTHORIZATION)) {
const authString = uni.getStorageSync(DefaultTokenInterceptor.AUTHORIZATION);
// console.log('本地存储的authString : ' + authString);
if (authString && authString.length > 0) {
this.accountInfo = JSON.parse(authString);
this.token = this.accountInfo.token;
}
} else {
this.accountInfo = null;
}
// console.log('本地存储的authentication : ' + JSON.stringify(this.accountInfo))
return Promise.resolve(this.accountInfo);
}
loadStorageToken(): Promise<any> {
this.token = uni.getStorageSync(AuthenticationManager.TOKEN);
// console.log('本地存储的token : ' + this.token);
return Promise.resolve(this.token);
}
} }
...@@ -4,27 +4,27 @@ ...@@ -4,27 +4,27 @@
* @returns 脱敏后的字符串(如 "3***"、"1***"、"-5***") * @returns 脱敏后的字符串(如 "3***"、"1***"、"-5***")
*/ */
export function maskNumberStr(str: string): string { export function maskNumberStr(str: string): string {
// 边界处理:空字符串直接返回 // 边界处理:空字符串直接返回
if (!str) return str; if (!str) return str;
// 步骤1:找到第一个数字的位置(跳过开头的正负号) // 步骤1:找到第一个数字的位置(跳过开头的正负号)
const firstDigitMatch = str.match(/\d/); const firstDigitMatch = str.match(/\d/);
// 无任何数字时,返回原字符串 // 无任何数字时,返回原字符串
if (!firstDigitMatch) return str; if (!firstDigitMatch) return str;
const firstDigitIndex = firstDigitMatch.index!; const firstDigitIndex = firstDigitMatch.index ?? 0;
const firstDigit = firstDigitMatch[0]; const firstDigit = firstDigitMatch[0];
// 步骤2:分割字符串为三部分:前缀(第一个数字前的内容)、第一个数字、后缀(第一个数字后的内容) // 步骤2:分割字符串为三部分:前缀(第一个数字前的内容)、第一个数字、后缀(第一个数字后的内容)
const prefix = str.slice(0, firstDigitIndex); // 前缀(可能包含正负号、空格等) const prefix = str.slice(0, firstDigitIndex); // 前缀(可能包含正负号、空格等)
const suffix = str.slice(firstDigitIndex + 1); // 第一个数字后的所有内容 const suffix = str.slice(firstDigitIndex + 1); // 第一个数字后的所有内容
// 步骤3:处理后缀:将后缀中的所有数字替换为*,小数点保留 // 步骤3:处理后缀:将后缀中的所有数字替换为*,小数点保留
const maskedSuffix = suffix.replace(/\d/g, '*'); const maskedSuffix = suffix.replaceAll(/\d/g, "*");
// 步骤4:拼接结果 // 步骤4:拼接结果
return `${prefix}${firstDigit}${maskedSuffix}`; return `${prefix}${firstDigit}${maskedSuffix}`;
} }
/** /**
* 中国大陆身份证号码正则表达式 * 中国大陆身份证号码正则表达式
* 支持:18位(含最后一位校验码,支持X/x)、15位(旧版,纯数字) * 支持:18位(含最后一位校验码,支持X/x)、15位(旧版,纯数字)
*/ */
export const ID_CARD_REGEX = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/; export const ID_CARD_REGEX = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i;
export const ID_CARD_18_REGEX = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[0-9Xx]$/; export const ID_CARD_18_REGEX = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[0-9X]$/i;
import type {CarType} from "lib/src/domain/VehicleType"; import type { CarType } from "lib/src/domain/VehicleType";
import dayjs from "dayjs"; import dayjs from "dayjs";
export class SearchQuery { export class SearchQuery {
cityCode: string | null; ageRange = [ 0, 0 ];
tag: string | null; /**
* 变速箱类型
*/
bxslxs: string[] = [];
carTypes: CarType[] | null; carTypes: CarType[] | null;
priceRange = [0, 0]; cityCode: null | string;
vehicleClass: { name: string, url: string, activeUrl: string } [] = []; /**
* 排量
*/
displacementRange = [ 0, 0 ];
overallRating: { name: string, value: number } | null; /**
* 排放标准(3-国3/4-国4/5-国5/6-国6)
*/
emissionStandards: number [] = [];
/** /**
* 变速箱类型 * 车身颜色
*/ */
bxslxs: string[] = []; exteriorColor: { color: string; name: string, }[] = [];
/** /**
* 燃料形式(汽油/柴油等) * 燃料形式(汽油/柴油等)
*/ */
rlxs: string | null; mileageRange = [ 0, 0 ];
ageRange = [0, 0]; overallRating: null | { name: string, value: number };
mileageRange = [0, 0]; priceRange = [ 0, 0 ];
/** rlxs: null | string;
* 过户次数
*/
transferCount: number | null;
/** seats: number[] = [];
* 排量
*/
displacementRange = [0, 0];
/** tag: null | string;
* 排放标准(3-国3/4-国4/5-国5/6-国6)
/**
* 过户次数
*/ */
emissionStandards: number [] = []; transferCount: null | number;
/** /**
* 车辆性质 * 车辆性质
*/ */
usageTypes: { name: string, value: number } [] = []; usageTypes: { name: string, value: number } [] = [];
/** vehicleClass: { activeUrl: string; name: string, url: string, } [] = [];
* 车身颜色
*/
exteriorColor: { name: string, color: string }[] = [];
seats: number[] = []; isNotEmpty(): boolean {
return (this.cityCode || this.tag || (this.carTypes && this.carTypes.length > 0) || (this.priceRange && this.priceRange[1] > 0) || this.vehicleClass.length > 0
|| this.overallRating || this.bxslxs.length > 0 || this.rlxs || (this.ageRange && this.ageRange[1] > 0) || (this.mileageRange && this.mileageRange[1] > 0) || this.transferCount || this.transferCount == 0
|| (this.displacementRange && this.displacementRange[1] > 0)
|| this.emissionStandards.length > 0
|| this.usageTypes.length > 0 || this.exteriorColor.length > 0 || (this.seats.length > 0));
}
reset(): void { reset(): void {
this.cityCode = null; this.cityCode = null;
this.tag = null; this.tag = null;
this.carTypes = null; this.carTypes = null;
this.priceRange = [0, 0]; this.priceRange = [ 0, 0 ];
this.vehicleClass = null; this.vehicleClass = null;
this.overallRating = null; this.overallRating = null;
/** /**
* 变速箱类型 * 变速箱类型
*/ */
this.bxslxs = []; this.bxslxs = [];
/** /**
* 燃料形式(汽油/柴油等) * 燃料形式(汽油/柴油等)
*/ */
this.rlxs = null; this.rlxs = null;
this.ageRange = [0, 0]; this.ageRange = [ 0, 0 ];
this.mileageRange = [0, 0]; this.mileageRange = [ 0, 0 ];
/** /**
* 过户次数 * 过户次数
*/ */
this.transferCount = null; this.transferCount = null;
/** /**
* 排量 * 排量
*/ */
this.displacementRange = [0, 0]; this.displacementRange = [ 0, 0 ];
/** /**
* 排放标准(3-国3/4-国4/5-国5/6-国6) * 排放标准(3-国3/4-国4/5-国5/6-国6)
*/ */
this.emissionStandards = []; this.emissionStandards = [];
/** /**
* 车辆性质 * 车辆性质
*/ */
this.usageTypes = []; this.usageTypes = [];
/** /**
* 车身颜色 * 车身颜色
*/ */
this.exteriorColor = []; this.exteriorColor = [];
this.seats = []; this.seats = [];
} }
setQueryForm(queryForm: any): void { setQueryForm(queryForm: any): void {
console.log(queryForm); console.log(queryForm);
queryForm.cityCode = this.cityCode; queryForm.cityCode = this.cityCode;
if (this.tag !== '不限') { if (this.tag !== "不限") {
queryForm.tags = this.tag; queryForm.tags = this.tag;
} else { } else {
queryForm.tags = null; queryForm.tags = null;
} }
if (this.carTypes && this.carTypes.length > 0) { if (this.carTypes && this.carTypes.length > 0) {
queryForm.carTypeId = this.carTypes.map(item => item.id); queryForm.carTypeId = this.carTypes.map(item => item.id);
} else { } else {
queryForm.carTypeId = null; queryForm.carTypeId = null;
} }
if (this.priceRange && this.priceRange[1] > 0) { if (this.priceRange && this.priceRange[1] > 0) {
if (this.priceRange[1] < 50) { if (this.priceRange[1] < 50) {
queryForm.startingBidPrice = [this.priceRange[0] * 10000, this.priceRange[1] * 10000]; queryForm.startingBidPrice = [ this.priceRange[0] * 10_000, this.priceRange[1] * 10_000 ];
} else { } else {
queryForm.startingBidPrice = [this.priceRange[0] * 10000, 99999 * 10000]; queryForm.startingBidPrice = [ this.priceRange[0] * 10_000, 99_999 * 10_000 ];
} }
} else { } else {
queryForm.startingBidPrice = null; queryForm.startingBidPrice = null;
} }
queryForm.vehicleClass = this.vehicleClass.map(item => item.name); queryForm.vehicleClass = this.vehicleClass.map(item => item.name);
queryForm.overallRating = this.overallRating ? this.overallRating.value : null; queryForm.overallRating = this.overallRating ? this.overallRating.value : null;
queryForm.bxslx = this.bxslxs; queryForm.bxslx = this.bxslxs;
queryForm.rlxs = this.rlxs; queryForm.rlxs = this.rlxs;
// 计算车龄 // 计算车龄
if (this.ageRange && this.ageRange[1] > 0) { if (this.ageRange && this.ageRange[1] > 0) {
const today = dayjs(); const today = dayjs();
const start = today.add(-this.ageRange[1], 'years').format('YYYY-MM-DD'); const start = today.add(-this.ageRange[1], "years").format("YYYY-MM-DD");
const end = today.add(-this.ageRange[0], 'years').format('YYYY-MM-DD'); const end = today.add(-this.ageRange[0], "years").format("YYYY-MM-DD");
queryForm.productionDate = [start, end]; queryForm.productionDate = [ start, end ];
} else { } else {
queryForm.productionDate = null; queryForm.productionDate = null;
} }
if (this.mileageRange && this.mileageRange[1] > 0) { if (this.mileageRange && this.mileageRange[1] > 0) {
if (this.mileageRange[1] < 30) { if (this.mileageRange[1] < 30) {
queryForm.mileage = [this.mileageRange[0] * 10000, this.mileageRange[1] * 10000]; queryForm.mileage = [ this.mileageRange[0] * 10_000, this.mileageRange[1] * 10_000 ];
} else { } else {
queryForm.mileage = [this.mileageRange[0] * 10000, 9990000]; queryForm.mileage = [ this.mileageRange[0] * 10_000, 9_990_000 ];
} }
} else { } else {
queryForm.mileage = null; queryForm.mileage = null;
} }
queryForm.transferCount = this.transferCount; queryForm.transferCount = this.transferCount;
if (this.displacementRange && this.displacementRange[1] > 0) { if (this.displacementRange && this.displacementRange[1] > 0) {
if (this.displacementRange[1] < 5) { if (this.displacementRange[1] < 5) {
queryForm.displacement = this.displacementRange; queryForm.displacement = this.displacementRange;
} else { } else {
queryForm.displacement = [this.displacementRange[0], 999]; queryForm.displacement = [ this.displacementRange[0], 999 ];
} }
} else { } else {
queryForm.displacement = null; queryForm.displacement = null;
} }
queryForm.emissionStandard = this.emissionStandards; queryForm.emissionStandard = this.emissionStandards;
queryForm.usageType = this.usageTypes.map(item => item.value); queryForm.usageType = this.usageTypes.map(item => item.value);
queryForm.exteriorColor = this.exteriorColor.map(item => item.name); queryForm.exteriorColor = this.exteriorColor.map(item => item.name);
queryForm.seat = this.seats; queryForm.seat = this.seats;
} }
isNotEmpty(): boolean {
return (this.cityCode || this.tag || (this.carTypes && this.carTypes.length > 0) || (this.priceRange && this.priceRange[1] > 0) || this.vehicleClass.length > 0
|| this.overallRating || this.bxslxs.length > 0 || this.rlxs || (this.ageRange && this.ageRange[1] > 0) || (this.mileageRange && this.mileageRange[1] > 0) || this.transferCount || this.transferCount == 0
|| (this.displacementRange && this.displacementRange[1] > 0)
|| this.emissionStandards.length > 0
|| this.usageTypes.length > 0 || this.exteriorColor.length > 0 || (this.seats.length > 0));
}
} }
import type {FileInfo} from "autumn-vue/lib/core/bean/FileInfo"; import type { FileInfo } from "autumn-vue/lib/core/bean/FileInfo";
/** /**
* 文件上传 * 文件上传
...@@ -8,25 +8,25 @@ import type {FileInfo} from "autumn-vue/lib/core/bean/FileInfo"; ...@@ -8,25 +8,25 @@ import type {FileInfo} from "autumn-vue/lib/core/bean/FileInfo";
*/ */
export function uploadFiles(tempFile: any, url: string, token: string): Promise<FileInfo> { export function uploadFiles(tempFile: any, url: string, token: string): Promise<FileInfo> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.uploadFile({ uni.uploadFile({
url: url, url,
filePath: tempFile.path, filePath: tempFile.path,
name: 'file', name: "file",
file: tempFile, file: tempFile,
header: {'Authorization': 'Bearer ' + token}, header: { "Authorization": `Bearer ${ token}` },
success: res => { success: res => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
const file = JSON.parse(res.data); const file = JSON.parse(res.data);
resolve(file); resolve(file);
} else { } else {
reject(null); reject(new Error(`Upload failed with status code: ${res.statusCode}`));
} }
}, },
fail: (e) => { fail: (e) => {
//console.log('失败', e); // console.log('失败', e);
reject(null); reject(new Error(`Upload failed: ${e.errMsg}`));
} }
}); });
}); });
} }
import {pinyin} from "pinyin-pro"; import { areaList } from "@vant/area-data";
import {areaList} from '@vant/area-data'; import { pinyin } from "pinyin-pro";
// 1. 工具函数:中文转拼音(全拼,小写) // 1. 工具函数:中文转拼音(全拼,小写)
function getPinyin(text: string): string { function getPinyin(text: string): string {
// 配置:type='array' 输出全拼,tone='none' 无声调 // 配置:type='array' 输出全拼,tone='none' 无声调
const pinyins = pinyin(text, {type: 'array', toneType: 'none'}); const pinyins = pinyin(text, { type: "array", toneType: "none" });
return pinyins.flat().join('').toLowerCase(); return pinyins.flat().join("").toLowerCase();
} }
// 2. 工具函数:获取拼音首字母(大写) // 2. 工具函数:获取拼音首字母(大写)
function getFirstLetter(pinyinStr: string): string { function getFirstLetter(pinyinStr: string): string {
if (!pinyinStr) return '#'; // 非拼音字符归为# if (!pinyinStr) return "#"; // 非拼音字符归为#
return pinyinStr.charAt(0).toUpperCase(); return pinyinStr.charAt(0).toUpperCase();
} }
// 3. 转换并分组 // 3. 转换并分组
export function getCitiesData() { export function getCitiesData() {
const cityList = areaList.city_list; const cityList = areaList.city_list;
// 先将原始对象转为 [{name: '城市名', value: '拼音'}] 格式 // 先将原始对象转为 [{name: '城市名', value: '拼音'}] 格式
const cityArray = Object.values(cityList).map(cityName => ({ const cityArray = Object.values(cityList).map(cityName => ({
name: cityName, name: cityName,
value: getPinyin(cityName as string), value: getPinyin(cityName as string),
})); }));
// 按首字母分组(键为大写字母,值为对应城市数组) // 按首字母分组(键为大写字母,值为对应城市数组)
const grouped: Record<string, Array<{ name: string; value: string }>> = {}; const grouped: Record<string, Array<{ name: string; value: string }>> = {};
cityArray.forEach(city => { cityArray.forEach(city => {
const firstLetter = getFirstLetter(city.value); const firstLetter = getFirstLetter(city.value);
if (!grouped[firstLetter]) { if (!grouped[firstLetter]) {
grouped[firstLetter] = []; grouped[firstLetter] = [];
} }
grouped[firstLetter].push(city); grouped[firstLetter].push(city);
}); });
// 转换为按字母顺序排列的二维数组(如 [ [A组], [B组], ... ]) // 转换为按字母顺序排列的二维数组(如 [ [A组], [B组], ... ])
const sortedLetters = Object.keys(grouped).sort(); // 按字母A-Z排序 const sortedLetters = Object.keys(grouped).sort(); // 按字母A-Z排序
const cityData = sortedLetters.map(letter => grouped[letter]); const cityData = sortedLetters.map(letter => grouped[letter]);
const result = { const result = {
indexList: ['常用/历史地址', ...sortedLetters], indexList: [ "常用/历史地址", ...sortedLetters ],
cityList: [ cityList: [
[ [
{name: '北京', value: 'beijing'}, { name: "北京", value: "beijing" },
{name: '上海', value: 'shanghai'}, { name: "上海", value: "shanghai" },
{name: '广州', value: 'guangzhou'}, { name: "广州", value: "guangzhou" },
{name: '深圳', value: 'shenghai'}, { name: "深圳", value: "shenghai" },
], ],
...cityData] ...cityData ]
}; };
return result; return result;
} }
export type City = { code: string, name: string, value: string }; export type City = { code: string, name: string, value: string };
export function getIndexedCities(): Record<string, Array<City>> { export function getIndexedCities(): Record<string, Array<City>> {
const cityList = areaList.city_list; const cityList = areaList.city_list;
// 先将原始对象转为 [{name: '城市名', value: '拼音'}] 格式 // 先将原始对象转为 [{name: '城市名', value: '拼音'}] 格式
const cityArray = Object.keys(cityList).map(cityCode => ({ const cityArray = Object.keys(cityList).map(cityCode => ({
code: cityCode, code: cityCode,
name: cityList[cityCode], name: cityList[cityCode],
value: getPinyin(cityList[cityCode] as string), value: getPinyin(cityList[cityCode] as string),
})); }));
// 按首字母分组(键为大写字母,值为对应城市数组) // 按首字母分组(键为大写字母,值为对应城市数组)
const grouped: Record<string, Array<City>> = {}; const grouped: Record<string, Array<City>> = {};
cityArray.forEach(city => { cityArray.forEach(city => {
const firstLetter = getFirstLetter(city.value); const firstLetter = getFirstLetter(city.value);
if (!grouped[firstLetter]) { if (!grouped[firstLetter]) {
grouped[firstLetter] = []; grouped[firstLetter] = [];
} }
grouped[firstLetter].push(city); grouped[firstLetter].push(city);
}); });
return grouped; return grouped;
} }
export function getCityCodeByName(cityName: string): string | null { export function getCityCodeByName(cityName: string): null | string {
if (['北京', '上海', '广州', '深圳'].includes(cityName)) { if ([ "上海", "北京", "广州", "深圳" ].includes(cityName)) {
cityName = cityName + "市"; cityName = `${cityName }市`;
} }
const cityList = areaList.city_list; const cityList = areaList.city_list;
// 遍历对象的所有key // 遍历对象的所有key
for (const key in cityList) { for (const key in cityList) {
// 检查当前key对应的value是否与目标城市名一致 // 检查当前key对应的value是否与目标城市名一致
if (cityList[key] === cityName) { if (cityList[key] === cityName) {
return key; // 找到则返回key return key; // 找到则返回key
} }
} }
return null; // 未找到返回null return null; // 未找到返回null
} }
import dayjs, {Dayjs} from "dayjs"; import { areaList } from "@vant/area-data";
import {areaList} from '@vant/area-data'; import dayjs, { Dayjs } from "dayjs";
export default { export default {
// 处理没有数据的占位 // 处理没有数据的占位
filterValueData(value: string) { filterValueData(value: string) {
if (!value) return "-"; if (!value) return "-";
return value; return value;
}, },
formatNumber(value: number, fractionDigits = 2): string { formatNumber(value: number, fractionDigits = 2): string {
return value.toFixed(fractionDigits); return value.toFixed(fractionDigits);
}, },
formatCities(cityCodes: string[]): string[] { formatCities(cityCodes: string[]): string[] {
const cityList = areaList.city_list; const cityList = areaList.city_list;
const provinceList = areaList.province_list; const provinceList = areaList.province_list;
const cities = []; const cities = [];
if (cityCodes) { if (cityCodes) {
for (const cityCode of cityCodes) { for (const cityCode of cityCodes) {
if (provinceList[cityCode]) { if (provinceList[cityCode]) {
cities.push(provinceList[cityCode]); cities.push(provinceList[cityCode]);
} else if (cityList[cityCode]) { } else if (cityList[cityCode]) {
cities.push(cityList[cityCode]); cities.push(cityList[cityCode]);
} }
} }
} }
return cities; return cities;
}, },
formatCityLabels(cityCodes: string[], separator = '/'): string { formatCityLabels(cityCodes: string[], separator = "/"): string {
const cities = this.formatCities(cityCodes); const cities = this.formatCities(cityCodes);
return cities.join(separator); return cities.join(separator);
}, },
formatCityLabel(cityCode: string): string { formatCityLabel(cityCode: string): string {
const cityList = areaList.city_list; const cityList = areaList.city_list;
const provinceList = areaList.province_list; const provinceList = areaList.province_list;
if (provinceList[cityCode]) { if (provinceList[cityCode]) {
// 处理直辖市 // 处理直辖市
return provinceList[cityCode]; return provinceList[cityCode];
} }
return cityList[cityCode] ?? "-"; return cityList[cityCode] ?? "-";
}, },
// 图片预览页面公共方法处理 // 图片预览页面公共方法处理
openPreviewPage() { openPreviewPage() {
//监听组件显示 (隐藏TabBar和NavigationBar,隐藏video原生组件) // 监听组件显示 (隐藏TabBar和NavigationBar,隐藏video原生组件)
uni.hideTabBar() uni.hideTabBar();
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#000000', // 设置前景色为黑色 frontColor: "#000000", // 设置前景色为黑色
backgroundColor: '#000000', // 设置背景色为黑色 backgroundColor: "#000000", // 设置背景色为黑色
}) });
}, },
// 图片预览页面公共方法处理 // 图片预览页面公共方法处理
closePreviewPage() { closePreviewPage() {
uni.showTabBar() uni.showTabBar();
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#000000', // 设置前景色为白色 frontColor: "#000000", // 设置前景色为白色
backgroundColor: '#ffffff', // 设置背景色为黑色 backgroundColor: "#ffffff", // 设置背景色为黑色
}) });
}, },
formatDateTimeNoSecond(date: string | Dayjs): string | Dayjs { formatDateTimeNoSecond(date: Dayjs | string): Dayjs | string {
if (date) { if (date) {
return dayjs(date).format('YYYY-MM-DD HH:mm'); return dayjs(date).format("YYYY-MM-DD HH:mm");
} else { } else {
return '-'; return "-";
} }
}, },
formatDate(date: string | Dayjs): string | Dayjs { formatDate(date: Dayjs | string): Dayjs | string {
if (date) { if (date) {
return dayjs(date).format('YYYY-MM-DD'); return dayjs(date).format("YYYY-MM-DD");
} else { } else {
return date; return date;
} }
}, },
formatDateTimeNoDay(date: string | Dayjs): string | Dayjs { formatDateTimeNoDay(date: Dayjs | string): Dayjs | string {
if (date) { if (date) {
return dayjs(date).format('YYYY-MM'); return dayjs(date).format("YYYY-MM");
} else { } else {
return date; return date;
} }
}, },
hasUnitFormatDate(date: string | Dayjs): string | Dayjs { hasUnitFormatDate(date: Dayjs | string): Dayjs | string {
if (date) { if (date) {
return dayjs(date).format('YYYY' + '年' + 'MM' + '月'); return dayjs(date).format("YYYY" + "年" + "MM" + "月");
} else { } else {
return date; return date;
} }
}, },
// 图片自适应 // 图片自适应
imgHandle(html: string) { imgHandle(html: string) {
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) { let newContent = html.replaceAll(/<img[^>]*>/gi, (match, capture) => {
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, ''); match = match.replaceAll(/style="[^"]+"/gi, "").replaceAll(/style='[^']+'/gi, "");
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, ''); match = match.replaceAll(/width="[^"]+"/gi, "").replaceAll(/width='[^']+'/gi, "");
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, ''); match = match.replaceAll(/height="[^"]+"/gi, "").replaceAll(/height='[^']+'/gi, "");
return match; return match;
}); });
newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) { newContent = newContent.replaceAll(/style="[^"]+"/gi, (match, capture) => {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;'); match = match.replaceAll(/width:[^;]+;/gi, "max-width:100%;").replaceAll(/width:[^;]+;/gi, "max-width:100%;");
return match; return match;
}); });
newContent = newContent.replace(/<br[^>]*\/>/gi, ''); newContent = newContent.replaceAll(/<br[^>]*\/>/gi, "");
newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin:10px 0;"'); newContent = newContent.replaceAll(/<img/gi, '<img style="max-width:100%;height:auto;display:block;margin:10px 0;"');
return newContent; return newContent;
}, },
dateTimeFormatter(value: string) { dateTimeFormatter(value: string) {
return dayjs(value).format('YYYY-MM-DD HH:mm:ss'); return dayjs(value).format("YYYY-MM-DD HH:mm:ss");
}, },
// 查看前多少天 // 查看前多少天
getFrontData(num: number, cutoffSeconds = false) { getFrontData(num: number, cutoffSeconds = false) {
const endTime = dayjs(); const endTime = dayjs();
// 获取当前日期 // 获取当前日期
const currentDate = new Date(); const currentDate = new Date();
// 获取前七天的日期 // 获取前七天的日期
const previousDates = []; const previousDates = [];
for (var i = num; i >= 0; i--) { for (let i = num; i >= 0; i--) {
var previousDate = new Date(currentDate); const previousDate = new Date(currentDate);
previousDate.setDate(currentDate.getDate() - i); previousDate.setDate(currentDate.getDate() - i);
previousDates.push(previousDate); previousDates.push(previousDate);
} }
// 格式化日期 // 格式化日期
const formattedDates = previousDates.map(function (date) { const formattedDates = previousDates.map((date) => {
var year = date.getFullYear(); const year = date.getFullYear();
var month = (date.getMonth() + 1).toString().padStart(2, '0'); const month = (date.getMonth() + 1).toString().padStart(2, "0");
var day = date.getDate().toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, "0");
// 加上8小时的偏移量 // 加上8小时的偏移量
date.setHours(date.getHours() + 8); date.setHours(date.getHours() + 8);
var hours = (date.getHours() < 10 ? '0' : '') + date.getHours(); const hours = (date.getHours() < 10 ? "0" : "") + date.getHours();
var minutes = (date.getMinutes() < 10 ? '0' : '') + date.getMinutes(); const minutes = (date.getMinutes() < 10 ? "0" : "") + date.getMinutes();
var seconds = (date.getSeconds() < 10 ? '0' : '') + date.getSeconds(); const seconds = (date.getSeconds() < 10 ? "0" : "") + date.getSeconds();
if (cutoffSeconds) { if (cutoffSeconds) {
// 工作台 我的任务日期选择需要添加上 时分秒 // 工作台 我的任务日期选择需要添加上 时分秒
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; return `${year }-${ month }-${ day } ${ hours }:${ minutes }:${ seconds}`;
} else { } else {
return year + '-' + month + '-' + day; return `${year }-${ month }-${ day}`;
} }
}); });
return formattedDates; return formattedDates;
} }
} };
const modulesFilesEn: any = import.meta.glob("./en/*.ts", {eager: true}); const modulesFilesEn: any = import.meta.glob("./en/*.ts", { eager: true });
const modulesEn: any = {}; const modulesEn: any = {};
for (const path in modulesFilesEn) { for (const path in modulesFilesEn) {
for (const prop in modulesFilesEn[path].default) { for (const prop in modulesFilesEn[path].default) {
modulesEn[prop] = modulesFilesEn[path].default[prop]; modulesEn[prop] = modulesFilesEn[path].default[prop];
} }
} }
// 批量引入中文 // 批量引入中文
const modulesFilesZhCN: any = import.meta.glob("./zh_cn/*.ts", {eager: true}); const modulesFilesZhCN: any = import.meta.glob("./zh_cn/*.ts", { eager: true });
const modulesZhCN: any = {}; const modulesZhCN: any = {};
for (const path in modulesFilesZhCN) { for (const path in modulesFilesZhCN) {
modulesFilesZhCN[path].default; modulesFilesZhCN[path].default;
for (const prop in modulesFilesZhCN[path].default) { for (const prop in modulesFilesZhCN[path].default) {
modulesZhCN[prop] = modulesFilesZhCN[path].default[prop]; modulesZhCN[prop] = modulesFilesZhCN[path].default[prop];
} }
} }
export default { export default {
en: modulesEn, en: modulesEn,
"zh-cn": modulesZhCN, "zh-cn": modulesZhCN,
}; };
export default { export default {
entity: { entity: {
vehicle: { vehicle: {
ownerType: {1: '个人', 2: '单位'}, ownerType: { 1: "个人", 2: "单位" },
usageType: {1: '非营运', 2: '营运', 3: '营转非'}, usageType: { 1: "非营运", 2: "营运", 3: "营转非" },
overallRating: {1: '优', 2: '良', 3: '中', 4: '差'}, overallRating: { 1: "优", 2: "良", 3: "中", 4: "差" },
sunroof: {1: '无天窗', 2: '普通天窗', 3: '全景天窗'}, sunroof: { 1: "无天窗", 2: "普通天窗", 3: "全景天窗" },
} }
}, },
} };
import {Component, Prop, Vue} from "vue-facing-decorator"; import { Component, Prop, Vue } from "vue-facing-decorator";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle";
import { AuthService } from "@/common/AuthService";
import { BurialPoint } from "@/common/BurialPoint";
import { maskNumberStr } from "@/common/CommonUtils";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle"; import { AuctionVehicle } from "lib/src/entity/auction/entity/AuctionVehicle";
import {BurialPoint} from "@/common/BurialPoint"; import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import {AuthService} from "@/common/AuthService";
import {maskNumberStr} from "@/common/CommonUtils";
@Component({}) @Component({})
export default class AbstractVehicleItem extends Vue { export default class AbstractVehicleItem extends Vue {
@Prop({type: Object, required: true}) @Prop({ type: Object, required: true })
auctionVehicle: AuctionVehicle; auctionVehicle: AuctionVehicle;
get productionYear(): number { get ageLess1Year(): boolean {
return dayjs(this.vehicle.coreSpecs.productionDate as string).year(); return dayjs().add(-1, "years").isBefore(dayjs(this.vehicle.coreSpecs.productionDate as string));
} }
get mileage(): string { get efficient(): boolean {
return (this.vehicle.baseInfo.mileage / 10000).toFixed(2); return (this.vehicle.coreSpecs.vehicleClass === "小型车" || this.vehicle.coreSpecs.vehicleClass === "紧凑型车");
} }
get vehicle(): Vehicle { /**
return this.auctionVehicle.vehicle; * 只剩下5分钟拍卖结束倒计时
*/
get endRemaining() {
// const now = dayjs();
// const endTime = dayjs(this.auctionVehicle.auctionEndTime as string);
// return endTime.diff(now);
return this.auctionVehicle.bidEndRemaining;
} }
get licensePlate(): string { get hasBidPrivilege(): boolean {
return this.vehicle.baseInfo?.licensePlate.substring(0, 2); const authService: AuthService = this.$auth as AuthService;
if (authService.isLogin() && authService.getAuthentication().accountType !== "COMMON") {
return true;
} else {
return false;
}
} }
get ageLess1Year(): boolean { get licensePlate(): string {
return dayjs().add(-1, 'years').isBefore(dayjs(this.vehicle.coreSpecs.productionDate as string)); return this.vehicle.baseInfo?.licensePlate.slice(0, 2);
} }
get efficient(): boolean { get maskBidPrice(): string {
return (this.vehicle.coreSpecs.vehicleClass === '小型车' || this.vehicle.coreSpecs.vehicleClass === '紧凑型车'); return maskNumberStr((this.vehicle.startingBidPrice / 10_000).toFixed(2));
} }
get hasBidPrivilege(): boolean { get mileage(): string {
const authService: AuthService = this.$auth as AuthService; return (this.vehicle.baseInfo.mileage / 10_000).toFixed(2);
if (authService.isLogin() && authService.getAuthentication().accountType !== 'COMMON') {
return true;
} else {
return false;
}
} }
get maskBidPrice(): string { /**
return maskNumberStr((this.vehicle.startingBidPrice / 10000).toFixed(2)); * 预览倒计时
*/
get previewCountDown(): number {
// const now = dayjs();
// const startTime = dayjs(this.auctionVehicle.auctionStartTime as string);
// return startTime.diff(now);
return this.auctionVehicle.bidStartRemaining;
} }
viewCarDetail() {
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_home_vehiclecard_click', this.auctionVehicle.aucvehId.toString(), '/module/auction/AuctionVehiclePage');
uni.navigateTo({url: '/module/auction/AuctionVehiclePage?aucvehId=' + this.auctionVehicle.aucvehId});
}
/** /**
* 是否小于24小时开拍 * 是否小于24小时开拍
*/ */
get previewLessThen24h(): boolean { get previewLessThen24h(): boolean {
// const now = dayjs(); // const now = dayjs();
// const startTime = dayjs(this.auctionVehicle.auctionStartTime as string); // const startTime = dayjs(this.auctionVehicle.auctionStartTime as string);
// return (startTime.diff(now) <= 24 * 60 * 60 * 1000); // return (startTime.diff(now) <= 24 * 60 * 60 * 1000);
return (this.auctionVehicle.bidStartRemaining <= 24 * 60 * 60 * 1000); return (this.auctionVehicle.bidStartRemaining <= 24 * 60 * 60 * 1000);
} }
/** /**
* 预览倒计时 * 预览中显示状态信息
*/ */
get previewCountDown(): number { get previewStatus(): string {
// const now = dayjs(); const now = dayjs();
// const startTime = dayjs(this.auctionVehicle.auctionStartTime as string); const startTime = dayjs(this.auctionVehicle.auctionStartTime as string);
// return startTime.diff(now); return startTime.format("YYYY/MM/DD HH:mm");
return this.auctionVehicle.bidStartRemaining; }
get productionYear(): number {
return dayjs(this.vehicle.coreSpecs.productionDate as string).year();
} }
/** /**
* 预览中显示状态信息 * 是否只剩下5分钟拍卖结束
*/ */
get previewStatus(): string { get remaining5m(): boolean {
const now = dayjs(); // const now = dayjs();
const startTime = dayjs(this.auctionVehicle.auctionStartTime as string); // const endTime = dayjs(this.auctionVehicle.auctionEndTime as string);
return startTime.format('YYYY/MM/DD HH:mm'); // return endTime.diff(now) < 5 * 60 * 1000;
return this.auctionVehicle.bidEndRemaining < 5 * 60 * 1000;
} }
// /** // /**
...@@ -93,32 +106,20 @@ export default class AbstractVehicleItem extends Vue { ...@@ -93,32 +106,20 @@ export default class AbstractVehicleItem extends Vue {
// return '剩余 ' + dayjs.duration(endTime.diff(now)).format('HH:mm:ss'); // return '剩余 ' + dayjs.duration(endTime.diff(now)).format('HH:mm:ss');
// } // }
/** get vehicle(): Vehicle {
* 是否只剩下5分钟拍卖结束 return this.auctionVehicle.vehicle;
*/
get remaining5m(): boolean {
// const now = dayjs();
// const endTime = dayjs(this.auctionVehicle.auctionEndTime as string);
// return endTime.diff(now) < 5 * 60 * 1000;
return this.auctionVehicle.bidEndRemaining < 5 * 60 * 1000;
} }
/** countDownBidEnd(): void {
* 只剩下5分钟拍卖结束倒计时 this.auctionVehicle.auctionState = "SOLD";
*/
get endRemaining() {
// const now = dayjs();
// const endTime = dayjs(this.auctionVehicle.auctionEndTime as string);
// return endTime.diff(now);
return this.auctionVehicle.bidEndRemaining;
} }
countDownBidStart(): void { countDownBidStart(): void {
this.auctionVehicle.auctionState = 'AUCTIONING'; this.auctionVehicle.auctionState = "AUCTIONING";
} }
countDownBidEnd(): void { viewCarDetail() {
this.auctionVehicle.auctionState = 'SOLD'; BurialPoint.burialPoint(this.$auth.getAuthentication(), "auction_home_vehiclecard_click", this.auctionVehicle.aucvehId.toString(), "/module/auction/AuctionVehiclePage");
uni.navigateTo({ url: `/module/auction/AuctionVehiclePage?aucvehId=${ this.auctionVehicle.aucvehId}` });
} }
} }
<template> <template>
<view v-if="auctionVehicle" class="car-item" @click="viewCarDetail()"> <view v-if="auctionVehicle"
class="car-item"
@click="viewCarDetail()">
<vehicle-cover-wrapper :auction-vehicle="auctionVehicle"></vehicle-cover-wrapper> <vehicle-cover-wrapper :auction-vehicle="auctionVehicle"></vehicle-cover-wrapper>
<view class="car-info"> <view class="car-info">
<text class="car-name">【{{ licensePlate }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</text> <text class="car-name">【{{ licensePlate }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</text>
<text class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里</text> <text class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里</text>
<view class="car-features"> <view class="car-features">
<text class="feature-item" v-if="vehicle.ownership.transferCount===0">零次过户</text> <text v-if="vehicle.ownership.transferCount === 0" class="feature-item">零次过户</text>
<text class="feature-item" v-if="vehicle.baseInfo.mileage<10000&&ageLess1Year">准新车</text> <text v-if="vehicle.baseInfo.mileage < 10000 && ageLess1Year" class="feature-item">准新车</text>
<text class="feature-item" v-if="vehicle.ownership.ownerType===1">个人车</text> <text v-if="vehicle.ownership.ownerType === 1" class="feature-item">个人车</text>
<text class="feature-item">{{ vehicle.ownership.registrationDate.substring(0, 4) }}年上牌</text> <text class="feature-item">{{ vehicle.ownership.registrationDate.substring(0, 4) }}年上牌</text>
<text class="feature-item" v-if="efficient">省油代步</text> <text v-if="efficient" class="feature-item">省油代步</text>
<text class="feature-item" v-if="vehicle.coreSpecs.rlxs==='纯电动'">新能源</text> <text v-if="vehicle.coreSpecs.rlxs === '纯电动'" class="feature-item">新能源</text>
</view> </view>
<view class="car-price-container"> <view class="car-price-container">
<image src="/static/images/auction/auction-tool.png" class="auction-icon" mode="aspectFit"></image> <image class="auction-icon"
<text class="car-price" v-if="hasBidPrivilege">{{ $filters.formatNumber(vehicle.startingBidPrice / 10000) }}</text> mode="aspectFit"
<text class="car-price" v-else>{{ maskBidPrice }}</text> src="/static/images/auction/auction-tool.png">
</image>
<text v-if="hasBidPrivilege" class="car-price">{{ $filters.formatNumber(vehicle.startingBidPrice / 10000) }}</text>
<text v-else class="car-price">{{ maskBidPrice }}</text>
<text class="car-price car-price-unit">万</text> <text class="car-price car-price-unit">万</text>
<text class="car-price car-price-unit" v-if="auctionVehicle.auctionState==='AUCTIONING'">竞价中...</text> <text v-if="auctionVehicle.auctionState === 'AUCTIONING'" class="car-price car-price-unit">竞价中...</text>
<text class="price-label" v-else-if="auctionVehicle.auctionState==='PREVIEW'">起拍</text> <text v-else-if="auctionVehicle.auctionState === 'PREVIEW'" class="price-label">起拍</text>
<text class="price-label" v-else>已结束</text> <text v-else class="price-label">已结束</text>
</view> </view>
</view> </view>
<view class="favorite-button" v-if="showFavorite" @click.stop="toggleFavorite()"> <view v-if="showFavorite"
<van-image v-if="auctionVehicle.favorite" use-error-slot width="26" fit="cover" height="26" src="/static/images/auction/favorite.png"></van-image> class="favorite-button"
<van-image v-else use-error-slot width="26" fit="cover" height="26" src="/static/images/auction/un_favorite.png"></van-image> @click.stop="toggleFavorite()">
<van-image v-if="auctionVehicle.favorite"
fit="cover"
height="26"
src="/static/images/auction/favorite.png"
use-error-slot
width="26">
</van-image>
<van-image v-else
fit="cover"
height="26"
src="/static/images/auction/un_favorite.png"
use-error-slot
width="26">
</van-image>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Prop, Vue} from 'vue-facing-decorator'; import { Component, Prop } from "vue-facing-decorator";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle";
import dayjs from "dayjs"; import { FavoriteController } from "@/api/FavoriteController";
import {FavoriteController} from "@/api/FavoriteController";
import {FileInfo} from "autumn-vue/lib/core/bean/FileInfo";
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
import AbstractVehicleItem from "@/components/AbstractVehicleItem"; import AbstractVehicleItem from "@/components/AbstractVehicleItem";
import VehicleCoverWrapper from "@/components/VehicleCoverWrapper.vue"; import VehicleCoverWrapper from "@/components/VehicleCoverWrapper.vue";
import {AuthService} from "@/common/AuthService";
@Component({ @Component({
components: {VehicleCoverWrapper} components: { VehicleCoverWrapper }
}) })
export default class AuctionVehicleItem extends AbstractVehicleItem { export default class AuctionVehicleItem extends AbstractVehicleItem {
@Prop({type: Boolean, required: false, default: true}) @Prop({ type: Boolean, required: false, default: true })
showFavorite: boolean; showFavorite: boolean;
// 切换收藏状态 // 切换收藏状态
toggleFavorite(): void { toggleFavorite(): void {
if (!this.$auth.isLogin()) { if (!this.$auth.isLogin()) {
uni.showToast({ uni.showToast({
title: '请先登录', complete: function () { title: "请先登录", complete () {
uni.reLaunch({url: '/pages/LoginPage'}); uni.reLaunch({ url: "/pages/LoginPage" });
} }
}); });
} }
uni.showLoading({title: '正在收藏中', mask: true}); uni.showLoading({ title: "正在收藏中", mask: true });
FavoriteController.toggleFavorite(this.axios, this.auctionVehicle.aucvehId).then((res) => { FavoriteController.toggleFavorite(this.axios, this.auctionVehicle.aucvehId).then((res) => {
this.auctionVehicle.favorite = res.data; this.auctionVehicle.favorite = res.data;
setTimeout(() => { setTimeout(() => {
uni.showToast({title: this.auctionVehicle.favorite ? '收藏成功' : '取消收藏 '}); uni.showToast({ title: this.auctionVehicle.favorite ? "收藏成功" : "取消收藏 " });
}, 300); }, 300);
}).finally(() => uni.hideLoading()); }).finally(() => uni.hideLoading());
} }
...@@ -77,38 +92,38 @@ export default class AuctionVehicleItem extends AbstractVehicleItem { ...@@ -77,38 +92,38 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
/* 车辆项样式 */ /* 车辆项样式 */
.car-item { .car-item {
position: relative;
display: flex; display: flex;
//background-color: #fff;
border-radius: 8px;
padding: 1px; padding: 1px;
position: relative;
margin-bottom: 10px; margin-bottom: 10px;
//background-color: #fff;
border-radius: 8px;
} }
.car-info { .car-info {
flex: 1;
margin-left: 10px;
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin-left: 10px;
} }
.car-name { .car-name {
max-width: 245px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333;
line-height: 1.4; line-height: 1.4;
overflow: hidden; color: #333;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis;
max-width: 245px;
} }
.car-specs { .car-specs {
margin-top: 4px;
font-size: 12px; font-size: 12px;
color: #666; color: #666;
margin-top: 4px;
} }
.car-features { .car-features {
...@@ -120,19 +135,19 @@ export default class AuctionVehicleItem extends AbstractVehicleItem { ...@@ -120,19 +135,19 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
.feature-item { .feature-item {
font-size: 10px;
color: #999;
border: 1px solid #f0f0f0;
//border-color: #f5f5f5; //border-color: #f5f5f5;
//background-color: #f5f5f5; //background-color: #f5f5f5;
padding: 2px 6px; padding: 2px 6px;
font-size: 10px;
color: #999;
border: 1px solid #f0f0f0;
border-radius: 2px; border-radius: 2px;
} }
.car-price-container { .car-price-container {
display: flex; display: flex;
align-items: center;
gap: 4px; gap: 4px;
align-items: center;
margin-top: 4px; margin-top: 4px;
} }
...@@ -143,8 +158,8 @@ export default class AuctionVehicleItem extends AbstractVehicleItem { ...@@ -143,8 +158,8 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
.car-price { .car-price {
font-size: 16px; font-size: 16px;
color: #ff4d4f;
font-weight: 500; font-weight: 500;
color: #ff4d4f;
} }
.car-price-unit { .car-price-unit {
......
import {Component, Ref, Vue} from "vue-facing-decorator"; import { Component, Ref, Vue } from "vue-facing-decorator";
import CustomNavBar from "@/components/CustomNavBar.vue";
import OrderVehicleItem from "@/module/order/OrderVehicleItem.vue"; import { SignOrder } from "lib/src/entity/auction/domain/SignOrder";
import {SignOrder} from "lib/src/entity/auction/domain/SignOrder"; import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
@Component({ @Component({
components: {} components: {}
}) })
export default class SignOrderPage extends Vue { export default class SignOrderPage extends Vue {
orderId: number = 0; @Ref()
contractPopup: any;
order: AuctionOrder = null; order: AuctionOrder = null;
@Ref() orderId: number = 0;
contractPopup: any;
signOrder: SignOrder = null; rules = {
accountName: {
rules: [ { required: true, errorMessage: "请输入真实姓名" } ]
},
mobile: {
rules: [ { required: true, errorMessage: "请输入手机号码" } ]
},
idCard: {
rules: [ { required: true, errorMessage: "请输入身份证号码" }, {
pattern: /(^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$)|(^[1-9]\d{7}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}$)/i,
errorMessage: "请输入正确的身份证号码"
} ]
}
};
rules = { signOrder: SignOrder = null;
accountName: {
rules: [{required: true, errorMessage: '请输入真实姓名'}]
},
mobile: {
rules: [{required: true, errorMessage: '请输入手机号码'}]
},
idCard: {
rules: [{required: true, errorMessage: '请输入身份证号码'}, {
pattern: /(^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}$)/,
errorMessage: '请输入正确的身份证号码'
}]
}
};
cancel(): void { cancel(): void {
this.contractPopup.close(); this.contractPopup.close();
} }
} }
<template> <template>
<view class="car-image-wrapper"> <view class="car-image-wrapper">
<van-image use-error-slot width="120" fit="cover" radius="16rpx" height="90" :src="vehicle.cover?.url"></van-image> <van-image fit="cover"
<view class="light-status light-preview" v-if="auctionVehicle.auctionState==='PREVIEW'"> height="90"
radius="16rpx"
:src="vehicle.cover?.url"
use-error-slot
width="120">
</van-image>
<view v-if="auctionVehicle.auctionState === 'PREVIEW'" class="light-status light-preview">
等待竞价 等待竞价
</view> </view>
<template v-else-if="auctionVehicle.auctionState==='AUCTIONING'"> <template v-else-if="auctionVehicle.auctionState === 'AUCTIONING'">
<view class="light-status"> <view class="light-status">
竞价中 竞价中
</view> </view>
</template> </template>
<template v-else> <template v-else>
<image src="/static/images/close.png" class="close-icon" mode="aspectFit"></image> <image class="close-icon"
mode="aspectFit"
src="/static/images/close.png">
</image>
</template> </template>
<!-- <template v-if="auctionVehicle.auction.auctionType==='DARK'">--> <!-- <template v-if="auctionVehicle.auction.auctionType==='DARK'">-->
...@@ -25,20 +34,29 @@ ...@@ -25,20 +34,29 @@
<!-- </template>--> <!-- </template>-->
<view class="car-tags"> <view class="car-tags">
<view class="tag-item"> <view class="tag-item">
<template v-if="auctionVehicle.auctionState==='PREVIEW'"> <template v-if="auctionVehicle.auctionState === 'PREVIEW'">
<template v-if="previewLessThen24h"> <template v-if="previewLessThen24h">
<van-count-down class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="countDownBidStart"/> <van-count-down class="white-small-count-down"
format="HH:mm:ss 后开拍"
:time="previewCountDown"
@finish="countDownBidStart" />
</template> </template>
<template v-else> <template v-else>
{{ previewStatus }} {{ previewStatus }}
</template> </template>
</template> </template>
<template v-if="auctionVehicle.auctionState==='AUCTIONING'"> <template v-if="auctionVehicle.auctionState === 'AUCTIONING'">
<template v-if="remaining5m"> <template v-if="remaining5m">
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 mm:ss" @finish="countDownBidEnd"/> <van-count-down class="white-small-count-down"
format="距离结束 mm:ss"
:time="endRemaining"
@finish="countDownBidEnd" />
</template> </template>
<template v-else> <template v-else>
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 HH:mm:ss" @finish="countDownBidEnd"/> <van-count-down class="white-small-count-down"
format="距离结束 HH:mm:ss"
:time="endRemaining"
@finish="countDownBidEnd" />
</template> </template>
</template> </template>
</view> </view>
...@@ -46,23 +64,22 @@ ...@@ -46,23 +64,22 @@
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Prop, Vue} from "vue-facing-decorator"; import { Component } from "vue-facing-decorator";
import AbstractVehicleItem from "@/components/AbstractVehicleItem"; import AbstractVehicleItem from "@/components/AbstractVehicleItem";
@Component({ @Component({
components: {} components: {}
}) })
export default class VehicleCoverWrapper extends AbstractVehicleItem { export default class VehicleCoverWrapper extends AbstractVehicleItem {}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.car-image-wrapper { .car-image-wrapper {
position: relative;
min-width: 120px; min-width: 120px;
height: 90px; height: 90px;
position: relative;
} }
.car-image { .car-image {
...@@ -73,30 +90,30 @@ export default class VehicleCoverWrapper extends AbstractVehicleItem { ...@@ -73,30 +90,30 @@ export default class VehicleCoverWrapper extends AbstractVehicleItem {
.car-tags { .car-tags {
position: absolute; position: absolute;
bottom: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
bottom: 0;
background-color: #00000080; background-color: #00000080;
border-radius: 0 0 12px 12px; border-radius: 0 0 12px 12px;
//opacity: 0.5; //opacity: 0.5;
} }
.tag-item { .tag-item {
color: #fff;
font-size: 10px;
position: relative; position: relative;
bottom: 1px; bottom: 1px;
font-size: 10px;
color: #fff;
} }
.light-status { .light-status {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
border-radius: 8px 0px 10px 0px; padding: 2px 4px;
background: linear-gradient(228.31deg, #F23204CC 0%, #FF9F82CC 100%);
font-size: 10px; font-size: 10px;
color: #fff; color: #fff;
padding: 2px 4px; background: linear-gradient(228.31deg, #F23204CC 0%, #FF9F82CC 100%);
border-radius: 8px 0 10px;
} }
.light-preview { .light-preview {
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
</text> </text>
<template v-if="searchQuery?.vehicleClass && searchQuery?.vehicleClass.length > 0"> <template v-if="searchQuery?.vehicleClass && searchQuery?.vehicleClass.length > 0">
<text v-for="item in searchQuery?.vehicleClass" <text v-for="(item,index) in searchQuery?.vehicleClass"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearVehicleClassFilter(item)"> @click="clearVehicleClassFilter(item)">
{{ item.name }} X {{ item.name }} X
...@@ -41,7 +42,8 @@ ...@@ -41,7 +42,8 @@
</text> </text>
<template v-if="searchQuery?.bxslxs && searchQuery?.bxslxs.length > 0"> <template v-if="searchQuery?.bxslxs && searchQuery?.bxslxs.length > 0">
<text v-for="bxslx in searchQuery?.bxslxs" <text v-for="(bxslx,index) in searchQuery?.bxslxs"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearBxslxFilter(bxslx)"> @click="clearBxslxFilter(bxslx)">
{{ bxslx }} X {{ bxslx }} X
...@@ -102,7 +104,8 @@ ...@@ -102,7 +104,8 @@
</text> </text>
<template v-if="searchQuery?.emissionStandards && searchQuery?.emissionStandards.length > 0"> <template v-if="searchQuery?.emissionStandards && searchQuery?.emissionStandards.length > 0">
<text v-for="item in searchQuery?.emissionStandards" <text v-for="(item,index) in searchQuery?.emissionStandards"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearEmissionStandardFilter(item)"> @click="clearEmissionStandardFilter(item)">
国{{ item }} X 国{{ item }} X
...@@ -110,7 +113,8 @@ ...@@ -110,7 +113,8 @@
</template> </template>
<template v-if="searchQuery?.usageTypes && searchQuery?.usageTypes.length > 0"> <template v-if="searchQuery?.usageTypes && searchQuery?.usageTypes.length > 0">
<text v-for="item in searchQuery?.usageTypes" <text v-for="(item,index) in searchQuery?.usageTypes"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearUsageTypeFilter(item)"> @click="clearUsageTypeFilter(item)">
{{ item.name }} X {{ item.name }} X
...@@ -118,14 +122,16 @@ ...@@ -118,14 +122,16 @@
</template> </template>
<template v-if="searchQuery?.exteriorColor && searchQuery?.exteriorColor.length > 0"> <template v-if="searchQuery?.exteriorColor && searchQuery?.exteriorColor.length > 0">
<text v-for="item in searchQuery?.exteriorColor" <text v-for="(item,index) in searchQuery?.exteriorColor"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearColorFilter(item)"> @click="clearColorFilter(item)">
{{ item.name }} X {{ item.name }} X
</text> </text>
</template> </template>
<template v-if="searchQuery?.seats && searchQuery?.seats.length > 0"> <template v-if="searchQuery?.seats && searchQuery?.seats.length > 0">
<text v-for="seat in searchQuery?.seats" <text v-for="(seat,index) in searchQuery?.seats"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearSeatFilter(seat)"> @click="clearSeatFilter(seat)">
{{ seat }}座 X {{ seat }}座 X
...@@ -133,7 +139,8 @@ ...@@ -133,7 +139,8 @@
</template> </template>
<text v-for="carType in searchQuery?.carTypes" <text v-for="(carType,index) in searchQuery?.carTypes"
:key="index"
class="filter-tag" class="filter-tag"
@click="clearCarTypeFilter(carType)"> @click="clearCarTypeFilter(carType)">
{{ carType.name }} X {{ carType.name }} X
...@@ -167,7 +174,7 @@ export default class SearchQueryFilter extends Vue { ...@@ -167,7 +174,7 @@ export default class SearchQueryFilter extends Vue {
searchQuery: SearchQuery; searchQuery: SearchQuery;
clearAllFilters(): void { clearAllFilters(): void {
this.$emit("clear-all"); this.$emit("clearAll");
} }
clearBxslxFilter(bxslx: string) { clearBxslxFilter(bxslx: string) {
......
...@@ -2,13 +2,20 @@ ...@@ -2,13 +2,20 @@
<view> <view>
<view class="price-container"> <view class="price-container">
<van-row :gutter="12"> <van-row :gutter="12">
<van-col span="8" v-for="price in priceRanges" :key="price.label"> <van-col v-for="price in priceRanges"
<view class="price-text" :class="{active:selectedPrice?.label===price.label}" @click="selectPrice(price)">{{ price.label }}</view> :key="price.label"
span="8">
<view class="price-text"
:class="{active:selectedPrice?.label === price.label}"
@click="selectPrice(price)">
{{ price.label }}
</view>
</van-col> </van-col>
</van-row> </van-row>
</view> </view>
<view class="price-range"> <view class="price-range">
<view class="price-title">价格 <view class="price-title">
价格
<text style="font-size: 12px;color: #676D7D;">(万元)</text> <text style="font-size: 12px;color: #676D7D;">(万元)</text>
</view> </view>
<view class="slider-ranges"> <view class="slider-ranges">
...@@ -19,24 +26,42 @@ ...@@ -19,24 +26,42 @@
<text>80</text> <text>80</text>
<text>不限</text> <text>不限</text>
</view> </view>
<van-slider :value="priceRange" :min="0" :max="100" :step="1" :bar-height="5" active-color="#185EFE" range @change="onSliderChange" use-button-slot> <van-slider active-color="#185EFE"
<view class="slider-button" slot="left-button"> :bar-height="5"
<view class="arrow-down"></view> :max="100"
</view> :min="0"
<view class="slider-button" slot="right-button"> range
<view class="arrow-down"></view> :step="1"
</view> use-button-slot
:value="priceRange"
@change="onSliderChange">
<template #left-button>
<view class="slider-button">
<view class="arrow-down"></view>
</view>
</template>
<template #right-button>
<view class="slider-button">
<view class="arrow-down"></view>
</view>
</template>
</van-slider> </van-slider>
</view> </view>
<view style="padding: 5px 16px;"> <view style="padding: 5px 16px;">
<van-row gutter="12"> <van-row gutter="12">
<van-col span="12"> <van-col span="12">
<van-button type="default" block round @click="onReset"> <van-button block
round
type="default"
@click="onReset">
重置 重置
</van-button> </van-button>
</van-col> </van-col>
<van-col span="12"> <van-col span="12">
<van-button type="primary" block round @click="onConfirm"> <van-button block
round
type="primary"
@click="onConfirm">
查看 查看
</van-button> </van-button>
</van-col> </van-col>
...@@ -46,82 +71,82 @@ ...@@ -46,82 +71,82 @@
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Vue, Component} from 'vue-facing-decorator'; import { Component, Vue } from "vue-facing-decorator";
@Component({}) @Component({})
export default class VehiclePriceRangeFilter extends Vue { export default class VehiclePriceRangeFilter extends Vue {
priceRanges = [ priceRange = [ 0, 0 ];
{label: '不限价格', min: 0, max: 99999},
{label: '0-3万', min: 0, max: 3}, priceRanges = [
{label: '3-5万', min: 3, max: 5}, { label: "不限价格", min: 0, max: 99_999 },
{label: '5-10万', min: 5, max: 10}, { label: "0-3万", min: 0, max: 3 },
{label: '10-20万', min: 10, max: 20}, { label: "3-5万", min: 3, max: 5 },
{label: '20-30万', min: 20, max: 30}, { label: "5-10万", min: 5, max: 10 },
{label: '30-50万', min: 30, max: 50}, { label: "10-20万", min: 10, max: 20 },
{label: '50-100万', min: 50, max: 100}, { label: "20-30万", min: 20, max: 30 },
{label: '100万以上', min: 100, max: 99999} { label: "30-50万", min: 30, max: 50 },
]; { label: "50-100万", min: 50, max: 100 },
{ label: "100万以上", min: 100, max: 99_999 }
priceRange = [0, 0]; ];
selectedPrice: any = null; selectedPrice: any = null;
selectPrice(price: any): void { onConfirm(): void {
this.selectedPrice = price; this.$emit("priceChange", { min: this.priceRange[0], max: this.priceRange[1] });
this.priceRange = [price.min, price.max]; }
}
onReset(): void {
onSliderChange(event: any): void { this.selectedPrice = null;
this.selectedPrice = null; this.priceRange = [ 0, 0 ];
this.priceRange = event.detail; this.onConfirm();
} }
onReset(): void { onSliderChange(event: any): void {
this.selectedPrice = null; this.selectedPrice = null;
this.priceRange = [0, 0]; this.priceRange = event.detail;
this.onConfirm(); }
}
selectPrice(price: any): void {
onConfirm(): void { this.selectedPrice = price;
this.$emit('priceChange', {min: this.priceRange[0], max: this.priceRange[1]}); this.priceRange = [ price.min, price.max ];
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.price-container { .price-container {
margin: 0 12px;
padding: 0 12px; padding: 0 12px;
margin: 0 12px;
} }
.price-text { .price-text {
padding: 12px;
margin-bottom: 12px;
//width: 100%; //width: 100%;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333;
border-radius: 4px;
background: #F8F9FC;
padding: 12px;
text-align: center; text-align: center;
margin-bottom: 12px; background: #F8F9FC;
border-radius: 4px;
} }
.price-text.active { .price-text.active {
background: #F5F9FF;
color: #185EFE; color: #185EFE;
background: #F5F9FF;
} }
.price-range { .price-range {
margin: 0 12px 12px 12px; padding: 0 16px 18px;
padding: 0 16px 18px 16px; margin: 0 12px 12px;
} }
.price-title { .price-title {
margin-bottom: 16px;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #141E34; color: #141E34;
margin-bottom: 16px;
} }
......
/// <reference types="vite/client" /> // / <reference types="vite/client" />
declare module '*.vue' { declare module "*.vue" {
import {DefineComponent} from 'vue' import { DefineComponent } from "vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types // eslint-disable-next-line
const component: DefineComponent<{}, {}, any> const component: DefineComponent<{}, {}, any>;
export default component export default component;
} }
/** /**
* 自定义类型申明 * 自定义类型申明
*/ */
declare module '@vue/runtime-core' { declare module "@vue/runtime-core" {
interface ComponentCustomProperties { interface ComponentCustomProperties {
$filters: any, $filters: any,
$auth: AuthService, $auth: AuthService,
......
import {createSSRApp} from "vue"; import type { AxiosStatic } from "axios";
import App from "./App.vue";
import {createI18n, useI18n} from "vue-i18n"; import { createSSRApp } from "vue";
import "./main.scss"; import { createI18n, useI18n } from "vue-i18n";
import { AuthService } from "@/common/AuthService";
import { BurialPoint } from "@/common/BurialPoint";
import { CustomTokenInterceptor } from "@/common/CustomTokenInterceptor";
import filterValueData from "@/common/filters";
// import "./components/uni-plate-input/uni-plate-input.css"; // import "./components/uni-plate-input/uni-plate-input.css";
import messages from '@/common/i18n/index'; import messages from "@/common/i18n/index";
import type {AxiosStatic} from "axios"; import store from "@/store";
import axios from "axios"; import axios from "axios";
import filterValueData from "@/common/filters"; import mpAdapter from "axios-miniprogram-adapter";
import uviewPlus from 'uview-plus';
import {AuthService} from "@/common/AuthService";
import dayjs from "dayjs"; import dayjs from "dayjs";
import duration from "dayjs/plugin/duration"; import duration from "dayjs/plugin/duration";
import {CustomTokenInterceptor} from "@/common/CustomTokenInterceptor"; import uviewPlus from "uview-plus";
import store from "@/store";
import mpAdapter from 'axios-miniprogram-adapter' import App from "./App.vue";
import {BurialPoint} from "@/common/BurialPoint";
import "./main.scss";
/// <reference types="@dcloudio/types" /> // 引入 uni 类型 // / <reference types="@dcloudio/types" /> // 引入 uni 类型
const i18n = createI18n({ const i18n = createI18n({
locale: 'zh-cn', locale: "zh-cn",
legacy: false, legacy: false,
globalInjection: true, globalInjection: true,
fallbackLocale: 'zh-cn', fallbackLocale: "zh-cn",
messages: messages messages
}); });
const systemI18n = { const systemI18n = {
setup() { setup() {
const {locale, t} = useI18n(); const { locale, t } = useI18n();
return {locale, t}; return { locale, t };
} }
}; };
dayjs.extend(duration); dayjs.extend(duration);
export function createApp() { export function createApp() {
let apiUrl = import.meta.env.VITE_APP_API_URL; const apiUrl = import.meta.env.VITE_APP_API_URL;
let baseUrl = import.meta.env.VITE_APP_API_BASE_URL; const baseUrl = import.meta.env.VITE_APP_API_BASE_URL;
console.log('baseUrl', apiUrl); console.log("baseUrl", apiUrl);
const authService: AuthService = new AuthService(); const authService: AuthService = new AuthService();
// authService.deleteAuthentication(); // authService.deleteAuthentication();
// authService.removeToken(); // authService.removeToken();
// 重写路由,全局实现埋点 // 重写路由,全局实现埋点
// 保存原始跳转方法 // 保存原始跳转方法
const originalNavigateTo: typeof uni.navigateTo = uni.navigateTo; const originalNavigateTo: typeof uni.navigateTo = uni.navigateTo;
const originalRedirectTo = uni.redirectTo; const originalRedirectTo = uni.redirectTo;
const originalSwitchTab = uni.switchTab; const originalSwitchTab = uni.switchTab;
const originalNavigateBack = uni.navigateBack; const originalNavigateBack = uni.navigateBack;
// 重写 navigateTo(打开新页面) // 重写 navigateTo(打开新页面)
uni.navigateTo = (options: UniApp.NavigateToOptions) => { uni.navigateTo = (options: UniApp.NavigateToOptions) => {
const fromPage = getCurrentPages().slice(-1)[0]; // 当前页面 const fromPage = getCurrentPages().slice(-1)[0]; // 当前页面
const toPage = options.url; // 目标页面路径 const toPage = options.url; // 目标页面路径
// 可在此处记录日志(如发送到后台) // 可在此处记录日志(如发送到后台)
return originalNavigateTo.call(uni, options); // 执行原始跳转 return originalNavigateTo.call(uni, options); // 执行原始跳转
}; };
// 重写 redirectTo(关闭当前页,打开新页面) // 重写 redirectTo(关闭当前页,打开新页面)
uni.redirectTo = (options: UniApp.RedirectToOptions) => { uni.redirectTo = (options: UniApp.RedirectToOptions) => {
const fromPage = getCurrentPages().slice(-1)[0]; const fromPage = getCurrentPages().slice(-1)[0];
const toPage = options.url; const toPage = options.url;
return originalRedirectTo.call(uni, options); return originalRedirectTo.call(uni, options);
}; };
// 重写 switchTab(切换底部 tab) // 重写 switchTab(切换底部 tab)
uni.switchTab = (options: UniApp.SwitchTabOptions) => { uni.switchTab = (options: UniApp.SwitchTabOptions) => {
const fromPage = getCurrentPages().slice(-1)[0]; const fromPage = getCurrentPages().slice(-1)[0];
const toPage = options.url as string; const toPage = options.url as string;
// 埋点 // 埋点
switch (toPage) { switch (toPage) {
case 'pages/tabbar/HomePage': case "pages/tabbar/AuctionPage": {
BurialPoint.burialPoint(authService.getAuthentication(), 'auction_nav_hometab_click', '0', toPage); BurialPoint.burialPoint(authService.getAuthentication(), "auction_nav_auctiontab_click", "0", toPage);
break; break;
case 'pages/tabbar/AuctionPage': }
BurialPoint.burialPoint(authService.getAuthentication(), 'auction_nav_auctiontab_click', '0', toPage); case "pages/tabbar/HomePage": {
break; BurialPoint.burialPoint(authService.getAuthentication(), "auction_nav_hometab_click", "0", toPage);
case 'pages/tabbar/ProfilePage': break;
BurialPoint.burialPoint(authService.getAuthentication(), 'auction_nav_mytab_click', '0', toPage); }
break; case "pages/tabbar/ProfilePage": {
} BurialPoint.burialPoint(authService.getAuthentication(), "auction_nav_mytab_click", "0", toPage);
return originalSwitchTab.call(uni, options); break;
}; }
}
// // 重写 navigateBack(返回上一页) return originalSwitchTab.call(uni, options);
// uni.navigateBack = function (options: UniApp.NavigateBackOptions) { };
// const fromPage = getCurrentPages().slice(-1)[0];
// const delta = options.delta || 1; // // 重写 navigateBack(返回上一页)
// const toPageIndex = getCurrentPages().length - 1 - delta; // uni.navigateBack = function (options: UniApp.NavigateBackOptions) {
// const toPage = toPageIndex >= 0 ? getCurrentPages()[toPageIndex].route : '首页'; // const fromPage = getCurrentPages().slice(-1)[0];
// console.log(`从 ${fromPage.route} 返回至 ${toPage}(返回层级:${delta})`); // const delta = options.delta || 1;
// return originalNavigateBack.call(this, options); // const toPageIndex = getCurrentPages().length - 1 - delta;
// }; // const toPage = toPageIndex >= 0 ? getCurrentPages()[toPageIndex].route : '首页';
// console.log(`从 ${fromPage.route} 返回至 ${toPage}(返回层级:${delta})`);
// return originalNavigateBack.call(this, options);
const axiosInstance = axios.create({ // };
timeout: 1000 * 60, baseURL: apiUrl, headers: {},
// @ts-ignore
adapter: mpAdapter const axiosInstance = axios.create({
}); timeout: 1000 * 60, baseURL: apiUrl, headers: {},
const tokenInterceptor: CustomTokenInterceptor = new CustomTokenInterceptor(axiosInstance, authService); adapter: mpAdapter
});
const tokenInterceptor: CustomTokenInterceptor = new CustomTokenInterceptor(axiosInstance, authService);
const app = createSSRApp(App, systemI18n);
app.use(i18n).use(store).use(uviewPlus);
const app = createSSRApp(App, systemI18n);
// 挂载到全局的每一个Vue实例上 app.use(i18n).use(store).use(uviewPlus);
app.config.globalProperties.axios = axiosInstance as AxiosStatic;
app.config.globalProperties.$apiUrl = apiUrl; // 挂载到全局的每一个Vue实例上
app.config.globalProperties.$baseUrl = baseUrl; app.config.globalProperties.axios = axiosInstance as AxiosStatic;
app.config.globalProperties.$filters = filterValueData; app.config.globalProperties.$apiUrl = apiUrl;
app.config.globalProperties.$store = store; app.config.globalProperties.$baseUrl = baseUrl;
app.config.globalProperties.$filters = filterValueData;
app.config.globalProperties.$auth = authService; app.config.globalProperties.$store = store;
return {
app, app.config.globalProperties.$auth = authService;
}; return {
app,
};
} }
...@@ -5,20 +5,22 @@ ...@@ -5,20 +5,22 @@
<!-- 等待图标 --> <!-- 等待图标 -->
<view class="waiting-icon-container"> <view class="waiting-icon-container">
<view class="waiting-icon"> <view class="waiting-icon">
<image :src="imageUrl" class="state-image"></image> <image class="state-image" :src="imageUrl"></image>
</view> </view>
</view> </view>
<!-- 审核状态文字 --> <!-- 审核状态文字 -->
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFICATING'"> <view v-if="account?.certifiedState === 'CERTIFICATING'" class="status-text-container">
<text class="status-title">资料审核中</text> <text class="status-title">资料审核中</text>
<view class="status-desc">我们将于<span style="color:#007FFF ">3个工作日内</span>进行审核,审核结果会以短信的形式通知,请您耐心等待</view> <view class="status-desc">
我们将于<span style="color:#007FFF ">3个工作日内</span>进行审核,审核结果会以短信的形式通知,请您耐心等待
</view>
</view> </view>
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFY_FAILED'"> <view v-if="account?.certifiedState === 'CERTIFY_FAILED'" class="status-text-container">
<text class="status-title">审核失败</text> <text class="status-title">审核失败</text>
<text class="status-desc">很抱歉,您的认证信息中有部分信息未能通过审批,请重新上传资料</text> <text class="status-desc">很抱歉,您的认证信息中有部分信息未能通过审批,请重新上传资料</text>
</view> </view>
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFIED'"> <view v-if="account?.certifiedState === 'CERTIFIED'" class="status-text-container">
<text class="status-title">审核成功</text> <text class="status-title">审核成功</text>
<text class="status-desc">审核通过,开启您的省赚车商之旅</text> <text class="status-desc">审核通过,开启您的省赚车商之旅</text>
</view> </view>
...@@ -26,82 +28,106 @@ ...@@ -26,82 +28,106 @@
<!-- 返回按钮 --> <!-- 返回按钮 -->
<view class="button-container"> <view class="button-container">
<template v-if="account?.certifiedState==='CERTIFY_FAILED'"> <template v-if="account?.certifiedState === 'CERTIFY_FAILED'">
<van-button type="primary" round @click="navigateTo" block>重新上传</van-button> <van-button block
<van-button type="default" plain hairline round @click="navigateToHome" block>返回</van-button> round
type="primary"
@click="navigateTo">
重新上传
</van-button>
<van-button block
hairline
plain
round
type="default"
@click="navigateToHome">
返回
</van-button>
</template> </template>
<van-button v-else type="info" hairline round @click="navigateToHome" block>返回</van-button> <van-button v-else
block
hairline
round
type="info"
@click="navigateToHome">
返回
</van-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from "vue-facing-decorator"; import { Component, Vue } from "vue-facing-decorator";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AccountController} from "@/api/AccountController"; import { AccountController } from "@/api/AccountController";
import {Account} from "lib/src/entity/account/entity/Account"; import { onLoad, onShow } from "@dcloudio/uni-app";
import { Account } from "lib/src/entity/account/entity/Account";
@Component({ @Component({
components: {} components: {}
}) })
export default class CertificationResult extends Vue { export default class CertificationResult extends Vue {
account: Account = null; account: Account = null;
created(): void { // eslint-disable-next-line
onLoad((option) => { get imageUrl(): string {
AccountController.getLoginAccount(this.axios).then(res => { switch (this.account?.certifiedState) {
this.account = res.data; case "CERTIFICATING": {
}); return "/static/images/account/certifition/auditing@2x.png";
}); }
// 每次都加载 case "CERTIFIED": {
onShow((option) => { return "/static/images/account/certifition/success@2x.png";
}); }
} case "CERTIFY_FAILED": {
return "/static/images/account/certifition/fail@2x.png";
// 返回上一页 }
navigateTo() { case "UNCERTIFIED": {
if (this.account.accountType === 'COMMON') { return "/static/images/account/certifition/success@2x.png";
uni.navigateTo({url: '/module/account/PersonCertificationPage'}); }
} else if (this.account.accountType === 'PERSON') { }
uni.navigateTo({url: '/module/account/CompanyCertificationPage'}); }
}
} created(): void {
onLoad((option) => {
get imageUrl(): string { AccountController.getLoginAccount(this.axios).then(res => {
switch (this.account?.certifiedState) { this.account = res.data;
case "CERTIFICATING": });
return "/static/images/account/certifition/auditing@2x.png" });
case "CERTIFIED": // 每次都加载
return "/static/images/account/certifition/success@2x.png" onShow((option) => {});
case "CERTIFY_FAILED": }
return "/static/images/account/certifition/fail@2x.png"
case "UNCERTIFIED": // 返回上一页
return "/static/images/account/certifition/success@2x.png" navigateTo() {
} if (this.account.accountType === "COMMON") {
} uni.navigateTo({ url: "/module/account/PersonCertificationPage" });
} else if (this.account.accountType === "PERSON") {
// 返回首页 uni.navigateTo({ url: "/module/account/CompanyCertificationPage" });
navigateToHome() { }
uni.switchTab({url: '/pages/tabbar/ProfilePage'}); }
}
// 返回首页
navigateToHome() {
uni.switchTab({ url: "/pages/tabbar/ProfilePage" });
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit-result-container { .submit-result-container {
min-height: 100vh;
background-color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh;
background-color: #fff;
} }
/* 内容区域样式 */ /* 内容区域样式 */
.content-container { .content-container {
flex: 1;
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
//justify-content: center; //justify-content: center;
...@@ -130,23 +156,23 @@ export default class CertificationResult extends Vue { ...@@ -130,23 +156,23 @@ export default class CertificationResult extends Vue {
/* 状态文字样式 */ /* 状态文字样式 */
.status-text-container { .status-text-container {
text-align: center;
margin-bottom: 50px;
padding: 0 20px; padding: 0 20px;
margin-bottom: 50px;
text-align: center;
} }
.status-title { .status-title {
display: block;
margin-bottom: 15px;
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #333; color: #333;
display: block;
margin-bottom: 15px;
} }
.status-desc { .status-desc {
font-size: 14px; font-size: 14px;
color: #666;
line-height: 1.6; line-height: 1.6;
color: #666;
} }
/* 按钮样式 */ /* 按钮样式 */
......
<template> <template>
<view> <view>
<view class="custom-cell"> <view class="custom-cell">
<van-field v-if="accountInfo" :value="accountInfo.nickName" placeholder="请输入昵称" :border="false" input-align="left" :maxlength="32" @change="changeNickName"/> <van-field v-if="accountInfo"
:border="false"
input-align="left"
:maxlength="32"
placeholder="请输入昵称"
:value="accountInfo.nickName"
@change="changeNickName" />
</view> </view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="bottom-action-bar"> <view class="bottom-action-bar">
<van-button type="primary" round @click="submitForm" block>保存</van-button> <van-button block
round
type="primary"
@click="submitForm">
保存
</van-button>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from 'vue-facing-decorator'; import { Component, Vue } from "vue-facing-decorator";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AccountController} from "@/api/AccountController"; import { AccountController } from "@/api/AccountController";
import {AccountInfo} from "lib/src/entity/account/domain/AccountInfo"; import { onLoad, onShow } from "@dcloudio/uni-app";
import {Account} from "lib/src/entity/account/entity/Account"; import { AccountInfo } from "lib/src/entity/account/domain/AccountInfo";
import { Account } from "lib/src/entity/account/entity/Account";
@Component({}) @Component({})
export default class EditAccountNickName extends Vue { export default class EditAccountNickName extends Vue {
accountInfo: AccountInfo = null; accountInfo: AccountInfo = null;
created(): void { changeNickName(e: any) {
onLoad((option) => { this.accountInfo.nickName = e.detail;
AccountController.getAccountInfo(this.axios).then(res => { }
this.accountInfo = res.data;
});
});
onShow((option) => {
});
}
changeNickName(e: any) { created(): void {
this.accountInfo.nickName = e.detail; onLoad((option) => {
} AccountController.getAccountInfo(this.axios).then(res => {
this.accountInfo = res.data;
});
});
onShow((option) => {});
}
submitForm(): void { submitForm(): void {
const account = new Account(); const account = new Account();
account.nickName = this.accountInfo.nickName; account.nickName = this.accountInfo.nickName;
AccountController.updateAccountNickName(this.axios, account).then(res => { AccountController.updateAccountNickName(this.axios, account).then(res => {
uni.showToast({ uni.showToast({
title: '保存成功', title: "保存成功",
icon: 'none' icon: "none"
}); });
}); });
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.custom-cell { .custom-cell {
margin: 16px;
height: 48px; height: 48px;
opacity: 1; margin: 16px;
border-radius: 8px; background: #FFF;
background: #FFFFFF;
border: 1px solid #E7EBF4; border: 1px solid #E7EBF4;
border-radius: 8px;
opacity: 1;
} }
......
<template> <template>
<view class="car-detail-container"> <view class="car-detail-container">
<view class="search-results-container"> <view class="search-results-container">
<uni-table :border="false" :stripe="false" width="100%" emptyText="暂无参拍记录"> <uni-table :border="false"
empty-text="暂无参拍记录"
:stripe="false"
width="100%">
<!-- 表头行 --> <!-- 表头行 -->
<uni-tr> <uni-tr>
<uni-th width="20%" align="center">竞价号</uni-th> <uni-th align="center" width="20%">
<uni-th width="20%" align="center">出价 竞价号
</uni-th>
<uni-th align="center" width="20%">
出价
<text style="font-size: 10px">(万元)</text> <text style="font-size: 10px">(万元)</text>
</uni-th> </uni-th>
<uni-th width="40%" align="center">出价时间</uni-th> <uni-th align="center" width="40%">
<uni-th width="20%" align="center">状态</uni-th> 出价时间
</uni-tr> </uni-th>
<!-- 表格数据行 --> <uni-th align="center" width="20%">
<uni-tr v-if="bids.length>0" v-for="(bid, index) in bids" :key="index"> 状态
<uni-td :class="{active:bid.account.accountId===accountId}"> </uni-th>
<text v-if="bid.account.accountId===accountId">
我的出价
</text>
<text v-else>
{{ bid.bidCode.substring(bid.bidCode.length - 6, bid.bidCode.length) }}
</text>
</uni-td>
<uni-td align="right" :class="{active:bid.account.accountId===accountId}">{{ $filters.formatNumber(bid.bidPrice / 10000) }}</uni-td>
<uni-td :class="{active:bid.account.accountId===accountId}">{{ bid.createTime }}</uni-td>
<uni-td :class="{active:bid.account.accountId===accountId}">
<text v-if="index === 0 " style="color: #185EFE">
生效
</text>
<text v-else>
失效
</text>
</uni-td>
</uni-tr> </uni-tr>
<!-- 表格数据行 -->
<template v-if="bids.length > 0">
<uni-tr v-for="(bid, index) in bids"
:key="index">
<uni-td :class="{active:bid.account.accountId === accountId}">
<text v-if="bid.account.accountId === accountId">
我的出价
</text>
<text v-else>
{{ bid.bidCode.substring(bid.bidCode.length - 6, bid.bidCode.length) }}
</text>
</uni-td>
<uni-td align="right" :class="{active:bid.account.accountId === accountId}">
{{ $filters.formatNumber(bid.bidPrice / 10000) }}
</uni-td>
<uni-td :class="{active:bid.account.accountId === accountId}">
{{ bid.createTime }}
</uni-td>
<uni-td :class="{active:bid.account.accountId === accountId}">
<text v-if="index === 0 " style="color: #185EFE">
生效
</text>
<text v-else>
失效
</text>
</uni-td>
</uni-tr>
</template>
</uni-table> </uni-table>
<van-empty v-if="bids.length===0" image="/static/images/empty.png" description="暂无参拍记录"/> <van-empty v-if="bids.length === 0"
description="暂无参拍记录"
image="/static/images/empty.png" />
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from "vue-facing-decorator"; import type { Auction_AuctionType } from "lib/src/entity/auction/entity/Auction";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {Bid} from "lib/src/entity/auction/entity/Bid"; import { Component, Vue } from "vue-facing-decorator";
import {BidController} from "@/api/BidController";
import type {Auction_AuctionType} from "lib/src/entity/auction/entity/Auction"; import { BidController } from "@/api/BidController";
import {AuthService} from "@/common/AuthService"; import { AuthService } from "@/common/AuthService";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { Bid } from "lib/src/entity/auction/entity/Bid";
@Component({ @Component({
components: {} components: {}
}) })
export default class AuctionBidPage extends Vue { export default class AuctionBidPage extends Vue {
aucvehId: number; accountId: number;
auctionType: Auction_AuctionType; auctionType: Auction_AuctionType;
bids: Bid[] = []; aucvehId: number;
accountId: number; bids: Bid[] = [];
created(): void { created(): void {
const that = this; const that = this;
this.accountId = (this.$auth as AuthService).getAuthentication().accountId; this.accountId = (this.$auth as AuthService).getAuthentication().accountId;
onLoad((option) => { onLoad((option) => {
this.aucvehId = option.aucvehId; this.aucvehId = option.aucvehId;
this.auctionType = option.auctionType; this.auctionType = option.auctionType;
this.loadData(); this.loadData();
}); });
// 每次都加载 // 每次都加载
onShow((option) => { onShow((option) => {});
}); }
}
loadData() { loadData() {
BidController.getBidsByAuctionVehicle(this.axios, this.aucvehId, this.auctionType).then(response => { BidController.getBidsByAuctionVehicle(this.axios, this.aucvehId, this.auctionType).then(response => {
this.bids = response.data; this.bids = response.data;
}); });
} }
} }
</script> </script>
...@@ -86,9 +108,9 @@ export default class AuctionBidPage extends Vue { ...@@ -86,9 +108,9 @@ export default class AuctionBidPage extends Vue {
} }
::v-deep .uni-table-th { ::v-deep .uni-table-th {
background-color: #F6F9FF !important; /* 表头背景色(蓝色示例) */
color: #333333 !important;
font-weight: 500; /* 文字加粗(可选) */ font-weight: 500; /* 文字加粗(可选) */
color: #333 !important;
background-color: #F6F9FF !important; /* 表头背景色(蓝色示例) */
border-bottom: none; border-bottom: none;
} }
...@@ -113,6 +135,6 @@ export default class AuctionBidPage extends Vue { ...@@ -113,6 +135,6 @@ export default class AuctionBidPage extends Vue {
::v-deep .uni-table__header, ::v-deep .uni-table__header,
::v-deep .uni-table__body { ::v-deep .uni-table__body {
width: 100% !important; width: 100% !important;
color: #333333 !important; color: #333 !important;
} }
</style> </style>
<template> <template>
<view class="dialog-container"> <view class="dialog-container">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view> <view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<view class="dialog-body"> <view class="dialog-body">
<view class="dialog-icon"> <view class="dialog-icon">
<van-image width="100" height="100" fit="cover" src="/static/images/order/payment.png"></van-image> <van-image fit="cover"
height="100"
src="/static/images/order/payment.png"
width="100">
</van-image>
</view> </view>
<view class="dialog-header"> <view class="dialog-header">
恭喜你中拍成功 恭喜你中拍成功
...@@ -12,31 +16,44 @@ ...@@ -12,31 +16,44 @@
<text>请尽快签署购车协议,并支付款项以锁定车辆</text> <text>请尽快签署购车协议,并支付款项以锁定车辆</text>
</view> </view>
<view class="dialog-footer"> <view class="dialog-footer">
<van-button type="default" round block style="margin-bottom: 10px" @click="$emit('close')">知道了</van-button> <van-button block
<van-button type="primary" hairline round block @click="signContract">去签署购车协议</van-button> round
style="margin-bottom: 10px"
type="default"
@click="$emit('close')">
知道了
</van-button>
<van-button block
hairline
round
type="primary"
@click="signContract">
去签署购车协议
</van-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Prop, Vue} from "vue-facing-decorator"; import { Component, Prop, Vue } from "vue-facing-decorator";
import {BACKGROUND_IMAGE_2} from "@/static/ResourceConstants";
import { BACKGROUND_IMAGE_2 } from "@/static/ResourceConstants";
@Component({ @Component({
components: {} components: {}
}) })
export default class BidSuccessDialog extends Vue { export default class BidSuccessDialog extends Vue {
backgroundImageUrl = BACKGROUND_IMAGE_2; backgroundImageUrl = BACKGROUND_IMAGE_2;
@Prop({type: Number, required: true}) @Prop({ type: Number, required: true })
orderId: number; orderId: number;
signContract(): void { signContract(): void {
this.$emit('close'); this.$emit("close");
uni.navigateTo({ uni.navigateTo({
url: '/module/order/contract/ContractPage?orderId=' + this.orderId url: `/module/order/contract/ContractPage?orderId=${ this.orderId}`
}); });
} }
} }
</script> </script>
...@@ -45,6 +62,7 @@ export default class BidSuccessDialog extends Vue { ...@@ -45,6 +62,7 @@ export default class BidSuccessDialog extends Vue {
.dialog-container { .dialog-container {
//height: 200px; //height: 200px;
//min-height: 100vh; //min-height: 100vh;
/* 避免内容被顶部导航栏遮挡(可选) */ /* 避免内容被顶部导航栏遮挡(可选) */
//padding-top: var(--status-bar-height); //padding-top: var(--status-bar-height);
//box-sizing: border-box; //box-sizing: border-box;
...@@ -77,15 +95,15 @@ export default class BidSuccessDialog extends Vue { ...@@ -77,15 +95,15 @@ export default class BidSuccessDialog extends Vue {
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
line-height: 18.2px; line-height: 18.2px;
color: #333333; color: #333;
} }
} }
.dialog-footer { .dialog-footer {
margin-top: 20px;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 3px;; gap: 3px;
margin-top: 20px;;
} }
</style> </style>
<template> <template>
<text class="recommend-search" v-if="visible">为您推荐</text> <text v-if="visible" class="recommend-search">为您推荐</text>
<view class="car-list" v-if="visible"> <view v-if="visible" class="car-list">
<template v-for="(car, index) in contents" :key="index"> <template v-for="(car, index) in contents" :key="index">
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item> <auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
</template> </template>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Prop} from "vue-facing-decorator"; import { Component, Prop } from "vue-facing-decorator";
import {PaginationComponent} from "autumn-vue/lib/core/page/PaginationComponent";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle"; import { AuctionController } from "@/api/AuctionController";
import {AuctionController} from "@/api/AuctionController";
import AuctionVehicleItem from "@/components/AuctionVehicleItem.vue"; import AuctionVehicleItem from "@/components/AuctionVehicleItem.vue";
import {onLoad} from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { PaginationComponent } from "autumn-vue/lib/core/page/PaginationComponent";
import { AuctionVehicle } from "lib/src/entity/auction/entity/AuctionVehicle";
@Component({ @Component({
components: {AuctionVehicleItem} components: { AuctionVehicleItem }
}) })
export default class RecommendSearchVehicles extends PaginationComponent<AuctionVehicle> { export default class RecommendSearchVehicles extends PaginationComponent<AuctionVehicle> {
@Prop({type: Boolean, default: false}) @Prop({ type: Boolean, default: false })
visible: boolean; visible: boolean;
created(): void { get contents(): AuctionVehicle[] {
this.init(this.axios, AuctionController.PAGE_RANDOM_AUCTION_VEHICLE); return this.pagination.content;
this.buildQueryForm({});
onLoad((option) => {
this.pageReload();
});
} }
get contents(): AuctionVehicle[] { created(): void {
return this.pagination.content; this.init(this.axios, AuctionController.PAGE_RANDOM_AUCTION_VEHICLE);
this.buildQueryForm({});
onLoad((option) => {
this.pageReload();
});
} }
} }
</script> </script>
...@@ -42,11 +43,11 @@ export default class RecommendSearchVehicles extends PaginationComponent<Auction ...@@ -42,11 +43,11 @@ export default class RecommendSearchVehicles extends PaginationComponent<Auction
} }
.recommend-search { .recommend-search {
margin-left: 12px;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
letter-spacing: 0px;
line-height: 25.2px; line-height: 25.2px;
margin-left: 12px; color: #333;
color: #333333; letter-spacing: 0;
} }
</style> </style>
<template> <template>
<view class="album-container" v-if="auctionVehicle"> <view v-if="auctionVehicle" class="album-container">
<template v-for="fileSubtype in fileSubtypes"> <template v-for="(fileSubtype) in fileSubtypes">
<view class="album-item" v-if="getFileInfos(fileSubtype.id).length>0"> <view v-if="getFileInfos(fileSubtype.id).length > 0"
:key="fileSubtype.id"
class="album-item">
<text class="album-title">{{ fileSubtype.name }}({{ getFileInfos(fileSubtype.id).length }})</text> <text class="album-title">{{ fileSubtype.name }}({{ getFileInfos(fileSubtype.id).length }})</text>
<view class="album"> <view class="album">
<up-album :urls="getFileInfos(fileSubtype.id)" :multiple-size="116" :keyName="fileSubtype.name"></up-album> <up-album :key-name="fileSubtype.name"
:multiple-size="116"
:urls="getFileInfos(fileSubtype.id)">
</up-album>
</view> </view>
</view> </view>
</template> </template>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from 'vue-facing-decorator'; import { Component, Vue } from "vue-facing-decorator";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AuctionController} from "@/api/AuctionController"; import { AuctionController } from "@/api/AuctionController";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle"; import { onLoad, onShow } from "@dcloudio/uni-app";
import {FileInfo} from "autumn-vue/lib/core/bean/FileInfo"; import { FileInfo } from "autumn-vue/lib/core/bean/FileInfo";
import {VEHICLE_FILE_SUB_TYPES} from "lib/src/domain/VehicleType"; import { VEHICLE_FILE_SUB_TYPES } from "lib/src/domain/VehicleType";
import { AuctionVehicle } from "lib/src/entity/auction/entity/AuctionVehicle";
@Component({}) @Component({})
export default class VehicleAlbum extends Vue { export default class VehicleAlbum extends Vue {
aucvehId: number; auctionVehicle: AuctionVehicle = null;
auctionVehicle: AuctionVehicle = null;
fileSubtypes = VEHICLE_FILE_SUB_TYPES; aucvehId: number;
created(): void { fileSubtypes = VEHICLE_FILE_SUB_TYPES;
const that = this;
onLoad((option) => {
this.aucvehId = option.aucvehId;
this.loadData();
});
onShow((option) => {
}); photos = {
} albumWidth: 0,
urls2: [
"https://picsum.photos/800/600?random=20",
"https://picsum.photos/800/600?random=12", "https://picsum.photos/800/600?random=21", "https://picsum.photos/800/600?random=10",
"https://picsum.photos/800/600?random=20",
],
};
loadData(): void { get albums(): FileInfo[] {
AuctionController.getAuctionVehicleDetailById(this.axios, this.aucvehId).then(res => { return this.auctionVehicle?.vehicle?.albums;
this.auctionVehicle = res.data; }
});
}
get albums(): FileInfo[] { created(): void {
return this.auctionVehicle?.vehicle?.albums; const that = this;
} onLoad((option) => {
this.aucvehId = option.aucvehId;
this.loadData();
});
onShow((option) => {});
}
getFileInfos(fileSubtype: string): string[] { getFileInfos(fileSubtype: string): string[] {
if (this.auctionVehicle?.vehicle?.albums) { if (this.auctionVehicle?.vehicle?.albums) {
return this.auctionVehicle?.vehicle?.albums.filter(album => { return this.auctionVehicle?.vehicle?.albums.filter(album => {
if (album.linkProps?.fileSubtype === fileSubtype) { if (album.linkProps?.fileSubtype === fileSubtype) {
return true; return true;
} else if (fileSubtype === "41" && (!album.linkProps)) { } else if (fileSubtype === "41" && (!album.linkProps)) {
return true; return true;
} else { } else {
return false; return false;
} }
}).map(file => file.url); }).map(file => file.url);
} else { } else {
return []; return [];
} }
} }
photos = { loadData(): void {
albumWidth: 0, AuctionController.getAuctionVehicleDetailById(this.axios, this.aucvehId).then(res => {
urls2: [ this.auctionVehicle = res.data;
'https://picsum.photos/800/600?random=20', });
'https://picsum.photos/800/600?random=12', 'https://picsum.photos/800/600?random=21', 'https://picsum.photos/800/600?random=10', }
'https://picsum.photos/800/600?random=20',
],
};
} }
</script> </script>
...@@ -79,22 +83,22 @@ export default class VehicleAlbum extends Vue { ...@@ -79,22 +83,22 @@ export default class VehicleAlbum extends Vue {
<style scoped lang="scss"> <style scoped lang="scss">
.album-container { .album-container {
min-height: 100vh; min-height: 100vh;
background-color: #000000; background-color: #000;
} }
.album-item { .album-item {
padding: 12px;
width: 100%; width: 100%;
padding: 12px;
} }
.album-title { .album-title {
padding-bottom: 24px;
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
padding-bottom: 24px;
} }
.album { .album {
padding-top: 16px;
width: 100%; width: 100%;
padding-top: 16px;
} }
</style> </style>
<template> <template>
<van-index-bar :index-list="indexList"> <van-index-bar :index-list="indexList">
<template v-for="(letter) in indexList" :key="letter"> <template v-for="(letter) in indexList" :key="letter">
<van-index-anchor :index="letter">{{ letter }}</van-index-anchor> <van-index-anchor :index="letter">
{{ letter }}
</van-index-anchor>
<van-cell v-for="brand in getBrandsByLetter(letter)" :key="brand.id"> <van-cell v-for="brand in getBrandsByLetter(letter)" :key="brand.id">
<template slot="title"> <template #title>
<div class="brand-cell" @click="bindClick(brand)"> <div class="brand-cell" @click="bindClick(brand)">
<image class="brand-image" :src="brand.logoUrl" mode="aspectFill"/> <image class="brand-image"
mode="aspectFill"
:src="brand.logoUrl" />
{{ brand.name }} {{ brand.name }}
</div> </div>
</template> </template>
...@@ -14,38 +18,62 @@ ...@@ -14,38 +18,62 @@
</van-index-bar> </van-index-bar>
<!-- 普通弹窗 --> <!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff"> <uni-popup ref="popup" background-color="#fff">
<view class="popup-content" v-if="selectedBrand"> <view v-if="selectedBrand" class="popup-content">
<div class="brand-cell" style="padding: 12px 16px;"> <div class="brand-cell" style="padding: 12px 16px;">
<image class="brand-image" :src="selectedBrand.logoUrl" mode="aspectFill"/> <image class="brand-image"
mode="aspectFill"
:src="selectedBrand.logoUrl" />
{{ selectedBrand.name }} {{ selectedBrand.name }}
</div> </div>
<scroll-view class="scroll-content" scroll-y> <scroll-view class="scroll-content" scroll-y>
<!-- 车型选择 --> <!-- 车型选择 -->
<van-checkbox-group v-if="selectedCarSeries" :value="selectedCarTypes" @change="onChangeCarType"> <van-checkbox-group v-if="selectedCarSeries"
:value="selectedCarTypes"
@change="onChangeCarType">
<van-cell-group> <van-cell-group>
<van-cell v-for="(carType,index) in selectedCarSeries.childs" :key="carType.id" @click="onCarTypeClick($event)" <van-cell v-for="(carType,index) in selectedCarSeries.childs"
:title="carType.name" class="brand-cell" :class="{'brand-active':selectedCarTypes.includes(carType)}" value-class="value-class" clickable :data-index="index"> :key="carType.id"
<van-checkbox :class="'checkboxes-'+index" :name="carType" @click.stop="onCheckboxClick($event)"></van-checkbox> class="brand-cell"
:class="{'brand-active':selectedCarTypes.includes(carType)}"
clickable
:data-index="index"
:title="carType.name"
value-class="value-class"
@click="onCarTypeClick($event)">
<van-checkbox :class="`checkboxes-${index}`"
:name="carType"
@click.stop="onCheckboxClick($event)">
</van-checkbox>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>
<!-- 车系选择 --> <!-- 车系选择 -->
<uni-list v-else> <uni-list v-else>
<template v-for="carSeries in selectedBrand.childs"> <uni-list-item v-for="(carSeries,index) in selectedBrand.childs"
<uni-list-item :title="carSeries.name" clickable showArrow @click="selectCarSeries(carSeries)"></uni-list-item> :key="index"
</template> clickable
show-arrow
:title="carSeries.name"
@click="selectCarSeries(carSeries)">
</uni-list-item>
</uni-list> </uni-list>
</scroll-view> </scroll-view>
<view style="padding: 12px 16px;"> <view style="padding: 12px 16px;">
<van-row gutter="12"> <van-row gutter="12">
<van-col span="9"> <van-col span="9">
<van-button type="default" block round @click="cancel"> <van-button block
round
type="default"
@click="cancel">
返回 返回
</van-button> </van-button>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
<van-button type="primary" block round @click="onSelect"> <van-button block
round
type="primary"
@click="onSelect">
确定({{ selectedCarTypes.length }}个车型) 确定({{ selectedCarTypes.length }}个车型)
</van-button> </van-button>
</van-col> </van-col>
...@@ -56,108 +84,109 @@ ...@@ -56,108 +84,109 @@
</uni-popup> </uni-popup>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Ref, Vue} from "vue-facing-decorator"; import type { CarType } from "lib/src/domain/VehicleType";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {GscApiController} from "@/api/GscApiController"; import { Component, Ref, Vue } from "vue-facing-decorator";
import type {CarType} from "lib/src/domain/VehicleType";
import { GscApiController } from "@/api/GscApiController";
import { onLoad, onShow } from "@dcloudio/uni-app";
type Brand = { type Brand = {
childs: Brand[];
id: string; id: string;
letter: string, letter: string,
name: string;
logoUrl: string; logoUrl: string;
childs: Brand[]; name: string;
selected: boolean; selected: boolean;
} }
@Component({ @Component({
components: {} components: {}
}) })
export default class CarTypesFilter extends Vue { export default class CarTypesFilter extends Vue {
brands: Brand[] = []; brands: Brand[] = [];
indexList: string[] = [ indexList: string[] = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', "A", "B", "C", "D", "E", "F", "G",
'H', 'I', 'J', 'K', 'L', 'M', 'N', "H", "I", "J", "K", "L", "M", "N",
'O', 'P', 'Q', 'R', 'S', 'T', "O", "P", "Q", "R", "S", "T",
'U', 'V', 'W', 'X', 'Y', 'Z' "U", "V", "W", "X", "Y", "Z"
]; ];
@Ref @Ref
popup: any; popup: any;
selectedBrand: Brand = null; selectedBrand: Brand = null;
selectedCarTypes: CarType[] = [];
selectedCarSeries: any = null; selectedCarSeries: any = null;
created(): void { selectedCarTypes: CarType[] = [];
onLoad((option) => {
this.loadData(); bindClick(brand: any): void {
}); this.selectedBrand = brand;
onShow(options => { this.selectedCarSeries = null;
}); this.popup.open("right");
} }
loadData(): void { cancel() {
const cacheBrands = uni.getStorageSync('cacheBrands'); this.selectedCarSeries = null;
console.debug(cacheBrands);
if (cacheBrands && cacheBrands.length > 0) {
this.brands = cacheBrands;
} else {
GscApiController.getCarBrandComplete(this.axios).then(res => {
const brandRes: any = res.data;
this.brands = brandRes.data.carinfos;
uni.setStorageSync('cacheBrands', this.brands);
});
}
} }
getBrandsByLetter(letter: string): Brand[] { created(): void {
return this.brands.filter(brand => brand.letter === letter); onLoad((option) => {
this.loadData();
});
onShow(options => {});
} }
bindClick(brand: any): void { getBrandsByLetter(letter: string): Brand[] {
this.selectedBrand = brand; return this.brands.filter(brand => brand.letter === letter);
this.selectedCarSeries = null;
this.popup.open('right');
} }
onChangeCarType(event: any): void { loadData(): void {
this.selectedCarTypes = event.detail; const cacheBrands = uni.getStorageSync("cacheBrands");
console.log(this.selectedCarTypes); console.debug(cacheBrands);
if (cacheBrands && cacheBrands.length > 0) {
this.brands = cacheBrands;
} else {
GscApiController.getCarBrandComplete(this.axios).then(res => {
const brandRes: any = res.data;
this.brands = brandRes.data.carinfos;
uni.setStorageSync("cacheBrands", this.brands);
});
}
} }
onCarTypeClick(event: any) { onCarTypeClick(event: any) {
// if (carType.selected === true) { // if (carType.selected === true) {
// carType.selected = false; // carType.selected = false;
// } else { // } else {
// carType.selected = true; // carType.selected = true;
// } // }
const {index} = event.currentTarget.dataset; const { index } = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${index}`); const checkbox = this.selectComponent(`.checkboxes-${index}`);
checkbox.toggle(); checkbox.toggle();
} }
onCheckboxClick(event: any): void { onChangeCarType(event: any): void {
event.stopPropagation(); this.selectedCarTypes = event.detail;
console.log(this.selectedCarTypes);
} }
selectCarSeries(carSeries: any) { onCheckboxClick(event: any): void {
this.selectedCarTypes = []; event.stopPropagation();
this.selectedCarSeries = carSeries;
} }
onSelect(): void { onSelect(): void {
const eventChannel = this.getOpenerEventChannel(); const eventChannel = this.getOpenerEventChannel();
eventChannel.emit('onReturnData', this.selectedCarTypes); eventChannel.emit("onReturnData", this.selectedCarTypes);
uni.navigateBack(); uni.navigateBack();
} }
cancel() { selectCarSeries(carSeries: any) {
this.selectedCarSeries = null; this.selectedCarTypes = [];
this.selectedCarSeries = carSeries;
} }
} }
</script> </script>
...@@ -170,8 +199,8 @@ export default class CarTypesFilter extends Vue { ...@@ -170,8 +199,8 @@ export default class CarTypesFilter extends Vue {
.brand-cell { .brand-cell {
display: flex; display: flex;
align-items: center;
gap: 8px; gap: 8px;
align-items: center;
} }
.brand-image { .brand-image {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- 等待图标 --> <!-- 等待图标 -->
<view class="waiting-icon-container"> <view class="waiting-icon-container">
<view class="waiting-icon"> <view class="waiting-icon">
<image src="/static/images/account/certifition/success@2x.png" class="state-image"></image> <image class="state-image" src="/static/images/account/certifition/success@2x.png"></image>
</view> </view>
</view> </view>
<view class="status-text-container"> <view class="status-text-container">
...@@ -13,38 +13,44 @@ ...@@ -13,38 +13,44 @@
</view> </view>
<!-- 返回按钮 --> <!-- 返回按钮 -->
<view class="button-container"> <view class="button-container">
<van-button type="primary" hairline round @click="navigateToHome" block>前往参拍</van-button> <van-button block
hairline
round
type="primary"
@click="navigateToHome">
前往参拍
</van-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from "vue-facing-decorator"; import { Component, Vue } from "vue-facing-decorator";
@Component({ @Component({
components: {} components: {}
}) })
export default class RechargeSuccess extends Vue { export default class RechargeSuccess extends Vue {
// 返回首页 // 返回首页
navigateToHome() { navigateToHome() {
uni.switchTab({url: '/pages/tabbar/AuctionPage'}); uni.switchTab({ url: "/pages/tabbar/AuctionPage" });
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit-result-container { .submit-result-container {
min-height: 100vh;
background-color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh;
background-color: #fff;
} }
/* 内容区域样式 */ /* 内容区域样式 */
.content-container { .content-container {
flex: 1;
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
//justify-content: center; //justify-content: center;
...@@ -73,23 +79,23 @@ export default class RechargeSuccess extends Vue { ...@@ -73,23 +79,23 @@ export default class RechargeSuccess extends Vue {
/* 状态文字样式 */ /* 状态文字样式 */
.status-text-container { .status-text-container {
text-align: center;
margin-bottom: 50px;
padding: 0 20px; padding: 0 20px;
margin-bottom: 50px;
text-align: center;
} }
.status-title { .status-title {
display: block;
margin-bottom: 15px;
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #333; color: #333;
display: block;
margin-bottom: 15px;
} }
.status-desc { .status-desc {
font-size: 14px; font-size: 14px;
color: #666;
line-height: 1.6; line-height: 1.6;
color: #666;
} }
/* 按钮样式 */ /* 按钮样式 */
......
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!