12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view class="history">
- <view class="list">
- <view class="list_item flex" v-for="(item,index) in list" :key="index">
- <image :src="item.thumbnail" mode="aspectFill" loading="lazy"></image>
- <view class="innews">
- <text>{{item.title}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { getServerWatchHistory } from '@/apis/my'
- export default {
- data(){
- return{
- list:[]
- }
- },
- mounted() {
- this.getHistoryList()
- },
- methods:{
- async getHistoryList(){
- const res = await getServerWatchHistory()
- console.log(res,'res');
- this.list = res
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .history{
- height: 100%;
- background: #fff;
- .list{
- padding: 20rpx;
- .list_item{
- padding: 20rpx;
- image{
- object-fit: contain;
- width: 160rpx;
- height: 220rpx;
- margin-right: 30rpx;
- }
- .innews{
- padding: 40rpx 0;
- display: flex;
- flex-direction: column;
- // justify-content: space-around;
- }
- }
- }
- }
- </style>
|