Browse Source

接口

master
李双庆 11 months ago
parent
commit
a51bdbf76c
  1. 23
      api/apiRoute.js
  2. 10
      pages.json
  3. 132
      pages/coach/my/teaching_management.vue
  4. 60
      pages/coach/my/teaching_management_info.vue

23
api/apiRoute.js

@ -73,8 +73,27 @@ export default {
//教研管理文章列表
teachingResearchList(data = {}) {
let url = '/teachingResearch/list'
return http.get(url, data).then(res => {
return res;
})
},
//教研管理文章详情
teachingResearchInfo(id) {
let url = '/teachingResearch/info/' + id
return http.get(url).then(res => {
return res;
})
},
//获取能看的教研管理类型
teachingResearchLookType(data = {}) {
let url = '/teachingResearch/lookType'
return http.get(url, data).then(res => {
return res;
})
},
//↑↑↑↑↑↑↑↑↑↑↑↑-----教练接口相关-----↑↑↑↑↑↑↑↑↑↑↑↑ //↑↑↑↑↑↑↑↑↑↑↑↑-----教练接口相关-----↑↑↑↑↑↑↑↑↑↑↑↑

10
pages.json

@ -391,7 +391,15 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, },
{
"path": "pages/coach/my/teaching_management_info",
"style": {
"navigationBarTitleText": "文章详情",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},

132
pages/coach/my/teaching_management.vue

@ -1,88 +1,74 @@
<template> <template>
<view> <view>
<view class="dis_style div_style"> <view class="dis_style div_style" v-for="(item,index) in arrayList" :key="index" @click="info(item.id)">
<view> <view>
<view class='color_style'>标题</view> <view class='color_style'>{{item.title}}</view>
<view class='color_type_style'>类型</view> <view class='color_type_style'>{{getTableType(item.table_type)}}</view>
</view> </view>
<view class='color_style'>时间</view> <view class='color_date_style'>{{item.create_time}}</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view>
<view class="dis_style div_style">
<view>
<view class='color_style'>标题</view>
<view class='color_type_style'>类型</view>
</view>
<view class='color_style'>时间</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
return { return {
arrayList: [],
tableTypeName: {
'1': "课程教学大纲",
'2': "跳绳教案库",
'3': "增高教案库",
'4': "篮球教案库",
'5': "强化教案库",
'6': "空中忍者教案库",
'7': "少儿安防教案库",
'8': "体能教案库",
'9': "热身动作库",
'10': "体能动作库",
'11': "趣味游戏库",
'12': "放松动作库",
'13': "训练内容",
'14': "训练视频",
'15': "课后作业",
'16': "优秀一堂课",
'17': "空中忍者",
'18': "篮球动作",
'19': "跳绳动作",
'20': "跑酷动作",
'21': "安防动作",
'22': "标准化动作",
'23': "3-6岁体测",
'24': "7+体测",
'25': "3-6岁体测讲解—解读",
'26': "7+岁体测讲解—解读",
'27': "互动游戏",
'28': "套圈游戏",
'29': "鼓励方式"
}
} }
}, },
onLoad() {
this.init()
},
methods: { methods: {
init() {
apiRoute.teachingResearchList().then(res => {
if (res.code == 1) {
this.arrayList = res.data.data
}
})
},
getTableType(text) {
return this.tableTypeName[text]
},
info(id) {
console.log(id)
uni.navigateTo({
url: '/pages/coach/my/teaching_management_info?id=' + id
})
}
} }
} }
</script> </script>
@ -100,8 +86,12 @@
} }
.color_style{ .color_style{
font-size: 30rpx; font-size: 30rpx;
font-weight: bold;
} }
.color_type_style{ .color_type_style{
font-size: 26rpx; font-size: 22rpx;
}
.color_date_style{
font-size: 22rpx;
} }
</style> </style>

60
pages/coach/my/teaching_management_info.vue

@ -0,0 +1,60 @@
<template>
<view style="height: 100vh;background-color: #fff;">
<view class="title_style">
{{arrayInfo.title}}
</view>
<view class="date_style">
{{arrayInfo.update_time}}
</view>
<view class="con_style" v-html="arrayInfo.content"></view>
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
export default {
data() {
return {
articleId: undefined,
arrayInfo: []
}
},
onLoad(options) {
this.articleId = options.id;
console.log(this.articleId, 888)
this.init()
},
methods: {
init() {
apiRoute.teachingResearchInfo(this.articleId).then(res => {
if (res.code == 1) {
this.arrayInfo = res.data
}
})
},
}
}
</script>
<style>
.title_style{
width: 100%;
text-align: center;
font-size: 40rpx;
font-weight: bold;
padding-top: 10px;
}
.date_style{
width: 100%;
text-align: right;
font-size: 20rpx;
color: #ccc;
padding-right: 16rpx;
margin-top: 10px;
}
.con_style{
font-size: 30rpx;
padding: 18rpx;
margin-top: 20px;
}
</style>
Loading…
Cancel
Save