便民服务
This commit is contained in:
		@@ -2,12 +2,12 @@
 | 
			
		||||
  <div class="AppConvenientService">
 | 
			
		||||
    <u-navbar :is-back="false" title="便民服务" title-color="#000" title-width="300" title-size="32" :background="backgroundNavbar" :title-bold="true"></u-navbar>
 | 
			
		||||
    <div class="card-list">
 | 
			
		||||
      <div class="card" >
 | 
			
		||||
        <h2>居民服务</h2>
 | 
			
		||||
      <div class="card" v-for="(item,index) in list" :key="index">
 | 
			
		||||
        <h2>{{ $dict.getLabel('homeConfigMenuType', index) }}</h2>
 | 
			
		||||
        <div class="items-list">
 | 
			
		||||
          <div class="items" v-for="(item, index) in list" :key="index">
 | 
			
		||||
            <img :src="item.pic" alt="">
 | 
			
		||||
            <div class="items-name">{{ item.name }}</div>
 | 
			
		||||
          <div class="items" v-for="(t, inx) in item" :key="inx" @click="handleClick(t)">
 | 
			
		||||
            <img :src="t.pictureUrl" alt="" >
 | 
			
		||||
            <div class="items-name">{{ t.name }}</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
@@ -16,54 +16,63 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapActions, mapState } from "vuex";
 | 
			
		||||
export default {
 | 
			
		||||
  name: "AppConvenientService",
 | 
			
		||||
  appName: "便民服务",
 | 
			
		||||
  customNavigation: true,
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user', 'token']),
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      list: [{
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      }, {
 | 
			
		||||
        pic: 'https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png',
 | 
			
		||||
        name: '便民通讯录'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      list: [],
 | 
			
		||||
      backgroundNavbar: {
 | 
			
		||||
        background: '#FFF'
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
 | 
			
		||||
  methods: {
 | 
			
		||||
    ...mapActions(['authCheck']),
 | 
			
		||||
    handleClick({ type, appId, modulePath, url, checkType, corpId }) {
 | 
			
		||||
      if (checkType == 3 && this.user.partyStatusForWX != 2) { //张硕让改的
 | 
			
		||||
        return this.$u.toast('您还不是党员,暂时无法使用该功能')
 | 
			
		||||
      }
 | 
			
		||||
      //先判读是不是系统应用
 | 
			
		||||
      if (type != "0") {
 | 
			
		||||
        if (type == "1") {
 | 
			
		||||
          uni.navigateToMiniProgram({ appId });
 | 
			
		||||
        } else if (type == "2") {
 | 
			
		||||
          uni.navigateTo({ url: "/subPages/h5/webview?link=" + url });
 | 
			
		||||
        } else if (type == "3") {
 | 
			
		||||
          this.$linkTo(url);
 | 
			
		||||
        } else if (type == "4") {
 | 
			
		||||
          uni.openCustomerServiceChat({
 | 
			
		||||
            extInfo: { url: url },
 | 
			
		||||
            corpId: corpId,
 | 
			
		||||
            fail: () => {
 | 
			
		||||
              this.$u.toast('请使用普通微信打开小程序进行咨询');
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
      } else if (type && type == "0") {
 | 
			
		||||
        uni.showLoading({ title: '正在进入应用...' })
 | 
			
		||||
        this.authCheck({ checkType, modulePath }).finally(() => uni.hideLoading())
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.$instance.post("/app/appminihomeconfig/listAll", null, { withoutToken: true }).then(res => {
 | 
			
		||||
        if (res?.data) {
 | 
			
		||||
          this.list = res.data.all;
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {
 | 
			
		||||
    
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    this.$dict.load("homeConfigMenuType").then(() => {
 | 
			
		||||
      this.getList()
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
@@ -91,9 +100,9 @@ export default {
 | 
			
		||||
      flex-wrap: wrap;
 | 
			
		||||
      .items {
 | 
			
		||||
        width: 25%;
 | 
			
		||||
        align-self: center;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
        margin-top: 24px;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
        align-self: center;
 | 
			
		||||
        img {
 | 
			
		||||
          width: 108px;
 | 
			
		||||
          height: 108px;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="AppNewFarmer">
 | 
			
		||||
    <div>njdaskjdjh bvxd,vl;,xdv</div>
 | 
			
		||||
    <!-- <AiEmpty img="./../AppEmpty/mdpi_img-jianshezhong.png"></AiEmpty> -->
 | 
			
		||||
    <AiEmpty :description="`丰收号 内容建设中…`" class="emptyWrap"></AiEmpty>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user