@jx3box/jx3box-common-ui 5.5.4 → 5.5.8

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.
@@ -13,7 +13,7 @@
13
13
  <el-input v-model.number="uid" placeholder="请输入UID(数字)"></el-input>
14
14
  </div>
15
15
  <div class="u-preview">
16
- <img class="u-avatar" :src="userdata.user_avatar | showAvatar" />
16
+ <img class="u-avatar" :src="showAvatar(userdata.user_avatar)" />
17
17
  <span class="u-name">{{ userdata.display_name || "-" }}</span>
18
18
  </div>
19
19
  <span slot="footer" class="dialog-footer">
@@ -66,11 +66,6 @@ export default {
66
66
  this.$emit("switchUserPop", newval);
67
67
  },
68
68
  },
69
- filters: {
70
- showAvatar: function (val) {
71
- return showAvatar(val, "l");
72
- },
73
- },
74
69
  computed: {},
75
70
  methods: {
76
71
  confirm: function () {
@@ -83,6 +78,9 @@ export default {
83
78
  });
84
79
  }
85
80
  },
81
+ showAvatar: function (val) {
82
+ return showAvatar(val, "l");
83
+ },
86
84
  },
87
85
  mounted: function () {},
88
86
  components: {},
@@ -45,7 +45,7 @@
45
45
  <ul class="u-menu" v-show="!fold">
46
46
  <li>
47
47
  <a class="u-me" :href="url.homepage">
48
- <b>{{ user.name | showUserName }}</b>
48
+ <b>{{ showUserName(user.name) }}</b>
49
49
  <img
50
50
  v-if="isSuperAuthor"
51
51
  :src="super_author_icon"
@@ -229,7 +229,7 @@ export default {
229
229
  User.destroy()
230
230
  .then((res) => {
231
231
  this.isLogin = false;
232
- if (location.href.indexOf("dashboard") > 0) {
232
+ if (location.pathname.startsWith('/dashboard') || location.pathname.startsWith('/publish')) {
233
233
  location.href = __Root;
234
234
  }
235
235
  })
@@ -265,12 +265,7 @@ export default {
265
265
  this.checkSuperAuthor();
266
266
  }
267
267
  },
268
- },
269
- created: function () {
270
- this.closeExpandList();
271
- this.init();
272
- },
273
- filters: {
268
+
274
269
  showUserName: function (val) {
275
270
  if (val) {
276
271
  if (val.length < 5) {
@@ -283,6 +278,10 @@ export default {
283
278
  }
284
279
  },
285
280
  },
281
+ created: function () {
282
+ this.closeExpandList();
283
+ this.init();
284
+ },
286
285
  components: {},
287
286
  };
288
287
  </script>
@@ -27,7 +27,6 @@ export default {
27
27
 
28
28
  }
29
29
  },
30
- filters: {},
31
30
  created: function () {},
32
31
  mounted: function () {},
33
32
  };
@@ -115,7 +115,6 @@ export default {
115
115
  },
116
116
  init: function () {},
117
117
  },
118
- filters: {},
119
118
  created: function () {},
120
119
  mounted: function () {},
121
120
  };
@@ -7,6 +7,7 @@
7
7
  <i class="el-icon-trophy"></i>
8
8
  </span>
9
9
  <span class="u-meta u-user">参与打赏</span>
10
+ <span class="u-meta u-user" v-if="mode== 'wiki'">收益作者</span>
10
11
  <span class="u-meta u-count">盒币</span>
11
12
  <span class="u-meta u-remark">寄语</span>
12
13
  <time class="u-meta u-time"></time>
@@ -22,18 +23,27 @@
22
23
  </span>
23
24
  <a
24
25
  class="u-meta u-user"
25
- :href="item.operate_user_id | authorLink"
26
+ :href="authorLink(item.operate_user_id)"
26
27
  target="_blank"
27
28
  >
28
- <img class="u-user-avatar" :src="item.ext_operate_user_info.avatar | showAvatar" alt />
29
+ <img class="u-user-avatar" :src="showAvatar(item.ext_operate_user_info.avatar)" alt />
29
30
  <span>{{item.ext_operate_user_info.display_name}}</span>
30
31
  </a>
32
+ <a
33
+ v-if="mode== 'wiki'"
34
+ class="u-meta u-user"
35
+ :href="authorLink(item.user_id)"
36
+ target="_blank"
37
+ >
38
+ <img class="u-user-avatar" :src="showAvatar(item.ext_user_info.avatar)" alt />
39
+ <span>{{item.ext_user_info.display_name}}</span>
40
+ </a>
31
41
  <span class="u-meta u-count">
