/**
 ****--@date 2024-06-07 09:45:06
 ****--@author yizhiyang
 ****--@description 图片预览
 **/

module.exports = {
  data() {
    return {};
  },
  computed: {},
  created() {},
  methods: {
    // 单张预览logourl图片地址
    previewSingleImg(logourl) {
      let imgsArray = [];
      imgsArray[0] = logourl;
      uni.previewImage({
        current: 0,
        urls: imgsArray,
      });
    },
    // 预览图片多张imgUrlListt图片数组，index索引
    previewImgArr(index, imgUrlList) {
      let imgsArray = [];
      for (let i = 0; i < imgUrlList.length; i++) {
        let urlPath = imgUrlList[i].staticPath || imgUrlList[i];
        imgsArray.push(urlPath);
      }
      uni.previewImage({
        current: index,
        urls: imgsArray,
        indicator: 'number',
        loop: true,
      });
    },
  },
};
