|
@@ -98,7 +98,7 @@ const couponExp = { |
|
@@ -98,7 +98,7 @@ const couponExp = { |
98
|
|
98
|
|
99
|
const coupons = req.session._EXP_COUPONS;
|
99
|
const coupons = req.session._EXP_COUPONS;
|
100
|
|
100
|
|
101
|
- let promises = _.map(_.filter(coupons, cp => !cp.user_send), item => {
|
101
|
+ let promises = _.map(coupons, item => {
|
102
|
return req.ctx(expModel).getCoupon(uid, item.couponId);
|
102
|
return req.ctx(expModel).getCoupon(uid, item.couponId);
|
103
|
});
|
103
|
});
|
104
|
|
104
|
|
|
@@ -161,7 +161,7 @@ const couponExp = { |
|
@@ -161,7 +161,7 @@ const couponExp = { |
161
|
req.session.yh_auth_uid = uid;
|
161
|
req.session.yh_auth_uid = uid;
|
162
|
req.session.yh_auth_logged = true;
|
162
|
req.session.yh_auth_logged = true;
|
163
|
|
163
|
|
164
|
- let promises = _.map(_.filter(coupons, cp => !cp.user_send), item => {
|
164
|
+ let promises = _.map(coupons, item => {
|
165
|
return req.ctx(expModel).getCoupon(uid, item.couponId);
|
165
|
return req.ctx(expModel).getCoupon(uid, item.couponId);
|
166
|
});
|
166
|
});
|
167
|
|
167
|
|
|
@@ -180,6 +180,21 @@ const couponExp = { |
|
@@ -180,6 +180,21 @@ const couponExp = { |
180
|
},
|
180
|
},
|
181
|
|
181
|
|
182
|
/**
|
182
|
/**
|
|
|
183
|
+ * 清除登录状态
|
|
|
184
|
+ * @param req
|
|
|
185
|
+ * @param res
|
|
|
186
|
+ */
|
|
|
187
|
+ clearYhLogin(req, res) {
|
|
|
188
|
+ req.session.yh_auth_uid = 0;
|
|
|
189
|
+ req.session.yh_auth_logged = false;
|
|
|
190
|
+
|
|
|
191
|
+ res.json({
|
|
|
192
|
+ code: 200,
|
|
|
193
|
+ message: '已清除有货授权登录状态'
|
|
|
194
|
+ });
|
|
|
195
|
+ },
|
|
|
196
|
+
|
|
|
197
|
+ /**
|
183
|
* 助力好友
|
198
|
* 助力好友
|
184
|
* @param req
|
199
|
* @param req
|
185
|
* @param res
|
200
|
* @param res
|