| | |
| | | var imageUrls = imgsUrl.attr('src') |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | if(imageUrls && imageUrls !== '') { |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function (url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function () { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function openPicture(url) { |
| | |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | if(imageUrls && imageUrls !== '') { |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function (url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function () { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function openPicture(url) { |
| | |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | if(imageUrls && imageUrls !== '') { |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function (url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function () { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function openPicture(url) { |
| | |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | if(imageUrls && imageUrls !== ''){ |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function openPicture(url) { |
| | |
| | | var imageUrls = imgsUrl.attr('src') |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | if(imageUrls && imageUrls !== '') { |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function (url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function () { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | /* 图片--查看 */ |
| | | function showPicture(id,type) { |
| | |
| | | var ids = imgsUrl.attr('data-id') |
| | | var imageContainer = document.querySelector('.image-container'); |
| | | |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | if(imageUrls && imageUrls !== '') { |
| | | // 将逗号分隔的字符串拆分为URL数组 |
| | | var imageUrlArray = imageUrls.split(','); |
| | | |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function(url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function() { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | // 遍历URL数组并创建img元素 |
| | | imageUrlArray.forEach(function (url, index) { |
| | | var img = document.createElement('img'); |
| | | img.setAttribute('src', url); |
| | | img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin-right: 10px'); |
| | | img.setAttribute('title', '查看图片'); |
| | | img.setAttribute('data-id', ids); |
| | | img.addEventListener('click', function () { |
| | | // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto'); |
| | | openPicture(url) |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | imageContainer.appendChild(img); |
| | | }); |
| | | } |
| | | }); |
| | | /* 图片--查看 */ |
| | | function showPicture(id,type) { |