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
61d311ef
Commit
61d311ef
authored
Dec 21, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
1537fff0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
21 deletions
+106
-21
AppointmentTime.php
application/api/controller/AppointmentTime.php
+1
-0
TradeLog.php
application/api/controller/TradeLog.php
+3
-2
Login.php
application/index/controller/Login.php
+38
-3
banner.html
application/index/view/banner/banner.html
+1
-1
login.html
application/index/view/login/login.html
+10
-7
AdminModel.php
application/model/AdminModel.php
+34
-0
route.php
application/route.php
+3
-2
banner.js
public/resource/js/banner.js
+11
-2
banner_template_tpl.html
public/resource/template/banner_template_tpl.html
+5
-4
No files found.
application/api/controller/AppointmentTime.php
View file @
61d311ef
...
@@ -188,6 +188,7 @@ class AppointmentTime extends Basic
...
@@ -188,6 +188,7 @@ class AppointmentTime extends Basic
}
}
//todo 是否评价
//todo 是否评价
return
$result
;
return
$result
;
}
}
...
...
application/api/controller/TradeLog.php
View file @
61d311ef
...
@@ -50,15 +50,16 @@ class TradeLog extends Basic
...
@@ -50,15 +50,16 @@ class TradeLog extends Basic
$order_
=
'a.created desc'
;
$order_
=
'a.created desc'
;
$field
=
"a.id,a.tradecode,a.singntime,b.phpone,b.house_id"
;
$field
=
"a.id,a.tradecode,a.singntime,b.phpone,b.house_id
,b.agent_id
"
;
$result
=
$this
->
journalAccountsMode
->
getJournalAccountsList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$param
);
$result
=
$this
->
journalAccountsMode
->
getJournalAccountsList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$param
);
if
(
count
(
$result
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
)
{
return
$this
->
response
(
"200"
,
"请求数据为空"
);
return
$this
->
response
(
"200"
,
"请求数据为空"
);
}
}
foreach
(
$result
as
$key
=>
$val
)
{
foreach
(
$result
as
$key
=>
$val
)
{
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"room_num_left"
,
array
(
"id"
=>
$val
[
"house_id"
]));
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"room_num_left
,title
"
,
array
(
"id"
=>
$val
[
"house_id"
]));
$result
[
$key
][
"room_num_left"
]
=
$houseInfo
[
"room_num_left"
];
$result
[
$key
][
"room_num_left"
]
=
$houseInfo
[
"room_num_left"
];
$result
[
$key
][
"title"
]
=
$houseInfo
[
"title"
];
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$imgParam
[
"imgtype"
]
=
1
;
//默认主图
$imgParam
[
"imgtype"
]
=
1
;
//默认主图
...
...
application/index/controller/Login.php
View file @
61d311ef
<?php
<?php
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\AdminModel
;
use
think\Request
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
* User : zw
* User : zw
* Date : 2017/12/20
* Date : 2017/12/20
* Time : 13:52
* Time : 13:52
* Intro:
* Intro:
c端后台登录
*/
*/
class
Login
extends
Basic
{
class
Login
{
protected
$loginDb
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
loginDb
=
new
AdminModel
();
}
public
function
login
(){
public
function
login
()
{
return
view
(
"login/login"
);
return
view
(
"login/login"
);
}
}
public
function
loginVerify
()
{
$name
=
$_POST
[
"username"
];
$passwd
=
$_POST
[
"passwd"
];
if
(
!
isset
(
$name
)
||
!
isset
(
$passwd
))
{
return
view
(
"login/login"
,
[
"msg"
=>
"用户名或密码不能为空"
]);
}
$params
[
"name"
]
=
$name
;
$params
[
"pswd"
]
=
md5
(
md5
(
$passwd
));
$result
=
$this
->
loginDb
->
verifyUser
(
$params
);
//todo 更新登录信息
if
(
count
(
$result
)
>
0
)
{
$this
->
redirect
(
'banner/banner'
);
}
else
{
return
view
(
"login/login"
,
[
"msg"
=>
"用户名或密码错误"
]);
}
}
}
}
\ No newline at end of file
application/index/view/banner/banner.html
View file @
61d311ef
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<ul
class=
"bread_btn"
>
<li>
<li>
<a
href=
"#modal-add-do"
data-toggle=
"modal"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
<a
href=
"#modal-add-do"
data-toggle=
"modal"
id=
"add_banner"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
新增广告
</a>
新增广告
</a>
</li>
</li>
</ul>
</ul>
...
...
application/index/view/login/login.html
View file @
61d311ef
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<title>
同联地产管理后台
</title>
<title>
同联地产管理后台
</title>
<link
rel=
"stylesheet"
href=
"/resource/css/login.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/resource/css/login.css"
type=
"text/css"
/>
</head>
</head>
<body
>
<body>
<div
class=
"main-container"
>
<div
class=
"main-container"
>
<div
class=
"main-content"
>
<div
class=
"main-content"
>
<div
class=
"login-container"
>
<div
class=
"login-container"
>
...
@@ -19,15 +19,18 @@
...
@@ -19,15 +19,18 @@
</h1>
</h1>
</div>
</div>
<div
class=
"loginbox"
>
<div
class=
"loginbox"
>
<form
action=
"
"
method=
"post"
>
<form
action=
"/admin.php/index/loginVerify
"
method=
"post"
>
<div
class=
"input-icon"
>
<div
class=
"input-icon"
>
<input
class=
"input-block"
type=
"text"
id=
"username"
name=
"username"
autofocus
placeholder=
"请输入用户名"
maxlength=
"16"
required
>
<input
class=
"input-block"
type=
"text"
id=
"username"
name=
"username"
autofocus
placeholder=
"请输入用户名"
maxlength=
"16"
required
>
</div>
</div>
<div
class=
"input-icon"
>
<div
class=
"input-icon"
>
<input
class=
"input-block"
type=
"password"
id=
"passwd"
name=
"passwd"
placeholder=
"请输入登录密码"
maxlength=
"16"
required
>
<input
class=
"input-block"
type=
"password"
id=
"passwd"
name=
"passwd"
placeholder=
"请输入登录密码"
maxlength=
"16"
required
>
<span
style=
"color: #fff;display: block;text-align: center;font-size: 12px"
>
{$msg}
</span>
</div>
</div>
<div
class=
"center"
>
<div
class=
"center"
style=
"margin-top: 15px"
>
<button
type=
"submit"
style=
"background: #87b1ff;"
>
立即登陆
</button>
<button
type=
"submit"
style=
"background: #87b1ff;"
>
立即登陆
</button>
</div>
</div>
</form>
</form>
</div>
</div>
...
...
application/model/AdminModel.php
0 → 100644
View file @
61d311ef
<?php
/**
* Created by PhpStorm.
* User : zw
* Date : 2017/12/21
* Time : 13:58
* Intro:
*/
namespace
app\model
;
use
think\Db
;
use
think\Model
;
class
AdminModel
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'u_admin'
;
protected
$db
;
public
function
__construct
()
{
$this
->
db
=
Db
::
table
(
$this
->
table
);
}
public
function
verifyUser
(
$params
)
{
return
$this
->
db
->
field
(
"id"
)
->
where
(
$params
)
->
select
();
}
}
\ No newline at end of file
application/route.php
View file @
61d311ef
...
@@ -75,6 +75,7 @@ Route::group('index', [
...
@@ -75,6 +75,7 @@ Route::group('index', [
//login
//login
'login'
=>
[
'index/login/login'
,[
'method'
=>
'get'
]],
'login'
=>
[
'index/login/login'
,[
'method'
=>
'get'
]],
'loginVerify'
=>
[
'index/login/loginVerify'
,[
'method'
=>
'post|get'
]],
]);
]);
...
@@ -128,4 +129,4 @@ Route::group('api', [
...
@@ -128,4 +129,4 @@ Route::group('api', [
'attentionList'
=>
[
'api/AttentionShop/attentionList'
,
[
'method'
=>
'post | get'
]
],
'attentionList'
=>
[
'api/AttentionShop/attentionList'
,
[
'method'
=>
'post | get'
]
],
]);
]);
Route
::
miss
(
'api/index/miss'
);
//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
\ No newline at end of file
public/resource/js/banner.js
View file @
61d311ef
...
@@ -18,9 +18,17 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
...
@@ -18,9 +18,17 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
BrowseServer
(
'cover_image'
);
BrowseServer
(
'cover_image'
);
});
});
$
(
'#modal-add-do'
).
on
(
'show.bs.modal'
,
function
()
{
/*
$ ('#modal-add-do').on ('show.bs.modal', function () {
$ ("#editor_modal_title").html ("编辑广告");
$ ("#editor_modal_title").html ("编辑广告");
});
});*/
$
(
"#add_banner"
).
on
(
"click"
,
function
(){
$
(
"#editor_modal_title"
).
html
(
"添加广告"
);
$
(
"#id"
).
val
(
""
);
$
(
"#title"
).
val
(
""
);
$
(
"#url"
).
val
(
""
);
$
(
"#cover_image"
).
val
(
""
);
$
(
"#sort"
).
val
(
""
);
})
$
(
"#save_banner"
).
click
(
function
()
{
$
(
"#save_banner"
).
click
(
function
()
{
var
params
=
{};
var
params
=
{};
...
@@ -144,6 +152,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
...
@@ -144,6 +152,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
});
});
function
confirms
(
obj
)
{
function
confirms
(
obj
)
{
$
(
"#editor_modal_title"
).
html
(
"编辑广告"
);
var
item
=
$
(
obj
).
parents
(
"tr"
).
find
(
"td"
);
var
item
=
$
(
obj
).
parents
(
"tr"
).
find
(
"td"
);
$
(
"#id"
).
val
(
$
(
obj
).
attr
(
"data-id"
));
$
(
"#id"
).
val
(
$
(
obj
).
attr
(
"data-id"
));
$
(
"#title"
).
val
(
item
.
eq
(
0
).
html
());
$
(
"#title"
).
val
(
item
.
eq
(
0
).
html
());
...
...
public/resource/template/banner_template_tpl.html
View file @
61d311ef
...
@@ -80,21 +80,22 @@
...
@@ -80,21 +80,22 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"url"
autocomplete=
"off"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"url"
autocomplete=
"off"
placeholder=
"请输入链接"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
readonly=
"readonly"
type=
"text"
name=
"cover_image"
id=
"cover_image"
class=
"require"
/>
<input
readonly=
"readonly"
type=
"text"
name=
"cover_image"
class=
"form-control"
style=
"width: 150px !important;display: inline-block"
<button
class=
"button6 banner_img"
type=
"button"
>
选择图片
</button>
id=
"cover_image"
class=
"require"
placeholder=
"请选择图片"
/>
<button
class=
"banner_img btn btn-default"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
>
建议尺寸288x320
</span>
<span
class=
"tip"
>
建议尺寸288x320
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"sort"
autocomplete=
"off"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"sort"
autocomplete=
"off"
placeholder=
"请输入排序"
>
</div>
</div>
</div>
</div>
...
...
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