<template>
  <view class="content">
    <!-- 叠层背景 -->
    <view class="messageBg1"></view>
    <view class="messageBg2"></view>
    <!-- 信息卡 -->
    <view class="messageCard">
      <view class="detail">
        <view class="head">
          <view></view>
          <text>个人信息</text>
        </view>
        <text class="name mes">姓名：{{ name }}</text>
        <text class="sex mes">姓别：{{ sex }}</text>
        <text class="examNumber mes">准考证号：{{ examNumber }}</text>
        <text class="idNumber mes">身份证号：{{ idnum }}</text>
      </view>
      <button class="confirm" @click="confirm">我已确认</button>
      <text class="footer"
        >如信息有误，或有其他疑问，请联系校招生办，联系电话：0791-82121208</text
      >
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      name: "", //姓名
      sex: "", //性别
      examNumber: "", //准考证号
      idnum: "", //学号或身份证号
    };
  },
  created() {
    this.name = this.$store.state.name;

    this.sex = this.$store.state.sex;

    this.examNumber = this.$store.state.examNumber;

    this.idnum = this.$store.state.idnum;
  },
  methods: {
    confirm() {
      let that = this;

      uni.navigateTo({
        url: "/pages/index/index",
      });
      setTimeout(() => {
        let webUrl = "https://wj.qq.com/s2/8767613/e476?openid=";

        let openid = that.idnum;

        let url = webUrl + openid;

        window.location.href = url;
      }, 500);
    },
  },
};
</script>

<style scoped lang="scss">
@import url("./css/confirm.min.css");
</style>
