feat: 套餐按钮根据用户会员状态显示
- 当前套餐:绿色disabled按钮 - 已升级:灰色disabled按钮 - 未登录/低等级:显示购买按钮 - pricing路由传递user对象
This commit is contained in:
3
app.py
3
app.py
@@ -206,7 +206,8 @@ def history():
|
||||
@app.route('/pricing')
|
||||
def pricing():
|
||||
"""会员定价页"""
|
||||
return render_template('pricing.html', plans=MEMBERSHIP_PLANS)
|
||||
user = get_current_user()
|
||||
return render_template('pricing.html', plans=MEMBERSHIP_PLANS, user=user)
|
||||
|
||||
|
||||
# ==================== 路由: API ====================
|
||||
|
||||
Reference in New Issue
Block a user