Explorar el Código

终端页加入后退按钮

zhanghe hace 6 años
padre
commit
a70baa2c81

+ 5 - 1
src/res/tpl/TerminalScene.tpl

@@ -60,7 +60,11 @@
 			<div class="scroll-list" id="buy-record-list"></div>
 		</div>
 	</div>
-	<div class="back-message">
+	<!-- <div class="back-message">
 		按遥控器<span>返回</span>键退出此界面
+	</div> -->
+	<!-- 返回按钮 -->
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
 	</div>
 </div>

+ 4 - 0
src/stage/index/scene/TerminalScene.js

@@ -128,6 +128,10 @@ class TerminalScene extends scene {
 	}
 
 	onOK(e) {
+    if (e.target.con.classList.contains('goback')) {
+        this.hideScene({});
+        return;
+    }
 		if (e.target.con.classList.contains('quit-account')) {
 			APIClient.userLogoutAndUnbindDevice((isTrue, res) => {
 				if (!isTrue) { return; }

+ 2 - 1
src/stage/index/style/TerminalScene.less

@@ -89,10 +89,11 @@
 			margin-top: .6rem;
 			margin-bottom: .43rem;
 			border: solid unit(@borderSize, rem) transparent;
+			/*
 			&.fe-focus {
 				// .after-focus(@borderSize, #ffe100);
 				border: solid unit(@borderSize, rem) #ffe100;
-			}
+			}*/
 		}
 	}
 	.purchased {