main
laozt 1 year ago
parent 9ea14dbba7
commit 4c48ac02a1

@ -18,6 +18,7 @@
"leaflet": "^1.5.1", "leaflet": "^1.5.1",
"moment": "^2.24.0", "moment": "^2.24.0",
"vant": "^2.0.3", "vant": "^2.0.3",
"vconsole": "^3.15.1",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-cropper": "^0.4.9", "vue-cropper": "^0.4.9",
"vue-router": "^3.0.3", "vue-router": "^3.0.3",

@ -20,39 +20,11 @@ export default {
data() { data() {
return { return {
bac: 'transparent', bac: 'transparent',
h: 20 h: 20,
} }
}, },
created() { created() {
// let token = localStorage.getItem('lj_token');
// if (token) this.$router.replace('/home');
let _this = this let _this = this
//
let h = window.plus.navigator.getStatusbarHeight() //
this.config.setBarHeight(h)
localStorage.setItem('mudu_bar', h)
var first = null
window.plus.key.addEventListener(
'backbutton',
function() {
if (!first) {
first = new Date().getTime() // 退
// _this.$toast({ message: '退', position: 'bottom' }) //
history.go(-1) // 退
setTimeout(function() {
// 1s
first = null
}, 1000)
} else {
if (new Date().getTime() - first < 1000) {
// 1s
window.plus.runtime.quit() // 退app
}
}
},
false
)
}, },
mounted() { mounted() {
// rempx/36 // rempx/36
@ -63,8 +35,8 @@ export default {
$route(val) { $route(val) {
// //
window.scroll(0, 0) window.scroll(0, 0)
} },
} },
} }
</script> </script>

@ -14,6 +14,7 @@ import '@vant/touch-emulator'
import 'vant/lib/index.css' import 'vant/lib/index.css'
import './assets/css/vant-ui.scss' import './assets/css/vant-ui.scss'
import './assets/css/style.css' import './assets/css/style.css'
import VConsole from 'vconsole'
import moment from 'moment' import moment from 'moment'
import 'moment/locale/zh-cn' import 'moment/locale/zh-cn'
@ -27,17 +28,20 @@ Vue.config.productionTip = false
moment.locale('zh-cn') moment.locale('zh-cn')
Vue.prototype.$moment = moment Vue.prototype.$moment = moment
const vConsole = new VConsole({ theme: 'dark' })
Vue.use(vConsole)
Vue.prototype.config = { Vue.prototype.config = {
barHeight: 20, barHeight: 20,
setBarHeight(h) { setBarHeight(h) {
this.barHeight = h this.barHeight = h
} },
} }
// PC调式版本 // PC调式版本
new Vue({ new Vue({
router, router,
render: h => h(App) render: (h) => h(App),
}).$mount('#app') }).$mount('#app')
// 手机打包版本 // 手机打包版本

Loading…
Cancel
Save