Przeglądaj źródła

猫舍管理 共用方法文件

DESKTOP-O04BTUJ\muzen 3 lat temu
rodzic
commit
d09f5c00ac
1 zmienionych plików z 39 dodań i 0 usunięć
  1. 39 0
      src/views/ohplay/mixin/index.js

+ 39 - 0
src/views/ohplay/mixin/index.js

@@ -0,0 +1,39 @@
+import {
+  typeList
+} from '@/api/ohplay/content'
+const classifyMixin = {
+  data() {
+    return {
+      classifyOptions: []
+    }
+  },
+  mounted() {
+    typeList().then(res => {
+      if (res.code === 0) {
+        this.classifyOptions = res.data
+      }
+    })
+  },
+}
+
+const typeMixin = {
+  data() {
+    return {
+      // 内容类型
+      typeOptions: [{
+          value: 0,
+          label: '帖子'
+        },
+        {
+          value: 1,
+          label: '图片'
+        }
+      ],
+    }
+  }
+}
+
+export {
+  classifyMixin,
+  typeMixin
+}