Blame view

admin-web-master/src/main.js 3.76 KB
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  import Vue from 'vue'
  
  import 'normalize.css/normalize.css' // A modern alternative to CSS resets
  
  import ElementUI from 'element-ui'
  import 'element-ui/lib/theme-chalk/index.css'
  // import locale from 'element-ui/lib/locale/lang/en' // lang i18n
  import echarts from 'echarts'
  import '@/styles/index.scss' // global css
  import '@/customIcons/icon.css' // 自定义icon
  import '@/assets/font.css'
  import App from './App.vue'
  import store from './store'
  import router from './router'
d64cd58f   wesley88   上传验收小程序
15
16
  import { VueJsonp } from 'vue-jsonp'
  Vue.use(VueJsonp);
3f535f30   杨鑫   '初始'
17
18
19
  
  import '@/icons' // icon
  import '@/permission' // permission control
4373acf5   wesley88   1
20
  import { env } from 'echarts/lib/export'
3f535f30   杨鑫   '初始'
21
  
118fc86d   wesley88   1
22
  
3f535f30   杨鑫   '初始'
23
24
25
26
27
28
29
30
31
  /**
   * If you don't want to use mock-server
   * you want to use MockJs for mock api
   * you can execute: mockXHR()
   *
   * Currently MockJs will be used in the production environment,
   * please remove it before going online ! ! !
   */
  Vue.prototype.$echarts = echarts
4373acf5   wesley88   1
32
  
5d752fd3   杨鑫   '最新'
33
  // Vue.prototype.$API = 'https://h5.028wlkj.com/cdwlMall/meserver/api'
4373acf5   wesley88   1
34
  Vue.prototype.$hostUrl =`${window.location.protocol}//${window.location.host}/cdwlMall`
542e27d5   wesley88   1
35
36
37
  import {
    sendToUser
  } from '@/api/newly.js'
61e1439e   wesley88   1
38
  Vue.prototype.$setmsg = async function(from) {
d64cd58f   wesley88   上传验收小程序
39
  
542e27d5   wesley88   1
40
    let info = {
61e1439e   wesley88   1
41
      "content":JSON.stringify(from.content), // 消息内容
542e27d5   wesley88   1
42
      "messageClass": 1, // 消息类型(1:指定用户发送)
61e1439e   wesley88   1
43
      "messageType":from.type, // 消息类型描述
542e27d5   wesley88   1
44
45
      "cereMessageReceipts": [ // 接收人列表
        {
61e1439e   wesley88   1
46
47
48
          "phone": from.phone, // 用户ID
          "messageType": from.type, // 消息类型
          "content": JSON.stringify(from.content) // 消息内容
542e27d5   wesley88   1
49
50
51
        }
      ]
    }
61e1439e   wesley88   1
52
    let c1 =  await sendToUser(info).then(res => {
542e27d5   wesley88   1
53
      console.error(res)
61e1439e   wesley88   1
54
      return res
542e27d5   wesley88   1
55
    })
61e1439e   wesley88   1
56
    return c1
542e27d5   wesley88   1
57
  };
d64cd58f   wesley88   上传验收小程序
58
59
  
  let host = window.location.host;
1991126c   杨鑫   '最新'
60
  if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529'  ) {
ea4bb352   wesley88   1
61
62
63
64
65
66
67
68
69
    // Vue.prototype.$baseURL ='https://jy.scjysm.asia:18086/cdwlMall'
    // Vue.prototype.$fontBold = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf`
    // Vue.prototype.$fontRegular = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf`
    // Vue.prototype.$API = `https://jy.scjysm.asia:18086/cdwlMall/meserver/api`
  
    Vue.prototype.$baseURL ='https://zhgw-uat.028wlkj.com/cdwlMall'
    Vue.prototype.$fontBold = `https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf`
    Vue.prototype.$fontRegular = `https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf`
    Vue.prototype.$API = `https://zhgw-uat.028wlkj.com/cdwlMall/meserver/api`
d64cd58f   wesley88   上传验收小程序
70
  } else {
5d752fd3   杨鑫   '最新'
71
  	Vue.prototype.$API = `${window.location.protocol}//${window.location.host}/cdwlMall/meserver/api`
d64cd58f   wesley88   上传验收小程序
72
    Vue.prototype.$baseURL =`${window.location.protocol}//${window.location.host}/cdwlMall`
60cd6339   杨鑫   '最新'
73
74
    Vue.prototype.$fontBold = `${window.location.protocol}//${window.location.host}/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf`
    Vue.prototype.$fontRegular = `${window.location.protocol}//${window.location.host}/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf`
d64cd58f   wesley88   上传验收小程序
75
76
  }
  
d64cd58f   wesley88   上传验收小程序
77
  // Vue.prototype.$baseURL =`https://zhld.028wlkj.com:49008`
7ab02d9a   杨鑫   问卷完成,最新
78
  // Vue.prototype.$API = 'http://172.16.61.48/meserver/api'
4373acf5   wesley88   1
79
80
  // Vue.prototype.$API = 'https://jy.scjysm.asia:18086/meserver/api'
  // Vue.prototype.$API = 'https://h5.028wlkj.com/cdwlMall/meserver/api'
7ab02d9a   杨鑫   问卷完成,最新
81
  // Vue.prototype.$API = 'http://8.130.38.56:8019/api'
44e10667   杨鑫   '最新'
82
  // https://jy.scjysm.asia:18086   http://172.16.61.126:8080 http://8.130.38.56:8027
3f535f30   杨鑫   '初始'
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
  // if (process.env.NODE_ENV === 'production') {
  //   const { mockXHR } = require('../mock')
  //   mockXHR()
  // }
  
  // set ElementUI lang to EN
  // Vue.use(ElementUI, { locale })
  // 如果想要中文版 element-ui,按如下方式声明
  Vue.use(ElementUI)
  
  Vue.config.productionTip = false
  
  new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
  })