liuyu 4 anni fa
parent
commit
3fcbc41808
1 ha cambiato i file con 13 aggiunte e 7 eliminazioni
  1. 13 7
      src/views/live/roomDetail.vue

+ 13 - 7
src/views/live/roomDetail.vue

@@ -81,12 +81,12 @@
         </p>
         <span v-if="item.type == '0'">
           <van-radio-group v-model="item.answer">
-            <van-radio v-for="(i, ri) in questInfo.question" :key="`${index}-${ri}`" :name="i.opname">{{ i.opname }}</van-radio>
+            <van-radio v-for="(i, ri) in item.option" :key="`${index}-${ri}`" :name="i.opname">{{ i.opname }}</van-radio>
           </van-radio-group>
         </span>
         <span v-if="item.type == '1'">
           <van-checkbox-group v-model="item.answer">
-            <van-checkbox v-for="(i, ci) in questInfo.question" :key="`${index}-${ci}`" :name="i.opname">{{ i.opname }}</van-checkbox>
+            <van-checkbox v-for="(i, ci) in item.option" :key="`${index}-${ci}`" :name="i.opname">{{ i.opname }}</van-checkbox>
           </van-checkbox-group>
         </span>
         <span v-if="item.type == '2'">
@@ -269,11 +269,17 @@ export default {
         data.userid = this.user.uid;
         data.username = this.user.name;
         const res = await this.lookuserFetch(data);
-        // 根据房间id查询房间详细信息
-        let result = await this.fetch(this.id);
-        if (this.$checkRes(result)) {
-          console.log(result.data);
-          this.$set(this, `roomInfos`, result.data);
+      }
+      // 根据房间id查询房间详细信息
+      let result = await this.fetch(this.id);
+      if (this.$checkRes(result)) {
+        console.log(result.data);
+        this.$set(this, `roomInfos`, result.data);
+        // 根据房间信息判断是否回答问卷
+        if (result.data.isque === '1') {
+          this.showQuest = true;
+          this.queid = result.data.queid;
+          this.questSearch();
         }
       }
     },