阿里云
发表主题 回复主题
  • 317阅读
  • 0回复

[其他]头脑王者版知识荣耀源码解说

级别: 新人
发帖
1
云币
2
_( /lBf{|  
头脑王者版知识荣耀源码解说[size=;font-size:10.5000pt,10.5000pt](黄忆.1511.970.7084.微电.)提供头脑王者小程序源码包,集合源码解说、服务匹配安装服务等。[size=;font-size:10.5000pt,10.5000pt] \(t>(4s_~  
[size=;font-size:10.5000pt,10.5000pt]采用:[size=;font-size:10.5000pt,10.5000pt] W%QtJB1)  
[size=;font-size:10.5000pt,10.5000pt]1、技术框架thinkphp5.0[size=;font-size:10.5000pt,10.5000pt] 4^9_E &Fa  
[size=;font-size:10.5000pt,10.5000pt]2php版本5.5以上、数据库是mysql5.5,即时通讯采用到workerman服务[size=;font-size:10.5000pt,10.5000pt] AQU: 0  
[size=;font-size:10.5000pt,10.5000pt] SytDo (_=W  
[size=;font-size:10.5000pt,10.5000pt]一、[size=;font-size:10.5000pt,10.5000pt]头脑王者php答题小程序源码开发[size=;font-size:10.5000pt,10.5000pt]段位源码展示 [size=;font-size:10.5000pt,10.5000pt] VQ}3r)ch  
[size=;font-size:10.5000pt,10.5000pt] QSqlQuery query;[size=;font-size:10.5000pt,10.5000pt] $F$R4?_  
[size=;font-size:10.5000pt,10.5000pt] ;P#*R3   
[size=;font-size:10.5000pt,10.5000pt]    // 先从数据库中获取之前的积分,将本次答题得分相加得到最新的积分[size=;font-size:10.5000pt,10.5000pt] [m&ZAq  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("SELECT *FROM user_info  WHERE name = ? ");[size=;font-size:10.5000pt,10.5000pt] ,QAp5I%3=  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] Tz~ ftf  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] 5ml}TSMu'  
[size=;font-size:10.5000pt,10.5000pt]    query.next();[size=;font-size:10.5000pt,10.5000pt] [)c|oh%  
[size=;font-size:10.5000pt,10.5000pt] 4=cq76  
[size=;font-size:10.5000pt,10.5000pt]    tmpScore = query.value(3).toInt() + score;[size=;font-size:10.5000pt,10.5000pt] HKw4}FC*  
[size=;font-size:10.5000pt,10.5000pt]    qDebug() << tmpScore;[size=;font-size:10.5000pt,10.5000pt] > PA,72e   
[size=;font-size:10.5000pt,10.5000pt] H43D=N&  
[size=;font-size:10.5000pt,10.5000pt]    switch(tmpScore / 100)[size=;font-size:10.5000pt,10.5000pt] JPKZU<:+V  
[size=;font-size:10.5000pt,10.5000pt]    {[size=;font-size:10.5000pt,10.5000pt] Lwk-  
[size=;font-size:10.5000pt,10.5000pt]        case 0:[size=;font-size:10.5000pt,10.5000pt] b;ZAz  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("青铜");[size=;font-size:10.5000pt,10.5000pt] _3>zi.J/  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] !qv;F?2 <g  
[size=;font-size:10.5000pt,10.5000pt]        case 1:[size=;font-size:10.5000pt,10.5000pt] )S?}huX  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("白银");[size=;font-size:10.5000pt,10.5000pt] 5nb6k,+E  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] bd}SB-D  
[size=;font-size:10.5000pt,10.5000pt]        case 2:[size=;font-size:10.5000pt,10.5000pt] #C}(7{Vt  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("黄金");[size=;font-size:10.5000pt,10.5000pt]  #0H[RU?  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] 1k i"UF/  
[size=;font-size:10.5000pt,10.5000pt]        case 3:[size=;font-size:10.5000pt,10.5000pt] N Q=YTRU  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("铂金");[size=;font-size:10.5000pt,10.5000pt] )5x?Qn(B  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] CgE5;O  
[size=;font-size:10.5000pt,10.5000pt]        case 4:[size=;font-size:10.5000pt,10.5000pt] \(L^ /]}G)  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("钻石");[size=;font-size:10.5000pt,10.5000pt] &i RX-)^u  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] t,nB`g?  
[size=;font-size:10.5000pt,10.5000pt]        case 5:[size=;font-size:10.5000pt,10.5000pt] D3ad2vH  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("星耀");[size=;font-size:10.5000pt,10.5000pt] 0k [6  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] ![%,pip2/&  
[size=;font-size:10.5000pt,10.5000pt]        case 6:[size=;font-size:10.5000pt,10.5000pt] ="K>yUfcFl  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("王者");[size=;font-size:10.5000pt,10.5000pt] z& jDOex  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] H)tDfk sq\  
[size=;font-size:10.5000pt,10.5000pt]         default:[size=;font-size:10.5000pt,10.5000pt] 8?XZF[D  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] 5Bo)j_Qo  
[size=;font-size:10.5000pt,10.5000pt]    }[size=;font-size:10.5000pt,10.5000pt] Q8i6kf!  
[size=;font-size:10.5000pt,10.5000pt] w.H+$=aK  
[size=;font-size:10.5000pt,10.5000pt]    // 更新得分和段位[size=;font-size:10.5000pt,10.5000pt] 37Y]sJrs$  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("UPDATE user_info SET level = ?, total = ? WHERE name = ?");[size=;font-size:10.5000pt,10.5000pt] v(~m!8!TI  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpLevel.toUtf8());[size=;font-size:10.5000pt,10.5000pt] SGm? "esEt  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpScore);[size=;font-size:10.5000pt,10.5000pt] :~Y$\Ww(~  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] L4b4X  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] >Z% `&D~u  
[size=;font-size:10.5000pt,10.5000pt] wP*Z/}Uum+  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.cmd   = UPDATESCORE;[size=;font-size:10.5000pt,10.5000pt] )/'s& D  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.level = tmpLevel;[size=;font-size:10.5000pt,10.5000pt] M5uN1*   
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.total = tmpScore;[size=;font-size:10.5000pt,10.5000pt] .<dmdqk]  
[size=;font-size:10.5000pt,10.5000pt] 6Y^o8R  
[size=;font-size:10.5000pt,10.5000pt]    QByteArray block;[size=;font-size:10.5000pt,10.5000pt] ig{5 ]wZ(  
[size=;font-size:10.5000pt,10.5000pt]    QDataStream out(&block, QIODevice::WriteOnly);[size=;font-size:10.5000pt,10.5000pt] .EO1{2=  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)0;[size=;font-size:10.5000pt,10.5000pt] stPCw$@  
[size=;font-size:10.5000pt,10.5000pt]    out<<sendToClient1;[size=;font-size:10.5000pt,10.5000pt] l.$#IE  
[size=;font-size:10.5000pt,10.5000pt]    out.device()->seek(0);[size=;font-size:10.5000pt,10.5000pt] !=:c8V  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)(block.size() - sizeof(qint16));[size=;font-size:10.5000pt,10.5000pt] R8l9i2  
[size=;font-size:10.5000pt,10.5000pt]    client->write(block, block.length());[size=;font-size:10.5000pt,10.5000pt] & j43DYw4  
[size=;font-size:10.5000pt,10.5000pt] t=AR>M!w~  
[size=;font-size:10.5000pt,10.5000pt]二、[size=;font-size:10.5000pt,10.5000pt]头脑王者php答题小程序源码开发[size=;font-size:10.5000pt,10.5000pt]注册页面、体型设置、赛程题目版块版块展示:[size=;font-size:10.5000pt,10.5000pt] nKdLhCN'=  
[size=;font-size:10.5000pt,10.5000pt]public:[size=;font-size:10.5000pt,10.5000pt] O [/~V=  
[size=;font-size:10.5000pt,10.5000pt]    explicit Mythread(QTcpSocket *client, QObject *parent = 0);[size=;font-size:10.5000pt,10.5000pt] @#apOoVW>  
[size=;font-size:10.5000pt,10.5000pt]    void run();[size=;font-size:10.5000pt,10.5000pt] 2B7&Ll\>  
[size=;font-size:10.5000pt,10.5000pt] Npqbxb  
[size=;font-size:10.5000pt,10.5000pt]    void user_Register();       // 用户注册申请[size=;font-size:10.5000pt,10.5000pt] bd4q/w4q  
[size=;font-size:10.5000pt,10.5000pt]    void user_Login();          // 用户登录申请[size=;font-size:10.5000pt,10.5000pt] )T?ryp3ev  
[size=;font-size:10.5000pt,10.5000pt]    void user_match();          // 用户匹配申请[size=;font-size:10.5000pt,10.5000pt] DZue.or  
[size=;font-size:10.5000pt,10.5000pt]    void sendQues();            // 向用户分发题目[size=;font-size:10.5000pt,10.5000pt] (&(f`c@I  
[size=;font-size:10.5000pt,10.5000pt]                                // 重载定时器函数[size=;font-size:10.5000pt,10.5000pt] zlfm})+G  
[size=;font-size:10.5000pt,10.5000pt]    void timerEvent(QTimerEvent *event);[size=;font-size:10.5000pt,10.5000pt] 7 <xxOY>y  
[size=;font-size:10.5000pt,10.5000pt] ~"k'T9QBY  
[size=;font-size:10.5000pt,10.5000pt]signals:[size=;font-size:10.5000pt,10.5000pt] DN+`Q{KS  
[size=;font-size:10.5000pt,10.5000pt]    void client_match_socket(QTcpSocket *client);  // 将客户端的socket发给 主窗口保存[size=;font-size:10.5000pt,10.5000pt] 9=|5-? ^  
[size=;font-size:10.5000pt,10.5000pt] 2xX7dl(cC  
[size=;font-size:10.5000pt,10.5000pt]    void send_user_info(QString name, QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] cu-WY8n  
[size=;font-size:10.5000pt,10.5000pt] Zu,f&smb  
[size=;font-size:10.5000pt,10.5000pt]    void send_trans_score(QTcpSocket* client, int score, QString name);[size=;font-size:10.5000pt,10.5000pt] duI8^&|  
[size=;font-size:10.5000pt,10.5000pt] L6m'u6:1{  
[size=;font-size:10.5000pt,10.5000pt]    void send_match_result(QTcpSocket* client, int score);[size=;font-size:10.5000pt,10.5000pt] tz,FK;8  
[size=;font-size:10.5000pt,10.5000pt] X 6)LpMm  
[size=;font-size:10.5000pt,10.5000pt]    void removeFromMap(QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] Ot?rsr  
[size=;font-size:10.5000pt,10.5000pt] 6{M.S}.^  
[size=;font-size:10.5000pt,10.5000pt]public slots:[size=;font-size:10.5000pt,10.5000pt] zF PSk ]  
[size=;font-size:10.5000pt,10.5000pt]    void dealClientData();[size=;font-size:10.5000pt,10.5000pt] ]9' \<uR  
[size=;font-size:10.5000pt,10.5000pt] `d8TA#|`  
[size=;font-size:10.5000pt,10.5000pt]private:[size=;font-size:10.5000pt,10.5000pt] 3r\QLIr L8  
[size=;font-size:10.5000pt,10.5000pt]    QTcpSocket *client;         // 客户端的socket[size=;font-size:10.5000pt,10.5000pt] >97N $  
[size=;font-size:10.5000pt,10.5000pt]    QSqlDatabase db;            // 数据库句柄[size=;font-size:10.5000pt,10.5000pt] =F9-,"EAI  
[size=;font-size:10.5000pt,10.5000pt]    qint16 blocksize;[size=;font-size:10.5000pt,10.5000pt] L|<Mtw  
[size=;font-size:10.5000pt,10.5000pt]    Recv   Rec_msg;             // 接收的信息结构体[size=;font-size:10.5000pt,10.5000pt] CVm*Q[5s"  
[size=;font-size:10.5000pt,10.5000pt] 1 !sYd@iD@  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> ques;      // 题干[size=;font-size:10.5000pt,10.5000pt] /W9=7&R0  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer1;   // 选项 1[size=;font-size:10.5000pt,10.5000pt] *$QUE0  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer2;   // 选项 2[size=;font-size:10.5000pt,10.5000pt] 9;PtY dJ8  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer3;   // 选项 3[size=;font-size:10.5000pt,10.5000pt] GB#7w82  
[size=;font-size:10.5000pt,10.5000pt]    QVector<int> correct;       // 正确答案[size=;font-size:10.5000pt,10.5000pt] E~B LY{3:  
[size=;font-size:10.5000pt,10.5000pt]  ZM"t.  
[size=;font-size:10.5000pt,10.5000pt]    int timeID;                 // 定时器[size=;font-size:10.5000pt,10.5000pt] B-RaAiE@  
[size=;font-size:10.5000pt,10.5000pt]    int num;[size=;font-size:10.5000pt,10.5000pt] t?\osPL  
[size=;font-size:10.5000pt,10.5000pt]    int count;[size=;font-size:10.5000pt,10.5000pt] 5q\]]LV>  
[size=;font-size:10.5000pt,10.5000pt] hYLu   
[size=;font-size:10.5000pt,10.5000pt]};[size=;font-size:10.5000pt,10.5000pt]
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
批量上传需要先选择文件,再选择上传
 
验证问题: 46 + 49 = ?
上一个 下一个