1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /********************************************************************************
- ** Company: YC
- ** auth: CaoTing
- ** date: 2021\5\21
- ** desc: 更新设置
- *******************************************************************************/
- namespace Studio.Scripts.HttpMessage
- {
- public class UpdateSettingsMessage : BaseHttpMessage
- {
- public UpdateSettingsBody body;
- public string token
- {
- set
- {
- headers["token"] = value;
- }
- }
- public UpdateSettingsMessage()
- {
- messageModuleType = MessageModuleType.Set;
- methodType = HttpMethodType.Post;
- _path = "v1/updateSettings";
- 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<UpdateSettingsBody>(body);
- }
- return _wwwForm;
- }
- }
- public override string ToBodyString()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(body);
- }
- }
- public struct UpdateSettingsBody
- {
- /// <summary>
- /// 摄像头开关
- /// </summary>
- public bool camera;
- /// <summary>
- /// 麦克风开关
- /// </summary>
- public bool mic;
- /// <summary>
- /// 分辨率: 1.高分辨率1280*960 2.中分辨率640*480 3.低分辨率320*240
- /// </summary>
- public int ratio;
- /// <summary>
- /// 帧率: 1.15FPS 2.30FPS 3.60FPS
- /// </summary>
- public int fps;
- /// <summary>
- /// 管理设置
- /// </summary>
- public int fmss;
- }
- }
|