Commit 0c8da49d by mamingqun

修改地址之前

parent 9e6a7ba4
import Vue from 'vue'
import Vuex from 'vuex'
import $ from 'jquery';
import axios from 'axios';
Vue.use(Vuex);
......@@ -38,6 +39,9 @@ export default new Vuex.Store({
getPublicActiveInfo(state,num){
axios.get('http://web-comment.canskj.cn/wandah5/activity/info').then((result) => {
state.publicActiveInfo = result.data.data
axios.defaults.headers.common['systemtype'] =state.publicActiveInfo.system_type;
$('title').text(result.data.data.title);
}).catch((err) => {
console.log(err);
......
......@@ -2,7 +2,7 @@
<div id="app1">
<div class="topBox5686">
<div class="activityButton" @click="activityOnoff"></div>
<img v-if="bannerImg" :src="bannerImg" alt="">
<img v-if="bannerImg" :src="bannerImg" alt>
</div>
<div class="middlebox">
<div class="tabBoxWrap">
......@@ -204,30 +204,40 @@ export default {
bannerImg() {
if (store.state.publicActiveInfo) {
return store.state.publicActiveInfo.banner
}else{
} else {
return null
}
}
},
created() {
this.judgeShare();
this.getIsAward();
var _this = this;
this.getActiveInfo();
axios.get('http://web-comment.canskj.cn/wandah5/activity/info').then((result) => {
this.getLastList();
// this.getRenqiList();
//在getActiveInfo里请求了
this.getPrizeList();
console.log('result.data.data');
console.log(result.data);
this.userCenter = api.userCenterHref
this.getUserInfo();
this.fucengButton = localStorage.getItem("fucengButton") ? 'close' : 'open';
var type = result.data.data.system_type;
axios.defaults.headers.common['systemtype'] = type;
$('title').text(result.data.data.title);
this.getRuweiList();
_this.judgeShare();
_this.getIsAward();
_this.getActiveInfo();
_this.getLastList();
// _this.getRenqiList();
//在getActiveInfo里请求了
_this.getPrizeList();
_this.userCenter = api.userCenterHref
_this.getUserInfo();
_this.getRuweiList();
}).catch((err) => {
console.log(err);
});
// this.hiddenBar();
_this.fucengButton = localStorage.getItem("fucengButton") ? 'close' : 'open';
},
mounted() {
......@@ -248,7 +258,7 @@ export default {
// this.bannerHeight = $('.topBox5686').height();
// }, 200);
},
activated(){
activated() {
setTimeout(() => {
this.getWeixinPowerShare();
}, 400);
......@@ -589,7 +599,7 @@ export default {
wx.updateAppMessageShareData(
{
// title: _this.$randomText() , // 分享标题
title: tools.randomShareTitle() , // 分享标题
title: tools.randomShareTitle(), // 分享标题
desc: tools.randomShareDesc(), // 分享描述
link: api.wrapHref, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: api.shareImg // 分享图标
......
......@@ -17,7 +17,7 @@ window.axios = axios;
import api from '@/modules/js/api.js';
axios.defaults.baseURL = api.server;
axios.defaults.timeout = 10000;
axios.defaults.headers.common['systemtype'] = api.extra;
// axios.defaults.headers.common['systemtype'] = api.extra;
import fastclick from 'fastclick'
......
......@@ -76,10 +76,22 @@ export default {
},
store,
created() {
this.getUserInfo();
this.getUserImgList();
this.indexHref = api.indexHref;
// this.hiddenBar();
var _this = this
axios.get('http://web-comment.canskj.cn/wandah5/activity/info').then((result) => {
var type = result.data.data.system_type;
axios.defaults.headers.common['systemtype'] = type;
$('title').text(result.data.data.title);
_this.getUserInfo();
_this.getUserImgList();
_this.indexHref = api.indexHref;
}).catch((err) => {
console.log(err);
});
},
mounted() {
this.getWeixinPowerShare();
......@@ -96,7 +108,7 @@ export default {
this.getUserImgList();
})
},
activated(){
activated() {
setTimeout(() => {
this.getWeixinPowerShare();
}, 400);
......@@ -222,12 +234,12 @@ export default {
// // 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
wx.updateAppMessageShareData(
{
title: tools.randomShareTitle() , // 分享标题
title: tools.randomShareTitle(), // 分享标题
desc: tools.randomShareDesc(), // 分享描述
link: api.wrapHref, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: api.shareImg // 分享图标
},
function(res) {
function (res) {
//这里是回调函数
}
);
......@@ -239,7 +251,7 @@ export default {
link: api.wrapHref, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: api.shareImg // 分享图标
},
function(res) {
function (res) {
//这里是回调函数
}
);
......
......@@ -13,7 +13,7 @@ import '@/modules/js/flexible.js';
import axios from 'axios';
import api from '@/modules/js/api.js';
axios.defaults.baseURL = api.server;
axios.defaults.headers.common['systemtype'] = api.extra;
// axios.defaults.headers.common['systemtype'] = api.extra;
import VConsole from 'vconsole';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment