93 lines
1.7 KiB
Vue
93 lines
1.7 KiB
Vue
<template>
|
|
<view class="app">
|
|
<view class="Classificationlist">
|
|
<view v-for="(item,index) in nurseItemClassifyInfoList" :key="index" @tap='tapitemclass(item)'
|
|
class="itemclass">
|
|
<image :src="item.classifyPictureUrl" mode=""></image>
|
|
<view class="title">
|
|
{{item.classifyName}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getNurseClassifyList
|
|
} from '@/api/pagesB/site/site.js';
|
|
import baseurl from '@/api/baseurl.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
nurseItemClassifyInfoList: undefined,
|
|
};
|
|
},
|
|
methods: {
|
|
//点击分类
|
|
tapitemclass(item) {
|
|
uni.$emit('moreoptionitem', {
|
|
item: JSON.stringify(item)
|
|
})
|
|
uni.navigateBack({
|
|
delta: 1
|
|
});
|
|
},
|
|
//护理站和护理项目分类
|
|
getNurseClassifyinfo() {
|
|
getNurseClassifyList().then(res => {
|
|
res.data.nurseItemClassifyInfoList.forEach(e => {
|
|
e.classifyPictureUrl = baseurl + e.classifyPictureUrl
|
|
})
|
|
this.nurseItemClassifyInfoList = res.data.nurseItemClassifyInfoList
|
|
})
|
|
},
|
|
},
|
|
onLoad() {
|
|
this.getNurseClassifyinfo();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {}
|
|
|
|
.app {
|
|
padding: 10rpx 0;
|
|
|
|
.Classificationlist {
|
|
background-color: #fff;
|
|
width: 98%;
|
|
margin: 0 auto;
|
|
padding: 40rpx 0;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
flex-wrap: wrap;
|
|
text-align: center;
|
|
|
|
.itemclass {
|
|
width: 25%;
|
|
height: 230rpx;
|
|
padding: 20rpx 0;
|
|
|
|
image {
|
|
display: block;
|
|
margin: 0 auto;
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
}
|
|
|
|
.title {
|
|
padding: 0 10rpx;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 30rpx;
|
|
line-height: 70rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|