32
42
  +
33
43
  <b>{{item.count}}</b>
34
44
  </span>
35
45
  <span class="u-meta u-remark">{{item.remark}}</span>
36
- <time class="u-meta u-time">{{item.created_at | showTime}}</time>
46
+ <time class="u-meta u-time">{{showTime(item.created_at)}}</time>
37
47
  <span class="u-delete" v-if="isSuperAdmin && !item.is_user_gift" @click="recovery(item,i)">
38
48
  <i class="el-icon-delete"></i>撤销
39
49
  </span>
@@ -59,7 +69,7 @@ import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
59
69
  import { showTime } from "@jx3box/jx3box-common/js/moment";
60
70
  export default {
61
71
  name: "BoxcoinRecords",
62
- props: ["postType", "postId", "cacheRecord"],
72
+ props: ["postType", "postId", "cacheRecord",'mode'],
63
73
  components: {},
64
74
  data: function () {
65
75
  return {
@@ -137,8 +147,6 @@ export default {
137
147
  },
138
148
  });
139
149
  },
140
- },
141
- filters: {
142
150
  authorLink,
143
151
  showTime,
144
152
  showAvatar: function (val) {
@@ -117,7 +117,6 @@ export default {
117
117
  },
118
118
  init: function () {},
119
119
  },
120
- filters: {},
121
120
  created: function () {},
122
121
  mounted: function () {},
123
122
  };
@@ -2,13 +2,13 @@
2
2
  <div class="w-collection" v-if="list && list.length">
3
3
  <div class="w-collection-title" @click="handleShow" :class="{ on: visible }">
4
4
  <span> <i class="el-icon-notebook-1"></i> 该作品已被收录至作者的剑三小册 </span>
5
- <a @click.stop :href="id | collectionLink" target="_blank">《{{ title }}》</a>
5
+ <a @click.stop :href="collectionLink(id)" target="_blank">《{{ title }}》</a>
6
6
  </div>
7
7
  <transition name="fade">
8
8
  <div class="w-collection-list" v-if="visible">
9
9
  <ol v-if="list && list.length" class="u-list" :style="{ display: visible ? 'block' : 'none' }">
10
10
  <li v-for="(item, i) in list" :key="i" class="u-item">
11
- <a v-if="item" :href="item | showLink" target="_blank">
11
+ <a v-if="item" :href="showLink(item)" target="_blank">
12
12
  <!-- <i class="el-icon-link"></i> -->
13
13
  {{ item.title }}
14
14
  </a>
@@ -72,8 +72,6 @@ export default {
72
72
  this.$emit('collectionUpdate',this.data)
73
73
  });
74
74
  },
75
- },
76
- filters: {
77
75
  collectionLink: function(id) {
78
76
  return getLink("collection", id);
79
77
  },
@@ -4,10 +4,10 @@
4
4
  <a
5
5
  class="w-creators-super w-creators-item"
6
6
  v-if="super_author"
7
- :href="super_author.ID | authorLink"
7
+ :href="authorLink(super_author.ID)"
8
8
  target="_blank"
9
9
  >
10
- <img class="u-avatar" :src="super_author.user_avatar | showAvatar" />
10
+ <img class="u-avatar" :src="showAvatar(super_author.user_avatar)" />
11
11
  <span class="u-name">{{super_author.display_name}}</span>
12
12
  <i class="u-up">UP</i>
13
13
  </a>
@@ -16,13 +16,13 @@
16
16
  class="w-creators-author w-creators-item"
17
17
  v-for="(item,i) in other_authors"
18
18
  :key="i"
19
- :href="item.post_author_info.ID | authorLink"
19
+ :href="authorLink(item.post_author_info.ID)"
20
20
  target="_blank"
21
21
  v-show="item.status"
22
22
  >
23
- <img class="u-avatar" :src="item.post_author_info.user_avatar | showAvatar" />
23
+ <img class="u-avatar" :src="showAvatar(item.post_author_info.user_avatar)" />
24
24
  <span class="u-name">{{item.post_author_info.display_name}}</span>
25
- <i class="u-label">{{item.label | formatLabel}}</i>
25
+ <i class="u-label">{{formatLabel(item.label)}}</i>
26
26
  </a>
27
27
  </div>
28
28
  <a class="w-creators-edit" :href="editLink" v-if="isCreator">
@@ -86,8 +86,6 @@ export default {
86
86
  this.other_authors = res.data?.data.other_authors;
87
87
  });
