Commit 91142695 by Jaxon

feat: 添加并适配新项目

1 parent 8a579765
Showing 850 changed files with 1170 additions and 1579 deletions
......@@ -9,21 +9,21 @@ We have a quick list of common questions to get you started engaging with this p
配置文件 `.changeset/config.json` 的各个字段说明:
- **changelog**: 自定义 changelog 生成器,自动添加以下信息:
- 🔴/🟡/🟢 版本类型标记(major/minor/patch)
- 🔗 自动提取并链接 PR 号码(支持 `#123` 格式)
- 🔗 自动提取并链接 Issue 号码(支持 `fixes #123`、`closes #123` 格式)
- 📝 自动添加提交链接(当没有 PR 时)
- 👤 自动添加作者信息
- 📦 格式化依赖更新信息
- 📅 可选的时间戳(需配置启用)
- 🔴/🟡/🟢 版本类型标记(major/minor/patch)
- 🔗 自动提取并链接 PR 号码(支持 `#123` 格式)
- 🔗 自动提取并链接 Issue 号码(支持 `fixes #123`、`closes #123` 格式)
- 📝 自动添加提交链接(当没有 PR 时)
- 👤 自动添加作者信息
- 📦 格式化依赖更新信息
- 📅 可选的时间戳(需配置启用)
- **commit**: `false` - 禁用自动提交 changeset 文件
- **fixed**: 固定版本号策略,`@venus/*` 相关的包会一起发布
- **privatePackages**: 私有包的版本号和标签管理
- **baseBranch**: 主分支名称,默认为 `main`
- **updateInternalDependencies**: 更新内部依赖版本为 `patch` 级别
- `patch`: 修复级别(1.0.0 → 1.0.1)
- `minor`: 新功能级别(1.0.0 → 1.1.0)
- `major`: 重大变更级别(1.0.0 → 2.0.0)
- `patch`: 修复级别(1.0.0 → 1.0.1)
- `minor`: 新功能级别(1.0.0 → 1.1.0)
- `major`: 重大变更级别(1.0.0 → 2.0.0)
- **ignore**: 忽略的包列表,这些包不会参与版本管理
### Changelog 配置选项
......@@ -32,16 +32,16 @@ We have a quick list of common questions to get you started engaging with this p
```json
{
"changelog": [
".changeset/changelog-functions.cjs",
{
"repo": "venusjs/venus", // GitHub 仓库名称(必需)
"showAuthor": true, // 是否显示作者(默认: true)
"showCommit": true, // 是否显示提交链接(默认: true,没有 PR 时)
"showTimestamp": false, // 是否显示时间戳(默认: false)
"showIssue": true // 是否显示 Issue 链接(默认: true)
}
]
"changelog": [
".changeset/changelog-functions.cjs",
{
"repo": "venusjs/venus", // GitHub 仓库名称(必需)
"showAuthor": true, // 是否显示作者(默认: true)
"showCommit": true, // 是否显示提交链接(默认: true,没有 PR 时)
"showTimestamp": false, // 是否显示时间戳(默认: false)
"showIssue": true // 是否显示 Issue 链接(默认: true)
}
]
}
```
......@@ -50,20 +50,25 @@ We have a quick list of common questions to get you started engaging with this p
你可以在 changeset 摘要中使用以下格式来引用 PR 和 Issue:
**PR 引用**:
- `新增功能 #123` - 会自动转换为链接
- `修复问题 pr #123` - 也支持
- `优化性能 #123 #124` - 支持多个 PR
**Issue 引用**:
- `修复登录问题 fixes #45` - 会自动转换为 Issue 链接
- `关闭问题 closes #46` - 也支持
- `解决问题 resolves #47` - 也支持
**组合使用**:
```
修复多个问题 fixes #45 和 #46 #123 #124
```
这会被解析为:
- `#45`, `#46` 识别为 Issue(因为有 `fixes` 前缀)
- `#123`, `#124` 识别为 PR(单独的 `#` 号码)
......@@ -78,21 +83,29 @@ node .changeset/test-changelog.cjs
这会显示各种场景下的 changelog 生成结果。
## 标准提交流程
```md
# 1. 先暂存要提交的文件
git add <文件或目录>
# 2. 然后使用规范化提交命令
pnpm commit
# 系统会提示你:
# - 选择 type: feat/fix/chore/etc
# - 选择 scope: scrm-base/micro-app-template/etc
# - 填写描述
# 3. (可选)创建 changeset 用于版本发布
pnpm changeset
# 4. 推送代码
git push
git push
```
---
'@venus/venus-agentic-assisant': major
'@venus/venus-agentic-base': major
"@venus/venus-agentic-assisant": major
"@venus/venus-agentic-base": major
---
修改汽车智能体平台页面布局/功能页面开发
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": [
".changeset/changelog-functions.cjs",
{
"repo": "venusjs/venus",
"showAuthor": true,
"showCommit": true,
"showTimestamp": false,
"showIssue": true
}
],
"commit": false,
"fixed": [["@venus/*"]],
"snapshot": {
"prereleaseTemplate": "{tag}-{datetime}"
},
"privatePackages": { "version": true, "tag": true },
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": [
".changeset/changelog-functions.cjs",
{
"repo": "venusjs/venus",
"showAuthor": true,
"showCommit": true,
"showTimestamp": false,
"showIssue": true
}
],
"commit": false,
"fixed": [["@venus/*"]],
"snapshot": {
"prereleaseTemplate": "{tag}-{datetime}"
},
"privatePackages": { "version": true, "tag": true },
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
---
'@venus/venus-agentic-base': major
"@venus/venus-agentic-base": major
---
汽车智能体项目微前端基座布局配置等优化
export { default } from '@venus/commitlint-config';
export { default } from "@venus/commitlint-config";
export default {
"*.{js,ts,tsx,jsx,vue}": [ "prettier --write", "eslint --fix" ],
"*.{md,json,css,less,scss}": [ "prettier --write" ]
"*.{js,ts,tsx,jsx,vue}": ["prettier --write", "eslint --fix"],
"*.{md,json,css,less,scss}": ["prettier --write"],
};
......@@ -9,7 +9,12 @@ CODEOWNERS
.nitro
.output
**/*.vue
**/*.js
**/*.ts
**/*.jsx
**/*.tsx
**/*.wxs
**/*.svg
**/*.sh
......
export { default } from '@venus/prettier-config';
export { default } from "@venus/prettier-config";
{
"import": {
"scope": "javascript,typescript",
"prefix": "im",
"body": ["import { $2 } from '$1';"],
"description": "Import a module",
},
"export-all": {
"scope": "javascript,typescript",
"prefix": "ex",
"body": ["export * from '$1';"],
"description": "Export a module",
},
"vue-script-setup": {
"scope": "vue",
"prefix": "<sc",
"body": [
"<script setup lang=\"ts\">",
"const props = defineProps<{",
" modelValue?: boolean,",
"}>()",
"$1",
"</script>",
"",
"<template>",
" <div>",
" <slot/>",
" </div>",
"</template>",
],
},
"vue-computed": {
"scope": "javascript,typescript,vue",
"prefix": "com",
"body": ["computed(() => { $1 })"],
},
"import": {
"scope": "javascript,typescript",
"prefix": "im",
"body": ["import { $2 } from '$1';"],
"description": "Import a module",
},
"export-all": {
"scope": "javascript,typescript",
"prefix": "ex",
"body": ["export * from '$1';"],
"description": "Export a module",
},
"vue-script-setup": {
"scope": "vue",
"prefix": "<sc",
"body": [
"<script setup lang=\"ts\">",
"const props = defineProps<{",
" modelValue?: boolean,",
"}>()",
"$1",
"</script>",
"",
"<template>",
" <div>",
" <slot/>",
" </div>",
"</template>",
],
},
"vue-computed": {
"scope": "javascript,typescript,vue",
"prefix": "com",
"body": ["computed(() => { $1 })"],
},
}
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"name": "venus admin playground dev",
"request": "launch",
"url": "http://localhost:5555",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/playground"
},
{
"type": "chrome",
"name": "venus admin antd dev",
"request": "launch",
"url": "http://localhost:5666",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-antd"
},
{
"type": "chrome",
"name": "venus admin ele dev",
"request": "launch",
"url": "http://localhost:5777",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-ele"
},
{
"type": "chrome",
"name": "venus admin naive dev",
"request": "launch",
"url": "http://localhost:5888",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-naive"
}
]
"$schema": "https://json.schemastore.org/launchsettings.json",
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"name": "venus admin playground dev",
"request": "launch",
"url": "http://localhost:5555",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/playground"
},
{
"type": "chrome",
"name": "venus admin antd dev",
"request": "launch",
"url": "http://localhost:5666",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-antd"
},
{
"type": "chrome",
"name": "venus admin ele dev",
"request": "launch",
"url": "http://localhost:5777",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-ele"
},
{
"type": "chrome",
"name": "venus admin naive dev",
"request": "launch",
"url": "http://localhost:5888",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-naive"
}
]
}
{
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
"eslint.nodePath": "./node_modules",
// 告诉 ESLint:这是一个 monorepo
"eslint.workingDirectories": [{ "mode": "auto" }],
// 使用 flat config(ESLint v9+ 必需)
"eslint.useFlatConfig": true,
"eslint.useESLintClass": true,
// workbench
"workbench.list.smoothScrolling": true,
"workbench.startupEditor": "newUntitledFile",
......@@ -14,6 +19,7 @@
// editor
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.cursorBlinking": "expand",
"editor.largeFileOptimizations": true,
"editor.accessibilitySupport": "off",
......@@ -45,7 +51,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[wxss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
......@@ -133,7 +139,7 @@
// 在使用搜索功能时,将这些文件夹/文件排除在外
"search.exclude": {
"**/uni_modules": true,
"**/miniprogram_npm":true,
"**/miniprogram_npm": true,
"**/node_modules": true,
"**/*.log": true,
"**/*.log*": true,
......@@ -244,15 +250,11 @@
"vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false,
"cSpell.words": [
"archiver",
"axios",
"dotenv",
"isequal",
"jspm",
"napi",
"nolebase",
"rollup",
"vitest"
],
"cSpell.words": ["archiver", "axios", "dotenv", "isequal", "jspm", "napi", "nolebase", "rollup", "vitest"],
// 语言特定配置 - LESS 注释
"[less]": {
"editor.comments.lineComment": "//",
"editor.comments.blockComment": ["/*", "*/"]
}
}
[*.{js,jsx,ts,tsx,vue,json}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
//electron_mirror=https://npm.taobao.org/mirrors/electron/
registry=https://registry.npmmirror.com
module.exports = {
presets: [
"@vue/cli-plugin-babel/preset"
]
};
presets: [
'@vue/cli-plugin-babel/preset'
]
}
{
"name": "@aus/app",
"version": "0.0.0",
"scripts": {
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-weixin": "uni -p mp-weixin",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-weixin": "uni build -p mp-weixin",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4070620250821001",
"@dcloudio/uni-app-plus": "3.0.0-4070620250821001",
"@dcloudio/uni-components": "3.0.0-4070620250821001",
"@dcloudio/uni-h5": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
"@dcloudio/uni-ui": "^1.5.11",
"@vant/area-data": "^2.1.0",
"@vant/weapp": "^1.11.7",
"autumn-uniapp": "^0.0.17",
"autumn-vue": "~0.4.47",
"axios": "~0.19.2",
"axios-adapter-uniapp": "^0.1.4",
"axios-miniprogram-adapter": "^0.3.5",
"crypto-js": "^4.2.0",
"pinyin-pro": "^3.27.0",
"uview-plus": "^3.6.4",
"vue": "3.4.21",
"vue-axios": "^3.4.0",
"vue-facing-decorator": "^3.0.4",
"vue-i18n": "9.14.5",
"vue-types": "^4.1.1",
"vuex": "^4.0.0-0",
"vuex-facing-decorator": "^1.2.7"
},
"devDependencies": {
"@dcloudio/types": "3.4.24",
"@dcloudio/uni-automator": "3.0.0-4070620250821001",
"@dcloudio/uni-cli-shared": "3.0.0-4070620250821001",
"@dcloudio/uni-stacktracey": "3.0.0-4070620250821001",
"@dcloudio/vite-plugin-uni": "^3.0.0-4070620250821001",
"@types/uni-app": "^1.4.8",
"@vue/runtime-core": "3.5.22",
"miniprogram-api-typings": "^4.1.0",
"sass": "~1.69.5",
"sass-loader": "^10.4.1",
"tslib": "^2.8.1",
"vite": "5.2.8",
"vue-tsc": "^1.0.24"
}
"name": "@aus/uniapp",
"version": "0.0.0",
"scripts": {
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-weixin": "uni -p mp-weixin",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-weixin": "uni build -p mp-weixin",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4070620250821001",
"@dcloudio/uni-app-plus": "3.0.0-4070620250821001",
"@dcloudio/uni-components": "3.0.0-4070620250821001",
"@dcloudio/uni-h5": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
"@dcloudio/uni-ui": "^1.5.11",
"@vant/area-data": "^2.1.0",
"@vant/weapp": "^1.11.7",
"autumn-uniapp": "^0.0.17",
"autumn-vue": "~0.4.47",
"axios": "~0.19.2",
"axios-adapter-uniapp": "^0.1.4",
"axios-miniprogram-adapter": "^0.3.5",
"crypto-js": "^4.2.0",
"lib": "file:../lib",
"pinyin-pro": "^3.27.0",
"uview-plus": "^3.6.4",
"vue": "3.4.21",
"vue-axios": "^3.4.0",
"vue-facing-decorator": "^3.0.4",
"vue-i18n": "9.14.5",
"vue-types": "^4.1.1",
"vuex": "^4.0.0-0",
"vuex-facing-decorator": "^1.2.7"
},
"devDependencies": {
"@dcloudio/types": "3.4.24",
"@dcloudio/uni-automator": "3.0.0-4070620250821001",
"@dcloudio/uni-cli-shared": "3.0.0-4070620250821001",
"@dcloudio/uni-stacktracey": "3.0.0-4070620250821001",
"@dcloudio/vite-plugin-uni": "^3.0.0-4070620250821001",
"@types/uni-app": "^1.4.8",
"@vue/runtime-core": "3.5.22",
"@vue/tsconfig": "^0.1.3",
"miniprogram-api-typings": "^4.1.0",
"sass": "~1.69.5",
"sass-loader": "^10.4.1",
"tslib": "^2.8.1",
"typescript": "^4.9.4",
"vite": "5.2.8",
"vue-tsc": "^1.0.24"
}
}
This diff could not be displayed because it is too large.
<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 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" 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 class="feature-item">{{ vehicle.ownership.registrationDate.substring(0, 4) }}年上牌</text>
<text v-if="efficient" class="feature-item">省油代步</text>
<text v-if="vehicle.coreSpecs.rlxs === '纯电动'" class="feature-item">新能源</text>
<text class="feature-item" v-if="efficient">省油代步</text>
<text class="feature-item" v-if="vehicle.coreSpecs.rlxs==='纯电动'">新能源</text>
</view>
<view class="car-price-container">
<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>
<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>
<text class="car-price car-price-unit">万</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>
<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>
</view>
</view>
<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 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>
</view>
</template>
<script lang="ts">
import { Component, Prop } from "vue-facing-decorator";
import { FavoriteController } from "@/api/FavoriteController";
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 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 () {
uni.reLaunch({ url: "/pages/LoginPage" });
title: '请先登录', complete: function () {
uni.reLaunch({url: '/pages/LoginPage'});
}
});
}
uni.showLoading({ title: "正在收藏中", mask: true });
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 ? "收藏成功" : "取消收藏 " });
uni.showToast({title: this.auctionVehicle.favorite ? '收藏成功' : '取消收藏 '});
}, 300);
}).finally(() => uni.hideLoading());
}
......@@ -92,38 +77,38 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
/* 车辆项样式 */
.car-item {
position: relative;
display: flex;
padding: 1px;
margin-bottom: 10px;
//background-color: #fff;
border-radius: 8px;
padding: 1px;
position: relative;
margin-bottom: 10px;
}
.car-info {
display: flex;
flex: 1;
margin-left: 10px;
display: flex;
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;
line-height: 1.4;
color: #333;
line-height: 1.4;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 245px;
}
.car-specs {
margin-top: 4px;
font-size: 12px;
color: #666;
margin-top: 4px;
}
.car-features {
......@@ -135,19 +120,19 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
.feature-item {
//border-color: #f5f5f5;
//background-color: #f5f5f5;
padding: 2px 6px;
font-size: 10px;
color: #999;
border: 1px solid #f0f0f0;
//border-color: #f5f5f5;
//background-color: #f5f5f5;
padding: 2px 6px;
border-radius: 2px;
}
.car-price-container {
display: flex;
gap: 4px;
align-items: center;
gap: 4px;
margin-top: 4px;
}
......@@ -158,8 +143,8 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
.car-price {
font-size: 16px;
font-weight: 500;
color: #ff4d4f;
font-weight: 500;
}
.car-price-unit {
......
......@@ -30,35 +30,35 @@ import { onLoad } from "@dcloudio/uni-app";
@Component({})
export default class CustomNavBar extends Vue {
@Prop({ type: String, required: false })
backUrl: string;
backUrl: string;
@Prop({ type: Boolean, required: false, default: false })
showBack: boolean;
showBack: boolean;
// 状态栏高度(微信小程序中由系统提供)
@Prop({ type: Number, required: false, default: 48 })
statusBarHeight: number;
statusBarHeight: number;
@Prop({ type: String, required: false })
title: string;
title: string;
created(): void {
onLoad((option) => {
// const systemInfo = uni.getWindowInfo();
// this.statusBarHeight = systemInfo.statusBarHeight;
});
onLoad((option) => {
// const systemInfo = uni.getWindowInfo();
// this.statusBarHeight = systemInfo.statusBarHeight;
});
}
onBack() {
if (this.backUrl) {
if (this.backUrl.startsWith("/pages/tabbar/")) {
uni.switchTab({ url: this.backUrl });
} else {
uni.reLaunch({ url: this.backUrl });
}
} else {
uni.navigateBack({ delta: 1 });
}
if (this.backUrl) {
if (this.backUrl.startsWith("/pages/tabbar/")) {
uni.switchTab({ url: this.backUrl });
} else {
uni.reLaunch({ url: this.backUrl });
}
} else {
uni.navigateBack({ delta: 1 });
}
}
}
......
<template>
<view class="car-image-wrapper">
<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">
<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'">
等待竞价
</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 class="close-icon"
mode="aspectFit"
src="/static/images/close.png">
</image>
<image src="/static/images/close.png" class="close-icon" mode="aspectFit"></image>
</template>
<!-- <template v-if="auctionVehicle.auction.auctionType==='DARK'">-->
......@@ -34,29 +25,20 @@
<!-- </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"
format="HH:mm:ss 后开拍"
:time="previewCountDown"
@finish="countDownBidStart" />
<van-count-down class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @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"
format="距离结束 mm:ss"
:time="endRemaining"
@finish="countDownBidEnd" />
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 mm:ss" @finish="countDownBidEnd"/>
</template>
<template v-else>
<van-count-down class="white-small-count-down"
format="距离结束 HH:mm:ss"
:time="endRemaining"
@finish="countDownBidEnd" />
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 HH:mm:ss" @finish="countDownBidEnd"/>
</template>
</template>
</view>
......@@ -64,22 +46,23 @@
</view>
</template>
<script lang="ts">
import { Component } from "vue-facing-decorator";
import {Component, Prop, Vue} from "vue-facing-decorator";
import AbstractVehicleItem from "@/components/AbstractVehicleItem";
@Component({
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 {
......@@ -90,30 +73,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;
padding: 2px 4px;
border-radius: 8px 0px 10px 0px;
background: linear-gradient(228.31deg, #F23204CC 0%, #FF9F82CC 100%);
font-size: 10px;
color: #fff;
background: linear-gradient(228.31deg, #F23204CC 0%, #FF9F82CC 100%);
border-radius: 8px 0 10px;
padding: 2px 4px;
}
.light-preview {
......
......@@ -164,52 +164,52 @@ import { SearchQuery } from "@/common/SearchQuery";
export default class SearchQueryFilter extends Vue {
@Prop({ required: false, type: Object })
searchQuery: SearchQuery;
searchQuery: SearchQuery;
clearAllFilters(): void {
this.$emit("clear-all");
this.$emit("clear-all");
}
clearBxslxFilter(bxslx: string) {
this.searchQuery.bxslxs.splice(this.searchQuery.bxslxs.indexOf(bxslx), 1);
this.$emit("change");
this.searchQuery.bxslxs.splice(this.searchQuery.bxslxs.indexOf(bxslx), 1);
this.$emit("change");
}
clearCarTypeFilter(carType: CarType) {
this.searchQuery.carTypes.splice(this.searchQuery.carTypes.indexOf(carType), 1);
this.$emit("change");
this.searchQuery.carTypes.splice(this.searchQuery.carTypes.indexOf(carType), 1);
this.$emit("change");
}
clearColorFilter(color: any) {
this.searchQuery.exteriorColor.splice(this.searchQuery.exteriorColor.indexOf(color), 1);
this.$emit("change");
this.searchQuery.exteriorColor.splice(this.searchQuery.exteriorColor.indexOf(color), 1);
this.$emit("change");
}
clearEmissionStandardFilter(seat: number) {
this.searchQuery.emissionStandards.splice(this.searchQuery.emissionStandards.indexOf(seat), 1);
this.$emit("change");
this.searchQuery.emissionStandards.splice(this.searchQuery.emissionStandards.indexOf(seat), 1);
this.$emit("change");
}
clearFilter(fieldName: string): void {
if (Object.prototype.hasOwnProperty.call(this.searchQuery, fieldName)) {
(this.searchQuery as Record<string, any>)[fieldName] = null;
}
this.$emit("change");
if (Object.prototype.hasOwnProperty.call(this.searchQuery, fieldName)) {
(this.searchQuery as Record<string, any>)[fieldName] = null;
}
this.$emit("change");
}
clearSeatFilter(seat: number) {
this.searchQuery.seats.splice(this.searchQuery.seats.indexOf(seat), 1);
this.$emit("change");
this.searchQuery.seats.splice(this.searchQuery.seats.indexOf(seat), 1);
this.$emit("change");
}
clearUsageTypeFilter(usageType: any) {
this.searchQuery.usageTypes.splice(this.searchQuery.usageTypes.indexOf(usageType), 1);
this.$emit("change");
this.searchQuery.usageTypes.splice(this.searchQuery.usageTypes.indexOf(usageType), 1);
this.$emit("change");
}
clearVehicleClassFilter(vehicleClass: any) {
this.searchQuery.vehicleClass.splice(this.searchQuery.vehicleClass.indexOf(vehicleClass), 1);
this.$emit("change");
this.searchQuery.vehicleClass.splice(this.searchQuery.vehicleClass.indexOf(vehicleClass), 1);
this.$emit("change");
}
pullFilters(): void {}
......
......@@ -2,20 +2,13 @@
<view>
<view class="price-container">
<van-row :gutter="12">
<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 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>
</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">
......@@ -26,39 +19,24 @@
<text>80</text>
<text>不限</text>
</view>
<van-slider :bar-height="5"
active-color="#185EFE"
: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 :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>
</view>
<view style="padding: 5px 16px;">
<van-row gutter="12">
<van-col span="12">
<van-button block
round
type="default"
@click="onReset">
<van-button type="default" block round @click="onReset">
重置
</van-button>
</van-col>
<van-col span="12">
<van-button block
round
type="primary"
@click="onConfirm">
<van-button type="primary" block round @click="onConfirm">
查看
</van-button>
</van-col>
......@@ -68,44 +46,44 @@
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import {Vue, Component} from 'vue-facing-decorator';
@Component({})
export default class VehiclePriceRangeFilter extends Vue {
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 }
{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;
onConfirm(): void {
this.$emit("priceChange", { min: this.priceRange[0], max: this.priceRange[1] });
selectPrice(price: any): void {
this.selectedPrice = price;
this.priceRange = [price.min, price.max];
}
onReset(): void {
onSliderChange(event: any): void {
this.selectedPrice = null;
this.priceRange = [ 0, 0 ];
this.onConfirm();
this.priceRange = event.detail;
}
onSliderChange(event: any): void {
onReset(): void {
this.selectedPrice = null;
this.priceRange = event.detail;
this.priceRange = [0, 0];
this.onConfirm();
}
selectPrice(price: any): void {
this.selectedPrice = price;
this.priceRange = [ price.min, price.max ];
onConfirm(): void {
this.$emit('priceChange', {min: this.priceRange[0], max: this.priceRange[1]});
}
}
</script>
......@@ -113,37 +91,37 @@ export default class VehiclePriceRangeFilter extends Vue {
<style scoped lang="scss">
.price-container {
padding: 0 12px;
margin: 0 12px;
padding: 0 12px;
}
.price-text {
padding: 12px;
margin-bottom: 12px;
//width: 100%;
font-size: 12px;
font-weight: 400;
color: #333;
text-align: center;
background: #F8F9FC;
color: #333333;
border-radius: 4px;
background: #F8F9FC;
padding: 12px;
text-align: center;
margin-bottom: 12px;
}
.price-text.active {
color: #185EFE;
background: #F5F9FF;
color: #185EFE;
}
.price-range {
padding: 0 16px 18px;
margin: 0 12px 12px;
margin: 0 12px 12px 12px;
padding: 0 16px 18px 16px;
}
.price-title {
margin-bottom: 16px;
font-size: 16px;
font-weight: 500;
color: #141E34;
margin-bottom: 16px;
}
......
.so-mask{position:fixed;inset:0;z-index:998;background:rgb(0 0 0 / 50%)}
.so-plate{position:absolute;bottom:0;left:0;box-sizing:border-box;width:100%;padding:25upx 25upx 0;background:#fff}
.so-plate-head{display:-webkit-box;display:flex;align-items:center;justify-content:space-between;-webkit-box-pack:justify;-webkit-box-align:center}
.so-plate-type{display:block;flex:1;-webkit-box-flex:1}
.so-plate-type label{display:inline-block;min-height:32upx;margin-right:10upx;font-size:26upx}
.so-plate-body{box-sizing:border-box;display:-webkit-box;display:flex;align-items:center;justify-content:space-between;padding:30upx 0;-webkit-box-pack:justify;-webkit-box-align:center}
.so-plate-word{position:relative;box-sizing:border-box;width:calc(4.28571429%);height:0;padding-bottom:calc(4.28571429%);margin:0 5upx;border:1upx solid #ccc;border-radius:10upx}
.so-plate-word.active{border-color:#007aff;box-shadow:0 0 15upx 0 #007aff}
.so-plate-word text{position:absolute;top:50%;left:50%;font-size:32upx;font-weight:700;transform:translateX(-50%) translateY(-50%)}
.so-plate-dot{width:15upx;height:15upx;margin:0 5upx;background:#ccc;border-radius:50%}
.so-plate-keyboard{box-sizing:border-box;padding:20upx 25upx 10upx;margin-right:-25upx;margin-left:-25upx;background:#eee;transition:all .3s}
.so-plate-keyboard>view{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-pack:justify;justify-content:space-between}
.so-plate-key{position:relative;display:block;display:-webkit-box;display:flex;align-items:center;justify-content:center;width:80upx;height:80upx;margin:5upx 0;font-size:32upx;text-align:center;background:#fff;border-radius:10upx;box-shadow:0 0 8upx 0 #bbb;-webkit-box-align:center;-webkit-box-pack:center}
.so-plate-key.hover{background:#efefef}
.so-plate-key.fill-block{width:80upx;height:80upx;background:none;box-shadow:none}
.so-plate-btn{display:inline-block;margin:0 0 0 10upx;font-size:28upx;text-align:center;background:#fff;border-radius:10upx;box-shadow:0 0 10upx 0 #bbb}
.so-plate-btn-group{box-sizing:border-box;display:-webkit-box;display:flex;justify-content:space-between;padding:0 25upx 10upx;margin-right:-25upx;margin-left:-25upx;background:#eee;-webkit-box-pack:justify}
.so-plate-btn--cancel{margin:0}
.so-plate-btn--submit{color:#fff;background:#5773f9}
.so-plate-btn--delete{color:#fd6b6d}
.animation-scale-up{animation-name:scale-up;animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:both}
@keyframes scale-up{0%{opacity:.8;transform:scale(.8)}
100%{opacity:1;transform:scale(1)}}
@keyframes scale-up{0%{opacity:.8;transform:scale(.8)}
100%{opacity:1;transform:scale(1)}}
\ No newline at end of file
.so-mask{position:fixed;top:0;bottom:0;right:0;left:0;background:rgba(0,0,0,0.5);z-index:998}.so-plate{box-sizing:border-box;position:absolute;bottom:0;width:100%;left:0;background:#fff;padding:25upx 25upx 0 25upx}.so-plate-head{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center}.so-plate-type{-webkit-box-flex:1;flex:1;display:block}.so-plate-type label{display:inline-block;min-height:32upx;font-size:26upx;margin-right:10upx}.so-plate-body{box-sizing:border-box;padding:30upx 0;display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center}.so-plate-word{border:1upx solid #ccc;border-radius:10upx;height:0;margin:0 5upx;box-sizing:border-box;padding-bottom:calc(4.28571429%);width:calc(4.28571429%);position:relative}.so-plate-word.active{border-color:#007aff;box-shadow:0 0 15upx 0 #007aff}.so-plate-word text{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);font-weight:700;font-size:32upx}.so-plate-dot{width:15upx;height:15upx;background:#ccc;border-radius:50%;margin:0 5upx}.so-plate-keyboard{background:#eee;margin-left:-25upx;margin-right:-25upx;padding:20upx 25upx 10upx 25upx;box-sizing:border-box;-webkit-transition:all .3s;transition:all .3s}.so-plate-keyboard>view{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-pack:justify;justify-content:space-between}.so-plate-key{display:block;background:#fff;border-radius:10upx;box-shadow:0 0 8upx 0 #bbb;width:80upx;height:80upx;margin:5upx 0;font-size:32upx;text-align:center;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;position:relative}.so-plate-key.hover{background:#efefef}.so-plate-key.fill-block{width:80upx;height:80upx;background:none;box-shadow:none}.so-plate-btn{display:inline-block;background:#fff;border-radius:10upx;box-shadow:0 0 10upx 0 #bbb;font-size:28upx;text-align:center;margin:0 0 0 10upx}.so-plate-btn-group{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;background:#eee;margin-left:-25upx;margin-right:-25upx;box-sizing:border-box;padding:0 25upx 10upx 25upx}.so-plate-btn--cancel{margin:0}.so-plate-btn--submit{background:#5773f9;color:#fff}.so-plate-btn--delete{color:#fd6b6d}.animation-scale-up{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:scale-up;animation-name:scale-up}@-webkit-keyframes scale-up{0%{opacity:.8;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-up{0%{opacity:.8;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}
\ No newline at end of file
.so-mask {
position: fixed;
inset: 0;
top: 0;
bottom: 0;
right: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 998;
background: rgb(0 0 0 / 50%);
}
.so-plate {
box-sizing: border-box;
position: absolute;
bottom: 0;
left: 0;
box-sizing: border-box;
width: 100%;
padding: 25upx 25upx 0;
left: 0;
background: #fff;
padding: 25upx 25upx 0 25upx;
&-head {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
}
&-type {
display:block;
&-type {
flex:1;
display:block;
label {
display: inline-block;
min-height: 32upx;
margin-right: 10upx;
font-size: 26upx;
margin-right: 10upx;
}
}
&-body {
box-sizing: border-box;
padding: 30upx 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 30upx 0;
align-items: center;
}
&-word {
position: relative;
box-sizing: border-box;
width: calc((100% - 70upx) / 7);
height: 0;
padding-bottom: calc((100% - 70upx) / 7);
margin: 0 5upx;
border: 1upx solid #ccc;
border-radius: 10upx;
height: 0;
margin: 0 5upx;
box-sizing: border-box;
padding-bottom: calc((100% - 70upx) / 7);
width: calc((100% - 70upx) / 7);
position: relative;
&.active {
border-color: #007aff;
box-shadow: 0 0 15upx 0 #007aff;
}
text {
position: absolute;
top: 50%;
left: 50%;
font-size: 32upx;
font-weight: 700;
transform: translateX(-50%) translateY(-50%);
font-weight: 700;
font-size: 32upx;
}
}
&-dot {
width: 15upx;
height: 15upx;
margin: 0 5upx;
background: #ccc;
border-radius: 50%;
margin: 0 5upx;
}
&-keyboard {
box-sizing: border-box;
padding: 20upx 25upx 10upx;
margin-right: -25upx;
margin-left: -25upx;
background: #eee;
margin-left: -25upx;
margin-right: -25upx;
padding: 20upx 25upx 10upx 25upx;
box-sizing: border-box;
transition: all .3s;
&>view{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
}
&-key {
position: relative;
display: block;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
border-radius: 10upx;
box-shadow: 0 0 8upx 0 #bbb;
width: 80upx;
height: 80upx;
margin: 5upx 0;
font-size: 32upx;
text-align: center;
background: #fff;
border-radius: 10upx;
box-shadow: 0 0 8upx 0 #bbb;
display: flex;
align-items: center;
justify-content: center;
position: relative;
&.hover {
background: #efefef;
}
&.fill-block {
width: 80upx;
height: 80upx;
......@@ -114,36 +103,31 @@
box-shadow: none;
}
}
&-btn {
display: inline-block;
padding:0 25upx;
margin:0 0 0 10upx;
font-size: 28upx;
text-align: center;
background: #fff;
border-radius: 10upx;
box-shadow: 0 0 10upx 0 #bbb;
font-size: 28upx;
text-align: center;
margin:0 0 0 10upx;
padding:0 25upx;
&-group{
box-sizing: border-box;
display: flex;
justify-content: space-between;
padding: 0 25upx 10upx;
margin-right: -25upx;
margin-left: -25upx;
background: #eee;
margin-left: -25upx;
margin-right: -25upx;
box-sizing: border-box;
padding: 0 25upx 10upx 25upx;
}
&--cancel{
margin:0;
}
&--submit{
color:#fff;
background:#5773f9;
color:#fff;
}
&--delete{
color:#fd6b6d;
}
......@@ -152,12 +136,11 @@
.animation-scale-up {
animation-name: scale-up;
animation-duration: .2s;
animation-timing-function: ease-out;
animation-fill-mode: both
animation-fill-mode: both;
animation-name: scale-up
}
@keyframes scale-up {
0% {
opacity: .8;
......
......@@ -8,12 +8,12 @@ uni-page {
.header-wrap {
position: fixed;
top: 0;
left: 0;
top: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
align-items: center;
.header-title {
font-size: 34upx;
......@@ -29,5 +29,5 @@ uni-page {
.van-button--info {
//font-size: 20px;
background-color: rgb(24 94 254 / 100%);
background-color: rgba(24, 94, 254, 1);
}
\ No newline at end of file
......@@ -5,22 +5,20 @@
<!-- 等待图标 -->
<view class="waiting-icon-container">
<view class="waiting-icon">
<image class="state-image" :src="imageUrl"></image>
<image :src="imageUrl" class="state-image"></image>
</view>
</view>
<!-- 审核状态文字 -->
<view v-if="account?.certifiedState === 'CERTIFICATING'" class="status-text-container">
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFICATING'">
<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 v-if="account?.certifiedState === 'CERTIFY_FAILED'" class="status-text-container">
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFY_FAILED'">
<text class="status-title">审核失败</text>
<text class="status-desc">很抱歉,您的认证信息中有部分信息未能通过审批,请重新上传资料</text>
</view>
<view v-if="account?.certifiedState === 'CERTIFIED'" class="status-text-container">
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFIED'">
<text class="status-title">审核成功</text>
<text class="status-desc">审核通过,开启您的省赚车商之旅</text>
</view>
......@@ -28,40 +26,20 @@
<!-- 返回按钮 -->
<view class="button-container">
<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 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>
<van-button v-else
block
hairline
round
type="info"
@click="navigateToHome">
返回
</van-button>
<van-button v-else type="info" hairline round @click="navigateToHome" block>返回</van-button>
</view>
</view>
</view>
</template>
<script lang="ts">
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";
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";
@Component({
components: {}
......@@ -71,23 +49,6 @@ export default class CertificationResult extends Vue {
account: Account = null;
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 => {
......@@ -95,38 +56,52 @@ export default class CertificationResult extends Vue {
});
});
// 每次都加载
onShow((option) => {});
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" });
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" });
uni.switchTab({url: '/pages/tabbar/ProfilePage'});
}
}
</script>
<style lang="scss" scoped>
.submit-result-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #fff;
display: flex;
flex-direction: column;
}
/* 内容区域样式 */
.content-container {
display: flex;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
//justify-content: center;
......@@ -155,23 +130,23 @@ export default class CertificationResult extends Vue {
/* 状态文字样式 */
.status-text-container {
padding: 0 20px;
margin-bottom: 50px;
text-align: center;
margin-bottom: 50px;
padding: 0 20px;
}
.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;
line-height: 1.6;
color: #666;
line-height: 1.6;
}
/* 按钮样式 */
......
<template>
<view>
<view class="custom-cell">
<van-field v-if="accountInfo"
:border="false"
input-align="left"
:maxlength="32"
placeholder="请输入昵称"
:value="accountInfo.nickName"
@change="changeNickName" />
<van-field v-if="accountInfo" :value="accountInfo.nickName" placeholder="请输入昵称" :border="false" input-align="left" :maxlength="32" @change="changeNickName"/>
</view>
<!-- 提交按钮 -->
<view class="bottom-action-bar">
<van-button block
round
type="primary"
@click="submitForm">
保存
</van-button>
<van-button type="primary" round @click="submitForm" block>保存</van-button>
</view>
</view>
</template>
<script lang="ts">
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";
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";
@Component({})
export default class EditAccountNickName extends Vue {
accountInfo: AccountInfo = null;
changeNickName(e: any) {
this.accountInfo.nickName = e.detail;
}
created(): void {
onLoad((option) => {
AccountController.getAccountInfo(this.axios).then(res => {
this.accountInfo = res.data;
});
});
onShow((option) => {});
onShow((option) => {
});
}
changeNickName(e: any) {
this.accountInfo.nickName = e.detail;
}
submitForm(): void {
......@@ -51,8 +40,8 @@ export default class EditAccountNickName extends Vue {
account.nickName = this.accountInfo.nickName;
AccountController.updateAccountNickName(this.axios, account).then(res => {
uni.showToast({
title: "保存成功",
icon: "none"
title: '保存成功',
icon: 'none'
});
});
}
......@@ -62,12 +51,13 @@ export default class EditAccountNickName extends Vue {
<style scoped lang="scss">
.custom-cell {
height: 48px;
margin: 16px;
background: #FFF;
border: 1px solid #E7EBF4;
border-radius: 8px;
height: 48px;
opacity: 1;
border-radius: 8px;
background: #FFFFFF;
border: 1px solid #E7EBF4;
}
......
<template>
<view>
<van-cell-group>
<van-cell custom-class="custom-cell"
custom-style="display: flex;margin: 16px 0; align-items: center; height: 80px;"
is-link
title="头像"
title-width="50">
<view style="float: right;width: 300px;text-align: right">
<uni-file-picker :auto-upload="true"
:del-icon="false"
disable-preview
file-extname="png,jpg,jpeg"
file-mediatype="image"
:image-styles="imageStyles"
:limit="1"
:list-styles="listStyles"
@select="selectFile($event)">
<view style="float: right;width: 300px;text-align: right">
<van-image height="62"
round
:src="avatarUrl"
style="float: right;width: 300px;margin-right: 5px;text-align: right"
width="62" />
<van-cell title="头像" title-width="50" is-link custom-class="custom-cell" custom-style="display: flex;margin: 16px 0; align-items: center; height: 80px;">
<view style="width: 300px;float: right;text-align: right">
<uni-file-picker disable-preview :del-icon="false" fileMediatype="image" :image-styles="imageStyles" :listStyles="listStyles" @select="selectFile($event)"
:auto-upload="true"
:limit="1" file-extname="png,jpg,jpeg">
<view style="width: 300px;float: right;text-align: right">
<van-image round width="62" height="62" style="width: 300px;float: right;text-align: right;margin-right: 5px" :src="avatarUrl"/>
</view>
</uni-file-picker>
</view>
</van-cell>
<!-- <van-field label="昵称" v-if="accountInfo" :value="accountInfo.nickName" placeholder="请输入昵称" :border="false" input-align="right" :maxlength="32" @change="changeNickName"/>-->
<van-cell :border="true"
custom-class="custom-cell"
is-link
title="昵称"
:value="accountInfo?.nickName"
@click="editNickName" />
<van-cell custom-class="custom-cell"
custom-style="display: flex; align-items: center; height: 60px;"
is-link
title="竞拍地点"
:value="$filters.formatCityLabel(accountInfo?.cityCode)"
@click="openChangeCity" />
<van-cell title="昵称" :value="accountInfo?.nickName" :border="true" custom-class="custom-cell" is-link @click="editNickName"/>
<van-cell title="竞拍地点" :value="$filters.formatCityLabel(accountInfo?.cityCode)" is-link @click="openChangeCity" custom-class="custom-cell"
custom-style="display: flex; align-items: center; height: 60px;"/>
</van-cell-group>
<!-- 提交按钮 -->
<view class="bottom-action-bar">
<van-button block
round
type="primary"
@click="logout">
退出
</van-button>
<van-button type="primary" round @click="logout" block>退出</van-button>
</view>
</view>
</template>
<script lang="ts">
import type { City } from "@/common/china_areas";
import { Component, Vue } from "vue-facing-decorator";
import { AccountController } from "@/api/AccountController";
import { AuthService } from "@/common/AuthService";
import { uploadFiles } from "@/common/UploadHelper";
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";
import { Mutation } from "vuex-facing-decorator";
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 {uploadFiles} from "@/common/UploadHelper";
import {AuthService} from "@/common/AuthService";
import {Mutation} from "vuex-facing-decorator";
import type {City} from "@/common/china_areas";
import {Account} from "lib/src/entity/account/entity/Account";
@Component({
components: {}
......@@ -71,7 +41,7 @@ export default class EditAccountPage extends Vue {
accountInfo: AccountInfo = null;
@Mutation
changeCity: any;
changeCity: any;
imageStyles = {
width: 300,
......@@ -85,14 +55,6 @@ export default class EditAccountPage extends Vue {
dividline: false
};
get avatarUrl(): string {
if (this.accountInfo?.avatar && this.accountInfo.avatar?.url) {
return this.accountInfo.avatar.url;
} else {
return "/static/images/profile/avatar.png";
}
}
created(): void {
onLoad((option) => {
AccountController.getAccountInfo(this.axios).then(res => {
......@@ -106,36 +68,42 @@ export default class EditAccountPage extends Vue {
});
}
editNickName(): void {
uni.navigateTo({
url: "/module/account/EditAccountNickName"
});
}
logout(): void {
const authService = this.$auth as AuthService;
uni.showModal({
title: "提示",
content: "您确定要退出吗?",
success (res) {
if (res.confirm) {
authService.removeToken();
authService.deleteAuthentication();
uni.switchTab({ url: "/pages/tabbar/ProfilePage" });
} else if (res.cancel) {
console.log("用户点击取消");
// 执行其他操作
async selectFile(e: any) {
const tempFiles = e.tempFiles;
const authService: AuthService = this.$auth;
const url = this.$apiUrl + 'upload/uploadImage?directory=account/avatar';
if (tempFiles && tempFiles.length > 0) {
const fileInfos = [];
for (const tempFile of tempFiles) {
const fileInfo = await uploadFiles(tempFile, url, authService.getToken());
if (fileInfo) {
fileInfos.push(fileInfo);
}
}
});
if (fileInfos.length > 0) {
this.accountInfo.avatar = fileInfos[0];
const account = new Account();
account.avatar = this.accountInfo.avatar;
AccountController.updateAccountAvatar(this.axios, account).then(res => {
});
}
}
}
get avatarUrl(): string {
if (this.accountInfo?.avatar && this.accountInfo.avatar?.url) {
return this.accountInfo.avatar.url;
} else {
return '/static/images/profile/avatar.png';
}
}
openChangeCity(): void {
const that = this;
uni.navigateTo({
url: "/pages/LocationCityPage", events: {
onReturnData (city: City) {
url: '/pages/LocationCityPage', events: {
onReturnData: function (city: City) {
if (city) {
that.accountInfo.cityCode = city.code;
AccountController.updateAccountCityCode(that.axios, city.code).then((res) => {
......@@ -147,25 +115,28 @@ export default class EditAccountPage extends Vue {
});
}
async selectFile(e: any) {
const tempFiles = e.tempFiles;
const authService: AuthService = this.$auth;
const url = `${this.$apiUrl }upload/uploadImage?directory=account/avatar`;
if (tempFiles && tempFiles.length > 0) {
const fileInfos = [];
for (const tempFile of tempFiles) {
const fileInfo = await uploadFiles(tempFile, url, authService.getToken());
if (fileInfo) {
fileInfos.push(fileInfo);
editNickName(): void {
uni.navigateTo({
url: '/module/account/EditAccountNickName'
});
}
logout(): void {
const authService = this.$auth as AuthService;
uni.showModal({
title: '提示',
content: '您确定要退出吗?',
success: function (res) {
if (res.confirm) {
authService.removeToken();
authService.deleteAuthentication();
uni.switchTab({url: '/pages/tabbar/ProfilePage'});
} else if (res.cancel) {
console.log('用户点击取消');
// 执行其他操作
}
}
if (fileInfos.length > 0) {
this.accountInfo.avatar = fileInfos[0];
const account = new Account();
account.avatar = this.accountInfo.avatar;
AccountController.updateAccountAvatar(this.axios, account).then(res => {});
}
}
});
}
}
</script>
......@@ -176,11 +147,11 @@ export default class EditAccountPage extends Vue {
.bottom-action-bar {
position: fixed;
right: 0;
bottom: 16px;
left: 0;
right: 0;
height: 60px;
padding: 0 15px;
background-color: #fff;
padding: 0 15px;
}
</style>
<template>
<view class="car-detail-container">
<view class="search-results-container">
<uni-table :border="false"
empty-text="暂无参拍记录"
:stripe="false"
width="100%">
<uni-table :border="false" :stripe="false" width="100%" emptyText="暂无参拍记录">
<!-- 表头行 -->
<uni-tr>
<uni-th align="center" width="20%">
竞价号
</uni-th>
<uni-th align="center" width="20%">
出价
<uni-th width="20%" align="center">竞价号</uni-th>
<uni-th width="20%" align="center">出价
<text style="font-size: 10px">(万元)</text>
</uni-th>
<uni-th align="center" width="40%">
出价时间
</uni-th>
<uni-th align="center" width="20%">
状态
</uni-th>
<uni-th width="40%" align="center">出价时间</uni-th>
<uni-th width="20%" align="center">状态</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(bid, index) in bids"
v-if="bids.length > 0"
:key="index">
<uni-td :class="{active:bid.account.accountId === accountId}">
<text v-if="bid.account.accountId === accountId">
<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}">
<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>
......@@ -49,34 +33,30 @@
</uni-td>
</uni-tr>
</uni-table>
<van-empty v-if="bids.length === 0"
description="暂无参拍记录"
image="/static/images/empty.png" />
<van-empty v-if="bids.length===0" image="/static/images/empty.png" description="暂无参拍记录"/>
</view>
</view>
</template>
<script lang="ts">
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";
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";
@Component({
components: {}
})
export default class AuctionBidPage extends Vue {
accountId: number;
aucvehId: number;
auctionType: Auction_AuctionType;
aucvehId: number;
bids: Bid[] = [];
accountId: number;
created(): void {
const that = this;
......@@ -87,7 +67,8 @@ export default class AuctionBidPage extends Vue {
this.loadData();
});
// 每次都加载
onShow((option) => {});
onShow((option) => {
});
}
loadData() {
......@@ -105,9 +86,9 @@ export default class AuctionBidPage extends Vue {
}
::v-deep .uni-table-th {
font-weight: 500; /* 文字加粗(可选) */
color: #333 !important;
background-color: #F6F9FF !important; /* 表头背景色(蓝色示例) */
color: #333333 !important;
font-weight: 500; /* 文字加粗(可选) */
border-bottom: none;
}
......@@ -132,6 +113,6 @@ export default class AuctionBidPage extends Vue {
::v-deep .uni-table__header,
::v-deep .uni-table__body {
width: 100% !important;
color: #333 !important;
color: #333333 !important;
}
</style>
<template>
<view class="page-container">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<custom-nav-bar :show-back="true"
:status-bar-height="statusBarHeight"
:title="auction?.auctionName">
</custom-nav-bar>
<view class="header" :style="{ top: `${statusBarHeight + 44 }px` }">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<custom-nav-bar :title="auction?.auctionName" :show-back="true" :status-bar-height="statusBarHeight"></custom-nav-bar>
<view class="header" :style="{ top: statusBarHeight+44 + 'px' }">
<!-- 筛选和排序区域 -->
<van-dropdown-menu>
<van-dropdown-item :options="sortOptions"
title="排序"
:value="sortOption"
@change="onTimeSortChange" />
<van-dropdown-item title="品牌"
use-before-toggle
@before-toggle="filterByBrand" />
<van-dropdown-item id="priceFilterItem"
:style="{display: priceShow ? 'block' : 'none'}"
title="车价"
@close="priceShow = false"
@open="priceShow = true">
<vehicle-price-range-filter @price-change="onPriceChange"></vehicle-price-range-filter>
<van-dropdown-item title="排序" :value="sortOption" :options="sortOptions" @change="onTimeSortChange"/>
<van-dropdown-item title="品牌" use-before-toggle @before-toggle="filterByBrand"/>
<van-dropdown-item title="车价" id="priceFilterItem" :style="{display: priceShow?'block' : 'none'}" @open="priceShow=true" @close="priceShow=false">
<vehicle-price-range-filter @priceChange="onPriceChange"></vehicle-price-range-filter>
</van-dropdown-item>
<van-dropdown-item title="筛选"
use-before-toggle
@before-toggle="moreFilter" />
<van-dropdown-item title="筛选" use-before-toggle @before-toggle="moreFilter"/>
</van-dropdown-menu>
<search-query-filter :search-query="searchQuery"
@change="pageFilterReload"
@clear-all="clearAllFilters">
</search-query-filter>
<search-query-filter :search-query="searchQuery" @clear-all="clearAllFilters" @change="pageFilterReload"></search-query-filter>
</view>
<view class="auction-session-container" :style="{ paddingTop: `${statusBarHeight + filterHeight }px` }">
<view class="auction-session-container" :style="{ paddingTop: statusBarHeight+filterHeight + 'px' }">
<!-- 车辆列表 -->
<scroll-view class="scroll-content"
:refresher-enabled="true"
:refresher-triggered="loading"
scroll-y
@refresherrefresh="pageReload"
@scrolltolower="doInfinite()">
<scroll-view class="scroll-content" scroll-y :refresher-enabled="true" :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
<view class="car-list">
<template v-for="(car, index) in contents"
v-if="contents.length > 0"
:key="index">
<template v-if="contents.length>0" v-for="(car, index) in contents" :key="index">
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
</template>
<van-empty v-else
class="search-empty"
description="未找到相关车源,为你推荐以下车源"
height="100"
image="/static/images/empty_2.png"
width="100" />
<van-empty class="search-empty" v-else image="/static/images/empty_2.png" width="100" height="100" description="未找到相关车源,为你推荐以下车源"/>
</view>
</scroll-view>
</view>
</view>
</template>
<script lang="ts">
import { Component } from "vue-facing-decorator";
import { AuctionController } from "@/api/AuctionController";
import {Component} from "vue-facing-decorator";
import {onLoad, onShow} from "@dcloudio/uni-app";
import type {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle";
import {Auction} from "lib/src/entity/auction/entity/Auction";
import {AuctionController} from "@/api/AuctionController";
import {PaginationComponent} from "autumn-vue/lib/core/page/PaginationComponent";
import {Operator, Order} from "autumn-vue/lib/core/page/Pagination";
import AuctionVehicleItem from "@/components/AuctionVehicleItem.vue";
import CustomNavBar from "@/components/CustomNavBar.vue";
import {BACKGROUND_IMAGE_1} from "@/static/ResourceConstants";
import {SearchQuery} from "@/common/SearchQuery";
import AuctionVehicleFilter from "@/components/filter/AuctionVehicleFilter";
import SearchQueryFilter from "@/components/filter/SearchQueryFilter.vue";
import VehiclePriceRangeFilter from "@/components/filter/VehiclePriceRangeFilter.vue";
import { BACKGROUND_IMAGE_1 } from "@/static/ResourceConstants";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { Order } from "autumn-vue/lib/core/page/Pagination";
import { Auction } from "lib/src/entity/auction/entity/Auction";
@Component({
components: { VehiclePriceRangeFilter, SearchQueryFilter, CustomNavBar, AuctionVehicleItem }
components: {VehiclePriceRangeFilter, SearchQueryFilter, CustomNavBar, AuctionVehicleItem}
})
export default class AuctionSessionPage extends AuctionVehicleFilter {
auction: Auction = null;
auctionId: number;
auction: Auction = null;
statusBarHeight = 0;// 用于接收头部总高度,设置内容区 padding
backgroundImageUrl = BACKGROUND_IMAGE_1;
sortOption = 0;
sortOptions = [
{ text: "上架时间由近到远", value: 0 },
{ text: "里程由短到长", value: 1 },
{ text: "里程由长到短", value: 2 },
{ text: "车龄由小到大", value: 3 },
{ text: "车龄由大到小", value: 4 },
{text: '上架时间由近到远', value: 0},
{text: '里程由短到长', value: 1},
{text: '里程由长到短', value: 2},
{text: '车龄由小到大', value: 3},
{text: '车龄由大到小', value: 4},
];
statusBarHeight = 0;// 用于接收头部总高度,设置内容区 padding
sortOption = 0;
get filterHeight(): number {
return this.searchQuery == null ? 85 : 120;
}
created(): void {
this.init(this.axios, AuctionController.PAGE_LIGHT_AUCTION_VEHICLE);
......@@ -116,63 +84,62 @@ export default class AuctionSessionPage extends AuctionVehicleFilter {
});
}
loadAuctionVehicles() {
AuctionController.getAuctionById(this.axios, this.auctionId).then(res => {
this.auction = res.data;
uni.setNavigationBarTitle({ title: this.auction.auctionName });
});
}
onTimeSortChange(detail: any): void {
console.log(detail);
this.sortOption = detail.detail;
switch (this.sortOption) {
case 0: {
this.pagination.setDefaultSort("auctionStartTime", Order.desc);
case 0:
this.pagination.setDefaultSort('auctionStartTime', Order.desc);
break;
}
case 1: {
this.pagination.setDefaultSort("vehicle.baseInfo.mileage", Order.asc);
case 1:
this.pagination.setDefaultSort('vehicle.baseInfo.mileage', Order.asc);
break;
}
case 2: {
this.pagination.setDefaultSort("vehicle.baseInfo.mileage", Order.desc);
case 2:
this.pagination.setDefaultSort('vehicle.baseInfo.mileage', Order.desc);
break;
}
case 3: {
this.pagination.setDefaultSort("vehicle.coreSpecs.productionDate", Order.desc);
case 3:
this.pagination.setDefaultSort('vehicle.coreSpecs.productionDate', Order.desc);
break;
}
case 4: {
this.pagination.setDefaultSort("vehicle.coreSpecs.productionDate", Order.asc);
case 4:
this.pagination.setDefaultSort('vehicle.coreSpecs.productionDate', Order.asc);
break;
}
}
this.pageReload();
}
get filterHeight(): number {
return this.searchQuery != null ? 120 : 85;
}
loadAuctionVehicles() {
AuctionController.getAuctionById(this.axios, this.auctionId).then(res => {
this.auction = res.data;
uni.setNavigationBarTitle({title: this.auction.auctionName});
});
}
}
</script>
<style lang="scss" scoped>
.auction-session-container {
background-color: #fff;
background-color: #ffffff;
}
.filter-sort-bar {
display: flex;
height: 56px;
padding: 6px 16px;
background-color: #fff;
padding: 6px 16px;
height: 56px;
border-bottom: 1px solid #eee;
}
.filter-item {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
flex: 1;
font-size: 14px;
color: #333;
}
......@@ -182,10 +149,10 @@ export default class AuctionSessionPage extends AuctionVehicleFilter {
}
.car-list {
padding: 10px;
display: flex;
flex-direction: column;
gap: 10px;
padding: 10px;
}
.separator {
......
<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 fit="cover"
height="100"
src="/static/images/order/payment.png"
width="100">
</van-image>
<van-image width="100" height="100" fit="cover" src="/static/images/order/payment.png"></van-image>
</view>
<view class="dialog-header">
恭喜你中拍成功
......@@ -16,29 +12,16 @@
<text>请尽快签署购车协议,并支付款项以锁定车辆</text>
</view>
<view class="dialog-footer">
<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>
<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>
</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: {}
......@@ -46,13 +29,13 @@ import { BACKGROUND_IMAGE_2 } from "@/static/ResourceConstants";
export default class BidSuccessDialog extends Vue {
backgroundImageUrl = BACKGROUND_IMAGE_2;
@Prop({ type: Number, required: true })
orderId: number;
@Prop({type: Number, required: true})
orderId: number;
signContract(): void {
this.$emit("close");
this.$emit('close');
uni.navigateTo({
url: `/module/order/contract/ContractPage?orderId=${ this.orderId}`
url: '/module/order/contract/ContractPage?orderId=' + this.orderId
});
}
}
......@@ -62,7 +45,6 @@ export default class BidSuccessDialog extends Vue {
.dialog-container {
//height: 200px;
//min-height: 100vh;
/* 避免内容被顶部导航栏遮挡(可选) */
//padding-top: var(--status-bar-height);
//box-sizing: border-box;
......@@ -95,15 +77,15 @@ export default class BidSuccessDialog extends Vue {
font-size: 13px;
font-weight: 400;
line-height: 18.2px;
color: #333;
color: #333333;
}
}
.dialog-footer {
margin-top: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: 3px;
margin-top: 20px;;
gap: 3px;;
}
</style>
<template>
<text v-if="visible" class="recommend-search">为您推荐</text>
<view v-if="visible" class="car-list">
<text class="recommend-search" v-if="visible">为您推荐</text>
<view class="car-list" v-if="visible">
<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 { AuctionController } from "@/api/AuctionController";
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 AuctionVehicleItem from "@/components/AuctionVehicleItem.vue";
import { onLoad } from "@dcloudio/uni-app";
import { PaginationComponent } from "autumn-vue/lib/core/page/PaginationComponent";
import { AuctionVehicle } from "lib/src/entity/auction/entity/AuctionVehicle";
import {onLoad} from "@dcloudio/uni-app";
@Component({
components: { AuctionVehicleItem }
components: {AuctionVehicleItem}
})
export default class RecommendSearchVehicles extends PaginationComponent<AuctionVehicle> {
@Prop({ type: Boolean, default: false })
visible: boolean;
get contents(): AuctionVehicle[] {
return this.pagination.content;
}
@Prop({type: Boolean, default: false})
visible: boolean;
created(): void {
this.init(this.axios, AuctionController.PAGE_RANDOM_AUCTION_VEHICLE);
......@@ -34,6 +29,10 @@ export default class RecommendSearchVehicles extends PaginationComponent<Auction
this.pageReload();
});
}
get contents(): AuctionVehicle[] {
return this.pagination.content;
}
}
</script>
......@@ -43,11 +42,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;
color: #333;
letter-spacing: 0;
margin-left: 12px;
color: #333333;
}
</style>
<template>
<view v-if="auctionVehicle" class="album-container">
<view class="album-container" v-if="auctionVehicle">
<template v-for="fileSubtype in fileSubtypes">
<view v-if="getFileInfos(fileSubtype.id).length > 0" class="album-item">
<view class="album-item" v-if="getFileInfos(fileSubtype.id).length>0">
<text class="album-title">{{ fileSubtype.name }}({{ getFileInfos(fileSubtype.id).length }})</text>
<view class="album">
<up-album :key-name="fileSubtype.name"
:multiple-size="116"
:urls="getFileInfos(fileSubtype.id)">
</up-album>
<up-album :urls="getFileInfos(fileSubtype.id)" :multiple-size="116" :keyName="fileSubtype.name"></up-album>
</view>
</view>
</template>
</view>
</template>
<script lang="ts">
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";
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";
@Component({})
export default class VehicleAlbum extends Vue {
auctionVehicle: AuctionVehicle = null;
aucvehId: number;
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",
],
};
auctionVehicle: AuctionVehicle = null;
get albums(): FileInfo[] {
return this.auctionVehicle?.vehicle?.albums;
}
fileSubtypes = VEHICLE_FILE_SUB_TYPES;
created(): void {
const that = this;
......@@ -50,7 +33,19 @@ export default class VehicleAlbum extends Vue {
this.aucvehId = option.aucvehId;
this.loadData();
});
onShow((option) => {});
onShow((option) => {
});
}
loadData(): void {
AuctionController.getAuctionVehicleDetailById(this.axios, this.aucvehId).then(res => {
this.auctionVehicle = res.data;
});
}
get albums(): FileInfo[] {
return this.auctionVehicle?.vehicle?.albums;
}
getFileInfos(fileSubtype: string): string[] {
......@@ -69,11 +64,14 @@ export default class VehicleAlbum extends Vue {
}
}
loadData(): void {
AuctionController.getAuctionVehicleDetailById(this.axios, this.aucvehId).then(res => {
this.auctionVehicle = res.data;
});
}
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',
],
};
}
</script>
......@@ -81,22 +79,22 @@ export default class VehicleAlbum extends Vue {
<style scoped lang="scss">
.album-container {
min-height: 100vh;
background-color: #000;
background-color: #000000;
}
.album-item {
width: 100%;
padding: 12px;
width: 100%;
}
.album-title {
padding-bottom: 24px;
font-size: 16px;
color: #fff;
padding-bottom: 24px;
}
.album {
width: 100%;
padding-top: 16px;
width: 100%;
}
</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 #title>
<template slot="title">
<div class="brand-cell" @click="bindClick(brand)">
<image class="brand-image"
mode="aspectFill"
:src="brand.logoUrl" />
<image class="brand-image" :src="brand.logoUrl" mode="aspectFill"/>
{{ brand.name }}
</div>
</template>
......@@ -18,43 +14,25 @@
</van-index-bar>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff">
<view v-if="selectedBrand" class="popup-content">
<view class="popup-content" v-if="selectedBrand">
<div class="brand-cell" style="padding: 12px 16px;">
<image class="brand-image"
mode="aspectFill"
:src="selectedBrand.logoUrl" />
<image class="brand-image" :src="selectedBrand.logoUrl" mode="aspectFill"/>
{{ 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"
class="brand-cell"
:class="{'brand-active':selectedCarTypes.includes(carType)}"
:title="carType.name"
clickable
value-class="value-class"
@click="onCarTypeClick($event)"
: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" @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>
</van-cell-group>
</van-checkbox-group>
<!-- 车系选择 -->
<uni-list v-else>
<template v-for="carSeries in selectedBrand.childs">
<uni-list-item clickable
show-arrow
:title="carSeries.name"
@click="selectCarSeries(carSeries)">
</uni-list-item>
<uni-list-item :title="carSeries.name" clickable showArrow @click="selectCarSeries(carSeries)"></uni-list-item>
</template>
</uni-list>
......@@ -62,18 +40,12 @@
<view style="padding: 12px 16px;">
<van-row gutter="12">
<van-col span="9">
<van-button block
round
type="default"
@click="cancel">
<van-button type="default" block round @click="cancel">
返回
</van-button>
</van-col>
<van-col span="15">
<van-button block
round
type="primary"
@click="onSelect">
<van-button type="primary" block round @click="onSelect">
确定({{ selectedCarTypes.length }}个车型)
</van-button>
</van-col>
......@@ -84,19 +56,17 @@
</uni-popup>
</template>
<script lang="ts">
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";
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";
type Brand = {
childs: Brand[];
id: string;
letter: string,
logoUrl: string;
name: string;
logoUrl: string;
childs: Brand[];
selected: boolean;
}
@Component({
......@@ -107,45 +77,31 @@ export default class CarTypesFilter extends Vue {
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"
'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;
selectedCarSeries: any = null;
selectedCarTypes: CarType[] = [];
bindClick(brand: any): void {
this.selectedBrand = brand;
this.selectedCarSeries = null;
this.popup.open("right");
}
cancel() {
this.selectedCarSeries = null;
}
selectedCarSeries: any = null;
created(): void {
onLoad((option) => {
this.loadData();
});
onShow(options => {});
}
getBrandsByLetter(letter: string): Brand[] {
return this.brands.filter(brand => brand.letter === letter);
onShow(options => {
});
}
loadData(): void {
const cacheBrands = uni.getStorageSync("cacheBrands");
const cacheBrands = uni.getStorageSync('cacheBrands');
console.debug(cacheBrands);
if (cacheBrands && cacheBrands.length > 0) {
this.brands = cacheBrands;
......@@ -153,40 +109,55 @@ export default class CarTypesFilter extends Vue {
GscApiController.getCarBrandComplete(this.axios).then(res => {
const brandRes: any = res.data;
this.brands = brandRes.data.carinfos;
uni.setStorageSync("cacheBrands", this.brands);
uni.setStorageSync('cacheBrands', this.brands);
});
}
}
getBrandsByLetter(letter: string): Brand[] {
return this.brands.filter(brand => brand.letter === letter);
}
bindClick(brand: any): void {
this.selectedBrand = brand;
this.selectedCarSeries = null;
this.popup.open('right');
}
onChangeCarType(event: any): void {
this.selectedCarTypes = event.detail;
console.log(this.selectedCarTypes);
}
onCarTypeClick(event: any) {
// if (carType.selected === true) {
// carType.selected = false;
// } else {
// carType.selected = true;
// }
const { index } = event.currentTarget.dataset;
const {index} = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${index}`);
checkbox.toggle();
}
onChangeCarType(event: any): void {
this.selectedCarTypes = event.detail;
console.log(this.selectedCarTypes);
}
onCheckboxClick(event: any): void {
event.stopPropagation();
}
selectCarSeries(carSeries: any) {
this.selectedCarTypes = [];
this.selectedCarSeries = carSeries;
}
onSelect(): void {
const eventChannel = this.getOpenerEventChannel();
eventChannel.emit("onReturnData", this.selectedCarTypes);
eventChannel.emit('onReturnData', this.selectedCarTypes);
uni.navigateBack();
}
selectCarSeries(carSeries: any) {
this.selectedCarTypes = [];
this.selectedCarSeries = carSeries;
cancel() {
this.selectedCarSeries = null;
}
}
</script>
......@@ -199,8 +170,8 @@ export default class CarTypesFilter extends Vue {
.brand-cell {
display: flex;
gap: 8px;
align-items: center;
gap: 8px;
}
.brand-image {
......
......@@ -5,7 +5,7 @@
<!-- 等待图标 -->
<view class="waiting-icon-container">
<view class="waiting-icon">
<image class="state-image" src="/static/images/account/certifition/success@2x.png"></image>
<image src="/static/images/account/certifition/success@2x.png" class="state-image"></image>
</view>
</view>
<view class="status-text-container">
......@@ -13,19 +13,13 @@
</view>
<!-- 返回按钮 -->
<view class="button-container">
<van-button block
hairline
round
type="primary"
@click="navigateToHome">
前往参拍
</van-button>
<van-button type="primary" hairline round @click="navigateToHome" block>前往参拍</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: {}
......@@ -33,24 +27,24 @@ import { Component, Vue } from "vue-facing-decorator";
export default class RechargeSuccess extends Vue {
// 返回首页
navigateToHome() {
uni.switchTab({ url: "/pages/tabbar/AuctionPage" });
uni.switchTab({url: '/pages/tabbar/AuctionPage'});
}
}
</script>
<style lang="scss" scoped>
.submit-result-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #fff;
display: flex;
flex-direction: column;
}
/* 内容区域样式 */
.content-container {
display: flex;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
//justify-content: center;
......@@ -79,23 +73,23 @@ export default class RechargeSuccess extends Vue {
/* 状态文字样式 */
.status-text-container {
padding: 0 20px;
margin-bottom: 50px;
text-align: center;
margin-bottom: 50px;
padding: 0 20px;
}
.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;
line-height: 1.6;
color: #666;
line-height: 1.6;
}
/* 按钮样式 */
......
......@@ -3,38 +3,21 @@
<!-- 顶部导航栏 -->
<!-- 提现至区域 -->
<van-cell-group>
<van-cell :border="true"
custom-style="display: flex; align-items: center; height: 60px;"
is-link
title="提现至"
value="微信钱包" />
<van-cell title="提现至" value="微信钱包" :border="true" is-link custom-style="display: flex; align-items: center; height: 60px;"/>
</van-cell-group>
<!-- 提现金额区域 -->
<view class="withdrawal-amount-section">
<view class="section-label">
提现金额
</view>
<view class="section-label">提现金额</view>
<view class="amount-input-area">
<uni-forms ref="amountForm"
label-width="24"
:model-value="formData"
:rules="rules"
validate-trigger="bind">
<uni-forms-item name="withdrawalAmount" required>
<template #label>
<uni-forms ref="amountForm" :modelValue="formData" :rules="rules" validateTrigger="bind" label-width="24">
<uni-forms-item required name="withdrawalAmount">
<template v-slot:label>
<text class="currency-symbol">¥</text>
</template>
<uni-easyinput v-model="formData.withdrawalAmount"
class="amount-input"
:input-border="false"
:maxlength="9"
placeholder="请输入提现金额"
:placeholder-style="placeholderStyle"
:styles="amountStyle"
type="digit"
@input="handleInput">
</uni-easyinput>
<uni-easyinput v-model="formData.withdrawalAmount" placeholder="请输入提现金额" class="amount-input" type="digit" :styles="amountStyle" :maxlength="9"
:placeholderStyle="placeholderStyle"
:input-border="false" @input="handleInput"></uni-easyinput>
</uni-forms-item>
</uni-forms>
</view>
......@@ -46,12 +29,7 @@
<!-- 确认提现按钮 -->
<view class="confirm-button-container">
<van-button block
round
type="primary"
@click="confirmWithdrawal">
确认提现
</van-button>
<van-button type="primary" round @click="confirmWithdrawal" block>确认提现</van-button>
</view>
<!-- 温馨提示 -->
......@@ -61,62 +39,49 @@
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { TransactionController } from "@/api/TransactionController";
import { WithdrawController } from "@/api/WithdrawController";
import { onLoad } from "@dcloudio/uni-app";
import { Withdraw } from "lib/src/entity/finance/entity/Withdraw";
import {Component, Vue} from "vue-facing-decorator";
import {onLoad} from "@dcloudio/uni-app";
import {WithdrawController} from "@/api/WithdrawController";
import {Withdraw} from "lib/src/entity/finance/entity/Withdraw";
import {TransactionController} from "@/api/TransactionController";
@Component({
components: {}
})
export default class WithdrawForm extends Vue {
amountStyle = { color: "rgba(24, 94, 254, 1)", "font-size": "36px" };
availableAmount = 0;
formData = { withdrawalAmount: 0 };
placeholderStyle = "font-size:24px";
amountStyle = {color: 'rgba(24, 94, 254, 1)', 'font-size': '36px'};
placeholderStyle = 'font-size:24px';
formData = {withdrawalAmount: 0};
rules = {
withdrawalAmount: {
rules: [ {
rules: [{
required: true,
errorMessage: "请输入提现金额",
errorMessage: '请输入提现金额',
}, {
validateFunction: this.validAmount
} ]
}]
}
};
confirmWithdrawal() {
this.$refs.amountForm.validate().then((res: any) => {
// 模拟提现确认
uni.showModal({
title: "提现确认",
content: `确定要提现 ${this.formData.withdrawalAmount} 元吗?`,
success: (res) => {
if (res.confirm) {
// 确认提现后的逻辑
const withdraw = new Withdraw();
withdraw.bankAccount = "微信零钱";
withdraw.amount = this.formData.withdrawalAmount;
uni.showLoading({ title: "提交中...", mask: true });
WithdrawController.addWithdraw(this.axios, withdraw).then(res => {
uni.navigateTo({ url: "/module/deposit/WithdrawSuccess" });
}).finally(() => {
uni.hideLoading();
});
}
}
});
}).catch((error: any) => {
console.log("表单错误信息:", error);
});
}
validAmount(rule: any, value: number, data: any, callback: any) {
if (value < 1) {
callback('最低提现金额为1.00元');
return;
}
if (value > this.availableAmount) {
callback('提现金额不能超过可提现金额');
return
}
if (value > 5000) {
callback('微信单笔提现最高为5,000.00元');
return
}
return true;
}
......@@ -130,74 +95,86 @@ export default class WithdrawForm extends Vue {
handleInput(event: any) {
const inputValue = event;
let inputValue = event;
setTimeout(() => {
const pureNumberStr = inputValue.replaceAll(/\D/g, "");
const pureNumberStr = inputValue.replace(/[^0-9]/g, '');
let noLeadingZeroStr = pureNumberStr;
if (pureNumberStr.length > 1) { // 只有长度大于1时,才需要去前置零
noLeadingZeroStr = pureNumberStr.replace(/^0+/, "");
noLeadingZeroStr = noLeadingZeroStr || "0";
noLeadingZeroStr = pureNumberStr.replace(/^0+/, '');
noLeadingZeroStr = noLeadingZeroStr || '0';
}
this.formData.withdrawalAmount = noLeadingZeroStr;
}, 100);
}
validAmount(rule: any, value: number, data: any, callback: any) {
if (value < 1) {
callback("最低提现金额为1.00元");
return;
}
if (value > this.availableAmount) {
callback("提现金额不能超过可提现金额");
return;
}
if (value > 5000) {
callback("微信单笔提现最高为5,000.00元");
return;
}
return true;
}
withdrawAll() {
// 全部提现逻辑
this.formData.withdrawalAmount = this.availableAmount;
}
confirmWithdrawal() {
this.$refs.amountForm.validate().then((res: any) => {
// 模拟提现确认
uni.showModal({
title: '提现确认',
content: `确定要提现 ${this.formData.withdrawalAmount} 元吗?`,
success: (res) => {
if (res.confirm) {
// 确认提现后的逻辑
const withdraw = new Withdraw();
withdraw.bankAccount = '微信零钱';
withdraw.amount = this.formData.withdrawalAmount;
uni.showLoading({title: '提交中...', mask: true});
WithdrawController.addWithdraw(this.axios, withdraw).then(res => {
uni.navigateTo({url: '/module/deposit/WithdrawSuccess'});
}).finally(() => {
uni.hideLoading();
});
}
}
})
}).catch((err: any) => {
console.log('表单错误信息:', err);
});
}
}
</script>
<style lang="scss" scoped>
.withdrawal-apply-container {
background-color: #ffffff;
min-height: 90vh;
padding-bottom: 40px;
background-color: #fff;
}
/* 提现至区域 */
.withdrawal-to-section {
padding: 16px;
margin-top: 4px;
background-color: #fff;
margin-top: 4px;
padding: 16px;
border-bottom: 1px solid #f0f0f0;
}
.section-label {
margin-bottom: 8px;
font-size: 14px;
color: #333;
margin-bottom: 8px;
}
.account-info {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 16px;
color: #333;
}
/* 提现金额区域 */
.withdrawal-amount-section {
padding: 16px;
background-color: #fff;
padding: 16px;
}
......@@ -210,15 +187,15 @@ export default class WithdrawForm extends Vue {
.currency-symbol {
font-size: 36px;
color: rgba(24, 94, 254, 1);
line-height: 36px;
color: rgb(24 94 254 / 100%);
//margin-right: 8px;
}
.amount-input {
font-size: 36px;
font-weight: 500;
color: rgb(24 94 254 / 100%);
color: rgba(24, 94, 254, 1);
//flex: 1;
//padding: 0;
//border: none;
......@@ -232,30 +209,30 @@ export default class WithdrawForm extends Vue {
}
.available-amount-value {
color: rgb(24 94 254 / 100%);
color: rgba(24, 94, 254, 1);
}
/* 全部提现按钮 */
.withdraw-all-btn {
background-color: #fff;
padding: 16px;
font-size: 14px;
color: rgb(24 94 254 / 100%);
text-align: right;
background-color: #fff;
color: rgba(24, 94, 254, 1);
font-size: 14px;
border-bottom: 1px solid #f0f0f0;
}
/* 确认提现按钮 */
.confirm-button-container {
padding: 24px 16px 8px;
padding: 24px 16px 8px 16px;
}
/* 温馨提示 */
.footer {
padding: 0 24px;
font-size: 12px;
color: #999;
text-align: left;
padding: 0 24px;
}
</style>
......@@ -5,7 +5,7 @@
<!-- 等待图标 -->
<view class="waiting-icon-container">
<view class="waiting-icon">
<image class="state-image" src="/static/images/account/certifition/success@2x.png"></image>
<image src="/static/images/account/certifition/success@2x.png" class="state-image"></image>
</view>
</view>
......@@ -17,19 +17,13 @@
</view>
<!-- 返回按钮 -->
<view class="button-container">
<van-button block
hairline
round
type="primary"
@click="navigateToHome">
完成
</van-button>
<van-button type="primary" hairline round @click="navigateToHome" block>完成</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: {}
......@@ -37,24 +31,24 @@ import { Component, Vue } from "vue-facing-decorator";
export default class WithdrawSuccess extends Vue {
// 返回首页
navigateToHome() {
uni.switchTab({ url: "/pages/tabbar/ProfilePage" });
uni.switchTab({url: '/pages/tabbar/ProfilePage'});
}
}
</script>
<style lang="scss" scoped>
.submit-result-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #fff;
display: flex;
flex-direction: column;
}
/* 内容区域样式 */
.content-container {
display: flex;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
//justify-content: center;
......@@ -83,23 +77,23 @@ export default class WithdrawSuccess extends Vue {
/* 状态文字样式 */
.status-text-container {
padding: 0 20px;
margin-bottom: 50px;
text-align: center;
margin-bottom: 50px;
padding: 0 20px;
}
.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;
line-height: 1.6;
color: #666;
line-height: 1.6;
}
/* 按钮样式 */
......@@ -109,11 +103,11 @@ export default class WithdrawSuccess extends Vue {
}
.return-button {
width: 100%;
height: 48px;
font-size: 16px;
background-color: #1890ff;
border-radius: 8px;
font-size: 16px;
height: 48px;
width: 100%;
}
.first-button {
......
......@@ -2,31 +2,18 @@
<view class="search-results-container">
<!-- 搜索栏 -->
<view class="search-bar">
<uni-search-bar v-model="pagination.queryForm.carTypeName"
bg-color="#F7F9FC"
placeholder="请输入"
radius="60"
@cancel="clearSearch"
@clear="clearSearch"
@confirm="onSearch" />
<uni-search-bar v-model="pagination.queryForm.carTypeName" placeholder="请输入" radius="60" @confirm="onSearch"
@clear="clearSearch" @cancel="clearSearch" bgColor="#F7F9FC"/>
</view>
<!-- 车辆列表 -->
<scroll-view class="scroll-content"
:refresher-enabled="true"
:refresher-triggered="loading"
scroll-y
@refresherrefresh="pageReload"
@scrolltolower="doInfinite()">
<scroll-view class="scroll-content" scroll-y :refresher-enabled="true" :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
<view class="car-list">
<template v-for="(bid, index) in contents"
v-if="contents.length > 0"
:key="index">
<template v-if="contents.length>0" v-for="(bid, index) in contents" :key="index">
<!-- 车辆项 -->
<view class="car-item" @click="viewCarDetail(bid)">
<vehicle-cover-wrapper :auction-vehicle="bid.auctionVehicle"></vehicle-cover-wrapper>
<view class="car-info">
<text class="car-name">
【{{ getLicensePlate(bid.auctionVehicle.vehicle) }}】{{ bid.auctionVehicle.vehicle.baseInfo.carSeriesName }}
<text class="car-name">【{{ getLicensePlate(bid.auctionVehicle.vehicle) }}】{{ bid.auctionVehicle.vehicle.baseInfo.carSeriesName }}
{{ bid.auctionVehicle.vehicle.baseInfo.carTypeName }}
</text>
......@@ -40,27 +27,13 @@
<text class="car-specs">出价时间:{{ bid.createTime }}</text>
</view>
<view class="favorite-button" @click.stop="toggleFavorite(bid)">
<van-image v-if="bid.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>
<van-image v-if="bid.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>
</view>
</template>
<van-empty v-else
description="暂无参拍记录"
image="/static/images/empty.png" />
<view v-if="contents.length > 0 && pagination.isLast()" class="empty-tip">
<van-empty v-else image="/static/images/empty.png" description="暂无参拍记录"/>
<view v-if="contents.length>0&&pagination.isLast()" class="empty-tip">
<text>-到底啦-</text>
</view>
</view>
......@@ -68,74 +41,73 @@
</view>
</template>
<script lang="ts">
import { Component } from "vue-facing-decorator";
import { BidController } from "@/api/BidController";
import { FavoriteController } from "@/api/FavoriteController";
import {Component} from "vue-facing-decorator";
import AuctionVehicleItem from "@/components/AuctionVehicleItem.vue";
import {onShow} from "@dcloudio/uni-app";
import {Operator, Order} from "autumn-vue/lib/core/page/Pagination";
import {Bid} from "lib/src/entity/auction/entity/Bid";
import {PaginationComponent} from "autumn-vue/lib/core/page/PaginationComponent";
import {BidController} from "@/api/BidController";
import {FavoriteController} from "@/api/FavoriteController";
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
import VehicleCoverWrapper from "@/components/VehicleCoverWrapper.vue";
import { onShow } from "@dcloudio/uni-app";
import { Operator, Order } from "autumn-vue/lib/core/page/Pagination";
import { PaginationComponent } from "autumn-vue/lib/core/page/PaginationComponent";
import { Bid } from "lib/src/entity/auction/entity/Bid";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
@Component({
components: { VehicleCoverWrapper, AuctionVehicleItem }
components: {VehicleCoverWrapper, AuctionVehicleItem}
})
export default class BidPage extends PaginationComponent<Bid> {
get contents(): Bid[] {
return this.pagination.content;
}
clearSearch(): void {
this.pageReset();
this.pageReload();
}
created(): void {
onShow(options => {
this.pagination.reload();
});
})
this.init(this.axios, BidController.PAGE_BID);
this.buildQueryForm({
carTypeName: [ null, { label: "车型名称", field: "auctionVehicle.vehicle.baseInfo.carTypeName", operator: Operator.like, hidden: false } ],
carTypeName: [null, {label: '车型名称', field: 'auctionVehicle.vehicle.baseInfo.carTypeName', operator: Operator.like, hidden: false}],
});
this.pagination.setDefaultSort("createTime", Order.desc);
this.pagination.setDefaultSort('createTime', Order.desc);
this.pagination.reload();
}
getLicensePlate(vehicle: Vehicle): string {
return vehicle.baseInfo?.licensePlate.slice(0, 2);
return vehicle.baseInfo?.licensePlate.substring(0, 2);
}
get contents(): Bid[] {
return this.pagination.content;
}
viewCarDetail(bid: Bid) {
uni.navigateTo({url: '/module/auction/AuctionVehiclePage?aucvehId=' + bid.auctionVehicle.aucvehId});
}
onSearch(): void {
this.pageReload();
}
clearSearch(): void {
this.pageReset();
this.pageReload();
}
// 切换收藏状态
toggleFavorite(bid: Bid): void {
uni.showLoading();
FavoriteController.toggleFavorite(this.axios, bid.auctionVehicle.aucvehId).then((res) => {
bid.auctionVehicle.favorite = res.data;
setTimeout(() => {
uni.showToast({ title: bid.auctionVehicle.favorite ? "收藏成功" : "取消收藏 " });
uni.showToast({title: bid.auctionVehicle.favorite ? '收藏成功' : '取消收藏 '});
}, 300);
}).finally(() => uni.hideLoading());
}
viewCarDetail(bid: Bid) {
uni.navigateTo({ url: `/module/auction/AuctionVehiclePage?aucvehId=${ bid.auctionVehicle.aucvehId}` });
}
}
</script>
<style lang="scss" scoped>
.search-results-container {
min-height: 100vh;
background-color: #fff;
background-color: #ffffff;
}
......@@ -143,60 +115,60 @@ export default class BidPage extends PaginationComponent<Bid> {
.search-bar {
position: fixed;
top: 0;
right: 0;
left: 0;
right: 0;
z-index: 2;
background-color: #ffffff;
padding: 1px 4px;
background-color: #fff;
}
.scroll-content {
height: calc(100vh - 70px);
padding-top: 48px;
height: calc(100vh - 70px);
}
/* 车辆列表样式 */
.car-list {
padding: 10px;
display: flex;
flex-direction: column;
gap: 10px;
padding: 10px;
}
/* 车辆项样式 */
.car-item {
position: relative;
display: flex;
padding: 1px;
//background-color: #fff;
border-radius: 8px;
padding: 1px;
position: relative;
}
.car-info {
display: flex;
flex: 1;
margin-left: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 12px;
}
.car-name {
max-width: 245px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
font-weight: 500;
line-height: 1.4;
color: #333;
line-height: 1.4;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 245px;
}
.car-specs {
margin-top: 4px;
font-size: 12px;
color: rgb(153 153 153 / 100%);
color: rgba(153, 153, 153, 1);
margin-top: 4px;
}
.car-features {
......@@ -208,26 +180,26 @@ export default class BidPage extends PaginationComponent<Bid> {
.feature-item {
font-size: 10px;
color: rgba(153, 153, 153, 1);
border: 1px solid #f0f0f0;
//border-color: #f5f5f5;
//background-color: #f5f5f5;
padding: 2px 6px;
font-size: 10px;
color: rgb(153 153 153 / 100%);
border: 1px solid #f0f0f0;
border-radius: 2px;
}
.car-price-container {
display: flex;
gap: 4px;
align-items: baseline;
gap: 4px;
//margin-top: 4px;
}
.car-price {
font-size: 16px;
font-weight: 500;
color: #ff4d4f;
font-weight: 500;
}
.price-label {
......@@ -239,10 +211,10 @@ export default class BidPage extends PaginationComponent<Bid> {
position: absolute;
top: 34px;
right: 4px;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
}
</style>
......@@ -2,10 +2,12 @@
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import {Component, Vue} from 'vue-facing-decorator';
@Component({})
export default class BidSuccessPage extends Vue {}
export default class BidSuccessPage extends Vue {
}
</script>
......
......@@ -3,25 +3,17 @@
<!-- 车辆信息区域 -->
<view class="car-info-section">
<view class="car-info">
<image class="car-image"
mode="aspectFill"
src="/static/images/car/car1@2x.png" />
<image class="car-image" src="/static/images/car/car1@2x.png" mode="aspectFill"/>
<view class="car-details">
<view class="car-title">
奔驰C级 2019款 改款 C 260 L 运动版
</view>
<view class="car-price">
19.02 万
</view>
<view class="car-title">奔驰C级 2019款 改款 C 260 L 运动版</view>
<view class="car-price">19.02 万</view>
</view>
</view>
</view>
<!-- 申诉信息区域 -->
<view class="appeal-info-section">
<view class="section-title">
退款信息
</view>
<view class="section-title">退款信息</view>
<!-- 申诉原因 -->
<view class="form-item">
......@@ -32,34 +24,26 @@
<view class="reason-select" @click="selectReason">
<text v-if="selectedReason">{{ selectedReason }}</text>
<text v-else class="placeholder">请选择退款原因</text>
<uni-icons size="14" type="right" />
<uni-icons type="right" size="14"/>
</view>
</view>
<!-- 申诉须知 -->
<view class="notice-section">
<view class="notice-item">
<uni-icons class="bullet"
size="10"
type="circle" />
<uni-icons type="circle" size="10" class="bullet"/>
<text>为保障您的合法权益,只有在车辆实际状况与拍品描述存在重大不符时,您才可以提交申诉。</text>
</view>
<view class="notice-item">
<uni-icons class="bullet"
size="10"
type="circle" />
<uni-icons type="circle" size="10" class="bullet"/>
<text>请务必在您完成车辆交接(即提车)后的 48小时 内提交申诉申请。我们的客服及技术人员会以此时间作为判断申诉有效性的重要依据。</text>
</view>
<view class="notice-item">
<uni-icons class="bullet"
size="10"
type="circle" />
<uni-icons type="circle" size="10" class="bullet"/>
<text>请务必在您完成车辆交接(即提车)后的 48小时 内提交申诉申请。</text>
</view>
<view class="notice-item">
<uni-icons class="bullet"
size="10"
type="circle" />
<uni-icons type="circle" size="10" class="bullet"/>
<text>平台审核:纠纷专员会在1个工作日内介入,对您提交的材料进行初步审核。</text>
</view>
</view>
......@@ -73,44 +57,30 @@
<!-- 补充描述区域 -->
<view class="description-section">
<view class="section-title">
补充描述
</view>
<textarea v-model="description"
class="description-textarea"
maxlength="200"
placeholder="请详细描述您的问题,有助于更好的处理您的售后问题"
@input="countWords">
</textarea>
<view class="word-count">
{{ wordCount }}/200
</view>
<view class="section-title">补充描述</view>
<textarea class="description-textarea" v-model="description" placeholder="请详细描述您的问题,有助于更好的处理您的售后问题" maxlength="200" @input="countWords"></textarea>
<view class="word-count">{{ wordCount }}/200</view>
</view>
<!-- 底部提交按钮 -->
<view class="submit-button-container">
<button class="submit-button"
type="primary"
@click="submitAppeal">
提交
</button>
<button class="submit-button" type="primary" @click="submitAppeal">提交</button>
</view>
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { AuctionOrderController } from "@/api/AuctionOrderController";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import {Component, Vue} from 'vue-facing-decorator';
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AuctionOrderController} from "@/api/AuctionOrderController";
@Component({})
export default class CancelOrderPage extends Vue {
order: AuctionOrder = null;
orderId: number;
order: AuctionOrder = null;
created(): void {
const that = this;
onLoad((option) => {
......@@ -118,27 +88,28 @@ export default class CancelOrderPage extends Vue {
this.loadData();
});
// 每次都加载
onShow((option) => {});
onShow((option) => {
});
}
loadData(): void {
AuctionOrderController.getAuctionOrderDetailById(this.axios, this.orderId).then(res => {
this.order = res.data;
});
}
ddd(): void {
uni.showModal({
title: "取消订单",
content: "确定要取消此订单吗?",
title: '取消订单',
content: '确定要取消此订单吗?',
success: (res) => {
if (res.confirm) {
console.log("用户确定取消订单");
console.log('用户确定取消订单');
// 这里应该调用取消订单的API
}
}
});
}
loadData(): void {
AuctionOrderController.getAuctionOrderDetailById(this.axios, this.orderId).then(res => {
this.order = res.data;
});
}
}
</script>
......@@ -155,8 +126,8 @@ export default class CancelOrderPage extends Vue {
display: flex;
align-items: center;
justify-content: space-between;
height: 44px;
padding: 0 16px;
height: 44px;
background-color: #fff;
border-bottom: 1px solid #eee;
}
......@@ -176,10 +147,10 @@ export default class CancelOrderPage extends Vue {
}
.car-info-section {
padding: 12px;
margin: 10px;
background-color: #fff;
padding: 12px;
border-radius: 12px;
margin: 10px;
}
.car-info {
......@@ -190,8 +161,8 @@ export default class CancelOrderPage extends Vue {
.car-image {
width: 100px;
height: 70px;
margin-right: 12px;
border-radius: 4px;
margin-right: 12px;
}
.car-details {
......@@ -199,10 +170,10 @@ export default class CancelOrderPage extends Vue {
}
.car-title {
margin-bottom: 8px;
font-size: 14px;
line-height: 1.4;
color: #333;
margin-bottom: 8px;
line-height: 1.4;
}
.car-price {
......@@ -212,16 +183,16 @@ export default class CancelOrderPage extends Vue {
}
.appeal-info-section {
background-color: #fff;
padding: 16px;
margin-bottom: 10px;
background-color: #fff;
}
.section-title {
margin-bottom: 16px;
font-size: 16px;
font-weight: 500;
color: #333;
margin-bottom: 16px;
}
.form-item {
......@@ -229,9 +200,9 @@ export default class CancelOrderPage extends Vue {
}
.form-label {
margin-bottom: 8px;
font-size: 14px;
color: #333;
margin-bottom: 8px;
}
.required {
......@@ -252,19 +223,19 @@ export default class CancelOrderPage extends Vue {
}
.notice-section {
padding: 12px;
margin-bottom: 16px;
background-color: #f9f9f9;
padding: 12px;
border-radius: 4px;
margin-bottom: 16px;
}
.notice-item {
display: flex;
align-items: flex-start;
margin-bottom: 8px;
font-size: 12px;
line-height: 1.5;
color: #666;
margin-bottom: 8px;
line-height: 1.5;
}
.notice-item:last-child {
......@@ -272,8 +243,8 @@ export default class CancelOrderPage extends Vue {
}
.bullet {
margin-top: 3px;
margin-right: 8px;
margin-top: 3px;
}
.appeal-time {
......@@ -289,28 +260,28 @@ export default class CancelOrderPage extends Vue {
}
.description-section {
background-color: #fff;
padding: 16px;
margin-bottom: 10px;
background-color: #fff;
}
.description-textarea {
box-sizing: border-box;
width: 100%;
height: 120px;
border: 1px solid #eee;
border-radius: 4px;
padding: 12px;
font-size: 14px;
color: #333;
resize: none;
border: 1px solid #eee;
border-radius: 4px;
box-sizing: border-box;
}
.word-count {
margin-top: 8px;
text-align: right;
font-size: 12px;
color: #999;
text-align: right;
margin-top: 8px;
}
.submit-button-container {
......@@ -320,10 +291,10 @@ export default class CancelOrderPage extends Vue {
.submit-button {
width: 100%;
height: 44px;
font-size: 16px;
line-height: 44px;
color: #fff;
font-size: 16px;
background-color: #1989fa;
color: #fff;
border: none;
border-radius: 4px;
}
......
......@@ -3,9 +3,7 @@
<!-- 审核失败提示 -->
<view class="audit-fail-section">
<view class="fail-title">
审核失败
</view>
<view class="fail-title">审核失败</view>
<view class="fail-reason">
原因:行驶证照片模糊,无法识别信息,请重新上传。
</view>
......@@ -13,56 +11,33 @@
<!-- 已通过的资料 -->
<view class="approved-section">
<view class="document-title">
机动车登记证书(大绿本)
</view>
<image class="document-image"
mode="aspectFit"
src="/static/images/car/car1@2x.png">
</image>
<view class="document-title">机动车登记证书(大绿本)</view>
<image class="document-image" src="/static/images/car/car1@2x.png" mode="aspectFit"></image>
</view>
<!-- 需要重新上传的资料 -->
<view class="reupload-section">
<view class="document-title-row">
<view class="document-title">
新的机动车行驶证
</view>
<view class="view-example" @click="viewExample()">
查看示例
</view>
</view>
<view class="upload-tip">
请上传清晰的主页与副页照片。
<view class="document-title">新的机动车行驶证</view>
<view class="view-example" @click="viewExample()">查看示例</view>
</view>
<view class="upload-tip">请上传清晰的主页与副页照片。</view>
<view class="upload-container">
<view class="upload-box" @click="reuploadMain">
<uni-icons color="#ccc"
size="24"
type="plus">
</uni-icons>
<view class="upload-text">
重新上传主页
</view>
<uni-icons type="plus" size="24" color="#ccc"></uni-icons>
<view class="upload-text">重新上传主页</view>
</view>
<view class="upload-box" @click="reuploadCopy">
<uni-icons color="#ccc"
size="24"
type="plus">
</uni-icons>
<view class="upload-text">
重新上传副页
</view>
<uni-icons type="plus" size="24" color="#ccc"></uni-icons>
<view class="upload-text">重新上传副页</view>
</view>
</view>
</view>
<!-- 新车牌号 -->
<view class="license-section">
<view class="document-title">
新车牌号
</view>
<view class="document-title">新车牌号</view>
<view class="license-input">
京N·88888
</view>
......@@ -77,7 +52,7 @@
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import {Component, Vue} from "vue-facing-decorator";
@Component({
components: {}
......@@ -85,126 +60,126 @@ import { Component, Vue } from "vue-facing-decorator";
export default class OrderAuditResult extends Vue {
resubmit() {
// 重新提交的逻辑
uni.showModal({
title: "重新提交",
content: "确定要重新提交审核吗?",
success: (res) => {
if (res.confirm) {
// 提交后的逻辑
uni.showToast({
title: "提交成功,等待审核",
icon: "success", duration: 3000, complete () {
// 延时后返回上一页或跳转到其他页面
uni.navigateBack();
}
});
}
}
});
viewExample() {
uni.previewImage({urls: ['https://dj-oss-fastdfs-release.oss-cn-shenzhen.aliyuncs.com/auction/10a2f772ce850883da06720447bb16f5.png'], current: 0});
}
reuploadCopy() {
// 重新上传副页的逻辑
reuploadMain() {
// 重新上传主页的逻辑
uni.chooseImage({
count: 1,
success: (res) => {
// 这里可以处理上传后的逻辑,如显示上传的图片等
uni.showToast({
title: "副页照片已选择",
icon: "none", duration: 3000
});
title: '主页照片已选择',
icon: 'none', duration: 3000
})
}
});
})
}
reuploadMain() {
// 重新上传主页的逻辑
reuploadCopy() {
// 重新上传副页的逻辑
uni.chooseImage({
count: 1,
success: (res) => {
// 这里可以处理上传后的逻辑,如显示上传的图片等
uni.showToast({
title: "主页照片已选择",
icon: "none", duration: 3000
});
title: '副页照片已选择',
icon: 'none', duration: 3000
})
}
});
})
}
viewExample() {
uni.previewImage({ urls: [ "https://dj-oss-fastdfs-release.oss-cn-shenzhen.aliyuncs.com/auction/10a2f772ce850883da06720447bb16f5.png" ], current: 0 });
resubmit() {
// 重新提交的逻辑
uni.showModal({
title: '重新提交',
content: '确定要重新提交审核吗?',
success: (res) => {
if (res.confirm) {
// 提交后的逻辑
uni.showToast({
title: '提交成功,等待审核',
icon: 'success', duration: 3000, complete: function () {
// 延时后返回上一页或跳转到其他页面
uni.navigateBack();
}
});
}
}
})
}
}
</script>
<style lang="scss" scoped>
.audit-result-container {
background-color: #f5f5f5;
min-height: 100vh;
padding-bottom: 40px;
background-color: #f5f5f5;
}
/* 审核失败提示 */
.audit-fail-section {
padding: 16px;
margin: 16px;
background-color: #fff2f0;
border: 1px solid #ff4d4f;
border-radius: 8px;
padding: 16px;
margin: 16px 16px 16px 16px;
border: 1px solid #ff4d4f;
}
.fail-title {
margin-bottom: 8px;
font-size: 16px;
font-weight: 500;
color: #ff4d4f;
margin-bottom: 8px;
}
.fail-reason {
font-size: 14px;
line-height: 20px;
color: #ff7875;
line-height: 20px;
}
/* 已通过的资料 */
.approved-section {
padding: 16px;
margin: 0 16px 16px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
padding: 16px;
margin: 0 16px 16px 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.document-title {
margin-bottom: 12px;
font-size: 15px;
font-weight: 500;
color: #333;
margin-bottom: 12px;
}
.document-image {
width: 100%;
height: 200px;
background-color: #f5f5f5;
border-radius: 6px;
background-color: #f5f5f5;
}
/* 需要重新上传的资料 */
.reupload-section {
padding: 16px;
margin: 0 16px 16px;
background-color: #fff;
border: 1px solid #ff4d4f;
border-radius: 8px;
box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
padding: 16px;
margin: 0 16px 16px 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
border: 1px solid #ff4d4f;
}
.document-title-row {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
......@@ -214,9 +189,9 @@ export default class OrderAuditResult extends Vue {
}
.upload-tip {
margin-bottom: 16px;
font-size: 14px;
color: #ff4d4f;
margin-bottom: 16px;
}
.upload-container {
......@@ -225,40 +200,40 @@ export default class OrderAuditResult extends Vue {
}
.upload-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 48%;
height: 120px;
border: 1px dashed #ccc;
border-radius: 6px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.upload-text {
margin-top: 8px;
font-size: 13px;
color: #999;
margin-top: 8px;
}
/* 新车牌号 */
.license-section {
padding: 16px;
margin: 0 16px 16px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
padding: 16px;
margin: 0 16px 16px 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.license-input {
height: 44px;
background-color: #f5f5f5;
border-radius: 6px;
display: flex;
align-items: center;
height: 44px;
padding: 0 16px;
font-size: 16px;
color: #333;
background-color: #f5f5f5;
border-radius: 6px;
}
/* 重新提交按钮 */
......@@ -267,14 +242,14 @@ export default class OrderAuditResult extends Vue {
}
.submit-button {
display: flex;
align-items: center;
justify-content: center;
height: 48px;
font-size: 16px;
font-weight: 500;
color: #fff;
background-color: #1989fa;
border-radius: 24px;
color: #fff;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<template>
<view class="page-container">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<custom-nav-bar :show-back="true"
:status-bar-height="statusBarHeight"
title="交易完成">
</custom-nav-bar>
<view class="transaction-complete-container" :style="{ paddingTop: `${statusBarHeight + 44 }px` }">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<custom-nav-bar title="交易完成" :show-back="true" :status-bar-height="statusBarHeight"></custom-nav-bar>
<view class="transaction-complete-container" :style="{ paddingTop: statusBarHeight+44 + 'px' }">
<!-- 交易成功提示 -->
<view class="success-container">
<view class="success-tip">
<text class="success-title">交易已圆满完成!</text>
<view class="success-desc">
恭喜您,开启您的精彩旅程吧!
</view>
<view class="success-desc">恭喜您,开启您的精彩旅程吧!</view>
</view>
<view>
<image class="success-icon"
mode="aspectFill"
src="/static/images/order/complete.png">
</image>
<image class="success-icon" src="/static/images/order/complete.png" mode="aspectFill"></image>
</view>
</view>
......@@ -28,12 +20,8 @@
<!-- 车辆信息 -->
<order-vehicle-item v-if="order" :order="order"></order-vehicle-item>
<view class="action-buttons">
<view class="contract-btn" @click="viewContract">
电子合同
</view>
<view class="certificate-btn" @click="viewCertificate">
过户凭证
</view>
<view class="contract-btn" @click="viewContract">电子合同</view>
<view class="certificate-btn" @click="viewCertificate">过户凭证</view>
</view>
</view>
......@@ -70,22 +58,21 @@
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { AuctionOrderController } from "@/api/AuctionOrderController";
import CustomNavBar from "@/components/CustomNavBar.vue";
import {Component, Vue} from "vue-facing-decorator";
import OrderVehicleItem from "@/module/order/OrderVehicleItem.vue";
import { BACKGROUND_IMAGE_2 } from "@/static/ResourceConstants";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import {BACKGROUND_IMAGE_2} from "@/static/ResourceConstants";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import {AuctionOrderController} from "@/api/AuctionOrderController";
import CustomNavBar from "@/components/CustomNavBar.vue";
@Component({
components: { CustomNavBar, OrderVehicleItem }
components: {CustomNavBar, OrderVehicleItem}
})
export default class OrderComplete extends Vue {
backgroundImageUrl = BACKGROUND_IMAGE_2;
order: AuctionOrder = null;
orderId: number;
order: AuctionOrder = null;
backgroundImageUrl = BACKGROUND_IMAGE_2;
statusBarHeight = 0;// 用于接收头部总高度,设置内容区 padding
created(): void {
......@@ -95,7 +82,8 @@ export default class OrderComplete extends Vue {
this.loadData();
});
// 每次都加载
onShow((option) => {});
onShow((option) => {
});
}
loadData(): void {
......@@ -105,28 +93,62 @@ export default class OrderComplete extends Vue {
}
viewContract() {
// 查看电子合同的逻辑
AuctionOrderController.getContractsByOrderId(this.axios, this.orderId).then(res => {
const contracts = res.data.filter(item => item.templateType === 'AUCTION');
if (contracts.length > 0 && contracts[0].contractFiles.length > 0) {
this.openRemotePdf(contracts[0].contractFiles[0].url);
} else {
uni.showToast({title: '暂无电子合同', icon: 'none'});
}
});
}
// 查看过户凭证的逻辑
viewCertificate() {
uni.navigateTo({url: '/module/order/transfer/ViewTransferPage?orderId=' + this.orderId})
}
viewInsurance() {
// 查看车辆保险方案的逻辑
uni.showToast({
title: '查看车辆保险方案',
icon: 'none'
})
}
viewWarranty() {
// 查看官方认证延保的逻辑
uni.showToast({
title: '查看官方认证延保',
icon: 'none'
})
}
async openRemotePdf(pdfUrl: string) {
try {
// 1. 显示加载中提示
uni.showLoading({ title: "加载中..." });
uni.showLoading({title: '加载中...'});
// 2. 下载 PDF 到临时路径(注意:微信小程序需配置 downloadFile 合法域名)
uni.downloadFile({
url: pdfUrl, // 远程 PDF 地址
success (res) {
const filePath = res.tempFilePath;
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
fileType: "pdf", // 文档类型(必传)
filePath,
filePath: filePath,
showMenu: true,
success (res) {
success: function (res) {
console.log("打开文档成功");
},
});
},
fail (res) {
uni.showToast({ title: "下载失败,请重试", icon: "none" });
fail: function (res) {
uni.showToast({title: '下载失败,请重试', icon: 'none'});
},
});
......@@ -149,53 +171,19 @@ export default class OrderComplete extends Vue {
// }
} catch (error) {
console.error("打开 PDF 失败:", error);
uni.showToast({ title: "打开失败,请重试", icon: "none" });
uni.showToast({title: '打开失败,请重试', icon: 'none'});
} finally {
// 关闭加载提示
uni.hideLoading();
}
}
// 查看过户凭证的逻辑
viewCertificate() {
uni.navigateTo({ url: `/module/order/transfer/ViewTransferPage?orderId=${ this.orderId}` });
}
viewContract() {
// 查看电子合同的逻辑
AuctionOrderController.getContractsByOrderId(this.axios, this.orderId).then(res => {
const contracts = res.data.filter(item => item.templateType === "AUCTION");
if (contracts.length > 0 && contracts[0].contractFiles.length > 0) {
this.openRemotePdf(contracts[0].contractFiles[0].url);
} else {
uni.showToast({ title: "暂无电子合同", icon: "none" });
}
});
}
viewInsurance() {
// 查看车辆保险方案的逻辑
uni.showToast({
title: "查看车辆保险方案",
icon: "none"
});
}
viewWarranty() {
// 查看官方认证延保的逻辑
uni.showToast({
title: "查看官方认证延保",
icon: "none"
});
}
}
</script>
<style lang="scss" scoped>
.transaction-complete-container {
position: relative;
padding-bottom: 20px;
position: relative;
}
.page-container {
......@@ -211,24 +199,24 @@ export default class OrderComplete extends Vue {
}
.success-tip {
padding: 20px 16px;
text-align: left;
display: flex;
flex-direction: column;
padding: 20px 16px;
margin-bottom: 2px;
text-align: left;
}
.success-title {
margin-bottom: 2px;
font-size: 26px;
font-weight: 600;
color: #1989fa;
margin-bottom: 2px;
}
.success-icon {
margin-right: 12px;
width: 100px;
height: 100px;
margin-right: 12px;
}
.success-desc {
......@@ -252,53 +240,53 @@ export default class OrderComplete extends Vue {
/* 车辆信息卡片 */
.car-info-card {
margin: 12px;
background-color: #fff;
margin: 12px;
border-radius: 12px;
}
.action-buttons {
display: flex;
justify-content: space-between;
padding: 0 16px 16px;
padding: 0 16px 16px 16px;
}
.contract-btn,
.certificate-btn {
display: flex;
flex: 1;
height: 44px;
border-radius: 40px;
display: flex;
align-items: center;
justify-content: center;
height: 44px;
font-size: 16px;
border-radius: 40px;
}
.contract-btn {
margin-right: 8px;
color: #333;
background-color: #F8F9FBFF;
color: #333;
margin-right: 8px;
}
.certificate-btn {
margin-left: 8px;
color: #fff;
background-color: #185EFEFF;
color: #fff;
margin-left: 8px;
}
/* 尊享服务 */
.service-section {
padding: 16px;
margin: 12px;
background-color: #fff;
margin: 12px;
border-radius: 12px;
padding: 16px;
}
.section-title {
margin-bottom: 16px;
font-size: 16px;
font-weight: 500;
color: #333;
margin-bottom: 16px;
}
.service-item {
......@@ -313,20 +301,20 @@ export default class OrderComplete extends Vue {
}
.service-icon {
width: 48px;
height: 48px;
border-radius: 8px;
border: 1px solid #E7EBF4FF;
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
margin-right: 12px;
border: 1px solid #E7EBF4FF;
border-radius: 8px;
}
.service-image {
width: 32px;
height: 32px;
width: 32px;
}
.service-info {
......@@ -334,9 +322,9 @@ export default class OrderComplete extends Vue {
}
.service-name {
margin-bottom: 4px;
font-size: 15px;
color: #333;
margin-bottom: 4px;
}
.service-desc {
......
<template>
<view v-if="order" class="car-info">
<van-image class="car-image"
fit="cover"
height="90"
radius="16rpx"
:src="vehicle.cover?.url"
use-error-slot
width="120">
<view class="car-info" v-if="order">
<van-image class="car-image" use-error-slot width="120" fit="cover" radius="16rpx"
height="90" :src="vehicle.cover?.url">
</van-image>
<view class="car-details">
<view class="car-title">
【{{ licensePlate }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}
</view>
<view class="car-specs">
{{ productionYear }}年 | {{ mileage }}万公里 | 国{{ vehicle.coreSpecs.emissionStandard }}
</view>
<view class="car-title">【{{ licensePlate }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</view>
<view class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里 | 国{{ vehicle.coreSpecs.emissionStandard }}</view>
<view class="car-tags">
<text v-for="(feature, featureIndex) in vehicle.baseInfo?.tags" class="tag">{{ feature }}</text>
<text class="tag" v-for="(feature, featureIndex) in vehicle.baseInfo?.tags">{{ feature }}</text>
</view>
<view class="car-favorite">
<view class="location">
<uni-icons color="#185EFE"
size="12"
type="location">
</uni-icons>
<uni-icons type="location" size="12" color="#185EFE"></uni-icons>
{{ vehicle.ownership.carProvinceName }} {{ vehicle.ownership.carCityName }}
</view>
</view>
......@@ -32,30 +20,29 @@
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-facing-decorator";
import {Component, Prop, Vue} from 'vue-facing-decorator';
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import dayjs from "dayjs";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
@Component({})
export default class OrderVehicleItem extends Vue {
@Prop({ type: Object, required: true })
order: AuctionOrder;
@Prop({type: Object, required: true})
order: AuctionOrder;
get licensePlate(): string {
return this.vehicle.baseInfo?.licensePlate.slice(0, 2);
get vehicle() {
return this.order.vehicle;
}
get mileage(): string {
return (this.vehicle.baseInfo.mileage / 10_000).toFixed(2);
get licensePlate(): string {
return this.vehicle.baseInfo?.licensePlate.substring(0, 2);
}
get productionYear(): number {
return dayjs(this.vehicle.coreSpecs.productionDate as string).year();
}
get vehicle() {
return this.order.vehicle;
get mileage(): string {
return (this.vehicle.baseInfo.mileage / 10000).toFixed(2);
}
}
......@@ -66,10 +53,10 @@ export default class OrderVehicleItem extends Vue {
/* 车辆信息 */
.car-info {
display: flex;
background-color: #fff;
padding: 12px;
margin: 12px;
background-color: #fff;
display: flex;
border-radius: 12px;
}
......@@ -82,17 +69,17 @@ export default class OrderVehicleItem extends Vue {
}
.car-title {
margin-bottom: 4px;
font-size: 15px;
font-weight: 400;
line-height: 20px;
color: #333;
margin-bottom: 4px;
line-height: 20px;
}
.car-specs {
margin-bottom: 4px;
font-size: 13px;
color: #666;
margin-bottom: 4px;
}
.car-tags {
......@@ -100,13 +87,13 @@ export default class OrderVehicleItem extends Vue {
}
.tag {
padding: 2px 6px;
margin-right: 6px;
font-size: 10px;
color: rgb(153 153 153 / 100%);
background-color: #fff;
border: 0.5px solid rgb(230 235 245 / 100%);
color: rgba(153, 153, 153, 1);
background-color: #ffffff;
border: 0.5px solid rgba(230, 235, 245, 1);
padding: 2px 6px;
border-radius: 4px;
margin-right: 6px;
}
.car-favorite {
......@@ -115,9 +102,9 @@ export default class OrderVehicleItem extends Vue {
}
.favorite-text {
margin-left: 4px;
font-size: 12px;
color: #ff976a;
margin-left: 4px;
}
.price {
......@@ -133,9 +120,9 @@ export default class OrderVehicleItem extends Vue {
}
.time-label {
color: rgba(51, 51, 51, 1);
font-size: 15px;
font-weight: 400;
color: rgb(51 51 51 / 100%);
}
.time-value {
......@@ -144,13 +131,13 @@ export default class OrderVehicleItem extends Vue {
}
.location {
padding: 2px 6px;
border-radius: 2px;
background: rgba(24, 94, 254, 0.1);
font-size: 10px;
font-weight: 400;
line-height: 18px;
color: #185EFE;
text-align: left;
background: rgb(24 94 254 / 10%);
border-radius: 2px;
padding: 2px 6px;
}
</style>
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!