Skip to content

Commit

Permalink
fix: exterior
Browse files Browse the repository at this point in the history
  • Loading branch information
TiAmo-code committed Jun 4, 2024
1 parent 3b2adf9 commit 00d82e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/assets/css/exterior/list.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
.m-left {
max-width: 0;
overflow: hidden;
opacity: 0;
}
.m-right {
.pr(80px);
Expand Down
9 changes: 6 additions & 3 deletions src/store/exterior.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Vue from "vue";
import Vuex from "vuex";
import { exteriorUserStar } from "@/service/exterior";
import User from "@jx3box/jx3box-common/js/user";

Vue.use(Vuex);

Expand All @@ -22,9 +23,11 @@ let store = {

actions: {
getExteriorUserStar(ctx) {
exteriorUserStar().then((res) => {
ctx.commit("toExteriorList", res.data.data);
});
if (User.isLogin()) {
exteriorUserStar().then((res) => {
ctx.commit("toExteriorList", res.data.data);
});
}
},
},
};
Expand Down
18 changes: 10 additions & 8 deletions src/views/exterior/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<div class="u-action u-wbl" @click="jumpWBL">
<img class="u-img" src="@/assets/img/exterior/icon/wbl-icon.png" />
</div>
<div class="u-action u-unfold" @click="pageStatus = 'unfold'">
<div class="u-action u-unfold" @click="window.open(`${location.href}?id=${exteriorDetail.id}`)">
<div class="m-img__pr">
<img class="u-img" src="@/assets/img/exterior/icon/icomoon-free_new-tab.svg" />
<img
Expand Down Expand Up @@ -252,13 +252,9 @@
import { Chart } from "@antv/g2";
import CommonToolbar from "@/components/common/toolbar.vue";
import { __clients } from "@jx3box/jx3box-common/data/jx3box.json";
import {
getExteriorsList,
getExteriorsDetail,
getExteriorsPriceTrending,
entWarehouse,
userStarExterior,
} from "@/service/exterior";
import { getExteriorsList, getExteriorsDetail, getExteriorsPriceTrending, userStarExterior } from "@/service/exterior";
import { __Links } from "@jx3box/jx3box-common/data/jx3box.json";
import User from "@jx3box/jx3box-common/js/user";
export default {
name: "ExamList",
components: {
Expand Down Expand Up @@ -287,6 +283,8 @@ export default {
trendChart: null,
searchKey: "",
searchTime: "",
login_url: __Links.account.login + "?redirect=" + location.href,
};
},
computed: {
Expand Down Expand Up @@ -423,6 +421,10 @@ export default {
});
},
userStar() {
if (!User.isLogin()) {
location.href = this.login_url;
return;
}
let reqType = this.exteriorDetail.isStar ? "delete" : "post";
userStarExterior(reqType, this.exteriorDetail.id, {
order: 0,
Expand Down

0 comments on commit 00d82e7

Please sign in to comment.