|
- -- 未满18岁拒绝进入
-
- local ShiMingRejectView = class("ShiMingRejectView", cc.UIView)
-
- function ShiMingRejectView:ctor()
- ShiMingRejectView.super.ctor(self);
-
- local ui = loadUI("res/ui/ui_dating/ui_shiming_reject.ui")
- self.ui = ui
- self:addChild(ui)
- end
-
-
- function ShiMingRejectView:onEnter()
- ShiMingRejectView.super.onEnter(self)
- self.ui.Items.Button_Exit:registerClick(handler(self , self.onClickExit))
- self.ui.Items.Button_KeFu:registerClick(handler(self , self.onButtonClickKeFu));
- end
-
- function ShiMingRejectView:onButtonClickKeFu()
- playBtnEffect()
- local tt =
- {
- action = "collecturl.getDataByUid";
- app_id = getAppId(); --应用id
- };
- local phpUrl = getGlobalPhpUrl()
- httpPost(phpUrl, tt, function(status, response)
- if status == "successed" then
- local data = json.decode(response)
- if data.code == 200 and data.result ~= null then
- app.plugin:callUrl(data.result.kefuurl)
- end
- else
- local url = "http://cs.zxtycest.com/addons/kefu?gameid=47"
- app.plugin:callUrl(url)
- end
- end)
- end
-
- -- 退出游戏
- function ShiMingRejectView:onClickExit()
- app.plugin:logout();
- end
-
-
- return ShiMingRejectView;
|