guhongwei 4 år sedan
förälder
incheckning
9b4f655556
2 ändrade filer med 3 tillägg och 2 borttagningar
  1. 1 1
      src/store/onlive/room.js
  2. 2 1
      src/views/onlive/roomInfo.vue

+ 1 - 1
src/store/onlive/room.js

@@ -23,7 +23,7 @@ const actions = {
     return res;
   },
   async roomfetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.roomInfo}`, payload);
+    const res = await this.$axios.$get(`${api.roomInfo}/roomname`, payload);
     return res;
   },
   async fetch({ commit }, payload) {

+ 2 - 1
src/views/onlive/roomInfo.vue

@@ -32,6 +32,7 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
+      roomInfos: {},
     };
   },
   created() {
@@ -42,7 +43,7 @@ export default {
     async seachInfo() {
       let res = await this.roomfetch({ roomname: this.roomname });
       if (this.$checkRes(res)) {
-        console.log(res);
+        this.$set(this, `roomInfos`, res.data);
       }
     },
   },