From 3c38598df86e697268b14865e68159d6ba989285 Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期四, 11 四月 2024 15:32:04 +0800
Subject: [PATCH] docs: 首次加载白屏添加loading
---
public/index.html | 35 +++++++++++++++++++++++++++++++++++
src/assets/css/main.css | 1 +
src/components/page/IndexXTYH.vue | 3 +--
src/assets/images/wrongIcon.png | 0
4 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/public/index.html b/public/index.html
index 8f32fcd..37a6931 100644
--- a/public/index.html
+++ b/public/index.html
@@ -5,6 +5,37 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>宄板嘲鐭垮尯鏅烘収鍋滆溅</title>
+ <style>
+ .loading {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ text-align: center;
+ z-index: -1;
+ }
+
+ .spinner {
+ width: 50px;
+ height: 50px;
+ border: 5px solid #ccc;
+ border-top-color: #409EFF;
+ border-radius: 50%;
+ animation: spin 1s infinite linear;
+ }
+
+ .text {
+ margin-top: 10px;
+ font-size: 16px;
+ color: #666;
+ }
+
+ @keyframes spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
+ </style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=tuVbv4tLIzoX7IWdeKeTwojDqPILFoe5"></script>
<!--<script src="//mapv.baidu.com/build/mapv.min.js"></script>
<script src="https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.127/dist/mapvgl.min.js"></script>-->
@@ -14,6 +45,10 @@
<title>宄板嘲鏅烘収娉婅溅绯荤粺</title>
</head>
<body>
+ <div class="loading" style="display:block">
+ <div class="spinner"></div>
+ <div class="text">姝e湪鍔犺浇涓�...</div>
+ </div>
<div id="app"></div>
</body>
</html>
diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index eb44e09..db79f3d 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -9,6 +9,7 @@
.wrapper {
width: 100%;
height: 100%;
+ background: #fff;
}
body {
diff --git a/src/assets/images/wrongIcon.png b/src/assets/images/wrongIcon.png
new file mode 100644
index 0000000..045dd48
--- /dev/null
+++ b/src/assets/images/wrongIcon.png
Binary files differ
diff --git a/src/components/page/IndexXTYH.vue b/src/components/page/IndexXTYH.vue
index 41c06de..3e9c0d0 100644
--- a/src/components/page/IndexXTYH.vue
+++ b/src/components/page/IndexXTYH.vue
@@ -385,13 +385,12 @@
if(this.type == 0 ){
//寰俊锛岃幏鍙朿ode
if(this.code==null||this.code==""){
- // var url = encodeURIComponent("http://hesuancj.cn/#/index2?code2="+this.code2);
+ var url = encodeURIComponent("http://hesuancj.cn/#/index2?code2="+this.code2);
// window.location.href = `http://192.168.0.8:8082/#/Index2?code=${encodeURIComponent('123')}&state=STATE?code2=${encodeURIComponent(this.code2)}`
// window.location.href =url;
window.location.href ="https://open.weixin.qq.com/connect/oauth2/authorize?" +
"appid=wx46e756aed958f895&redirect_uri="+url+"&response_type=code" +
"&scope=snsapi_userinfo&state=STATE#wechat_redirect";
- "&scope=SCOPE&state=STATE#wechat_redirect";
}else{
this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/api/getOpenId', {id:this.outParkId,code:this.code}, res => {
if(res.code === 0){
--
Gitblit v1.9.1