Commit fdf98450 by xuzhenghua

pull

parent 2c26e5ac
......@@ -79,7 +79,7 @@ class UseCoupon extends PureComponent {
}
}
if (state.from === '/order') {
const coupon = data.data
/*const coupon = data.data
if (coupon['ctype'] == 2
&& coupon['limit_course'] != this.state.courseId) {
......@@ -93,7 +93,7 @@ class UseCoupon extends PureComponent {
valid_coupons: [...this.state.valid_coupons, coupon],
redeemCode: ''
})
}
}*/
Toast.info('兑换成功')
this.getAllCoupons()
}
......@@ -143,7 +143,7 @@ class UseCoupon extends PureComponent {
const [expansionCoupons, selectCoupons] = coupons
const {data: select} = selectCoupons
const {data: expansion} = expansionCoupons
let PzCoupon = this.state.valid_coupons.concat(expansion.data)
let PzCoupon = Array.isArray(expansion.data) ? expansion.data : []
if (expansion.code == 200) {
Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
......
......@@ -15,10 +15,12 @@ const accountLogin = user => dispatch => {
}
const quickLogin = user => dispatch => {
return http.post(`${API['passport-api']}/quick_login`, user)
.then(res => {
return storeUser(res, dispatch)
})
return http.post(`${API['passport-api']}/quick_login`, {
...user,
plat: 5
}).then(res => {
return storeUser(res, dispatch)
})
}
const storeUser = (res, dispatch) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment