72 lines
1.3 KiB
Vue
72 lines
1.3 KiB
Vue
<template>
|
|
<view class="page" style=" height:100vh; background: #f6f6f8;">
|
|
<z-nav-bar title="培训班管理"></z-nav-bar>
|
|
<!-- 公共组件-每个页面必须引入 -->
|
|
<public-module></public-module>
|
|
<view v-if="image&&image.length>0">
|
|
<image v-for="(item,index) in image" :key="index" :src="item" mode="aspectFit" class="image"></image>
|
|
</view>
|
|
<z-navigation></z-navigation>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import $http from '@/config/requestConfig.js';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
image: [],
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
this.image = e.image.split(',');
|
|
console.log(this.image)
|
|
},
|
|
onShow() {
|
|
|
|
},
|
|
methods: {
|
|
//获取数据
|
|
getData(){
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
})
|
|
$http.request({
|
|
url: "common/trainingClass/trainingClassList",
|
|
method: "POST",
|
|
data: {
|
|
year: this.year
|
|
},
|
|
header: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
})
|
|
.then(res => {
|
|
uni.hideLoading();
|
|
if (res.code == 0) {
|
|
if(res.trainingClassList&&res.trainingClassList.length>0){
|
|
this.list = res.trainingClassList;
|
|
}else{
|
|
this.list = [];
|
|
this.nullStatus = true;
|
|
}
|
|
}
|
|
}).catch(e => {
|
|
|
|
});
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.image{
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
/deep/.image img{
|
|
position: initial;
|
|
opacity: 1;
|
|
}
|
|
</style> |