1 Star 0 Fork 1

韩工/uniapp_init

forked from 陈工/uniapp_init 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
陈工 提交于 2023-11-16 00:07 . 1
import App from "./App";
import {$http} from "@/config/request.js";
import $api from "@/config/api.js";
import store from "@/store/index.js";
import {
initalToken,
resetToken,
errMessageToast,
removeStorage,
saveStorage,
getToken,
varitfyToken,
updateToken
} from "@/utils/index.js";
// #ifndef VUE3
import Vue from "vue";
// main.js
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.config.productionTip = false;
App.mpType = "app";
Vue.prototype.$eventBus = new Vue();
Vue.prototype.$store = store;
Vue.prototype.$http = $http;
Vue.prototype.$api = $api;
Vue.prototype.$initalToken = initalToken.bind(Vue.prototype);
Vue.prototype.$updateToken = updateToken.bind(Vue.prototype);
Vue.prototype.$resetToken = resetToken.bind(Vue.prototype);
Vue.prototype.$errMessageToast = errMessageToast.bind(Vue.prototype);
Vue.prototype.$removeStorage = removeStorage.bind(Vue.prototype);
Vue.prototype.$saveStorage = saveStorage.bind(Vue.prototype);
Vue.prototype.$getToken = getToken.bind(Vue.prototype);
Vue.prototype.$varitfyToken = varitfyToken.bind(Vue.prototype);
const app = new Vue({
...App,
});
app.$mount();
// #endif
// #ifdef VUE3
import {
createSSRApp
} from "vue";
export function createApp() {
const app = createSSRApp(App);
return {
app,
};
}
// #endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/han-lj/uniapp_init.git
git@gitee.com:han-lj/uniapp_init.git
han-lj
uniapp_init
uniapp_init
master

搜索帮助