From 4b4920c2d811f4a8b4fdc6cad7b06454905fc29c Mon Sep 17 00:00:00 2001 From: jazz <jazzxhunter@163.com> Date: 星期二, 26 十二月 2023 19:12:21 +0800 Subject: [PATCH] update_202312261911_卸麻通知和称谓显示v4 --- src/utils/xio_fn.js | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/xio_fn.js b/src/utils/xio_fn.js index d5d0a9f..7389c96 100644 --- a/src/utils/xio_fn.js +++ b/src/utils/xio_fn.js @@ -7,6 +7,7 @@ // 閫氱敤function锛岄�氳繃鍏ㄥ眬瀹夎锛屾垨import寮曠敤璋冪敤 import config from '../config' // 鍩熷悕閰嶇疆 import md5 from 'js-md5' +// import axios from 'axios' // 鍩虹閰嶇疆 - 鑾峰彇褰撳墠鐜 var ismock = config.ismock var isTestView = config.isTestView @@ -41,15 +42,21 @@ * @param {Object} option 璇锋眰瀵硅薄 */ function httpOptionMd5Handle(option) { + // 褰撳墠鏃堕棿鎴� var timestamp = new Date().getTime() var sign, params + // data鍙傛暟瀛楁鎺掑簭锛�26瀛楁瘝A鍒癦鎺掑簭锛� + var newData = {} + Object.keys(option.data).sort().map(key => { + newData[key] = option.data[key] + }) // 鍙傛暟澶勭悊 - params = JSON.stringify(option.data) + params = JSON.stringify(newData) // if (params === '{}') { // params = '' // } // 闈瀖ock妯″紡 - if (option && !ismock) { + if (option) { option.header[`appId`] = APPID option.header[`timestamp`] = timestamp // 绛惧悕澶у啓 @@ -61,6 +68,7 @@ } var fn = { + fn_obj, uuid, httpOptionMd5Handle, /** -- Gitblit v1.8.0