1
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = Jarvis
|
VUE_APP_TITLE=Jarvis
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV=development
|
||||||
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES=true
|
||||||
|
|
||||||
|
# 前端请求前缀(与 axios baseURL 一致);由 vue.config.js devServer 代理到下方后端
|
||||||
VUE_APP_BASE_API=/jarvis-api
|
VUE_APP_BASE_API=/jarvis-api
|
||||||
# VUE_APP_BASE_API = 'http://127.0.0.1:30313'
|
|
||||||
port = 8888
|
# 仅 npm run dev 时生效:webpack 将 /jarvis-api 代理到该地址(可改为本机或其它局域网 IP)
|
||||||
|
VUE_APP_DEV_PROXY_TARGET=http://192.168.8.88:30313
|
||||||
|
|
||||||
|
port=8888
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = Jarvis
|
VUE_APP_TITLE=Jarvis
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV=production
|
||||||
|
|
||||||
# Jarvis/生产环境
|
|
||||||
|
|
||||||
|
# 打包后接口前缀:浏览器请求「当前站点域名 + 此前缀」,由部署机 Nginx 反代到公网/内网后端(勿写死 IP)
|
||||||
VUE_APP_BASE_API=/jarvis-api
|
VUE_APP_BASE_API=/jarvis-api
|
||||||
port = 8888
|
|
||||||
|
port=8888
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
|
"prod": "vue-cli-service build",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "vue-cli-service build",
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
"build:stage": "vue-cli-service build --mode staging",
|
||||||
"preview": "node build/index.js --preview"
|
"preview": "node build/index.js --preview"
|
||||||
|
|||||||
@@ -506,79 +506,62 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="备注/状态" prop="status" min-width="100" show-overflow-tooltip/>
|
||||||
<el-table-column label="下单人" prop="buyer" width="80"/>
|
<el-table-column label="下单人" prop="buyer" width="80"/>
|
||||||
|
|
||||||
<!-- 退款状态拆分为多列,避免行高被撑大 -->
|
<!-- 退款/到账/价保/专票/评价:合并为一列 -->
|
||||||
<el-table-column label="退款" prop="isRefunded" width="70" align="center">
|
<el-table-column label="状态" align="center" width="200" class-name="order-status-flags-cell">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<div class="order-status-flags">
|
||||||
:type="scope.row.isRefunded === 1 ? 'warning' : 'info'"
|
<el-tag
|
||||||
size="small"
|
:type="scope.row.isRefunded === 1 ? 'warning' : 'info'"
|
||||||
:title="scope.row.isRefunded === 1 && scope.row.refundDate ? '退款日期:' + parseTime(scope.row.refundDate) : ''"
|
size="mini"
|
||||||
@click.native="toggleRefunded(scope.row)"
|
:title="scope.row.isRefunded === 1 && scope.row.refundDate ? '退款日期:' + parseTime(scope.row.refundDate) : '退款'"
|
||||||
style="cursor: pointer;">
|
@click.native="toggleRefunded(scope.row)"
|
||||||
{{ scope.row.isRefunded === 1 ? '已退款' : '未退款' }}
|
style="cursor: pointer;">
|
||||||
</el-tag>
|
{{ scope.row.isRefunded === 1 ? '已退款' : '未退款' }}
|
||||||
</template>
|
</el-tag>
|
||||||
</el-table-column>
|
<el-tag
|
||||||
<el-table-column label="退款到账" prop="isRefundReceived" width="80" align="center">
|
:type="scope.row.isRefundReceived === 1 ? 'success' : 'info'"
|
||||||
<template slot-scope="scope">
|
size="mini"
|
||||||
<el-tag
|
:title="scope.row.isRefundReceived === 1 && scope.row.refundReceivedDate ? '退款到账日期:' + parseTime(scope.row.refundReceivedDate) : '退款到账'"
|
||||||
:type="scope.row.isRefundReceived === 1 ? 'success' : 'info'"
|
@click.native="toggleRefundReceived(scope.row)"
|
||||||
size="small"
|
style="cursor: pointer;">
|
||||||
:title="scope.row.isRefundReceived === 1 && scope.row.refundReceivedDate ? '退款到账日期:' + parseTime(scope.row.refundReceivedDate) : ''"
|
{{ scope.row.isRefundReceived === 1 ? '已到账' : '未到账' }}
|
||||||
@click.native="toggleRefundReceived(scope.row)"
|
</el-tag>
|
||||||
style="cursor: pointer;">
|
<el-tag
|
||||||
{{ scope.row.isRefundReceived === 1 ? '已到账' : '未到账' }}
|
:type="scope.row.isRebateReceived === 1 ? 'success' : 'info'"
|
||||||
</el-tag>
|
size="mini"
|
||||||
</template>
|
:title="scope.row.isRebateReceived === 1 && scope.row.rebateReceivedDate ? '后返到账日期:' + parseTime(scope.row.rebateReceivedDate) : '后返到账'"
|
||||||
</el-table-column>
|
@click.native="toggleRebateReceived(scope.row)"
|
||||||
<el-table-column label="后返到账" prop="isRebateReceived" width="76" align="center">
|
style="cursor: pointer;">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.isRebateReceived === 1 ? '已到账' : '未到账' }}
|
||||||
<el-tag
|
</el-tag>
|
||||||
:type="scope.row.isRebateReceived === 1 ? 'success' : 'info'"
|
<el-tag
|
||||||
size="small"
|
:type="scope.row.isPriceProtected === 1 ? 'warning' : 'info'"
|
||||||
:title="scope.row.isRebateReceived === 1 && scope.row.rebateReceivedDate ? '后返到账日期:' + parseTime(scope.row.rebateReceivedDate) : ''"
|
size="mini"
|
||||||
@click.native="toggleRebateReceived(scope.row)"
|
:title="scope.row.isPriceProtected === 1 && scope.row.priceProtectedDate ? '价保日期:' + parseTime(scope.row.priceProtectedDate) : ''"
|
||||||
style="cursor: pointer;">
|
@click.native="togglePriceProtected(scope.row)"
|
||||||
{{ scope.row.isRebateReceived === 1 ? '已到账' : '未到账' }}
|
style="cursor: pointer;">
|
||||||
</el-tag>
|
{{ scope.row.isPriceProtected === 1 ? '是' : '否' }}
|
||||||
</template>
|
</el-tag>
|
||||||
</el-table-column>
|
<el-tag
|
||||||
<el-table-column label="价保" prop="isPriceProtected" width="66" align="center">
|
:type="scope.row.isInvoiceOpened === 1 ? 'success' : 'info'"
|
||||||
<template slot-scope="scope">
|
size="mini"
|
||||||
<el-tag
|
:title="scope.row.isInvoiceOpened === 1 && scope.row.invoiceOpenedDate ? '开票日期:' + parseTime(scope.row.invoiceOpenedDate) : ''"
|
||||||
:type="scope.row.isPriceProtected === 1 ? 'warning' : 'info'"
|
@click.native="toggleInvoiceOpened(scope.row)"
|
||||||
size="small"
|
style="cursor: pointer;">
|
||||||
:title="scope.row.isPriceProtected === 1 && scope.row.priceProtectedDate ? '价保日期:' + parseTime(scope.row.priceProtectedDate) : ''"
|
{{ scope.row.isInvoiceOpened === 1 ? '是' : '否' }}
|
||||||
@click.native="togglePriceProtected(scope.row)"
|
</el-tag>
|
||||||
style="cursor: pointer;">
|
<el-tag
|
||||||
{{ scope.row.isPriceProtected === 1 ? '是' : '否' }}
|
:type="scope.row.isReviewPosted === 1 ? 'success' : 'info'"
|
||||||
</el-tag>
|
size="mini"
|
||||||
</template>
|
:title="scope.row.isReviewPosted === 1 && scope.row.reviewPostedDate ? '评价日期:' + parseTime(scope.row.reviewPostedDate) : ''"
|
||||||
</el-table-column>
|
@click.native="toggleReviewPosted(scope.row)"
|
||||||
<el-table-column label="专票" prop="isInvoiceOpened" width="60" align="center">
|
style="cursor: pointer;">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.isReviewPosted === 1 ? '是' : '否' }}
|
||||||
<el-tag
|
</el-tag>
|
||||||
:type="scope.row.isInvoiceOpened === 1 ? 'success' : 'info'"
|
</div>
|
||||||
size="small"
|
|
||||||
:title="scope.row.isInvoiceOpened === 1 && scope.row.invoiceOpenedDate ? '开票日期:' + parseTime(scope.row.invoiceOpenedDate) : ''"
|
|
||||||
@click.native="toggleInvoiceOpened(scope.row)"
|
|
||||||
style="cursor: pointer;">
|
|
||||||
{{ scope.row.isInvoiceOpened === 1 ? '是' : '否' }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="评价" prop="isReviewPosted" width="60" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag
|
|
||||||
:type="scope.row.isReviewPosted === 1 ? 'success' : 'info'"
|
|
||||||
size="small"
|
|
||||||
:title="scope.row.isReviewPosted === 1 && scope.row.reviewPostedDate ? '评价日期:' + parseTime(scope.row.reviewPostedDate) : ''"
|
|
||||||
@click.native="toggleReviewPosted(scope.row)"
|
|
||||||
style="cursor: pointer;">
|
|
||||||
{{ scope.row.isReviewPosted === 1 ? '是' : '否' }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -591,7 +574,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 其他信息列(可折叠) -->
|
<!-- 其他信息列(可折叠) -->
|
||||||
<el-table-column label="备注/状态" prop="status" min-width="100" show-overflow-tooltip/>
|
|
||||||
<el-table-column label="订单状态" prop="orderStatus" width="80" align="center">
|
<el-table-column label="订单状态" prop="orderStatus" width="80" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
@@ -2917,6 +2899,19 @@ export default {
|
|||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 合并列:退款/到账/价保等标签换行排列 */
|
||||||
|
.order-status-flags {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
.order-status-flags .el-tag {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* 优化地址列显示,防止过长换行 */
|
/* 优化地址列显示,防止过长换行 */
|
||||||
.order-table ::v-deep .el-table .address-cell {
|
.order-table ::v-deep .el-table .address-cell {
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
|
|||||||
@@ -9,12 +9,13 @@ const CompressionPlugin = require('compression-webpack-plugin')
|
|||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || 'Jarvis' // 网页标题
|
const name = process.env.VUE_APP_TITLE || 'Jarvis' // 网页标题
|
||||||
|
|
||||||
// 后端接口地址(仅用于开发环境代理)
|
// 后端接口地址:开发/打包时 axios 的 baseURL(一般为相对路径如 /jarvis-api,由浏览器访问同域或 devServer 代理)
|
||||||
// 生产环境应该使用相对路径(如 /dev-api),通过nginx代理
|
// 生产环境请保持相对路径,由部署机 Nginx 反代到公网后端;勿在构建里写死公网 IP
|
||||||
// 开发环境可以使用相对路径(通过devServer代理)或绝对URL
|
const baseUrl = process.env.VUE_APP_BASE_API || (process.env.NODE_ENV === 'production' ? '/dev-api' : '/jarvis-api')
|
||||||
const baseUrl = process.env.VUE_APP_BASE_API || (process.env.NODE_ENV === 'production' ? '/dev-api' : 'http://127.0.0.1:30313')
|
// 开发环境代理路径(与 VUE_APP_BASE_API 一致,例如 /jarvis-api)
|
||||||
// 开发环境代理路径(如果未设置VUE_APP_BASE_API,使用默认代理路径)
|
|
||||||
const devApiPath = process.env.VUE_APP_BASE_API || '/dev-api'
|
const devApiPath = process.env.VUE_APP_BASE_API || '/dev-api'
|
||||||
|
// 仅 npm run dev(webpack-dev-server)时:把上述前缀代理到该后端(默认局域网 Jarvis)
|
||||||
|
const devProxyTarget = process.env.VUE_APP_DEV_PROXY_TARGET || 'http://192.168.8.88:30313'
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ module.exports = {
|
|||||||
// 如果VUE_APP_BASE_API是相对路径(如/dev-api),则使用代理
|
// 如果VUE_APP_BASE_API是相对路径(如/dev-api),则使用代理
|
||||||
// 如果是绝对URL,则直接使用该URL,不配置代理
|
// 如果是绝对URL,则直接使用该URL,不配置代理
|
||||||
[devApiPath]: {
|
[devApiPath]: {
|
||||||
target: baseUrl.startsWith('http') ? baseUrl : 'http://127.0.0.1:30313',
|
target: baseUrl.startsWith('http') ? baseUrl : devProxyTarget,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + devApiPath]: ''
|
['^' + devApiPath]: ''
|
||||||
@@ -51,7 +52,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
// springdoc proxy
|
// springdoc proxy
|
||||||
'^/v3/api-docs/(.*)': {
|
'^/v3/api-docs/(.*)': {
|
||||||
target: baseUrl.startsWith('http') ? baseUrl : 'http://127.0.0.1:30313',
|
target: baseUrl.startsWith('http') ? baseUrl : devProxyTarget,
|
||||||
changeOrigin: true
|
changeOrigin: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user