uniapp学习帖子
我这样写轮播图为什么不显示 接口数据可以打印出来
<template>
<view class="content">
<swiper>
<swiper-item>
<image v-for="(item,index) in swiper_list" :key="index" :src="item"></image>
</swiper-item>
</swiper>
</view>
</template>
<script>
import swiper from '../../uni_modules/uview-ui/libs/config/props/swiper';
export default {
data() {
return {
swiper_list: [],
}
},
onLoad() {
uni.request({
url:'http://lifo.jianyicms.com/index.php?v=1&appid=1&appsecret=PHPCMF06FCF83CF16C2&s=httpapi&m=site',
method:'GET',
success:(res)=>{
console.log(res);
this.swiper_list = data.data.hdtp
console.log(this.swiper_list);
}
})
},
methods: {
}
}
</script>
ddw (作者)
设置了
2022-12-31 14:44