88
88
  },
89
- },
90
- filters: {
91
89
  showAvatar: function (val) {
92
90
  return showAvatar(val, 48);
93
91
  },
@@ -4,7 +4,7 @@
4
4
  <ul class="u-list">
5
5
  <li v-for="(item, i) in list" :key="i">
6
6
  <el-tooltip class="item" effect="dark" :content="item.title" placement="left">
7
- <a :href="item | showLink" target="_blank">
7
+ <a :href="showLink(item)" target="_blank">
8
8
  <i class="el-icon-link"></i>
9
9
  {{ item.title }}
10
10
  </a>
@@ -48,8 +48,6 @@ export default {
48
48
  this.data = res.data?.data?.collection;
49
49
  });
50
50
  },
51
- },
52
- filters: {
53
51
  showLink: function(item) {
54
52
  if (item.type == "custom") {
55
53
  return item.url;
@@ -17,7 +17,6 @@ export default {
17
17
  computed:{},
18
18
  watch:{},
19
19
  methods:{},
20
- filters:{},
21
20
  created:function(){},
22
21
  mounted:function(){},
23
22
  }
@@ -15,7 +15,6 @@ export default {
15
15
  computed:{},
16
16
  watch:{},
17
17
  methods:{},
18
- filters:{},
19
18
  created:function(){},
20
19
  mounted:function(){},
21
20
  }
@@ -34,7 +34,7 @@
34
34
  <!-- 客户端 -->
35
35
  <div class="u-meta u-sub-block">
36
36
  <em class="u-label">适用客户端</em>
37
- <span class="u-value u-client" :class="client">{{ client | showClientLabel }}</span>
37
+ <span class="u-value u-client" :class="client">{{ showClientLabel(client) }}</span>
38
38
  </div>
39
39
 
40
40
  <!-- 发布日期 -->
@@ -121,13 +121,12 @@ export default {
121
121
  return this.post?.client || "std";
122
122
  },
123
123
  },
124
- methods: {},
125
- mounted: function() {},
126
- filters: {
124
+ methods: {
127
125
  showClientLabel: function(val) {
128
126
  return client_map[val];
129
127
  },
130
128
  },
129
+ mounted: function() {},
131
130
  };
132
131
  </script>
133
132
 
@@ -8,7 +8,7 @@
8
8
  <Share :postId="postId" :postType="postType" />
9
9
  </div>
10
10
  <div class="w-thx-records">
11
- <boxcoin-records :postId="postId" :postType="postType" :cacheRecord="cacheRecord" />
11
+ <boxcoin-records :postId="postId" :postType="postType" :cacheRecord="cacheRecord" :mode="mode"/>
12
12
  </div>
13
13
  <div class="w-thx-copyright">
14
14
  &copy; 所有原创作品,著作权归作者所有,所有未经授权的非署名转载或抄袭将有权追究法律责任,所有法律事务由专聘律师代理。<br>
@@ -28,7 +28,7 @@ import User from '@jx3box/jx3box-common/js/user'
28
28
  import {getPostBoxcoinConfig,getBoxcoinStatus} from '../../service/thx'
29
29
  export default {
30
30
  name: "Thx",
31
- props: ["postId", "postType","userId","adminBoxcoinEnable","userBoxcoinEnable"],
31
+ props: ["postId", "postType","userId","adminBoxcoinEnable","userBoxcoinEnable",'mode'],
32
32
  components: {
33
33
  Like,
34
34
  Share,
@@ -93,7 +93,6 @@ export default {
93
93
  }
94
94
  },
95
95
  },
96
- filters: {},
97
96
  created: function () {},
98
97
  };
99
98
  </script>
@@ -34,7 +34,7 @@
34
34
  :href="user.id ? author_url(user.id) : null"
35
35
  >
36
36
  <img
37
- :src="user.avatar | thumbnail_url"
37
+ :src="thumbnail_url(user.avatar)"
38
38
  :alt="user.nickname"
39
39
  :title="user.nickname"
40
40
  />
@@ -110,8 +110,6 @@ export default {
110
110
  methods: {
111
111
  author_url: authorLink,
112
112
  ts2str,
113
- },
114
- filters: {
115
113
  thumbnail_url: function(val) {
116
114
  return getThumbnail(val, 24, true);
117
115
  },