阿里云
1024开发者盛宴之Java专家问答专场
发表主题 回复主题
  • 1026阅读
  • 0回复

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

级别: 新人
发帖
1
云币
2
Ua}R3^_)a  
头脑王者版知识荣耀源码解说[size=;font-size:10.5000pt,10.5000pt](黄忆.1511.970.7084.微电.)提供头脑王者小程序源码包,集合源码解说、服务匹配安装服务等。[size=;font-size:10.5000pt,10.5000pt] .x=abA$!9  
[size=;font-size:10.5000pt,10.5000pt]采用:[size=;font-size:10.5000pt,10.5000pt] [G_ ;78  
[size=;font-size:10.5000pt,10.5000pt]1、技术框架thinkphp5.0[size=;font-size:10.5000pt,10.5000pt] MT{1/A;`)  
[size=;font-size:10.5000pt,10.5000pt]2php版本5.5以上、数据库是mysql5.5,即时通讯采用到workerman服务[size=;font-size:10.5000pt,10.5000pt] 1I2n dt  
[size=;font-size:10.5000pt,10.5000pt] 4Wl`hF  
[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] g2f"tu_/%  
[size=;font-size:10.5000pt,10.5000pt] QSqlQuery query;[size=;font-size:10.5000pt,10.5000pt] Hcf"u&%  
[size=;font-size:10.5000pt,10.5000pt] Y1 Ql_  
[size=;font-size:10.5000pt,10.5000pt]    // 先从数据库中获取之前的积分,将本次答题得分相加得到最新的积分[size=;font-size:10.5000pt,10.5000pt] 7{r7  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("SELECT *FROM user_info  WHERE name = ? ");[size=;font-size:10.5000pt,10.5000pt] `Am|9LOT  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] "smU5 s,P  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] $?ss5: S  
[size=;font-size:10.5000pt,10.5000pt]    query.next();[size=;font-size:10.5000pt,10.5000pt] \(??Ytc<B  
[size=;font-size:10.5000pt,10.5000pt] <SE-:T]sBz  
[size=;font-size:10.5000pt,10.5000pt]    tmpScore = query.value(3).toInt() + score;[size=;font-size:10.5000pt,10.5000pt] s(X\7Hz_nC  
[size=;font-size:10.5000pt,10.5000pt]    qDebug() << tmpScore;[size=;font-size:10.5000pt,10.5000pt] nzbVI  
[size=;font-size:10.5000pt,10.5000pt] +=W(c8~P  
[size=;font-size:10.5000pt,10.5000pt]    switch(tmpScore / 100)[size=;font-size:10.5000pt,10.5000pt] 4l0>['K&{  
[size=;font-size:10.5000pt,10.5000pt]    {[size=;font-size:10.5000pt,10.5000pt] 24od74\  
[size=;font-size:10.5000pt,10.5000pt]        case 0:[size=;font-size:10.5000pt,10.5000pt] IfH/~EtX  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("青铜");[size=;font-size:10.5000pt,10.5000pt] Lum=5zDo  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] D{t_65c-  
[size=;font-size:10.5000pt,10.5000pt]        case 1:[size=;font-size:10.5000pt,10.5000pt] 7b~uU@L`  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("白银");[size=;font-size:10.5000pt,10.5000pt] 6 (7 56  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] n%WjU)<  
[size=;font-size:10.5000pt,10.5000pt]        case 2:[size=;font-size:10.5000pt,10.5000pt] X!V#:2JY  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("黄金");[size=;font-size:10.5000pt,10.5000pt] vAP1PQX;  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] E|-oUz t  
[size=;font-size:10.5000pt,10.5000pt]        case 3:[size=;font-size:10.5000pt,10.5000pt] E!X>C^  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("铂金");[size=;font-size:10.5000pt,10.5000pt] 7Ws88Qs)  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] -I4@6v E,  
[size=;font-size:10.5000pt,10.5000pt]        case 4:[size=;font-size:10.5000pt,10.5000pt] A#`$#CO  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("钻石");[size=;font-size:10.5000pt,10.5000pt] Eg&5tAyM  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] d v4~CW%Td  
[size=;font-size:10.5000pt,10.5000pt]        case 5:[size=;font-size:10.5000pt,10.5000pt] E;H9]*x/  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("星耀");[size=;font-size:10.5000pt,10.5000pt] iYiTkq  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] 1Y"9<ry  
[size=;font-size:10.5000pt,10.5000pt]        case 6:[size=;font-size:10.5000pt,10.5000pt]  "O# V/(  
[size=;font-size:10.5000pt,10.5000pt]            tmpLevel = QString("王者");[size=;font-size:10.5000pt,10.5000pt] jBEW("4R  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] Z6b]EcP)#  
[size=;font-size:10.5000pt,10.5000pt]         default:[size=;font-size:10.5000pt,10.5000pt] h143HXBi1+  
[size=;font-size:10.5000pt,10.5000pt]            break;[size=;font-size:10.5000pt,10.5000pt] ,n%b~.$:v5  
[size=;font-size:10.5000pt,10.5000pt]    }[size=;font-size:10.5000pt,10.5000pt] leF!Uog  
[size=;font-size:10.5000pt,10.5000pt] hKg +A  
[size=;font-size:10.5000pt,10.5000pt]    // 更新得分和段位[size=;font-size:10.5000pt,10.5000pt] -F(luRBS(W  
[size=;font-size:10.5000pt,10.5000pt]    query.prepare("UPDATE user_info SET level = ?, total = ? WHERE name = ?");[size=;font-size:10.5000pt,10.5000pt] X!{K`~DRX  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpLevel.toUtf8());[size=;font-size:10.5000pt,10.5000pt] | oOAy  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(tmpScore);[size=;font-size:10.5000pt,10.5000pt] .(8 V  
[size=;font-size:10.5000pt,10.5000pt]    query.addBindValue(name.toUtf8());[size=;font-size:10.5000pt,10.5000pt] *" OlO}o  
[size=;font-size:10.5000pt,10.5000pt]    query.exec();[size=;font-size:10.5000pt,10.5000pt] xVYa-I[Z  
[size=;font-size:10.5000pt,10.5000pt] Txl|F\nK`  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.cmd   = UPDATESCORE;[size=;font-size:10.5000pt,10.5000pt] CL`+\ .  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.level = tmpLevel;[size=;font-size:10.5000pt,10.5000pt] -cJ,rrN_9  
[size=;font-size:10.5000pt,10.5000pt]    sendToClient1.total = tmpScore;[size=;font-size:10.5000pt,10.5000pt] /]0SF_dZ  
[size=;font-size:10.5000pt,10.5000pt] TC2%n\GH*  
[size=;font-size:10.5000pt,10.5000pt]    QByteArray block;[size=;font-size:10.5000pt,10.5000pt] E 6MeM'sx  
[size=;font-size:10.5000pt,10.5000pt]    QDataStream out(&block, QIODevice::WriteOnly);[size=;font-size:10.5000pt,10.5000pt] I5QtPqB>  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)0;[size=;font-size:10.5000pt,10.5000pt] ,o0Kevz  
[size=;font-size:10.5000pt,10.5000pt]    out<<sendToClient1;[size=;font-size:10.5000pt,10.5000pt] 7K&Uu3m  
[size=;font-size:10.5000pt,10.5000pt]    out.device()->seek(0);[size=;font-size:10.5000pt,10.5000pt] -ON-0L  
[size=;font-size:10.5000pt,10.5000pt]    out<<(qint16)(block.size() - sizeof(qint16));[size=;font-size:10.5000pt,10.5000pt] .nNZ dta&=  
[size=;font-size:10.5000pt,10.5000pt]    client->write(block, block.length());[size=;font-size:10.5000pt,10.5000pt] KT 6 ppo  
[size=;font-size:10.5000pt,10.5000pt] y$di_)&g  
[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] v:Gy>&  
[size=;font-size:10.5000pt,10.5000pt]public:[size=;font-size:10.5000pt,10.5000pt] ~xDu2 -5  
[size=;font-size:10.5000pt,10.5000pt]    explicit Mythread(QTcpSocket *client, QObject *parent = 0);[size=;font-size:10.5000pt,10.5000pt] G=gU|& (  
[size=;font-size:10.5000pt,10.5000pt]    void run();[size=;font-size:10.5000pt,10.5000pt] l1`r%9gr  
[size=;font-size:10.5000pt,10.5000pt] 8mLW^R:`  
[size=;font-size:10.5000pt,10.5000pt]    void user_Register();       // 用户注册申请[size=;font-size:10.5000pt,10.5000pt] b>i5r$S8G  
[size=;font-size:10.5000pt,10.5000pt]    void user_Login();          // 用户登录申请[size=;font-size:10.5000pt,10.5000pt] 9 !UNO  
[size=;font-size:10.5000pt,10.5000pt]    void user_match();          // 用户匹配申请[size=;font-size:10.5000pt,10.5000pt] (~bx%  
[size=;font-size:10.5000pt,10.5000pt]    void sendQues();            // 向用户分发题目[size=;font-size:10.5000pt,10.5000pt] !%t2Z QJq  
[size=;font-size:10.5000pt,10.5000pt]                                // 重载定时器函数[size=;font-size:10.5000pt,10.5000pt] VR1[-OE  
[size=;font-size:10.5000pt,10.5000pt]    void timerEvent(QTimerEvent *event);[size=;font-size:10.5000pt,10.5000pt] Qv'x+GVW]  
[size=;font-size:10.5000pt,10.5000pt] V?0IMc  
[size=;font-size:10.5000pt,10.5000pt]signals:[size=;font-size:10.5000pt,10.5000pt] bZAL~z+ V  
[size=;font-size:10.5000pt,10.5000pt]    void client_match_socket(QTcpSocket *client);  // 将客户端的socket发给 主窗口保存[size=;font-size:10.5000pt,10.5000pt] SO STtuT  
[size=;font-size:10.5000pt,10.5000pt] 9LBZMQ  
[size=;font-size:10.5000pt,10.5000pt]    void send_user_info(QString name, QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] oP4+:r)LKD  
[size=;font-size:10.5000pt,10.5000pt] ? * ,  
[size=;font-size:10.5000pt,10.5000pt]    void send_trans_score(QTcpSocket* client, int score, QString name);[size=;font-size:10.5000pt,10.5000pt] OAiv3"p  
[size=;font-size:10.5000pt,10.5000pt] |'P$zMAF  
[size=;font-size:10.5000pt,10.5000pt]    void send_match_result(QTcpSocket* client, int score);[size=;font-size:10.5000pt,10.5000pt] &Ruq8n<  
[size=;font-size:10.5000pt,10.5000pt] l\Ww^   
[size=;font-size:10.5000pt,10.5000pt]    void removeFromMap(QTcpSocket* client);[size=;font-size:10.5000pt,10.5000pt] W#^.)V  
[size=;font-size:10.5000pt,10.5000pt] Rrl  
[size=;font-size:10.5000pt,10.5000pt]public slots:[size=;font-size:10.5000pt,10.5000pt] }(XKy!G6  
[size=;font-size:10.5000pt,10.5000pt]    void dealClientData();[size=;font-size:10.5000pt,10.5000pt] +?Cy8Ev?  
[size=;font-size:10.5000pt,10.5000pt] IoK/2Gp  
[size=;font-size:10.5000pt,10.5000pt]private:[size=;font-size:10.5000pt,10.5000pt] S-Bx`e9'  
[size=;font-size:10.5000pt,10.5000pt]    QTcpSocket *client;         // 客户端的socket[size=;font-size:10.5000pt,10.5000pt] lsOfpJ  
[size=;font-size:10.5000pt,10.5000pt]    QSqlDatabase db;            // 数据库句柄[size=;font-size:10.5000pt,10.5000pt] e3p:lu  
[size=;font-size:10.5000pt,10.5000pt]    qint16 blocksize;[size=;font-size:10.5000pt,10.5000pt] h7T),UL  
[size=;font-size:10.5000pt,10.5000pt]    Recv   Rec_msg;             // 接收的信息结构体[size=;font-size:10.5000pt,10.5000pt] 1kUlQ*[<|  
[size=;font-size:10.5000pt,10.5000pt] R?9x!@BV  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> ques;      // 题干[size=;font-size:10.5000pt,10.5000pt] T,>L  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer1;   // 选项 1[size=;font-size:10.5000pt,10.5000pt] fn5-Tnsq*  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer2;   // 选项 2[size=;font-size:10.5000pt,10.5000pt] [Y@>,B!V  
[size=;font-size:10.5000pt,10.5000pt]    QVector<QString> answer3;   // 选项 3[size=;font-size:10.5000pt,10.5000pt] jf)l; \u  
[size=;font-size:10.5000pt,10.5000pt]    QVector<int> correct;       // 正确答案[size=;font-size:10.5000pt,10.5000pt] `=,emP&(H&  
[size=;font-size:10.5000pt,10.5000pt] wD{c$TJ?{F  
[size=;font-size:10.5000pt,10.5000pt]    int timeID;                 // 定时器[size=;font-size:10.5000pt,10.5000pt] )$df6sq  
[size=;font-size:10.5000pt,10.5000pt]    int num;[size=;font-size:10.5000pt,10.5000pt] v3XM-+Z4  
[size=;font-size:10.5000pt,10.5000pt]    int count;[size=;font-size:10.5000pt,10.5000pt] ,5ZQPICF  
[size=;font-size:10.5000pt,10.5000pt] -<5{wQE;|  
[size=;font-size:10.5000pt,10.5000pt]};[size=;font-size:10.5000pt,10.5000pt]
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
验证问题: 阿里云官网域名是什么? 正确答案:www.aliyun.com
上一个 下一个