MCPcopy Create free account
hub / github.com/chavyleung/scripts / getUserInfo

Function getUserInfo

wps/wps.js:245–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243
244// 获取用户信息
245function getUserInfo() {
246 return new Promise((resove) => {
247 const url = { url: 'https://vip.wps.cn/userinfo', headers: { sid: $.sid } }
248 $.get(url, (error, response, data) => {
249 try {
250 if (error) throw new Error(error)
251 $.userinfo = JSON.parse(data)
252 } catch (e) {
253 $.log(`❗️ ${$.name}, 执行失败!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
254 } finally {
255 resove()
256 }
257 })
258 })
259}
260
261async function invite() {
262 const sids = [

Callers 1

wps.jsFile · 0.85

Calls 2

getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected