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 | 46 ++++++++++++++++++++++++++++++++++------------
1 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/js/global.js b/js/global.js
index 70ec3bb..0ad3afc 100644
--- a/js/global.js
+++ b/js/global.js
@@ -1,14 +1,36 @@
(function(w) {
- // 鏍煎紡鍖栧湴鍧�鏍忓弬鏁� 灏嗗璞¤嚜鍔ㄦ嫾鎺ユ垚鍦板潃鏍忎紶鍙傚舰寮�
- w.formatParams = function() {
- const data = {
- userid: 33,
- usercode: '002',
- username: '寮犱笁',
- usertype: 'APP'
- }
- return data;
+ // 鏍煎紡鍖栧湴鍧�鏍忓弬鏁� 灏嗗璞¤嚜鍔ㄦ嫾鎺ユ垚鍦板潃鏍忎紶鍙傚舰寮�
+ 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;
}
-
-
-})(window);
\ No newline at end of file
+
+ 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