Commit ced24a30 authored by caimeng's avatar caimeng

提交测试

parent a0e58785
BASE_URL='' BASE_URL=''
VUE_APP_API_PATH=http://testcrm.newbuytek.com VUE_APP_API_PATH=http://192.168.0.199:8221
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
"homepage": "https://chu1204505056.gitee.io/vue-admin-beautiful-pro", "homepage": "https://chu1204505056.gitee.io/vue-admin-beautiful-pro",
"scripts": { "scripts": {
"serve": "vue-cli-service serve --fix", "serve": "vue-cli-service serve --fix",
"build": "vue-cli-service build", "build:staging": "vue-cli-service build --mode staging",
"build:prod": "vue-cli-service build --mode production",
"build:report": "vue-cli-service build --report", "build:report": "vue-cli-service build --report",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"lint:style": "stylelint-config-prettier-check", "lint:style": "stylelint-config-prettier-check",
......
...@@ -196,6 +196,26 @@ export const asyncRoutes = [ ...@@ -196,6 +196,26 @@ export const asyncRoutes = [
} }
], ],
}, },
{
path: '/app',
name: 'app',
component: Layout,
redirect: '/app/setting',
meta: {
title: 'APP管理'
},
children: [
{
path: 'setting',
name: 'AppSetting',
component: () => import('@/views/app/setting'),
meta: {
title: 'APP设置',
remixIcon: 'settings-line'
},
}
],
},
{ {
path: '/error', path: '/error',
name: 'Error', name: 'Error',
...@@ -235,6 +255,7 @@ export const asyncRoutes = [ ...@@ -235,6 +255,7 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/vab/icon/remixIcon', redirect: '/vab/icon/remixIcon',
alwaysShow: true, alwaysShow: true,
hidden: true,
meta: { meta: {
title: '组件参考', title: '组件参考',
remixIcon: 'code-box-line', remixIcon: 'code-box-line',
......
...@@ -130,4 +130,20 @@ export default { ...@@ -130,4 +130,20 @@ export default {
data, data,
}) })
}, },
// 回现APP设置
app_setting(params) {
return request({
url: '/manage/getList',
method: 'get',
params,
})
},
// 变更状态
app_setting_update(data) {
return request({
url: '/manage/update',
method: 'post',
data,
})
},
} }
<template> <template>
<div :class="'logo-container-' + layout"> <div :class="'logo-container-' + layout">
<router-link to="/"> <router-link to="/">
<span class="logo"> <span
<vab-remix-icon v-if="logo" :icon-class="logo" is-svg /> style="margin-right: 20px;"
class="logo"
>
<vab-remix-icon
v-if="logo"
:icon-class="logo"
is-svg
/>
</span> </span>
<span <span
:class="{ 'hidden-xs-only': layout === 'horizontal' }" :class="{ 'hidden-xs-only': layout === 'horizontal' }"
...@@ -38,8 +45,8 @@ ...@@ -38,8 +45,8 @@
@mixin logo { @mixin logo {
display: inline-block; display: inline-block;
width: 32px; width: 24px;
height: 32px; height: 24px;
color: $base-title-color; color: $base-title-color;
vertical-align: middle; vertical-align: middle;
} }
......
.merchant-new{
box-sizing: border-box;
padding: 20px;
}
.time {
font-size: 13px;
color: #999;
width:150px;
text-overflow: ellipsis;
overflow: hidden;
}
.bottom {
margin-top: 13px;
line-height: 12px;
}
.button {
padding: 0;
float: right;
}
.image {
width: 100%;
display: block;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
<template>
<div
v-if="data!==null"
class="merchant-new"
>
<el-row>
<el-col :span="8">
<div>1</div>
</el-col>
<el-col :span="16">
<block-header title="功能模块" />
<el-form
label-suffix=":"
label-position="left"
>
<template v-for="(item,index) in data.FUNCTION">
<el-form-item
:key="index"
class="form-item"
:label="item.name"
>
<el-switch
:value="item.status==='0'"
active-color="#13ce66"
inactive-color="#ff4949"
@change="handleChange($event,item)"
/>
</el-form-item>
</template>
</el-form>
<block-header title="推荐产品" />
<el-row>
<el-col
v-for="(o, index) in data.PRODUCTS"
:key="index"
:span="5"
:offset="index > 0 ? 1 : 0"
>
<el-card :body-style="{ padding: '0px' }">
<img
style="width: 100%; max-height: 100px"
:src="o.content"
class="image"
>
<div style="padding: 14px; ">
<span>{{ o.name }}</span>
<div class="bottom clearfix">
<time class="time">{{ o.skipweb }}</time>
<el-button
type="text"
class="button"
@click="showDialog(o)"
>
修改
</el-button>
</div>
</div>
</el-card>
</el-col>
</el-row>
<block-header title="平台客服电话" />
<el-form
ref="custom"
label-suffix=":"
label-position="left"
:model="form"
:inline="true"
>
<el-form-item
class="form-item"
label="电话号码"
>
<el-input
v-model="custom.content"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="onCustomSubmit('custom')"
>
保存
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<!-- 修改弹框-->
<el-dialog
title="修改"
:visible.sync="dialogVisible"
width="450px"
:before-close="handleClose"
>
<el-form
ref="h5"
label-suffix=":"
label-width="130"
:model="pro"
>
<el-form-item
class="form-item"
label="显示图标"
required
>
<el-upload
class="avatar-uploader"
action="/api/sysUser/upload"
list-type="picture-card"
:show-file-list="false"
:on-success="handleSuccessBusiness"
:before-upload="beforeAvatarUpload"
>
<el-image
v-if="pro.content"
class="avatar"
:src="pro.content"
fit="fit"
/>
<i
v-else
class="el-icon-plus avatar-uploader-icon"
/>
</el-upload>
</el-form-item>
<el-form-item
class="form-item"
label="跳转地址"
required
>
<el-input
v-model="pro.skipweb"
style="width: 200px"
clearable
/>
</el-form-item>
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button
type="primary"
@click="onDialogSubmit('h5')"
>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import BlockHeader from "@/components/blockHeader";
import API from "@/server/api";
export default {
name: "MerchantNew",
components: {
"block-header": BlockHeader
},
data() {
return {
data: null,
dialogVisible: false,
form: {},
pro: {},
custom: {}
};
},
async created() {
await this.init();
},
methods: {
handleClose(done) {
done();
},
showDialog(o) {
this.dialogVisible = true;
this.pro = o;
},
onDialogSubmit(formName) {
this.$refs[formName].validate(async (valid) => {
if (valid) {
const form = Object.assign({}, this.pro);
let result = await API.app_setting_update({ ...form });
if (result.success) {
this.dialogVisible = false;
this.$baseMessage("修改成功", "success");
setTimeout(async () => {
await this.init();
}, 1500);
} else {
this.dialogVisible = false;
this.$baseMessage("修改失败", "error");
}
}
});
},
async init() {
const result = await API.app_setting();
if (result.success) {
const { PHONENUMBER } = result.result;
this.data = result.result;
this.custom = PHONENUMBER[0];
}
},
handleSuccessBusiness(res) {
this.pro.content = res.result;
},
beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG && !isPNG) {
this.$message.error("上传图片只能是 JPG 或者 PNG 格式!");
return false;
}
if (!isLt2M) {
this.$message.error("上传图片大小不能超过 2MB!");
return false;
}
return true;
},
onCustomSubmit(formName){
this.$refs[formName].validate(async (valid) => {
if (valid) {
const form = Object.assign({}, this.custom);
let result = await API.app_setting_update({ ...form });
if (result.success) {
this.$baseMessage("修改成功", "success");
setTimeout(async () => {
await this.init();
}, 1500);
} else {
this.$baseMessage("修改失败", "error");
}
}
});
},
onSubmit(formName) {
this.$refs[formName].validate(async (valid) => {
if (valid) {
const form = Object.assign({}, this.form);
let result = await API.notice_add({ ...form });
if (result.success) {
this.$baseMessage("保存成功", "success");
setTimeout(() => {
this.$router.back();
}, 1500);
}
}
});
},
onReset(formName) {
this.$refs[formName].resetFields();
},
handleChange(flag, item) {
console.log(flag, item);
const flagTxt = flag ? "显示" : "隐藏";
this.$confirm(`是否${flagTxt}该模块?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning"
}).then(async () => {
item.status = flag ? "0" : "1";
const result = await API.app_setting_update({
...item
});
if (result.success) {
await this.init();
}
}).catch(() => {
console.log("取消");
});
}
}
};
</script>
<style lang="scss" src="./index.scss"></style>
...@@ -72,12 +72,6 @@ ...@@ -72,12 +72,6 @@
label="操作" label="操作"
> >
<template #default="{ row }"> <template #default="{ row }">
<el-button
type="text"
@click="handleView(row)"
>
详情
</el-button>
<el-button <el-button
type="text" type="text"
@click="handleView(row)" @click="handleView(row)"
...@@ -109,54 +103,37 @@ export default { ...@@ -109,54 +103,37 @@ export default {
name: "Fence", name: "Fence",
data() { data() {
return { return {
checkList: ["产品等级", "产品编号", "产品名称", "LOGO", "机构编号", "机构名称", "产品状态","对接方式","创建时间",], checkList: ["订单编号", "进件时间","姓名", "产品名称", "申请状态", "是否推送"],
columns: [ columns: [
{ {
order: 1, order: 1,
label: "产品等级", label: "订单编号",
prop: "gradeSort" prop: "orderNo"
}, },
{ {
order: 2, order: 2,
label: "产品编号", label: "进件时间",
prop: "appNo" prop: "gmtCreatedStr"
}, },
{ {
order: 3, order: 3,
label: "产品名称", label: "姓名",
prop: "appName" prop: "userName"
}, },
{ {
order: 4, order: 4,
label: "LOGO", label: "产品名称",
prop: "appLogo" prop: "appName"
}, },
{ {
order: 5, order: 5,
label: "机构编号", label: "申请状态",
prop: "tenantNo", prop: "applyStatusStr"
overflow: true
}, },
{ {
order: 6, order: 6,
label: "机构名称", label: "是否推送",
prop: "loanLicenseUrl" prop: "applyStatusStr"
},
{
order: 7,
label: "产品状态",
prop: "status"
},
{
order: 8,
label: "对接方式",
prop: "abutmentWay"
},
{
order: 9,
width:170,
label: "创建时间",
prop: "gmtCreated"
} }
], ],
list: [], list: [],
......
...@@ -117,7 +117,10 @@ ...@@ -117,7 +117,10 @@
> >
{{ translateTitle("登录") }} {{ translateTitle("登录") }}
</el-button> </el-button>
<router-link to="/register"> <router-link
v-if="false"
to="/register"
>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
{{ translateTitle("注册") }} {{ translateTitle("注册") }}
</div> </div>
......
...@@ -37,16 +37,22 @@ ...@@ -37,16 +37,22 @@
:show-overflow-tooltip="!!item.overflow" :show-overflow-tooltip="!!item.overflow"
> >
<template #default="{ row }"> <template #default="{ row }">
<div v-if="item.label==='LOGO'"> <div v-if="item.label==='H5链接'">
<el-link
type="primary"
:href="row[item.prop]"
target="_blank"
>
{{ row[item.prop] }}
</el-link>
</div>
<div v-else-if="item.label==='标题ICON'">
<el-image <el-image
style="width: 50px; height: 35px" style="width: 50px; height: 35px"
:src="row[item.prop]" :src="row[item.prop]"
fit="fit" fit="fit"
/> />
</div> </div>
<div v-else-if="item.label==='产品状态'">
<span>{{ row[item.prop]==="1"?'启用':'禁用' }}</span>
</div>
<span v-else>{{ row[item.prop] }}</span> <span v-else>{{ row[item.prop] }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -88,7 +94,7 @@ export default { ...@@ -88,7 +94,7 @@ export default {
name: "Fence", name: "Fence",
data() { data() {
return { return {
checkList: ["标题", "公告内容", "公告状态","创建时间",], checkList: ["标题","标题ICON", "公告内容", "H5链接", "公告状态","创建时间",],
columns: [ columns: [
{ {
order: 1, order: 1,
...@@ -97,16 +103,27 @@ export default { ...@@ -97,16 +103,27 @@ export default {
}, },
{ {
order: 2, order: 2,
label: "标题ICON",
prop: "znxTitleUrl"
},
{
order: 3,
label: "公告内容", label: "公告内容",
prop: "znxContent" prop: "znxContent"
}, },
{ {
order: 3, order: 4,
label: "H5链接",
prop: "znxHref",
overflow:true
},
{
order: 5,
label: "公告状态", label: "公告状态",
prop: "status" prop: "status"
}, },
{ {
order: 4, order: 6,
label: "创建时间", label: "创建时间",
prop: "appLogo" prop: "appLogo"
} }
......
...@@ -7,54 +7,11 @@ ...@@ -7,54 +7,11 @@
:model="form" :model="form"
label-width="120px" label-width="120px"
> >
<block-header title="对接信息" /> <block-header title="公告信息" />
<el-form-item
class="form-item"
label="对接机构"
>
<el-select
v-model="form.tenantNo"
placeholder="请选择"
>
<el-option
v-for="(item,index) in merchant"
:key="index"
:label="item.tenantName"
:value="item.tenantNo"
/>
</el-select>
</el-form-item>
<el-form-item
class="form-item"
label="对接方式"
>
<el-select
v-model="form.abutmentWay"
placeholder="请选择"
>
<el-option
label="API"
value="API"
/>
<el-option
label="H5"
value="H5"
/>
</el-select>
</el-form-item>
<block-header title="产品信息" />
<el-form-item
prop="appName"
class="form-item"
label="产品名称"
>
<el-input v-model="form.appName" />
</el-form-item>
<el-form-item <el-form-item
prop="appLogo" prop="appLogo"
class="form-item" class="form-item"
label="产品LOGO" label="公告标题ICON"
> >
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
...@@ -65,8 +22,8 @@ ...@@ -65,8 +22,8 @@
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
> >
<img <img
v-if="form.appLogo" v-if="form.znxTitleUrl"
:src="form.appLogo" :src="form.znxTitleUrl"
class="avatar" class="avatar"
> >
<i <i
...@@ -76,215 +33,36 @@ ...@@ -76,215 +33,36 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
prop="appInfo" prop="znxTitle"
class="form-item" class="form-item"
label="产品描述" label="公告标题"
> >
<el-input v-model="form.appInfo" /> <el-input v-model="form.znxTitle" />
</el-form-item>
<el-form-item
prop="customerNumbers"
class="form-item"
label="客服电话"
>
<el-input
v-model="form.customerNumbers"
class="el-input"
/>
</el-form-item>
<el-form-item
prop="abstratInfo"
class="form-item"
label="产品摘要"
>
<el-input
v-model="form.abstratInfo"
type="textarea"
:rows="3"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
prop="znxContent"
class="form-item" class="form-item"
label="产品备注" label="公告内容"
> >
<el-input <el-input
v-model="form.memo" v-model="form.znxContent"
type="textarea" type="textarea"
:rows="3" :rows="3"
/> />
</el-form-item> </el-form-item>
<block-header title="配置信息" />
<el-form-item
prop="gradeSort"
class="form-item"
label="产品等级"
>
<el-input-number
v-model="form.gradeSort"
controls-position="right"
:min="1"
:max="1000"
/>
</el-form-item>
<el-form-item
prop="creditWay"
label="授信方式"
>
<el-radio-group v-model="form.creditWay">
<el-radio :label="1">
一次授信一次借款
</el-radio>
<el-radio :label="2">
一次授信多次借款
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item <el-form-item
required prop="znxHref"
class="form-item" class="form-item"
label="额度" label="公告跳转链接"
> >
<el-row> <el-input v-model="form.znxHref">
<el-col :span="5"> <template slot="prepend">
<el-form-item prop="applyAmtMin"> http://
<el-input
v-model="form.applyAmtMin"
style="width: 80px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<div style="text-align: center">
~
</div>
</el-col>
<el-col :span="5">
<el-form-item prop="applyAmtMin">
<el-input
v-model="form.applyAmtMax"
style="width: 130px"
>
<template slot="append">
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop="withdrawSpan"
class="form-item"
label="提现跨度"
>
<el-input-number
v-model="form.withdrawSpan"
controls-position="right"
:min="1"
:max="1000"
/>
</el-form-item>
<el-form-item
prop="approvalTime"
class="form-item"
label="审批时间"
>
<el-input
v-model="form.approvalTime"
class="el-input"
>
<template slot="append">
小时
</template>
</el-input>
<div class="el-extra">
从提交授信到授信结果返回时间
</div>
</el-form-item>
<el-form-item
required
class="form-item"
label="放款时间"
>
<el-row>
<el-col :span="5">
<el-form-item prop="raiseTimeMin">
<el-input
v-model="form.raiseTimeMin"
style="width: 80px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<div style="text-align: center;">
~
</div>
</el-col>
<el-col :span="5">
<el-form-item prop="raiseTimeMax">
<el-input
v-model="form.raiseTimeMax"
style="width: 130px"
>
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
required
class="form-item"
label="每日进件时间"
>
<el-row>
<el-col :span="5">
<el-form-item prop="incomeTimeBefore">
<el-input
v-model="form.incomeTimeBefore"
style="width: 80px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<div style="text-align: center;">
~
</div>
</el-col>
<el-col :span="5">
<el-form-item prop="incomeTimeLate">
<el-input
v-model="form.incomeTimeLate"
style="width: 130px"
>
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<span class="el-extra">请输入0~24之间的整数</span>
</el-form-item>
<el-form-item
prop="incomeCount"
class="form-item"
label="每日进件上限"
>
<el-input v-model="form.incomeCount" />
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
...@@ -293,12 +71,12 @@ ...@@ -293,12 +71,12 @@
> >
保存 保存
</el-button> </el-button>
<el-button @click="$router.go(-1)">
取消
</el-button>
<el-button @click="onReset('h5form')"> <el-button @click="onReset('h5form')">
重置 重置
</el-button> </el-button>
<el-button @click="$router.go(-1)">
取消
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -316,147 +94,22 @@ export default { ...@@ -316,147 +94,22 @@ export default {
data() { data() {
return { return {
form: { form: {
tenantNo: "", znxTitle: "mc公告标题",
abutmentWay: "", znxTitleUrl: "",
gradeSort: "3", znxContent: "名称公告内容",
appLogo: "", znxHref: "www.baidu.com",
appName: "MC产品",
appInfo: "产品介绍",
abstratInfo: "产品摘要",
applyAmtMin: "300",
applyAmtMax: "500",
withdrawSpan: "1000",
incomeCount: "1000",
approvalTime: "1000",
raiseTimeMax: "7",
raiseTimeMin: "5",
memo: "1000",
customerNumbers: "400", // 客服电话
creditWay: 1 // 授信方式
}, },
rules: { rules: {
tenantNo: [{ required: true, message: "请选择机构名称", trigger: "change" }], znxTitle: [{ required: true, message: "请输入公告标题", trigger: "blur" }],
abutmentWay: [{ required: true, message: "请选择对接方式", trigger: "change" }], znxTitleUrl: [{ required: false, message: "请上传公告标题ICON", trigger: "change" }],
appName: [{ required: true, message: "请输入产品名称", trigger: "blur" }], znxContent: [{ required: true, message: "请输入公告内容", trigger: "blur" }],
appLogo: [{ required: true, message: "请上传产品LOGO图片", trigger: "blur" }], znxHref: [{ required: true, message: "请输入公告跳转链接", trigger: "blur" }],
appInfo: [{ required: true, message: "请输入产品描述", trigger: "blur" }],
abstratInfo: [{ required: true, message: "请输入产品摘要", trigger: "blur" }],
customerNumbers: [{ required: true, message: "请输入客服电话", trigger: "blur" }],
creditWay: [{ required: true, message: "请选择授信方式", trigger: "blur" }],
gradeSort: [
{
required: true,
message: "请输入产品等级",
trigger: "blur"
}
],
raiseTimeMin: [
{ required: true, message: "请输入时间", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 >= this.form.raiseTimeMax * 1) {
callback(new Error("时间不大于最大时间"));
} else {
callback();
}
},
trigger: "change"
}
],
raiseTimeMax: [
{ required: true, message: "请输入时间", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 <= this.form.raiseTimeMin * 1) {
callback(new Error("时间不小于最小时间"));
} else {
callback();
}
},
trigger: "change"
}
],
applyAmtMin: [
{ required: true, message: "请输入额度", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 >= this.form.applyAmtMax * 1) {
callback(new Error("额度必须小于最大额度"));
} else {
callback();
}
},
trigger: "change"
}
],
applyAmtMax: [
{ required: true, message: "请输入额度", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 <= this.form.applyAmtMin * 1) {
callback(new Error("额度必须大于最小额度"));
} else {
callback();
}
},
trigger: "change"
}
],
incomeTimeBefore: [
{ required: true, message: "请输入时间", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 >= this.form.incomeTimeLate * 1) {
callback(new Error("时间须小于结束时间"));
} else {
callback();
}
},
trigger: "change"
} }
],
incomeTimeLate: [
{ required: true, message: "请输入时间", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value * 1 <= this.form.incomeTimeBefore * 1) {
callback(new Error("时间须大于开始时间"));
} else {
callback();
}
},
trigger: "change"
}
],
withdrawSpan: [{ required: true, message: "请输入提现跨度", trigger: "blur" }],
approvalTime: [{ required: true, message: "请输入申请时间", trigger: "blur" }],
incomeCount: [{ required: true, message: "请输入每日进件上限", trigger: "blur" }]
},
merchant: []
}; };
}, },
async created() {
// 初始化机构列表
await this.initMerchant();
},
methods: { methods: {
// 初始化机构列表
async initMerchant() {
const result = await API.merchant_select();
if (result.success) {
this.merchant = result.result;
}
},
handleSuccessLogo(res) { handleSuccessLogo(res) {
this.form.appLogo = res.result; this.form.znxTitleUrl = res.result;
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg"; const isJPG = file.type === "image/jpeg";
...@@ -476,10 +129,9 @@ export default { ...@@ -476,10 +129,9 @@ export default {
this.$refs[formName].validate(async (valid) => { this.$refs[formName].validate(async (valid) => {
if (valid) { if (valid) {
const form = Object.assign({}, this.form); const form = Object.assign({}, this.form);
let result = await API.prod_add({ ...form }); let result = await API.notice_add({ ...form });
if (result.success) { if (result.success) {
this.$baseMessage("产品保存成功", "success"); this.$baseMessage("保存成功", "success");
setTimeout(() => { setTimeout(() => {
this.$router.back(); this.$router.back();
}, 1500); }, 1500);
......
...@@ -69,7 +69,7 @@ module.exports = { ...@@ -69,7 +69,7 @@ module.exports = {
// } // }
//}, //},
"/api": { "/api": {
target: `http://192.168.0.75:8080`, target: `http://192.168.0.199:8221`,
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment