main.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import App from './App'
  2. import request from '@/common/request.js'
  3. Vue.prototype.$http = request.http
  4. Vue.prototype.$request =request
  5. import common from '@/common/common.js'
  6. Vue.prototype.$common =common
  7. Vue.prototype.$configUrl = request.configUrl
  8. //import wx from 'weixin-js-sdk'
  9. //import * as $wx from '@wecom/jssdk'
  10. import wx from "wecomjsdk"
  11. Vue.prototype.$wx =wx;
  12. //npm install wecomjsdk
  13. /* if(common.getHashQuery('code')){
  14. uni.setStorage({
  15. key: 'code',
  16. data: common.getHashQuery('code'),
  17. success: function () {
  18. }
  19. });
  20. }else{
  21. request.http('enterpriseWechat/auth/oAuth2', {
  22. corpID:'wpMGjbBgAA_zIu6wbKy48zFSbGiGeP8g',
  23. redirectUri:'http://qw.66km.com.cn/pages/index/auto',
  24. agentId:'1000040'
  25. }, 'GET').then(res => {
  26. //console.log(res.data)
  27. location.href= res.data
  28. }).catch(err=>{
  29. })
  30. }
  31. */
  32. // #ifndef VUE3
  33. import Vue from 'vue'
  34. import './uni.promisify.adaptor'
  35. Vue.config.productionTip = false
  36. App.mpType = 'app'
  37. const app = new Vue({
  38. ...App
  39. })
  40. app.$mount()
  41. // #endif
  42. // #ifdef VUE3
  43. import { createSSRApp } from 'vue'
  44. export function createApp() {
  45. const app = createSSRApp(App)
  46. return {
  47. app
  48. }
  49. }
  50. // #endif
  51. //console.log(wx)