main.js 1.5 KB

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