Browse Source

youhua

顶部电池栏目更改颜色
ming 2 years ago
parent
commit
d5b082a973
4 changed files with 29 additions and 21 deletions
  1. 2 1
      src/pages.json
  2. 19 12
      src/pages/login.vue
  3. 7 7
      src/pages/serveConfig.vue
  4. 1 1
      src/store/modules/user.js

+ 2 - 1
src/pages.json

@@ -4,7 +4,8 @@
       "path": "pages/login",
       "style": {
         "navigationBarTitleText": "登录",
-        "navigationStyle": "custom"
+        "navigationStyle": "custom",
+        "navigationBarTextStyle": "black" // 仅支持 black/white
       }
     },
     {

+ 19 - 12
src/pages/login.vue

@@ -4,7 +4,7 @@
     <!-- <view style="position:absolute;top:10px;right:10px;z-index:99;color:#2a98ff" @tap="goSeverConfig">服务器配置</view> -->
 
     <!-- #ifdef APP-PLUS-->
-    <view style="position:absolute;top:10px;right:10px;z-index:99;color:#2a98ff" @tap="goSeverConfig">服务器配置</view>
+    <view style="position:absolute;top:20px;right:15px;z-index:99;color:#2a98ff" @tap="goSeverConfig">服务器配置</view>
     <!--#endif-->
 
 
@@ -173,19 +173,13 @@ function env() {
 
  //#ifdef APP-PLUS
  var linkUrl=newPublicStore.serveUrl;
- if(!newPublicStore.serveUrl){
-    uni.showToast({
-        title: '请进行服务器配置...',
-        icon: "none",
-      })
-  }else{
-    uni.showToast({
-        title: linkUrl,
-        icon: "none",
-      })
-  }
  //#endif
 
+//  uni.showToast({
+//   title: '服务器链接地址为'+linkUrl,
+//   icon: "none",
+// })
+
  getMobileTenantConfigApi({ url:linkUrl });
 
   //  let port = uni.getSystemInfoSync().platform;
@@ -214,6 +208,19 @@ function env() {
 /** 点击提交按钮 */
 async function submitRes() {
 
+  
+ //#ifdef APP-PLUS
+ var linkUrl=newPublicStore.serveUrl;
+ if(!newPublicStore.serveUrl){
+    uni.showToast({
+        title: '首次登录请先进行服务器配置...',
+        icon: "none",
+      })
+      return
+  }
+ //#endif
+
+
   if (switchText.value == "账号密码登录") {
     if (!phone.value) {
       uni.showToast({

+ 7 - 7
src/pages/serveConfig.vue

@@ -31,13 +31,13 @@ const dataList = reactive({
         message: "请输入链接地址",
         trigger: ["blur"],
       },
-      {
-        type: "string",
-        required: true,
-        message: "请输入正确的链接地址",
-        pattern: /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/,
-        trigger: ["blur", "change"],
-      },
+    //   {
+    //     type: "string",
+    //     required: true,
+    //     message: "请输入正确的链接地址",
+    //     pattern: /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/,
+    //     trigger: ["blur", "change"],
+    //   },
     ],
   
   },

+ 1 - 1
src/store/modules/user.js

@@ -39,7 +39,7 @@ const useStores = defineStore("useStores", {
           })
           .catch((error) => {
             modal.closeLoading();
-            modal.msgError(error);
+            modal.msg(error);
             reject(error);
           });
       });