flat: 国庆节暂存
This commit is contained in:
24
main.js
24
main.js
@@ -8,6 +8,9 @@ import tools from '@/untils/tools.js'
|
||||
import {
|
||||
VueJsonp
|
||||
} from 'vue-jsonp'
|
||||
import {
|
||||
GoLogin
|
||||
} from '@/untils/AxiosUtils.js';
|
||||
// 注册全局组件
|
||||
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
|
||||
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
|
||||
@@ -16,9 +19,21 @@ import {
|
||||
|
||||
import empty from '@/components/empty/empty.vue'
|
||||
|
||||
function haslogin() {
|
||||
return !!store.state.user.token
|
||||
}
|
||||
|
||||
function hasResume() { // 是否填写简历
|
||||
const data = store.state.user.resumeInfo
|
||||
if (!(data.education && data.telephone && data.wage && data.workplace)) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function navTo(url, needLogin) {
|
||||
console.log(url)
|
||||
if (needLogin) {
|
||||
if (needLogin && !haslogin()) {
|
||||
GoLogin()
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
@@ -26,6 +41,7 @@ function navTo(url, needLogin) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
|
||||
uni.showToast({
|
||||
title,
|
||||
@@ -50,7 +66,9 @@ Vue.component('super-map', superMapView)
|
||||
Vue.component('empty', empty)
|
||||
Vue.prototype.$api = {
|
||||
msg,
|
||||
sleep
|
||||
sleep,
|
||||
haslogin,
|
||||
hasResume
|
||||
}
|
||||
Vue.prototype.tools = tools
|
||||
Vue.prototype.$config = config
|
||||
|
||||
Reference in New Issue
Block a user