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