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