Procházet zdrojové kódy

增加科目二和科目三3

zhangyujun před 3 roky
rodič
revize
ad331709f6

+ 12 - 5
src/views/home/children/test/components/sujectTwo.vue

@@ -2,8 +2,8 @@
 
 <template>
 	<div class="container">
-		<van-button class="my-button" type="primary">前往观看视频</van-button>
-		<div v-html="wxHtml0"></div>
+		<div class="open" v-html="wxHtml0"></div>
+		<!-- <van-button class="my-button" type="primary">前往观看视频</van-button> -->
 	</div>
 </template>
 
@@ -11,10 +11,11 @@
 import { ref } from "vue";
 let sc = "script";
 let sty = "style";
-let wxHtml0 = ref(`	<wx-open-launch-weapp style="display: block;text-align:center;width:75%;height:48px;border: none;position:absolute;top:0.66rem;z-index:9999;opacity:0" id="launch-btn" username="gh_a994fd2f498e" path="pages/lightMock/index.html?living_code=LIVING_CODE">
+let wxHtml0 = ref(`	<wx-open-launch-weapp style="display: block;text-align:center;width:100%;height:48px;border: none;z-index:9999;opacity:1" id="launch-btn" username="gh_a994fd2f498e" path="pages/index/index.html?living_code=LIVING_CODE">
 			<${sc} v-is="'script'" type="text/wxtag-template">
-				<${sty} v-is="'style'">.openbtn{background-color:#38f;color:#f40;width:100px;height:40px;line-height:40px;}</${sty}>
-				<div class="openbtn">跳转小程序</div>
+				<${sty} v-is="'style'">.openbtn{background-color:#1989fa;color:#fff;width:75%;margin:0 auto;height:40px;line-height:40px;text-align:center;}</${sty}>
+				<div class="openbtn"><span >前往观看视频</span></div>
+				
 			</${sc}>
 		</wx-open-launch-weapp>`);
 </script>
@@ -24,6 +25,12 @@ let wxHtml0 = ref(`	<wx-open-launch-weapp style="display: block;text-align:cente
 	width: 100%;
 	display: flex;
 	justify-content: center;
+	position: relative;
+}
+.open{
+	width: 690px;
+	margin: 0 auto;
+		margin-top: 25px;
 }
 .my-button {
 	margin-top: 25px;

+ 3 - 0
src/views/home/children/test/index.vue

@@ -63,6 +63,9 @@ openApi
 			jsApiList: ["previewImage"], // 必填,需要使用的JS接口列表
 			openTagList: ["wx-open-launch-weapp"], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
 		});
+		wx.error(({errMsg})=>{
+			alert('灯光模拟和视频无法跳转')
+		})
 	});
 //打印环境变量
 console.log(import.meta.env.MODE, "环境变量");