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.
75 lines
2.7 KiB
75 lines
2.7 KiB
/*
|
|
* @Author: your name
|
|
* @Date: 2021-09-14 21:32:53
|
|
* @LastEditTime: 2021-12-10 20:01:48
|
|
* @LastEditors: Lone
|
|
* @Description: In User Settings Edit
|
|
* @FilePath: \crm-gmail\src\main.js
|
|
*/
|
|
import Vue from 'vue';
|
|
import Antd from 'ant-design-vue';
|
|
import App from "./App.vue";
|
|
// import Vuex from 'vuex';
|
|
import router from "./router";
|
|
import Store from './stores';
|
|
import 'ant-design-vue/dist/antd.css';
|
|
import './assets/common.css';
|
|
import axios from 'axios';
|
|
import line from '@line/bot-sdk';
|
|
import {Chart} from 'chart.js';
|
|
import Chartkick from 'vue-chartkick';
|
|
import Api from './services/api';
|
|
import Util from './utils/util';///引入工具类
|
|
import './mock'
|
|
|
|
import VueCloneya from 'vue-cloneya';
|
|
Vue.use(VueCloneya)
|
|
|
|
Vue.use(Chartkick.use(Chart));
|
|
|
|
Vue.config.productionTip = false;
|
|
Vue.use(Antd);
|
|
Vue.use(Api);//调用方式 this.$api.mail.XXX
|
|
Vue.use(Util);
|
|
|
|
import moment from "moment";//引入 antdv 自带的momentjs
|
|
Vue.prototype.$moment = moment;//挂在到vue原型上
|
|
// console.log('main.js引入的moment', moment);
|
|
|
|
import lodash from 'lodash';//引入lodash ,JS數據操作庫
|
|
Vue.prototype.$lodash = lodash;
|
|
|
|
//https://github.com/vue-gapi/vue-gapi/tree/releases/v1
|
|
import VueGapi from 'vue-gapi';//引入vue-gapi
|
|
Vue.use(VueGapi, {
|
|
apiKey: 'AIzaSyAXjdATPp38XfaFFZYS5jIpQlN5CZyLzpU',//需要api key,我之前的是client key,竟然也能跑通?
|
|
clientId: '256059354914-52h761538ufcta64fm79j6e0v60f8m77.apps.googleusercontent.com',
|
|
// apiKey: 'AIzaSyBkPIL0W13oQRruuwOeXh4D5gtu18DHk3c',//需要api key,我之前的是client key,竟然也能跑通?
|
|
// clientId: '122333954029-9hmfnd7c14l7n5tndt708lndevcs3ebp.apps.googleusercontent.com',
|
|
discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest',
|
|
'https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest'],//这个gmail、calendar的文档连接是试出来的,不排除有最新的
|
|
scope: 'https://mail.google.com https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/calendar',//访问接口的权限,必须字符串,用空格连接
|
|
// scope: 'https://www.googleapis.com/auth/gmail.modify',//访问接口的权限,必须字符串,用空格连接
|
|
|
|
});
|
|
|
|
import { Base64 } from 'js-base64';
|
|
Vue.prototype.$Base64 = Base64;//引入的Base64
|
|
|
|
import * as MimeCodec from 'emailjs-mime-codec';
|
|
Vue.prototype.$MimeCodec = MimeCodec;//引入的emailjs-mime-codec,guthub: https://github.com/emailjs/emailjs-mime-codec
|
|
|
|
//Vue.use(Vuex) //注入vuex全局
|
|
Vue.use(Store) //注入vuex全局
|
|
|
|
//引入mockjs
|
|
// import './mock.js'
|
|
// require('./mock.js');
|
|
|
|
new Vue({
|
|
router,
|
|
render: h => h(App),
|
|
}).$mount('#app')
|
|
|
|
Vue.prototype.$axios = axios;
|
|
Vue.prototype.$line = line;
|
|
|