Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
songxia-wxherr
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
songxia-wxherr
Commits
9209fbdc
Commit
9209fbdc
authored
Jun 16, 2017
by
夏彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
fe3cd4b3
1e22ba1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
30 deletions
+46
-30
main.js
src/main.js
+31
-0
home.vue
src/pages/home.vue
+14
-26
trouble-cate.vue
src/pages/trouble-cate.vue
+1
-4
No files found.
src/main.js
View file @
9209fbdc
...
...
@@ -20,4 +20,35 @@ var router = new VueRouter({
new
Vue
({
router
:
router
}).
$mount
(
'#app'
);
//统计代码
if
(
process
.
env
.
NODE_ENV
==
'production'
)
{
var
statsCode
=
[
//Baidu
'<div style="display:none;"><script src="https://s11.cnzz.com/z_stat.php?id=1261935488&web_id=1261935488" language="JavaScript"></script></div>'
,
//CNZZ
'<script>var _hmt = _hmt || [];
\
(function() {
\
var hm = document.createElement("script");
\
hm.src = "https://hm.baidu.com/hm.js?855e4edbc305d4a2a1f770c17fd15ef0";
\
var s = document.getElementsByTagName("script")[0];
\
s.parentNode.insertBefore(hm, s);
\
})();</script>'
];
document
.
write
(
statsCode
.
join
(
''
));
router
.
afterEach
(
function
(
to
,
from
)
{
var
contentUrl
=
location
.
pathname
+
'#'
+
to
.
path
;
var
refererUrl
=
location
.
pathname
+
'#'
+
from
.
path
;
if
(
typeof
(
_hmt
)
!=
'undefined'
)
{
_hmt
.
push
([
'_trackPageview'
,
contentUrl
]);
}
if
(
typeof
(
_czc
)
!=
'undefined'
)
{
_czc
.
push
([
"_trackPageview"
,
contentUrl
,
refererUrl
]);
}
console
.
log
(
"from %s to %s"
,
refererUrl
,
contentUrl
);
});
}
src/pages/home.vue
View file @
9209fbdc
...
...
@@ -193,14 +193,11 @@ export default {
},
searchable
()
{
return
!
(
this
.
categoryId
==
0
||
this
.
code
==
''
||
(
this
.
isUseCaptcha
&&
!
this
.
isCheckCaptcha
));
},
targetUrl
()
{
return
{
path
:
'/code/'
+
this
.
brandId
+
'/'
+
this
.
categoryId
,
query
:
{
code
:
this
.
code
}};
},
}
},
mounted
()
{
this
.
isBanshou
=
common
.
isBanshou
();
// this.checkLogin();
var
self
=
this
;
document
.
title
=
'松下快查'
;
...
...
@@ -316,8 +313,11 @@ export default {
searchCode
()
{
var
self
=
this
;
if
(
!
self
.
searchable
)
{
if
(
self
.
blurSearch
)
{
self
.
blurSearch
=
false
;
}
if
(
!
self
.
searchable
)
{
return
false
;
}
...
...
@@ -347,20 +347,13 @@ export default {
return
;
}
var
url
=
common
.
getUrl
(
'#/code/'
+
self
.
brandId
+
'/'
+
self
.
categoryId
)
+
"?code="
+
encodeURIComponent
(
code
)
+
"&t="
+
res
.
data
.
tk
;
var
invite
=
common
.
getParameterByName
(
'invite'
);
if
(
invite
)
{
url
=
url
+
'&invite='
+
invite
}
if
(
!
self
.
isLogin
)
{
common
.
requestLogin
(
url
);
return
false
;
}
self
.
$router
.
push
(
self
.
targetUrl
);
self
.
$router
.
push
({
path
:
'/code/'
+
self
.
brandId
+
'/'
+
self
.
categoryId
,
query
:
{
code
:
code
,
tk
:
res
.
data
.
tk
}
});
});
return
false
;
...
...
@@ -428,12 +421,7 @@ export default {
onSelect
:
function
(
item
)
{
if
(
self
.
code
!=
item
.
data
)
{
self
.
code
=
item
.
data
;
if
(
!
self
.
searchable
)
{
self
.
blurSearch
=
false
;
}
else
{
self
.
searchCode
();
}
self
.
searchCode
();
}
}
});
...
...
src/pages/trouble-cate.vue
View file @
9209fbdc
...
...
@@ -28,12 +28,9 @@ import api from '../utils/api';
};
},
mounted
()
{
document
.
title
=
"故障现象查询"
;
let
self
=
this
;
common
.
checkLoginCllback
(
function
()
{
self
.
checkHasInvite
();
});
//加载品类列表
api
.
get
(
"brand/get-category-trouble-list"
).
done
(
res
=>
{
if
(
res
.
status
)
{
...
...
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