You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB
JavaScript

5 months ago
import App from "./App";
import en from "./locale/en.json";
import zhHans from "./locale/zh-Hans.json";
import zhHant from "./locale/zh-Hant.json";
const messages = {
en,
"zh-Hans": zhHans,
"zh-Hant": zhHant,
};
let i18nConfig = {
5 months ago
locale: navigator.language === "en" ? "en" : "zh-Hans",
5 months ago
messages,
};
//弹出框禁止滑动
Vue.prototype.stopScroll = function () {
var mo = function (e) {
e.preventDefault();
};
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", mo, false); // 禁止页面滑动
};
//弹出框可以滑动
Vue.prototype.canScroll = function () {
var mo = function (e) {
e.preventDefault();
};
document.body.style.overflow = ""; // 出现滚动条
document.removeEventListener("touchmove", mo, false);
};
import Vue from "vue";
import VueI18n from "vue-i18n"; // v8.x
import uView from "uview-ui";
import common from "./common/index.js";
import api from "@/http/";
Vue.use(VueI18n);
Vue.use(uView);
Vue.prototype.$common = common;
Vue.prototype.$api = api;
// Vue.prototype.$baseUrl = "http://114.218.158.24:9022";
Vue.prototype.$baseUrl = "https://shop.szjixun.cn";
const i18n = new VueI18n(i18nConfig);
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
i18n,
...App,
});
app.$mount();