Browse Source

兑换码专辑类型

natasha 9 months ago
parent
commit
10342ba0f8
2 changed files with 62 additions and 7 deletions
  1. 57 2
      src/views/cdkey_manage/AddGoods.vue
  2. 5 5
      src/views/cdkey_manage/CreateCdkey.vue

+ 57 - 2
src/views/cdkey_manage/AddGoods.vue

@@ -318,6 +318,29 @@
             </el-date-picker>
           </div>
         </template>
+        <template v-if="itemType === 'zhuanji'">
+          <div class="filt-item">
+            <label>学段</label>
+            <ul>
+              <li
+                :class="[
+                  items.study_phase === zhuanjiForm.studyValue ? 'active' : '',
+                ]"
+                v-for="(items, indexs) in studyList"
+                :key="indexs"
+                @click="
+                  handleClick('zhuanjiForm', 'studyValue', items.study_phase)
+                "
+              >
+                <i
+                  v-if="items.study_phase === zhuanjiForm.studyValue"
+                  class="el-icon-success"
+                ></i>
+                {{ items.study_phase_name }}
+              </li>
+            </ul>
+          </div>
+        </template>
         <div
           class="filt-item"
           v-if="
@@ -342,7 +365,8 @@
           (itemType === 'baozhi' && baozhiForm.orderValue === 'false') ||
           itemType === 'jingdu' ||
           (itemType === 'huakan' && huakanForm.orderValue === 'false') ||
-          itemType === 'kecheng'
+          itemType === 'kecheng' ||
+          itemType === 'zhuanji'
         "
       >
         <ul class="item-box">
@@ -501,6 +525,10 @@ export default {
           label: "画刊",
           value: "huakan",
         },
+        {
+          label: "专辑",
+          value: "zhuanji",
+        },
       ],
       yearList: [
         {
@@ -607,6 +635,9 @@ export default {
         period_count: 5,
         begin_date: "",
       },
+      zhuanjiForm: {
+        studyValue: -1,
+      },
       searchValue: "",
       page_capacity: 18,
       currentPage: 1,
@@ -636,7 +667,9 @@ export default {
     };
   },
   //计算属性 类似于data概念
-  computed: {},
+  computed: {
+    ...mapState(["$studyTypeAll"]),
+  },
   //监控data中数据变化
   watch: {},
   //方法集合
@@ -761,6 +794,28 @@ export default {
           .catch(() => {
             this.tableLoading = false;
           });
+      } else if (this.itemType === "zhuanji") {
+        MethodName = "/ShopServer/Manager/AlbumManager/PageQueryAlbumList";
+        data.status = 2;
+        data.study_phase = this.zhuanjiForm.studyValue;
+
+        getLogin(MethodName, data)
+          .then((res) => {
+            this.tableLoading = false;
+            if (res.status === 1) {
+              res.album_list.forEach((item) => {
+                item.goods_type = 20;
+                item.goods_id = item.id;
+                item.check =
+                  this.checkGoodsIdList.indexOf(item.id) > -1 ? true : false;
+              });
+              this.tableData = res.album_list;
+              this.total_count = res.total_count;
+            }
+          })
+          .catch(() => {
+            this.tableLoading = false;
+          });
       }
     },
     //计算table高度(动态设置table高度)

+ 5 - 5
src/views/cdkey_manage/CreateCdkey.vue

@@ -312,11 +312,11 @@ export default {
           color: "#722ED1",
           bg: "#F5E8FF",
         },
-        // '5':{
-        //     text:'报纸专辑',
-        //     color:'#165DFF',
-        //     bg:'#E8F7FF'
-        // },
+        20: {
+          text: "专辑",
+          color: "#165DFF",
+          bg: "#E8F7FF",
+        },
         4: {
           text: "画刊",
           color: "#F53F3F",