|
|
@@ -154,6 +154,7 @@
|
|
|
<th>景点名称</th>
|
|
|
<th>地址</th>
|
|
|
<th>价格</th>
|
|
|
+ <th>联系方式</th>
|
|
|
<th>开放时间</th>
|
|
|
<th>发布时间</th>
|
|
|
<th>操作</th>
|
|
|
@@ -191,7 +192,7 @@
|
|
|
});
|
|
|
|
|
|
//第一个实例
|
|
|
- getData('news_check_list', 1, 0) //url,page,信息类型
|
|
|
+ getData('sightsee_check_list', 1, 0) //url,page,信息类型
|
|
|
|
|
|
//监听提交
|
|
|
form.on('submit(formDemo)', function (data) {
|
|
|
@@ -204,7 +205,7 @@
|
|
|
|
|
|
function getData(url, page, hidden) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'get',
|
|
|
data: {
|
|
|
page: page,
|
|
|
@@ -218,11 +219,12 @@
|
|
|
// , count: 30
|
|
|
, count: $('#totalPage').val()
|
|
|
, theme: '#2ca9f9'
|
|
|
+ , curr:page
|
|
|
, layout: ['prev', 'page', 'next', 'skip']
|
|
|
, jump: function (obj, first) {
|
|
|
if (!first) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'get',
|
|
|
data: { page: obj.curr,hidden: hidden },
|
|
|
dataType: 'html',
|
|
|
@@ -246,7 +248,7 @@
|
|
|
// 编辑
|
|
|
function editFun(id) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
id: id,
|
|
|
@@ -254,23 +256,36 @@
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
- window.data = data[0]
|
|
|
+ window.data = data
|
|
|
}
|
|
|
})
|
|
|
var index = layer.open({
|
|
|
title: '四季编辑',
|
|
|
type: 2,
|
|
|
area: ['850px', '560px'],
|
|
|
- content: 'garden_pub',
|
|
|
+ content: 'sightsee_pub',
|
|
|
success: function (layero, index,data) {
|
|
|
var body = layer.getChildFrame('body', index);
|
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
body.find('input[name="name"]').val(window.data.name) //采摘名称
|
|
|
- body.find('input[name="company"]').val(window.data.company) //采摘企业
|
|
|
- body.find('input[name="img_url"]').val(window.data.pick_img) //采摘图片
|
|
|
- body.find('input[name="time"]').val(window.data.time) //采摘时间
|
|
|
- // $('#farmSelect').next().children().eq(0).children().eq(0).val($('#farmSelect').find("option:selected").text(data[0].farm_name));
|
|
|
- body.find('input[name="id"]').val(window.data.id) //id
|
|
|
+ body.find('#demo1').attr('src',window.data.sightsee_img) //图片
|
|
|
+ body.find('#img_url').val(window.data.sightsee_img) //图片
|
|
|
+ body.find('input[name="addr"]').val(window.data.addr)
|
|
|
+ body.find('input[name="location"]').val(window.data.location)
|
|
|
+ body.find('input[name="mobile"]').val(window.data.sightsee_tel)
|
|
|
+ body.find('input[name="price"]').val(window.data.price)
|
|
|
+ body.find('input[name="stime"]').val(window.data.sightsee_stime)
|
|
|
+ body.find('input[name="etime"]').val(window.data.sightsee_etime)
|
|
|
+ body.find('input[name="time1"]').val(window.data.sightsee_stime)
|
|
|
+ body.find('textarea[name="desc"]').val(window.data.desc)
|
|
|
+ body.find('#demo2').attr('src',window.data.guide_img) //图片
|
|
|
+ body.find('#guideUpimg_url').val(window.data.guide_img) //图片
|
|
|
+ // body.find('textarea[id="editor1"]').val(window.data.content) //文章正文
|
|
|
+ var w = $(layero).find("iframe")[0].contentWindow;//通过该对象可以获取iframe中的变量,调用iframe中的方法
|
|
|
+ w.fuzhi(window.data.content);//调用iframe中的方法
|
|
|
+ body.find('input[name="id"]').val(id) //id
|
|
|
+ console.log(window.data.content)
|
|
|
+ console.log(body.find('#editor1'))
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -279,7 +294,7 @@
|
|
|
function passFun(id) {
|
|
|
layer.confirm('是否通过此信息',{title:'通过'}, function (index) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
id: id,
|
|
|
@@ -291,7 +306,8 @@
|
|
|
layer.close(index);
|
|
|
// parent.layer.msg("操作成功!", {time: 1000}, function () {
|
|
|
//重新加载父页面
|
|
|
- location.reload();
|
|
|
+ // location.reload();
|
|
|
+ getData('sightsee_check_list', $('.layui-laypage-curr em').eq(1).html(), $('.permission .active').data('type'))
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -304,7 +320,7 @@
|
|
|
function delFun(id) {
|
|
|
layer.confirm('真的删除行么',{title:'删除'}, function (index) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
req: 'del',
|
|
|
@@ -313,7 +329,8 @@
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
if (data) {
|
|
|
- location.reload();
|
|
|
+ // location.reload();
|
|
|
+ getData('sightsee_check_list', $('.layui-laypage-curr em').eq(1).html(), $('.permission .active').data('type'))
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -334,17 +351,18 @@
|
|
|
content: '<div class="table"></div>',
|
|
|
success: function(layero, index) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'post',
|
|
|
async: false,
|
|
|
data: {
|
|
|
- ids: id,
|
|
|
+ id: id,
|
|
|
+ req: 'edit',
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
- window.data = data[0]
|
|
|
- var html = '<div><p>景点导览图</p><img src="127.0.0.1:8000/'+window.data.img+'"/></div>'
|
|
|
- layero.find('.table').html(window.data.content)
|
|
|
+ window.data = data
|
|
|
+ var html = '<div><p style="line-height: 14px;padding-left: 10px;border-left: 3px solid #23a3ee;">景点导览图</p><img src="127.0.0.1:8000/'+window.data.guide_img+'"/></div>'
|
|
|
+ layero.find('.table').html('<p style="line-height: 14px;padding-left: 10px;border-left: 3px solid #23a3ee;">详细介绍</p>'+window.data.content)
|
|
|
layero.find('.table').append(html)
|
|
|
}
|
|
|
})
|
|
|
@@ -367,7 +385,7 @@
|
|
|
var hidden = $('.permission .active').data('type');
|
|
|
var page = $(".layui-laypage-em").next().html();
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'sightsee_check_list',
|
|
|
type: 'get',
|
|
|
data: { page: page,hidden: hidden },
|
|
|
dataType: 'html',
|
|
|
@@ -392,7 +410,7 @@
|
|
|
// alert(type)
|
|
|
$('.permission button').removeClass('active');
|
|
|
$(this).addClass('active');
|
|
|
- getData('news_check_list', 1, type)
|
|
|
+ getData('sightsee_check_list', 1, type)
|
|
|
}
|
|
|
})
|
|
|
|