@jx3box/jx3box-common-ui 8.0.2 → 8.0.4
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/assets/css/admin.less +29 -1
- package/package.json +1 -1
- package/service/cms.js +6 -1
- package/src/Breadcrumb.vue +12 -3
- package/src/bread/Admin.vue +53 -4
- package/src/header/asset.vue +13 -12
- package/src/header/shop.vue +1 -1
package/assets/css/admin.less
CHANGED
|
@@ -74,10 +74,38 @@
|
|
|
74
74
|
.x;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
.c-admin-extend {
|
|
78
|
+
.u-condition {
|
|
79
|
+
.mt(10px);
|
|
80
|
+
.el-input-group__prepend {
|
|
81
|
+
padding-left: 10px;
|
|
82
|
+
padding-right: 10px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.u-map {
|
|
86
|
+
.u-prepend {
|
|
87
|
+
.fl;
|
|
88
|
+
width: auto;
|
|
89
|
+
min-width: 57px;
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
.fz(12px,38px);
|
|
92
|
+
text-align: center;
|
|
93
|
+
}
|
|
94
|
+
.el-select {
|
|
95
|
+
.db;
|
|
96
|
+
.ml(57px);
|
|
97
|
+
}
|
|
98
|
+
.el-input__inner {
|
|
99
|
+
border-top-left-radius: 0;
|
|
100
|
+
border-bottom-left-radius: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
77
105
|
@media screen and (max-width:@ipad){
|
|
78
106
|
.c-admin{
|
|
79
107
|
.el-drawer{
|
|
80
108
|
.w(100%) !important;
|
|
81
109
|
}
|
|
82
110
|
}
|
|
83
|
-
}
|
|
111
|
+
}
|
package/package.json
CHANGED
package/service/cms.js
CHANGED
|
@@ -53,4 +53,9 @@ function getCollection(id) {
|
|
|
53
53
|
return $cms({ mute: true }).get(`/api/cms/post/collection/${id}`);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
// 获取自定义主题
|
|
57
|
+
function getTopicBucket(params) {
|
|
58
|
+
return $cms().get(`/api/cms/topic/bucket`, { params });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { getPostAuthors, uploadImage, upload, getDecoration, getDecorationJson, checkTeamMember, getHonorJson, getSliders, getCollection, getTopicBucket, };
|
package/src/Breadcrumb.vue
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</a>
|
|
48
48
|
<Adminbutton v-if="adminEnable" class="u-admin" />
|
|
49
49
|
<ListAdmin v-if="topicEnable" />
|
|
50
|
-
<Admin v-if="adminEnable" :marksOptions="adminMarks" />
|
|
50
|
+
<Admin v-if="adminEnable" :marksOptions="adminMarks" :show-extend="true" :app="slug" :subtypeMap="subtypeMap" />
|
|
51
51
|
<slot name="op-prepend"></slot>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
@@ -80,7 +80,9 @@ export default {
|
|
|
80
80
|
"crumbEnable",
|
|
81
81
|
"withoutLeft",
|
|
82
82
|
"adminMarks",
|
|
83
|
-
"icon"
|
|
83
|
+
"icon",
|
|
84
|
+
// "subtypeMap",
|
|
85
|
+
"showExtend"
|
|
84
86
|
],
|
|
85
87
|
data: function () {
|
|
86
88
|
return {
|
|
@@ -89,7 +91,14 @@ export default {
|
|
|
89
91
|
isNotAdmin: !User.isEditor(),
|
|
90
92
|
isOverlay: false,
|
|
91
93
|
isApp: isApp(),
|
|
92
|
-
show: false
|
|
94
|
+
show: false,
|
|
95
|
+
|
|
96
|
+
subtypeMap: {
|
|
97
|
+
1: "攻略心得",
|
|
98
|
+
2: "萌新指南",
|
|
99
|
+
3: "江湖异闻",
|
|
100
|
+
4: "同人创作"
|
|
101
|
+
}
|
|
93
102
|
};
|
|
94
103
|
},
|
|
95
104
|
computed: {
|
package/src/bread/Admin.vue
CHANGED
|
@@ -41,9 +41,13 @@
|
|
|
41
41
|
:predefine="color_options"
|
|
42
42
|
size="mini"
|
|
43
43
|
></el-color-picker>
|
|
44
|
-
<span class="c-admin-highlight-preview" :style="{ color: color }" style="margin-right: 10px
|
|
44
|
+
<span class="c-admin-highlight-preview" :style="{ color: color }" style="margin-right: 10px"
|
|
45
|
+
>预览高亮效果</span
|
|
46
|
+
>
|
|
45
47
|
</template>
|
|
46
|
-
<el-checkbox class="c-admin-highlight-checkbox" v-model="isStar" :true-label="1" :false-label="0"
|
|
48
|
+
<el-checkbox class="c-admin-highlight-checkbox" v-model="isStar" :true-label="1" :false-label="0"
|
|
49
|
+
>精选</el-checkbox
|
|
50
|
+
>
|
|
47
51
|
|
|
48
52
|
<el-divider content-position="left">封面海报</el-divider>
|
|
49
53
|
<div class="c-admin-banner">
|
|
@@ -94,6 +98,22 @@
|
|
|
94
98
|
</div>
|
|
95
99
|
</div>
|
|
96
100
|
|
|
101
|
+
<div class="c-admin-extend" v-if="showExtend">
|
|
102
|
+
<div class="u-condition u-map" v-if="Object.keys(subtypeMap)">
|
|
103
|
+
<span class="u-prepend el-input-group__prepend">子类型</span>
|
|
104
|
+
<el-select v-model="post_subtype" filterable placeholder="请选择" clearable>
|
|
105
|
+
<el-option v-for="(label, value) in subtypeMap" :value="value" :label="label" :key="value">
|
|
106
|
+
</el-option>
|
|
107
|
+
</el-select>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="u-condition u-map">
|
|
110
|
+
<span class="u-prepend el-input-group__prepend">标签</span>
|
|
111
|
+
<el-select v-model="tag" filterable placeholder="请选择" clearable multiple collapse-tags>
|
|
112
|
+
<el-option v-for="value in tags" :value="value" :label="value" :key="value"> </el-option>
|
|
113
|
+
</el-select>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
97
117
|
<div class="c-admin-buttons">
|
|
98
118
|
<el-button type="primary" @click="submit" :loading="pushing">提交</el-button>
|
|
99
119
|
<el-button type="plain" @click="close">取消</el-button>
|
|
@@ -109,6 +129,7 @@ import { __cms, __postType, __visibleMap } from "@jx3box/jx3box-common/data/jx3b
|
|
|
109
129
|
import { getSetting, postSetting } from "../../service/admin";
|
|
110
130
|
import User from "@jx3box/jx3box-common/js/user";
|
|
111
131
|
import { cms as marks } from "@jx3box/jx3box-common/data/mark.json";
|
|
132
|
+
import { getTopicBucket } from "../../service/cms";
|
|
112
133
|
export default {
|
|
113
134
|
name: "Admin",
|
|
114
135
|
props: {
|
|
@@ -134,6 +155,18 @@ export default {
|
|
|
134
155
|
type: Boolean,
|
|
135
156
|
default: false,
|
|
136
157
|
},
|
|
158
|
+
showExtend: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: false,
|
|
161
|
+
},
|
|
162
|
+
subtypeMap: {
|
|
163
|
+
type: Object,
|
|
164
|
+
default: () => {},
|
|
165
|
+
},
|
|
166
|
+
app: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: "",
|
|
169
|
+
},
|
|
137
170
|
},
|
|
138
171
|
data() {
|
|
139
172
|
return {
|
|
@@ -188,6 +221,9 @@ export default {
|
|
|
188
221
|
// 类型
|
|
189
222
|
post_type: "",
|
|
190
223
|
type_options: [],
|
|
224
|
+
post_subtype: "",
|
|
225
|
+
tag: [],
|
|
226
|
+
tags: [],
|
|
191
227
|
|
|
192
228
|
// 作者
|
|
193
229
|
post_author: "",
|
|
@@ -205,7 +241,7 @@ export default {
|
|
|
205
241
|
color: this.isHighlight ? this.color : "",
|
|
206
242
|
mark: this.mark || [],
|
|
207
243
|
sticky: this.isSticky ? Date.now() : null,
|
|
208
|
-
star: this.isStar
|
|
244
|
+
star: this.isStar,
|
|
209
245
|
};
|
|
210
246
|
},
|
|
211
247
|
isAdmin: function () {
|
|
@@ -263,7 +299,7 @@ export default {
|
|
|
263
299
|
// 拉
|
|
264
300
|
pull: function () {
|
|
265
301
|
getSetting(this.pid).then((data) => {
|
|
266
|
-
let { ID, color, mark, post_status, post_author, sticky, post_banner, post_type, visible, star } = data;
|
|
302
|
+
let { ID, color, mark, post_status, post_author, sticky, post_banner, post_type, visible, star, post_subtype, tags } = data;
|
|
267
303
|
this.pid = ID;
|
|
268
304
|
this.post_status = post_status;
|
|
269
305
|
this.visible = visible;
|
|
@@ -277,6 +313,8 @@ export default {
|
|
|
277
313
|
if (this.sticky) this.isSticky = true;
|
|
278
314
|
|
|
279
315
|
this.isStar = star || 0;
|
|
316
|
+
this.tags = tags || [];
|
|
317
|
+
this.post_subtype = post_subtype || "";
|
|
280
318
|
|
|
281
319
|
// 设置加载完成标识
|
|
282
320
|
this.pulled = true;
|
|
@@ -305,6 +343,13 @@ export default {
|
|
|
305
343
|
this.close();
|
|
306
344
|
});
|
|
307
345
|
},
|
|
346
|
+
// 获取topic标签
|
|
347
|
+
loadTopic() {
|
|
348
|
+
getTopicBucket({ type: "bbs" }).then((res) => {
|
|
349
|
+
const data = res.data.data?.map((item) => item.name) || [];
|
|
350
|
+
this.tags = data;
|
|
351
|
+
});
|
|
352
|
+
},
|
|
308
353
|
},
|
|
309
354
|
watch: {
|
|
310
355
|
"$route.params.id": function (id) {
|
|
@@ -328,6 +373,10 @@ export default {
|
|
|
328
373
|
this.checkHasRight();
|
|
329
374
|
// 预设信息
|
|
330
375
|
this.initTypeOptions();
|
|
376
|
+
|
|
377
|
+
if (this.showExtend && this.app) {
|
|
378
|
+
this.loadTopic();
|
|
379
|
+
}
|
|
331
380
|
},
|
|
332
381
|
mounted: function () {
|
|
333
382
|
// 基本信息
|
package/src/header/asset.vue
CHANGED
|
@@ -7,45 +7,45 @@
|
|
|
7
7
|
<div class="u-assets u-pop-content">
|
|
8
8
|
<div class="u-detail">
|
|
9
9
|
<span class="u-item">
|
|
10
|
-
<a class="u-item-primary" href="/about/incentives" target="
|
|
10
|
+
<a class="u-item-primary" href="/about/incentives" :target="target">
|
|
11
11
|
<span class="u-label"><i class="el-icon-user"></i> 等级</span>
|
|
12
12
|
<span class="u-value u-level" :style="levelStyle">Lv.{{ level }}</span>
|
|
13
13
|
</a>
|
|
14
|
-
<!-- <span class="u-item-extend"><a href="/about/incentives" target="
|
|
14
|
+
<!-- <span class="u-item-extend"><a href="/about/incentives" :target="target">[权益]</a></span> -->
|
|
15
15
|
</span>
|
|
16
16
|
<span class="u-item">
|
|
17
|
-
<a class="u-item-primary" href="/dashboard/boxcoin" target="
|
|
17
|
+
<a class="u-item-primary" href="/dashboard/boxcoin" :target="target"
|
|
18
18
|
><span class="u-label"><i class="el-icon-coin"></i> 盒币</span>
|
|
19
19
|
<span class="u-value">{{ asset.box_coin }}</span></a
|
|
20
20
|
>
|
|
21
|
-
<span class="u-item-extend"><a href="/dashboard/boxcoin" target="
|
|
21
|
+
<span class="u-item-extend"><a href="/dashboard/boxcoin" :target="target">[兑换通宝]</a></span>
|
|
22
22
|
</span>
|
|
23
23
|
<span class="u-item">
|
|
24
|
-
<a class="u-item-primary" href="/dashboard/cny" target="
|
|
24
|
+
<a class="u-item-primary" href="/dashboard/cny" :target="target"
|
|
25
25
|
><span class="u-label"><i class="el-icon-wallet"></i> 金箔</span
|
|
26
26
|
><span class="u-value">{{ asset.cny }}</span></a
|
|
27
27
|
>
|
|
28
28
|
<span class="u-item-extend"
|
|
29
|
-
><a href="/vip/cny" target="
|
|
30
|
-
<a href="/dashboard/cny" target="
|
|
29
|
+
><a href="/vip/cny" :target="target">[充值]</a>
|
|
30
|
+
<a href="/dashboard/cny" :target="target">[提现]</a></span
|
|
31
31
|
>
|
|
32
32
|
</span>
|
|
33
33
|
<span class="u-item">
|
|
34
|
-
<a class="u-item-primary" href="/dashboard/points" target="
|
|
34
|
+
<a class="u-item-primary" href="/dashboard/points" :target="target"
|
|
35
35
|
><span class="u-label"><i class="el-icon-sugar"></i> 银铛</span>
|
|
36
36
|
<span class="u-value">{{ asset.points }}</span></a
|
|
37
37
|
>
|
|
38
38
|
<span class="u-item-extend"
|
|
39
|
-
><a href="/vip/mall" target="
|
|
40
|
-
><a href="/vip/lottery" target="
|
|
39
|
+
><a href="/vip/mall" :target="target">[兑礼]</a
|
|
40
|
+
><a href="/vip/lottery" :target="target">[抽奖]</a></span
|
|
41
41
|
>
|
|
42
42
|
</span>
|
|
43
43
|
<span class="u-item">
|
|
44
|
-
<a class="u-item-primary" href="/dashboard/card" target="
|
|
44
|
+
<a class="u-item-primary" href="/dashboard/card" :target="target"
|
|
45
45
|
><span class="u-label"><i class="el-icon-bank-card"></i> 卡密</span>
|
|
46
46
|
<span class="u-value">{{ asset.ext_info ? asset.ext_info.keycode : 0 }}</span></a
|
|
47
47
|
>
|
|
48
|
-
<span class="u-item-extend"><a href="/dashboard/card" target="
|
|
48
|
+
<span class="u-item-extend"><a href="/dashboard/card" :target="target">[查看]</a></span>
|
|
49
49
|
</span>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -61,6 +61,7 @@ export default {
|
|
|
61
61
|
data() {
|
|
62
62
|
return {
|
|
63
63
|
// VIP
|
|
64
|
+
target: "_self",
|
|
64
65
|
};
|
|
65
66
|
},
|
|
66
67
|
computed: {
|
package/src/header/shop.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-header-panel c-header-shop">
|
|
3
3
|
<el-tooltip effect="dark" content="积分商城" placement="bottom" popper-class="c-header-tooltip">
|
|
4
|
-
<a class="u-present" href="/vip/mall"
|
|
4
|
+
<a class="u-present" href="/vip/mall">
|
|
5
5
|
<img class="u-icon" svg-inline src="../../assets/img/header/gift.svg" />
|
|
6
6
|
</a>
|
|
7
7
|
</el-tooltip>
|