예제 #1
0
def j_get_all_cs_qq():
    try:
        all_cs_qq = AdminBiz.get_all_cs_qq()
    except DaixieError as e:
        return j_err(e)

    return j_ok(u'获取所有客服QQ成功', all_cs_qq=all_cs_qq)
예제 #2
0
파일: order.py 프로젝트: RouthLuo/daixie
def pay(order_id):
	'''
	订单付款
	'''
	try:
		ret = OrderBiz.pay(order_id)
	except DaixieError as e:
		fail(e)
		return j_err(e)

	success(ret)
	return render_template('user/recharge_result.html', order_id=order_id, cuser=current_user, result=ret)
예제 #3
0
def j_pay():
	'''
	订单付款
	'''
	order_id = request.form['order_id']
	try:
		ret = OrderBiz.pay(order_id)
	except DaixieError as e:
		fail(e)
		return j_err(e)

	success(ret)
	return j_ok(ret)
예제 #4
0
def charge_amount():
    """
	选择充值金额
	"""
    form = ChargeAmountForm()
    if not form.validate_on_submit():
        html = get_template_attribute("import/tools.html", "select_recharge_amount_modal")(form)
        return j_err(u"请选择金额", html=html)
    amount = form.amount.data
    data_amount = int(amount) * 100

    session["amount"] = amount
    session["data_amount"] = data_amount
    return render_template("user/recharge.html", nav_recharge="active", amount=amount, data_amount=data_amount)
예제 #5
0
 def wrapper(*args, **kwargs):
     if not current_user.is_authenticated():
         return j_err(u'您还没有登录')
     return func(*args, **kwargs)