Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
3f0ac42c
Commit
3f0ac42c
authored
Mar 23, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打卡数据中心
parent
f060b3c1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
29 deletions
+47
-29
index.js
business/pages/themeindex/index.js
+13
-2
index.wxml
business/pages/themeindex/index.wxml
+1
-1
index.wxs
filter/index.wxs
+26
-26
index.js
utilities/index.js
+7
-0
No files found.
business/pages/themeindex/index.js
View file @
3f0ac42c
...
...
@@ -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
)
=>
{
...
...
business/pages/themeindex/index.wxml
View file @
3f0ac42c
filter/index.wxs
View file @
3f0ac42c
...
...
@@ -727,5 +727,5 @@ module.exports = {
numberToCn: numberToCn,
formatClueFrom: formatClueFrom,
formatClueStatus: formatClueStatus,
jsonStringify: jsonStringify
jsonStringify: jsonStringify
,
}
utilities/index.js
View file @
3f0ac42c
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment