| 191 | } |
| 192 | |
| 193 | void CDNewsViewController::buttonCallBack(CAControl* btn,DPoint point) |
| 194 | { |
| 195 | this->getView()->removeSubview(p_alertView); |
| 196 | p_alertView = NULL; |
| 197 | std::map<std::string, |
| 198 | std::string> key_value; |
| 199 | key_value["tag"] = menuTag[urlID]; |
| 200 | key_value["page"]= "1"; |
| 201 | key_value["limit"]= "20"; |
| 202 | key_value["appid"]="10000"; |
| 203 | key_value["sign_method"]="md5"; |
| 204 | string tempSign = getSign(key_value); |
| 205 | CCLog("sign===%s",tempSign.c_str()); |
| 206 | key_value["sign"] = tempSign; |
| 207 | string tempUrl = "http://api.9miao.com/news/"; |
| 208 | CommonHttpManager::getInstance()->send_post(tempUrl, key_value, this, |
| 209 | CommonHttpJson_selector(CDNewsViewController::onRequestFinished)); |
| 210 | { |
| 211 | p_pLoading = CAActivityIndicatorView::createWithLayout(DLayoutFill); |
| 212 | this->getView()->insertSubview(p_pLoading, CAWindowZOderTop); |
| 213 | p_pLoading->setLoadingMinTime(0.5f); |
| 214 | p_pLoading->setTargetOnCancel(this, callfunc_selector(CDNewsViewController::initNewsTableView)); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void CDNewsViewController::onRequestFinished(const HttpResponseStatus& status, const CSJson::Value& json) |
| 219 | { |
nothing calls this directly
no test coverage detected