Commit bbb010f2 by Jaxon

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

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