// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import { WechatPlugin, AjaxPlugin, LoadingPlugin, ToastPlugin, AlertPlugin } from 'vux' import App from './App' import router from './router' import '@/assets/iconfont.css' import '@/assets/styles/main.scss' import '@/assets/styles/style.css' import '@/common/rem.js' import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import $ from 'jquery' import VueAwesomeSwiper from 'vue-awesome-swiper' import '@/assets/styles/swiper.css' //import wx from 'weixin-js-sdk' //import axios from 'axios' import '@/models/wxShare.js' Vue.config.productionTip = false Vue.use(WechatPlugin) Vue.use(AjaxPlugin) Vue.use(LoadingPlugin) Vue.use(ToastPlugin) Vue.use(AlertPlugin) Vue.use(VueAwesomeSwiper) //Vue.prototype.wxShare = function(link) { // var wxconfigApi = 'http://1hjz.3ncto.com.cn/mall/web/share/config'; // axios.get(wxconfigApi).then(function(response) { // var response = response // console.log('123',response) // var jsApiSignConfig = response.data.data.jsApiSignConfig // console.log(response) // wx.config({ // debug: true, // 开启调试模式,开发时可以开启 // appId: jsApiSignConfig.appId, // 必填,公众号的唯一标识 由接口返回 // timestamp: jsApiSignConfig.timestamp, // 必填,生成签名的时间戳 由接口返回 // nonceStr: jsApiSignConfig.nonceStr, // 必填,生成签名的随机串 由接口返回 // signature: jsApiSignConfig.signature, // 必填,签名 由接口返回 // jsApiList: response.data.data.jsApiList // }) // // wx.ready(() => { // wx.onMenuShareAppMessage({ // 分享给朋友 // title: response.data.data.shareConfig.title, // 分享标题 // desc: response.data.data.shareConfig.desc, // 分享描述 // link: response.data.data.shareConfig.url, // 分享链接 默认以当前链接 // imgUrl: response.data.data.shareConfig.img, // 分享图标 // }) // }) // // // }) // .catch(function(error) { // console.log(error); // }); // // // wx.ready(() => { // // var imgUrl = 'http://www.yihaojiazheng.cn/mall/web/share/config' // // wx.onMenuShareAppMessage({ // 分享给朋友 // // title: title, // 分享标题 // // desc: desc, // 分享描述 // // link: link, // 分享链接 默认以当前链接 // // imgUrl: imgUrl, // 分享图标 // // }) // // }) // //} var vue = new Vue({ el: '#app', router, template: '', components: { App } }) //vue.wxShare();