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
2b8000e9
Commit
2b8000e9
authored
Apr 13, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
273c2f26
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
111 deletions
+66
-111
shopeditor.js
service/business/shopeditor.js
+1
-1
websiteindex.js
service/customer/websiteindex.js
+1
-2
businessinfolist.js
src/pages/websiteindex/businessinfolist.js
+3
-2
index.js
src/pages/websiteindex/index.js
+31
-34
index.wxml
src/pages/websiteindex/index.wxml
+14
-12
index.wxss
src/pages/websiteindex/index.wxss
+5
-14
teacherdetail.js
src/pages/websiteindex/teacherdetail.js
+8
-38
teacherdetail.wxss
src/pages/websiteindex/teacherdetail.wxss
+1
-1
teacherlist.js
src/pages/websiteindex/teacherlist.js
+2
-7
No files found.
service/business/shopeditor.js
View file @
2b8000e9
...
...
@@ -54,7 +54,7 @@ function setSchoolInfo(data) {
function
schoolInfoEdit
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
`
${
apis
.
business
.
shopeditor
.
schoolEdit
}
/
data.id
`
,
url
:
`
${
apis
.
business
.
shopeditor
.
schoolEdit
}
/
${
data
.
id
}
`
,
data
,
method
:
'PUT'
,
errorresolve
:
1
,
...
...
service/customer/websiteindex.js
View file @
2b8000e9
...
...
@@ -126,8 +126,7 @@ function teacherlistGet (data) {
}
function
teacherDetailGet
(
data
)
{
return
wxRequest
({
url
:
`apis.customer.websiteindex.teacherlist/
${
data
.
id
}
`
,
data
,
url
:
`
${
apis
.
customer
.
websiteindex
.
teacherlist
}
/
${
data
.
id
}
`
,
method
:
'GET'
,
errorresolve
:
1
,
notExactly
:
true
...
...
src/pages/websiteindex/businessinfolist.js
View file @
2b8000e9
...
...
@@ -27,10 +27,11 @@ Page({
onLoad
:
function
(
options
)
{
const
{
sid
sid
,
tab
}
=
options
;
this
.
setData
({
sid
:
sid
||
0
sid
:
sid
||
0
,
curtab
:
tab
||
1
});
this
.
getWebsiteIntrosList
(
'init'
)
},
...
...
src/pages/websiteindex/index.js
View file @
2b8000e9
...
...
@@ -202,14 +202,13 @@ Page({
this
.
websitecourseshowGet
()
this
.
websiteintrosGet
();
this
.
clockListGet
();
// this.newslistGet();
this
.
teacherListGet
();
this
.
adsListGet
();
this
.
momentlistGet
();
// this.onlineCoursesListGet();
this
.
userShow
();
this
.
websiteBarrage
()
this
.
subjectListGet
()
// this.websiteBarrage();//弹幕
this
.
subjectListGet
()
;
const
myLocation
=
LocalStorage
.
getItem
(
'myLocation'
);
const
that
=
this
;
wx
.
login
({
...
...
@@ -220,14 +219,6 @@ Page({
})
}
})
wx
.
setNavigationBarColor
({
frontColor
:
'#ffffff'
,
backgroundColor
:
'rgba(255, 255, 255, 0)'
,
animation
:
{
duration
:
0
,
timingFunc
:
'linear'
}
});
})
}
else
{
wxLogin
().
then
((
res
)
=>
{
...
...
@@ -245,11 +236,10 @@ Page({
this
.
momentlistGet
();
this
.
onlineCoursesListGet
();
this
.
userShow
();
this
.
websiteBarrage
()
// this.websiteBarrage();//弹幕
this
.
subjectListGet
()
}
const
myLocation
=
LocalStorage
.
getItem
(
'myLocation'
);
const
that
=
this
;
if
(
myLocation
)
{
...
...
@@ -478,20 +468,37 @@ Page({
}
=
e
.
currentTarget
.
dataset
;
let
url
=
""
;
switch
(
type
)
{
case
'schoolinfo'
:
url
=
`/src/pages/websiteindex/businessinfolist`
;
case
'schoolinfo1'
:
url
=
`/src/pages/websiteindex/businessinfolist?sid=
${
this
.
data
.
sid
}
&tab=1`
;
break
;
case
'schoolinfo2'
:
url
=
`/src/pages/websiteindex/businessinfolist?sid=
${
this
.
data
.
sid
}
&tab=2`
;
break
;
case
'moment'
:
url
=
`/src/pages/websiteindex/momentlist`
;
url
=
`/src/pages/websiteindex/momentlist?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
''
:
url
=
`/src/pages/websiteindex/subjectlist?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
'fresh'
:
url
=
`/src/pages/websiteindex/freshlist`
;
url
=
`/src/pages/websiteindex/freshlist?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
'onlinecourselist'
:
url
=
`/src/pages/websiteindex/onlineclassroomlist?sid=
${
this
.
data
.
sid
}
`
;
break
;
case
'schoolteacher'
:
url
=
`/src/pages/websiteindex/teacherlist?sid=
${
this
.
data
.
sid
}
`
;
break
;
default
:
break
;
}
wx
.
navigateTo
({
url
:
url
+
`?sid=
${
this
.
data
.
sid
}
`
url
:
url
})
},
goclocklist
()
{
wx
.
reLaunch
({
url
:
`/src/pages/papersquare/index?sid=
${
this
.
data
.
sid
}
`
,
})
},
// 弹幕(50条)
...
...
@@ -558,6 +565,12 @@ Page({
}
}).
catch
((
e
)
=>
{})
},
bindTeacherDetail
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
;
wx
.
navigateTo
({
url
:
`/src/pages/websiteindex/teacherdetail?sid=
${
this
.
data
.
sid
}
&id=
${
id
}
`
,
})
},
// 课堂瞬间
momentlistGet
()
{
momentlistGet
({
...
...
@@ -901,11 +914,6 @@ Page({
clockList
:
_clockList
})
},
goclocklist
()
{
wx
.
reLaunch
({
url
:
`/src/pages/papersquare/index?sid=
${
this
.
data
.
sid
}
`
,
})
},
// 微官网基本信息
websitehomeGet
()
{
let
that
=
this
;
...
...
@@ -919,7 +927,6 @@ Page({
if
(
code
==
200
)
{
if
(
data
)
{
const
myLocation
=
LocalStorage
.
getItem
(
'myLocation'
);
const
that
=
this
;
data
.
banner
=
data
.
banner
?
JSON
.
parse
(
data
.
banner
)
:
''
;
data
.
tags
=
data
.
tags
?
JSON
.
parse
(
data
.
tags
)
:
''
;
...
...
@@ -1309,16 +1316,6 @@ Page({
url
:
`/src/pages/websiteindex/businessinfolist?sid=
${
this
.
data
.
sid
}
`
,
})
},
goOnlineclassroomlist
()
{
wx
.
navigateTo
({
url
:
`/src/pages/websiteindex/onlineclassroomlist?sid=
${
this
.
data
.
sid
}
`
,
})
},
goSubjectList
()
{
wx
.
navigateTo
({
url
:
`/src/pages/websiteindex/subjectlist?sid=
${
this
.
data
.
sid
}
`
,
})
},
goOnlineClass
(
e
)
{
const
{
item
...
...
src/pages/websiteindex/index.wxml
View file @
2b8000e9
...
...
@@ -21,7 +21,7 @@
bindended="bannervideoEnd"
></video>
</view>
<swiper indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" style="height:
64
0rpx;" bindchange="swiperChange" wx:else>
<swiper indicator-dots="{{false}}" autoplay="{{true}}" circular="{{true}}" style="height:
42
0rpx;" bindchange="swiperChange" wx:else>
<swiper-item wx:for="{{schoolInfo.banner.src}}" wx:key="index">
<image src="{{filter.imagify(item)}}" class="slide-image" mode="widthFix"/>
</swiper-item>
...
...
@@ -108,16 +108,16 @@
<view class="section-wrap section-teacher" wx:if="{{teacherTotal>0}}">
<view class="box-title">
<view class="title">名师风采<view class="text">({{teacherTotal}})</view></view>
<view class="right" bindtap="">
<view class="right" bindtap="
toMoreList" data-type="schoolteacher
">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="teacher-list">
<view class="item" wx:for="{{teacherList}}" wx:key="index">
<image class="avatar" src="
https://cdn.img.shangjiadao.cn/clock/consumer/4296340/2019-09-03/ff415d032c8f3bc02aa63a3205ff4eeb.jpg
"></image>
<view class="
nickname">黄老师
</view>
<view class="
kind">书法
</view>
<view class="
desc">10
年教龄</view>
<view class="item" wx:for="{{teacherList}}" wx:key="index"
bindtap="bindTeacherDetail" data-id="{{item.id}}"
>
<image class="avatar" src="
{{filter.imagify(item.avatar)}}
"></image>
<view class="
line nickname">{{item.name}}
</view>
<view class="
line">{{item.course}}
</view>
<view class="
line">{{item.seniority}}
年教龄</view>
</view>
</view>
</view>
...
...
@@ -172,6 +172,9 @@
<view class="section-wrap business-instro" id="business-info" wx:if="{{sortItem.name=='orgdesc'}}">
<view class="box-title">
<view class="title">学校介绍</view>
<view class="right" bindtap="toMoreList" data-type="schoolinfo1" wx:if="{{schoolInfoTotal>0}}">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
<view class="desc-box" wx:if="{{schoolInfo.intro}}">
<view class="content">{{schoolInfo.intro}}</view>
...
...
@@ -184,10 +187,10 @@
</swiper-item>
</swiper>
<view class="label-box">
<view class="icon-item">
<view class="icon-item"
bindtap="toMoreList" data-type="schoolinfo1"
>
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_pic.png?{{imageVersion}}"></image>{{schoolInfoPicTotal}}
</view>
<view class="icon-item">
<view class="icon-item"
bindtap="toMoreList" data-type="schoolinfo2"
>
<image class="icon" src="{{localImageRoot}}2c/websiteindex/label_video.png?{{imageVersion}}"></image>{{schoolInfoVideoTotal}}
</view>
</view>
...
...
@@ -213,12 +216,11 @@
type="{{2}}"
/>
</view>
<!-- <view class="btn-more" bindtap="toMoreList" data-type="moment" wx:if="{{momentList.length>0}}">更多课堂瞬间</view> -->
</view>
<view class="section-wrap online-classroom" wx:if="{{onlineCoursesList.length>0}}">
<view class="box-title">
<view class="title">在线课堂</view>
<view class="right"
bindtap="goOnlineclassroom
list">
<view class="right"
bindtap="toMoreList" data-type="onlinecourse
list">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
...
...
@@ -240,7 +242,7 @@
<view class="section-wrap section-subject" wx:if="{{subjectList.length>0}}">
<view class="box-title">
<view class="title">一起打卡</view>
<view class="right" bindtap="
goSubjectL
ist">
<view class="right" bindtap="
toMoreList" data-type="subjectl
ist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
...
...
src/pages/websiteindex/index.wxss
View file @
2b8000e9
...
...
@@ -1033,31 +1033,22 @@ page{
height: 88rpx;
border-radius: 50%;
}
.teacher-list .item
>view
{
.teacher-list .item
.line
{
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
line-height: 30rpx;
font-size: 22rpx;
color: #999;
}
.teacher-list .item .nickname{
font-size: 26rpx;
color: #222;
line-height: 37rpx;
padding-top: 12rpx;
}
.teacher-list .item .kind{
font-size: 22rpx;
color: #999;
line-height: 30rpx;
padding: 3rpx 0 2rpx
}
.teacher-list .item .desc{
font-size: 22rpx;
color: #999;
line-height: 30rpx;
padding: 12rpx 0 3rpx;
}
.section-ad{
width: 100%;
height: 180rpx;
...
...
src/pages/websiteindex/teacherdetail.js
View file @
2b8000e9
import
{
helpDetail
}
from
'../../../service/common.js'
;
import
{
teacherDetailGet
}
from
'../../../service/customer/websiteindex.js'
;
...
...
@@ -12,15 +9,7 @@ Page({
localImageRoot
:
"../../../images/"
,
sid
:
0
,
id
:
0
,
detail
:
{
id
:
1
,
avatar
:
'https://cdn.s.shangjiadao.cn/clock/min/b/5d68ddeace846.jpg'
,
name
:
'黄老师黄老师黄老师黄老师黄老师黄老师'
,
seniority
:
'20'
,
course
:
'银币书法'
,
bg
:
'道士'
,
intro
:
''
,
},
detail
:
{},
},
onLoad
:
function
(
options
)
{
const
{
id
,
sid
}
=
options
;
...
...
@@ -29,7 +18,6 @@ Page({
sid
:
sid
||
0
,
})
this
.
teacherDetail
();
this
.
helpDetail
();
},
teacherDetail
()
{
teacherDetailGet
({
...
...
@@ -37,37 +25,19 @@ Page({
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
let
intro
=
[];
try
{
intro
=
JSON
.
parse
(
data
.
intro
)[
0
].
value
;
}
catch
(
error
)
{
intro
=
[];
}
data
.
intro
=
intro
//
let intro = [];
//
try {
//
intro = JSON.parse(data.intro)[0].value;
//
} catch (error) {
//
intro = [];
//
}
//
data.intro = intro
this
.
setData
({
detail
:
data
,
})
}
})
},
helpDetail
()
{
helpDetail
({
alias
:
9999
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
let
content
=
[];
try
{
content
=
JSON
.
parse
(
data
.
content
)[
0
].
value
;
}
catch
(
error
)
{
content
=
[];
}
this
.
setData
({
'detail.intro'
:
content
,
})
}
})
},
onShareAppMessage
()
{
return
{
title
:
'老师详情'
,
...
...
src/pages/websiteindex/teacherdetail.wxss
View file @
2b8000e9
...
...
@@ -92,7 +92,7 @@
.detailbox {
position: relative;
padding: 30rpx
24rpx
;
padding: 30rpx
0
;
}
.detailbox::before {
content: "";
...
...
src/pages/websiteindex/teacherlist.js
View file @
2b8000e9
...
...
@@ -7,12 +7,7 @@ Page({
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
list
:
[
{
id
:
1
,
avatar
:
'https://cdn.s.shangjiadao.cn/clock/min/b/5d68ddeace846.jpg'
,
name
:
'黄老师黄老师黄老师黄老师黄老师黄老师'
,
seniority
:
'20'
,
course
:
'银币书法'
,
bg
:
'道士'
,
intro
:
''
},
{
id
:
6
,
avatar
:
'https://cdn.s.shangjiadao.cn/clock/min/b/5d68ddeace846.jpg'
,
name
:
'海老师'
,
seniority
:
'18'
,
course
:
'琴棋书画'
,
bg
:
'道是士道是士道是士道是士道是士'
,
intro
:
''
},
{
id
:
4
,
avatar
:
'https://cdn.s.shangjiadao.cn/clock/min/b/5d68ddeace846.jpg'
,
name
:
'波老师'
,
seniority
:
'02'
,
course
:
'打阿萨德'
,
bg
:
'道士的'
,
intro
:
''
},
{
id
:
2
,
avatar
:
'https://cdn.s.shangjiadao.cn/clock/min/b/5d68ddeace846.jpg'
,
name
:
'好老师'
,
seniority
:
'15'
,
course
:
'按时发散'
,
bg
:
'道是士道是士道是士道是士道是士道是士道是士道是士道是士'
,
intro
:
''
},
],
list
:
[],
total
:
''
,
page
:
1
,
perPage
:
10
,
...
...
@@ -27,7 +22,7 @@ Page({
this
.
setData
({
sid
:
sid
||
0
});
//
this.teacherlistGet('init');
this
.
teacherlistGet
(
'init'
);
// app.getCurrentSchoolStudentId({
// source_id: this.data.sid,
// source_type: 10,
...
...
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