1 Star 2 Fork 2

自夏/uniappMailbox_New

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 4.39 KB
一键复制 编辑 原始数据 按行查看 历史
自夏 提交于 2022-02-21 21:53 . 修改
import Vue from "vue";
import App from "./App.vue";
import store from "./store/index";
import RequestHttp from "./utlis/HttpRequest";
import filters from "./utlis/filters";
import uView from "uview-ui";
import Public from "./utlis/CustomFunction";
import api from "./api/index.js";
import ioh5 from "socket.io-client";
import io from '@hyoga/uni-socket.io';
import customComponents from "./utlis/automaticImportComponent.js";
import clipboard from "./utlis/clipboard.js"
import uniFunc from './utlis/uni.public.js';
import {APP} from './utlis/APP-PLUS.js';
import {Platform,isH5,isAppPlus} from './utlis/environment.js';
Vue.config.productionTip = false;
Vue.prototype.$store = store;
Vue.prototype.api = api;
Vue.prototype.uniFunc = uniFunc;
Vue.prototype.$bus = new Vue();
Vue.prototype.baseImgUrl = 'http://192.168.88.65';
Vue.prototype.baseHttpUrl = 'http://192.168.88.65:8978/';
Vue.prototype.Platform =Platform;
Vue.prototype.isH5 = isH5
Vue.prototype.isApp = isAppPlus
Vue.prototype.APPPLUS = APP;
// console.log(RequestHttp.MusicRequest);
// console.log(Platform,isH5,isAppPlus);
// #ifdef H5
Vue.prototype.socket = ioh5("http://192.168.88.15:8888");
// for (let key in customComponents) {
// Vue.component(key, customComponents[key]);
// }
// #endif
// 除了h5 平台 其他平台的都有一下代码
// #ifndef H5
// #endif
Vue.prototype.socket = io("http://192.168.88.15:8888", {
transports: ['websocket', 'polling'],
timeout: 5000,
})
uni.onThemeChange(function (res) {
console.log(res.theme);
});
// uni.connectSocket({
// url: 'http://192.168.88.15:8888'
// });
// uni.onSocketOpen(function (res) {
// console.log('WebSocket连接已打开!');
// });
// uni.onSocketError(function (res) {
// console.log('WebSocket连接打开失败,请检查!');
// });
import bilihaerder from "./pages/components/bilibili/haerder/index.vue";
import ALineOfaColumn from "./pages/components/bilibili/list/ALineOfaColumn.vue";
import biliSymmetry from "./pages/components/bilibili/list/list.vue";
import bililistLine from "./pages/components/bilibili/list/listLine.vue";
import biliSlide from "./pages/components/bilibili/list/slideList.vue";
import bottomNav from "./pages/components/bottomNav/bottomNav.vue";
import haderBack from "./pages/components/chat/haderBack.vue";
import popup from "./pages/components/popup/popup.vue";
import Gongge from "./pages/components/SecondaryPackaging/Gongge/Gongge.vue";
import UniSegmentedControl from "./pages/components/uni-segmented-control/uni-segmented-control.vue";
import waterFill from "./pages/components/xiaohuangya-waterFull.vue";
import loading from "./pages/components/loading/index.vue";
import getloading from "./pages/components/loading/getloading.vue";
import chatHader from "./pages/components/chat/hader.vue";
import corresponding from './pages/components/corresponding/index.vue'
import RichText from './pages/components/editor/editor.vue'
import uniListItem from './pages/components/uni-ui/uni-list-item/uni-list-item.vue'
import maramleeWaterfallsFlow from './pages/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue'
Vue.component("bilihaerder", bilihaerder);
Vue.component("ALineOfaColumn", ALineOfaColumn);
Vue.component("biliSymmetry", biliSymmetry);
Vue.component("bililistLine", bililistLine);
Vue.component("biliSlide", biliSlide);
Vue.component("bottomNav", bottomNav);
Vue.component("chatHader", chatHader);
Vue.component("haderBack", haderBack);
Vue.component("loading", loading);
Vue.component("getloading", getloading);
Vue.component("popup", popup);
Vue.component("Gongge", Gongge);
Vue.component("UniSegmentedControl", UniSegmentedControl);
Vue.component("waterFill", waterFill);
Vue.component("corresponding", corresponding);
Vue.component("RichText", RichText);
Vue.component("uni-list-item", uniListItem);
Vue.component("maramlee-waterfalls-flow", maramleeWaterfallsFlow);
Vue.prototype.http = RequestHttp.req;
Vue.prototype.MusicRequest = RequestHttp.MusicRequest;
Vue.prototype.httpFile = RequestHttp.reqFile;
Vue.prototype.getimg = RequestHttp.getimg;
Vue.prototype.Public = Public;
Vue.use(uView);
Vue.prototype.$alert = function(message, ops) {
//#ifdef APP-PLUS
ops = ops || {};
ops.verticalAlign = "top";
plus.nativeUI.toast(message, ops);
//#endif
//#ifndef APP-PLUS
uni.showToast({
title: message + "",
});
//#endif
};
for (let key in filters) {
Vue.filter(key, filters[key]);
}
new Vue({
store,
render(r) {
return r(App);
},
}).$mount();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/lizixia/uniapp-mailbox_-new.git
git@gitee.com:lizixia/uniapp-mailbox_-new.git
lizixia
uniapp-mailbox_-new
uniappMailbox_New
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385