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
6091da0d
Commit
6091da0d
authored
May 03, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩周排行暂存1
parent
e5c75771
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
176 additions
and
10 deletions
+176
-10
public.js
public/appnew/src/assets/js/public.js
+29
-2
achieveFork.vue
public/appnew/src/components/achieveMain/achieveFork.vue
+71
-6
achieveForkLi.vue
public/appnew/src/components/achieveMain/achieveForkLi.vue
+72
-0
main.js
public/appnew/src/main.js
+4
-1
public.js
public/resource/js/public.js
+0
-1
No files found.
public/appnew/src/assets/js/public.js
View file @
6091da0d
//公用js文件
let
ServerHost
=
'https://
dev.fujuhaofang
.com'
;
if
(
location
.
origin
===
'https://
web.fujuhaofang.com'
||
location
.
origin
===
'https://admin.fujuhaofang
.com'
)
{
let
ServerHost
=
'https://
pre2.tonglianjituan
.com'
;
if
(
location
.
origin
===
'https://
api.tonglianjituan
.com'
)
{
ServerHost
=
location
.
origin
;
};
import
axios
from
'axios'
;
...
...
@@ -44,6 +44,33 @@ export default {
return
0
;
};
},
h5PageC
(
token
,
fn
){
let
_this
=
this
;
axios
({
method
:
'get'
,
url
:
_this
.
ServerHost
+
'/broker/getAgentsByPhone'
,
responseType
:
'json'
,
data
:
{
'AuthToken'
:
token
}
})
.
then
(
function
(
response
)
{
if
(
response
.
data
.
code
==
200
){
localStorage
.
setItem
(
'token'
,
response
.
data
.
data
.
token
);
//存储登录的token值
localStorage
.
setItem
(
'userid'
,
response
.
data
.
data
.
id
);
//存储用户id
localStorage
.
setItem
(
'userphone'
,
response
.
data
.
data
.
phone
);
//存储用户名字
localStorage
.
setItem
(
'username'
,
response
.
data
.
data
.
name
);
//存储用户电话号码
localStorage
.
setItem
(
'userinfo'
,
encodeURIComponent
(
JSON
.
stringify
(
response
.
data
.
data
)));
//存储用户所有信息
fn
&&
fn
();
}
else
{
layer
.
tipsX
(
response
.
data
.
msg
);
return
false
;
}
})
.
catch
(
function
(
error
)
{
layer
.
tipsX
(
error
);
});
},
Compatible
(
obj
)
{
if
(
this
.
isIos
())
{
try
{
...
...
public/appnew/src/components/achieveMain/achieveFork.vue
View file @
6091da0d
...
...
@@ -2,19 +2,29 @@
<div>
<header-pulic
:data=
"headerData"
></header-pulic>
<nav>
<div
class=
"active"
>
人员排行
</div>
<div>
门店排行
</div>
<div>
区域排行
</div>
<div
v-for=
"(item, index) in mainData"
:key=
"item.title"
:class=
"
{active:index === initTabNumMain}" @click="tabMain(index)">
{{
item
.
title
}}
</div>
</nav>
<main>
<section
class=
"main-sec"
v-for=
"(item, index) in mainData"
:key=
"item.title"
v-show=
"index === initTabNumMain"
>
<ul>
<li
v-for=
"(item2, index2) in item.listData"
>
<achieve-fork-li
:data=
"item2"
:dataindex=
"index2"
></achieve-fork-li>
</li>
</ul>
</section>
</main>
</div>
</
template
>
<
script
>
import
headerPulic
from
'@/components/publicEg/headPublic'
;
import
achieveForkLi
from
'@/components/achieveMain/achieveForkLi'
;
import
'@/assets/js/layer041002.js'
;
export
default
{
components
:
{
'header-pulic'
:
headerPulic
'header-pulic'
:
headerPulic
,
'achieve-fork-li'
:
achieveForkLi
},
data
()
{
return
{
...
...
@@ -23,10 +33,65 @@
'noborder'
:
true
,
'isBack'
:
true
},
token
:
''
,
userid
:
''
,
initTabNumMain
:
0
,
mainData
:[{
'title'
:
'人员排行'
,
'topLineNum'
:
5
,
'listData'
:
[]
},{
'title'
:
'门店排行'
,
'topLineNum'
:
5
,
'listData'
:
[]
},{
'title'
:
'部门排行'
,
'topLineNum'
:
Number
.
POSITIVE_INFINITY
,
'listData'
:
[]
}]
}
},
created
()
{
let
_this
=
this
;
let
_token
=
_this
.
$route
.
query
.
token
;
if
(
!
_token
){
layer
.
tipsX
(
'token获取出错'
);
return
false
;
};
_this
.
common
.
h5PageC
(
_token
,
function
(){
_this
.
loadMain
();
});
},
methods
:
{
loadMain
()
{
let
_this
=
this
;
_this
.
token
=
localStorage
.
getItem
(
'token'
);
_this
.
userid
=
localStorage
.
getItem
(
'userid'
);
_this
.
axios
({
method
:
'get'
,
url
:
'/broker/selectPerformanceByTime'
,
responseType
:
'json'
,
data
:
{
'agent_id'
:
_this
.
userid
,
'type'
:
1
,
'AuthToken'
:
_this
.
token
}
})
.
then
(
function
(
response
)
{
if
(
response
.
data
.
code
==
200
){
_this
.
mainData
[
0
].
listData
=
response
.
data
.
data
.
list
;
}
else
{
layer
.
tipsX
(
response
.
data
.
msg
);
}
})
.
catch
(
function
(
error
)
{
layer
.
tipsX
(
error
);
});
},
tabMain
(
index
)
{
let
_this
=
this
;
_this
.
initTabNumMain
=
index
;
}
}
}
</
script
>
...
...
public/appnew/src/components/achieveMain/achieveForkLi.vue
0 → 100644
View file @
6091da0d
<
template
>
<div
class=
"rank-li oh"
>
<div>
{{
dataindex
+
1
}}
</div>
<div><img
:src=
"data.img"
/></div>
<div>
<p>
{{
data
.
name
}}
</p>
<p>
{{
data
.
district_name
+
data
.
store_name
}}
</p>
</div>
<div>
<p>
{{
data
.
performance_total
}}
</p>
<p>
业绩
</p>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{
message
:
'hello'
}
}
},
dataindex
:
{
type
:
String
,
default
:
function
()
{
return
'0'
}
}
},
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
>
.rank-li
{
background-color
:
white
;
padding
:
0
.3rem
;
height
:
1.4rem
;
}
.rank-li
>
div
{
float
:
left
;
}
.rank-li
>
div
:nth-of-type
(
1
)
{
width
:
.4rem
;
line-height
:
1.4rem
;
font-size
:
.3rem
;
color
:
rgb
(
102
,
102
,
102
);
}
.rank-li
>
div
:nth-of-type
(
1
)
{
width
:
1.21rem
;
height
:
1.21rem
;
overflow
:
hidden
;
}
.rank-li
>
div
:nth-of-type
(
1
)>
img
{
float
:
left
;
width
:
.98rem
;
height
:
.98rem
;
}
</
style
>
\ No newline at end of file
public/appnew/src/main.js
View file @
6091da0d
...
...
@@ -22,7 +22,10 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded
axios
.
interceptors
.
request
.
use
((
config
)
=>
{
if
(
config
.
method
===
'post'
)
{
config
.
data
=
qs
.
stringify
(
config
.
data
);
};
}
else
if
(
config
.
method
===
'get'
){
config
.
params
=
config
.
data
;
delete
config
.
data
;
//删除原data属性
}
else
{};
return
config
;
},
(
error
)
=>
{
return
Promise
.
reject
(
error
);
...
...
public/resource/js/public.js
View file @
6091da0d
...
...
@@ -30,7 +30,6 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t
function
menu_bar
()
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
sessionStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
console
.
log
(
user_info_obj
);
$
(
"#menu_bar"
).
append
(
template
);
...
...
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