From 48e31778cba99836acaaccbb24c843cd3049b1da Mon Sep 17 00:00:00 2001 From: loulijun2021 <1694218219@qq.com> Date: 星期五, 23 九月 2022 15:37:12 +0800 Subject: [PATCH] 1.设备保养开发完成 --- unpackage/cache/wgt/H5EDA0853/js/global.js | 46 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 34 insertions(+), 12 deletions(-) diff --git a/unpackage/cache/wgt/H5EDA0853/js/global.js b/unpackage/cache/wgt/H5EDA0853/js/global.js index 70ec3bb..0ad3afc 100644 --- a/unpackage/cache/wgt/H5EDA0853/js/global.js +++ b/unpackage/cache/wgt/H5EDA0853/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