(body)
| 134 | }) |
| 135 | } |
| 136 | function sellgoods(body) { |
| 137 | return new Promise((resolve) => { |
| 138 | $.get(taskUrl(`story/sellgoods`, body), (err, resp, data) => { |
| 139 | try { |
| 140 | if (err) { |
| 141 | console.log(`${JSON.stringify(err)}`) |
| 142 | console.log(`${$.name} sellgoods API请求失败,请检查网路重试`) |
| 143 | } else { |
| 144 | data = JSON.parse(data); |
| 145 | if (data.iRet === 0) { |
| 146 | console.log(`贝壳出售成功:获得${data.Data.ddwCoin}金币 ${data.Data.ddwMoney}财富\n`) |
| 147 | } else { |
| 148 | console.log(`贝壳出售失败:${data.sErrMsg}\n`) |
| 149 | } |
| 150 | } |
| 151 | } catch (e) { |
| 152 | $.logErr(e, resp); |
| 153 | } finally { |
| 154 | resolve(); |
| 155 | } |
| 156 | }) |
| 157 | }) |
| 158 | } |
| 159 | |
| 160 | // 捡贝壳 |
| 161 | async function queryshell() { |
no test coverage detected