Skip to content

Commit 24ba774

Browse files
committed
feat: update image path references to use __imgPath for consistency
1 parent d7bea04 commit 24ba774

13 files changed

Lines changed: 35 additions & 33 deletions

File tree

src/components/team/member/joinpop.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
</template>
9393

9494
<script>
95-
import { __cdn } from "@/utils/config";
95+
import { __imgPath } from "@/utils/config";
9696
import { getMyPureRoles, joinTeam } from "@/service/team/member.js";
9797
import { UserFilled } from "@element-plus/icons-vue";
9898
@@ -207,7 +207,7 @@ export default {
207207
this.isIndeterminate = value.length > 0 && value.length < total;
208208
},
209209
showAvatar: function (mount) {
210-
return __cdn + "image/school/" + mount + ".png";
210+
return __imgPath + "image/school/" + mount + ".png";
211211
},
212212
},
213213
beforeUnmount: function () {

src/components/team/org/team_videos.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</template>
7272

7373
<script>
74-
import { __cdn } from "@/utils/config";
74+
import { __imgPath } from "@/utils/config";
7575
import { Clock, Delete, Edit, Plus, VideoCamera, VideoPlay, WarningFilled } from "@element-plus/icons-vue";
7676
export default {
7777
name: "team_videos",
@@ -127,7 +127,7 @@ export default {
127127
this.$emit("toEmit", data);
128128
},
129129
showVideoCover(aid) {
130-
return __cdn + "image/rank/videos/" + aid + ".png";
130+
return __imgPath + "image/rank/videos/" + aid + ".png";
131131
},
132132
statusText(status) {
133133
return Number(status) === 2 ? this.$t("team.video.rejected") : this.$t("team.video.pending");

src/components/team/raid/JoinPop.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<script>
113113
import { getRoles, getAllMyRoles } from "@/service/team/role.js";
114114
import xf_map from "@jx3box/jx3box-data/data/xf/xf.json";
115-
import { __cdn } from "@/utils/config";
115+
import { __imgPath } from "@/utils/config";
116116
import User from "@jx3box/jx3box-common/js/user";
117117
import { showMountIcon } from "@/utils/filters";
118118
export default {
@@ -245,7 +245,7 @@ export default {
245245
}
246246
},
247247
showAvatar: function (mount, body_type) {
248-
return __cdn + "image/school/" + mount + ".png";
248+
return __imgPath + "image/school/" + mount + ".png";
249249
},
250250
resetForm: function () {
251251
this.form = {

src/components/team/raid/Raid.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,9 @@ export default {
208208
},
209209
/**
210210
* 候补人员转为替补人员
211-
* @param {Object} val 选择的队员
212211
*/
213-
handlePending(val) {
214-
const subRaid = this.$refs.subRaid;
215-
const copy_members = lodash.cloneDeep(subRaid.data);
216-
217-
copy_members.push(val);
218-
219-
subRaid.data = copy_members;
212+
handlePending() {
213+
this.loadMembers();
220214
},
221215
loadMembers() {
222216
// 兼容旧版数据

src/components/team/raid/RaidNormal_v1.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const item_demo = {
190190
191191
export default {
192192
name: "RaidNormal",
193-
props: ["data", "teamId", "leader", "row", "col"],
193+
props: ["data", "teamId", "leader", "row", "col", "header"],
194194
emits: ["updateMembers"],
195195
components: {
196196
MemberSetting,
@@ -248,7 +248,7 @@ export default {
248248
return this.$store.state.canManage;
249249
},
250250
canDrag() {
251-
return this.canManage && this.routerName !== "view_raid";
251+
return this.canManage;
252252
},
253253
linkVisible() {
254254
return this.$store.state.isTeammate;

src/components/team/raid/RaidNormal_v2.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ const item_demo = {
211211
212212
export default {
213213
name: "RaidNormal",
214-
props: ["data", "teamId", "leader", "row", "col", "id"],
214+
props: ["data", "teamId", "leader", "row", "col", "id", "header"],
215215
emits: ["update"],
216216
components: {
217217
MemberSetting,
@@ -274,7 +274,7 @@ export default {
274274
return this.$store.state.canManage;
275275
},
276276
canDrag() {
277-
return this.canManage && this.routerName !== "view_raid";
277+
return this.canManage;
278278
},
279279
linkVisible() {
280280
return this.$store.state.isTeammate;

src/components/team/raid/RaidSub.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ import { showMountIcon, showMountName } from "@/utils/filters";
111111
import bus from "@/utils/bus";
112112
export default {
113113
name: "RaidSub",
114-
props: ["id", "teamId", "isForceMatch", "canAdd", "canReplace"],
114+
props: ["id", "teamId", "isForceMatch", "canAdd", "canReplace", "header"],
115115
emits: ["pass"],
116116
components: {
117117
MemberSetting,

src/components/team/raid/RaidTobe.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ import { showMountIcon, showMountName } from "@/utils/filters";
108108
import bus from "@/utils/bus";
109109
export default {
110110
name: "RaidTobe",
111-
props: ["id", "teamId", "isForceMatch", "canAdd", "canReplace"],
111+
props: ["id", "teamId", "isForceMatch", "canAdd", "canReplace", "header"],
112112
emits: ["pass", "pending"],
113113
components: {
114114
RaidRoleDialog,
@@ -223,11 +223,13 @@ export default {
223223
}
224224
},
225225
// 设为替补
226-
pending(member, i) {
227-
covertTobe2Sub(this.raid_id, member?.id).then(() => {
228-
this.$emit("pending", member);
229-
this.data.splice(i, 1);
230-
});
226+
async pending(member) {
227+
try {
228+
await covertTobe2Sub(this.raid_id, member?.id);
229+
this.$emit("pending");
230+
} catch (e) {
231+
console.error("covertTobe2Sub", e);
232+
}
231233
},
232234
// 删除候选(拒绝申请)
233235
reject(member, i) {

src/utils/filters.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ function showBodyType(val) {
44
}
55

66
import school_id_map from "@jx3box/jx3box-data/data/xf/schoolid.json";
7+
import { __imgPath } from "@/utils/config";
78
function showSchoolIcon(val) {
89
let id = val || 0;
9-
return "https://img.jx3box.com/image/school/" + id + ".png";
10+
return __imgPath + "image/school/" + id + ".png";
1011
}
1112
function showMountIcon(val) {
1213
let id = val || 0;
13-
return "https://img.jx3box.com/image/xf/" + id + ".png";
14+
return __imgPath + "image/xf/" + id + ".png";
1415
}
1516

1617
import xfids from "@jx3box/jx3box-data/data/xf/xfid.json";

src/views/team/apply/ApplyList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<script>
2727
import { getEvents } from "@/service/team/apply.js";
2828
import { showDate } from "@/utils/filters";
29-
import { __cdn } from "@/utils/config";
29+
import { __imgPath } from "@/utils/config";
3030
import {resolveImagePath} from '@jx3box/jx3box-common/js/utils'
3131
3232
export default {
@@ -40,7 +40,7 @@ export default {
4040
},
4141
computed: {
4242
img() {
43-
return __cdn + "image/other/apply.png";
43+
return __imgPath + "image/other/apply.png";
4444
},
4545
},
4646
methods: {

0 commit comments

Comments
 (0)