Commit 2b8000e9 authored by lvtz's avatar lvtz

fix

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