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"
} }
......
This diff is collapsed.
...@@ -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