提交前台代码

feature/前台
黄敏 5 months ago
parent 3a115ab665
commit 18c4f4da50

@ -0,0 +1,582 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>注册</title>
<!-- bootstrap样式地图插件使用 -->
<link rel="stylesheet" href="../../css/bootstrap.min.css" />
<link rel="stylesheet" href="../../layui/css/layui.css">
<!-- 样式 -->
<link rel="stylesheet" href="../../css/style.css" />
<!-- 主题(主要颜色设置) -->
<link rel="stylesheet" href="../../css/theme.css" />
<!-- 通用的css -->
<link rel="stylesheet" href="../../css/common.css" />
</head>
<style>
html::after {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
content: '';
display: block;
background-attachment: fixed;
background-size: cover;
background-position: center;
z-index: -1;
}
#swiper {
overflow: hidden;
margin: 0 auto;
}
#swiper .layui-carousel-ind li {
width: 16px;
height: 2px;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 3px;
background-color: #f7f7f7;
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
#swiper .layui-carousel-ind li.layui-this {
width: 60px;
height: 1px;
border-width: 1px;
border-style: solid;
border-color: rgba(127, 78, 22, 1);
border-radius: 0;
background-color: rgba(127, 78, 22, 1);
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
button, button:focus {
outline: none;
}
.data-add-container .add .layui-select-title .layui-unselect {
padding: 0 12px;
height: 40px;
font-size: 14px;
color: rgba(127, 78, 22, 1);
border-radius: 50px;
border-width: 1px;
border-style: solid;
border-color: #DCDFE6;
background-color: #fff;
box-shadow: 0 0 6px #7F4E16;
text-align: left;
}
.data-add-container .add .layui-form-item {
display: flex;
align-items: center;
justify-content: center;
}
.data-add-container .layui-form-pane .layui-form-item[pane] .layui-form-label {
margin: 0;
position: inherit;
background: transparent;
border: 0;
}
.data-add-container .add .layui-input-block {
margin: 0;
flex: 1;
}
.data-add-container .layui-form-pane .layui-form-item[pane] .layui-input-inline {
margin: 0;
flex: 1;
display: flex;
}
</style>
<body style="background: #EEEEEE; ">
<div id="app">
<!--
<div class="layui-carousel" id="swiper">
<div carousel-item id="swiper-item">
<div v-for="(item,index) in swiperList" v-bind:key="index">
<img class="swiper-item" :src="item.img">
</div>
</div>
</div> -->
<div class="layui-carousel" id="swiper" :style='{"boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"0px","borderWidth":"0","width":"100%","borderStyle":"solid"}'>
<div carousel-item id="swiper-item">
<div v-for="(item,index) in swiperList" :key="index">
<img style="width: 100%;height: 100%;object-fit:cover;" :src="item.img" />
</div>
</div>
</div>
<!-- 轮播图 -->
<div class="data-add-container" :style='{"padding":"20px","boxShadow":"1px 10px 6px #7F4E16","margin":"30px auto","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","borderRadius":"10px","borderWidth":"1px","borderStyle":"double"}'>
<form class="layui-form layui-form-pane add" lay-filter="myForm">
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">合同编号:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.hetongbianhao" type="text" :readonly="ro.hetongbianhao" name="hetongbianhao" id="hetongbianhao" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">房屋名称:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.fangwumingcheng" type="text" :readonly="ro.fangwumingcheng" name="fangwumingcheng" id="fangwumingcheng" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">房屋类型:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.fangwuleixing" type="text" :readonly="ro.fangwuleixing" name="fangwuleixing" id="fangwuleixing" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">小区:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.xiaoqu" type="text" :readonly="ro.xiaoqu" name="xiaoqu" id="xiaoqu" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">月租价格:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.yuezujiage" type="text" :readonly="ro.yuezujiage" name="yuezujiage" id="yuezujiage" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">租用月数:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.zuyongyueshu" type="text" :readonly="ro.zuyongyueshu" name="zuyongyueshu" id="zuyongyueshu" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">租用金额:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.zuyongjine" type="text" :readonly="ro.zuyongjine" name="zuyongjine" id="zuyongjine" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">押金:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.yajin" type="text" :readonly="ro.yajin" name="yajin" id="yajin" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">房租状态:</label>
<div class="layui-input-block">
<select name="fangzuzhuangtai" id="fangzuzhuangtai" lay-filter="fangzuzhuangtai">
<option value="">请选择</option>
<option v-for="(item,index) in fangzuzhuangtai" v-bind:key="index" :value="item">{{item}}</option>
</select>
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">合同金额:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="hetongjine" type="text" name="hetongjine" id="hetongjine" disabled="disabled" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">合同内容:</label>
<div class="layui-input-inline">
<input type="hidden" :value="detail.hetongneirong" id="hetongneirong" name="hetongneirong" />
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px #7F4E16","margin":"0 10px 0 0","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"8px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="button" class="layui-btn btn-theme" id="hetongneirongUpload">
<i v-if="true" :style='{"color":"#fff","show":true,"fontSize":"14px"}' class="layui-icon">&#xe67c;</i>上传合同内容
</button>
<a :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.5)","margin":"0 10px 0 0","borderColor":"#ccc","backgroundColor":"rgba(255, 0, 0, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"44px"}' style="display:block;text-decoration: none;line-height: 44px;" download="合同内容" :href="detail.hetongneirong"><i v-if="true" :style='{"color":"rgba(255, 255, 255, 1)","show":true,"fontSize":"14px"}' class="layui-icon layui-icon-download-circle"></i> 点击下载合同内容</a>
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">生效日:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"#333","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' type="text" name="shengxiaori" id="shengxiaori" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">有限期至:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"#333","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' type="text" name="youxianqizhi" id="youxianqizhi" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">用户名:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.yonghuming" type="text" :readonly="ro.yonghuming" name="yonghuming" id="yonghuming" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">联系电话:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.lianxidianhua" type="text" :readonly="ro.lianxidianhua" name="lianxidianhua" id="lianxidianhua" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">房主账号:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.fangzhuzhanghao" type="text" :readonly="ro.fangzhuzhanghao" name="fangzhuzhanghao" id="fangzhuzhanghao" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item" pane>
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"#333","textAlign":"right"}' class="layui-form-label">房主姓名:</label>
<div class="layui-input-block">
<input :style='{"padding":"0 12px","boxShadow":"0 0 6px #7F4E16","borderColor":"#DCDFE6","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"50px","textAlign":"left","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-model="detail.fangzhuxingming" type="text" :readonly="ro.fangzhuxingming" name="fangzhuxingming" id="fangzhuxingming" autocomplete="off" class="layui-input">
</div>
</div>
<div :style='{"padding":"10px","boxShadow":"0 0 6px #7F4E16","margin":"0 0 10px 0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0 0 1px 0","borderStyle":"double"}' class="layui-form-item">
<div class="layui-input-block" style="text-align: right;">
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.5)","margin":"0 10px","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"8px","borderWidth":"0","width":"25%","fontSize":"14px","borderStyle":"solid","height":"44px"}' class="layui-btn btn-submit" lay-submit lay-filter="*">提交</button>
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px #7F4E16","margin":"0 10px","borderColor":"#ccc","backgroundColor":"rgba(11, 11, 11, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"25%","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>
<!-- 校验格式工具类 -->
<script src="../../js/validate.js"></script>
<!-- 地图 -->
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=ca04cee7ac952691aa67a131e6f0cee0"></script>
<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../js/bootstrap.AMapPositionPicker.js"></script>
<script>
var jquery = $;
var vue = new Vue({
el: '#app',
data: {
// 轮播图
swiperList: [{
img: '../../img/banner.jpg'
}],
dataList: [],
ro:{
hetongbianhao : false,
fangwumingcheng : false,
fangwuleixing : false,
xiaoqu : false,
yuezujiage : false,
zuyongyueshu : false,
zuyongjine : false,
yajin : false,
fangzuzhuangtai : false,
hetongjine : false,
hetongneirong : false,
shengxiaori : false,
youxianqizhi : false,
yonghuming : false,
lianxidianhua : false,
fangzhuzhanghao : false,
fangzhuxingming : false,
sfsh : false,
shhf : false,
ispay : false,
},
detail: {
hetongbianhao: genTradeNo(),
fangwumingcheng: '',
fangwuleixing: '',
xiaoqu: '',
yuezujiage: '',
zuyongyueshu: '',
zuyongjine: '',
yajin: '',
fangzuzhuangtai: '',
hetongjine: '',
hetongneirong: '',
shengxiaori: '',
youxianqizhi: '',
yonghuming: '',
lianxidianhua: '',
fangzhuzhanghao: '',
fangzhuxingming: '',
sfsh: '',
shhf: '',
ispay: '',
},
fangzuzhuangtai: [],
centerMenu: centerMenu
},
updated: function() {
layui.form.render('select', 'myForm');
},
computed: {
hetongjine: {
get: function () {
return 0+parseFloat(this.detail.zuyongjine)+parseFloat(this.detail.yajin) || ''
}
},
},
methods: {
jump(url) {
jump(url)
}
}
})
layui.use(['layer', 'element', 'carousel', 'http', 'jquery', 'form', 'upload', 'laydate','tinymce'], function() {
var layer = layui.layer;
var element = layui.element;
var carousel = layui.carousel;
var http = layui.http;
var jquery = layui.jquery;
var form = layui.form;
var upload = layui.upload;
var laydate = layui.laydate;
var tinymce = layui.tinymce
// 获取轮播图 数据
http.request('config/list', 'get', {
page: 1,
limit: 5
}, function(res) {
if (res.data.list.length > 0) {
var swiperItemHtml = '';
for (let item of res.data.list) {
if (item.name.indexOf('picture') >= 0 && item.value && item.value != "" && item.value != null) {
swiperItemHtml +=
'<div>' +
'<img style="width: 100%;height: 100%;object-fit:cover;" class="swiper-item" src="' + item.value + '">' +
'</div>';
}
}
jquery('#swiper-item').html(swiperItemHtml);
// 轮播图
vue.$nextTick(() => {
carousel.render({
elem: '#swiper',
width: '100%',
height: '500px',
arrow: 'hover',
anim: 'fade',
autoplay: 'true',
interval: '3000',
indicator: 'inside'
});
})
// carousel.render({
// elem: '#swiper',
// width: swiper.width,height:swiper.height,
// arrow: swiper.arrow,
// anim: swiper.anim,
// interval: swiper.interval,
// indicator: "none"
// });
}
});
vue.fangzuzhuangtai = '租赁中,已退租'.split(',')
var hetongneirongUpload = upload.render({
//绑定元素
elem: '#hetongneirongUpload',
//上传接口
url: http.baseurl + 'file/upload',
// 请求头
headers: {
Token: localStorage.getItem('Token')
},
// 允许上传时校验的文件类型
accept: 'file',
before: function() {
//loading层
var index = layer.load(1, {
shade: [0.1, '#fff'] //0.1透明度的白色背景
});
},
// 上传成功
done: function(res) {
console.log(res);
layer.closeAll();
if (res.code == 0) {
layer.msg("上传成功", {
time: 2000,
icon: 6
})
var url = http.baseurl + 'upload/' + res.file;
jquery('#hetongneirong').val(url);
vue.detail.hetongneirong = url;
} else {
layer.msg(res.msg, {
time: 2000,
icon: 5
})
}
},
//请求异常回调
error: function() {
layer.closeAll();
layer.msg("请求接口异常", {
time: 2000,
icon: 5
})
}
});
laydate.render({
elem: '#shengxiaori'
});
laydate.render({
elem: '#youxianqizhi'
});
// session独取
let table = localStorage.getItem("userTable");
http.request(`${table}/session`, 'get', {}, function(data) {
// 表单赋值
//form.val("myForm", data.data);
data = data.data
for (var key in data){
}
});
// 跨表
if(http.getParam('corss')){
var obj = JSON.parse(localStorage.getItem('crossObj'));
for (var o in obj){
if(o=='hetongbianhao'){
vue.detail[o] = obj[o];
vue.ro.hetongbianhao = true;
continue;
}
if(o=='fangwumingcheng'){
vue.detail[o] = obj[o];
vue.ro.fangwumingcheng = true;
continue;
}
if(o=='fangwuleixing'){
vue.detail[o] = obj[o];
vue.ro.fangwuleixing = true;
continue;
}
if(o=='xiaoqu'){
vue.detail[o] = obj[o];
vue.ro.xiaoqu = true;
continue;
}
if(o=='yuezujiage'){
vue.detail[o] = obj[o];
vue.ro.yuezujiage = true;
continue;
}
if(o=='zuyongyueshu'){
vue.detail[o] = obj[o];
vue.ro.zuyongyueshu = true;
continue;
}
if(o=='zuyongjine'){
vue.detail[o] = obj[o];
vue.ro.zuyongjine = true;
continue;
}
if(o=='yajin'){
vue.detail[o] = obj[o];
vue.ro.yajin = true;
continue;
}
if(o=='fangzuzhuangtai'){
vue.detail[o] = obj[o];
vue.ro.fangzuzhuangtai = true;
continue;
}
if(o=='hetongjine'){
vue.detail[o] = obj[o];
vue.ro.hetongjine = true;
continue;
}
if(o=='hetongneirong'){
vue.detail[o] = obj[o];
vue.ro.hetongneirong = true;
continue;
}
if(o=='shengxiaori'){
vue.detail[o] = obj[o];
vue.ro.shengxiaori = true;
continue;
}
if(o=='youxianqizhi'){
vue.detail[o] = obj[o];
vue.ro.youxianqizhi = true;
continue;
}
if(o=='yonghuming'){
vue.detail[o] = obj[o];
vue.ro.yonghuming = true;
continue;
}
if(o=='lianxidianhua'){
vue.detail[o] = obj[o];
vue.ro.lianxidianhua = true;
continue;
}
if(o=='fangzhuzhanghao'){
vue.detail[o] = obj[o];
vue.ro.fangzhuzhanghao = true;
continue;
}
if(o=='fangzhuxingming'){
vue.detail[o] = obj[o];
vue.ro.fangzhuxingming = true;
continue;
}
}
}
// 提交
form.on('submit(*)', function(data) {
data = data.field;
// 数据校验
if(!isIntNumer(data.zuyongjine)){
layer.msg('租用金额应输入整数', {
time: 2000,
icon: 5
});
return false
}
if(!isIntNumer(data.yajin)){
layer.msg('押金应输入整数', {
time: 2000,
icon: 5
});
return false
}
// 跨表计算
// 比较大小
// 提交数据
http.requestJson('hetongxinxi' + '/add', 'post', data, function(res) {
layer.msg('提交成功', {
time: 2000,
icon: 6
}, function() {
back();
});
});
return false
});
});
</script>
</body>
</html>

