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
abb6342d
Commit
abb6342d
authored
Apr 08, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总监周报
parent
a9b58c82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
7 deletions
+63
-7
weekly.html
application/app_broker/view/index/weekly.html
+2
-2
weekly.js
public/app/js/weekly.js
+61
-5
No files found.
application/app_broker/view/index/weekly.html
View file @
abb6342d
...
@@ -73,9 +73,9 @@
...
@@ -73,9 +73,9 @@
<li
style=
"overflow: hidden;line-height: .9rem;padding-bottom: 1.6rem;display: none;"
class=
"is-zongjian-week"
>
<li
style=
"overflow: hidden;line-height: .9rem;padding-bottom: 1.6rem;display: none;"
class=
"is-zongjian-week"
>
<span
style=
"margin-left: .76rem;font-size: .3rem;color: #333;"
>
选择城市
</span>
<span
style=
"margin-left: .76rem;font-size: .3rem;color: #333;"
>
选择城市
</span>
<span
class=
"city-zongjian"
>
<span
class=
"city-zongjian"
>
<span
class=
"achieve-span"
data-city=
'10001'
>
上海
</span>
<
!--<
span class="achieve-span" data-city='10001'>上海</span>
<span class="no-achieve-span" data-city='10002'>杭州</span>
<span class="no-achieve-span" data-city='10002'>杭州</span>
<span
class=
"no-achieve-span"
data-city=
'10003'
>
深圳
</span>
<span class="no-achieve-span" data-city='10003'>深圳</span>
-->
</span>
</span>
</li>
</li>
...
...
public/app/js/weekly.js
View file @
abb6342d
...
@@ -9,14 +9,15 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
...
@@ -9,14 +9,15 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
//总监周报 城市选择
//总监周报 城市选择
if
(
localStorage
.
getItem
(
'userlevel'
)
*
1
!=
20
){
//总监
if
(
localStorage
.
getItem
(
'userlevel'
)
*
1
!=
20
){
//总监
$
(
'.is-zongjian-week'
).
show
();
$
(
'.is-zongjian-week'
).
show
();
var
city_zhongjian
=
'10001'
;
$
(
document
).
on
(
'click'
,
'.city-zongjian>span'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.city-zongjian>span'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
_this
.
removeClass
(
'no-achieve-span'
).
addClass
(
'achieve-span'
).
siblings
().
removeClass
(
'achieve-span'
).
addClass
(
'no-achieve-span'
);
_this
.
removeClass
(
'no-achieve-span'
).
addClass
(
'achieve-span'
).
siblings
().
removeClass
(
'achieve-span'
).
addClass
(
'no-achieve-span'
);
var
city_zhongjian
=
_this
.
attr
(
'data-city'
);
var
city_zhongjian
=
_this
.
attr
(
'data-id'
);
localStorage
.
setItem
(
'city_zongjian_liu'
,
city_zhongjian
);
localStorage
.
setItem
(
'userid'
,
city_zhongjian
);
localStorage
.
setItem
(
'useridliu'
,
city_zhongjian
);
//缓存数据 识别
});
});
}
}
...
@@ -32,7 +33,11 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
...
@@ -32,7 +33,11 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
document
.
body
.
style
.
display
=
'block'
;
document
.
body
.
style
.
display
=
'block'
;
if
(
_appToken
!==
null
)
{
if
(
_appToken
!==
null
)
{
h5PageC
(
_appToken
,
function
(
data
)
{
h5PageC
(
_appToken
,
function
(
data
)
{
if
(
localStorage
.
getItem
(
'userlevel'
)
*
1
!=
20
){
//总监
_this
.
getCity
();
//总监才调用接口
};
_this
.
loadMain
();
_this
.
loadMain
();
});
});
}
else
{
}
else
{
_this
.
loadMain
();
_this
.
loadMain
();
...
@@ -47,7 +52,8 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
...
@@ -47,7 +52,8 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
//如果之前有存储的用户输入数据,则打开询问框,总监周报
//如果之前有存储的用户输入数据,则打开询问框,总监周报
var
_mdzjZbData
=
localStorage
.
getItem
(
'mdzjZbData'
)
==
null
?
''
:
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'mdzjZbData'
)));
//用户输入的存储
var
_mdzjZbData
=
localStorage
.
getItem
(
'mdzjZbData'
)
==
null
?
''
:
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'mdzjZbData'
)));
//用户输入的存储
if
(
_mdzjZbData
&&
_mdzjZbData
[
'userId'
]
==
localStorage
.
getItem
(
'userid'
)){
if
(
_mdzjZbData
&&
_mdzjZbData
[
'userId'
]
==
localStorage
.
getItem
(
'useridliu'
)){
// if(_mdzjZbData && _mdzjZbData['userId'] == localStorage.getItem('userid')){
layer
.
open
({
layer
.
open
({
content
:
'您有未完成的内容,是否继续?'
,
content
:
'您有未完成的内容,是否继续?'
,
btn
:
[
'前往'
,
'留在本页'
],
btn
:
[
'前往'
,
'留在本页'
],
...
@@ -130,7 +136,56 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
...
@@ -130,7 +136,56 @@ require(['vue', 'vconsole', 'css!style/weekly.css', 'jquery0325', 'common'], fun
}
else
{
}
else
{
layerTipsX
(
'开始时间不能大于结束时间,请重新选择'
);
layerTipsX
(
'开始时间不能大于结束时间,请重新选择'
);
};
};
}
},
getCity
:
function
(){
//获取总监城市
$
.
ajax
({
type
:
'GET'
,
url
:
ServerHostTempC
+
'/broker/getAgentDistrictId'
,
data
:
{
'AuthToken'
:
localStorage
.
getItem
(
'token'
),
'phone'
:
localStorage
.
getItem
(
'userphone'
)
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
if
(
_data
.
data
.
length
){
var
span_city
=
''
;
$
.
each
(
_data
.
data
,
function
(
i
,
item
)
{
span_city
+=
'<span class="" data-id="'
+
item
.
id
+
'">'
+
item
.
name
+
'</span>'
;
});
$
(
".city-zongjian"
).
html
(
span_city
);
//默认选中第一个城市 并且缓存对应城市的id
$
(
".city-zongjian span:eq(0)"
).
addClass
(
'achieve-span'
);
$
(
".city-zongjian span:gt(0)"
).
addClass
(
'no-achieve-span'
);
localStorage
.
setItem
(
'userid'
,
_data
.
data
[
0
].
id
);
localStorage
.
setItem
(
'useridliu'
,
_data
.
data
[
0
].
id
);
}
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'data type error'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'overtime'
);
};
}
});
},
}
}
});
});
});
});
\ 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