diff --git a/APP/static/img/10f90d1a-86fd-4382-953e-45bd44bf4b93.png b/APP/static/img/10f90d1a-86fd-4382-953e-45bd44bf4b93.png new file mode 100644 index 0000000..62bf759 Binary files /dev/null and b/APP/static/img/10f90d1a-86fd-4382-953e-45bd44bf4b93.png differ diff --git a/APP/static/img/f83bbd79-4641-41cb-9f7f-d6a35dbe1aac.png b/APP/static/img/f83bbd79-4641-41cb-9f7f-d6a35dbe1aac.png new file mode 100644 index 0000000..68e9932 Binary files /dev/null and b/APP/static/img/f83bbd79-4641-41cb-9f7f-d6a35dbe1aac.png differ diff --git a/APP/static/js/wsy.js b/APP/static/js/wsy.js index 71df8bb..ce43ff6 100644 --- a/APP/static/js/wsy.js +++ b/APP/static/js/wsy.js @@ -134,7 +134,7 @@ function getContent(type) { page.textList[i]['order'] = i; if (type == 'block' && page.textList[i]['type'] == 'picture') { console.log(page.textList[i]); - page.textList[i]['content'] = get_url(page.textList[i]['content']); + // page.textList[i]['content'] = get_url(i); } } @@ -178,13 +178,19 @@ async function checkLike(list) { } } -function get_url(f) { +function get_url(i) { + var data = new FormData(); + data.append('pic',page.textList[i]['content']['$binary']); + sendRequest('block/get_pic',data,function(f){ + console.log(f); let reader = new FileReader(); console.log(f); reader.readAsDataURL(f); reader.onload = function (e) { return e.target.files[0] || e.dataTransfer.files[0]; }; + }) + } diff --git a/APP/templates/personal.html b/APP/templates/personal.html index 8ca549c..e4d8a32 100644 --- a/APP/templates/personal.html +++ b/APP/templates/personal.html @@ -423,14 +423,14 @@