nanshan 2 lat temu
rodzic
commit
26cb9576db

+ 19 - 0
src/api/sets/index.js

@@ -67,4 +67,23 @@ export function updataEndtime(data){
     method:'put',
     method:'put',
     data
     data
   })
   })
+}
+
+//上架
+// export function isGrounding(grounding,tetherId){
+//   return request({
+//     url:/system/tether/isGrounding/ + grounding + "/"+ tetherId,
+//     method:'post',
+//   })
+// }
+
+
+// 藏品列表
+export function collecctionList(id){
+  console.log(id);
+  return request({
+    url:'/system/tether/collectionList/' + id,
+    method:'get'
+  })
+  
 }
 }

+ 25 - 27
src/views/sets/collectionList.vue

@@ -6,28 +6,23 @@
           <i class="el-icon-search"></i>
           <i class="el-icon-search"></i>
           <span :style="{ padding: '4px' }">藏品列表</span>
           <span :style="{ padding: '4px' }">藏品列表</span>
         </el-col>
         </el-col>
-        
       </el-row>
       </el-row>
     </div>
     </div>
     <div class="footer">
     <div class="footer">
-      <el-table  border :data="tableData" style="width: 100%">
-        <el-table-column
-          label="id"
-          width="110"
-          align="center"
-        >
+      <el-table border :data="tableData" style="width: 100%">
+        <el-table-column label="id" width="110" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span>{{ scope.row.collectionId }}</span>
             <span>{{ scope.row.collectionId }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
 
 
         <el-table-column
         <el-table-column
-        prop="collectionTitle"
+          prop="collectionTitle"
           label="藏品名称"
           label="藏品名称"
           width="220"
           width="220"
           align="center"
           align="center"
         >
         >
-        <template slot-scope="scope">
+          <template slot-scope="scope">
             <span>{{ scope.row.collectionTitle }}</span>
             <span>{{ scope.row.collectionTitle }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
@@ -78,7 +73,6 @@
         <el-table-column prop="edit" label="操作" width="280" align="center">
         <el-table-column prop="edit" label="操作" width="280" align="center">
           <el-row>
           <el-row>
             <el-button type="text" @click="coldetails">藏品详情</el-button>
             <el-button type="text" @click="coldetails">藏品详情</el-button>
-            <el-button type="text" @click="">兑换详情</el-button>
           </el-row>
           </el-row>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
@@ -96,6 +90,7 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
+import { collecctionList } from "../../api/sets/index";
 import { collectionList } from "../../api/collection/collection";
 import { collectionList } from "../../api/collection/collection";
 export default {
 export default {
   data() {
   data() {
@@ -106,31 +101,34 @@ export default {
         pageSize: 10,
         pageSize: 10,
       },
       },
       total: 1,
       total: 1,
-      tableData: [
-        {
-          collectionId: "1",
-          collectionTitle: "藏品1",
-          showStart: "2023-02-10:00:00-2023-02-16:00:00:00",
-          colPrice: 0.1,
-          colCount: 500,
-          status: "售卖中...",
-        },
-      ],
+      tableData: [],
     };
     };
   },
   },
   mounted() {
   mounted() {
     // this.getcollectionList();
     // this.getcollectionList();
+    this.init();
   },
   },
   methods: {
   methods: {
-    coldetails(){
-        this.$router.push("./collectionDetails");
+    init() {
+      let colList = JSON.parse(JSON.stringify(this.$route.params.rows));
+      console.log(colList);
+      setTimeout(() => {
+        collecctionList(colList.tetherId).then((res) => {
+          console.log(res);
+          this.total = res.total;
+          this.tableData = res.rows;
+        });
+      }, 800);
     },
     },
-    getcollectionList() {
-      collectionList(this.pageInfo).then((res) => {
-        this.total = res.total;
-        this.tableData = res.rows;
-      });
+    coldetails() {
+      this.$router.push("./collectionDetails");
     },
     },
+    // getcollectionList() {
+    //   collecctionList().then((res) => {
+    //     this.total = res.total;
+    //     this.tableData = res.rows;
+    //   });
+    // },
     handleCurrentChange(newPage) {
     handleCurrentChange(newPage) {
       this.pageInfo.pageNum = newPage;
       this.pageInfo.pageNum = newPage;
     },
     },

+ 23 - 6
src/views/sets/setList.vue

@@ -111,7 +111,9 @@
             align="center"
             align="center"
           >
           >
             <template slot-scope="scope">  
             <template slot-scope="scope">  
-                 <el-tag size="medium">{{ scope.row.sellStatus }}</el-tag>
+                 <el-tag size="medium" >
+                  {{ scope.row.grounding  == '1' ? '未上架' : '已上架' }}
+                </el-tag>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="edit" label="操作" width="280" align="center">
           <el-table-column prop="edit" label="操作" width="280" align="center">
@@ -120,7 +122,7 @@
                 >藏品列表</el-button
                 >藏品列表</el-button
               >
               >
               <el-row>
               <el-row>
-                <el-button type="text" @click="upJia">上架</el-button>
+                <el-button type="text" @click="upJia(scope.row)">上架</el-button>
                 <el-button type="text" @click="CurendTime(scope.row)"
                 <el-button type="text" @click="CurendTime(scope.row)"
                   >修改时间</el-button
                   >修改时间</el-button
                 >
                 >
@@ -173,6 +175,7 @@ import {
   advanceList,
   advanceList,
   selledList,
   selledList,
   updataEndtime,
   updataEndtime,
+  
 } from "@/api/sets/index";
 } from "@/api/sets/index";
 export default {
 export default {
   data() {
   data() {
@@ -194,6 +197,8 @@ export default {
       endTime: [],
       endTime: [],
       showEnd: "",
       showEnd: "",
       showendtime: "",
       showendtime: "",
+      tetherId:'',
+      grounding:''
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -201,17 +206,28 @@ export default {
     this.sellingsList();
     this.sellingsList();
   },
   },
   methods: {
   methods: {
-    submitTime() {
+   
+    submitTime(data) {
       this.dialogFormVisible = false;
       this.dialogFormVisible = false;
       if (!this.showendtime) return;
       if (!this.showendtime) return;
       console.log(this.showendtime);
       console.log(this.showendtime);
-      let { code } = updataEndtime(this.showendtime).catch((err) => err);
-      console.log(code);
+      let time = {
+        showTimeEnd:this.showendtime,
+        tetherId:this.tetherId
+      }
+      console.log(time)
+      let { code } = updataEndtime(time).catch((err) => err);
+      // console.log(code);
+      this.$message("修改成功,请刷新界面")
+      // this.sellingsList();
+      // this.advancesList();
+      // this.selledsList();
     },
     },
     CurendTime(data) {
     CurendTime(data) {
       console.log(data);
       console.log(data);
       this.dialogFormVisible = true;
       this.dialogFormVisible = true;
       this.showEnd = data.showTimeEnd;
       this.showEnd = data.showTimeEnd;
+      this.tetherId=data.tetherId;
     },
     },
     handleCurrentChange(newPage) {
     handleCurrentChange(newPage) {
       this.pageInfo.pageNum = newPage;
       this.pageInfo.pageNum = newPage;
@@ -292,13 +308,14 @@ export default {
       this.$router.push({ name: "collectionList", params: { rows } });
       this.$router.push({ name: "collectionList", params: { rows } });
     },
     },
     // 上架
     // 上架
-    upJia() {
+    upJia(row) {
       this.$confirm("是否要上架商品?", "提示", {
       this.$confirm("是否要上架商品?", "提示", {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning",
         type: "warning",
       })
       })
         .then(() => {
         .then(() => {
+       
           this.$message({
           this.$message({
             type: "success",
             type: "success",
             message: "上架成功!",
             message: "上架成功!",