You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.3 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store' // store
  4. import plugins from './plugins' // plugins
  5. import './permission' // permission
  6. import share from 'utils/share.js'//share.js
  7. import uView from '@/uni_modules/uview-ui'
  8. import configListMinxin from '@/mixins/configList.js'
  9. Vue.use(uView)
  10. Vue.use(plugins)
  11. Vue.mixin(configListMinxin)
  12. Vue.config.productionTip = false
  13. Vue.prototype.$store = store
  14. App.mpType = 'app'
  15. Vue.mixin(share)
  16. // 创建一个空的Vue实例作为事件中心
  17. Vue.prototype.$eventHub = new Vue()
  18. Vue.prototype.initGlobalData = function() {
  19. Vue.prototype.$globalData = {
  20. isAgree:false,
  21. submitData: {
  22. "phone": "",
  23. "wechatId": "",
  24. "note": "",
  25. "totalPrice": "",
  26. "address": {
  27. "province": "",
  28. "city": "",
  29. "district": "",
  30. "detailAddress": ""
  31. }
  32. },
  33. mainSku:[],
  34. augmentedSku:[],
  35. itemPrices:[],
  36. servicePrices:[],
  37. openIdStr:'',
  38. confirmData: {
  39. phone: "",
  40. wechatId: "",
  41. note: "",
  42. },
  43. newOrderData:{
  44. orderId : '',//需要取消的订单id
  45. currentAddress:{},
  46. currentPets:[],
  47. totalPrice:0,
  48. needPreFamiliarize:[],
  49. distancePrice : 0, // 距离加价
  50. }
  51. }
  52. }
  53. Vue.prototype.initGlobalData()
  54. // 创建全局变量
  55. // Vue.prototype.$globalData = {
  56. // isAgree:false,
  57. // submitData: {
  58. // "phone": "",
  59. // "wechatId": "",
  60. // "note": "",
  61. // "totalPrice": "",
  62. // "address": {
  63. // "province": "",
  64. // "city": "",
  65. // "district": "",
  66. // "detailAddress": ""
  67. // },
  68. // "skuList": [],
  69. // "service": {
  70. // "serviceFrequency": "once_a_day",
  71. // "serviceDate": [],
  72. // "serviceTimeFirst": "",
  73. // "serviceTimeSecond": "",
  74. // "pet": []
  75. // }
  76. // },
  77. // mainSku:[],
  78. // augmentedSku:[],
  79. // itemPrices:[],
  80. // servicePrices:[],
  81. // openIdStr:'',
  82. // confirmData: {
  83. // phone: "",
  84. // wechatId: "",
  85. // note: "",
  86. // },
  87. // newOrderData:{
  88. // orderId : '',//需要取消的订单id
  89. // currentAddress:{},
  90. // currentPets:[],
  91. // totalPrice:0,
  92. // needPreFamiliarize:[]
  93. // }
  94. // }
  95. const app = new Vue({
  96. ...App
  97. })
  98. app.$mount()