From dd004276162a2bf9d042ff0aaa569dc30a95d827 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 26 六月 2023 14:23:26 +0800
Subject: [PATCH] newbackup0626

---
 force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.js |   52 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.js b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.js
index 0d8ae06..c4dcb37 100644
--- a/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.js
+++ b/force-app/main/default/lwc/lexAgencyInfo/lexAgencyInfo.js
@@ -1,4 +1,4 @@
-import { LightningElement,track } from 'lwc';
+import { LightningElement, track } from 'lwc';
 import initAgency from '@salesforce/apex/LexTopPageController.initAgency';
 
 export default class LexAgencyInfo extends LightningElement {
@@ -17,7 +17,7 @@
     init() {
         this.showSpinner = true;
         initAgency()
-            .then(result => {
+            .then((result) => {
                 this.showPage = true;
                 this.isNoteStay = result.isNoteStay;
                 if (result.result == 'Success') {
@@ -26,33 +26,47 @@
                     this.showSpinner = false;
                 } else {
                     this.showSpinner = false;
-                    console.log("Error:" + result.errorMsg);
-                    this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', result.errorMsg, 'error');
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast(
+                        '鍒濆鍖栭〉闈㈠け璐�',
+                        result.errorMsg,
+                        'error'
+                    );
                 }
             })
-            .catch(error => {
+            .catch((error) => {
                 this.showSpinner = false;
-                console.log("Error:" + error);
-                this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', JSON.stringify(error), 'error');
-            })
+                console.log('Error:' + error);
+                this.showMyToast(
+                    '鍒濆鍖栭〉闈㈠け璐�',
+                    JSON.stringify(error),
+                    'error'
+                );
+            });
     }
 
     showMyToast(title, message, variant) {
         console.log('show custom message');
         var iconName = '';
         var content = '';
-        if(variant == 'success'){
-           iconName = 'utility:check';
-        }else{
-           iconName = 'utility:error';
+        if (variant == 'success') {
+            iconName = 'utility:check';
+        } else {
+            iconName = 'utility:error';
         }
-        if(message != ''){
-           content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
-        }else{
-           content = '<h2><strong>'+title+'<strong/></h2>';
+        if (message != '') {
+            content =
+                '<h2><strong>' +
+                title +
+                '<strong/></h2><h5>' +
+                message +
+                '</h5>';
+        } else {
+            content = '<h2><strong>' + title + '<strong/></h2>';
         }
-        this.template.querySelector('c-common-toast').
-        showToast(variant,content,iconName,10000);
+        this.template
+            .querySelector('c-common-toast')
+            .showToast(variant, content, iconName, 10000);
         // var mode;
         // if(this.isNoteStay){
         //     mode ='sticky';
@@ -66,5 +80,5 @@
         //     mode: mode
         // });
         // this.dispatchEvent(evt);
-     }
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.1