fmui-base 2.1.32 → 2.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/form/form.js +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -1343,14 +1343,18 @@ var PageHome = function (_React$Component) {
|
|
|
1343
1343
|
// //alert("value==="+value);
|
|
1344
1344
|
// }
|
|
1345
1345
|
var updatedHtml = value.replace(/<img\s+([^>]*)src="([^"]*)"/gi, function (match, p1, p2, p3) {
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1346
|
+
if (p2 && p2.indexOf("/attachment/" > 0) && p2.indexOf("?" > 0)) {
|
|
1347
|
+
var queryString = p2.split('?')[1];
|
|
1348
|
+
var params = new URLSearchParams(queryString);
|
|
1349
|
+
var fid = params.get('fid');
|
|
1350
|
+
// console.log(fid);
|
|
1351
|
+
p2 = context + '/api/m/plugin/attachment/mobile/viewImage?token=' + token + '&fid=' + fid;
|
|
1352
|
+
// p2 = context + "/attachment/"+p2.split("/attachment/")[1];
|
|
1349
1353
|
}
|
|
1350
1354
|
return '<img ' + p1 + 'src="' + p2 + '"';
|
|
1351
1355
|
});
|
|
1352
|
-
console.log(updatedHtml);
|
|
1353
|
-
|
|
1356
|
+
// console.log(updatedHtml);
|
|
1357
|
+
value = updatedHtml;
|
|
1354
1358
|
}
|
|
1355
1359
|
itemParam = t.dealwithLinkField(itemParam, data, status);
|
|
1356
1360
|
itemParam = t.dealwithRelaField(itemParam, allForm);
|