sunjh hace 6 años
padre
commit
28d5d78810
Se han modificado 1 ficheros con 5 adiciones y 175 borrados
  1. 5 175
      src/components/Square.vue

+ 5 - 175
src/components/Square.vue

@@ -30,183 +30,15 @@ export default {
     return {
       loading: true,
       nomore:false,
-      list: [
-        {
-          id: 0,
-          coverImgUrl:"http://www.mooctest.net/assets/img/mooctest.png",
-          projectId:1123,
-          title: "发送群文件测试",
-          platform: [0, 1],
-          description: "任务描述文字xxxx",
-          price: "30",
-          serviceType: 1,
-          participantNum: 30,
-          status: 0
-        },
-        {
-          id: 1,
-          coverImgUrl:"http://www.mooctest.net/assets/img/mooctest.png",
-          projectId:1123,
-          title: "多人聊天发送文件测试",
-          platform: [0],
-          description: "任务描述文字xxxx",
-          price: "10",
-          serviceType: 0,
-          participantNum: 0,
-          status: 1
-        },
-        {
-          id: 2,
-          coverImgUrl:"http://www.mooctest.net/assets/img/mooctest.png",
-          projectId:1123,
-          title: "浏览器波洞星球",
-          platform: [1],
-          description: "任务描述文字xxxx",
-          price: "10",
-          serviceType: 2,
-          participantNum: 21,
-          status: 0
-        },
-        {
-          id: 3,
-          coverImgUrl:"http://www.mooctest.net/assets/img/mooctest.png",
-          projectId:1123,
-          title: "举报支持选择聊天记录(安全)",
-          platform: [0, 1, 2],
-          description: "任务描述文字xxxx",
-          price: "0",
-          serviceType: 1,
-          participantNum: 1,
-          status: 1
-        },
-      ],
-      // list1: [
-      //   {
-      //     id: 0,
-      //     title: "1发送群文件测试",
-      //     platform: [0, 1],
-      //     description: "任务描述文字xxxx",
-      //     price: "30",
-      //     serviceType: 1,
-      //     participantNum: 30,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 1,
-      //     title: "多人聊天发送文件测试",
-      //     platform: [0],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 0,
-      //     participantNum: 0,
-      //     status: 1
-      //   },
-      //   {
-      //     id: 2,
-      //     title: "浏览器波洞星球",
-      //     platform: [1],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 2,
-      //     participantNum: 21,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 3,
-      //     title: "举报支持选择聊天记录(安全)",
-      //     platform: [0, 1, 2],
-      //     description: "任务描述文字xxxx",
-      //     price: "0",
-      //     serviceType: 1,
-      //     participantNum: 1,
-      //     status: 1
-      //   },
-      //   {
-      //     id: 4,
-      //     title: "发送群文件测试",
-      //     platform: [0, 1],
-      //     description: "任务描述文字xxxx",
-      //     price: "30",
-      //     serviceType: 1,
-      //     participantNum: 30,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 5,
-      //     title: "多人聊天发送文件测试",
-      //     platform: [0],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 0,
-      //     participantNum: 0,
-      //     status: 1
-      //   },
-      //   {
-      //     id: 6,
-      //     title: "浏览器波洞星球",
-      //     platform: [1],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 2,
-      //     participantNum: 21,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 7,
-      //     title: "举报支持选择聊天记录(安全)",
-      //     platform: [0, 1, 2],
-      //     description: "任务描述文字xxxx",
-      //     price: "0",
-      //     serviceType: 1,
-      //     participantNum: 1,
-      //     status: 1
-      //   },
-      //   {
-      //     id: 8,
-      //     title: "发送群文件测试",
-      //     platform: [0, 1],
-      //     description: "任务描述文字xxxx",
-      //     price: "30",
-      //     serviceType: 1,
-      //     participantNum: 30,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 9,
-      //     title: "多人聊天发送文件测试",
-      //     platform: [0],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 0,
-      //     participantNum: 0,
-      //     status: 1
-      //   },
-      //   {
-      //     id: 10,
-      //     title: "浏览器波洞星球",
-      //     platform: [1],
-      //     description: "任务描述文字xxxx",
-      //     price: "10",
-      //     serviceType: 2,
-      //     participantNum: 21,
-      //     status: 0
-      //   },
-      //   {
-      //     id: 11,
-      //     title: "举报支持选择聊天记录(安全)",
-      //     platform: [0, 1, 2],
-      //     description: "任务描述文字xxxx",
-      //     price: "0",
-      //     serviceType: 1,
-      //     participantNum: 1,
-      //     status: 1
-      //   }
-      // ]
+      list: [],
     };
   },
   mounted() {
     window.addEventListener("scroll", this.throttle(this.setpage, 1000), false);
   },
+  created() {
+    this.loadData()
+  },
   methods: {
     throttle(func, wait, options) {
       let context, args, result;
@@ -265,9 +97,7 @@ export default {
     loadData() {
       console.log("loadData")
       Http.get(Apis.PAGE.SQUARE_PAGE).then((res) => {
-        if (0 === res.code){
-          this.list = res.taskList
-        }
+        this.list = res.taskList
       })
     }
   }