xuxy
2024-07-15 e3898caa56109a29f94e4dabc7db421a5bd4b730
pages/home/supplier-home.vue
@@ -114,7 +114,7 @@
      </view>
      <view class="m-t-12" @click="getNoticeMore">
         <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon
            :scrollable="scrollable" :text="currentNotice.title||'暂无公共'" :key="currentNotice.id" />
            :scrollable="scrollable" :text="currentNotice.title||'暂无公告'" :key="currentNotice.id" />
         <span v-if="!currentNotice||!currentNotice.id">&nbsp;</span>
      </view>
      <view class="item-container">
@@ -224,24 +224,24 @@
                     this.scrollable = false
                  }
                  let that = this
                  if (this.noticeList.length >= 1) {
                     setInterval(() => {
                        console.log('interval,1')
                        that.currentNoticeIndex += 1
                        that.currentNoticeIndex %= that.noticeList.length
                        that.currentNotice = that.noticeList[that.currentNoticeIndex]
                        that.scrollable = false
                        that.$nextTick(() => {
                           if (that.currentNotice.title && that.currentNotice.title
                              .length >= 30) {
                              that.scrollable = true
                           } else {
                              that.scrollable = false
                           }
                        })
                  // if (this.noticeList.length >= 1) {
                  //    setInterval(() => {
                  //       console.log('interval,1')
                  //       that.currentNoticeIndex += 1
                  //       that.currentNoticeIndex %= that.noticeList.length
                  //       that.currentNotice = that.noticeList[that.currentNoticeIndex]
                  //       that.scrollable = false
                  //       that.$nextTick(() => {
                  //          if (that.currentNotice.title && that.currentNotice.title
                  //             .length >= 30) {
                  //             that.scrollable = true
                  //          } else {
                  //             that.scrollable = false
                  //          }
                  //       })
                     }, 8000)
                  }
                  //    }, 8000)
                  // }
               }
            }