123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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()
- })
- }
- }
- }
|