Esempio n. 1
0
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})
Esempio n. 2
0
def superlike(request):
    """
    超级喜欢
    :param request:
    :return:
    """
    sid = int(request.POST.get('sid'))
    user = request.user

    matched = logic.superlike_someone(user.id, sid)

    return render_json(data={'matched': matched})
Esempio n. 3
0
def superlike(request):
    '''超级喜欢'''
    sid = int(request.POST.get('sid'))
    is_matched = logic.superlike_someone(request.user, sid)
    return render_json({'is_matched': is_matched})
Esempio n. 4
0
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})