* 更新 * @interface /user/up_study * @method GET * @category user * @foldnumber 10 * @returns {Object} * @example
(ctx)
| 94 | */ |
| 95 | |
| 96 | async upStudy(ctx) { |
| 97 | let userInst = yapi.getInst(userModel); //创建user实体 |
| 98 | let data = { |
| 99 | up_time: yapi.commons.time(), |
| 100 | study: true |
| 101 | }; |
| 102 | try { |
| 103 | let result = await userInst.update(this.getUid(), data); |
| 104 | ctx.body = yapi.commons.resReturn(result); |
| 105 | } catch (e) { |
| 106 | ctx.body = yapi.commons.resReturn(null, 401, e.message); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | async loginByToken(ctx) { |
| 111 | try { |