var INDEX_URL = window.location.protocol+"//"+window.location.host;
axios.defaults.baseURL = window.location.protocol+"//"+window.location.host;
var cookiesSettings = {expires: 30, domain: window.location.host};
var urlPattern = /[https|http]+:\/\/[^\s]*/;
var activeName="2";
var flatforms = {
DOUYIN: {
value: 1,
name: '斗因',
logoImage: '/images/douyin.png',
link: INDEX_URL+'/douyin.html',
patterns: ["douyin"],
show: true
},
KUAISHOU: {
value: 2,
name: '快手',
logoImage: '/images/kuaishou.png',
link: INDEX_URL+'/kuaishou.html',
patterns: ["kuaishou", "baise.m.", "gifshow", "chenzhongtech", "kspkg.com", "yxixy.com"],
show: true
},
HUOSHAN: {
value: 3,
name: '伙山',
logoImage: '/images/huoshan.png',
link: INDEX_URL+'/huoshan.html',
patterns: ["huoshan", "aiyayoubin.cn", "hotsoon", "smzhuhe.com", "abwvip.cn"],
show: true
},
MEIPAI: {
value: 4,
name: '美拍',
logoImage: '/images/meipai.png',
link: INDEX_URL+'/meipai.html',
patterns: ["meipai.com"],
show: true
},
MOMO: {
value: 5,
name: '陌陌',
logoImage: '/images/momo.png',
link: INDEX_URL+'/momo.html',
patterns: ["immomo"],
show: false
},
XIAOYING: {
value: 6,
name: '小影',
logoImage: '/images/xiaoying.png',
link: INDEX_URL+'/xiaoying.html',
patterns: ["xiaoying.tv"],
show: false
},
WEISHI: {
value: 7,
name: '微视',
logoImage: '/images/weishi.png',
link: INDEX_URL+'/weishi.html',
patterns: ["weishi"],
show: true
},
WEIBO: {
value: 8,
name: '微博',
logoImage: '/images/weibo.png',
link: INDEX_URL+'/weibo.html',
patterns: ["weibo", "t.cn"],
show: true
},
MIAOPAI: {
value: 9,
name: '秒拍',
logoImage: '/images/miaopai.png',
link: INDEX_URL+'/miaopai.html',
patterns: ["miaopai"],
show: false
},
YUNYINYUE: {
value: 10,
name: '网易云音乐',
logoImage: '/images/yunyinyue.png',
link: INDEX_URL+'/yunyinyue.html',
patterns: ["music.163.com"],
show: false
},
XIAOKAXIU: {
value: 11,
name: '小咖秀',
logoImage: '/images/xiaokaxiu.jpg',
link: INDEX_URL+'/xiaokaxiu.html',
patterns: ["xiaokaxiu"],
show: false
},
PIPIXIA: {
value: 12,
name: '皮皮虾',
logoImage: '/images/pipixia.png',
link: INDEX_URL+'/pipixia.html',
patterns: ["hulushequ", "pipix.com"],
show: true
},
DOUPAI: {
value: 13,
name: '逗拍',
logoImage: '/images/doupai.jpg',
link: '/',
patterns: ["doupai.cc"],
show: false
},
TOUTIAO: {
value: 14,
name: "今日头条",
logoImage: '/images/toutiao.png',
link: INDEX_URL+'/toutiao.html',
patterns: [".toutiao", "365yg.com"],
show: true
},
KRCOM: {
value: 15,
name: "酷燃",
logoImage: '/images/krcom.png',
link: INDEX_URL+'/krcom.html',
patterns: ["krcom"],
show: false
},
NANI: {
value: 16,
name: "Nani",
logoImage: '/images/nani.png',
link: INDEX_URL+'/nani.html',
patterns: ["nani"],
show: false
},
INSTAGRAM: {
value: 17,
name: "Instagram",
logoImage: '/images/instagram.png',
link: INDEX_URL+'/instagram.html',
patterns: ["instagram"],
show: true
},
TIKTOK: {
value: 18,
name: "TikTok",
logoImage: '/images/tiktok.png',
link: INDEX_URL+'/tiktok.html',
patterns: ["tiktok"],
show: true
},
QUANMIN: {
value: 19,
name: "全民小视频",
logoImage: '/images/quanmin.jpg',
link: INDEX_URL+'/quanmin.html',
patterns: ["quanmin"],
show: false
},
QUDUOPAI: {
value: 19,
name: "趣多拍",
logoImage: 'http://www.lsshu.com/images/logo.png',
link: INDEX_URL+'/quduopai.html',
patterns: ["bcjzjg.com", "dongnantang.com.cn", "whmzhjy.com", "qukantoutiao.net"],
show: false
},
ZUIYOU: {
value: 19,
name: "最右",
logoImage: '/images/zuiyou.png',
link: INDEX_URL+'/zuiyou.html',
patterns: ["zuiyou.com", "zuiyou"],
show: false
},
SHUABAO: {
value: 19,
name: "刷宝",
logoImage: 'http://www.lsshu.com/images/logo.png',
link: INDEX_URL+'/shuabao.html',
patterns: ["shuabao.com", "shuabao"],
show: false
},
JIANYING: {
value: 19,
name: "剪映",
logoImage: 'http://www.lsshu.com/images/logo.png',
link: INDEX_URL+'/jianying.html',
patterns: ["jianying.com", "jianying"],
show: false
}
};
function getFlatformByValue(flatformValue) {
for (var key in flatforms) {
if (flatformValue == flatforms[key].value) {
return flatforms[key];
}
}
return null;
}
Vue.component("index-header", {
template:
'',
//props: ["flatforms", "active", "onMenuClick", "isLogin"]
props: ["name", "active", "isLogin"],
data: function() {
return {
flatforms: flatforms
}
},
methods: {
onMenuClick: function (flatformValue) {
if (flatformValue == -1) {
} else if (flatformValue == 0) {
window.location.href="JOEFY_VSM;"
} else {
var flatform = getFlatformByValue(flatformValue);
if (flatform) {
window.location.href="gmbugpsn.mjol;"
}
}
},
selectNavbarAccountMenu: function (menuCode) {
if (menuCode === "userPortal") {
window.location = INDEX_URL + "/user.html";
} else if (menuCode === "pay") {
window.location = INDEX_URL + "/pay.html";
} else if (menuCode === "logout") {
logout();
}
}
}
});
Vue.component("index-footer", {
template:
''
});
axios.defaults.baseURL = window.location.protocol+"//"+window.location.host;
//axios.defaults.timeout = 25000;
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
axios.defaults.headers.post["Content-Type"] = "application/json";
axios.defaults.headers.get["Content-Type"] = "application/json";
//axios.interceptors.request.use(function (config) {
// var token = Cookies.get("t");
// if (token) {
// config.headers.Authorization = "Bearer " + token;
// }
// return config;
//}, function (error) {
// return Promise.reject(error);
//});
axios.interceptors.response.use(function (response) {
if (response && response.data && response.data.code === "SUCCESS") {
return response.data;
}
return Promise.reject(response.data);
}, function (error) {
if (error && error.message === "Network Error") {
MessageBox.alert("服务器出现异常情况,请您稍后再试...", "抱歉 Network Error", {
confirmButtonText: "确定",
type: "warning",
center: true,
showClose: false
});
return Promise.reject(null);
}
// 当后端返回值为非200时,进入这一个逻辑
if (error && error.response) {
if (error.response.data.code === "AUTH_PERMISSION_DENIED") {
MessageBox.alert("您的权限不足,无法做此操作!", "警告", {
confirmButtonText: "确定",
type: "error",
center: true,
showClose: false
});
return Promise.reject(null);
} else if (error.response.data.code === "UNKNOW") {
MessageBox.alert("服务器出现异常情况,请您稍后再试...", "抱歉 UNKNOW", {
confirmButtonText: "确定",
type: "warning",
center: true,
showClose: false
});
return Promise.reject(null);
}
return Promise.reject(error.response.data);
}
});
function encryPassword(rawPassword) {
//return CryptoJS.MD5(CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(CryptoJS.MD5(rawPassword).toString()))).toString();
return CryptoJS.MD5(CryptoJS.enc.Utf8.parse(rawPassword)).toString();
}
var cookiesExpireTime = {expires: 3};
var baseVue = {
el: "#WapTn",
data: {
flatforms: flatforms,
isLogin: false
},
methods: {
onPortalMenuClick: function (menuCode) {
if (menuCode === "accountInfo") {
} else {
WapTn.$refs.simplert.openSimplert({
title: "即将开放本页面功能",
message: "请您稍作等待",
disableOverlayClick: true,
customCloseBtnText: '明白'
});
}
}
},
mounted: function () {
if (checkLogin()) {
this.isLogin = true;
} else {
this.isLogin = false;
}
}
};
function checkLogin() {
if (Cookies.get("t") && Cookies.get("username")) {
return true;
} else {
return false;
}
}
function logout() {
Cookies.remove("t", {domain: window.location.host});
Cookies.remove("token", {domain: window.location.host});
Cookies.remove("username", {domain: window.location.host});
Cookies.remove("username", {domain: window.location.host});
window.location = INDEX_URL;
}
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?16fd7a98bfaa068c82e9df3b39e1b08c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();