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
4c1d3ca3
Commit
4c1d3ca3
authored
Apr 15, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c8f3b39a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
145 deletions
+140
-145
index.js
src/pages/websiteindex/index.js
+15
-38
index.wxml
src/pages/websiteindex/index.wxml
+125
-107
No files found.
src/pages/websiteindex/index.js
View file @
4c1d3ca3
...
...
@@ -97,22 +97,10 @@ Page({
clockTotal
:
''
,
listLoading
:
false
,
shareBtnShow
:
0
,
sort
:
[{
name
:
'schoolinfo'
,
desc
:
'机构信息'
,
},
{
name
:
'banner'
,
desc
:
'banner图片或视频'
,
},
{
name
:
'course'
,
desc
:
'体验课'
,
},
{
name
:
'clocklist'
,
desc
:
'学员动态'
,
},
{
name
:
'orgdesc'
,
desc
:
'机构介绍'
,
},
],
sort
:
[
{
name
:
'orgdesc'
,
desc
:
'学校介绍'
},
{
name
:
'clocklist'
,
desc
:
'学生动态'
}
],
//默认排序
schoolDetail
:
''
,
fixBottomBtn
:
false
,
scorefeedbackshow
:
false
,
...
...
@@ -939,6 +927,7 @@ Page({
data
.
banner
=
data
.
banner
?
JSON
.
parse
(
data
.
banner
)
:
''
;
data
.
tags
=
data
.
tags
?
JSON
.
parse
(
data
.
tags
)
:
''
;
let
dataSort
=
''
;
// 机构信息/banner图片或视频/体验课 不参与排序 固定位置
if
(
data
.
sort
)
{
dataSort
=
JSON
.
parse
(
data
.
sort
)
let
removeItem1
=
dataSort
.
findIndex
(
item
=>
item
.
name
==
"banner"
);
...
...
@@ -948,29 +937,13 @@ Page({
let
removeItem3
=
dataSort
.
findIndex
(
item
=>
item
.
name
==
"course"
);
dataSort
.
splice
(
removeItem3
,
1
)
}
// 未设置微官网则 学生动态/学校介绍
data
.
sort
=
data
.
sort
?
dataSort
:
[
// {
// name: 'schoolinfo',
// desc: '机构信息',
// },
// {
// name: 'banner',
// desc: 'banner图片或视频',
// },
// {
// name: 'course',
// desc: '体验课',
// },
{
name
:
'clocklist'
,
desc
:
'学员动态'
,
},
{
name
:
'orgdesc'
,
desc
:
'机构介绍'
,
}
{
name
:
'orgdesc'
,
desc
:
'学校介绍'
},
{
name
:
'clocklist'
,
desc
:
'学生动态'
}
];
console
.
log
(
data
.
sort
,
'1112131223'
)
}
else
{
this
.
schoolInfoGet
()
this
.
setData
({
...
...
@@ -979,12 +952,16 @@ Page({
})
}
console
.
log
(
data
.
sort
,
'11111'
)
data
.
distance
=
getFlatternDistance
(
this
.
data
.
latitude
,
this
.
data
.
longitude
,
Number
(
data
.
latitude
),
Number
(
data
.
longitude
));
this
.
setData
({
schoolInfo
:
data
?
data
:
''
,
websitehomeEmpty
:
data
&&
data
.
banner
?
false
:
true
},()
=>
{
console
.
log
(
this
.
data
.
schoolInfo
.
banner
,
'banner'
)
console
.
log
(
data
.
sort
,
'排序'
)
console
.
log
(
this
.
data
.
schoolInfo
.
sort
,
'schoolInfo.sort'
)
if
(
that
.
data
.
schoolInfo
.
banner
.
type
==
'video'
){
wxGetImageInfo
({
src
:
videoPoster
(
that
.
data
.
schoolInfo
.
banner
.
src
[
0
])}).
then
((
res
)
=>
{
let
w
=
750
,
initratio
,
bannerVideoH
;
...
...
src/pages/websiteindex/index.wxml
View file @
4c1d3ca3
This diff is collapsed.
Click to expand it.
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