优化代码

master
paulGao 2022-06-16 09:21:14 +08:00
parent 273fdf2e84
commit c85d488de4
9 changed files with 58 additions and 28 deletions

View File

@ -1,8 +1,13 @@
FROM nginx:alpine
FROM node:10.19.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN mkdir -p /app/
COPY ./dist /app/
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]k

18
docker-build.sh Normal file
View File

@ -0,0 +1,18 @@
#代码目录
code_path=$PWD
REGISTRY_PATH='registry.cn-hangzhou.aliyuncs.com/lilishop-ui'
BUILD_VERSION=4.2.4.1
read -p "请输入仓库地址": REGISTRY_PATH
echo $REGISTRY_PATH
docker build -t $REGISTRY_PATH/buyer-ui:$BUILD_VERSION ${code_path}/buyer
docker push $REGISTRY_PATH/buyer-ui:$BUILD_VERSION
docker build -t $REGISTRY_PATH/seller-ui:$BUILD_VERSION ${code_path}/seller
docker push $REGISTRY_PATH/seller-ui:$BUILD_VERSION
docker build -t $REGISTRY_PATH/manager-ui:$BUILD_VERSION ${code_path}/manager
docker push $REGISTRY_PATH/manager-ui:$BUILD_VERSION

View File

@ -1,8 +1,13 @@
FROM nginx:alpine
FROM node:10.19.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN mkdir -p /app/
COPY ./dist /app/
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]k

View File

@ -25,7 +25,7 @@
<FormItem label="销售模式">
{{ goods.salesModel === "RETAIL" ? "零售型" : "批发型" }}
</FormItem>
<FormItem label="销售规则">
<FormItem label="销售规则" v-if="goods.salesModel !== 'RETAIL'">
<Table
border
:columns="wholesalePreviewColumns"

View File

@ -467,8 +467,8 @@ export default {
handleSubmitModal() {
const { nickName, sex, username, face, newPassword,id } = this.form;
let time = new Date(this.form.birthday);
let birthday =
time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
let birthday = time ?
time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate() : '';
let submit = {
regionId: this.form.regionId,
region: this.form.region,

View File

@ -107,7 +107,7 @@
</FormItem>
<FormItem label="权限url" v-if="form.level != 0" class="block-tool">
<Tooltip placement="right" content="*号模糊匹配,逗号分割" transfer>
<Input class="menu-input" v-model="form.permission" />
<Input class="menu-input" v-model="form.permission" type="textarea" />
</Tooltip>
</FormItem>
<FormItem label="排序值" prop="sortOrder">
@ -168,7 +168,7 @@
<Input v-model="formAdd.frontRoute" />
</FormItem>
<FormItem label="权限url" v-if="formAdd.level != 0">
<Input v-model="formAdd.permission" />
<Input v-model="formAdd.permission" type="textarea" />
<div class="desc">*号模糊匹配逗号分割</div>
</FormItem>
<FormItem label="排序值" prop="sortOrder">
@ -571,6 +571,6 @@ export default {
color: #999;
}
.menu-input {
width: 162px;
width: 362px;
}
</style>

View File

@ -146,7 +146,7 @@ export default {
email: "",
sex: "",
roles: [],
departmentId: "",
departmentId: 0,
departmentTitle: ""
},
roleList: [], //
@ -354,7 +354,7 @@ export default {
this.form.departmentId = v.departmentId;
this.form.departmentTitle = v.departmentTitle;
} else {
this.form.departmentId = "";
this.form.departmentId = 0;
this.form.departmentTitle = "";
}
},
@ -492,7 +492,7 @@ export default {
email: "",
sex: "",
roles: [],
departmentId: "",
departmentId: 0,
departmentTitle: ""
},
this.$refs.depTree.setData("", "");

View File

@ -1,8 +1,13 @@
FROM nginx:alpine
FROM node:10.19.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN mkdir -p /app/
COPY ./dist /app/
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]k

View File

@ -554,10 +554,7 @@ export default {
orderDeliverFormValidate: {
logisticsNo: [
{ required: true, message: "发货单号不能为空", trigger: "change" },
],
logisticsId: [
{ required: true, message: "请选择物流公司", trigger: "blur" },
],
]
},
addressRule: {
consigneeName: [