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

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

级别: 新人
发帖
1
云币
2
KG=h!]Meq  
头脑王者版知识荣耀源码解说[size=;font-size:10.5000pt,10.5000pt](黄忆.1511.970.7084.微电.)提供头脑王者小程序源码包,集合源码解说、服务匹配安装服务等。[size=;font-size:10.5000pt,10.5000pt] +X#JCLD  
[size=;font-size:10.5000pt,10.5000pt]采用:[size=;font-size:10.5000pt,10.5000pt] [Vzp D 4  
[size=;font-size:10.5000pt,10.5000pt]1、技术框架thinkphp5.0[size=;font-size:10.5000pt,10.5000pt] 5'*v-l,[  
[size=;font-size:10.5000pt,10.5000pt]2php版本5.5以上、数据库是mysql5.5,即时通讯采用到workerman服务[size=;font-size:10.5000pt,10.5000pt] K)=<hL  
[size=;font-size:10.5000pt,10.5000pt] \-i5b  
[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] a$-:F$z  
[size=;font-size:10.5000pt,10.5000pt] QSqlQuery query;[size=;font-size:10.5000pt,10.5000pt] F6,[!.wl  
[size=;font-size:10.5000pt,10.5000pt] Y_S>S( 0  
[size=;font-size:10.5000pt,10.5000pt]    // 先从数据库中获取之前的积分,将本次答题得分相加得到最新的积分[size=;font-size:10.5000pt,10.5000pt] %+0 7>/  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("SELECT *FROM user_info  WHERE name = ? ");[size=;font-size:10.5000pt,10.5000pt] jr,j1K@_t  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] 1HPYW7jk@"  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] Y;n;7M<F  
[size=;font-size:10.5000pt,10.5000pt]    query.next();[size=;font-size:10.5000pt,10.5000pt] fdk]i/*)  
[size=;font-size:10.5000pt,10.5000pt] 1VRe xp  
[size=;font-size:10.5000pt,10.5000pt]    tmpScore = query.value(3).toInt() + score;[size=;font-size:10.5000pt,10.5000pt] -SO`wL NV  
[size=;font-size:10.5000pt,10.5000pt]    qDebug() << tmpScore;[size=;font-size:10.5000pt,10.5000pt] j6@5"wx  
[size=;font-size:10.5000pt,10.5000pt] TX/Ng+v S  
[size=;font-size:10.5000pt,10.5000pt]    switch(tmpScore / 100)[size=;font-size:10.5000pt,10.5000pt] GO3F[ l  
[size=;font-size:10.5000pt,10.5000pt]    {[size=;font-size:10.5000pt,10.5000pt] ?7n(6kmj4Q  
[size=;font-size:10.5000pt,10.5000pt]        case 0:[size=;font-size:10.5000pt,10.5000pt] GBMCw  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("青铜");[size=;font-size:10.5000pt,10.5000pt] >d1gVBhk  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] \r4QS  
[size=;font-size:10.5000pt,10.5000pt]        case 1:[size=;font-size:10.5000pt,10.5000pt] GP|G[  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("白银");[size=;font-size:10.5000pt,10.5000pt] gpt98:w:  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] C B&$tDi  
[size=;font-size:10.5000pt,10.5000pt]        case 2:[size=;font-size:10.5000pt,10.5000pt] AiMD"7 )c  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("黄金");[size=;font-size:10.5000pt,10.5000pt] I"AgRa  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] ;ndsq[k>  
[size=;font-size:10.5000pt,10.5000pt]        case 3:[size=;font-size:10.5000pt,10.5000pt] r0 mXRZC  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("铂金");[size=;font-size:10.5000pt,10.5000pt] _@-D/g  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] L!fiW`>0G  
[size=;font-size:10.5000pt,10.5000pt]        case 4:[size=;font-size:10.5000pt,10.5000pt] CY{`IZ  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("钻石");[size=;font-size:10.5000pt,10.5000pt] !+Ia#(  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt]  ^##tk  
[size=;font-size:10.5000pt,10.5000pt]        case 5:[size=;font-size:10.5000pt,10.5000pt] IYb%f T  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("星耀");[size=;font-size:10.5000pt,10.5000pt] 4O~E4" ]  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] Hjho!np  
[size=;font-size:10.5000pt,10.5000pt]        case 6:[size=;font-size:10.5000pt,10.5000pt] H ?ZlJ|/c  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("王者");[size=;font-size:10.5000pt,10.5000pt] =Tdh]0  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] 6L`{oSX!  
[size=;font-size:10.5000pt,10.5000pt]         default:[size=;font-size:10.5000pt,10.5000pt] qJ\tc\  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] +s(JutC  
[size=;font-size:10.5000pt,10.5000pt]    }[size=;font-size:10.5000pt,10.5000pt] ,VtrQb)Yf  
[size=;font-size:10.5000pt,10.5000pt] f(Hh(  
[size=;font-size:10.5000pt,10.5000pt]    // 更新得分和段位[size=;font-size:10.5000pt,10.5000pt] 2 d%j6D  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("UPDATE user_info SET level = ?, total = ? WHERE name = ?");[size=;font-size:10.5000pt,10.5000pt] SHM ?32'  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpLevel.toUtf8());[size=;font-size:10.5000pt,10.5000pt] $M `%A  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpScore);[size=;font-size:10.5000pt,10.5000pt] A(!nT=0o  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] {u/G!{N$  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] 1r %~Rm  
[size=;font-size:10.5000pt,10.5000pt] Yn0l}=, n  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.cmd   = UPDATESCORE;[size=;font-size:10.5000pt,10.5000pt] A..,.   
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.level = tmpLevel;[size=;font-size:10.5000pt,10.5000pt] co <ATx  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.total = tmpScore;[size=;font-size:10.5000pt,10.5000pt] m~upTQz  
[size=;font-size:10.5000pt,10.5000pt] ]}K\&ho2  
[size=;font-size:10.5000pt,10.5000pt]    QByteArray block;[size=;font-size:10.5000pt,10.5000pt] Sk*-B@!S  
[size=;font-size:10.5000pt,10.5000pt]    QDataStream out(&block, QIODevice::WriteOnly);[size=;font-size:10.5000pt,10.5000pt] bo;;\>k  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)0;[size=;font-size:10.5000pt,10.5000pt] [gZz'q&[)  
[size=;font-size:10.5000pt,10.5000pt]    out<<sendToClient1;[size=;font-size:10.5000pt,10.5000pt] j_r?4k  
[size=;font-size:10.5000pt,10.5000pt]    out.device()->seek(0);[size=;font-size:10.5000pt,10.5000pt] pP1|/f5n`  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)(block.size() - sizeof(qint16));[size=;font-size:10.5000pt,10.5000pt] dr25;L? B  
[size=;font-size:10.5000pt,10.5000pt]    client->write(block, block.length());[size=;font-size:10.5000pt,10.5000pt] bzI!;P1&  
[size=;font-size:10.5000pt,10.5000pt] 1pT v6  
[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] yQ^k%hHa  
[size=;font-size:10.5000pt,10.5000pt]public:[size=;font-size:10.5000pt,10.5000pt] [# X:!xcl  
[size=;font-size:10.5000pt,10.5000pt]    explicit Mythread(QTcpSocket *client, QObject *parent = 0);[size=;font-size:10.5000pt,10.5000pt] VxlK:*t`  
[size=;font-size:10.5000pt,10.5000pt]    void run();[size=;font-size:10.5000pt,10.5000pt] k>W5ts2+  
[size=;font-size:10.5000pt,10.5000pt] m\3r<*q6  
[size=;font-size:10.5000pt,10.5000pt]    void user_Register();       // 用户注册申请[size=;font-size:10.5000pt,10.5000pt] M 5mCG  
[size=;font-size:10.5000pt,10.5000pt]    void user_Login();          // 用户登录申请[size=;font-size:10.5000pt,10.5000pt] fx W,S  
[size=;font-size:10.5000pt,10.5000pt]    void user_match();          // 用户匹配申请[size=;font-size:10.5000pt,10.5000pt] [G(}`u8w"  
[size=;font-size:10.5000pt,10.5000pt]    void sendQues();            // 向用户分发题目[size=;font-size:10.5000pt,10.5000pt] lq4vX^S  
[size=;font-size:10.5000pt,10.5000pt]                                // 重载定时器函数[size=;font-size:10.5000pt,10.5000pt] --ED]S 8  
[size=;font-size:10.5000pt,10.5000pt]    void timerEvent(QTimerEvent *event);[size=;font-size:10.5000pt,10.5000pt] [1I>Bc&o*  
[size=;font-size:10.5000pt,10.5000pt] bzz{ p1e  
[size=;font-size:10.5000pt,10.5000pt]signals:[size=;font-size:10.5000pt,10.5000pt] mw^Di  
[size=;font-size:10.5000pt,10.5000pt]    void client_match_socket(QTcpSocket *client);  // 将客户端的socket发给 主窗口保存[size=;font-size:10.5000pt,10.5000pt] 6mawcK:7  
[size=;font-size:10.5000pt,10.5000pt] |FF"vRi8a7  
[size=;font-size:10.5000pt,10.5000pt]    void send_user_info(QString name, QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] ?q}XD c  
[size=;font-size:10.5000pt,10.5000pt] 'rT@r:6fn  
[size=;font-size:10.5000pt,10.5000pt]    void send_trans_score(QTcpSocket* client, int score, QString name);[size=;font-size:10.5000pt,10.5000pt] X >i`z  
[size=;font-size:10.5000pt,10.5000pt] oD5VE  
[size=;font-size:10.5000pt,10.5000pt]    void send_match_result(QTcpSocket* client, int score);[size=;font-size:10.5000pt,10.5000pt] gq$]jWtCD  
[size=;font-size:10.5000pt,10.5000pt] ZI<p%IQ   
[size=;font-size:10.5000pt,10.5000pt]    void removeFromMap(QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] |]qwD,eiH,  
[size=;font-size:10.5000pt,10.5000pt] "82<}D^;  
[size=;font-size:10.5000pt,10.5000pt]public slots:[size=;font-size:10.5000pt,10.5000pt] lX)RG*FlTC  
[size=;font-size:10.5000pt,10.5000pt]    void dealClientData();[size=;font-size:10.5000pt,10.5000pt] 4JF8S#8B  
[size=;font-size:10.5000pt,10.5000pt] 8vN}v3HV&  
[size=;font-size:10.5000pt,10.5000pt]private:[size=;font-size:10.5000pt,10.5000pt] V;b^b5yZ>  
[size=;font-size:10.5000pt,10.5000pt]    QTcpSocket *client;         // 客户端的socket[size=;font-size:10.5000pt,10.5000pt] D,aJ`PK~  
[size=;font-size:10.5000pt,10.5000pt]    QSqlDatabase db;            // 数据库句柄[size=;font-size:10.5000pt,10.5000pt] 5W0'r'{  
[size=;font-size:10.5000pt,10.5000pt]    qint16 blocksize;[size=;font-size:10.5000pt,10.5000pt] YNGG> ;L  
[size=;font-size:10.5000pt,10.5000pt]    Recv   Rec_msg;             // 接收的信息结构体[size=;font-size:10.5000pt,10.5000pt] Y,v8eOo45S  
[size=;font-size:10.5000pt,10.5000pt] Jm%hb ,  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> ques;      // 题干[size=;font-size:10.5000pt,10.5000pt] *{5L*\AZ  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer1;   // 选项 1[size=;font-size:10.5000pt,10.5000pt] d|,,,+fS  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer2;   // 选项 2[size=;font-size:10.5000pt,10.5000pt] Vt_NvPB`  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer3;   // 选项 3[size=;font-size:10.5000pt,10.5000pt] ;pU#3e+P8  
[size=;font-size:10.5000pt,10.5000pt]    QVector<int> correct;       // 正确答案[size=;font-size:10.5000pt,10.5000pt] SE0"25\_G  
[size=;font-size:10.5000pt,10.5000pt] Zi+>#kDV  
[size=;font-size:10.5000pt,10.5000pt]    int timeID;                 // 定时器[size=;font-size:10.5000pt,10.5000pt] 0:(`t~  
[size=;font-size:10.5000pt,10.5000pt]    int num;[size=;font-size:10.5000pt,10.5000pt] (n&Hjz,Fv  
[size=;font-size:10.5000pt,10.5000pt]    int count;[size=;font-size:10.5000pt,10.5000pt] oR.KtS$uh  
[size=;font-size:10.5000pt,10.5000pt] X&^8[,"  
[size=;font-size:10.5000pt,10.5000pt]};[size=;font-size:10.5000pt,10.5000pt]
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
上一个 下一个