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