From 0e5cc5f682866e32be324024a72f54d117eb6423 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 28 九月 2022 17:39:17 +0800
Subject: [PATCH] 1.设备维修申请静态页面开发完成
---
js/global.js | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/js/global.js b/js/global.js
index e69de29..0ad3afc 100644
--- a/js/global.js
+++ b/js/global.js
@@ -0,0 +1,36 @@
+(function(w) {
+ // 鏍煎紡鍖栧湴鍧�鏍忓弬鏁� 灏嗗璞¤嚜鍔ㄦ嫾鎺ユ垚鍦板潃鏍忎紶鍙傚舰寮�
+ w.formatParams = function(data) {
+ let temp = ''
+ Object.keys(data).map((key, index) => {
+ temp += '&' + key + '=' + data[key]
+ })
+ let firstCharAt = temp.charAt(0)
+ temp = temp.replace(firstCharAt, '?')
+ return temp;
+ }
+
+ w.topPopoverClick = function(type) {
+
+ if (type === '鎿嶄綔鎸囧') {
+ console.log('鎿嶄綔鎸囧')
+ } else if (type === '鎴愬搧杩芥函') {
+ console.log('鎴愬搧杩芥函')
+ } else if (type === '閫�鍑虹櫥褰�') {
+ const data = {
+ userid: localStorage.getItem('userid'),
+ usercode: localStorage.getItem('usercode'),
+ username: localStorage.getItem('username'),
+ usertype: localStorage.getItem('usertype')
+ }
+ post('Login/LoginAppOut' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ window.location.href = '../login/index.html'
+ }
+ })
+ }
+
+ // return 1
+ }
+
+})(window);
--
Gitblit v1.9.3