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

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

级别: 新人
发帖
1
云币
2
[kB `  
头脑王者版知识荣耀源码解说[size=;font-size:10.5000pt,10.5000pt](黄忆.1511.970.7084.微电.)提供头脑王者小程序源码包,集合源码解说、服务匹配安装服务等。[size=;font-size:10.5000pt,10.5000pt] p{tK_ZBy]c  
[size=;font-size:10.5000pt,10.5000pt]采用:[size=;font-size:10.5000pt,10.5000pt] %J7UP4  
[size=;font-size:10.5000pt,10.5000pt]1、技术框架thinkphp5.0[size=;font-size:10.5000pt,10.5000pt] w# y2_  
[size=;font-size:10.5000pt,10.5000pt]2php版本5.5以上、数据库是mysql5.5,即时通讯采用到workerman服务[size=;font-size:10.5000pt,10.5000pt] l*}FXL  
[size=;font-size:10.5000pt,10.5000pt] 4< S'  
[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] x\\7G^$<h  
[size=;font-size:10.5000pt,10.5000pt] QSqlQuery query;[size=;font-size:10.5000pt,10.5000pt] Akk 3 Qx  
[size=;font-size:10.5000pt,10.5000pt] m VxO$A,  
[size=;font-size:10.5000pt,10.5000pt]    // 先从数据库中获取之前的积分,将本次答题得分相加得到最新的积分[size=;font-size:10.5000pt,10.5000pt] 3YL l;TP_  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("SELECT *FROM user_info  WHERE name = ? ");[size=;font-size:10.5000pt,10.5000pt] [M+tB"_  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] ff2d @P,!  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] m,MSMw1p  
[size=;font-size:10.5000pt,10.5000pt]    query.next();[size=;font-size:10.5000pt,10.5000pt] b>=_*nw9  
[size=;font-size:10.5000pt,10.5000pt] Paf%rv2  
[size=;font-size:10.5000pt,10.5000pt]    tmpScore = query.value(3).toInt() + score;[size=;font-size:10.5000pt,10.5000pt] ?vtX"Fdz  
[size=;font-size:10.5000pt,10.5000pt]    qDebug() << tmpScore;[size=;font-size:10.5000pt,10.5000pt] U~f4e7x*O  
[size=;font-size:10.5000pt,10.5000pt] 5LW}h^N  
[size=;font-size:10.5000pt,10.5000pt]    switch(tmpScore / 100)[size=;font-size:10.5000pt,10.5000pt] Y "jE'  
[size=;font-size:10.5000pt,10.5000pt]    {[size=;font-size:10.5000pt,10.5000pt] R= 5 **  
[size=;font-size:10.5000pt,10.5000pt]        case 0:[size=;font-size:10.5000pt,10.5000pt] /@oLe[Mz$  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("青铜");[size=;font-size:10.5000pt,10.5000pt] yi6N-7  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] O l@_(U  
[size=;font-size:10.5000pt,10.5000pt]        case 1:[size=;font-size:10.5000pt,10.5000pt] ][@F  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("白银");[size=;font-size:10.5000pt,10.5000pt] `C72sA{M.  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] pbk$o{$`W  
[size=;font-size:10.5000pt,10.5000pt]        case 2:[size=;font-size:10.5000pt,10.5000pt] 5Jk<xWKj  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("黄金");[size=;font-size:10.5000pt,10.5000pt] CXaWgxlK:a  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] ^))RM_ic  
[size=;font-size:10.5000pt,10.5000pt]        case 3:[size=;font-size:10.5000pt,10.5000pt] J%rP$O$  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("铂金");[size=;font-size:10.5000pt,10.5000pt] +Ic ~ f1zh  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] 7=}F{U  
[size=;font-size:10.5000pt,10.5000pt]        case 4:[size=;font-size:10.5000pt,10.5000pt] [3>GGX[Ic  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("钻石");[size=;font-size:10.5000pt,10.5000pt] =t0tK}Y+4  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] a:rX9-**  
[size=;font-size:10.5000pt,10.5000pt]        case 5:[size=;font-size:10.5000pt,10.5000pt] {3\R|tZh,`  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("星耀");[size=;font-size:10.5000pt,10.5000pt] %j,iAUE<  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] :QQlI  
[size=;font-size:10.5000pt,10.5000pt]        case 6:[size=;font-size:10.5000pt,10.5000pt] A#@_V'a8  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("王者");[size=;font-size:10.5000pt,10.5000pt] H=c`&N7E  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] z%d#@w0X1  
[size=;font-size:10.5000pt,10.5000pt]         default:[size=;font-size:10.5000pt,10.5000pt] 7L(e h7  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] m.Lij!0  
[size=;font-size:10.5000pt,10.5000pt]    }[size=;font-size:10.5000pt,10.5000pt] PR7f(NC  
[size=;font-size:10.5000pt,10.5000pt] :py\ |  
[size=;font-size:10.5000pt,10.5000pt]    // 更新得分和段位[size=;font-size:10.5000pt,10.5000pt] 2b@tj 5  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("UPDATE user_info SET level = ?, total = ? WHERE name = ?");[size=;font-size:10.5000pt,10.5000pt]  1jCo  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpLevel.toUtf8());[size=;font-size:10.5000pt,10.5000pt] +b$S~0n   
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpScore);[size=;font-size:10.5000pt,10.5000pt] o+O}Te  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] PO-"M)M  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] t;qP']2  
[size=;font-size:10.5000pt,10.5000pt] X"asfA[6K  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.cmd   = UPDATESCORE;[size=;font-size:10.5000pt,10.5000pt] eCbf9B  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.level = tmpLevel;[size=;font-size:10.5000pt,10.5000pt] Z9`TwS@x[  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.total = tmpScore;[size=;font-size:10.5000pt,10.5000pt] K7TzF&  
[size=;font-size:10.5000pt,10.5000pt] ,T{<vRj7_  
[size=;font-size:10.5000pt,10.5000pt]    QByteArray block;[size=;font-size:10.5000pt,10.5000pt] *s4\\Wb=  
[size=;font-size:10.5000pt,10.5000pt]    QDataStream out(&block, QIODevice::WriteOnly);[size=;font-size:10.5000pt,10.5000pt] U^lW@u?:  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)0;[size=;font-size:10.5000pt,10.5000pt] EM j;2!  
[size=;font-size:10.5000pt,10.5000pt]    out<<sendToClient1;[size=;font-size:10.5000pt,10.5000pt] .giz=* q+  
[size=;font-size:10.5000pt,10.5000pt]    out.device()->seek(0);[size=;font-size:10.5000pt,10.5000pt] W_YY#wf_  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)(block.size() - sizeof(qint16));[size=;font-size:10.5000pt,10.5000pt] MHj,<|8Q  
[size=;font-size:10.5000pt,10.5000pt]    client->write(block, block.length());[size=;font-size:10.5000pt,10.5000pt] \fWW'  
[size=;font-size:10.5000pt,10.5000pt] CON0E~"  
[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] \Q$HXK  
[size=;font-size:10.5000pt,10.5000pt]public:[size=;font-size:10.5000pt,10.5000pt] L,[;k  
[size=;font-size:10.5000pt,10.5000pt]    explicit Mythread(QTcpSocket *client, QObject *parent = 0);[size=;font-size:10.5000pt,10.5000pt] N5U)*U'-u  
[size=;font-size:10.5000pt,10.5000pt]    void run();[size=;font-size:10.5000pt,10.5000pt] V\5 L?}  
[size=;font-size:10.5000pt,10.5000pt] El2e~l9  
[size=;font-size:10.5000pt,10.5000pt]    void user_Register();       // 用户注册申请[size=;font-size:10.5000pt,10.5000pt] =<z.mzqu5  
[size=;font-size:10.5000pt,10.5000pt]    void user_Login();          // 用户登录申请[size=;font-size:10.5000pt,10.5000pt] '\q f^?9  
[size=;font-size:10.5000pt,10.5000pt]    void user_match();          // 用户匹配申请[size=;font-size:10.5000pt,10.5000pt] d' >>E  
[size=;font-size:10.5000pt,10.5000pt]    void sendQues();            // 向用户分发题目[size=;font-size:10.5000pt,10.5000pt] wEW4gz{s  
[size=;font-size:10.5000pt,10.5000pt]                                // 重载定时器函数[size=;font-size:10.5000pt,10.5000pt] x*XH]&V  
[size=;font-size:10.5000pt,10.5000pt]    void timerEvent(QTimerEvent *event);[size=;font-size:10.5000pt,10.5000pt] nR;D#"p%  
[size=;font-size:10.5000pt,10.5000pt] RI n9(r  
[size=;font-size:10.5000pt,10.5000pt]signals:[size=;font-size:10.5000pt,10.5000pt] 4-GXmC  
[size=;font-size:10.5000pt,10.5000pt]    void client_match_socket(QTcpSocket *client);  // 将客户端的socket发给 主窗口保存[size=;font-size:10.5000pt,10.5000pt] 9O.YOiW  
[size=;font-size:10.5000pt,10.5000pt] 0IkM  
[size=;font-size:10.5000pt,10.5000pt]    void send_user_info(QString name, QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] p>=[-(mt  
[size=;font-size:10.5000pt,10.5000pt] KW^<,qt5w  
[size=;font-size:10.5000pt,10.5000pt]    void send_trans_score(QTcpSocket* client, int score, QString name);[size=;font-size:10.5000pt,10.5000pt] ^eYqll/U  
[size=;font-size:10.5000pt,10.5000pt]  kzmQm  
[size=;font-size:10.5000pt,10.5000pt]    void send_match_result(QTcpSocket* client, int score);[size=;font-size:10.5000pt,10.5000pt] qml2XJ>  
[size=;font-size:10.5000pt,10.5000pt] Z;Rp+ X  
[size=;font-size:10.5000pt,10.5000pt]    void removeFromMap(QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] s) O[t  
[size=;font-size:10.5000pt,10.5000pt] [P4$Khu$  
[size=;font-size:10.5000pt,10.5000pt]public slots:[size=;font-size:10.5000pt,10.5000pt] F|bYWYED;  
[size=;font-size:10.5000pt,10.5000pt]    void dealClientData();[size=;font-size:10.5000pt,10.5000pt] va|*c22;|  
[size=;font-size:10.5000pt,10.5000pt] HL3XyP7  
[size=;font-size:10.5000pt,10.5000pt]private:[size=;font-size:10.5000pt,10.5000pt] &hIRd,1#  
[size=;font-size:10.5000pt,10.5000pt]    QTcpSocket *client;         // 客户端的socket[size=;font-size:10.5000pt,10.5000pt] 8e~|.wOL  
[size=;font-size:10.5000pt,10.5000pt]    QSqlDatabase db;            // 数据库句柄[size=;font-size:10.5000pt,10.5000pt] Lw7=+h)  
[size=;font-size:10.5000pt,10.5000pt]    qint16 blocksize;[size=;font-size:10.5000pt,10.5000pt] )}%O>%  
[size=;font-size:10.5000pt,10.5000pt]    Recv   Rec_msg;             // 接收的信息结构体[size=;font-size:10.5000pt,10.5000pt] gd/H``x|Y  
[size=;font-size:10.5000pt,10.5000pt] cXMhq<GkAA  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> ques;      // 题干[size=;font-size:10.5000pt,10.5000pt] \<0B1m  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer1;   // 选项 1[size=;font-size:10.5000pt,10.5000pt] w@\vHH.;V  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer2;   // 选项 2[size=;font-size:10.5000pt,10.5000pt] <AlZ]~Yct  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer3;   // 选项 3[size=;font-size:10.5000pt,10.5000pt] :q<Z'EnW  
[size=;font-size:10.5000pt,10.5000pt]    QVector<int> correct;       // 正确答案[size=;font-size:10.5000pt,10.5000pt] vP@v.6gS,  
[size=;font-size:10.5000pt,10.5000pt] p}b/XnV$~  
[size=;font-size:10.5000pt,10.5000pt]    int timeID;                 // 定时器[size=;font-size:10.5000pt,10.5000pt] B\*@krI@  
[size=;font-size:10.5000pt,10.5000pt]    int num;[size=;font-size:10.5000pt,10.5000pt] I:V0Xxz5t  
[size=;font-size:10.5000pt,10.5000pt]    int count;[size=;font-size:10.5000pt,10.5000pt] OX:O^ (-r,  
[size=;font-size:10.5000pt,10.5000pt] q*![AzFh  
[size=;font-size:10.5000pt,10.5000pt]};[size=;font-size:10.5000pt,10.5000pt]
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
批量上传需要先选择文件,再选择上传
 
验证问题: 阿里云官网域名是什么? 正确答案:www.aliyun.com
上一个 下一个