public void StopScanning(PlayerCouponRequest info) { txt.text = info.code + "" + info.detail; if (info.code == "200") { txt.text = "扫描成功"; IsScanning = false; cameraTexture.gameObject.SetActive(false); } else { IsScanning = true; Debug.Log(info.detail); txt.text = info.detail; } }
private IEnumerator ExcuteFailCoupon(string _url, WWWForm _wForm, System.Action <PlayerCouponRequest> callback) { AndaUIManager.Instance.OpenWaitBoard(true); WWW postData = new WWW(_url, _wForm); yield return(postData); AndaUIManager.Instance.OpenWaitBoard(false); if (postData.error != null) { Debug.Log(postData.error); } else { PlayerCouponRequest result = JsonMapper.ToObject <PlayerCouponRequest>(postData.text); Debug.Log(postData.text); callback(result); } }
public void CheackBack(PlayerCouponRequest playerCoupon) { if (playerCoupon.code == "200") { var list = AndaPlayerCouponManager.Instance.GetPlayerCouponData(); if (list == null) { return; } var item = list.FirstOrDefault(o => o.applyIndex == playerCoupon.data.applyIndex); if (item == null) { return; } item.status = 2; if (playerCouponView == null) { return; } foreach (var m in playerCouponView.ItemList) { if (m.GetComponent <ItemInfo_PlayerCoupon>().playerCoupon.applyIndex == item.applyIndex) { m.GetComponent <ItemInfo_PlayerCoupon>().statusText.text = "状态:审核通过"; m.GetComponent <ItemInfo_PlayerCoupon>().applytimeText.text = "玩家申请时间:" + ConvertTool.UnixTimestampToDateTime(item.createTime).ToString("yyyy-MM-dd HH:mm:ss"); m.GetComponent <ItemInfo_PlayerCoupon>().operationtimeText.text = "商家回复时间:" + ConvertTool.UnixTimestampToDateTime(item.operationTime).ToString("yyyy-MM-dd HH:mm:ss"); m.GetComponent <ItemInfo_PlayerCoupon>().Bg.sprite = playerCouponView.sprite2; m.SetActive(false); } } if (playerCouponDetail != null) { playerCouponDetail.ShowButtonText(2); } } }