Browse Source

开始学习中的虚拟资产库链接

eraser 4 years ago
parent
commit
93ed0e7964

+ 1 - 1
components/home/simulationLibrary.vue

@@ -167,7 +167,7 @@
 		},
 		methods: {
 			init() {
-				// console.log('simulationLibrary=',this.$UserId)
+				console.log('simulationLibrary=',this.$UserId)
 				uni.request({
 					url: this.$Api + "/item/getitemlist",
 					data: {

+ 11 - 1
components/startLearning/learningAndExperiment/learningAndExperiment.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 学习与实验 -->
 	<view class="myComRoot df jcc bgclF8">
-		<view class="df fdc contentBox">
+		<view class="df fdc contentBox" v-show='checkedIndex_topTitle!=4'>
 			<!-- 换行的段落文字 -->
 			<view class="df content-paragraph" v-for="(paragraph,i) in data_XXYSY[checkedIndex_topTitle].content.paragraphList"
 			 :key="i">
@@ -27,11 +27,16 @@
 				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==4'>进入虚拟资源库</view>
 			</view>
 		</view>
+		<simulationLibrary ref="simulationLibrary" v-show='checkedIndex_topTitle==4'></simulationLibrary>
 	</view>
 </template>
 
 <script>
+	import simulationLibrary from "../../../components/home/simulationLibrary.vue"
 	export default {
+		components: {
+			simulationLibrary
+		},
 		data() {
 			return {
 				checkedIndex_topTitle: 0, //顶部标题选择
@@ -56,6 +61,11 @@
 				this.checkedIndex_topTitle = index;
 				// console.log("2级点击", index, this.data_XXYSY[index].content);
 				// console.log("***",this.myData_QXZB_SYQY);
+				
+				if(index == 4)
+				{
+					this.$refs.simulationLibrary.init();
+				}
 			},
 			onClick_KSRZ(){
 				this.$emit("onClick_KSRZ")