记录一下循环更改获取到的内容

2021-08-25  本文已影响0人  李小白呀

循环更改获取到的内容

    async zpPlanLists() {
          const { data: res } = await zpPlanList(this.zpPlanList)
          this.swiperList = res.data
          // console.log(res.data)
          if (this.swiperList !== null) {
            this.swiperList.forEach((item) => {
              item.bgImage = changeFileViewUrl(item.bgImage)
              if (item.planStatus === '0') {
                item.planStatus = '编辑中'
              } else if (item.planStatus === '1') {
                item.planStatus = '审批中'
              } else if (item.planStatus === '2') {
                item.planStatus = '发布中'
              } else if (item.planStatus === '3') {
                item.planStatus = '处理中'
              } else {
                item.planStatus = '招聘结束'
              }
            })
          }
        }
上一篇 下一篇

猜你喜欢

热点阅读