Commit 60f1c7ac authored by agping's avatar agping

后台修改

parent e3db3a53
...@@ -313,12 +313,7 @@ ...@@ -313,12 +313,7 @@
.main-select { .main-select {
display : none ; display : none ;
} }
.btn2 {
width : 8% !important;
}
.btn4 {
width : 12% !important;
}
</style> </style>
<!--导航star--> <!--导航star-->
......
...@@ -15,6 +15,7 @@ body { ...@@ -15,6 +15,7 @@ body {
body{ body{
width:1560px !important; width:1560px !important;
}; };
}; };
html { overflow-y: scroll; } html { overflow-y: scroll; }
a:hover{ a:hover{
......
...@@ -116,6 +116,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -116,6 +116,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_doc.on('click', '#bargaininfo_commission_add_btn>img', function(e) { _doc.on('click', '#bargaininfo_commission_add_btn>img', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
if($('.detail-modal-bargaininfo-commission-addarea>div').length >= 5) { if($('.detail-modal-bargaininfo-commission-addarea>div').length >= 5) {
alert('最多添加5条'); alert('最多添加5条');
return false; return false;
...@@ -128,6 +129,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -128,6 +129,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_doc.on('click', '.detail-modal-bargaininfo-commission-cancel-pic', function(e) { _doc.on('click', '.detail-modal-bargaininfo-commission-cancel-pic', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
$(this).parent().remove(); $(this).parent().remove();
}); });
//城市 区域 二级联动 筛选 //城市 区域 二级联动 筛选
...@@ -171,11 +173,13 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -171,11 +173,13 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
//上一页 获取客户详情 //上一页 获取客户详情
_doc.on('click', '#user_up', function() { _doc.on('click', '#user_up', function() {
user_type='last'; user_type='last';
checkLogin();
user.getInfor(); user.getInfor();
}); });
//下一页 获取客户详情 //下一页 获取客户详情
_doc.on('click', '#user_down', function() { _doc.on('click', '#user_down', function() {
user_type='next'; user_type='next';
checkLogin();
user.getInfor(); user.getInfor();
}); });
//客户列表 收藏夹 //客户列表 收藏夹
...@@ -183,17 +187,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -183,17 +187,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.getUserFavorites(); user.getUserFavorites();
}); });
// _doc.on('click', '.take-look', function(e) {//点击约带看 获取 客户姓名 编号 电话
// e.preventDefault();
// e.stopPropagation();
// $('#take_look_name').html($(this).attr("data-name"));
// $('#take_look_phone').html($(this).attr("data-phone"));
// $('#take_look_id').html($(this).attr("data-id"));
// $('#look_shop_date').val('');
// $('#note_look').val('');
// $('.look-shop').val('');
// $('.look-shop').removeAttr('data-id');
// });
//二级联动 //二级联动
user.getDistrict(function() { user.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() { _doc.on('input', '#district_id, #district_id2', function() {
...@@ -237,8 +230,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -237,8 +230,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}); });
$(document).delegate(".genj_ure", "click", function() { $(document).delegate(".genj_ure", "click", function() {
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
// $("#genj_text").val(''); checkLogin();
// $("input[name = 'user_status']:checked").removeAttr("checked");
user.getGenjinLabel(); user.getGenjinLabel();
}); });
...@@ -260,10 +252,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -260,10 +252,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$(document).delegate("#edit_add", "click", function(e) { $(document).delegate("#edit_add", "click", function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
user.edit_add(); user.edit_add();
}); });
// 批量修改客方 // 批量修改客方
$(document).delegate("#modify_add", "click", function() { $(document).delegate("#modify_add", "click", function() {
checkLogin();
user.modify_add(); user.modify_add();
}); });
$(document).delegate(".caozuo-yue", "click", function() { $(document).delegate(".caozuo-yue", "click", function() {
...@@ -272,6 +266,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -272,6 +266,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$('#note_look').val(''); $('#note_look').val('');
$('.look-shop').val(''); $('.look-shop').val('');
$('.look-shop').removeAttr('data-id'); $('.look-shop').removeAttr('data-id');
checkLogin();
user.Caozuo(); user.Caozuo();
}); });
...@@ -296,6 +291,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -296,6 +291,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.detailTabIndex = 0; user.detailTabIndex = 0;
$('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide(); $('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide();
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容 $('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
checkLogin();
user.Caozuo(); user.Caozuo();
}); });
...@@ -331,6 +327,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -331,6 +327,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.agent_id=''; user.agent_id='';
$(".user-ul").html(''); $(".user-ul").html('');
} else { } else {
checkLogin();
user.search_phone(); user.search_phone();
} }
}); });
...@@ -339,12 +336,14 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -339,12 +336,14 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.user_id_edit_introduce=''; user.user_id_edit_introduce='';
$(".user-ul-edit-introduce").html(''); $(".user-ul-edit-introduce").html('');
} else { } else {
checkLogin();
user.introduce_userIdEdit(); user.introduce_userIdEdit();
} }
}); });
//拨打手机号 //拨打手机号
$(document).on("click", ".user_call", function() { $(document).on("click", ".user_call", function() {
if(is_outpace_call_num == '0'){ if(is_outpace_call_num == '0'){
checkLogin();
user.user_Call(); user.user_Call();
}else{ }else{
layerTipsX('该客户今日已达拨打上限,请明日再来'); layerTipsX('该客户今日已达拨打上限,请明日再来');
...@@ -353,11 +352,15 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -353,11 +352,15 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
//没打通手机号 //没打通手机号
$(document).on("click", "#unbind_call", function() { $(document).on("click", "#unbind_call", function() {
user.unbind_Call(); user.unbind_Call();
checkLogin();
}); });
//约带看 保存 //约带看 保存
$(document).on("click", ".save-look", function() { //手机号搜索客方 $(document).on("click", ".save-look", function() { //手机号搜索客方
user.save_look(); user.save_look();
checkLogin();
}); });
//约带看 商铺选择 //约带看 商铺选择
$(document).on("input", ".look-shop", function() { //手机号搜索客方 $(document).on("input", ".look-shop", function() { //手机号搜索客方
...@@ -408,6 +411,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -408,6 +411,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$(document).delegate(".submit_edit", "click", function(e) { //提交 $(document).delegate(".submit_edit", "click", function(e) { //提交
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
user.Submit_follow(); user.Submit_follow();
}); });
// =============下拉列表======================== // =============下拉列表========================
...@@ -493,6 +497,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -493,6 +497,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_btnSave.click(function(e){ _btnSave.click(function(e){
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
genjinSave(); genjinSave();
}); });
...@@ -1360,8 +1365,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -1360,8 +1365,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}, },
//筛选 //筛选
getList: function(pageNo) { getList: function(pageNo) {
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
user.pageNo = pageNo; user.pageNo = pageNo;
var _startDateObj = $('#start_date'), var _startDateObj = $('#start_date'),
_endDateObj = $('#end_date'), _endDateObj = $('#end_date'),
......
...@@ -98,6 +98,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -98,6 +98,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business.name = user_info_obj.name; business.name = user_info_obj.name;
$("#search").click(function() { $("#search").click(function() {
checkLogin();
business.getList(1); business.getList(1);
}); });
...@@ -122,12 +123,12 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -122,12 +123,12 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$('#persional_shop').attr("title","点击切换到本人商铺"); $('#persional_shop').attr("title","点击切换到本人商铺");
} }
business.all_shop = !business.all_shop; business.all_shop = !business.all_shop;
checkLogin();
business.getList(1); business.getList(1);
}); });
$('#main_select').unbind('click').bind('click',function(){ $('#main_select').unbind('click').bind('click',function(){
business.main_select = !business.main_select; business.main_select = !business.main_select;
console.log(business.main_select);
if ( business.main_select ){ if ( business.main_select ){
$('.main-select').show(); $('.main-select').show();
$('#main_select').html("关闭高级搜索"); $('#main_select').html("关闭高级搜索");
...@@ -148,6 +149,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -148,6 +149,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business.house_id = $(this).attr("data-id"); business.house_id = $(this).attr("data-id");
business.auth_edit_exclusive = $(this).attr("data-exclusive"); business.auth_edit_exclusive = $(this).attr("data-exclusive");
business.type = "1"; business.type = "1";
checkLogin();
business.Anch(); //获取手机号名字的 business.Anch(); //获取手机号名字的
}); });
// 点击设置案场权限人(盘方) // 点击设置案场权限人(盘方)
...@@ -155,20 +157,24 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -155,20 +157,24 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$("#myModalLabel").html("设置盘方"); $("#myModalLabel").html("设置盘方");
business.house_id = $(this).attr("data-id"); business.house_id = $(this).attr("data-id");
business.type = "2"; business.type = "2";
checkLogin();
business.Anch(); business.Anch();
}); });
$(document).delegate(".dujia", "click", function() { //点击独家 $(document).delegate(".dujia", "click", function() { //点击独家
business.house_id = $(this).attr("data-id"); business.house_id = $(this).attr("data-id");
business.type = "3"; business.type = "3";
checkLogin();
business.Dujia(); business.Dujia();
}); });
$(document).delegate(".caozuo", "click", function() { //点击操作记录 $(document).delegate(".caozuo", "click", function() { //点击操作记录
business.house_id = $(this).attr("data-id"); business.house_id = $(this).attr("data-id");
checkLogin();
business.Caozuo(); business.Caozuo();
}); });
$(document).delegate(".submit_follow2", "click", function(e) { //提交独家 $(document).delegate(".submit_follow2", "click", function(e) { //提交独家
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
business.Dujianew(); business.Dujianew();
}); });
//收藏 取消收藏 //收藏 取消收藏
...@@ -193,6 +199,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -193,6 +199,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
} else { } else {
params.type = 3; params.type = 3;
} }
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用 $.ajax({ //禁用
'type': 'POST', 'type': 'POST',
...@@ -240,6 +247,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -240,6 +247,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
if(business.detailTabIndex == 1){ if(business.detailTabIndex == 1){
$('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+business.id); $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+business.id);
}else if(business.detailTabIndex == 0){ }else if(business.detailTabIndex == 0){
checkLogin();
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容 $('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
business.getFollowupList(); business.getFollowupList();
} }
...@@ -249,8 +257,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -249,8 +257,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var myModalLabel = $("#myModalLabel").html(); var myModalLabel = $("#myModalLabel").html();
if(myModalLabel == '设置案场权限人') { if(myModalLabel == '设置案场权限人') {
checkLogin();
business.Submit_follow(); business.Submit_follow();
} else { } else {
checkLogin();
business.Submit_follow2(); // 提交按钮设置盘方 business.Submit_follow2(); // 提交按钮设置盘方
} }
}); });
...@@ -258,6 +268,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -258,6 +268,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$(document).delegate("#confirm_delete", "click", function(e) { $(document).delegate("#confirm_delete", "click", function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
business.delBusiness(); business.delBusiness();
}); });
$(document).delegate(".jia", "click", function() { //加号 $(document).delegate(".jia", "click", function() { //加号
...@@ -271,6 +282,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -271,6 +282,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}); });
// 批量修改客方 // 批量修改客方
$(document).delegate("#modify_add", "click", function() { $(document).delegate("#modify_add", "click", function() {
checkLogin();
business.modify_add(); business.modify_add();
}); });
// 批量修改客方 // 批量修改客方
...@@ -309,6 +321,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -309,6 +321,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
params.type = 0; params.type = 0;
$(this).html('推荐至首页'); $(this).html('推荐至首页');
} }
checkLogin();
$.ajax({ //推荐至首页 $.ajax({ //推荐至首页
'type': 'POST', 'type': 'POST',
'url': '/index/carefullyChosen', 'url': '/index/carefullyChosen',
...@@ -408,6 +421,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -408,6 +421,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
_doc.on('click', '[href="#modal_followup"]', function(){ _doc.on('click', '[href="#modal_followup"]', function(){
business.id = $(this).attr("data-id"); business.id = $(this).attr("data-id");
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容 $('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
checkLogin();
business.getFollowupList(); business.getFollowupList();
}); });
...@@ -415,6 +429,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -415,6 +429,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
_doc.on('click', '#modal_followup_submit_btn', function(e){ _doc.on('click', '#modal_followup_submit_btn', function(e){
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
business.followupAdd(); business.followupAdd();
}); });
...@@ -431,6 +446,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -431,6 +446,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business.detailTabIndex = 0; business.detailTabIndex = 0;
$('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide(); $('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide();
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容 $('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
checkLogin();
business.getFollowupList(); business.getFollowupList();
// $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id); // $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id);
}); });
......
...@@ -19,6 +19,7 @@ require.config ({ ...@@ -19,6 +19,7 @@ require.config ({
'datetimepicker': 'lib/js/bootstrap-datetimepicker', 'datetimepicker': 'lib/js/bootstrap-datetimepicker',
'pagination': 'lib/js/Pagination', 'pagination': 'lib/js/Pagination',
'paginationStart': 'lib/js/zw.pagination', 'paginationStart': 'lib/js/zw.pagination',
'checkLogin': 'lib/js/checkLoginFailureAjax',
'blow-up': 'lib/js/blow-up', 'blow-up': 'lib/js/blow-up',
}, },
...@@ -72,4 +73,4 @@ require.config ({ ...@@ -72,4 +73,4 @@ require.config ({
} }
}); });
require (['require', 'jquery', 'doT','layer', 'app/public' ,"datetimepicker",'bootstrapJs','pagination','paginationStart']); require (['require', 'jquery', 'doT','layer', 'app/public' ,"datetimepicker",'bootstrapJs','pagination','paginationStart','checkLogin']);
...@@ -24,14 +24,6 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -24,14 +24,6 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
dataObj.init(); dataObj.init();
}); });
} }
//定时器
// setInterval(function(){
// var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// //登录时间无效 直接跳转登录页面
// if(!user_info_obj){
// window.location.href="login.html";
// };
// },60000);
menu_bar(function(){ menu_bar(function(){
//回调部分 //回调部分
...@@ -83,7 +75,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -83,7 +75,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
} }
} }
$("#logout").click(function () { $("#logout").click(function () {
localStorage.removeItem('pcUserInfo'); localStorage.removeItem('pcUserInfo');
}); });
......
...@@ -83,6 +83,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -83,6 +83,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
}; };
//定义获取商铺标签方法 //定义获取商铺标签方法
checkLogin();
function getShangpuTags(fn) { function getShangpuTags(fn) {
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
...@@ -140,6 +141,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -140,6 +141,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_data['source'] = _source; _data['source'] = _source;
_data['sublet_id'] = _sublet_id; _data['sublet_id'] = _sublet_id;
} else {}; } else {};
checkLogin();
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/index/houseEdit', url: '/index/houseEdit',
...@@ -382,6 +384,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -382,6 +384,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if(confirm('确定删除该文件吗?')){ if(confirm('确定删除该文件吗?')){
var _imgId = _this.parent().attr('data-imgid'); var _imgId = _this.parent().attr('data-imgid');
if(_imgId){ if(_imgId){
checkLogin();
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/index/delHouseFile', url: '/index/delHouseFile',
...@@ -871,6 +874,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -871,6 +874,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
$('#saveBtn').click(function(e) {//保存大讲堂 $('#saveBtn').click(function(e) {//保存大讲堂
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
checkLogin();
//多个input输入框验证标记 //多个input输入框验证标记
var _isBreakFlag = false; var _isBreakFlag = false;
//是否给商户公开,是否独家验证是否选择 //是否给商户公开,是否独家验证是否选择
...@@ -1165,6 +1169,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function ...@@ -1165,6 +1169,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_data['source'] = _source; _data['source'] = _source;
_data['sublet_id'] = _sublet_id; _data['sublet_id'] = _sublet_id;
}; };
checkLogin();
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/index/houseEdit', url: '/index/houseEdit',
......
define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker", 'pagination', 'bootstrapJs','blow-up'], function(doT, template) { define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker", 'pagination', 'bootstrapJs','blow-up','checkLogin'], function(doT, template) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var _doc = $(document), var _doc = $(document),
_token = user_info_obj.AuthToken; _token = user_info_obj.AuthToken;
...@@ -183,7 +183,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -183,7 +183,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$(this).html('收藏'); $(this).html('收藏');
} else { } else {
params.type = 3; params.type = 3;
} };
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用 $.ajax({ //禁用
'type': 'POST', 'type': 'POST',
...@@ -1207,7 +1208,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1207,7 +1208,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}, },
search_phone2: function() { //手机号 编辑是 客方搜索 search_phone2: function() { //手机号 编辑是 客方搜索
// console.log($(".cus_fang").val());
$.ajax({ $.ajax({
url: '/index/getBroker_new', url: '/index/getBroker_new',
type: 'GET', type: 'GET',
...@@ -1232,7 +1232,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1232,7 +1232,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}, },
search_phone_look: function(n) { //商铺名选择 search_phone_look: function(n) { //商铺名选择
$.ajax({ $.ajax({
// url:"https://pre2.tonglianjituan.com"+ '/broker/getShopList',
url:'/broker/getShopList', url:'/broker/getShopList',
type: 'GET', type: 'GET',
async: true, async: true,
...@@ -1259,7 +1258,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1259,7 +1258,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}, },
user_Call: function() { //客户详情 点击拨打按钮 user_Call: function() { //客户详情 点击拨打按钮
$('#call_modal_phone_self').val(user_info_obj.phone); $('#call_modal_phone_self').val(user_info_obj.phone);
_callModal.show(); _callModal.show();
}, },
user_Call_Ori: function() { //客户详情 点击拨打按钮 user_Call_Ori: function() { //客户详情 点击拨打按钮
...@@ -1270,7 +1268,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1270,7 +1268,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$('#phone_title').html(user_info_obj.phone); $('#phone_title').html(user_info_obj.phone);
params.AuthToken = user_info_obj.AuthToken; params.AuthToken = user_info_obj.AuthToken;
params.user_id = user.user_id; params.user_id = user.user_id;
console.log(params); checkLogin();
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url': '/broker/bindAXB', 'url': '/broker/bindAXB',
...@@ -1338,8 +1336,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1338,8 +1336,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params.disc = $("#user_area_edit").val(); params.disc = $("#user_area_edit").val();
params.user_label = $("#user_label_edit").val(); params.user_label = $("#user_label_edit").val();
checkLogin();
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url': '/index/pcEditClient', 'url': '/index/pcEditClient',
...@@ -1369,6 +1366,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1369,6 +1366,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
alert('状态标签未选中'); alert('状态标签未选中');
return false; return false;
} }
checkLogin();
if(!user.isAjaxSaving){ if(!user.isAjaxSaving){
user.isAjaxSaving = true; user.isAjaxSaving = true;
$.ajax({ $.ajax({
...@@ -1423,7 +1421,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1423,7 +1421,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
alert('请输入经纪人内容为空'); alert('请输入经纪人内容为空');
return false; return false;
} }
checkLogin();
$.ajax({ $.ajax({
url: '/index/batchEditCustomer', url: '/index/batchEditCustomer',
type: 'POST', type: 'POST',
...@@ -1450,7 +1448,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1450,7 +1448,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}else{ }else{
$('.user_call').hide(); $('.user_call').hide();
} }
checkLogin();
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url': '/index/useraction_search', 'url': '/index/useraction_search',
...@@ -1630,6 +1628,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1630,6 +1628,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
return; return;
} }
} }
checkLogin();
$.ajax({ $.ajax({
url: '/index/users_list', url: '/index/users_list',
type: 'GET', type: 'GET',
...@@ -1765,7 +1764,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1765,7 +1764,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
return; return;
} }
checkLogin();
$.ajax({ $.ajax({
url: '/index/pcEditClient', url: '/index/pcEditClient',
type: 'POST', type: 'POST',
...@@ -1847,6 +1846,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1847,6 +1846,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params.agent_id=user_info_obj.id; params.agent_id=user_info_obj.id;
params.type=user_type; params.type=user_type;
params.AuthToken=user_info_obj.AuthToken; params.AuthToken=user_info_obj.AuthToken;
checkLogin();
$.ajax({ $.ajax({
url: '/broker/getLastOrNextUserID', url: '/broker/getLastOrNextUserID',
// url: 'https://pre2.tonglianjituan.com'+'/broker/getLastOrNextUserID', // url: 'https://pre2.tonglianjituan.com'+'/broker/getLastOrNextUserID',
...@@ -1883,6 +1883,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1883,6 +1883,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}, },
getGenjinLabel: function() { getGenjinLabel: function() {
$('#genj_text').val(''); $('#genj_text').val('');
checkLogin();
$.ajax({ $.ajax({
url: '/index/getUserLabel', url: '/index/getUserLabel',
type: 'GET', type: 'GET',
...@@ -1901,6 +1902,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1901,6 +1902,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}, },
getGenjincon: function() {//获取客户动态 getGenjincon: function() {//获取客户动态
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
checkLogin();
$.ajax({ $.ajax({
url:'/broker/useraction_search', url:'/broker/useraction_search',
// url: 'https://pre2.tonglianjituan.com'+'/broker/useraction_search', // url: 'https://pre2.tonglianjituan.com'+'/broker/useraction_search',
......
function checkLogin(){
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({
'type': 'GET',
'url': '/index/checkLogin',//验证登录失效
data: {},
dataType: "json",
success: function(data) {
if(data.code == 300){
alert('登录失效,请您重新登录');
window.location.href="login.html";
}
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment