1

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