123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /********************************************************************************
- ** Company: YC
- ** auth: CaoTing
- ** date: 2021\5
- ** desc: 删除房间
- *******************************************************************************/
- namespace Studio.Scripts.HttpMessage
- {
- public class CreateRoomMessage : BaseHttpMessage
- {
- public CreateRoomBody body;
- public string token
- {
- set
- {
- headers["token"] = value;
- }
- }
- public CreateRoomMessage()
- {
- messageModuleType = MessageModuleType.Room;
- methodType = HttpMethodType.Post;
- _path = "v1/createRoom";
- headers = new Dictionary<string, string>();
- headers.Add("Content-Type", "application/json");
- headers.Add("token", "");
- _wwwForm = null;
- }
- public override WWWForm wwwForm
- {
- get
- {
- if (_wwwForm == null)
- {
- _wwwForm = GetWWWFrom<CreateRoomBody>(body);
- }
- return _wwwForm;
- }
- }
- public override string ToBodyString()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(body);
- }
- }
- public struct CreateRoomBody
- {
- /// <summary>
- /// 房间类型1 是个人房间 2是公共房间
- /// </summary>
- public int type;
- /// <summary>
- /// 房间名称
- /// </summary>
- public string roomName;
- /// <summary>
- /// 房间信息说明
- /// </summary>
- public string roomExplain;
- /// <summary>
- /// 房间密码
- /// </summary>
- public string roomPassword;
- /// <summary>
- /// 公开房间类型 1 是只能浏览 2是 全功能
- /// </summary>
- public int roomType;
- /// <summary>
- /// 人数上限
- /// </summary>
- public int maxMember;
- }
- }
|