2 Star 0 Fork 0

枫叶/farm_web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 3.04 KB
一键复制 编辑 原始数据 按行查看 历史
枫叶 提交于 2023-10-26 11:10 . 第一次提交
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import Vue from 'vue'
import App from './App'
import store from './store'
import Cache from './utils/cache'
import util from 'utils/util'
import configs from './config/app.js'
import socket from './libs/new_chat.js'
import i18n from './utils/lang.js';
import { build } from '@/utils/index.js';
Vue.prototype.$util = util;
Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
Vue.prototype.$socket = new socket();
Vue.config.productionTip = false
import pageLoading from './components/pageLoading.vue'
import skeleton from './components/skeleton/index.vue'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
Vue.component('skeleton', skeleton)
Vue.component('pageLoading', pageLoading)
Vue.component('easyLoadimage', easyLoadimage)
Vue.prototype.changePage = function (url,data,login=false){
if(login&&!store.state.token){
uni.showToast({title:'请先登录~',icon:'none'})
return
}
uni.navigateTo({
url:build(url,data)
})
}
// #ifdef H5
import {
parseQuery
} from "./utils";
import Auth from './libs/wechat';
import {
SPREAD
} from './config/cache';
Vue.prototype.$wechat = Auth;
let cookieName = "VCONSOLE",
query = parseQuery(),
urlSpread = query["spread"],
vconsole = query[cookieName.toLowerCase()],
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
if (urlSpread !== undefined) {
var spread = Cache.get(SPREAD);
urlSpread = parseInt(urlSpread);
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
Cache.set("spread", urlSpread || 0);
} else if (spread === 0 || typeof spread !== "number") {
Cache.set("spread", urlSpread || 0);
}
}
if (vconsole !== undefined) {
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
Cache.clear(cookieName);
} else vconsole = Cache.get(cookieName);
import VConsole from './pages/extension/components/vconsole.min.js'
if (vconsole !== undefined && vconsole === md5Crmeb) {
Cache.set(cookieName, md5Crmeb, 3600);
let vConsole = new VConsole();
}
// let snsapiBase = 'snsapi_base';
// Auth.isWeixin() && Auth.oAuth(snsapiBase);
// 记录进入app时的url
if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
window.entryUrl = location.href
}
//全局路由前置守卫
// #endif
App.mpType = 'app'
const app = new Vue({
...App,
store,
Cache,
i18n,
})
app.$mount();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xianyinfeng/farm_web.git
git@gitee.com:xianyinfeng/farm_web.git
xianyinfeng
farm_web
farm_web
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385