BUG 27603
This commit is contained in:
@@ -46,6 +46,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppContent",
|
name: "AppContent",
|
||||||
appName: "内容管理",
|
appName: "内容管理",
|
||||||
@@ -53,18 +55,16 @@ export default {
|
|||||||
return {
|
return {
|
||||||
index: 0,
|
index: 0,
|
||||||
names: "",
|
names: "",
|
||||||
moduleId: "",
|
|
||||||
categoryId: "",
|
|
||||||
categorys: [],
|
categorys: [],
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
pageShow: false,
|
pageShow: false,
|
||||||
areaId: ''
|
search: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.names = option.names;
|
this.names = option.names;
|
||||||
this.areaId = option.areaId
|
this.search.areaId = option.areaId || this.user.areaId
|
||||||
this.getName();
|
this.getName();
|
||||||
if (option.names) {
|
if (option.names) {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
@@ -73,6 +73,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
active() {
|
active() {
|
||||||
return {
|
return {
|
||||||
fontSize: "22px",
|
fontSize: "22px",
|
||||||
@@ -85,12 +86,10 @@ export default {
|
|||||||
this.$instance.post("/app/appcontentmoduleinfo/listByName", null, {
|
this.$instance.post("/app/appcontentmoduleinfo/listByName", null, {
|
||||||
params: {names: this.names}
|
params: {names: this.names}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data && res.data.length) {
|
if (res?.data) {
|
||||||
this.categorys = res.data[0]["categoryList"];
|
this.categorys = res.data[0]["categoryList"];
|
||||||
this.moduleId = res.data[0]["id"];
|
this.search.moduleId = res.data?.[0]?.id;
|
||||||
if (res.data[0]["categoryList"]?.length) {
|
this.search.categoryId = res.data?.[0]?.categoryList?.[0]?.id;
|
||||||
this.categoryId = res.data[0]["categoryList"][0]["id"];
|
|
||||||
}
|
|
||||||
this.getCategoryList();
|
this.getCategoryList();
|
||||||
} else {
|
} else {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
@@ -99,23 +98,19 @@ export default {
|
|||||||
},
|
},
|
||||||
tabChange(e) {
|
tabChange(e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
this.$nextTick(() => {
|
this.search.categoryId = this.categorys?.[e]?.id
|
||||||
this.getCategoryList(this.categorys[e]["id"]);
|
this.getCategoryList();
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getCategoryList(e) {
|
getCategoryList() {
|
||||||
this.$instance.post("/app/appcontentinfo/list", null, {
|
this.$instance.post("/app/appcontentinfo/list", null, {
|
||||||
params: {
|
params: {
|
||||||
moduleId: this.moduleId,
|
...this.search,
|
||||||
categoryId: e ? e : (this.categoryId ? this.categoryId : ''),
|
size: 10
|
||||||
size: 10,
|
|
||||||
areaId: this.areaId ? this.areaId : ''
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.categoryList = this.current > 1 ? [...this.categoryList, ...res.data.records] : res.data.records;
|
this.categoryList = this.current > 1 ? [...this.categoryList, ...res.data.records] : res.data.records;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pageShow = true
|
this.pageShow = true
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
@@ -140,7 +135,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
|
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
|
|||||||
Reference in New Issue
Block a user