Blame view

admin-web-master/src/views/aaa/components/canvasShow/basics/header/mixin.js 847 Bytes
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  import api from '../../config/api'
  import {funMixin} from '../../config/mixin'
  
  export const commonMixin = {
    name: 'headerComponent',
    mixins: [funMixin],
    props: {
      terminal: {
        type: Number,
        default: 4
      },
      typeId: {
        type: Number,
        default: 1
      },
      shopId: {
        type: Number,
        default: 0
      },
      componentContent: {
        type: Object
      }
    },
    data () {
      return {
        classifyData: []
      }
    },
    mounted() {
        this.getData()
    },
    methods: {
      getData() {
        this.beforeGetData()
        const _ = this
        _.sendReq({
          url: `${api.getClassify}?page=1&pageSize=20`,
          method: 'GET'
        }, (res) => {
          _.afterGetData()
          _.classifyData = res.data
          console.log(_.classifyData)
        },(err)=>{
          _.afterGetData()
        })
      }
    }
  }