Commit 2b8000e9 authored by lvtz's avatar lvtz

fix

parent 273c2f26
......@@ -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,
......
......@@ -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
......
......@@ -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')
},
......
......@@ -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
......
......@@ -21,7 +21,7 @@
bindended="bannervideoEnd"
></video>
</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">
<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="goOnlineclassroomlist">
<view class="right" bindtap="toMoreList" data-type="onlinecourselist">
更多<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="goSubjectList">
<view class="right" bindtap="toMoreList" data-type="subjectlist">
更多<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
......
......@@ -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;
......
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: '老师详情',
......
......@@ -92,7 +92,7 @@
.detailbox {
position: relative;
padding: 30rpx 24rpx;
padding: 30rpx 0;
}
.detailbox::before {
content: "";
......
......@@ -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,
......
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