Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
c3de7bd5
Commit
c3de7bd5
authored
Oct 10, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5330c2e1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
578 additions
and
15 deletions
+578
-15
LookShopService.php
application/api_broker/service/LookShopService.php
+3
-2
LookShop.php
application/index/controller/LookShop.php
+150
-9
whitelist.html
application/index/view/look_shop/whitelist.html
+59
-0
ALookShopWhitelist.php
application/model/ALookShopWhitelist.php
+85
-0
route.php
application/route.php
+8
-3
banner.js
public/resource/js/banner.js
+1
-1
whitelist.js
public/resource/js/whitelist.js
+187
-0
whitelist_template_tpl.html
public/resource/template/whitelist_template_tpl.html
+85
-0
No files found.
application/api_broker/service/LookShopService.php
View file @
c3de7bd5
...
...
@@ -179,15 +179,16 @@ class LookShopService
/**
* 升级经纪人看铺次数
* @param int $agent_id
* @param bool $if_up 是否可以继续升级
* @return bool
*/
public
function
setAgentLookNum
(
int
$agent_id
)
:
bool
public
function
setAgentLookNum
(
int
$agent_id
,
bool
$if_up
=
false
)
:
bool
{
if
(
!
$this
->
redis
)
{
return
false
;
}
$agentUpNum
=
$this
->
redis
->
hGet
(
self
::
LOOK_UP_NUM
.
$this
->
nowTime
,
$agent_id
);
if
(
$agentUpNum
>=
2
)
{
if
(
$agentUpNum
>=
2
&&
!
$if_up
)
{
return
false
;
}
$upLookNum
=
(
int
)
$agentUpNum
+
1
;
...
...
application/index/controller/LookShop.php
View file @
c3de7bd5
...
...
@@ -13,6 +13,9 @@ namespace app\index\controller;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\VerifyService
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ALookShopWhitelist
;
use
app\model\SystemConfig
;
use
app\model\TLookShopModel
;
use
app\model\TLookShopUser
;
use
app\model\Users
;
...
...
@@ -20,12 +23,13 @@ use app\model\Users;
class
LookShop
extends
Basic
{
protected
$tLookShopModel
;
protected
$lookShopService_
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
tLookShopModel
=
new
TLookShopModel
();
$this
->
lookShopService_
=
new
LookShopService
();
$this
->
tLookShopModel
=
new
TLookShopModel
();
}
...
...
@@ -93,8 +97,8 @@ class LookShop extends Basic
"page_size" => 15
);*/
if
(
empty
(
$params
[
"user_id"
])
||
empty
(
$params
[
"agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
if
(
empty
(
$params
[
"user_id"
])
||
empty
(
$params
[
"agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
25
:
$params
[
'page_size'
];
...
...
@@ -140,13 +144,149 @@ class LookShop extends Basic
public
function
getShopLookList
()
{
$params
=
$this
->
params
;
if
(
empty
(
$params
[
"user_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
if
(
empty
(
$params
[
"user_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$s_look_Shop
=
new
LookShopService
();
$result
=
$s_look_Shop
->
getShopLookListPc
(
$params
[
'user_id'
],
$pageNo
,
$pageSize
);
$result
=
$s_look_Shop
->
getShopLookListPc
(
$params
[
'user_id'
],
$pageNo
,
$pageSize
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
/**
* 升级经纪人的看铺数量
* @return \think\Response
*/
public
function
setAgentLookNum
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1,
"submit_agent_id" => 1,
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"submit_agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$aLookShopWhitelistModel
=
new
ALookShopWhitelist
();
$where
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where
[
"is_del"
]
=
0
;
$arr
=
$aLookShopWhitelistModel
->
getWhitelistList
(
"id"
,
$where
,
1
,
20
);
if
(
count
(
$arr
)
<=
0
)
{
return
$this
->
response
(
"101"
,
"此经纪人不在白名单"
);
}
$is_ok
=
$this
->
lookShopService_
->
setAgentLookNum
(
$params
[
"agent_id"
],
true
);
if
(
$is_ok
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
else
{
return
$this
->
response
(
"101"
,
"升级看铺数量失败"
);
}
}
/**
* 新增白名单
* @return \think\Response
*/
public
function
addWhitelist
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1,
);*/
$agent_id
=
$params
[
"agent_id"
];
if
(
!
isset
(
$params
[
"agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$aLookShopWhitelistModel
=
new
ALookShopWhitelist
();
$where
[
"agent_id"
]
=
$agent_id
;
$arr
=
$aLookShopWhitelistModel
->
getWhitelistList
(
"id,is_del"
,
$where
,
1
,
20
);
$is_ok
=
0
;
if
(
count
(
$arr
)
<=
0
)
{
$inset_arr
[
"agent_id"
]
=
$agent_id
;
$inset_arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$inset_arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$is_ok
=
$aLookShopWhitelistModel
->
addWhitelist
(
$inset_arr
);
}
else
{
if
(
$arr
[
0
][
"is_del"
]
==
0
)
{
return
$this
->
response
(
"101"
,
"此经纪人已在白名单,请勿重复添加"
);
}
else
{
//修改is_del值
$update_where
[
"agent_id"
]
=
$agent_id
;
$update_params
[
"is_del"
]
=
0
;
$is_ok
=
$aLookShopWhitelistModel
->
updateWhitelist
(
$update_where
,
$update_params
);
}
}
if
(
$is_ok
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
else
{
return
$this
->
response
(
"101"
,
"添加失败"
);
}
}
/**
* 获取白名单列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getWhitelist
()
{
$params
=
$this
->
params
;
/* $params = array(
"phone" => "112312312",
"name" => "12312",
);*/
$where_
=
[];
if
(
isset
(
$params
[
"name"
]))
{
$where_
[
"name"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'name'
])
.
"%"
);
}
if
(
isset
(
$params
[
"phone"
]))
{
$where_
[
"phone"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'phone'
])
.
"%"
);
}
$where_
[
"is_del"
]
=
0
;
$aLookShopWhitelistModel
=
new
ALookShopWhitelist
();
$field
=
"id,agent_id,is_del"
;
$agentList
=
$aLookShopWhitelistModel
->
getWhitelistList
(
$field
,
$where_
,
1
,
50
);
if
(
count
(
$agentList
)
<=
0
)
{
return
$this
->
response
(
"200"
,
"request null"
);
}
$systemConfigModel
=
new
SystemConfig
();
$lookNum
=
0
;
$data
=
$systemConfigModel
->
getSetting
([
"config_type"
=>
40
],
"rule"
);
if
(
$data
&&
$data
[
"agent_shop_num"
]
>
0
)
{
$lookNum
=
$data
[
"agent_shop_num"
];
}
foreach
(
$agentList
as
$key
=>
$item
)
{
$agentModel
=
new
AAgents
();
$agent_where
[
"agent_id"
]
=
$item
[
"agent_id"
];
$field
=
"a.name,a.img,a.phone,b.store_name,c.district_name"
;
$arr
=
$agentModel
->
getAgentsInfoByAgentId
(
$field
,
$agent_where
);
$agentList
[
$key
][
"store_name"
]
=
$arr
[
0
][
"store_name"
];
$agentList
[
$key
][
"district_name"
]
=
$arr
[
0
][
"district_name"
];
$upNum
=
$this
->
lookShopService_
->
getAgentUpNum
(
$item
[
"agent_id"
]);
//已升级次数
$agentList
[
$key
][
"is_upgrade"
]
=
$upNum
;
$agentList
[
$key
][
"can_look_num"
]
=
$lookNum
*
$upNum
;
$agentList
[
$key
][
"name"
]
=
$arr
[
0
][
"name"
];
$agentList
[
$key
][
"phone"
]
=
$arr
[
0
][
"phone"
];
}
$result
[
"list"
]
=
$agentList
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
public
function
whitelistIndex
()
{
return
view
(
"/look_shop/whitelist"
);
}
}
\ No newline at end of file
application/index/view/look_shop/whitelist.html
0 → 100644
View file @
c3de7bd5
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"whitelist"
/>
<!--导航star-->
<!-- Sidebar -->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<!--<li><a href="#">首页轮播图</a></li>-->
<li
class=
"active"
>
升级铺数
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"#modal-add-do"
data-toggle=
"modal"
id=
"add_whitelist"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
新增白名单
</a>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover"
>
<thead>
<tr>
<th>
所在部门
</th>
<th>
所在门店
</th>
<th>
姓名
</th>
<th>
手机号
</th>
<th>
当日可看铺数
</th>
<th>
已升级次数
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"whitelist_body"
>
</tbody>
</table>
</div>
</div>
</div>
<input
type=
"hidden"
value=
"0"
id=
"type"
/>
</div>
</div>
</div>
</div>
application/model/ALookShopWhitelist.php
0 → 100644
View file @
c3de7bd5
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
/**
* Created by PhpStorm.
* User: zw
* Date: 2019/10/10
* Time: 10:49
*/
class
ALookShopWhitelist
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'a_look_shop_whitelist'
;
protected
$db_
;
public
function
__construct
()
{
$this
->
db_
=
Db
(
$this
->
table
);
}
/**
* @param $field
* @param $params
* @param $page_no
* @param $page_size
* @return mixed
*/
public
function
getWhitelistList
(
$field
,
$params
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"is_del"
]))
{
$where_
[
"is_del"
]
=
$params
[
"is_del"
];
}
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where_
)
->
order
(
"update_time desc"
)
->
page
(
$page_no
)
->
limit
(
$page_size
)
->
select
();
}
/**
* @param $params
* @return int
*/
public
function
addWhitelist
(
$params
)
{
Db
::
startTrans
();
try
{
$this
->
db_
->
insert
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
0
;
}
}
/**
* @param $where
* @param $params
* @return int
*/
public
function
updateWhitelist
(
$where
,
$params
)
{
Db
::
startTrans
();
try
{
$this
->
where
(
$where
)
->
update
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
0
;
}
}
}
\ No newline at end of file
application/route.php
View file @
c3de7bd5
...
...
@@ -353,7 +353,7 @@ Route::group('index', [
'baiduText'
=>
[
'index/news/baiduText'
,
[
'method'
=>
'GET'
]],
'agentEvaluateNumAndFraction'
=>
[
'index/broker/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'agentEvaluateNumAndFraction'
=>
[
'index/broker/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'agentEvaluateNumAndFractionV2'
=>
[
'index/broker/agentEvaluateNumAndFractionV2'
,
[
'method'
=>
'POST|GET'
]],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg'
=>
[
'index/UploadImg/uploadImg'
,
[
'method'
=>
'POST'
]],
//全局图片上传
'uploadEditor'
=>
[
'index/UploadImg/uploadEditor'
,
[
'method'
=>
'POST'
]],
//全局图片上传
...
...
@@ -396,7 +396,7 @@ Route::group('index', [
'weekAchievementsReport'
=>
[
'index/PerformanceReport/weekAchievementsReportList'
,
[
'method'
=>
'POST|GET'
]],
//周报liu
'officeBuildingList'
=>
[
'index/OfficeBuilding/officeBuildingList'
,
[
'method'
=>
'POST|GET'
]],
//办公楼liu
// 'officeEdit' => ['index/OfficeBuilding/officeEdit', ['method' => 'POST|GET']],//办公楼新增编辑liu
'buildingDictionary'
=>
[
'index/OfficeBuilding/buildingDictionary'
,
[
'method'
=>
'POST|GET'
]],
//楼盘字典liu
'buildingDictionary'
=>
[
'index/OfficeBuilding/buildingDictionary'
,
[
'method'
=>
'POST|GET'
]],
//楼盘字典liu
'myCollectionOfficeList'
=>
[
'index/OfficeBuilding/myCollectionOfficeList'
,
[
'method'
=>
'POST|GET'
]],
//办公楼收藏liu
...
...
@@ -510,7 +510,7 @@ Route::group('index', [
'getUserBindHistory'
=>
[
'index/member/getUserBindHistory'
,
[
'method'
=>
'get|post'
]],
'lookUserLog'
=>
[
'index/member/lookUserLog'
,
[
'method'
=>
'get|post'
]],
//客户查看日志
'setUserBindType'
=>
[
'index/member/setUserBindType'
,
[
'method'
=>
'get|post'
]],
'setUserBindType'
=>
[
'index/member/setUserBindType'
,
[
'method'
=>
'get|post'
]],
'saveActivity'
=>
[
'index/Activity/saveActivity'
,
[
'method'
=>
'POST|GET'
]],
//新增或修改活动
'getActivityList'
=>
[
'index/Activity/getActivityList'
,
[
'method'
=>
'POST|GET'
]],
//获取活动
...
...
@@ -610,6 +610,11 @@ Route::group('index', [
'clinchMapInfo'
=>
[
'index/ClinchMap/clinchMapInfo'
,
[
'method'
=>
'get | post'
]],
'whitelistIndex'
=>
[
'index/LookShop/whitelistIndex'
,
[
'method'
=>
'get'
]],
'getWhitelist'
=>
[
'index/LookShop/getWhitelist'
,
[
'method'
=>
'get'
]],
'addWhitelist'
=>
[
'index/LookShop/addWhitelist'
,
[
'method'
=>
'post'
]],
'setAgentLookNum'
=>
[
'index/LookShop/setAgentLookNum'
,
[
'method'
=>
'get | post'
]],
]);
...
...
public/resource/js/banner.js
View file @
c3de7bd5
...
...
@@ -105,7 +105,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
banner
.
addOrUpdateBanner
(
params
);
});
$
(
"#confirm_
delete
"
).
click
(
function
()
{
$
(
"#confirm_
up
"
).
click
(
function
()
{
var
params
=
{};
params
.
id
=
$
(
"#delete_id"
).
val
();
params
.
is_show
=
1
;
...
...
public/resource/js/whitelist.js
0 → 100644
View file @
c3de7bd5
/**
* Created by zw on 2019/10/10.
*/
define
([
'doT'
,
'text!temp/whitelist_template_tpl.html'
,
'css!style/home.css'
,
'blow-up'
],
function
(
doT
,
template
)
{
var
whitelist
=
{
datas
:
""
,
imageName
:
""
,
agent_id
:
0
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
whitelist
.
event
();
whitelist
.
getWhitelist
();
},
event
:
function
()
{
var
that
=
this
;
$
(
"#save_whitelist"
).
click
(
function
()
{
var
params
=
{};
var
vals
=
$
(
"#agent_id"
).
val
();
if
(
!
vals
||
vals
==
null
)
{
alert
(
"请选择经纪人"
);
return
false
;
}
params
.
agent_id
=
whitelist
.
agent_id
;
whitelist
.
addWhitelist
(
params
);
});
$
(
"#confirm_up"
).
click
(
function
()
{
var
params
=
{};
params
.
agent_id
=
$
(
"#up_agent_id"
).
val
();
if
(
!
params
.
agent_id
||
params
.
agent_id
==
null
)
{
alert
(
"要升级的经纪人id不能为空"
);
return
false
;
}
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
params
.
submit_agent_id
=
user_info_obj
.
id
;
whitelist
.
upLookShop
(
params
);
});
$
(
document
).
delegate
(
".up_look_shop"
,
"click"
,
function
()
{
$
(
"#up_agent_id"
).
val
(
$
(
this
).
attr
(
"data-agent_id"
));
});
$
(
document
).
delegate
(
".phone_jia"
,
"click"
,
function
()
{
/*手机检索姓名*/
var
ldHtml
=
$
(
'.phone_list'
);
var
stopstatus
=
true
;
var
valueCurrent
=
''
;
var
ajaxObj
;
$
(
function
()
{
$
(
document
).
on
(
'input'
,
'.phone_jia'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
next
().
css
(
"display"
,
"block"
);
valueCurrent
=
_this
.
val
();
if
(
valueCurrent
!=
''
)
{
resetLoad
();
loadMain
(
valueCurrent
,
_this
.
next
());
}
else
{
ldHtml
.
html
(
''
);
return
false
;
}
});
});
function
resetLoad
()
{
if
(
ajaxObj
)
{
ajaxObj
.
abort
();
}
ldHtml
.
html
(
''
);
stopstatus
=
true
;
}
function
loadMain
(
phone
,
obj
)
{
ajaxObj
=
$
.
ajax
({
type
:
"GET"
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
phone
},
timeout
:
10000
,
dataType
:
"json"
,
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$
(
"#agents_list"
).
show
();
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
_html
+=
'<li class="add_phone"><span class="id">'
+
data
[
'id'
]
+
'-</span><span class="phone_name">'
+
data
[
'name'
]
+
'</span><span class="phone_span">-</span><span class="phone-phone">'
+
data
[
'phone'
]
+
'</span><span class="hidden store_id">'
+
data
[
'store_id'
]
+
'</span></li>'
;
});
$
(
"#agents_list"
).
html
(
_html
);
}
},
error
:
function
()
{
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
/*处理超时的逻辑*/
alert
(
"请求超时"
);
}
}
});
}
});
$
(
document
).
delegate
(
".add_phone"
,
"click"
,
function
()
{
whitelist
.
addPhone
(
$
(
this
));
});
},
/*获取 list*/
getWhitelist
:
function
()
{
var
params
=
{};
$
.
ajax
({
url
:
'/admin.php/index/getWhitelist'
,
type
:
'get'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'whitelist_template_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#whitelist_body"
).
html
(
doTtmpl
(
data
.
data
.
list
));
}
});
},
addWhitelist
:
function
(
params
)
{
$
.
ajax
({
url
:
'/admin.php/index/addWhitelist'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-add-do"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
whitelist
.
getWhitelist
();
}
});
},
upLookShop
:
function
(
params
)
{
$
.
ajax
({
url
:
'/admin.php/index/setAgentLookNum'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-up"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
whitelist
.
getWhitelist
();
}
});
},
addPhone
:
function
(
obj
)
{
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
var
phone_span
=
$
(
obj
).
find
(
".phone_span"
).
html
();
var
id
=
$
(
obj
).
find
(
".id"
).
html
();
var
val
=
id
+
phone_name
+
phone_span
+
phone_phone
;
whitelist
.
agent_id
=
id
.
substring
(
0
,
id
.
length
-
1
)
$
(
"input[name='agent_id']"
).
val
(
val
);
$
(
obj
).
parent
().
hide
();
$
(
"#agents_list"
).
html
(
''
);
return
;
}
};
return
whitelist
});
public/resource/template/whitelist_template_tpl.html
0 → 100644
View file @
c3de7bd5
<script
id=
"whitelist_template_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
td
>
[
%=
it
[
item
][
"district_name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"can_look_num"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"is_upgrade"
]
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success up_look_shop"
href
=
"#modal-up"
data
-
toggle
=
"modal"
data
-
agent_id
=
"[%= it[item]['agent_id'] %]"
>
升级查看铺数
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"7"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-up"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
升级看铺数
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<input
type=
"hidden"
value=
""
id=
"up_agent_id"
/>
确认升级吗?
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"confirm_up"
>
确认
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#新增编辑 -->
<div
class=
"modal fade"
id=
"modal-add-do"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span>
</button>
<h4
class=
"modal-title"
id=
"editor_modal_title"
>
新增白名单
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
请选择经纪人:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6 phone_jia"
name=
"agent_id"
id=
"agent_id"
placeholder=
"请输入姓名或手机号"
>
<div
class=
"col-sm-9"
>
<ul
class=
"list-unstyled"
id=
"agents_list"
></ul>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"save_whitelist"
>
保存修改
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment