MCPcopy Create free account
hub / github.com/9miao/CrossApp / buttonCallBack

Method buttonCallBack

samples/Test/Classes/CDNewsViewController.cpp:193–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void 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
218void CDNewsViewController::onRequestFinished(const HttpResponseStatus& status, const CSJson::Value& json)
219{

Callers

nothing calls this directly

Calls 7

getViewMethod · 0.80
send_postMethod · 0.80
setTargetOnCancelMethod · 0.80
CCLogFunction · 0.50
removeSubviewMethod · 0.45
c_strMethod · 0.45
insertSubviewMethod · 0.45

Tested by

no test coverage detected