| 1145 | |
| 1146 | // 获取用户信息 |
| 1147 | function getUserInfo(showInvite = true) { |
| 1148 | return new Promise(async (resolve) => { |
| 1149 | $.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task,cfd_has_show_selef_point,choose_goods_has_show,daily_task_win,new_user_task_win,guider_new_user_task,guider_daily_task_icon,guider_nn_task_icon,tool_layer,new_ask_friend_m')}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}&strPgUUNum=${token['farm_jstoken']}&strVersion=1.0.1&dwIsReJoin=1`), async (err, resp, data) => { |
| 1150 | try { |
| 1151 | if (err) { |
| 1152 | console.log(`${JSON.stringify(err)}`) |
| 1153 | console.log(`${$.name} QueryUserInfo API请求失败,请检查网路重试`) |
| 1154 | } else { |
| 1155 | data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); |
| 1156 | $.showPp = nc(oc(() => data.AreaAddr.dwIsSHowPp), 0) |
| 1157 | const { |
| 1158 | buildInfo = {}, |
| 1159 | ddwRichBalance, |
| 1160 | ddwCoinBalance, |
| 1161 | sErrMsg, |
| 1162 | strMyShareId, |
| 1163 | dwLandLvl, |
| 1164 | LeadInfo = {}, |
| 1165 | StoryInfo = {}, |
| 1166 | Business = {}, |
| 1167 | XbStatus = {}, |
| 1168 | MarkList = {} |
| 1169 | } = data; |
| 1170 | if (showInvite) { |
| 1171 | console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); |
| 1172 | console.log(`\n当前等级:${dwLandLvl},金币:${ddwCoinBalance},财富值:${ddwRichBalance},连续营业天数:${Business.dwBussDayNum},离线收益:${Business.ddwCoin}\n`) |
| 1173 | } |
| 1174 | if (showInvite && strMyShareId) { |
| 1175 | console.log(`财富岛好友互助码每次运行都变化,旧的当天有效`); |
| 1176 | console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${strMyShareId}`); |
| 1177 | $.shareCodes.push(strMyShareId) |
| 1178 | } |
| 1179 | $.info = { |
| 1180 | ...$.info, |
| 1181 | buildInfo, |
| 1182 | ddwRichBalance, |
| 1183 | ddwCoinBalance, |
| 1184 | strMyShareId, |
| 1185 | dwLandLvl, |
| 1186 | LeadInfo, |
| 1187 | StoryInfo, |
| 1188 | XbStatus, |
| 1189 | MarkList |
| 1190 | }; |
| 1191 | resolve({ |
| 1192 | buildInfo, |
| 1193 | ddwRichBalance, |
| 1194 | ddwCoinBalance, |
| 1195 | strMyShareId, |
| 1196 | LeadInfo, |
| 1197 | StoryInfo, |
| 1198 | XbStatus, |
| 1199 | MarkList |
| 1200 | }); |
| 1201 | } |
| 1202 | } catch (e) { |
| 1203 | $.logErr(e, resp); |
| 1204 | } finally { |