123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <view>
- 我的
- </view>
- </template>
- <script setup>
- import {reactive,ref} from "vue";
- import {toast} from "@/utils/common";
- import {getMineInfo} from '@/api/my.js'
- import {onLoad,onShow} from '@dcloudio/uni-app';
- import cameraCommon from "@/components/dialog/cameraCommon.vue";
- import shexiangtoushuoming from "@/components/dialog/shexiangtoushuoming.vue";
- let myInfoData = reactive({
- userImg: '',
- realName: '',
- orgName: '',
- userName: '',
- positionName:'',
- credit:'',
- countCert:'',
- countNotice:'',
- });
- const cameraCommonRef = ref(null)
- const shexiangtoushuomingRef = ref(null)
- const messageContent = ref('请在考试前使用摄像头测试功能,测试摄像头是否可以正常工作,在测试前请先确保摄像头设备可以正常使用.')
- onLoad(() => {})
-
- onShow(() => {getMyInit()})
-
- function getMyInit() {
- getUserInfo();
- }
-
- function getUserInfo(){
- getMineInfo({}).then(res => {
- myInfoData.userImg= res.data.icon;
- myInfoData.realName = res.data.realName;
- myInfoData.orgName = res.data.orgName;
- myInfoData.userName = res.data.userName;
- myInfoData.positionName = res.data.positionName;
- myInfoData.credit = res.data.credit;
- myInfoData.countCert = res.data.countCert;
- myInfoData.countNotice = res.data.countNotice;
- })
- }
-
- function goToPage(data){
- switch (data) {
- // 学分
- case 'xuefen':
- uni.navigateTo({
- url:'/pages/my/credit'
- })
- break;
-
- // 消息
- case 'xiaoxi':
- uni.navigateTo({
- url:'/pages/my/mesList?from=my'
- })
- break;
-
- // 证书
- case 'zhengshu':
- uni.navigateTo({
- url:'/pages/my/zhengshu'
- })
- break;
-
- // 错题
- case 'cuoti':
- uni.navigateTo({
- url:'/pages/cuoti/index'
- })
- break;
-
- // 报名
- case 'baoming':
- uni.navigateTo({
- url:'/pages/baoming/index'
- })
- break;
-
- // 摄像头测试
- case 'sxtcs':
- cameraCommonRef.value.handleShow()
- // uni.navigateTo({
- // url:'/pages/admin/my/myInfo?from=my'
- // })
- break;
-
- // 摄像头说明
- case 'sxtsm':
- shexiangtoushuomingRef.value.handleShow()
- break;
-
- // 设置
- case 'shezhi':
- uni.navigateTo({
- url:'/pages/my/setting'
- })
- break;
- }
- }
- </script>
- <style>
- </style>
|