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
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 @@
...
@@ -26,23 +26,29 @@
}
}
function
plusReady
()
{
function
plusReady
()
{
var
ws
=
plus
.
webview
.
currentWebview
();
var
ws
=
plus
.
webview
.
currentWebview
();
}
}
// window.GLOBAL = {}
// window.GLOBAL = {}
// mui.init({
mui
.
init
({
// keyEventBind: {
keyEventBind
:
{
// backbutton: true //关闭back按键监听
backbutton
:
true
//关闭back按键监听
// }
}
// });
});
//首页返回键处理
//处理逻辑:1秒内,连续两次按返回键,则退出应用;
console
.
log
(
window
.
location
.
href
)
var
first
=
null
;
var
first
=
null
;
mui
.
back
=
function
()
{
mui
.
back
=
function
()
{
//首次按键,提示‘再按一次退出应用’
//首次按键,提示‘再按一次退出应用’
if
(
!
first
)
{
if
(
!
first
)
{
first
=
new
Date
().
getTime
();
//记录第一次按下回退键的时间
first
=
new
Date
().
getTime
();
//记录第一次按下回退键的时间
mui
.
toast
(
'再按一次退出应用'
);
//给出提示
//给出提示
// history.go(0)//回退到上一页面
if
(
/home/
.
test
(
window
.
location
.
href
))
{
mui
.
toast
(
'再按一次退出应用'
);
}
else
{
history
.
go
(
-
1
)
//回退到上一页面
}
setTimeout
(
function
()
{
//1s中后清除
setTimeout
(
function
()
{
//1s中后清除
first
=
null
;
first
=
null
;
},
1000
);
},
1000
);
...
@@ -55,7 +61,7 @@
...
@@ -55,7 +61,7 @@
};
};
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/App.vue
View file @
07f28489
<
template
>
<
template
>
<div>
<div>
<!--
<transition
name=
"fade"
mode=
"out-in"
>
-->
<!--
<transition
name=
"fade"
mode=
"out-in"
>
-->
<keep-alive>
<keep-alive>
<router-view
v-if=
"$route.meta.keepAlive"
></router-view>
<router-view
v-if=
"$route.meta.keepAlive"
></router-view>
</keep-alive>
</keep-alive>
<!--
</transition>
-->
<!--
</transition>
-->
<loading
v-show=
"bLoading"
></loading>
<loading
v-show=
"bLoading"
></loading>
<!--
<transition
name=
"fade"
mode=
"out-in"
>
-->
<!--
<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>
-->
<!--
</transition>
-->
<footera
v-show=
"this.$root.$data.bfoot"
></footera>
<footera
v-show=
"this.$root.$data.bfoot"
></footera>
</div>
</div>
...
@@ -78,9 +78,18 @@
...
@@ -78,9 +78,18 @@
transform
:
rotate
(
135deg
);
transform
:
rotate
(
135deg
);
content
:
""
;
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
>
</
style
>
<
script
>
<
script
>
import
{
mapActions
,
mapGetters
,
mapState
}
from
"Vuex"
;
import
{
mapActions
,
mapGetters
,
mapState
}
from
"Vuex"
;
import
footera
from
"./components/footera"
;
import
footera
from
"./components/footera"
;
import
loading
from
"./components/loading"
;
import
loading
from
"./components/loading"
;
export
default
{
export
default
{
...
@@ -104,9 +113,7 @@ export default {
...
@@ -104,9 +113,7 @@ export default {
// this.getUserInfo();
// this.getUserInfo();
// }
// }
// },
// },
created
(){
created
()
{},
},
watch
:
{
watch
:
{
$route
:
{
$route
:
{
handler
:
function
(
newvalue
)
{
handler
:
function
(
newvalue
)
{
...
@@ -121,15 +128,4 @@ created(){
...
@@ -121,15 +128,4 @@ created(){
}
}
};
};
</
script
>
</
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 {
...
@@ -6,8 +6,8 @@ import {
// import 'Components'// 全局组件注册
// import 'Components'// 全局组件注册
import
$
from
"jquery"
import
$
from
"jquery"
import
pdf
from
'./components/pdf'
//
import pdf from './components/pdf'
Vue
.
use
(
pdf
)
//
Vue.use(pdf)
// import mui from './assets/js/mui.min.js'
// import mui from './assets/js/mui.min.js'
// Vue.prototype.$mui = mui;
// Vue.prototype.$mui = mui;
import
"Directives"
;
import
"Directives"
;
...
...
src/routes/car.js
View file @
07f28489
...
@@ -3,7 +3,7 @@ export default [{
...
@@ -3,7 +3,7 @@ export default [{
path
:
"/home"
,
path
:
"/home"
,
component
:
resolve
=>
require
([
'Views/home/home'
],
resolve
),
component
:
resolve
=>
require
([
'Views/home/home'
],
resolve
),
meta
:
{
meta
:
{
keepAlive
:
fals
e
,
// 添加该字段,是否要缓存该组件
keepAlive
:
tru
e
,
// 添加该字段,是否要缓存该组件
}
}
},
},
...
...
src/views/home/home.vue
View file @
07f28489
...
@@ -68,17 +68,19 @@
...
@@ -68,17 +68,19 @@
</div>
</div>
</router-link>
</router-link>
</div>
</div>
<img
style=
"width:100%"
src=
"../../assets/img/home_bottom.png"
alt=
""
>
<img
style=
"width:100%"
src=
"../../assets/img/home_bottom.png"
alt
>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
swiper
from
"../../components/swiper"
;
import
swiper
from
"../../components/swiper"
;
export
default
{
export
default
{
components
:
{
swiper
},
components
:
{
swiper
},
methods
:{
methods
:
{
scancode
(){
scancode
()
{
this
.
$router
.
push
({
path
:
'qrcode'
})
this
.
$router
.
push
({
path
:
"qrcode"
});
},
created
()
{
}
}
}
}
};
};
...
...
src/views/user/user.vue
View file @
07f28489
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
vm
.
username
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
DisplayName
;
vm
.
username
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
DisplayName
;
vm
.
phone
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
phone
;
vm
.
phone
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
phone
;
vm
.
Avatar
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
Avatar
vm
.
Avatar
=
JSON
.
parse
(
getStore
(
"userinfo"
)).
Avatar
console
.
log
(
vm
.
username
)
},
},
methods
:
{
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