(data)
| 146 | } |
| 147 | |
| 148 | function miniSign(data) { |
| 149 | const timestamp = Date.now().toString(); |
| 150 | const body = canonicalize(JSON.parse(JSON.stringify(data || {}))); |
| 151 | const raw = `${body ? `${body}&` : ""}${timestamp}&${MINI_SIGN_SECRET}`; |
| 152 | return { |
| 153 | "X-LONGZHU-TimeStamp": timestamp, |
| 154 | "X-Client-Type": "microApp", |
| 155 | "X-LONGZHU-Sign": crypto.createHash("md5").update(raw).digest("hex"), |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | function dxMakeLocalId(length = 32) { |
| 160 | const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
no test coverage detected