guhongwei 4 years ago
parent
commit
fd829d4cfe

+ 5 - 0
src/components/js/menu.js

@@ -3,3 +3,8 @@ export const menuOne = [
   { name: '我的额度', index: '/cashing/quota', icon: 'after-sale' },
   { name: '我的订单', index: '/cashing/order', icon: 'cart-o' },
 ];
+export const menuTwo = [
+  { name: '政策解读', index: '/service/unscramble', icon: 'label-o' },
+  { name: '服务机构', index: '/service/mechanism', icon: 'friends-o' },
+  { name: '个人中心', index: '/service/account', icon: 'manager-o' },
+];

+ 1 - 3
src/layout/common/foot.vue

@@ -11,7 +11,7 @@
 </template>
 
 <script>
-const { menuOne, menuTwo, menuThr } = require('@c/js/menu');
+const { menuOne, menuTwo } = require('@c/js/menu');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'foot',
@@ -31,8 +31,6 @@ export default {
         this.$set(this, `menuList`, menuOne);
       } else if (this.type == 2) {
         this.$set(this, `menuList`, menuTwo);
-      } else if (this.type == 3) {
-        this.$set(this, `menuList`, menuThr);
       }
     },
   },

+ 16 - 4
src/router/index.js

@@ -45,10 +45,22 @@ const web = [
     component: () => import('../views/cashing/order.vue'),
   },
   {
-    path: '/service',
-    name: 'service',
-    meta: { title: '我要服务' },
-    component: () => import('../views/service/index.vue'),
+    path: '/service/unscramble',
+    name: 'service_unscramble',
+    meta: { title: '政策解读' },
+    component: () => import('../views/service/unscramble.vue'),
+  },
+  {
+    path: '/service/mechanism',
+    name: 'service_mechanism',
+    meta: { title: '服务机构' },
+    component: () => import('../views/service/mechanism.vue'),
+  },
+  {
+    path: '/service/account',
+    name: 'service_account',
+    meta: { title: '个人中心' },
+    component: () => import('../views/service/account.vue'),
   },
   {
     path: '/login',

+ 2 - 2
src/store/index.js

@@ -9,8 +9,8 @@ import organization from './live/organization';
 import coupons from './live/coupons';
 import couponsApply from './live/couponsApply';
 import declare from './live/declare';
-import cashing from './live/cashing';
 import reward from './live/reward';
+import cashing from './live/cashing';
 
 Vue.use(Vuex);
 
@@ -26,7 +26,7 @@ export default new Vuex.Store({
     coupons,
     couponsApply,
     declare,
-    cashing,
     reward,
+    cashing,
   },
 });

+ 14 - 2
src/views/cashing/order.vue

@@ -18,6 +18,7 @@
 import top from '@/layout/common/top.vue';
 import foot from '@/layout/common/foot.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: cashing } = createNamespacedHelpers('cashing');
 export default {
   name: 'order',
   props: {},
@@ -28,14 +29,25 @@ export default {
   data: function () {
     return {
       clientHeight: '',
+      list: [],
+      total: 0,
+      limit: '10',
     };
   },
-  async created() {},
+  async created() {
+    await this.search();
+  },
   mounted() {
     let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
     this.$set(this, `clientHeight`, clientHeight);
   },
-  methods: {},
+  methods: {
+    ...cashing(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      let res = await this.query({ skip, limit, ...info });
+      console.log(res);
+    },
+  },
   computed: {
     ...mapState(['user']),
   },

+ 1 - 1
src/views/index.vue

@@ -8,7 +8,7 @@
         <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
           <van-button @click="$router.push('apply')">我要申领</van-button>
           <van-button @click="$router.push('/cashing/quota')">我要兑付</van-button>
-          <van-button @click="$router.push('service')">我要服务</van-button>
+          <van-button @click="$router.push('/service/unscramble')">我要服务</van-button>
         </el-col>
         <el-col :span="24" class="foot"> 底部 </el-col>
       </el-col>

+ 10 - 6
src/views/service/index.vue

@@ -1,12 +1,14 @@
 <template>
-  <div id="index">
+  <div id="account">
     <el-row>
       <el-col :span="24" class="main">
         <el-col :span="24" class="top">
           <top topType="2" :leftArrow="false"></top>
         </el-col>
-        <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 我要服务 </el-col>
-        <el-col :span="24" class="foot"> 底部 </el-col>
+        <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 个人中心 </el-col>
+        <el-col :span="24" class="foot">
+          <foot :type="2"></foot>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -14,12 +16,14 @@
 
 <script>
 import top from '@/layout/common/top.vue';
+import foot from '@/layout/common/foot.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
-  name: 'index',
+  name: 'account',
   props: {},
   components: {
     top,
+    foot,
   },
   data: function () {
     return {
@@ -28,7 +32,7 @@ export default {
   },
   async created() {},
   mounted() {
-    let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 90;
+    let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
     this.$set(this, `clientHeight`, clientHeight);
   },
   methods: {},
@@ -60,7 +64,7 @@ export default {
     overflow-y: auto;
   }
   .foot {
-    height: 50px;
+    height: 40px;
     overflow: hidden;
     border-top: 1px solid #f1f1f1;
   }

+ 72 - 0
src/views/service/mechanism.vue

@@ -0,0 +1,72 @@
+<template>
+  <div id="mechanism">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <top topType="2" :leftArrow="false"></top>
+        </el-col>
+        <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 服务机构 </el-col>
+        <el-col :span="24" class="foot">
+          <foot :type="2"></foot>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/common/top.vue';
+import foot from '@/layout/common/foot.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'mechanism',
+  props: {},
+  components: {
+    top,
+    foot,
+  },
+  data: function () {
+    return {
+      clientHeight: '',
+    };
+  },
+  async created() {},
+  mounted() {
+    let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
+    this.$set(this, `clientHeight`, clientHeight);
+  },
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    height: 40px;
+    overflow: hidden;
+    border-bottom: 1px solid #f1f1f1;
+  }
+  .info {
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
+  .foot {
+    height: 40px;
+    overflow: hidden;
+    border-top: 1px solid #f1f1f1;
+  }
+}
+</style>

+ 72 - 0
src/views/service/unscramble.vue

@@ -0,0 +1,72 @@
+<template>
+  <div id="unscramble">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <top topType="2" :leftArrow="false"></top>
+        </el-col>
+        <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 政策解读 </el-col>
+        <el-col :span="24" class="foot">
+          <foot :type="2"></foot>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/common/top.vue';
+import foot from '@/layout/common/foot.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'unscramble',
+  props: {},
+  components: {
+    top,
+    foot,
+  },
+  data: function () {
+    return {
+      clientHeight: '',
+    };
+  },
+  async created() {},
+  mounted() {
+    let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
+    this.$set(this, `clientHeight`, clientHeight);
+  },
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    height: 40px;
+    overflow: hidden;
+    border-bottom: 1px solid #f1f1f1;
+  }
+  .info {
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
+  .foot {
+    height: 40px;
+    overflow: hidden;
+    border-top: 1px solid #f1f1f1;
+  }
+}
+</style>