@ -0,0 +1,477 @@
<!-- 首页 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>首页</title>
<link rel="stylesheet" href="../../layui/css/layui.css">
<!-- 样式 -->
<link rel="stylesheet" href="../../css/style.css" />
<!-- 主题(主要颜色设置) -->
<link rel="stylesheet" href="../../css/theme.css" />
<!-- 通用的css -->
<link rel="stylesheet" href="../../css/common.css" />
</head>
<style>
html::after {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
content: '';
display: block;
background-attachment: fixed;
background-size: cover;
background-position: center;
background-image: url(http://codegen.caihongy.cn/20210115/b0a7bab150b643b9b436cb50eb34b1fd.jpg);
z-index: -1;
}
#swiper {
overflow: hidden;
}
#swiper .layui-carousel-ind li {
width: 16px;
height: 5px;
border-width: 0;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 3px;
background-color: #f7f7f7;
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
#swiper .layui-carousel-ind li.layui-this {
width: 24px;
height: 0px;
border-width: 0;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 0;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
input#buynumber::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; }
input#buynumber[type="number"]{ -moz-appearance: textfield; }
.message-container {width: 100%}
.detail-tab .layui-tab-card>.layui-tab-title .layui-this {
background-color: rgba(127, 78, 22, 1);
color: #fff;
font-size: 14px;
}
.data-detail {
padding-bottom: 20px;
}
.data-detail .layui-breadcrumb a.first {
color: #999 !important;
}
</style>
<body>
<div id="app">
<div class="data-detail">
<div class="data-detail-breadcrumb" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.3)","margin":"20px auto","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0","borderStyle":"solid","height":"54px"}'>
<span class="layui-breadcrumb">
<a class="first" :style='{"padding":"8px 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"0 5px","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","color":"#999","borderRadius":"0","borderWidth":"0","fontSize":"16px","borderStyle":"solid"}' href="../home/home.html">首页</a>
<a><cite :style='{"padding":"8px 15px","boxShadow":"0 0 6px #7F4E16","margin":"0 15px","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","color":"rgba(127, 78, 22, 1)","borderRadius":"4px","borderWidth":"0","fontSize":"16px","borderStyle":"solid"}'>{{title}}</cite></a>
</span>
</div>
<div class="layui-row" style="display: flex">
<div class="layui-col-md5" style="width:400px">
<!-- <div class="layui-carousel" id="swiper">
<div carousel-item id="swiper-item">
<div v-for="(item,index) in swiperList" v-bind:key="index">
<img class="swiper-item" :src="item.img">
</div>
</div>
</div> -->
<div class="layui-carousel" id="swiper" :style='{"boxShadow":"6px 6px 6px #7F4E16","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"4px","borderWidth":"0","width":"400px","borderStyle":"solid","height":"400px"}'>
<div carousel-item>
<div v-if="swiperList.length" v-for="(item,index) in swiperList" :key="index">
<img style="width: 100%;height: 100%;object-fit:cover;" :src="item" />
</div>
</div>
</div>
</div>
<div class="layui-col-md7" style="padding-left: 20px;flex: 1;" :style='{"padding":"0","boxShadow":"6px 10px 6px rgba(255,0,0,0)","margin":"0 0 0 20px","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0px","borderStyle":"solid"}'>
<h1 style="position: relative;" :style='{"padding":"10px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(127, 78, 22, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"0","textAlign":"left","borderWidth":"0","fontSize":"16px","borderStyle":"solid"}' class="title">{{title}}</h1>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>合同编号:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.hetongbianhao}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>房屋名称:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.fangwumingcheng}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>房屋类型:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.fangwuleixing}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>小区:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.xiaoqu}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>月租价格:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.yuezujiage}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>租用月数:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.zuyongyueshu}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>租用金额:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.zuyongjine}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>押金:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.yajin}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>房租状态:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.fangzuzhuangtai}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>合同金额:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.hetongjine}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>生效日:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.shengxiaori}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>有限期至:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.youxianqizhi}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>用户名:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.yonghuming}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>联系电话:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.lianxidianhua}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>房主账号:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.fangzhuzhanghao}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>房主姓名:</span>
<span :style='{"padding":"5px 15px","boxShadow":"0 0 0px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","textAlign":"left","borderWidth":"0","width":"auto","lineHeight":"auto","fontSize":"14px","borderStyle":"solid"}' class="desc">
{{detail.fangzhuxingming}}
</span>
</div>
<div :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="detail-item">
<span :style='{"padding":"0 12px 0 0","minWidth":"94px","fontSize":"15px","color":"rgba(0, 0, 0, 1)","textAlign":"left"}'>合同内容:</span>
<span class="desc">
<a style="display:block;" :style='{"padding":"0 15px","boxShadow":"0 0 6px #7F4E16","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","textAlign":"center","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' download="hetongneirong" :href="detail.hetongneirong">点击下载</a>
</span>
</div>
<div class="detail-item" :style='{"padding":"6px 15px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"5px 5px","borderColor":"rgba(142, 72, 72, 0.3)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' style="text-align: right;">
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.3)","margin":"0 5px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(0, 129, 255, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' v-if="isAuth('hetongxinxi','报修')" @click="onAcrossTap('fangwubaoxiu')" type="button" class="layui-btn">
报修
</button>
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.3)","margin":"0 5px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(0, 129, 255, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' v-if="isAuth('hetongxinxi','评价')" @click="onAcrossTap('fangwupingjia')" type="button" class="layui-btn">
评价
</button>
</div>
</div>
</div>
<div class="layui-row detail-tab">
<div class="layui-tab layui-tab-card" :style='{"boxShadow":"0 0 5px #454545","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"10px","borderStyle":"solid","borderWidth":"0px"}' style="overflow: hidden;">
<ul class="layui-tab-title" :style='{"color":"rgba(0, 0, 0, 1)","backgroundColor":"#f2f2f2","fontSize":"14px"}'>
</ul>
<div class="layui-tab-content">
</div>
</div>
</div>
</div>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>
<script>
var vue = new Vue({
el: '#app',
data: {
// 轮播图
swiperList: [],
// 数据详情
detail: {
id: 0
},
// 商品标题
title: '',
// 倒计时
count: 0,
// 加入购物车数量
buynumber: 1,
// 当前详情页表
detailTable: 'hetongxinxi',
// 评价列表
dataList: [],
// 选座座位列表
numberList: []
},
// 倒计时效果
computed: {
SecondToDate: function() {
var time = this.count;
if (null != time && "" != time) {
if (time > 60 && time < 60 * 60) {
time =
parseInt(time / 60.0) +
"分钟" +
parseInt((parseFloat(time / 60.0) - parseInt(time / 60.0)) * 60) +
"秒";
} else if (time >= 60 * 60 && time < 60 * 60 * 24) {
time =
parseInt(time / 3600.0) +
"小时" +
parseInt(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
) +
"分钟" +
parseInt(
(parseFloat(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
) -
parseInt(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
)) *
60
) +
"秒";
} else if (time >= 60 * 60 * 24) {
time =
parseInt(time / 3600.0 / 24) +
"天" +
parseInt(
(parseFloat(time / 3600.0 / 24) - parseInt(time / 3600.0 / 24)) *
24
) +
"小时" +
parseInt(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
) +
"分钟" +
parseInt(
(parseFloat(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
) -
parseInt(
(parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60
)) *
60
) +
"秒";
} else {
time = parseInt(time) + "秒";
}
}
return time;
}
},
// 清除定时器
destroyed: function() {
window.clearInterval(this.inter);
},
methods: {
jump(url) {
jump(url)
},
isAuth(tablename, button) {
return isFrontAuth(tablename, button)
},
// 倒计时初始化
countDown() {
let reversetime = new Date(this.detail.reversetime).getTime()
let now = new Date().getTime();
let count = reversetime - now;
if (count > 0) {
this.count = count / 1000
var _this = this;
this.inter = window.setInterval(function() {
_this.count = _this.count - 1;
if (_this.count < 0) {
window.clearInterval(_this.inter);
layer.msg("活动已结束", {
time: 2000,
icon: 5
})
}
}, 1000);
}
},
// 下载文件
downFile(url) {
var download = $("#download");
download.append(
"<a id=\"down\" href=\"aaaa.txt\" target=\"_blank\" download=\"aaaa.txt\" style=\"display:none\">下载该文件</a>");
console.log(download);
$("#down")[0].click();
},
// 跨表
onAcrossTap(acrossTable){
localStorage.setItem('crossTable',`hetongxinxi`);
localStorage.setItem('crossObj', JSON.stringify(this.detail));
jump(`../${acrossTable}/add.html?corss=true`);
},
}
})
layui.use(['layer', 'form', 'element', 'carousel', 'http', 'jquery', 'laypage'], function() {
var layer = layui.layer;
var element = layui.element;
var form = layui.form;
var carousel = layui.carousel;
var http = layui.http;
var jquery = layui.jquery;
var laypage = layui.laypage;
var limit = 10;
// 数据ID
var id = http.getParam('id');
vue.detail.id = id;
// 商品信息
http.request(`${vue.detailTable}/detail/` + id, 'get', {}, function(res) {
// 详情信息
vue.detail = res.data
// var swiperItemHtml = '';
// for (let item of vue.swiperList) {
// swiperItemHtml +=
// '<div>' +
// '<img class="swiper-item" style="width: 100%;height: 100%;object-fit:cover;" src="' + item + '">' +
// '</div>';
// }
// jquery('#swiper-item').html(swiperItemHtml);
// 轮播图
vue.$nextTick(() => {
carousel.render({
elem: '#swiper',
width: '400px',
height: '450px',
arrow: 'hover',
anim: 'default',
autoplay: 'true',
interval: '3000',
indicator: 'inside'
});
})
// carousel.render({
// elem: '#swiper',
// width: swiper.width,height:swiper.height,
// arrow: swiper.arrow,
// anim: swiper.anim,
// interval: swiper.interval,
// indicator: swiper.indicator
// });
});
});
</script>
</body>
</html>

@ -0,0 +1,441 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8">
<title>合同信息</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="../../layui/css/layui.css">
<link rel="stylesheet" href="../../xznstatic/css/common.css"/>
<link rel="stylesheet" href="../../xznstatic/css/style.css"/>
<script type="text/javascript" src="../../xznstatic/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../../xznstatic/js/jquery.SuperSlide.2.1.1.js"></script>
</head>
<style>
html::after {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
content: '';
display: block;
background-attachment: fixed;
background-size: cover;
background-position: center;
}
#test1 {
overflow: hidden;
}
#test1 .layui-carousel-ind li {
width: 16px;
height: 2px;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 3px;
background-color: #f7f7f7;
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
#test1 .layui-carousel-ind li.layui-this {
width: 60px;
height: 1px;
border-width: 1px;
border-style: solid;
border-color: rgba(127, 78, 22, 1);
border-radius: 0;
background-color: rgba(127, 78, 22, 1);
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
// 列表
.recommend {
padding: 10px 0;
display: flex;
justify-content: center;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
.recommend .box {
width: 1002px;
margin: 0 auto;
}
.recommend .box .title {
padding: 10px 5px;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
}
.recommend .box .title span {
padding: 0 10px;
font-size: 16px;
line-height: 1.4;
}
.recommend .box .filter {
padding: 0 10px;
display: flex;
align-items: center;
box-sizing: border-box;
width: 100%;
flex-wrap: wrap;
}
.recommend .box .filter .item-list {
display: flex;
align-items: center;
}
.recommend .box .filter .item-list .lable {
font-size: 14px;
color: #333;
box-sizing: border-box;
}
.recommend .box .filter .item-list input {
padding: 0 10px;
box-sizing: border-box;
outline: none;
}
.recommend .box .filter button {
display: flex;
padding: 0 10px;
box-sizing: border-box;
align-items: center;
justify-content: center;
outline: none;
}
.recommend .box .filter button i {
margin-right: 4px;
}
.recommend .box .list {
display: flex;
flex-wrap: wrap;
}
.recommend .box .list .list-item {
flex: 0 0 25%;
padding: 0 5px;
box-sizing: border-box;
}
.recommend .box .list .list-item .list-item-body {
cursor: pointer;
border: 1px solid rgba(0, 0, 0, 3);
padding: 5px;
box-sizing: border-box;
}
.recommend .box .list .list-item-body img {
width: 100%;
height: 100px;
display: block;
margin: 0 auto;
}
.recommend .box .list .list-item-body .info {
display: flex;
flex-wrap: wrap;
}
.recommend .box .list .list-item-body .info .price {
padding-top: 5px;
color: red;
font-size: 14px;
text-align: center;
box-sizing: border-box;
}
.recommend .box .list .list-item-body .info .name {
padding-top: 5px;
color: red;
font-size: 14px;
text-align: center;
box-sizing: border-box;
}
.recommend .box .list .list-item3 {
flex: 0 0 33.33%;
}
.recommend .box .list .list-item5 {
flex: 0 0 20%;
}
.recommend .box .news {
display: flex;
flex-wrap: wrap;
padding: 0;
width: 100%;
}
.recommend .box .news .list-item {
flex: 0 0 50%;
padding: 0 10px;
box-sizing: border-box;
}
.recommend .box .news .list-item .list-item-body {
cursor: pointer;
border: 1px solid rgba(0, 0, 0, 3);
padding: 10px;
box-sizing: border-box;
display: flex;
}
.recommend .box .news .list-item .list-item-body img {
width: 120px;
height: 100%;
display: block;
margin: 0 auto;
}
.recommend .box .news .list-item .list-item-body .item-info {
flex: 1;
display: flex;
justify-content: space-between;
flex-direction: column;
padding-left: 10px;
box-sizing: border-box;
}
.recommend .box .news .list-item .list-item-body .item-info .name {
padding-top: 5px;
color: red;
font-size: 14px;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.recommend .box .news .list-item .list-item-body .item-info .time {
padding-top: 5px;
color: red;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
box-sizing: border-box;
}
.recommend .box .news .list-item1 {
flex: 0 0 100%;
}
.recommend .box .news .list-item3 {
flex: 0 0 33.33%;
}
.index-pv1 .animation-box:hover {
transform: perspective(1000px) translate3d(0px, 0px, 0px) scale(0.6) rotate(0deg) skew(0deg, 0deg);
transition: all 0.3s;
}
.layui-laypage .layui-laypage-count {
padding: 0 10px;
}
.layui-laypage .layui-laypage-skip {
padding-left: 10px;
}
</style>
<body>
<div id="app">
<div class="banner">
<div class="layui-carousel" id="test1" :style='{"boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"0px","borderWidth":"0","width":"100%","borderStyle":"solid"}'>
<div carousel-item>
<div v-for="(item,index) in swiperList" :key="index">
<img style="width: 100%;height: 100%;object-fit:cover;" :src="item.img" />
</div>
</div>
</div>
</div>
<div class="recommend index-pv1" :style='{"padding":"10px 0 10px 0","boxShadow":"0","margin":"10px 0px 0px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(238, 238, 238, 1)","borderRadius":"0","borderWidth":"0","borderStyle":"solid"}'>
<div class="box" style='width:80%'>
<div class="title" :style='{"padding":"10px 0 10px 0","boxShadow":"5px 5px 0px rgba(69,69,69, 1) ","margin":"10px 0 10px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(127, 78, 22, 1)","borderRadius":"8px","borderWidth":"0","borderStyle":"solid","justifyContent":"space-between","height":"54px"}'>
<span :style='{"padding":"3px 40px 3px 30px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(255, 0, 0, 0)","backgroundColor":"rgba(171, 49, 4, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"0 18px 18px 0","borderWidth":"0","fontSize":"18px","borderStyle":"solid"}'>合同信息</span><span :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"rgba(0,0,0,0)","color":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"0","fontSize":"14px","borderStyle":"solid"}'>您现在的位置:合同信息</span>
</div>
<form class="layui-form filter" :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"10px 0 10px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(238, 238, 238, 1)","borderRadius":"4px","alignItems":"center","borderWidth":"0","borderStyle":"solid","justifyContent":"flex-end","height":"54px"}'>
<div class="item-list">
<div class="lable" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"0","borderColor":"rgba(0, 0, 0, 0.78)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","borderRadius":"0","textAlign":"right","borderWidth":"0px","width":"auto","fontSize":"16px","borderStyle":"solid"}'>房屋名称</div>
<input type="text" :style='{"boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(50, 47, 47, 1)","backgroundColor":"#fff","color":"rgba(13, 12, 12, 1)","borderRadius":"8px","textAlign":"center","borderWidth":"1px","width":"140px","fontSize":"14px","borderStyle":"solid","height":"48px"}' name="fangwumingcheng" id="fangwumingcheng" placeholder="房屋名称" autocomplete="off" class="layui-input">
</div>
<div class="item-list">
<div class="lable" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"0","borderColor":"rgba(0, 0, 0, 0.78)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","borderRadius":"0","textAlign":"right","borderWidth":"0px","width":"auto","fontSize":"16px","borderStyle":"solid"}'>房屋类型</div>
<input type="text" :style='{"boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(50, 47, 47, 1)","backgroundColor":"#fff","color":"rgba(13, 12, 12, 1)","borderRadius":"8px","textAlign":"center","borderWidth":"1px","width":"140px","fontSize":"14px","borderStyle":"solid","height":"48px"}' name="fangwuleixing" id="fangwuleixing" placeholder="房屋类型" autocomplete="off" class="layui-input">
</div>
<div class="item-list">
<div class="lable" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"0","borderColor":"rgba(0, 0, 0, 0.78)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","borderRadius":"0","textAlign":"right","borderWidth":"0px","width":"auto","fontSize":"16px","borderStyle":"solid"}'>用户名</div>
<input type="text" :style='{"boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(50, 47, 47, 1)","backgroundColor":"#fff","color":"rgba(13, 12, 12, 1)","borderRadius":"8px","textAlign":"center","borderWidth":"1px","width":"140px","fontSize":"14px","borderStyle":"solid","height":"48px"}' name="yonghuming" id="yonghuming" placeholder="用户名" autocomplete="off" class="layui-input">
</div>
<button :style='{"padding":"0 15px","boxShadow":"2px 2px 0px rgba(69,69,69, 1) ","margin":"0 0 0 10px","borderColor":"#409EFF","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"40px"}' id="btn-search" type="button" class="layui-btn layui-btn-normal">
<i v-if="true" class="layui-icon layui-icon-search"></i>搜索
</button>
<button :style='{"padding":"0 15px","boxShadow":"2px 2px 0px rgba(69,69,69, 1) ","margin":"0 0 0 10px","borderColor":"#409EFF","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"40px"}' v-if="isAuth('hetongxinxi','新增')" @click="jump('../hetongxinxi/add.html')" type="button" class="layui-btn btn-theme">
<i v-if="true" class="layui-icon">&#xe654;</i>添加
</button>
</form>
<!-- 样式一 -->
<div class="list" style="position: relative;">
<div @click="jump('../hetongxinxi/detail.html?id='+item.id)" v-for="(item,index) in dataList" :key="index" class="list-item" :class="4=='3'?'list-item3':4=='5'?'list-item5':''">
<div class="list-item-body animation-box" :style='{"padding":"0px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0 0 20px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(238, 238, 238, 1)","borderRadius":"4px","borderWidth":"0","borderStyle":"solid"}'>
<div class="info">
<div v-if="item.price" :style='{"padding":"0","margin":"10px 0 0 0","backgroundColor":"rgba(0,0,0,0)","color":"rgba(184, 93, 11, 1)","borderRadius":"0","textAlign":"right","width":"100%","fontSize":"16px"}' class="price">{{item.price}} RMB</div>
</div>
</div>
</div>
</div>
<div class="pager" id="pager" :style="{textAlign:1==1?'left':1==2?'center':'right'}"></div>
</div>
</div>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../js/vue.js"></script>
<script src="../../js/config.js"></script>
<script src="../../modules/config.js"></script>
<script src="../../js/utils.js"></script>
<script type="text/javascript">
var vue = new Vue({
el: '#app',
data: {
swiperList: [],
dataList: [],
swiperIndex: '-1'
},
filters: {
newsDesc: function(val) {
if (val) {
if (val.length > 60) {
return val.substring(0, 60).replace(/<[^>]*>/g).replace(/undefined/g, '');
} else {
return val.replace(/<[^>]*>/g).replace(/undefined/g, '');
}
}
return '';
}
},
methods: {
isAuth(tablename, button) {
return isFrontAuth(tablename, button)
},
jump(url) {
jump(url)
}
}
});
layui.use(['layer', 'element', 'carousel', 'laypage', 'http', 'jquery'], function() {
var layer = layui.layer;
var element = layui.element;
var carousel = layui.carousel;
var laypage = layui.laypage;
var http = layui.http;
var jquery = layui.jquery;
var limit = 8;
// 获取轮播图 数据
http.request('config/list', 'get', {
page: 1,
limit: 5
}, function(res) {
if (res.data.list.length > 0) {
let swiperList = [];
res.data.list.forEach(element => {
if (element.value != null) {
swiperList.push({
img: element.value
});
}
});
vue.swiperList = swiperList;
vue.$nextTick(() => {
carousel.render({
elem: '#test1',
width: '100%',
height: '500px',
arrow: 'hover',
anim: 'fade',
autoplay: 'true',
interval: '3000',
indicator: 'inside'
});
})
// vue.$nextTick(()=>{
// window.xznSlide();
// });
}
});
// 分页列表
pageList();
// 搜索按钮
jquery('#btn-search').click(function(e) {
pageList();
});
function pageList() {
var param = {
page: 1,
limit: limit
}
if (jquery('#fangwumingcheng').val()) {
param['fangwumingcheng'] = jquery('#fangwumingcheng').val() ? '%' + jquery('#fangwumingcheng').val() + '%' : '';
}
if (jquery('#fangwuleixing').val()) {
param['fangwuleixing'] = jquery('#fangwuleixing').val() ? '%' + jquery('#fangwuleixing').val() + '%' : '';
}
if (jquery('#yonghuming').val()) {
param['yonghuming'] = jquery('#yonghuming').val() ? '%' + jquery('#yonghuming').val() + '%' : '';
}
param['sfsh'] = '是';
// 获取列表数据
http.request('hetongxinxi/list', 'get', param, function(res) {
vue.dataList = res.data.list
// 分页
laypage.render({
elem: 'pager',
count: res.data.total,
limit: limit,
groups: 9,
layout: ["prev","page","next"],
theme: '#7F4E16',
jump: function(obj, first) {
param.page = obj.curr;
//首次不执行
if (!first) {
http.request('hetongxinxi/list', 'get', param, function(res) {
vue.dataList = res.data.list
})
}
}
});
})
}
});
window.xznSlide = function() {
jQuery(".banner").slide({mainCell:".bd ul",autoPlay:true,interTime:5000});
jQuery("#ifocus").slide({ titCell:"#ifocus_btn li", mainCell:"#ifocus_piclist ul",effect:"leftLoop", delayTime:200, autoPlay:true,triggerTime:0});
jQuery("#ifocus").slide({ titCell:"#ifocus_btn li", mainCell:"#ifocus_tx ul",delayTime:0, autoPlay:true});
jQuery(".product_list").slide({mainCell:".bd ul",autoPage:true,effect:"leftLoop",autoPlay:true,vis:5,trigger:"click",interTime:4000});
};
</script>
</body>
</html>

