1 Star 0 Fork 1

JCSON/zltz

forked from 鹿光远/zltz 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
鹿光远 提交于 2021-04-17 21:02 . zltz
import Vue from 'vue'
import App from './App'
import filters from "utils/filters" // 过滤器
import regular from '@/utils/regular' // 正则校验
import share from "utils/mixins.js"
import { VueJsonp } from "vue-jsonp"
import { $handleStatistcs } from "@/utils/statistics.js"
Vue.config.productionTip = false
Vue.prototype.$regular = regular // 正则校验
Vue.use(VueJsonp)
Vue.mixin(share)
// 全局过滤器
for (let key in filters) {
Vue.filter(key, filters[key])
}
// 默认跳转为页面跳转,状态0为tabbar跳转,状态2为后退跳转
Vue.prototype.$handleOpenUrl = function(url,stu=1) {
//0为tabbar跳转
if(stu==0) {
uni.switchTab({
url:url
})
return
}
//2为返回跳转
if(stu==2) {
uni.navigateBack({
delta:1
})
return
}
let userId = uni.getStorageSync("userId")
if(!userId&&stu!=99) {
uni.navigateTo({
url: "/pages/login/index",
})
$handleStatistcs()
return;
}
if(!url&&stu==1) {
uni.switchTab({
url: "/pages/find/index",
})
$handleStatistcs()
return;
}
uni.navigateTo({
url: url,
})
$handleStatistcs(url)
}
App.mpType = 'app'
// #ifdef H5
import wechat from './utils/share_h5.js'
if(wechat.isWechat()){
Vue.prototype.$wechat = wechat;
}
// 客服系统
window._MICHAT = window._MICHAT || function () {
(_MICHAT.a = _MICHAT.a || []).push(arguments);
};
_MICHAT("accountid", 118991);
_MICHAT("domain", "mad.miduoke.net");
(function (m, d, q, j, s) {
(j = d.createElement(q)), (s = d.getElementsByTagName(q)[0]);
j.async = true;
j.charset = "UTF-8";
j.src =
("https:" == document.location.protocol
? "https://"
: "http://") +
"static.miduoke.net/Web/JS/mivisit.js?_=t";
s.parentNode.insertBefore(j, s);
})(window, document, "script");
// #endif
const app = new Vue({
...App
})
app.$mount()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/CodeJCSON/zltz.git
git@gitee.com:CodeJCSON/zltz.git
CodeJCSON
zltz
zltz
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385