python - 新用户功能引导提示如何存储?
PHPz
PHPz 2017-04-18 09:44:28
0
2
419

问题描述

注册的新用户进网站的时候,网站会对一些功能做提示和引导,如下截图:

好几个页面都会有这一类的提示
但是这类提示只对新用户展示
所以我应该怎么判定是否是新用户呢?又如何判定用户变成老用户呢?

我的想法

我的想法是MySQL新建一张表

id
user_id
is_new

注册之后就往里面填数据,默认新用户,访问那些页面的时候,后台往前端传是否是新用户的参数
如果点提示里面的知道了, 那么就变成老用户
但是总有点杀鸡用牛刀的感觉

PHPz
PHPz

学习是最好的投资!

reply all(2)
阿神

There is no need to create a new table. Directly add a row to the user table, just like your is_new is used to identify whether the user still needs to be guided. I think there is no problem. Of course, if you need to record the user's choices, such as initializing some user behaviors, you should create a new table to record these things, and at the same time create a user_id index and add some columns. Just tag it. I personally feel that it is not a overkill, it is the right approach.

When accessing the api, it is very common for the backend to find out whether the user has a certain mark and return it to the frontend, and then the frontend renders it.
I looked at it from the perspective of the back end. I don’t know if there is any black magic on the front end.

PHPzhong

One of my suggestions is to check whether the user has performed relevant operations. For example, when a user creates a new test paper for the first time, a prompt will be given to a novice who creates a new test paper, and when a user answers a test paper for the first time, a prompt will be given for answering the paper.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template