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
a00bf04d
Commit
a00bf04d
authored
Jan 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商圈是否显示
parent
b109ac65
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
6 deletions
+49
-6
BusinessDistrict.php
application/index/controller/BusinessDistrict.php
+9
-3
business_district.js
public/resource/js/business_district.js
+31
-0
business_district_template_tpl.html
public/resource/template/business_district_template_tpl.html
+9
-3
No files found.
application/index/controller/BusinessDistrict.php
View file @
a00bf04d
...
@@ -27,6 +27,7 @@ class BusinessDistrict extends Basic
...
@@ -27,6 +27,7 @@ class BusinessDistrict extends Basic
$params
=
$this
->
request
->
param
();
$params
=
$this
->
request
->
param
();
$business
=
new
GBusinessDistrict
();
$business
=
new
GBusinessDistrict
();
if
(
$params
[
'type'
]
==
NULL
)
{
$data
[
'province'
]
=
$params
[
'province'
];
$data
[
'province'
]
=
$params
[
'province'
];
$data
[
'city'
]
=
$params
[
'city'
];
$data
[
'city'
]
=
$params
[
'city'
];
$data
[
'disc'
]
=
$params
[
'disc'
];
$data
[
'disc'
]
=
$params
[
'disc'
];
...
@@ -36,13 +37,18 @@ class BusinessDistrict extends Basic
...
@@ -36,13 +37,18 @@ class BusinessDistrict extends Basic
$data
[
'disc_code'
]
=
$params
[
'disc_code'
];
$data
[
'disc_code'
]
=
$params
[
'disc_code'
];
$data
[
'name'
]
=
$params
[
'business'
];
$data
[
'name'
]
=
$params
[
'business'
];
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
$data
[
'id'
])
{
}
else
{
$business
->
save
(
$data
,
[
'id'
=>
$params
[
'id'
]]);
$data
[
'status'
]
=
$params
[
'type'
];
}
if
(
$params
[
'id'
])
{
$num
=
$business
->
save
(
$data
,
[
'id'
=>
$params
[
'id'
]]);
}
else
{
}
else
{
$business
->
save
(
$data
);
$business
->
save
(
$data
);
$num
=
$business
->
id
;
}
}
if
(
$
business
->
id
)
{
if
(
$
num
)
{
$result
[
'code'
]
=
200
;
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
'添加成功'
;
$result
[
'msg'
]
=
'添加成功'
;
}
else
{
}
else
{
...
...
public/resource/js/business_district.js
View file @
a00bf04d
...
@@ -90,6 +90,37 @@ define (['doT', 'text!temp/business_district_template_tpl.html', 'css!style/home
...
@@ -90,6 +90,37 @@ define (['doT', 'text!temp/business_district_template_tpl.html', 'css!style/home
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
business
.
delBusiness
();
business
.
delBusiness
();
});
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"不显示"
)
{
params
.
type
=
1
;
$
(
this
).
html
(
'显示'
);
}
else
{
params
.
type
=
0
;
$
(
this
).
html
(
'不显示'
);
}
$
.
ajax
({
url
:
'/index/editBusinessDistrict.html'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
business
.
getList
(
1
);
}
else
{
alert
(
'修改显示失败'
);
}
}
});
});
},
},
getList
:
function
(
pageNo
)
{
getList
:
function
(
pageNo
)
{
business
.
pageNo
=
pageNo
;
business
.
pageNo
=
pageNo
;
...
...
public/resource/template/business_district_template_tpl.html
View file @
a00bf04d
...
@@ -9,15 +9,21 @@
...
@@ -9,15 +9,21 @@
<
td
>
[
%=
it
[
item
][
'disc'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'disc'
]
%
]
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
显示
[
%
}
else
{
%
]
不显示
不显示
[
%
}
else
{
%
]
显示
[
%
}
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
<
td
>
<
a
title
=
"编辑"
class
=
"btn btn-success btn-xs edit_modal"
href
=
"#modal_business"
data
-
toggle
=
"modal"
class
=
"btn btn-default"
data
-
id
=
"[%= it[item]['id']%]"
style
=
"margin-right:6px;"
>
编辑
<
/a
>
<
a
title
=
"编辑"
class
=
"btn btn-success btn-xs edit_modal"
href
=
"#modal_business"
data
-
toggle
=
"modal"
class
=
"btn btn-default"
data
-
id
=
"[%= it[item]['id']%]"
style
=
"margin-right:6px;"
>
编辑
<
/a
>
<
a
title
=
"权限分配"
class
=
"btn btn-info btn-xs"
href
=
"#modal-do"
style
=
"margin-right:6px;"
>
是否显示
<
/a
>
<
a
title
=
"权限分配"
class
=
"btn btn-info btn-xs is_show"
href
=
"#modal-do"
data
-
id
=
"[%= it[item]['id']%]"
style
=
"margin-right:6px;"
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
不显示
[
%
}
else
{
%
]
显示
[
%
}
%
]
<
/a
>
<
a
title
=
"成员授权"
class
=
"btn btn-danger btn-xs del_modal"
href
=
"#modal-delete"
data
-
toggle
=
"modal"
class
=
"btn btn-default"
data
-
id
=
'[%= it[item]["id"] %]'
style
=
"margin-right:6px;"
>
删除
<
/a
>
<
a
title
=
"成员授权"
class
=
"btn btn-danger btn-xs del_modal"
href
=
"#modal-delete"
data
-
toggle
=
"modal"
class
=
"btn btn-default"
data
-
id
=
'[%= it[item]["id"] %]'
style
=
"margin-right:6px;"
>
删除
<
/a
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
...
...
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