From 0ab4bf8f3982bdee9962076f29c5664185328517 Mon Sep 17 00:00:00 2001 From: loulijun2021 <1694218219@qq.com> Date: 星期五, 21 十月 2022 17:02:10 +0800 Subject: [PATCH] 1.消息全局化2.消息响应静态页面实现 --- unpackage/cache/wgt/H5EDA0853/js/global.js | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/unpackage/cache/wgt/H5EDA0853/js/global.js b/unpackage/cache/wgt/H5EDA0853/js/global.js index e69de29..0ad3afc 100644 --- a/unpackage/cache/wgt/H5EDA0853/js/global.js +++ b/unpackage/cache/wgt/H5EDA0853/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