main
张涛 8 months ago
parent 9ea14dbba7
commit 4c48ac02a1

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

@ -20,39 +20,11 @@ export default {
data() {
return {
bac: 'transparent',
h: 20
h: 20,
}
},
created() {
// let token = localStorage.getItem('lj_token');
// if (token) this.$router.replace('/home');
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() {
// rempx/36
@ -63,8 +35,8 @@ export default {
$route(val) {
//
window.scroll(0, 0)
}
}
},
},
}
</script>

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

Loading…
Cancel
Save