Commit 0ebcb590 by 施宇

111

parent a6cfca59
Showing with 4 additions and 49 deletions
;!function () {
;
! function () {
window.IcController = {
init: function () {
this.mounted(this).handleBind(this);
},
getData: function (url, type, param, callback) {
var index = layer.load(1, {
offset: ['50%', "50%"], shade: false
offset: ['50%', "50%"],
shade: false
})
var platform = {
......@@ -147,53 +149,6 @@
* @param val
* @returns {string}
*/
getDateStr:function (val) {
var dd = new Date();
dd.setDate(dd.getDate() + val);
var y = dd.getFullYear();
var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
return y + "-" + m + "-" + d;
}
}
return "";
},
/**
* 删除cookie
* @param name
*/
delCookie: function (name) {
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval = this.getCookie(name);
if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
},
/**
* 获取参数
* @param value
* @returns {*}
*/
getRequest: function (value) {
if (window.location.pathname == "/s/") {
var url = unescape(location.search);
} else {
var url = decodeURI(location.search);
}
var object = {};
if (url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
object[strs[i].split("=")[0]] = strs[i].split("=")[1]
}
}
return object[value];
},
/**
* 根据参数获取时间
* @param val
* @returns {string}
*/
getDateStr: function (val) {
var dd = new Date();
dd.setDate(dd.getDate() + val);
......
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