1

parent 5a1b8956
......@@ -8,7 +8,7 @@ module.exports = merge(prodEnv, {
// API_URL: '"https://wechat-test.changchangenglish.com/"',
MAX_FILESIZE:'1024*1024*10',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
BUY_URL:'"http://wechat-test.changchangenglish.com/#/buyDetail?"',
AUTHOR_UEL:'"http://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085/#/"',
BUY_URL:'"https://wechat-test.changchangenglish.com/#/buyDetail?"',
AUTHOR_UEL:'"https://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085/"',
REDIRECT_URL:'"http://localhost:8085/"',
});
......@@ -19,6 +19,7 @@ module.exports = {
},
// Various Dev Server settings
// host: '192.168.31.242', // can be overwritten by process.env.HOST
// host: '10.1.23.97', // can be overwritten by process.env.HOST
host: 'localhost', // can be overwritten by process.env.HOST
port: 8085, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
......
This diff is collapsed.
......@@ -96,8 +96,8 @@
});
},
shareImg(icon){
let URL = process.env.API_URL+'#/shareGoods?userID='+ this.userDetail.user_id;
console.log(icon)
let URL = process.env.API_URL+'#/shareGoods?userID='+ this.userDetail.user_id;
this.onShare(URL,icon);
},
initPage(){
......
......@@ -26,6 +26,7 @@
},
methods:{
initPage(){
debugger
let str = this.day.toString();
for(let i=0;i<str.length;i++){
this.imgList.push(str[i])
......@@ -79,6 +80,7 @@
height: 200*@toVw;
text-align: center;
line-height: 200*@toVw;
font-size: 12px;
img{
width:90*@toVw;
vertical-align: middle;
......
export default{
dateFmt:function(date,format) {
var o = {
"M+" : date.getMonth()+1, //month
"d+" : date.getDate(), //day
"h+" : date.getHours(), //hour
"m+" : date.getMinutes(), //minute
"s+" : date.getSeconds(), //second
"q+" : Math.floor((date.getMonth()+3)/3), //quarter
"S" : date.getMilliseconds() //millisecond
}
if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
(date.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)if(new RegExp("("+ k +")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length==1 ? o[k] :
("00"+ o[k]).substr((""+ o[k]).length));
return format;
},
getUrlParam(){
export default {
dateFmt: function (date, format) {
var o = {
"M+": date.getMonth() + 1, //month
"d+": date.getDate(), //day
"h+": date.getHours(), //hour
"m+": date.getMinutes(), //minute
"s+": date.getSeconds(), //second
"q+": Math.floor((date.getMonth() + 3) / 3), //quarter
"S": date.getMilliseconds() //millisecond
}
if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
(date.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o) if (new RegExp("(" + k + ")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length == 1 ? o[k] :
("00" + o[k]).substr(("" + o[k]).length));
return format;
},
getUrlParam() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
toDataURL (src, callback) {
var xhttp = new XMLHttpRequest()
xhttp.onload = function () {
var fileReader = new FileReader()
fileReader.onloadend = function () {
callback(fileReader.result)
}
fileReader.readAsDataURL(xhttp.response)
};
xhttp.responseType = 'blob'
xhttp.open('GET', src, true)
xhttp.send()
toDataURL(src, callback) {
var xhttp = new XMLHttpRequest()
xhttp.onload = function () {
var fileReader = new FileReader()
fileReader.onloadend = function () {
callback(fileReader.result)
}
fileReader.readAsDataURL(xhttp.response)
};
xhttp.responseType = 'blob'
xhttp.open('GET', src, true)
xhttp.send()
},
getParam(paramName) {
let paramValue = "", isFound = !1;
let arrSource = []
let i = 0
if (location.search.indexOf("?") == 0 && location.search.indexOf("=") > 1) {
arrSource = unescape(location.search).substring(1, location.search.length).split("&");
while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
}
return paramValue == "" && (paramValue = null), paramValue
}
}
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 to comment