Commit 2c009371 authored by 罗超's avatar 罗超

调整排行榜

parent bc533da4
This diff is collapsed.
......@@ -121,7 +121,7 @@ Vue.prototype.moneyFormat = function (value) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
},
// 注册
Vue.filter('priceFormat', function (value) {
......@@ -182,7 +182,7 @@ Vue.prototype.random_string = function (len) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
},
//上传文件到文件服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
......@@ -220,7 +220,7 @@ Vue.prototype.random_string = function (len) {
*/
Vue.prototype.UploadLocalSystem = function (params, fileObj, successCall) {
let that = this;
let url = that.domainManager().PostUrl+"/api/Upload/Index";
let url = that.domainManager().PostUrl + "/api/Upload/Index";
let formData = new FormData()
if (params) {
formData.append("params", JSON.stringify(params));
......@@ -279,6 +279,26 @@ Vue.prototype.checkInteger = function (item, filed) {
item[filed] = value;
}
Vue.prototype.formatDate = function (date, fmt, type) { //type : 类型 0:时间为秒 1:时间为毫秒
let ret;
const opt = {
"Y+": date.getFullYear().toString(), // 年
"M+": (date.getMonth() + 1).toString(), // 月
"d+": date.getDate().toString(), // 日
"h+": date.getHours().toString(), // 时
"m+": date.getMinutes().toString(), // 分
"s+": date.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
}
new Vue({
router,
store,
......
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