@jx3box/jx3box-common-ui 9.1.9 → 9.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "9.1.9",
3
+ "version": "9.2.1",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/service/fav.js CHANGED
@@ -18,11 +18,14 @@ function delFav(id) {
18
18
 
19
19
  // 稍后再看
20
20
  function addWatchLater(data) {
21
- return $n.post(`api/next2/userdata/favorite/item`, data)
21
+ return $n.post(`api/next2/userdata/watch-later/item`, data)
22
22
  }
23
23
 
24
24
  function delWatchLater(params) {
25
- return $n.delete(`api/next2/userdata/favorite/item`, { params })
25
+ return $n.delete(`api/next2/userdata/watch-later/item`, { params })
26
26
  }
27
-
28
- export { hasFav, addFav, delFav, addWatchLater, delWatchLater };
27
+ // 删除稍后再看 by meta_id
28
+ function delWatchLaterByMetaId(meta_id) {
29
+ return $n.delete(`api/next2/userdata/watch-later/item/content_meta/${meta_id}`)
30
+ }
31
+ export { hasFav, addFav, delFav, addWatchLater, delWatchLater, delWatchLaterByMetaId };
@@ -33,6 +33,10 @@ export default {
33
33
  type: String,
34
34
  default: "",
35
35
  },
36
+ contentId: {
37
+ type: Number,
38
+ default: 0,
39
+ }
36
40
  },
37
41
  data: function () {
38
42
  return {
@@ -57,6 +61,7 @@ export default {
57
61
  title: this.title,
58
62
  author_id: this.authorId,
59
63
  banner: this.banner,
64
+ content_meta_id: this.contentId,
60
65
  }
61
66
  }
62
67
  },
@@ -76,7 +81,7 @@ export default {
76
81
  },
77
82
  rmWatchLater: function () {
78
83
  // remove watch later
79
- delWatchLater(omit(this.data, ['title'])).then(() => {
84
+ delWatchLater(omit(this.data, ['title', 'author_id', 'banner', 'content_meta_id'])).then(() => {
80
85
  this.favorite = false;
81
86
  });
82
87
  },
@@ -52,7 +52,7 @@
52
52
  :category="category"
53
53
  @updateRecord="updateRecord"
54
54
  />
55
- <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner"></watch-later>
55
+ <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner" :content-id="postId"></watch-later>
56
56
  <Share :postId="postId" :postType="postType" :client="client" />
57
57
  </div>
58
58
  <div class="w-thx-records">