Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fj_app
Project
Overview
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
王锐
fj_app
Commits
07f28489
You need to sign in or sign up before continuing.
Commit
07f28489
authored
May 05, 2019
by
王锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下拉刷新 滚动加载适配,文件路径修改
parent
67bcb9f7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
41 deletions
+46
-41
index.html
index.html
+19
-12
App.vue
src/App.vue
+16
-20
main.js
src/main.js
+2
-2
car.js
src/routes/car.js
+1
-1
home.vue
src/views/home/home.vue
+7
-5
user.vue
src/views/user/user.vue
+1
-1
No files found.
index.html
View file @
07f28489
...
...
@@ -26,23 +26,29 @@
}
function
plusReady
()
{
var
ws
=
plus
.
webview
.
currentWebview
();
}
var
ws
=
plus
.
webview
.
currentWebview
();
}
// window.GLOBAL = {}
// mui.init({
// keyEventBind: {
// backbutton: true //关闭back按键监听
// }
// });
//首页返回键处理
//处理逻辑:1秒内,连续两次按返回键,则退出应用;
mui
.
init
({
keyEventBind
:
{
backbutton
:
true
//关闭back按键监听
}
});
console
.
log
(
window
.
location
.
href
)
var
first
=
null
;
mui
.
back
=
function
()
{
//首次按键,提示‘再按一次退出应用’
if
(
!
first
)
{
first
=
new
Date
().
getTime
();
//记录第一次按下回退键的时间
mui
.
toast
(
'再按一次退出应用'
);
//给出提示
// history.go(0)//回退到上一页面
//给出提示
if
(
/home/
.
test
(
window
.
location
.
href
))
{
mui
.
toast
(
'再按一次退出应用'
);
}
else
{
history
.
go
(
-
1
)
//回退到上一页面
}
setTimeout
(
function
()
{
//1s中后清除
first
=
null
;
},
1000
);
...
...
@@ -55,7 +61,7 @@
};
</script>
</body>
</html>
\ No newline at end of file
src/App.vue
View file @
07f28489
<
template
>
<div>
<!--
<transition
name=
"fade"
mode=
"out-in"
>
-->
<keep-alive>
<router-view
v-if=
"$route.meta.keepAlive"
></router-view>
</keep-alive>
<keep-alive>
<router-view
v-if=
"$route.meta.keepAlive"
></router-view>
</keep-alive>
<!--
</transition>
-->
<loading
v-show=
"bLoading"
></loading>
<!--
<transition
name=
"fade"
mode=
"out-in"
>
-->
<router-view
v-if=
"!$route.meta.keepAlive"
></router-view>
<router-view
v-if=
"!$route.meta.keepAlive"
></router-view>
<!--
</transition>
-->
<footera
v-show=
"this.$root.$data.bfoot"
></footera>
</div>
...
...
@@ -78,9 +78,18 @@
transform
:
rotate
(
135deg
);
content
:
""
;
}
p
{
font-weight
:
normal
;
}
/* a:active {
background: rgb(194, 193, 193);
color: rgb(78, 78, 78);
} */
@import
"./assets/icon/iconfont.css"
;
@import
"./assets/style/index.scss"
;
</
style
>
<
script
>
import
{
mapActions
,
mapGetters
,
mapState
}
from
"Vuex"
;
import
{
mapActions
,
mapGetters
,
mapState
}
from
"Vuex"
;
import
footera
from
"./components/footera"
;
import
loading
from
"./components/loading"
;
export
default
{
...
...
@@ -104,9 +113,7 @@ export default {
// this.getUserInfo();
// }
// },
created
(){
},
created
()
{},
watch
:
{
$route
:
{
handler
:
function
(
newvalue
)
{
...
...
@@ -121,15 +128,4 @@ created(){
}
};
</
script
>
<
style
>
p
{
font-weight
:
normal
;
}
a
:active
{
background
:
rgb
(
194
,
193
,
193
);
color
:
rgb
(
78
,
78
,
78
)
}
@import
"./assets/icon/iconfont.css"
;
@import
"./assets/style/index.scss"
;
</
style
>
src/main.js
View file @
07f28489
...
...
@@ -6,8 +6,8 @@ import {
// import 'Components'// 全局组件注册
import
$
from
"jquery"
import
pdf
from
'./components/pdf'
Vue
.
use
(
pdf
)
//
import pdf from './components/pdf'
//
Vue.use(pdf)
// import mui from './assets/js/mui.min.js'
// Vue.prototype.$mui = mui;
import
"Directives"
;
...
...
src/routes/car.js
View file @
07f28489
...
...
@@ -3,7 +3,7 @@ export default [{
path
:
"/home"
,
component
:
resolve
=>
require
([
'Views/home/home'
],
resolve
),
meta
:
{
keepAlive
:
fals
e
,
// 添加该字段,是否要缓存该组件
keepAlive
:
tru
e
,
// 添加该字段,是否要缓存该组件
}
},
...
...
src/views/home/home.vue
View file @
07f28489
...
...
@@ -68,17 +68,19 @@
</div>
</router-link>
</div>
<img
style=
"width:100%"
src=
"../../assets/img/home_bottom.png"
alt=
""
>
<img
style=
"width:100%"
src=
"../../assets/img/home_bottom.png"
alt
>
</div>
</
template
>
<
script
>
import
swiper
from
"../../components/swiper"
;
export
default
{
components
:
{
swiper
},
methods
:{
scancode
(){
this
.
$router
.
push
({
path
:
'qrcode'
})
methods
:
{
scancode
()
{
this
.
$router
.
push
({
path
:
"qrcode"
});
},
created
()
{
}
}
};
...
...
src/views/user/user.vue
View file @
07f28489
...
...
@@ -78,7 +78,7 @@ export default {
vm
.
username
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
DisplayName
;
vm
.
phone
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
phone
;
vm
.
Avatar
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
Avatar
console
.
log
(
vm
.
username
)
},
methods
:
{
...
...
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