7.5(优化

This commit is contained in:
Hong
2024-07-05 18:53:13 +08:00
parent b6040c9b05
commit c2c729d038
6 changed files with 180 additions and 13 deletions

View File

@@ -4,11 +4,11 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
# 线上
# VUE_APP_BASE_API = 'https://cms.diyouzhijia.com/car_admin_api'
VUE_APP_BASE_API = 'https://cms.diyouzhijia.com/car_admin_api'
# 花花
# VUE_APP_BASE_API = 'http://192.168.31.16:8080/car_admin_api'
# 薛磊
VUE_APP_BASE_API = 'http://192.168.31.226:8080/car_admin_api'
# VUE_APP_BASE_API = 'http://192.168.31.226:8080/car_admin_api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().

View File

@@ -135,4 +135,10 @@ export const carBuyWayHelpInfoAPI = (id) => request.get(`/admin/platform/car/buy
export const carBuyWayHelpUpdateAPI = (data) => request.post(`/admin/platform/car/buy/way/update`, data);
//租车商品详情 /api/admin/platform/car/information/product/info/{{id}}
export const carProductInfoAPI = (id) => request.get(`/admin/platform/car/information/product/info/${id}`);
export const carProductInfoAPI = (id) => request.get(`/admin/platform/car/information/product/info/${id}`);
// 租买灵活协议 详情 /api/admin/platform/agreement/userrentalinfo
export const rentingandbuyinginfoAPI = () => request.get(`/admin/platform/agreement/rentingandbuyinginfo`);
// 租车用户协议 保存 /api/admin/platform/agreement/userrentalsave
export const rentingandbuyingsaveAPI = (data) => request.post(`/admin/platform/agreement/rentingandbuyingsave`, data);

View File

@@ -55,6 +55,15 @@ const rentsellRouter = {
},
component: () => import('@/views/rentsell/sell/car_purchase_plan'),
},
{
path: 'rentingandbuyingsave',
name: 'rentingandbuyingsave',
meta: {
title: '租买灵活协议',
noCache: true,
},
component: () => import('@/views/rentsell/sell/rentingandbuyingsave'),
},
],
},
{

View File

@@ -20,11 +20,14 @@
<el-option label="维修店app轮播图" :value="1" />
<el-option label="小程序首页" :value="2" />
<el-option label="小程序预约页首页" :value="3" />
<el-option label="用户端维修页轮播图" :value="4" />
<el-option label="维修页轮播图" :value="4" />
<el-option label="用户端邀请页广告位" :value="5" />
<el-option label="用户端发现广场轮播图" :value="6" />
<el-option label="用户端首页轮播图" :value="6" />
<el-option label="展厅" :value="7" />
<el-option label="流水返佣轮播图" :value="8" />
<el-option label="享服务轮播图" :value="9" />
<el-option label="维修副页轮播图" :value="10" />
<el-option label="车商首页轮播图" :value="11" />
</el-select>
</el-form-item>
@@ -50,10 +53,10 @@
<el-radio :label="3">秒杀商品链接</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="user.linkType == 2 || user.linkType == 3" label="选择活动" prop="linkUrl" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
<el-form-item v-if="user.linkType == 2 || user.linkType == 3" label="选择活动" >
<el-button type="primary" @click="openActivity">选择活动</el-button>
</el-form-item>
<el-form-item label="跳转链接" prop="linkUrl" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
<el-form-item label="跳转链接" prop="linkUrl" >
<el-input v-model.trim="user.linkUrl" placeholder="请输入跳转链接"></el-input>
</el-form-item>
@@ -130,7 +133,7 @@ export default {
user: Object,
levelNumData: {
type: Array,
default: [],
default: {},
},
title: String,
},

View File

@@ -12,11 +12,14 @@
<el-option label="维修店app轮播图" :value="1" />
<el-option label="小程序首页" :value="2" />
<el-option label="小程序预约页首页" :value="3" />
<el-option label="用户端维修页轮播图" :value="4" />
<el-option label="维修页轮播图" :value="4" />
<el-option label="维修副页轮播图" :value="10" />
<el-option label="用户端邀请页广告位" :value="5" />
<el-option label="用户端发现广场轮播图" :value="6" />
<el-option label="用户端首页轮播图" :value="6" />
<el-option label="展厅" :value="7" />
<el-option label="流水返佣轮播图" :value="8" />
<el-option label="享服务轮播图" :value="9" />
<el-option label="车商首页轮播图" :value="11" />
</el-select>
</el-form-item>
<el-form-item>
@@ -136,7 +139,9 @@ export default {
},
loading: false,
tableDataList: [],
userInfo: {},
userInfo: {
linkUrl:''
},
levelNumData: [],
title: '',
detailObj: {},
@@ -152,11 +157,14 @@ export default {
if (type == 1) return '维修店app轮播图';
if (type == 2) return '小程序首页';
if (type == 3) return '小程序预约页首页';
if (type == 4) return '用户端维修页轮播图';
if (type == 4) return '维修页轮播图';
if (type == 5) return '用户端邀请页广告位';
if (type == 6) return '用户端发现广场轮播图';
if (type == 6) return '用户端首页轮播图';
if (type == 7) return '展厅';
if (type == 8) return '流水返佣轮播图';
if (type == 9) return '享服务轮播图';
if (type == 10) return '维修副页轮播图';
if (type == 11) return '车商首页轮播图';
},
showLinkType(type) {
if (type == 0) return '内部链接';

View File

@@ -0,0 +1,141 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div v-loading="loading">
<div class="content">
<!-- 效果预览 -->
<div class="phoneBox">
<div class="fontBox" v-html="formValidate.agreement"></div>
</div>
<!-- 富文本 -->
<div class="ueditor">
<div class="font"><span class="gang"></span> 租车协议</div>
<Tinymce v-model="formValidate.agreement" :key="keyIndex"></Tinymce>
</div>
</div>
<div class="btn">
<el-button
class="button"
type="primary"
@click="submenus"
v-hasPermi="['platform:system:agreement:userrental:save']"
>提交</el-button
>
</div>
</div>
</el-card>
</div>
</template>
<script>
import Tinymce from '@/components/Tinymce/index';
import { rentingandbuyingsaveAPI, rentingandbuyinginfoAPI } from '@/api/rentsell';
import { checkPermi } from '@/utils/permission'; // 权限判断函数
export default {
name: 'agreementList',
components: { Tinymce },
data() {
return {
loading: false,
formValidate: {
agreement: '',
},
keyIndex: 0,
};
},
created() {
if (checkPermi(['platform:system:agreement:userrental:info'])) this.getInfo();
},
methods: {
checkPermi,
getInfo() {
this.loading = true;
rentingandbuyinginfoAPI().then((res) => {
this.formValidate.agreement = JSON.parse(res).agreement;
this.keyIndex += 1;
});
this.loading = false;
},
submenus() {
if (this.formValidate.agreement === '' || !this.formValidate.agreement) {
return this.$message.warning('请输入协议信息!');
} else {
rentingandbuyingsaveAPI(this.formValidate).then(async (res) => {
this.$message.success('保存成功');
});
}
},
},
};
</script>
<style scoped lang="scss">
.box-card :v-deep.el-card__body {
padding-left: 0px;
}
:v-deep.el-tabs__item.is-active {
color: #1890ff;
background-color: #ccc;
background: #437efd1e;
// opacity: 0.1;
}
:v-deep.el-tabs--left .el-tabs__header.is-left {
float: left;
margin-bottom: 0;
margin-right: 20px;
height: 700px;
}
.gang {
border: 2px solid #1890ff;
margin-right: 10px;
}
.btn {
border-top: 1px solid #ccc;
margin-top: 20px;
.button {
display: block;
margin: 17px auto 0px;
}
}
.content {
// border: 1px solid red;
padding: 30px;
display: flex;
// justify-content: space-around;
flex-wrap: wrap;
img {
max-width: 100%;
}
.phoneBox {
width: 302px;
height: 543px;
background-image: url('../../../../assets/imgs/phoneBox.png');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
overflow: hidden;
margin-right: 50px;
.fontBox {
margin: 0 auto;
margin-top: 45px;
width: 255px;
height: 450px;
background: #ffffff;
border: 1px solid #e2e2e2;
padding: 10px;
overflow: hidden;
overflow-y: auto;
::v-deep img {
width: 100% !important;
}
}
}
.ueditor {
flex: 1;
.font {
font-size: 20px;
font-weight: 600;
color: #303133;
margin-bottom: 30px;
}
}
}
</style>