def dislike(request): '''不喜欢''' sid = int(request.POST.get('sid')) Swiped.dislike(request.user.id, sid) logic.add_swipe_score(sid, 'dislike') rds.srem('RCMD-%s' % request.user.id, sid) return render_json(None)
def superlike(request): '''超级喜欢''' sid = int(request.POST.get('sid')) is_matched = logic.superlike_someone(request.user, sid) logic.add_swipe_score(sid, 'superlike') rds.srem('RCMD-%s' % request.user.id, sid) return render_json({'is_matched': is_matched})
def super_like(request): """超喜欢""" user = request.user sid = int(request.POST.get('sid')) is_matched = super_like_someone(user, sid) add_swipe_score(sid, 'superlike') # 添加滑动排行 rds.srem('RCMD-%s' % request.user.id, sid) return render_json({'is_matched': is_matched})
def dislike(request): """不喜欢""" user = request.user sid = int(request.POST.get('sid')) Swiped.dislike(user.id, sid) add_swipe_score(sid, 'dislike') # 添加滑动排行 rds.srem('RCMD-%s' % request.user.id, sid) return render_json(None)
def dislike(request): sid = int(request.POST.get("sid")) Swiped.dislike(request.user.id,sid) logic.add_swipe_score(sid,'dislike') rds.srem('RCMD-%s' % request.user.id, sid) # 删除redis集合中的某一个值 return render_json(None)
def superlike(request): sid = int(request.POST.get("sid")) is_matched = logic.superlike_someone(request.user, sid) logic.add_swipe_score(sid,'superlike') rds.srem('RCMD-%s' % request.user.id, sid) # 删除redis集合中的某一个值 return render_json({'is_matched':is_matched})