Commit 3f0ac42c authored by baixian's avatar baixian

打卡数据中心

parent f060b3c1
......@@ -36,6 +36,7 @@ import {
LocalStorage,
copyContent,
// deepCopy
delHtmlBlank,
} from '../../../utilities/index.js';
import {
screenshot
......@@ -279,10 +280,20 @@ Page({
let _content = [];
try {
_content = JSON.parse(data.content);
if (_content.length>0){
_content.forEach((item)=> {
switch (item.type) {
case 'text':
item.value = delHtmlBlank(item.value);
break;
default:
break;
}
})
}
} catch (error) {
_content = []
}
console.log(_content, '_content');
Object.assign(this.data, {
noClockTotal: Number(data.not_record_count || 0),
hadClockTotal: Number(data.record_count || 0),
......@@ -306,7 +317,7 @@ Page({
noCommentTotal: Number(data.not_review_count || 0),
'remindTips.pushStatus': data.subject_status
})
console.log(_content, '44444444444');
this.getCircleDetail()
}
}).catch((err) => {
......
......@@ -727,5 +727,5 @@ module.exports = {
numberToCn: numberToCn,
formatClueFrom: formatClueFrom,
formatClueStatus: formatClueStatus,
jsonStringify: jsonStringify
jsonStringify: jsonStringify,
}
......@@ -540,6 +540,12 @@ function deepCopy (obj, cache = []) {
return copy
}
// 删除空格
function delHtmlBlank(str) {
var str = str.replace(/<\/?[^>]*>/gim, "");//去掉所有的html标记
var result = str.replace(/(^\s+)|(\s+$)/g, "");//去掉前后空格
return result.replace(/\s/g, "");//去除文章中间空格
}
export {
encode,
decode,
......@@ -570,4 +576,5 @@ export {
transformOssVideofy,
deepCopy,
newScenQueryGet,
delHtmlBlank,
}
\ No newline at end of file
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