Exemplo n.º 1
0
    /// <summary>
    /// 根据checkId,是否覆盖,进行收藏
    /// </summary>
    public IEnumerator CollectPost(int checkId, string cover)
    {
        WWWForm form = new WWWForm();

        form.AddField("checkId", checkId);
        form.AddField("cover", cover);

        WWW www = new WWW(Constant.BaseUrl + uri, form);

        yield return(www);

        if (www.error != null)
        {
            Debug.Log(www.error);
            yield return(null);
        }
        else
        {
            CollectJson collectJson = JsonTool.JsonToClass <CollectJson> (www.text);

            if (collectJson == null)
            {
                yield break;
            }

            Debug.Log(www.text);

            if (collectJson.status == Constant.Status_OK)
            {
                IsCollectSucceess = true;
            }

            result = collectJson.resp;

            IsDone = true;
        }
    }
Exemplo n.º 2
0
 public void Restart()
 {
     IsDone            = false;
     IsCollectSucceess = false;
     result            = null;
 }