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
93f5ab2c
Commit
93f5ab2c
authored
Mar 23, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Plain Diff
fix
parents
9d0df468
3f0ac42c
Hide 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 @
93f5ab2c
...
...
@@ -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 @
93f5ab2c
...
...
@@ -10,7 +10,7 @@
</btn-drag>
<view class="theme-index-container">
<view class="page-topbg">
<view class="top-title">{{params.title}}</view>
...
...
filter/index.wxs
View file @
93f5ab2c
...
...
@@ -112,7 +112,7 @@ function formatDateToSecond (date) {
}
function timeCompare (date) {
var startTimestamp = date * 1000;
var nowTimestamp = getDate().getTime();
var nowTimestamp = getDate().getTime();
var oneHourTimestamp = 1 * 60 * 60 * 1000;
var oneDayTimestamp = 24 * 60 * 60 * 1000;
var timestampCompare = nowTimestamp - startTimestamp;
...
...
@@ -128,8 +128,8 @@ function timeCompare (date) {
return text
}
function bulletTimeCompare (date) {
var startTimestamp = getDate(date).getTime();
var nowTimestamp = getDate().getTime();
var startTimestamp = getDate(date).getTime();
var nowTimestamp = getDate().getTime();
var oneMinuteTimestamp = 60 * 1000;
var oneHourTimestamp = 1 * 60 * 60 * 1000;
var oneDayTimestamp = 24 * 60 * 60 * 1000;
...
...
@@ -159,7 +159,7 @@ function imagify (src, params) {
if (!src) return '';
var _src = src;
if (src.indexOf('cdn.img.shangjiadao.cn') == -1) {
_src = 'https://cdn.img.shangjiadao.cn/' + src;
_src = 'https://cdn.img.shangjiadao.cn/' + src;
}
if(src.indexOf('x-oss-process') != -1){
return _src;
...
...
@@ -174,7 +174,7 @@ function ossVideofy (src) {
if (!src) return '';
var _src = src;
if (src.indexOf('omedia.shangjiadao.cn') == -1) {
_src = 'https://omedia.shangjiadao.cn/' + src;
_src = 'https://omedia.shangjiadao.cn/' + src;
}
return _src
}
...
...
@@ -183,15 +183,15 @@ function transformOssVideofy (src,mode) {
var _src = src;
var _mode = mode;
if(!mode){
_mode = 'mp4'
_mode = 'mp4'
}
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.' + _mode;
_src = 'https://media.shangjiadao.cn/' + src + '.' + _mode;
}
// if (src.indexOf('media.shangjiadao.cn') == -1) {
// _src = 'https://media.shangjiadao.cn/' + src + '.mp4';
// // _src = 'https://media.shangjiadao.cn/' + src + '_1.m3u8';
// _src = 'https://media.shangjiadao.cn/' + src + '.mp4';
// // _src = 'https://media.shangjiadao.cn/' + src + '_1.m3u8';
// }
return _src
}
...
...
@@ -199,7 +199,7 @@ function transformOssVideofyM3u8 (src) {
if (!src) return '';
var _src = src;
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.m3u8';
_src = 'https://media.shangjiadao.cn/' + src + '.m3u8';
}
return _src
}
...
...
@@ -211,7 +211,7 @@ function videoPoster (src, params) {
return src;
}
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.jpg';
_src = 'https://media.shangjiadao.cn/' + src + '.jpg';
}
if (params) {
_src = _src + '?x-oss-process=' + params;
...
...
@@ -222,7 +222,7 @@ function mediaPng (src, params) {
if (!src) return '';
var _src = src;
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src;
_src = 'https://media.shangjiadao.cn/' + src;
}
if (params) {
_src = _src + '?x-oss-process=' + params;
...
...
@@ -233,7 +233,7 @@ function gifvideoPoster (src, params) {
if (!src) return '';
var _src = src;
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.gif';
_src = 'https://media.shangjiadao.cn/' + src + '.gif';
}
if (params) {
_src = _src + '?x-oss-process=' + params;
...
...
@@ -244,7 +244,7 @@ function jpgvideoPoster (src, params) {
if (!src) return '';
var _src = src;
if (src.indexOf('media.shangjiadao.cn') == -1) {
_src = 'https://media.shangjiadao.cn/' + src + '.jpg';
_src = 'https://media.shangjiadao.cn/' + src + '.jpg';
}
if (params) {
_src = _src + '?x-oss-process=' + params;
...
...
@@ -269,7 +269,7 @@ function actionFilter (type) {
text = '点评了';
break;
default:
break
break
}
return text
}
...
...
@@ -343,7 +343,7 @@ function courseFilter (type) {
text = '未到';
break;
default:
break
break
}
return text
}
...
...
@@ -363,18 +363,18 @@ function courseColor(type){
case 4:
text = '#38E0C9';
break;
case 5:
case 5:
text = '#BD9FFF';
break;
case 6:
case 6:
text = '#ffd338';
break;
case 7:
case 7:
text = '#35c13a';
break;
default:
text = '#fff'
break
break
}
return text
}
...
...
@@ -410,7 +410,7 @@ function courseMode(status){
}
// 多选 保存id
function checkSelect (subject, subjects) {
var i = 0, _length = subjects.length;
var i = 0, _length = subjects.length;
var flag = false;
for (i=0;i < _length; i++) {
if (subject.id == subjects[i]) {
...
...
@@ -420,7 +420,7 @@ function checkSelect (subject, subjects) {
return flag
}
function checkStudentSelect (subject, subjects) {
var i = 0, _length = subjects.length;
var i = 0, _length = subjects.length;
var flag = false;
for (i=0;i < _length; i++) {
if (subject.student_id == subjects[i]) {
...
...
@@ -431,7 +431,7 @@ function checkStudentSelect (subject, subjects) {
}
// 多选 保存整个对象
function checkSelectObj (subject, subjects) {
var i = 0, _length = subjects.length;
var i = 0, _length = subjects.length;
var flag = false;
for (i=0;i < _length; i++) {
if (subject.id == subjects[i].id) {
...
...
@@ -670,7 +670,7 @@ function numberToCn(num){
unit = '0万'
flag = parseInt(num / 100000)
}
return flag + unit + '余'
}
return num;
...
...
@@ -732,5 +732,5 @@ module.exports = {
formatClueFrom: formatClueFrom,
formatClueStatus: formatClueStatus,
jsonStringify: jsonStringify,
indexOf: indexOf,
}
\ No newline at end of file
indexOf: indexOf
}
utilities/index.js
View file @
93f5ab2c
...
...
@@ -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