1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import App from "./App";
- // main.js
- import uView from "uview-ui";
- import api from "@/libs/http/index.js";
- Vue.prototype.api = api; //(2)
- Vue.use(uView);
- import { throttle } from "@/libs/util/utils.js"; //防抖
- Vue.directive("throttle", throttle);
- // #ifndef VUE3
- import Vue from "vue";
- import { broadcastScan } from "@/utils/scanCode";
- // main.js
- // import "amfe-flexible";
- Vue.prototype.apiServer = "http://192.168.1.45/dev-api";
- Vue.prototype.$broadcastScan = broadcastScan;
- Vue.prototype.ip = "192.168.1.45";
- Vue.config.productionTip = false;
- App.mpType = "app";
- uni.setStorage({
- key: "storage_token",
- data: "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdjZWVjNGI2LWE2NGYtNDI3OS05MWEzLTAxMzdkNmEyNDdkNiJ9.7e2lVcZ0b3Y8ofwDCvrETpEZQETrp1Ik-MYfsufiMSoR7oqvI5XiXgbe2bVk4jOJGt7ns0ryKbp5XXE71hoXcA",
- success: function () {
- console.log("success");
- },
- });
- const app = new Vue({
- ...App,
- });
- app.$mount();
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from "vue";
- export function createApp() {
- const app = createSSRApp(App);
- return {
- app,
- };
- }
- // #endif
|