guhongwei 4 jaren geleden
bovenliggende
commit
0902bd1649
1 gewijzigde bestanden met toevoegingen van 0 en 173 verwijderingen
  1. 0 173
      src/views/question/detail copy.vue

+ 0 - 173
src/views/question/detail copy.vue

@@ -1,173 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="main">
-          <el-col :span="24" class="info">
-            <el-col :span="24" class="title">
-              {{ info.title }}
-            </el-col>
-            <el-col :span="24" class="brief">
-              {{ info.brief }}
-            </el-col>
-          </el-col>
-          <el-col :span="24" class="one">
-            <van-form @submit="onSubmit">
-              <van-row>
-                <van-col span="24">
-                  您是否愿意成为平台用户
-                </van-col>
-                <van-col span="24">
-                  <van-radio-group v-model="form.webUser" direction="horizontal">
-                    <van-radio name="1">是</van-radio>
-                    <van-radio name="2">否</van-radio>
-                  </van-radio-group>
-                </van-col>
-              </van-row>
-              <van-row v-if="form.webUser == '1'">
-                <van-col span="24">
-                  联系电话
-                </van-col>
-                <van-col span="24">
-                  <van-field v-model="form.phone" type="tel" name="手机号" placeholder="手机号" />
-                </van-col>
-              </van-row>
-              <van-row v-for="(item, index) in info.questions" :key="index">
-                <van-col span="24">
-                  {{ item.title }}
-                </van-col>
-                <van-col span="24">
-                  <van-field name="radio">
-                    <template #input>
-                      <van-radio-group v-model="form.radio" direction="horizontal">
-                        <van-radio :name="i.name" v-for="(i, index) in item.selects" :key="index">{{ i.num }}.{{ i.name }}</van-radio>
-                      </van-radio-group>
-                    </template>
-                  </van-field>
-                </van-col>
-              </van-row>
-              <!-- <van-field v-model="form.phone" type="tel" name="手机号" label="手机号" placeholder="手机号" v-if="form.webUser == '1'" />
-              <van-row v-for="(item, index) in info.questions" :key="index">
-                <span v-if="item.type == '0'">
-                  单选
-                </span>
-                <span v-else-if="item.type == '1'">
-                  多选
-                </span>
-                <span v-else-if="item.type == '2'">
-                  简答
-                </span>
-              </van-row> -->
-              <div style="margin: 16px;">
-                <van-button round block type="info" native-type="submit">提交</van-button>
-              </div>
-            </van-form>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: questionnaire } = createNamespacedHelpers('questionnaire');
-export default {
-  name: 'detail',
-  props: {},
-  components: { NavBar },
-  data: function() {
-    return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      // 问卷详情
-      info: {},
-      form: {},
-    };
-  },
-  async created() {
-    await this.search();
-  },
-  methods: {
-    ...questionnaire(['fetch']),
-    async search() {
-      if (this.id) {
-        let res = await this.fetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `info`, res.data);
-        }
-      }
-    },
-    // 提交
-    onSubmit() {
-      let data = this.form;
-      console.log(data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id || '606d12e056b552081848e8f8';
-    },
-  },
-  mounted() {
-    this.title = this.$route.meta.title;
-    this.isleftarrow = this.$route.meta.isleftarrow;
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {},
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-}
-.main {
-  min-height: 570px;
-  padding: 0 10px;
-  .info {
-    border-bottom: 1px dashed #ccc;
-    padding: 15px 0;
-    margin: 0 0 10px 0;
-    .title {
-      text-align: center;
-      font-size: 18px;
-      font-weight: bold;
-      margin: 0 0 10px 0;
-    }
-    .brief {
-      font-size: 16px;
-      text-align: center;
-    }
-  }
-  // .one {
-  //   margin: 0 0 10px 0;
-  //   .title {
-  //     padding: 10px 0px;
-  //   }
-  //   .change {
-  //     .van-radio-group {
-  //       margin: 0 0 10px 0;
-  //     }
-  //   }
-  // }
-}
-</style>