<template>
  <div class="home">
    <nav-bar url="/"></nav-bar>
    
    <div class="textstyle">长按识别二维码进行体检预约</div>
    <img class="mydpic" src="../assets/tijian.jpg" />
 </div>
</template>


<script>
// @ is an alias to /src
import { apiInsertUserAssess } from "@/request/api.js";
import { Toast } from 'vant';
import navBar from "@/components/navBar.vue";
export default {
  components: {
    navBar
  },
  data() {
    return {
      formData: {
        // name: "",
        // phone:"",
        assess: '满意',
        opinion: ''
      },
      columns: [{value:1,text:"就诊卡号"},{value:6,text:"身份证号"}],
      namePattern: /^[A-Za-z\u4e00-\u9fa5]+$/,
      phonePatten: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
      columns: [{value:1,text:"满意"},{value:2,text:"一般"},{value:3,text:"不满意"}],
      showPicker: false,
      switchChecked: false,
      title: "",
    };
  },
  mounted() {
    this.title = this.$route.meta.title;
  },
  methods: {
    onSelectCard(value) {
      this.formData.assess = value.text;
      this.showPicker = false;
      console.log(this.formData.assess,value)
    },
    onSubmit(values) {
      let _this = this;
      let formData = {..._this.formData};
      apiInsertUserAssess(formData).then(res => {
        Toast("提交成功");
        setTimeout(() => {
          _this.$router.back(-1);
        }, 1000);
      });
    },
    idValidator(val) {
      return /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(val);
    },
    clinicValidator(val) {
      return /^[A-Za-z0-9]+$/.test(val);
    },
  }
};
</script>

<style scoped lang="scss">
.bj {
  background: #f5f5f5;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  z-index: -2;
}
::v-deep .van-field__control--custom {
  justify-content: flex-end;
}

.wxts {
  padding: 20px;
  font-size: 26px;
  line-height: 45px;
  color: #999;
}
.textstyle{
  width: 60%;
  margin: 20% 20% 0% 20%;
  font-size:32px;
  font-weight: 800;
}
.mydpic{
  width: 60%;
  margin: 20%;
}
</style>
