就是要实现微信小程序的轮播图,然后就没法建立连接

问题遇到的现象和发生背景

实现API接口的连接

用代码块功能插入代码,请勿粘贴截图
<template>
  <view>
    
    <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
      <swiper-item v-for="(item,i) in swiperlist" :key="i">
        <view class="swiper-item">
          <image :src="item.image_src">image>
        view>
      swiper-item>

    swiper>
  view>
template>

<script>
  export default {
    data() {
      return {
        //这是轮播图的数据列表
        swiperlist: []
      };
    },
    onLoad() {
      //  调用方法,获取轮播图的数据
      this.getSwiperList()
    },
    methods: {
      async getSwiperList() {
        const res = await uni.$http.get('/api/public/v1/home/swiperdata')
        console.log(res)
        //请求失败
      }
    }
  }
script>

<style lang="scss">

style>


运行结果及报错内容

img


img

我想要达到的结果

解决那个红色的bug

接口请求不通,这跟你轮播图有什么关系呢?
貌似封装的请求方法不对,排查一下吧

uni.$http 打印一下看看 ,报错是说 get属性未定义