Browse Source

微信

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
b93c8250e7
4 changed files with 40 additions and 10 deletions
  1. 3
      package.json
  2. 38
      src/main.js
  3. 6
      src/router/index.js
  4. 3
      src/view/poster.vue

3
package.json

@ -60,7 +60,8 @@
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-merge": "^2.6.1"
"webpack-merge": "^2.6.1",
"weixin-js-sdk": "^1.3.3"
},
"engines": {
"node": ">= 4.0.0",

38
src/main.js

@ -14,9 +14,10 @@ import 'element-ui/lib/theme-chalk/index.css'
import $ from 'jquery'
//import Swiper from 'swiper/dist/js/swiper.js';
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'//这里注意具体看使用的版本是否需要引入样式,以及具体位置。
//import 'swiper/dist/css/swiper.css'//这里注意具体看使用的版本是否需要引入样式,以及具体位置。
//import '@/assets/styles/swiper.css
//import wx from 'weixin-js-sdk'
//import axios from 'axios'
Vue.config.productionTip = false
Vue.use(WechatPlugin)
Vue.use(AjaxPlugin)
@ -28,10 +29,37 @@ Vue.use(VueAwesomeSwiper, /* { default global options } */)
//Vue.use(VueAwesomeSwiper)
/* eslint-disable no-new */
//Vue.prototype.wxShare = function(title="",dec="",links=""){
// var wxconfigApi = 'http://1hjz.3ncto.com.cn/mall/web/share/config';
// axios.get(wxconfigApi).then((res)=>{
// console.log(res)
// //配置微信参数
//// wx.config({
//// debug: false, // 开启调试模式,开发时可以开启
//// appId: Data.appid, // 必填,公众号的唯一标识 由接口返回
//// timestamp: Data.timestamp, // 必填,生成签名的时间戳 由接口返回
//// nonceStr: Data.nonceStr, // 必填,生成签名的随机串 由接口返回
//// signature: Data.signature, // 必填,签名 由接口返回
//// jsApiList: ['onMenuShareAppMessage', 'onMenuShareTimeline']
//// })
////// 验证参数通过后
//// wx.ready(()=>{
////
//// })
//
// }).error((error)=>{
//
// })
//
//}
new Vue({
var v = new Vue({
el: '#app',
router,
template: '<App/>',
components: {App}
})
})
//v.wxShare();

6
src/router/index.js

@ -19,9 +19,9 @@ let router = new Router({
base: '/v2',
routes: [
{
path: '/month-card',
name: '领取优惠券',
component: monthCard
path: '/month-card',
name: '领取优惠券',
component: monthCard
},
{
path: '/put-money',

3
src/view/poster.vue

@ -1,7 +1,7 @@
<template>
<div class="poster">
<img class="weixin" src="../assets/images/poster/weixin.png" v-show="ImgFix" @click="ImgFix = false" />
<img class="weixin" src="../assets/images/poster/weixin.png" v-show="ImgFix" @click="ImgFix = false" />
<div style="height: 0.9rem;"></div>
<div class="page-top">
<a @click="goBack()" class="goBack"><img src="../assets/images/my-money/left.png" /></a>
@ -187,6 +187,7 @@
},
change (name) {
this.addressValue = name
this.getName()
},
getAddress (){
homeApi.getAddress().then(res => {

Loading…
Cancel
Save