@jx3box/jx3box-common-ui 8.9.16 → 8.9.18
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 +1 -1
- package/src/bread/CommunityAdmin.vue +19 -3
- package/src/header/asset.vue +4 -4
- package/src/interact/Homework.vue +79 -60
package/package.json
CHANGED
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
|
|
139
139
|
<div class="c-community-buttons">
|
|
140
140
|
<div class="c-community-buttons_left">
|
|
141
|
-
<el-button type="danger" size="small" icon="el-icon-delete" @click="deleteTopic">删除帖子</el-button>
|
|
142
|
-
<el-button type="warning" size="small" icon="el-icon-refresh-left" @click="handleCheck"
|
|
141
|
+
<el-button type="danger" class="u-delete" size="small" icon="el-icon-delete" @click="deleteTopic">删除帖子</el-button>
|
|
142
|
+
<el-button type="warning" class="u-check" size="small" icon="el-icon-refresh-left" @click="handleCheck"
|
|
143
143
|
>转为待审核</el-button
|
|
144
144
|
>
|
|
145
145
|
</div>
|
|
@@ -337,7 +337,7 @@ export default {
|
|
|
337
337
|
this.$message.error("ID不存在!");
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
|
-
this.$confirm("
|
|
340
|
+
this.$confirm("此操作将删除该数据, 是否继续?", "提示", {
|
|
341
341
|
confirmButtonText: "确定",
|
|
342
342
|
cancelButtonText: "取消",
|
|
343
343
|
type: "warning",
|
|
@@ -488,4 +488,20 @@ export default {
|
|
|
488
488
|
gap: 5px;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
+
|
|
492
|
+
@media screen and (max-width: @phone) {
|
|
493
|
+
.c-community-admin {
|
|
494
|
+
.c-community-buttons {
|
|
495
|
+
// width: unset !important;
|
|
496
|
+
justify-content: space-between;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.u-delete {
|
|
500
|
+
span {
|
|
501
|
+
display: none !important;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
}
|
|
491
507
|
</style>
|
package/src/header/asset.vue
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<span class="u-item-extend"><a href="/dashboard/boxcoin" :target="target">[兑换通宝]</a></span>
|
|
22
22
|
</span>
|
|
23
|
-
<span class="u-item">
|
|
23
|
+
<!-- <span class="u-item">
|
|
24
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
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
><a href="/vip/cny" :target="target">[充值]</a>
|
|
30
30
|
<a href="/dashboard/cny" :target="target">[提现]</a></span
|
|
31
31
|
>
|
|
32
|
-
</span>
|
|
32
|
+
</span> -->
|
|
33
33
|
<span class="u-item">
|
|
34
34
|
<a class="u-item-primary" href="/dashboard/points" :target="target"
|
|
35
|
-
><span class="u-label"><i class="el-icon-sugar"></i>
|
|
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"
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
// 用户资产
|
|
86
86
|
.c-header-assets {
|
|
87
87
|
position: relative;
|
|
88
|
-
height: 100%;
|
|
88
|
+
height: 100%;
|
|
89
89
|
.u-asset {
|
|
90
90
|
padding: 0 10px;
|
|
91
91
|
height: 100%;
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-boxcoin-admin">
|
|
3
|
-
<el-dialog
|
|
3
|
+
<el-dialog
|
|
4
|
+
:title="dialogTitle"
|
|
5
|
+
:visible="modelValue"
|
|
6
|
+
custom-class="w-boxcoin-pop"
|
|
7
|
+
:close-on-click-modal="false"
|
|
8
|
+
append-to-body
|
|
9
|
+
@close="onClose"
|
|
10
|
+
>
|
|
4
11
|
<div class="w-boxcoin-admin-content">
|
|
5
|
-
<div class="u-left" v-if="type=='grant'">
|
|
12
|
+
<div class="u-left" v-if="type == 'grant'">
|
|
6
13
|
<em class="u-label">本月状态</em>
|
|
7
|
-
已用<b>{{this.used}}</b> 剩余<b>{{this.left}}</b> 总计<b>{{this.total}}</b>
|
|
8
|
-
<el-progress
|
|
14
|
+
已用<b>{{ this.used }}</b> 剩余<b>{{ this.left }}</b> 总计<b>{{ this.total }}</b>
|
|
15
|
+
<el-progress
|
|
16
|
+
:percentage="this.total ? 100 - (this.used * 100) / this.total : 0"
|
|
17
|
+
:stroke-width="15"
|
|
18
|
+
:text-inside="true"
|
|
19
|
+
></el-progress>
|
|
9
20
|
</div>
|
|
10
21
|
<div class="u-left" v-else>
|
|
11
22
|
<em class="u-label">当前拥有盒币</em>
|
|
12
|
-
<b>{{left}}</b>
|
|
23
|
+
<b>{{ left }}</b>
|
|
13
24
|
<!-- <a class="u-charge" :href="chargeLink" target="_blank">[充值]</a> -->
|
|
14
25
|
</div>
|
|
15
26
|
<el-radio-group class="u-homework-type" v-model="type" size="small" v-if="hasPermission">
|
|
16
|
-
<el-radio-button label="reward">打赏</el-radio-button>
|
|
17
27
|
<el-radio-button label="grant">品鉴</el-radio-button>
|
|
28
|
+
<el-radio-button label="reward">打赏</el-radio-button>
|
|
18
29
|
</el-radio-group>
|
|
19
30
|
<div class="u-list">
|
|
20
|
-
<em class="u-label">❤️ {{ type ==
|
|
31
|
+
<em class="u-label">❤️ {{ type == "reward" ? "打赏" : "品鉴" }}</em>
|
|
21
32
|
<div class="u-points">
|
|
22
33
|
<el-radio-group v-model="count">
|
|
23
34
|
<el-radio :label="item" v-for="item in fitPoints" :key="item" border>
|
|
24
|
-
<b>{{item}}</b
|
|
35
|
+
<b>{{ item }}</b
|
|
36
|
+
>盒币
|
|
25
37
|
</el-radio>
|
|
26
38
|
<el-radio label="custom" border>自定义</el-radio>
|
|
27
|
-
<el-input
|
|
39
|
+
<el-input
|
|
40
|
+
v-model="amount"
|
|
41
|
+
v-show="count === 'custom'"
|
|
42
|
+
placeholder="输入自定义数量"
|
|
43
|
+
></el-input>
|
|
28
44
|
</el-radio-group>
|
|
29
45
|
</div>
|
|
30
46
|
</div>
|
|
@@ -38,7 +54,9 @@
|
|
|
38
54
|
:maxlength="30"
|
|
39
55
|
show-word-limit
|
|
40
56
|
></el-input>
|
|
41
|
-
<el-button :disabled="fetchingCurrentRelease" @click="insertCurrentRelease"
|
|
57
|
+
<el-button :disabled="fetchingCurrentRelease" @click="insertCurrentRelease"
|
|
58
|
+
>插入当前版本</el-button
|
|
59
|
+
>
|
|
42
60
|
</div>
|
|
43
61
|
</div>
|
|
44
62
|
</div>
|
|
@@ -51,7 +69,7 @@
|
|
|
51
69
|
</template>
|
|
52
70
|
|
|
53
71
|
<script>
|
|
54
|
-
import { grantBoxcoin, getPostBoxcoinConfig,getBoxcoinStatus,rewardBoxcoin } from "../../service/thx.js";
|
|
72
|
+
import { grantBoxcoin, getPostBoxcoinConfig, getBoxcoinStatus, rewardBoxcoin } from "../../service/thx.js";
|
|
55
73
|
import User from "@jx3box/jx3box-common/js/user";
|
|
56
74
|
import { getBreadcrumb } from "@jx3box/jx3box-common/js/api_misc";
|
|
57
75
|
export default {
|
|
@@ -59,14 +77,14 @@ export default {
|
|
|
59
77
|
props: ["postType", "postId", "userId", "client", "modelValue", "articleId", "category", "title"],
|
|
60
78
|
model: {
|
|
61
79
|
prop: "modelValue",
|
|
62
|
-
event: "update:modelValue"
|
|
80
|
+
event: "update:modelValue",
|
|
63
81
|
},
|
|
64
82
|
data: function () {
|
|
65
83
|
return {
|
|
66
84
|
count: 0,
|
|
67
85
|
|
|
68
86
|
remark: "不错,加油!",
|
|
69
|
-
chosen:
|
|
87
|
+
chosen: "", // 被选中的人
|
|
70
88
|
amount: "",
|
|
71
89
|
|
|
72
90
|
submitting: false,
|
|
@@ -91,8 +109,8 @@ export default {
|
|
|
91
109
|
left() {
|
|
92
110
|
return this.type === "reward" ? this.user_left : this.admin_left;
|
|
93
111
|
},
|
|
94
|
-
hasPermission() {
|
|
95
|
-
return User.hasPermission(
|
|
112
|
+
hasPermission() {
|
|
113
|
+
return User.hasPermission("manage_bbs_reward");
|
|
96
114
|
},
|
|
97
115
|
total: function () {
|
|
98
116
|
return this.admin_total;
|
|
@@ -106,13 +124,7 @@ export default {
|
|
|
106
124
|
// 打赏数量不能超过剩余数量
|
|
107
125
|
// 打赏数量不能为0
|
|
108
126
|
// 打赏寄语不能为空
|
|
109
|
-
return !!(
|
|
110
|
-
!this.isSelf &&
|
|
111
|
-
!this.targetIsSelf &&
|
|
112
|
-
this.isEnough &&
|
|
113
|
-
count &&
|
|
114
|
-
this.remark
|
|
115
|
-
);
|
|
127
|
+
return !!(!this.isSelf && !this.targetIsSelf && this.isEnough && count && this.remark);
|
|
116
128
|
},
|
|
117
129
|
isNotSelf: function () {
|
|
118
130
|
return this.userId != User.getInfo().uid;
|
|
@@ -124,94 +136,101 @@ export default {
|
|
|
124
136
|
const count = this.count === "custom" ? this.amount : this.count;
|
|
125
137
|
return this.left && this.left >= count;
|
|
126
138
|
},
|
|
127
|
-
allowBoxcoin
|
|
128
|
-
return this.postType && this.postId && (this.userId || (this.authors && this.authors.length))
|
|
139
|
+
allowBoxcoin: function () {
|
|
140
|
+
return this.postType && this.postId && (this.userId || (this.authors && this.authors.length));
|
|
129
141
|
},
|
|
130
|
-
hostClient
|
|
131
|
-
return location.href.includes(
|
|
142
|
+
hostClient: function () {
|
|
143
|
+
return location.href.includes("origin") ? "origin" : "std";
|
|
132
144
|
},
|
|
133
|
-
points
|
|
134
|
-
return this.type ===
|
|
145
|
+
points: function () {
|
|
146
|
+
return this.type === "reward" ? this.user_points : this.admin_points;
|
|
135
147
|
},
|
|
136
|
-
fitPoints
|
|
137
|
-
const points = this.points.filter(item => item <= this.left)
|
|
148
|
+
fitPoints: function () {
|
|
149
|
+
const points = this.points.filter((item) => item <= this.left);
|
|
138
150
|
if (this.isSignAuthor) {
|
|
139
151
|
// 最大值为1000
|
|
140
|
-
return points.filter(item => item <= 1000)
|
|
152
|
+
return points.filter((item) => item <= 1000);
|
|
141
153
|
}
|
|
142
|
-
return points
|
|
154
|
+
return points;
|
|
143
155
|
},
|
|
144
|
-
isSignAuthor
|
|
156
|
+
isSignAuthor: function () {
|
|
145
157
|
return User.getInfo().group == 32;
|
|
146
158
|
},
|
|
147
|
-
finalClient: function() {
|
|
148
|
-
if (this.client ==
|
|
149
|
-
return "std"
|
|
159
|
+
finalClient: function () {
|
|
160
|
+
if (this.client == "wujie") {
|
|
161
|
+
return "std";
|
|
150
162
|
}
|
|
151
|
-
return this.client
|
|
163
|
+
return this.client;
|
|
152
164
|
},
|
|
153
165
|
dialogTitle() {
|
|
154
|
-
return this.title ||
|
|
155
|
-
}
|
|
166
|
+
return this.title || "批改作业";
|
|
167
|
+
},
|
|
156
168
|
},
|
|
157
169
|
watch: {
|
|
158
|
-
own
|
|
159
|
-
this.left = val
|
|
170
|
+
own: function (val) {
|
|
171
|
+
this.left = val;
|
|
160
172
|
},
|
|
161
173
|
modelValue: function (val) {
|
|
162
174
|
if (val) {
|
|
163
175
|
this.loadBoxcoinConfig();
|
|
176
|
+
|
|
177
|
+
if (this.hasPermission) {
|
|
178
|
+
this.type = 'grant'
|
|
179
|
+
}
|
|
164
180
|
}
|
|
165
|
-
}
|
|
181
|
+
},
|
|
166
182
|
},
|
|
167
183
|
methods: {
|
|
168
184
|
// 选择要打赏的对象
|
|
169
185
|
handleChosen(userId) {
|
|
170
|
-
this.chosen = userId
|
|
186
|
+
this.chosen = userId;
|
|
171
187
|
},
|
|
172
188
|
submit: function () {
|
|
173
189
|
this.submitting = true;
|
|
174
190
|
const count = this.count === "custom" ? this.amount : this.count;
|
|
175
191
|
let client = this.client || this.hostClient;
|
|
176
|
-
if (![
|
|
177
|
-
client =
|
|
192
|
+
if (!["std", "origin", "all"].includes(client)) {
|
|
193
|
+
client = "std";
|
|
178
194
|
}
|
|
179
|
-
const fn = this.type ===
|
|
195
|
+
const fn = this.type === "reward" ? rewardBoxcoin : grantBoxcoin;
|
|
180
196
|
fn(this.postType, this.postId, this.userId, count, {
|
|
181
197
|
remark: this.remark,
|
|
182
|
-
client
|
|
183
|
-
redirect: `/${this.category}/${this.articleId}
|
|
198
|
+
client: client,
|
|
199
|
+
redirect: `/${this.category}/${this.articleId}`,
|
|
184
200
|
})
|
|
185
201
|
.then((res) => {
|
|
186
202
|
this.$message({
|
|
187
203
|
message: "操作成功",
|
|
188
204
|
type: "success",
|
|
189
205
|
});
|
|
190
|
-
return res.data.data
|
|
206
|
+
return res.data.data;
|
|
191
207
|
})
|
|
192
208
|
.then((data) => {
|
|
193
209
|
// 1.扣除额度
|
|
194
210
|
this.left -= this.count;
|
|
195
211
|
// 2.将修改emit出去
|
|
196
|
-
this.$emit(
|
|
212
|
+
this.$emit("updateRecord", data);
|
|
197
213
|
})
|
|
198
214
|
.finally(() => {
|
|
199
215
|
this.submitting = false;
|
|
200
216
|
this.onClose();
|
|
201
217
|
});
|
|
202
218
|
},
|
|
203
|
-
insertCurrentRelease: function() {
|
|
219
|
+
insertCurrentRelease: function () {
|
|
204
220
|
this.fetchingCurrentRelease = true;
|
|
205
|
-
getBreadcrumb(`current-release-${this.hostClient}`)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
getBreadcrumb(`current-release-${this.hostClient}`)
|
|
222
|
+
.then((res) => {
|
|
223
|
+
this.remark += res;
|
|
224
|
+
})
|
|
225
|
+
.catch((err) => {
|
|
226
|
+
this.$message({
|
|
227
|
+
message: "获取失败",
|
|
228
|
+
type: "error",
|
|
229
|
+
});
|
|
230
|
+
})
|
|
231
|
+
.finally(() => {
|
|
232
|
+
this.fetchingCurrentRelease = false;
|
|
211
233
|
});
|
|
212
|
-
}).finally(() => {
|
|
213
|
-
this.fetchingCurrentRelease = false;
|
|
214
|
-
});
|
|
215
234
|
},
|
|
216
235
|
loadBoxcoinConfig: function () {
|
|
217
236
|
User.isLogin() &&
|