<template>
  <view>

  </view>
</template>

<script>
import { getQuestionAnswerRequest, getQuestionListRequest } from '@/api/safeAnswer'

export default {
  onLoad() {
    this.getQuestionList()
    this.getQuestionAnswer()
  },
  methods: {
    async getQuestionList() {
      const { code, data, message } = await getQuestionListRequest()
      if(code === 0) {
        console.log(1, data)
      } else {
        uni.showToast({
          title: message,
          icon: 'none'
        })
      }
    },
    async getQuestionAnswer() {
      const { code, data, message } = await getQuestionAnswerRequest()
      if(code === 0) {
        console.log(2, data)
      } else {
        uni.showToast({
          title: message,
          icon: 'none'
        })
      }
    }
  }
}

</script>


<style scoped lang="scss">

</style>
