main.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import App from './App'
  2. import Vue from 'vue'
  3. import './uni.promisify.adaptor'
  4. import uView from "uview-ui";
  5. import commonUtils from "./common/js/utils/commonUtils";
  6. // #ifdef H5
  7. // 提交前需要注释 本地调试使用 使用vconsole
  8. const vconsole = require('vconsole')
  9. Vue.prototype.$vconsole = new vconsole()
  10. // #endif
  11. import api from './common/js/api'
  12. import env from './common/js/env.js';
  13. Vue.prototype.$phonePattern = '^1[3-9][0-9]\\d{8}$';
  14. Vue.prototype.$idCardPattern = '^([1-6][1-9]|50)\\d{4}(18|19|20)\\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$';
  15. //后端接口地址
  16. Vue.prototype.$baseUrl = env.baseUrl;
  17. //娇骄儿造型小程序跳转地址
  18. Vue.prototype.$xcxUrl = 'https://jje.xinyuekj.com.cn/spread/spread';
  19. // #ifdef H5
  20. //生活圈H5页面拓客专员注册跳转地址 --- 测试地址
  21. Vue.prototype.$tkUrl = 'http://tk.gzzzyd.com/#/pages/register/register';
  22. //生活圈H5页面拓客专员注册跳转地址 --- 正式地址
  23. // Vue.prototype.$tkUrl = 'https://jje.xinyuekj.com.cn/tk/#/pages/register/register';
  24. // #endif
  25. // #ifdef MP-WEIXIN
  26. //生活圈小程序拓客专员注册跳转地址
  27. Vue.prototype.$tkUrl = 'https://jje.xinyuekj.com.cn/tk/register';
  28. // #endif
  29. //微信授权回调地址 -- 微信浏览器调起微信登录使用(现在没用了,暂时保留)--- 测试地址
  30. Vue.prototype.$callbackUrl = 'http://tk.gzzzyd.com';
  31. Vue.prototype.$api = api;
  32. Vue.prototype.$commonUtils = commonUtils;
  33. Vue.prototype.$isWxBrowser = () => getApp().globalData.isWxBrowser;
  34. Vue.use(uView);
  35. Vue.config.productionTip = false
  36. App.mpType = 'app'
  37. const app = new Vue({
  38. ...App
  39. })
  40. app.$mount()