diff --git a/src/api/httpServe.js b/src/api/httpServe.js index f99864d..8414c4d 100644 --- a/src/api/httpServe.js +++ b/src/api/httpServe.js @@ -1,5 +1,7 @@ import axios from 'axios' import QS from 'qs'; +import store from '@/store' + console.log("API:",process.env.VUE_APP_API); @@ -11,7 +13,8 @@ const service = axios.create({ baseURL: process.env.VUE_APP_API, // responseType: 'json', headers: { - 'Content-Type': 'application/x-www-form-urlencoded' + 'Content-Type': 'application/x-www-form-urlencoded', + 'token': store.state.userAccount.token }, }); diff --git a/src/components/Index.vue b/src/components/Index.vue index 8e746a9..300b106 100644 --- a/src/components/Index.vue +++ b/src/components/Index.vue @@ -184,8 +184,14 @@ const btn = () => { // 抽奖按钮 const drawBtn = () => { console.log("抽奖:"); - // console.log("授权:",getAuthorize(1)); + service.get(process.env.VUE_APP_API + '/cms88/card/qrcode/',cardId=store.state.userAccount.cardId ) + .then((res) => { + + console.log(res); + }) + + // console.log("授权:",getAuthorize(1)); // if (h5plugin.getQueryString("forceauth")) { // console.log("yes-forceauth"); // getAuthorize(0);