From 0f2f72a1e387d76f0db7cc5b977823cdf189e014 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Thu, 25 Apr 2019 23:27:58 +0800 Subject: [PATCH] Complete photo list. --- src/api/photo.js | 8 ++ src/views/sheet/internal/PhotoList.vue | 103 ++++++++++++++++++------- 2 files changed, 85 insertions(+), 26 deletions(-) diff --git a/src/api/photo.js b/src/api/photo.js index ac0a1bc0..49218186 100644 --- a/src/api/photo.js +++ b/src/api/photo.js @@ -20,6 +20,14 @@ photoApi.create = (photo) => { }) } +photoApi.update = (photoId, photo) => { + return service({ + url: `${baseUrl}/${photoId}`, + method: 'put', + data: photo + }) +} + photoApi.delete = photoId => { return service({ url: `${baseUrl}/${photoId}`, diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index f682bdf6..af5d35cc 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -54,6 +54,7 @@ 添加 @@ -74,7 +75,7 @@ hoverable @click="showDrawer(item)" > -
+
@@ -120,8 +121,11 @@ :loading="drawerLoading" :paragraph="{rows: 8}" > -
- +
+
@@ -133,6 +137,23 @@ :paragraph="{rows: 8}" > + + + + + + 缩略图地址: + + +