wangxy пре 5 месеци
родитељ
комит
b3dd66ee7e
1 измењених фајлова са 42 додато и 0 уклоњено
  1. 42 0
      pages/test/test.vue

+ 42 - 0
pages/test/test.vue

@@ -0,0 +1,42 @@
+<template>
+	<view>
+		<tiankongVue :question="qa" :placeholders="['[bank]', '[bank1]']"></tiankongVue>	
+		<!-- <danxuan v-for="item in list" :question="item" ></danxuan>	 -->
+	</view>
+</template>
+
+<script setup>
+	import tiankongVue from '@/components/question/tiankong.vue'
+	import panduan from '@/components/question/panduan.vue'
+	import danxuan from '@/components/question/danxuan.vue'
+	import * as httpUnit from "@/api/unitTest.js"
+	import {onLoad} from "@dcloudio/uni-app"
+	import {
+		catchError,
+		toast
+	} from "@/utils/common.js"
+	import { ref } from "vue"
+	
+	const list = ref([]);
+	
+	const qa = ref({name: '<p>这是题干[bank]!hahah[bank1],aaa</p>',stId: 1,reply: ['',''],result: ['', '']})
+	
+	async function initPage() {
+		const [err, cdata] = await catchError(httpUnit.getExamData({
+			jieId: 1
+		}));
+		if (err) {
+			toast("单元测试数据获取异常");
+			return;
+		}
+		console.log(cdata)
+		list.value = cdata;
+	}
+	onLoad(() => {
+		initPage()
+	})
+</script>
+
+<style>
+
+</style>