You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
905 B
46 lines
905 B
<script>
|
|
import {defaultRequest,defaultRequest4} from 'api/index.js'
|
|
export default {
|
|
data(){
|
|
return {
|
|
backButtonPress:0,
|
|
}
|
|
},
|
|
onLaunch: function() {
|
|
// console.log('App Launch')
|
|
uni.onTabBarMidButtonTap(()=>{
|
|
uni.showTabBar()
|
|
uni.navigateTo({
|
|
url:'/pages/index/index2'
|
|
})
|
|
|
|
|
|
})
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
// console.log('App Hide')
|
|
},
|
|
methods:{
|
|
onBack() {
|
|
this.backButtonPress++;
|
|
if (this.backButtonPress > 1) {
|
|
plus.runtime.quit();
|
|
} else {
|
|
plus.nativeUI.toast('Click again to exit');
|
|
}
|
|
setTimeout(function() {
|
|
this.backButtonPress = 0;
|
|
}, 1000);
|
|
return true;
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/*每个页面公共css */
|
|
@import "@/common/common.scss";
|
|
</style>
|
|
|