la 2 年之前
父节点
当前提交
9a5011424b
共有 4 个文件被更改,包括 14 次插入8 次删除
  1. 6 3
      src/pages/home/scrollblock.vue
  2. 3 3
      src/pages/teacher.vue
  3. 4 1
      src/pages/teacher/pie1.vue
  4. 1 1
      src/utils/request.ts

+ 6 - 3
src/pages/home/scrollblock.vue

@@ -43,7 +43,7 @@ function handleMouseLeaveScroll() {
   timer = setInterval(() => {
     scrollTop -= 1
     if (scrollTop === -18) {
-      ZaiXian_XunKe_table.push(ZaiXian_XunKe_table.shift()!)
+      ZaiXian_XunKe_table.value.push(ZaiXian_XunKe_table.value.shift()!)
       scrollTop = 0
     }
   }, 100)
@@ -54,11 +54,14 @@ onBeforeMount(() => {
 
 function windowOpen(url: string) {
   // console.log('url :>> ', url)
-  window.open(location.origin + url)
+  // window.open(location.origin + url)
+  window.open( url)
+
 }
 
 function windowOriginOpen(url: string) {
-  window.open(`${location.origin}/${url}`)
+  // window.open(`${location.origin}/${url}`)
+  window.open(`${url}`)
 }
 
 let dialogVisible = $ref(false)

+ 3 - 3
src/pages/teacher.vue

@@ -16,8 +16,8 @@ const right_top_echartsData = ref('');
 const right_middle_echartsData = ref('');
 const right_bottom_echartsData = ref('');
 
-const initData = () => {
-  _request({
+const initData = async () => {
+  await _request({
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded',
     },
@@ -42,7 +42,7 @@ const initData = () => {
     })
   .catch(error=>{console.log(error)})
 }
-initData();
+await initData();
 
 
 // newTotal = numTrans(res.data.school_base_data.yhgmData.total)

+ 4 - 1
src/pages/teacher/pie1.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 import 'echarts-liquidfill'
+
 const props = defineProps<{
   ecahrtsData: Array
 }>()
@@ -99,9 +100,11 @@ const option = {
   //   },
   // ],
 }
+const titleList = ref('');
 onMounted(() => {
-  echarts.init(chartRef.value).setOption(option)
+  echarts.init(chartRef.value).setOption(option);
 })
+
 </script>
 
 <template>

+ 1 - 1
src/utils/request.ts

@@ -1,6 +1,6 @@
 import axios from 'axios'
 import type { AxiosRequestConfig } from 'axios'
-import { showFailToast } from 'vant';
+// import { showFailToast } from 'vant';
 import { token } from '~/store/index'
 
 const _request = axios.create({