@ -0,0 +1,700 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8">
<title>首页</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="order by mobanxiu.cn" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="../../layui/css/layui.css">
<link href="https://cdn.bootcdn.net/ajax/libs/Swiper/5.4.5/css/swiper.min.css" rel="stylesheet">
<link rel="stylesheet" href="../../xznstatic/css/common.css"/>
<link rel="stylesheet" href="../../xznstatic/css/style.css"/>
<script src="../../xznstatic/js/jquery-1.11.3.min.js"></script>
<script src="../../xznstatic/js/jquery.SuperSlide.2.1.1.js"></script>
</head>
<style>
html::after {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
content: '';
display: block;
background-attachment: fixed;
background-size: cover;
background-position: center;
}
#test1 {
overflow: hidden;
}
#test1 .layui-carousel-ind li {
width: 16px;
height: 2px;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 3px;
background-color: #f7f7f7;
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
#test1 .layui-carousel-ind li.layui-this {
width: 60px;
height: 1px;
border-width: 1px;
border-style: solid;
border-color: rgba(127, 78, 22, 1);
border-radius: 0;
background-color: rgba(127, 78, 22, 1);
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
.recommend {
padding: 10px 0;
display: flex;
justify-content: center;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
.recommend .box {
width: 1014px;
}
.recommend .box .title {
padding: 10px 5px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.recommend .box .title span {
padding: 0 10px;
line-height: 1.4;
}
.recommend .box .list {
display: flex;
flex-wrap: wrap;
}
.index-pv1 .box .list .list-item {
flex: 0 0 25%;
padding: 0 5px;
box-sizing: border-box;
}
.recommend .box .list .list-item-body {
border: 1px solid rgba(0, 0, 0, 3);
padding: 5px;
box-sizing: border-box;
cursor: pointer;
}
.recommend .box .list img {
width: 100%;
height: 100px;
display: block;
margin: 0 auto;
object-fit: cover;
max-width: 100%;
}
.recommend .box .list .name {
padding-top: 5px;
color: red;
font-size: 14px;
text-align: center;
box-sizing: border-box;
}
.recommend .box .list .list-item3 {
flex: 0 0 33.33%;
}
.recommend .box .list .list-item5 {
flex: 0 0 20%;
}
/* 商品推荐-样式4-开始 */
.recommend .list-4{
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.recommend .list-4 .list-4-body {
display: flex;
flex-direction: column;
}
.recommend .list-4 .list-4-item {
position: relative;
z-index: 1;
}
.recommend .list-4 .list-4-item.item-1 {
width: 400px;
height: 400px;
margin-right: 20px;
}
.recommend .list-4 .list-4-item.item-2 {
width: 220px;
height: 190px;
margin-right: 20px;
margin-bottom: 20px;
}
.recommend .list-4 .list-4-item.item-3 {
width: 220px;
height: 190px;
margin-right: 20px;
margin-bottom: 0;
}
.recommend .list-4 .list-4-item.item-4 {
width: 190px;
height: 190px;
margin-right: 0;
margin-bottom: 20px;
}
.recommend .list-4 .list-4-item.item-5 {
width: 190px;
height: 190px;
margin-right: 0;
margin-bottom: 0;
}
.recommend .list-4 .list-4-item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.recommend .list-4 .list-4-item .list-4-item-center {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: auto;
display: flex;
flex-wrap: wrap;
background-color: rgba(0,0,0,.3);
}
.recommend .list-4 .list-4-item .list-4-item-center .list-4-item-title {
width: 50%;
text-align: left;
line-height: 44px;
color: #fff;
font-size: 14px;
padding: 0 6px;
}
.recommend .list-4 .list-4-item .list-4-item-center .list-4-item-price {
width: 50%;
text-align: right;
line-height: 44px;
color: #fff;
font-size: 14px;
padding: 0 6px;
}
/* 商品推荐-样式4-结束 */
/* 商品推荐-样式5-开始 */
.recommend #recommend-five-swiper.swiper-container-horizontal>.swiper-pagination-bullets {
line-height: 1;
}
.recommend #recommend-five-swiper .swiper-slide.swiper-slide-prev {
z-index: 5;
}
.recommend #recommend-five-swiper .swiper-slide.swiper-slide-next {
z-index: 5;
}
.recommend #recommend-five-swiper .swiper-slide.swiper-slide-active {
z-index: 9;
}
.recommend #lists-five-swiper.swiper-container-horizontal>.swiper-pagination-bullets {
line-height: 1;
}
.recommend #lists-five-swiper .swiper-slide.swiper-slide-prev {
z-index: 5;
}
.recommend #lists-five-swiper .swiper-slide.swiper-slide-next {
z-index: 5;
}
.recommend #lists-five-swiper .swiper-slide.swiper-slide-active {
z-index: 9;
}
/* 商品推荐-样式5-结束 */
.news {
padding: 10px 0;
display: flex;
justify-content: center;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
width: 100%;
}
.news .box {
width: 1014px;
}
.news .box .title {
padding: 10px 5px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.news .box .title span {
padding: 0 10px;
line-height: 1.4;
}
.news .box .list {
display: flex;
flex-wrap: wrap;
}
.index-pv2 .box .list .list-item {
flex: 0 0 50%;
padding: 0 10px;
box-sizing: border-box;
}
.news .box .list .list-item .list-item-body {
border: 1px solid rgba(0, 0, 0, 3);
padding: 10px;
box-sizing: border-box;
display: flex;
cursor: pointer;
}
.news .box .list .list-item .list-item-body img {
width: 120px;
height: 100%;
display: block;
margin: 0 auto;
object-fit: cover;
max-width: 100%;
}
.news .box .list .list-item .list-item-body .item-info {
flex: 1;
display: flex;
justify-content: space-between;
flex-direction: column;
padding-left: 10px;
box-sizing: border-box;
}
.news .box .list .list-item .list-item-body .item-info .name {
padding-top: 5px;
color: red;
font-size: 14px;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.news .box .list .list-item .list-item-body .item-info .time {
padding-top: 5px;
color: red;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.news .box .list .list-item1 {
flex: 0 0 100%;
}
.news .box .list .list-item3 {
flex: 0 0 33.33%;
}
.lists {
padding: 10px 0;
display: flex;
justify-content: center;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
.lists .box {
width: 1014px;
overflow: hidden;
}
.lists .box .title {
padding: 10px 5px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.lists .box .title span {
padding: 0 10px;
line-height: 1.4;
}
.lists .box .swiper-slide {
box-sizing: border-box;
cursor: pointer;
}
.lists .box .swiper-slide .img-box {
width: 100%;
overflow: hidden;
}
.lists .box .swiper-slide .img-box img {
width: 100%;
height: 100%;
object-fit: cover;
max-width: 100%;
}
.index-pv3 .box .list .list-item {
flex: 0 0 25%;
padding: 0 10px;
box-sizing: border-box;
}
.index-pv1 .animation-box:hover {
transform: perspective(1000px) translate3d(0px, 0px, 0px) scale(1.06) rotate(0deg) skew(0deg, 0deg);
transition: all 0.3s;
z-index: 2;
position: relative;
}
.index-pv2 .animation-box:hover {
transform: perspective(1000px) translate3d(0px, 0px, 0px) scale(1) rotate(0deg) skew(0deg, 0deg);
transition: all 0.3s;
z-index: 2;
position: relative;
}
.index-pv3 .animation-box:hover {
transform: perspective(1000px) translate3d(0px, 0px, 0px) scale(0.6) rotate(0deg) skew(0deg, 0deg);
transition: all 0.3s;
z-index: 2;
position: relative;
}
#new-list-6 .swiper-wrapper {
-webkit-transition-timing-function: linear;
-moz-transition-timing-function: linear;
-ms-transition-timing-function: linear;
-o-transition-timing-function: linear;
transition-timing-function: linear;
}
</style>
<body>
<div id="app">
<div class="banner">
<div class="layui-carousel" id="test1" :style='{"boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"0px","borderWidth":"0","width":"100%","borderStyle":"solid"}'>
<div carousel-item>
<div v-for="(item,index) in swiperList" :key="index">
<img style="width: 100%;height: 100%;object-fit:cover;" :src="item.img" />
</div>
</div>
</div>
<!-- <div class="bd">
<ul>
<li v-for="(item,index) in swiperList" v-bind:key="index"><img style="width: 1920px;height: 492px;" :src="item.img" /></li>
</ul>
<div class="hd">
<ul>
<li v-for="(item,index) in swiperList" v-bind:key="index"></li>
</ul>
</div>
</div> -->
</div>
<div id="content">
<!-- 商品推荐 -->
<!-- 公告信息 -->
<!-- 样式二 -->
<div class="news index-pv2" style="display: flex;justify-content: center;width:100%" :style='{"padding":"10px 0 10px 0","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0px 0 0 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(238, 238, 238, 1)","borderRadius":"0","borderWidth":"0","borderStyle":"solid"}'>
<div class="box" style='width:90%'>
<div class="title" :style='{"padding":"10px 0 10px 20px","boxShadow":"15px 15px 0px rgba(69,69,69, 1)","margin":"10px 0 40px 0","borderColor":"rgba(255, 120, 0, 1)","backgroundColor":"rgba(127, 78, 22, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"0px","alignItems":"flex-start","borderWidth":"0 0 2px 15px","fontSize":"18px","borderStyle":"solid"}'>
<span>HOME NEWS</span><span>公告信息</span>
</div>
<div class="list">
<div v-for="(item,index) in newsList" :key="index" class="list-item" @click="jump('../news/detail.html?id='+item.id)" :class="2=='1'?'list-item1':2=='3'?'list-item3':''">
<div class="list-item-body animation-box" :style='{"padding":"20px","boxShadow":"5px 5px 0px rgba(127, 78, 22, 1)","margin":"0 0 20px 0","borderColor":"rgba(200, 200, 200, 1)","backgroundColor":"#fff","borderRadius":"6px","borderWidth":"1px","borderStyle":"solid"}'>
<img :style='{"boxShadow":"0 0 0px rgba(255,0,0,.8)","borderColor":"rgba(0,0,0,.3)","borderRadius":"130px","borderWidth":"0","width":"130px","borderStyle":"solid","height":"130px"}' :src="item.picture" alt="" />
<div class="item-info">
<div v-if='true' :style='{"isshow":true,"padding":"0","margin":"5px 0","backgroundColor":"rgba(0,0,0,0)","color":"rgba(127, 78, 22, 1)","borderRadius":"0","textAlign":"left","fontSize":"16px"}' class="name">{{item.title}}</div>
<div :style='{"padding":"0","margin":"0","backgroundColor":"rgba(0,0,0,0)","color":"#999","borderRadius":"0","textAlign":"right","fontSize":"12px"}' class="time">{{item.addtime}}</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div style="text-align: center;">
<button @click="jump('../news/list.html')" style="display: block;cursor: pointer;" type="button" :style='{"padding":"0 15px","boxShadow":"0 0 0px rgba(255,0,0,0)","margin":"4px auto","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"6px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"34px"}'>查看更多<i v-if="true" :style='{"isshow":true,"padding":"0 0 0 1px","fontSize":"14px","color":"rgba(255, 255, 255, 1)"}' class="layui-icon layui-icon-next"></i></el-button>
</div>
</div>
</div>
<!-- 特价商品展示 -->
<!-- 样式一 -->
<div class="recommend index-pv3" :style='{"padding":"10px 0 10px 0","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0px 0 0 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(69, 69, 69, 1)","borderRadius":"0","borderWidth":"0","borderStyle":"solid"}'>
<div class="box" style='width:90%'>
<div class="title" :style='{"isshow":true,"padding":"10px 0 3px 0","boxShadow":"10px 10px 0px rgba(69,69,69, 1) ","margin":"10px 0 10px 0","borderColor":"rgba(255, 255, 255, 1)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(250, 212, 0, 1)","borderRadius":"0px","alignItems":"center","borderWidth":"0 0 5px 0","fontSize":"20px","borderStyle":"solid"}'>
<span>DATA SHOW</span><span>房屋信息展示</span>
</div>
<div class="list">
<div v-for="(item,index) in fangwuxinxiList" :key="index" @click="jump('../fangwuxinxi/detail.html?id='+item.id)" class="list-item" :class="4=='3'?'list-item3':4=='5'?'list-item5':''">
<div class="list-item-body animation-box" :style='{"padding":"0px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"20px 0 0px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(69, 69, 69, 1)","borderRadius":"4px","borderWidth":"0","borderStyle":"solid"}'>
<img :style='{"boxShadow":"0 0 0px rgba(255,0,0,.8)","borderColor":"rgba(0,0,0,.3)","borderRadius":"0","borderWidth":"0","width":"100%","borderStyle":"solid","height":"260px"}' :src="item.tupian?item.tupian.split(',')[0]:''" alt="" />
<div v-if='true' :style='{"isshow":true,"padding":"20px","margin":"5px 0","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"0 0 6px 6px","textAlign":"center","fontSize":"16px"}' class="name">{{item.fangwumingcheng}}</div>
</div>
</div>
</div>
<div class="clear"></div>
<div style="text-align: center;">
<button @click="jump('../fangwuxinxi/list.html')" style="display: block;cursor: pointer;" type="button" :style='{"padding":"0 15px","boxShadow":"0 0 0px rgba(255,0,0,0)","margin":"4px auto","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"6px","borderWidth":"0","width":"auto","fontSize":"14px","borderStyle":"solid","height":"34px"}'>查看更多<i v-if="true" :style='{"isshow":true,"padding":"0 0 0 1px","fontSize":"14px","color":"rgba(255, 255, 255, 1)"}' class="layui-icon layui-icon-next"></i></el-button>
</div>
</div>
</div>
</div>
</div>
<script src="../../layui/layui.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/Swiper/5.4.5/js/swiper.min.js"></script>
<script src="../../js/vue.js"></script>
<script src="../../js/config.js"></script>
<script src="../../modules/config.js"></script>
<script src="../../js/utils.js"></script>
<script type="text/javascript">
var vue = new Vue({
el: '#app',
data: {
fangwuxinxiList: [],
swiperList: [],
// 公告信息
newsList: [],
leftNewsList: [],
rightNewsList: []
},
filters: {
newsDesc: function(val) {
if (val) {
val = val.replace(/<[^<>]+>/g, '').replace(/undefined/g, '');
if (val.length > 60) {
val = val.substring(0, 60);
}
return val;
}
return '';
}
},
methods: {
jump(url) {
jump(url)
},
}
});
layui.use(['layer', 'form', 'element', 'carousel', 'http', 'jquery'], function() {
var layer = layui.layer;
var element = layui.element;
var form = layui.form;
var carousel = layui.carousel;
var http = layui.http;
var jquery = layui.jquery;
// 获取轮播图 数据
http.request('config/list', 'get', {
page: 1,
limit: 5
}, function(res) {
if (res.data.list.length > 0) {
let swiperList = [];
res.data.list.forEach(element => {
if (element.value != null) {
swiperList.push({
img: element.value
});
}
});
vue.swiperList = swiperList;
vue.$nextTick(() => {
carousel.render({
elem: '#test1',
width: '100%',
height: '500px',
arrow: 'hover',
anim: 'fade',
autoplay: 'true',
interval: '3000',
indicator: 'inside'
});
})
// vue.$nextTick(()=>{
// window.xznSlide();
// });
}
});
// 公告信息
http.request('news/list', 'get', {
page: 1,
limit: 2 * 2,
order: 'desc'
}, function(res) {
var newsList = res.data.list;
for(var i = 0; i<newsList.length; i++) {
let d = newsList[i].addtime.split(' ')
d = d[0].split('-')
newsList[i].year = d[0]
newsList[i].month = d[1] + '-' + d[2]
}
vue.newsList = newsList;
if (newsList.length > 0 && newsList.length <= 2) {
vue.leftNewsList = res.data.list
} else {
var leftNewsList = []
for (let i = 0; i <= 2; i++) {
leftNewsList.push(newsList[i]);
}
vue.leftNewsList = leftNewsList
}
if (newsList.length > 2 && newsList.length <= 8) {
var rightNewsList = []
for (let i = 3; i <= newsList.length; i++) {
rightNewsList.push(newsList[i]);
}
vue.rightNewsList = rightNewsList
}
let flag = 2;
let options = {"navigation":{"nextEl":".swiper-button-next","prevEl":".swiper-button-prev"},"slidesPerView":5,"loop":true,"spaceBetween":20,"autoplay":{"delay":3000,"disableOnInteraction":false}}
options.pagination = {el:'null'}
if(flag == 3) {
vue.$nextTick(() => {
new Swiper ('#newsnews', options)
})
}
if(flag == 6) {
let sixSwiper = {
loop: true,
speed: $template2.front.index.news.six.speed,
slidesPerView: 3,
spaceBetween: $template2.front.index.news.six.spaceBetween,
centeredSlides: true,
watchSlidesProgress: true,
autoplay: {
delay: 0,
stopOnLastSlide: false,
disableOnInteraction: false
}
}
vue.$nextTick(() => {
new Swiper('#new-list-6', sixSwiper)
})
}
});
http.request(`fangwuxinxi/list`, 'get', {
page: 1,
limit: 4 * 2
}, function(res) {
vue.fangwuxinxiList = res.data.list;
let flag = 1;
let options = {"navigation":{"nextEl":".swiper-button-next","prevEl":".swiper-button-prev"},"slidesPerView":5,"loop":true,"spaceBetween":20,"autoplay":{"delay":3000,"disableOnInteraction":false}}
options.pagination = {el:'null'}
if(flag == 3) {
vue.$nextTick(() => {
new Swiper ('#listsfangwuxinxi', options)
})
}
// 商品列表样式五
if(flag == 5) {
vue.$nextTick(() => {
var swiper = new Swiper('#lists-five-swiper', {
loop: $template2.front.index.lists.five.swiper.loop,
speed: $template2.front.index.lists.five.swiper.speed,
slidesPerView: $template2.front.index.lists.five.swiper.slidesPerView,
spaceBetween: $template2.front.index.lists.five.swiper.spaceBetween,
autoplay: $template2.front.index.lists.five.swiper.autoplay,
centeredSlides: true,
watchSlidesProgress: true,
on: {
setTranslate: function() {
slides = this.slides
for (i = 0; i < slides.length; i++) {
slide = slides.eq(i)
progress = slides[i].progress
// slide.html(progress.toFixed(2)); //看清楚progress是怎么变化的
slide.css({
'opacity': '',
'background': ''
});
slide.transform(''); //清除样式
slide.transform('scale(' + (1.5 - Math.abs(progress) / 4) + ')');
}
},
setTransition: function(transition) {
for (var i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i)
slide.transition(transition);
}
},
},
navigation: $template2.front.index.lists.five.swiper.navigation,
pagination: $template2.front.index.lists.five.swiper.pagination,
});
})
}
// vue.$nextTick(()=>{
// window.xznSlide();
// });
});
});
window.xznSlide = function() {
// jQuery(".banner").slide({mainCell:".bd ul",autoPlay:true,interTime:5000});
jQuery("#ifocus").slide({ titCell:"#ifocus_btn li", mainCell:"#ifocus_piclist ul",effect:"leftLoop", delayTime:200, autoPlay:true,triggerTime:0});
jQuery("#ifocus").slide({ titCell:"#ifocus_btn li", mainCell:"#ifocus_tx ul",delayTime:0, autoPlay:true});
jQuery(".product_list").slide({mainCell:".bd ul",autoPage:true,effect:"leftLoop",autoPlay:true,vis:5,trigger:"click",interTime:4000});
};
</script>
<script src="../../xznstatic/js/index.js"></script>
</body>
</html>

@ -0,0 +1,174 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>登录</title>
<link rel="stylesheet" type="text/css" href="../../layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="../../xznstatic/css/public.css"/>
<link rel="stylesheet" type="text/css" href="../../xznstatic/css/login.css"/>
<style type="text/css">
.login {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-attachment: fixed;
background-size: cover;
background-position: center;
background-image: url(http://codegen.caihongy.cn/20201217/64952e54e9d34af6a43336e49925ebe0.jpg);
}
.login form {
box-sizing: border-box;
min-height: 400px;
display: flex;
flex-direction: column;
justify-content: center !important;
position: inherit;
}
.login .logo, .login .title {
box-sizing: border-box;
}
.login .logo img {
display: block;
}
.login .title {
text-align: center;
}
.login .form-item {
display: flex;
align-items: center;
flex-wrap: wrap;
box-sizing: border-box;
}
.login .form-item input, .login .form-label {
box-sizing: border-box;
}
.login .btn-submit {
display: block;
box-sizing: border-box;
}
.login form p.txt {
width: 100%;
margin: 0;
box-sizing: border-box;
}
.l-redio .layui-form-radio {
margin: 0;
}
.l-redio .layui-form-radio>i {
font-size: 16px;
color: rgba(162, 155, 155, 1);
}
.l-redio .layui-form-radio>div {
font-size: 14px;
color: rgba(154, 137, 137, 1);
}
.l-redio .layui-form-radioed>i {
font-size: 16px;
color: rgba(127, 78, 22, 1);
}
.l-redio .layui-form-radioed>div {
font-size: 14px;
color: rgba(127, 78, 22, 1);
}
</style>
</head>
<body>
<div id="app" class="login">
<form class="layui-form login-form" :style='{"padding":"20px","boxShadow":"10px 10px 6px rgba(127, 78, 22, 1)","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","borderRadius":"20px","borderWidth":"1px","width":"400px","borderStyle":"solid","justifyContent":"center","height":"auto"}'>
<h1 class="logo" v-if="false" :style='{"padding":"5px 0","boxShadow":"0 0 6px rgba(255,0,0,.8)","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","borderRadius":"6px","borderWidth":"0","borderStyle":"solid"}'><img :style='{"boxShadow":"0 0 6px rgba(255,0,0,.8)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"100%","borderWidth":"1px","width":"44px","borderStyle":"solid","height":"44px"}' src="http://codegen.caihongy.cn/20201024/ed5e326ca66f403aa3197b5fbb4ec733.jpg"></h1>
<div class="msg-warn hide title" v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"10px auto","borderColor":"rgba(0,0,0,1)","backgroundColor":"#f7f7f7","color":"rgba(127, 78, 22, 1)","isshow":true,"borderRadius":"8px","borderWidth":"0","width":"auto","lineHeight":"32px","fontSize":"12px","borderStyle":"solid"}'>公共场所不建议自动登录,以防账号丢失</div>
<div :style='{"padding":"0","boxShadow":"0px 0px 0px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,1)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item">
<label v-if="false" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"#333","borderRadius":"0","textAlign":"right","borderWidth":"0","width":"84px","fontSize":"16px","borderStyle":"solid"}' class="form-label">账号</label>
<input :style='{"padding":"0 10px","boxShadow":"0 10px 6px rgba(127, 78, 22, 1)","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","color":"rgba(17, 17, 17, 1)","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"100%","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="text" name="username" required lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
</div>
<div :style='{"padding":"0","boxShadow":"0px 0px 0px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,1)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item">
<label v-if="false" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"#333","borderRadius":"0","textAlign":"right","borderWidth":"0","width":"84px","fontSize":"16px","borderStyle":"solid"}' class="form-label">密码</label>
<input :style='{"padding":"0 10px","boxShadow":"0 10px 6px rgba(127, 78, 22, 1)","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","color":"rgba(17, 17, 17, 1)","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"100%","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
</div>
<div :style='{"padding":"0","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"0 auto","borderColor":"rgba(0,0,0,1)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 1px 0","width":"80%","borderStyle":"solid","height":"44px"}' class="form-item l-redio">
<input v-if="item.hasFrontLogin=='是'" v-for="(item,index) in menu" v-bind:key="index" type="radio" name="role" id="role" :value="item.tableName" :title="item.roleName">
</div>
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"10px auto","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"8px","borderWidth":"0","width":"60%","fontSize":"14px","borderStyle":"solid","height":"44px"}' class="layui-btn layui-btn-fluid layui-btn-danger btn-submit" lay-submit lay-filter="login">登录</button>
<p :style='{"color":"rgba(208, 2, 2, 1)","textAlign":"center","fontSize":"12px"}' class="txt"><a style="color: inherit;font-size: inherit;" v-if="item.hasFrontRegister=='是'" v-for="(item,index) in menu" v-bind:key="index" :href="'javascript:registerClick(\''+item.tableName+'\')'">注册{{item.roleName.replace('注册','')}}</a></p>
</form>
</div>
<script src="../../layui/layui.js"></script>
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>
<script type="text/javascript">
var vue = new Vue({
el: '#app',
data: {
menu: menu
},
methods: {
jump(url) {
jump(url)
}
}
})
layui.use(['layer', 'element', 'carousel', 'form', 'http', 'jquery'], function() {
var layer = layui.layer;
var element = layui.element;
var carousel = layui.carousel;
var form = layui.form;
var http = layui.http;
var jquery = layui.jquery;
// 登录
form.on('submit(login)', function(data) {
data = data.field;
if (!data.role) {
layer.msg('请选择登录用户类型', {
time: 2000,
icon: 5
});
return false;
}
http.request(data.role + '/login', 'get', data, function(res) {
layer.msg('登录成功', {
time: 2000,
icon: 6
});
// 登录凭证
localStorage.setItem('Token', res.token);
localStorage.setItem('role', jquery('#role:checked').attr('title'));
// 当前登录用户角色
localStorage.setItem('userTable', data.role);
localStorage.setItem('sessionTable', data.role);
// 用户名称
localStorage.setItem('adminName', data.username);
http.request(data.role + '/session', 'get', {}, function(res) {
// 用户id
localStorage.setItem('userid', res.data.id);
// 路径访问设置
window.location.href = '../../index.html';
})
});
return false
});
});
/**
* 跳转登录
* @param {Object} tablename
*/
function registerClick(tablename) {
window.location.href = '../' + tablename + '/register.html?tablename=' + tablename;
}
</script>
</body>
</html>

@ -0,0 +1,271 @@
<!-- 在线留言 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>在线留言</title>
<link rel="stylesheet" href="../../layui/css/layui.css">
<!-- 样式 -->
<link rel="stylesheet" href="../../css/style.css" />
<!-- 主题(主要颜色设置) -->
<link rel="stylesheet" href="../../css/theme.css" />
<!-- 通用的css -->
<link rel="stylesheet" href="../../css/common.css" />
</head>
<style>
#swiper {
overflow: hidden;
}
#swiper .layui-carousel-ind li {
width: 16px;
height: 2px;
border-width: 1px;
border-style: solid;
border-color: rgba(0,0,0,.3);
border-radius: 3px;
background-color: #f7f7f7;
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
#swiper .layui-carousel-ind li.layui-this {
width: 60px;
height: 1px;
border-width: 1px;
border-style: solid;
border-color: rgba(127, 78, 22, 1);
border-radius: 0;
background-color: rgba(127, 78, 22, 1);
box-shadow: 0 0 6px rgba(255,0,0,.8);
}
.index-title {
text-align: center;
box-sizing: border-box;
width: 980px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.layui-laypage .layui-laypage-count {
padding: 0 10px;
}
.layui-laypage .layui-laypage-skip {
padding-left: 10px;
}
</style>
<body>
<div id="app">
<!-- 轮播图 -->
<!-- <div class="layui-carousel" id="swiper">
<div carousel-item id="swiper-item">
<div v-for="(item,index) in swiperList" v-bind:key="index">
<img class="swiper-item" :src="item.img">
</div>
</div>
</div> -->
<div class="layui-carousel" id="swiper" :style='{"boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"0px","borderWidth":"0","width":"100%","borderStyle":"solid"}'>
<div carousel-item id="swiper-item">
<div v-for="(item,index) in swiperList" :key="index">
<img style="width: 100%;height: 100%;object-fit:cover;" :src="item.img" />
</div>
</div>
</div>
<!-- 轮播图 -->
<!-- 标题 -->
<!-- <h2 class="index-title">MESSAGES / ADVICE</h2>
<div class="line-container">
<p class="line"> 留言反馈 </p>
</div> -->
<div class="index-title" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"10px auto","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(127, 78, 22, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","fontSize":"20px","borderStyle":"solid","height":"auto"}'>
<span>MESSAGES / ADVICE</span><span>留言反馈</span>
</div>
<!-- 标题 -->
<div class="message-container" style="padding: 20px 0;">
<form class="layui-form message-form" :style='{"padding":"20px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 0 20px 0","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"1px","borderStyle":"solid"}'>
<div class="layui-form-item layui-form-text" style="display: flex;align-items: center;margin:0">
<label class="layui-form-label" style="width: auto;" :style='{"padding":"0","minWidth":"54px","fontSize":"14px","color":"#333","textAlign":"center"}'>留言</label>
<div class="layui-input-block" style="margin:0;flex:1;">
<textarea :style='{"padding":"10px","boxShadow":"0px 0px 0px #7F4E16","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","borderWidth":"1px","fontSize":"14px","borderStyle":"solid","height":"120px"}' name="content" required lay-verify="required" placeholder="请输入内容" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.3)","margin":"10px 5px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' class="layui-btn btn-submit" lay-submit lay-filter="*">立即提交</button>
<button :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,.3)","margin":"10px 5px 0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<div class="message-list" v-if="dataList.length" :style='{"padding":"0 20px 20px","boxShadow":"0 0 0px #7F4E16","margin":"0","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0","borderStyle":"solid"}'>
<div :style='{"padding":"20px 0","boxShadow":"0 0 0px rgba(255,0,0,0)","margin":"0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"solid"}' class="message-item" v-for="(item,index) in dataList" v-bind:key="index" >
<div class="username-container" style="display: flex;align-items: center;">
<img :style='{"boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,.3)","borderRadius":"0%","borderWidth":"0","width":"40px","borderStyle":"solid","height":"40px"}' class="avator" src="../../img/avator.png">
<span style="display: inline-block;" :style='{"padding":"0 10px","boxShadow":"0 0 0px #7F4E16","margin":"0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"#333","borderRadius":"4px","borderWidth":"1px","width":"auto","lineHeight":"28px","fontSize":"14px","borderStyle":"solid"}' class="username">用户:{{item.username}}</span>
</div>
<div class="content" class="content" style="margin: 0;flex: 1;">
<span style="display: inline-block;" :style='{"padding":"8px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"8px 0 0 50px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(188, 152, 152, 0.3)","color":"rgba(0, 0, 0, 1)","borderRadius":"4px","borderWidth":"0","fontSize":"14px","borderStyle":"solid"}' class="message">
{{item.content}}
</span>
</div>
<div v-if="item.reply" class="replay" style="margin: 0;flex: 1;background: transparent;padding: 0;">
<span style="display: inline-block;" :style='{"padding":"8px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"8px 0 0 50px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(188, 152, 152, 0.3)","color":"rgba(0, 0, 0, 1)","borderRadius":"4px","borderWidth":"0","fontSize":"14px","borderStyle":"solid"}' class="label">回复:{{item.reply}}</span>
<!-- <span class="message">
{{item.reply}}
</span> -->
</div>
</div>
</div>
<div class="pager" id="pager" :style="{textAlign:1==1?'left':1==2?'center':'right'}"></div>
</div>
</div>
<!-- layui -->
<script src="../../layui/layui.js"></script>
<!-- vue -->
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>
<script>
var vue = new Vue({
el: '#app',
data: {
// 轮播图
swiperList: [{
img: '../../img/banner.jpg'
}],
dataList: []
},
filters: {
newsDesc: function(val) {
if (val) {
if (val.length > 200) {
return val.substring(0, 200).replace(/<[^>]*>/g).replace(/undefined/g, '');
} else {
return val.replace(/<[^>]*>/g).replace(/undefined/g, '');
}
}
return '';
}
},
methods: {
jump(url) {
jump(url)
}
}
})
layui.use(['layer', 'element', 'carousel', 'laypage', 'http', 'jquery', 'form'], function() {
var layer = layui.layer;
var element = layui.element;
var carousel = layui.carousel;
var laypage = layui.laypage;
var http = layui.http;
var form = layui.form;
var jquery = layui.jquery;
var limit = 5;
// 获取轮播图 数据
http.request('config/list', 'get', {
page: 1,
limit: 5
}, function(res) {
if (res.data.list.length > 0) {
var swiperItemHtml = '';
for (let item of res.data.list) {
if (item.name.indexOf('picture') >= 0 && item.value && item.value != "" && item.value != null) {
swiperItemHtml +=
'<div>' +
'<img class="swiper-item" style="width: 100%;height: 100%;object-fit:cover;" src="' + item.value + '">' +
'</div>';
}
}
jquery('#swiper-item').html(swiperItemHtml);
// 轮播图
// carousel.render({
// elem: '#swiper',
// width: swiper.width,height:swiper.height,
// arrow: swiper.arrow,
// anim: swiper.anim,
// interval: swiper.interval,
// indicator: swiper.indicator
// });
vue.$nextTick(() => {
carousel.render({
elem: '#swiper',
width: '100%',
height: '500px',
arrow: 'hover',
anim: 'fade',
autoplay: 'true',
interval: '3000',
indicator: 'inside'
});
})
}
});
// 获取列表数据
init();
function init() {
// 获取列表数据
http.request('messages/list', 'get', {
page: 1,
limit: limit
}, function(res) {
vue.dataList = res.data.list
// 分页
laypage.render({
elem: 'pager',
count: res.data.total,
limit: limit,
groups: 9,
layout: ["prev","page","next"],
theme: '#7F4E16',
jump: function(obj, first) {
//首次不执行
if (!first) {
http.request('messages/list', 'get', {
page: obj.curr,
limit: obj.limit
}, function(res) {
vue.dataList = res.data.list
})
}
}
});
})
}
// 提交数据
form.on('submit(*)', function(data) {
data = data.field;
data.userid = localStorage.getItem('userid')
data.username = localStorage.getItem('adminName')
http.requestJson('messages/add', 'post', data, function(res) {
layer.msg('留言成功', {
time: 2000,
icon: 6
}, function() {
window.location.reload();
});
return false
});
return false
});
});
</script>
</body>
</html>
Loading…
Cancel
Save