Browse Source

fix photo

Sherry 1 year ago
parent
commit
27df805df7
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      src/fe/healthpassport/js/register.js

+ 10
- 3
src/fe/healthpassport/js/register.js View File

@@ -84,6 +84,8 @@ register = function () {
84 84
 		$(".photo__img").append(`
85 85
 			<img src="${linePicUrl}"/>
86 86
 		`);
87
+		
88
+		$(".photo .load-wrapp ").hide();
87 89
 
88 90
 		const imageURL = linePicUrl;
89 91
 		if(imageURL.trim() !== '') {
@@ -171,9 +173,14 @@ register = function () {
171 173
 					
172 174
 
173 175
 				}else {
174
-					imagePreview.html("");
175
-					imagePreview.append(`<img src=${finalase64Data} />`);
176
-					$(".photo .load-wrapp ").hide();
176
+					if(fileInput.id == 'fileInput1') {
177
+						LinePicHandler(linePicUrl);
178
+					}
179
+					if(fileInput.id == 'fileInput2') {
180
+						imagePreview.html("");
181
+						imagePreview.append(`<img src=${finalase64Data} />`);
182
+						$(".photo .load-wrapp ").hide();
183
+					}
177 184
 				}
178 185
 
179 186
 			});