parent
ecd3b3f05c
commit
7274d882e6
@ -0,0 +1,368 @@
|
||||
|
||||
<!-- 首页 -->
|
||||
<!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.fangwuleixing}}
|
||||
</span>
|
||||
</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: 'fangwuleixing',
|
||||
// 评价列表
|
||||
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',`fangwuleixing`);
|
||||
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,426 @@
|
||||
<!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="fangwuleixing" id="fangwuleixing" 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('fangwuleixing','新增')" @click="jump('../fangwuleixing/add.html')" type="button" class="layui-btn btn-theme">
|
||||
<i v-if="true" class="layui-icon"></i>添加
|
||||
</button>
|
||||
</form>
|
||||
<!-- 样式一 -->
|
||||
<div class="list" style="position: relative;">
|
||||
<div @click="jump('../fangwuleixing/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('#fangwuleixing').val()) {
|
||||
param['fangwuleixing'] = jquery('#fangwuleixing').val() ? '%' + jquery('#fangwuleixing').val() + '%' : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取列表数据
|
||||
http.request('fangwuleixing/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('fangwuleixing/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,422 @@
|
||||
|
||||
<!-- 首页 -->
|
||||
<!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.pingfen}}
|
||||
</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.pingjianeirong}}
|
||||
</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.pingjiariqi}}
|
||||
</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.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>
|
||||
</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: 'fangwupingjia',
|
||||
// 评价列表
|
||||
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',`fangwupingjia`);
|
||||
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,448 @@
|
||||
<!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="pingfen" id="pingfen" 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="fangzhuzhanghao" id="fangzhuzhanghao" 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('fangwupingjia','新增')" @click="jump('../fangwupingjia/add.html')" type="button" class="layui-btn btn-theme">
|
||||
<i v-if="true" class="layui-icon"></i>添加
|
||||
</button>
|
||||
</form>
|
||||
<!-- 样式一 -->
|
||||
<div class="list" style="position: relative;">
|
||||
<div @click="jump('../fangwupingjia/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('#pingfen').val()) {
|
||||
param['pingfen'] = jquery('#pingfen').val() ? '%' + jquery('#pingfen').val() + '%' : '';
|
||||
}
|
||||
if (jquery('#fangzhuzhanghao').val()) {
|
||||
param['fangzhuzhanghao'] = jquery('#fangzhuzhanghao').val() ? '%' + jquery('#fangzhuzhanghao').val() + '%' : '';
|
||||
}
|
||||
if (jquery('#yonghuming').val()) {
|
||||
param['yonghuming'] = jquery('#yonghuming').val() ? '%' + jquery('#yonghuming').val() + '%' : '';
|
||||
}
|
||||
|
||||
param['sfsh'] = '是';
|
||||
|
||||
|
||||
// 获取列表数据
|
||||
http.request('fangwupingjia/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('fangwupingjia/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,556 @@
|
||||
|
||||
<!-- 首页 -->
|
||||
<!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>
|
||||
|
||||
<a :style='{"padding":"0 12px","boxShadow":"6px 10px 6px rgba(255,0,0,.3)","borderColor":"rgba(255,0,0,.3)","backgroundColor":"#fff","color":"red","borderRadius":"4px","borderWidth":"0","fontSize":"16px","lineHeight":"34px","borderStyle":"solid"}' @click="storeUp()" href="javascript:void(0)">
|
||||
<i class="layui-icon" style="font-size: 20px;color: red;" v-if='true' :style='{"color":"red","padding":"0 2px 0 0","fontSize":"18px"}'></i>点我收藏
|
||||
</a>
|
||||
|
||||
</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.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.zulinfangshi}}
|
||||
</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.chaoxianglouceng}}
|
||||
</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.mianji}}
|
||||
</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.fangwuzhuangtai}}
|
||||
</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.xiangxidizhi}}
|
||||
</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.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.fangwusheshi}}
|
||||
</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.faburiqi}}
|
||||
</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 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('fangwuxinxi','预约')" @click="onAcrossTap('yuyuekanfang')" 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"}'>
|
||||
|
||||
<li class="layui-this">房屋详情</li>
|
||||
|
||||
|
||||
|
||||
<li>评论</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-content">
|
||||
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div v-html="detail.fangwuxiangqing"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="message-container">
|
||||
<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 style="width: auto;" :style='{"padding":"0","minWidth":"54px","fontSize":"14px","color":"#333","textAlign":"center"}' class="layui-form-label">评论</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" :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">
|
||||
<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="http://codegen.caihongy.cn/20210116/52b808ba5ce64e77b071ee80829c3082.jpg">
|
||||
<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.userid}}</span>
|
||||
</div>
|
||||
<div 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="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.reply}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pager" id="pager"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</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: 'fangwuxinxi',
|
||||
// 评价列表
|
||||
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',`fangwuxinxi`);
|
||||
localStorage.setItem('crossObj', JSON.stringify(this.detail));
|
||||
jump(`../${acrossTable}/add.html?corss=true`);
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 收藏商品
|
||||
storeUp() {
|
||||
layui.http.requestJson('storeup/save', 'post', {
|
||||
userid: localStorage.getItem('userid'),
|
||||
name: this.title,
|
||||
picture: this.swiperList[0],
|
||||
refid: this.detail.id,
|
||||
tablename: this.detailTable
|
||||
}, function(res) {
|
||||
layer.msg(`收藏成功`, {
|
||||
time: 2000,
|
||||
icon: 6
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
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
|
||||
vue.title = vue.detail.fangwumingcheng;
|
||||
// 轮播图片
|
||||
vue.swiperList = vue.detail.tupian ? vue.detail.tupian.split(",") : [];
|
||||
// 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
|
||||
// });
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 获取评论
|
||||
http.request(`discuss${vue.detailTable}/list`, 'get', {
|
||||
page: 1,
|
||||
limit: limit,
|
||||
refid : vue.detail.id
|
||||
}, function(res) {
|
||||
vue.dataList = res.data.list
|
||||
// 分页
|
||||
laypage.render({
|
||||
elem: 'pager',
|
||||
count: res.data.total,
|
||||
limit: limit,
|
||||
jump: function(obj, first) {
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
http.request(`discuss${vue.detailTable}/list`, 'get', {
|
||||
page: obj.curr,
|
||||
limit: obj.limit,
|
||||
refid : vue.detail.id
|
||||
}, function(res) {
|
||||
vue.dataList = res.data.list
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// 提交评论
|
||||
form.on('submit(*)', function(data) {
|
||||
data = data.field;
|
||||
data.userid = localStorage.getItem('userid')
|
||||
data.refid = vue.detail.id
|
||||
http.requestJson(`discuss${vue.detailTable}/save`, 'post', data, function(res) {
|
||||
layer.msg('评论成功', {
|
||||
time: 2000,
|
||||
icon: 6
|
||||
}, function() {
|
||||
window.location.reload();
|
||||
});
|
||||
return false
|
||||
});
|
||||
return false
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,486 @@
|
||||
<!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 :style='{"padding":"0","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"11px","borderColor":"rgba(0,0,0,1)","borderRadius":"0","borderWidth":"0","width":"100%","borderStyle":"solid","height":"auto"}'>
|
||||
<div style="display: inline-block;text-align: center;cursor: pointer;" class="category-search" :index="-1" :style='swiperIndex==-1?{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}:{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}'>全部</div>
|
||||
<div class="category-search" :index="index" :style='swiperIndex==index?{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}:{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' v-for="(item,index) in categoryList" :key="index" style="display: inline-block;text-align: center;cursor: pointer;">
|
||||
{{categoryList[index]}}
|
||||
</div>
|
||||
</div>
|
||||
<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="fangwuzhuangtai" id="fangwuzhuangtai" 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="xiaoqu" id="xiaoqu" 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('fangwuxinxi','新增')" @click="jump('../fangwuxinxi/add.html')" type="button" class="layui-btn btn-theme">
|
||||
<i v-if="true" class="layui-icon"></i>添加
|
||||
</button>
|
||||
</form>
|
||||
<!-- 样式一 -->
|
||||
<div class="list" style="position: relative;">
|
||||
<div v-if="2 == 1" style="position: absolute;left: 0;top: 0;transform: translate3d(-100%, 0, 0);" :style='{"padding":"0","boxShadow":"0 0 6px rgba(255,0,0,0)","margin":"11px","borderColor":"rgba(0,0,0,1)","borderRadius":"0","borderWidth":"0","width":"100%","borderStyle":"solid","height":"auto"}'>
|
||||
<div style="text-align: center;cursor: pointer;" class="category-search" :index="-1" :style='swiperIndex==-1?{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}:{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}'>全部</div>
|
||||
<div v-for="(item,index) in categoryList" :key="index" >
|
||||
<div style="text-align: center;cursor: pointer;" :style='swiperIndex==index?{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}:{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,1)","backgroundColor":"rgba(69, 69, 69, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"84px","lineHeight":"34px","fontSize":"14px","borderStyle":"solid"}' :index="index" class="category-search">{{categoryList[index]}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="jump('../fangwuxinxi/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"}'>
|
||||
<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":"300px"}' :src="item.tupian?item.tupian.split(',')[0]:''">
|
||||
<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 v-if="true" :style='{"isshow":true,"padding":"0","margin":"5px 0 0 0","backgroundColor":"rgba(0,0,0,0)","color":"rgba(69, 69, 69, 1)","borderRadius":"0","textAlign":"center","width":"100%","fontSize":"18px"}' class="name">{{item.fangwumingcheng}}</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: [],
|
||||
categoryList: [],
|
||||
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();
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//类型查询
|
||||
categoryList();
|
||||
//类型搜索
|
||||
$(document).on("click", ".category-search", function(e){
|
||||
vue.swiperIndex = $(this).attr('index')
|
||||
pageList(e.target.innerText);
|
||||
});
|
||||
|
||||
function categoryList() {
|
||||
// 获取列表数据
|
||||
http.request('option/fangwuleixing/fangwuleixing', 'get', {}, function(res) {
|
||||
vue.categoryList = res.data
|
||||
})
|
||||
|
||||
}
|
||||
var vCategory = '';
|
||||
// 分页列表
|
||||
pageList();
|
||||
|
||||
// 搜索按钮
|
||||
jquery('#btn-search').click(function(e) {
|
||||
pageList();
|
||||
});
|
||||
|
||||
function pageList(category) {
|
||||
var param = {
|
||||
page: 1,
|
||||
limit: limit
|
||||
}
|
||||
if(category!=null && category!='全部') {
|
||||
vCategory = category;
|
||||
if (jquery('#fangwumingcheng').val()) {
|
||||
param['fangwumingcheng'] = '';
|
||||
}
|
||||
if (jquery('#fangwuzhuangtai').val()) {
|
||||
param['fangwuzhuangtai'] = '';
|
||||
}
|
||||
if (jquery('#xiaoqu').val()) {
|
||||
param['xiaoqu'] = '';
|
||||
}
|
||||
}
|
||||
if(vCategory!='' && category!='全部') {
|
||||
param['fangwuleixing'] = category;
|
||||
}
|
||||
|
||||
|
||||
if (jquery('#fangwumingcheng').val()) {
|
||||
param['fangwumingcheng'] = jquery('#fangwumingcheng').val() ? '%' + jquery('#fangwumingcheng').val() + '%' : '';
|
||||
}
|
||||
if (jquery('#fangwuzhuangtai').val()) {
|
||||
param['fangwuzhuangtai'] = jquery('#fangwuzhuangtai').val() ? '%' + jquery('#fangwuzhuangtai').val() + '%' : '';
|
||||
}
|
||||
if (jquery('#xiaoqu').val()) {
|
||||
param['xiaoqu'] = jquery('#xiaoqu').val() ? '%' + jquery('#xiaoqu').val() + '%' : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取列表数据
|
||||
http.request('fangwuxinxi/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('fangwuxinxi/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,541 @@
|
||||
|
||||
<!-- 个人中心 -->
|
||||
<!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;
|
||||
z-index: -1;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
.index-title span {
|
||||
padding: 0 10px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.center-container .layui-nav-tree {
|
||||
width: 100%;
|
||||
}
|
||||
.center-container .layui-nav {
|
||||
position: inherit;
|
||||
}
|
||||
.center-container .layui-nav-tree .layui-nav-item {
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
font-size: 14px;
|
||||
color: rgba(127, 78, 22, 1);
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
border-color: rgba(127, 78, 22, 1);
|
||||
border-radius: 0;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 0 6px rgba(255,0,0,0);
|
||||
text-align: center;
|
||||
}
|
||||
.center-container .layui-nav-tree .layui-nav-bar {
|
||||
height: 44px !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.center-container .layui-nav-tree .layui-nav-item.layui-this {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
border-color: rgba(255,0,0,.3);
|
||||
border-radius: 0;
|
||||
background-color: rgba(127, 78, 22, 1);
|
||||
box-shadow: 0 0 6px rgba(255,0,0,0);
|
||||
}
|
||||
.center-container .layui-nav-tree .layui-nav-item:hover {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
border-color: rgba(255,0,0,.3);
|
||||
border-radius: 0;
|
||||
background-color: rgba(186, 107, 11, 1);
|
||||
box-shadow: 0 0 6px rgba(255,0,0,0);
|
||||
}
|
||||
.center-container .layui-nav-tree .layui-nav-item a {
|
||||
line-height: inherit;
|
||||
height: auto;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.right-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.right-container .layui-form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.right-container .layui-input-block {
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.right-container .input .layui-input {
|
||||
padding: 0 12px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
border-radius: 4px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #DCDFE6;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 0px rgba(255,0,0,.8);
|
||||
text-align: left;
|
||||
}
|
||||
.right-container .select .layui-input {
|
||||
padding: 0 12px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
border-radius: 4px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #DCDFE6;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 0px rgba(255,0,0,.8);
|
||||
text-align: left;
|
||||
}
|
||||
.right-container .date .layui-input {
|
||||
padding: 0 12px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
border-radius: 4px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #DCDFE6;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 0px rgba(255,0,0,.8);
|
||||
text-align: left;
|
||||
}
|
||||
</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>
|
||||
<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 style="margin-top: 20px;" class="index-title">USER / CENTER</h2>
|
||||
<div class="line-container">
|
||||
<p class="line" style="background: #EEEEEE;"> 个人中心 </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>USER / CENTER</span><span>个人中心</span>
|
||||
</div>
|
||||
<!-- 标题 -->
|
||||
|
||||
<div class="center-container">
|
||||
<!-- 个人中心菜单 config.js-->
|
||||
<div class="left-container" :style='{"padding":"0","boxShadow":"0px 0px 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 2px 2px","width":"160px","borderStyle":"solid"}'>
|
||||
<ul class="layui-nav layui-nav-tree">
|
||||
<li v-for="(item,index) in centerMenu" v-bind:key="index" class="layui-nav-item" :class="index==0?'layui-this':''">
|
||||
<a :href="'javascript:jump(\''+item.url+'\')'">{{item.name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 个人中心菜单 -->
|
||||
<!-- 个人中心 -->
|
||||
<div class="right-container" :style='{"padding":"20px","boxShadow":"3px 2px 0px rgba(69,69,69, 1) ","margin":"0","borderColor":"rgba(127, 78, 22, 1)","backgroundColor":"rgba(241, 240, 240, 1)","borderRadius":"0","borderWidth":"1px","borderStyle":"solid"}'>
|
||||
<form class="layui-form" lay-filter="myForm">
|
||||
<!-- 主键 -->
|
||||
<input type="hidden" name="id" id="id" />
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">房主账号</label>
|
||||
<div class="layui-input-block input">
|
||||
<input type="text" name="fangzhuzhanghao" id="fangzhuzhanghao" placeholder="房主账号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block input">
|
||||
<input type="password" name="mima" id="mima" placeholder="密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">房主姓名</label>
|
||||
<div class="layui-input-block input">
|
||||
<input type="text" name="fangzhuxingming" id="fangzhuxingming" placeholder="房主姓名" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block select">
|
||||
<select name="xingbie" id="xingbie">
|
||||
<option value="">请选择</option>
|
||||
<option v-for="(item,index) in xingbie" v-bind:key="index" :value="item">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' style="opacity: 0;" class="layui-form-label">头像</label>
|
||||
<div class="layui-input-block">
|
||||
<img id="touxiangImg" style="width: 100px;height: 100px;border-radius: 50%;border: 2px solid #EEEEEE;" :style='{"boxShadow":"0 0 0px rgba(255,0,0,.8)","borderColor":"#DCDFE6","backgroundColor":"#fff","borderRadius":"10px","borderWidth":"1px","width":"80px","borderStyle":"solid","height":"80px"}' src="../../img/avator.png">
|
||||
<input type="hidden" id="touxiang" name="touxiang" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' style="opacity: 0;" class="layui-form-label">图片</label>
|
||||
<div class="layui-input-block">
|
||||
<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="touxiangUpload">
|
||||
<i v-if="true" :style='{"color":"#fff","show":true,"fontSize":"14px"}' class="layui-icon"></i>上传图片
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">手机</label>
|
||||
<div class="layui-input-block input">
|
||||
<input type="text" name="shouji" id="shouji" placeholder="手机" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" :style='{"padding":"10px","boxShadow":"0 0 0px rgba(255,0,0,.8)","margin":"0","borderColor":"rgba(177, 176, 175, 1)","backgroundColor":"#fff","borderRadius":"0px","borderWidth":"0 0 1px 0","borderStyle":"solid"}'>
|
||||
<label :style='{"width":"94px","padding":"0 12px 0 0","fontSize":"14px","color":"rgba(127, 78, 22, 1)","textAlign":"right"}' class="layui-form-label">身份证</label>
|
||||
<div class="layui-input-block input">
|
||||
<input type="text" name="shenfenzheng" id="shenfenzheng" placeholder="身份证" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" style="display: flex;flex-wrap:wrap;">
|
||||
<button :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.5)","margin":"10px 20px","borderColor":"#ccc","backgroundColor":"rgba(127, 78, 22, 1)","color":"#fff","borderRadius":"8px","borderWidth":"0","width":"10%","fontSize":"14px","borderStyle":"solid","height":"44px"}' class="layui-btn btn-submit btn-theme" lay-submit lay-filter="*">更新信息</button>
|
||||
<button :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.5)","margin":"10px 50px 0 0 ","borderColor":"#ccc","backgroundColor":"rgba(255, 120, 0, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"10%","fontSize":"14px","borderStyle":"solid","height":"44px"}' @click="logout" class="layui-btn btn-submit">退出登录</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.5)","margin":"10px 50px 0 0 ","borderColor":"#ccc","backgroundColor":"rgba(255, 120, 0, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"10%","fontSize":"14px","borderStyle":"solid","height":"44px"}' @click="logout" class="layui-btn btn-submit">退出登录</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</form>
|
||||
</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 src="../../js/validate.js"></script>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
// 轮播图
|
||||
swiperList: [],
|
||||
xingbie: [],
|
||||
centerMenu: centerMenu
|
||||
},
|
||||
updated: function() {
|
||||
layui.form.render(null, 'myForm');
|
||||
},
|
||||
methods: {
|
||||
jump(url) {
|
||||
jump(url)
|
||||
},
|
||||
logout(){
|
||||
localStorage.removeItem('Token');
|
||||
localStorage.removeItem('role');
|
||||
localStorage.removeItem('sessionTable');
|
||||
localStorage.removeItem('adminName');
|
||||
localStorage.removeItem('userid');
|
||||
localStorage.removeItem('userTable');
|
||||
window.parent.location.href = '../login/login.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
layui.use(['layer', 'element', 'carousel', 'http', 'jquery', 'form', 'upload'], 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;
|
||||
|
||||
// 获取轮播图 数据
|
||||
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();
|
||||
// });
|
||||
}
|
||||
});
|
||||
// 充值
|
||||
jquery('#btn-recharge').click(function(e) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '用户充值',
|
||||
area: ['900px', '600px'],
|
||||
content: '../shop-recharge/recharge.html'
|
||||
});
|
||||
});
|
||||
|
||||
// 获取轮播图 数据
|
||||
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.xingbie = '男,女'.split(',')
|
||||
// 上传图片
|
||||
var touxiangUpload = upload.render({
|
||||
//绑定元素
|
||||
elem: '#touxiangUpload',
|
||||
//上传接口
|
||||
url: http.baseurl + 'file/upload',
|
||||
// 请求头
|
||||
headers: {
|
||||
Token: localStorage.getItem('Token')
|
||||
},
|
||||
// 允许上传时校验的文件类型
|
||||
accept: 'images',
|
||||
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('#touxiang').val(url);
|
||||
jquery('#touxiangImg').attr('src', url)
|
||||
} else {
|
||||
layer.msg(res.msg, {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
})
|
||||
}
|
||||
},
|
||||
//请求异常回调
|
||||
error: function() {
|
||||
layer.closeAll();
|
||||
layer.msg("请求接口异常", {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
// 查询用户信息
|
||||
let table = localStorage.getItem("userTable");
|
||||
|
||||
if(!table){
|
||||
layer.msg('请先登录', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
}, function() {
|
||||
window.parent.location.href = '../login/login.html';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
http.request(`${table}/session`, 'get', {}, function(data) {
|
||||
// 表单赋值
|
||||
form.val("myForm", data.data);
|
||||
// 图片赋值
|
||||
jquery("#touxiangImg").attr("src", data.data.touxiang);
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(*)', function(data) {
|
||||
data = data.field;
|
||||
if(!data.fangzhuzhanghao){
|
||||
layer.msg('房主账号不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!data.mima){
|
||||
layer.msg('密码不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!data.fangzhuxingming){
|
||||
layer.msg('房主姓名不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!isMobile(data.shouji)){
|
||||
layer.msg('手机应输入手机格式', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!isIdentity(data.shenfenzheng)){
|
||||
layer.msg('身份证应输入身份证格式', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
http.requestJson(table + '/update', 'post', data, function(res) {
|
||||
layer.msg('修改成功', {
|
||||
time: 2000,
|
||||
icon: 6
|
||||
}, function() {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
return false
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,392 @@
|
||||
|
||||
<!-- 首页 -->
|
||||
<!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.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 :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.xingbie}}
|
||||
</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.shouji}}
|
||||
</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.shenfenzheng}}
|
||||
</span>
|
||||
</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: 'fangzhu',
|
||||
// 评价列表
|
||||
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',`fangzhu`);
|
||||
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,433 @@
|
||||
<!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="fangzhuzhanghao" id="fangzhuzhanghao" 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="fangzhuxingming" id="fangzhuxingming" 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('fangzhu','新增')" @click="jump('../fangzhu/add.html')" type="button" class="layui-btn btn-theme">
|
||||
<i v-if="true" class="layui-icon"></i>添加
|
||||
</button>
|
||||
</form>
|
||||
<!-- 样式一 -->
|
||||
<div class="list" style="position: relative;">
|
||||
<div @click="jump('../fangzhu/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('#fangzhuzhanghao').val()) {
|
||||
param['fangzhuzhanghao'] = jquery('#fangzhuzhanghao').val() ? '%' + jquery('#fangzhuzhanghao').val() + '%' : '';
|
||||
}
|
||||
if (jquery('#fangzhuxingming').val()) {
|
||||
param['fangzhuxingming'] = jquery('#fangzhuxingming').val() ? '%' + jquery('#fangzhuxingming').val() + '%' : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取列表数据
|
||||
http.request('fangzhu/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('fangzhu/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,172 @@
|
||||
<!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">
|
||||
.register {
|
||||
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);
|
||||
}
|
||||
.register form {
|
||||
box-sizing: border-box;
|
||||
min-height: 400px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center !important;
|
||||
}
|
||||
.register .logo, .register .title {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.register .logo img {
|
||||
display: block;
|
||||
}
|
||||
.register .title {
|
||||
text-align: center;
|
||||
}
|
||||
.register .form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.register .form-item input, .register .form-label {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.register .btn-submit {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.register form p.txt {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="register" id="app">
|
||||
<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":"2px","width":"400px","borderStyle":"solid","justifyContent":"center","height":"auto"}'>
|
||||
<h1 class="logo" v-if="true" :style='{"padding":"5px 0","boxShadow":"0 0 6px rgba(127, 78, 22, 1)","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","borderRadius":"6px","borderWidth":"0","borderStyle":"solid"}'><img :style='{"boxShadow":"0 0 6px rgba(127, 78, 22, 1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","borderRadius":"100%","borderWidth":"1px","width":"44px","borderStyle":"solid","height":"44px"}' src="http://codegen.caihongy.cn/20210112/136e3ada3eaf4360ad2713c37fdbd7cf.jpg"></h1>
|
||||
<p class="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":"16px","borderStyle":"solid"}'>房主注册</p>
|
||||
<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 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item layui-form-text">
|
||||
<label v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","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":"#333","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"180px","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="text" id="fangzhuzhanghao" name="fangzhuzhanghao" 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 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item">
|
||||
<label v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","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":"#333","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"180px","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="password" name="mima" 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 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item layui-form-text">
|
||||
<label v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","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":"#333","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"180px","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="text" id="fangzhuxingming" name="fangzhuxingming" 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 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item layui-form-text">
|
||||
<label v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","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":"#333","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"180px","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="text" id="shouji" name="shouji" 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 0px 0","width":"80%","borderStyle":"solid","height":"64px"}' class="form-item layui-form-text">
|
||||
<label v-if="true" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(255,0,0,0)","borderColor":"rgba(0,0,0,0)","backgroundColor":"transparent","color":"rgba(127, 78, 22, 1)","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":"#333","borderRadius":"8px","textAlign":"left","borderWidth":"1px","width":"180px","fontSize":"14px","borderStyle":"solid","height":"44px"}' type="text" id="shenfenzheng" name="shenfenzheng" placeholder="请输入身份证" autocomplete="off" class="layui-input">
|
||||
</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","lineHeight":"1px","borderStyle":"solid","height":"44px"}' class="layui-btn layui-btn-fluid layui-btn-danger btn-submit" lay-submit lay-filter="register" style="width: 280px;">注册</button>
|
||||
<p :style='{"color":"#999","textAlign":"center","fontSize":"12px"}' class="txt"><a href="javascript:window.location.href='../login/login.html'">已有账号登录</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 src="../../js/validate.js"></script>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
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;
|
||||
|
||||
var tablename = http.getParam('tablename');
|
||||
|
||||
// 注册
|
||||
form.on('submit(register)', function(data) {
|
||||
data = data.field;
|
||||
if(!data.fangzhuzhanghao){
|
||||
layer.msg('房主账号不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!data.mima){
|
||||
layer.msg('密码不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!data.fangzhuxingming){
|
||||
layer.msg('房主姓名不能为空', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!isMobile(data.shouji)){
|
||||
layer.msg('手机应输入手机格式', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(!isIdentity(data.shenfenzheng)){
|
||||
layer.msg('身份证应输入身份证格式', {
|
||||
time: 2000,
|
||||
icon: 5
|
||||
});
|
||||
return false
|
||||
}
|
||||
http.requestJson(tablename + '/register', 'post', data, function(res) {
|
||||
layer.msg('注册成功', {
|
||||
time: 2000,
|
||||
icon: 6
|
||||
},function(){
|
||||
// 路径访问设置
|
||||
window.location.href = '../login/login.html';
|
||||
});
|
||||
});
|
||||
return false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue