Commit 07f28489 by 王锐

下拉刷新 滚动加载适配,文件路径修改

parent 67bcb9f7
...@@ -29,20 +29,26 @@ ...@@ -29,20 +29,26 @@
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);
......
...@@ -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>
...@@ -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";
......
...@@ -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: false, // 添加该字段,是否要缓存该组件 keepAlive: true, // 添加该字段,是否要缓存该组件
} }
}, },
......
...@@ -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() {
} }
} }
}; };
......
...@@ -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: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment