sunpengfei
3 天以前 a17848fca2fd7643951e2342a8985e249ec7b93f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace FlexJobApi.Core
{
    /// <summary>
    /// 小程序获取二维码
    /// </summary>
    public class WxmpGetQrCodeCommand : WxmpGetQrCodeRequest
    {
        /// <summary>
        /// 用户类型
        /// </summary>
        public EnumUserType UserType { get; set; }
 
        /// <summary>
        /// 阿里云OSS场景
        /// </summary>
        public string OssScene { get; set; }
 
        /// <summary>
        /// 文件名
        /// </summary>
        public string OssFileName { get; set; }
    }
 
    /// <summary>
    /// 小程序获取二维码
    /// </summary>
    public class WxmpGetQrCodeRequest
    {
        /// <summary>
        /// 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
        /// </summary>
        [JsonProperty("scene")]
        [Required]
        public string Scene { get; set; }
 
        /// <summary>
        /// 默认是主页,页面 page,例如 pages/index/index,根路径前不要填加 /,不能携带参数(参数请放在scene字段里),如果不填写这个字段,默认跳主页面。scancode_time为系统保留参数,不允许配置
        /// </summary>
        [JsonProperty("page")]
        public string Page { get; set; }
 
        /// <summary>
        /// 默认是true,检查page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错);为 false 时允许小程序未发布或者 page 不存在, 但page 有数量上限(60000个)请勿滥用。
        /// </summary>
        [JsonProperty("check_path")]
        public bool? CheckPath { get; set; }
 
        /// <summary>
        /// 要打开的小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop"。默认是正式版。
        /// </summary>
        [JsonProperty("env_version")]
        public string EnvVersion { get; set; }
 
        /// <summary>
        /// 默认430,二维码的宽度,单位 px,最小 280px,最大 1280px
        /// </summary>
        [JsonProperty("width")]
        public int? Width { get; set; }
 
        /// <summary>
        /// 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
        /// </summary>
        [JsonProperty("auto_color")]
        public bool? AutoColor { get; set; }
 
        /// <summary>
        /// 默认是{"r":0,"g":0,"b":0} 。auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
        /// </summary>
        [JsonProperty("line_color")]
        public object LineColor { get; set; }
 
        /// <summary>
        /// 默认是false,是否需要透明底色,为 true 时,生成透明底色的小程序
        /// </summary>
        [JsonProperty("is_hyaline")]
        public bool? IsHyaline { get; set; }
    }
 
    /// <summary>
    /// 小程序获取二维码-结果
    /// </summary>
    public class WxmpGetQrCodeResponse
    {
        /// <summary>
        /// 图片 Buffer
        /// </summary>
        [JsonProperty("buffer")]
        public byte[] Buffer { get; set; }
        /// <summary>
        /// 错误码
        /// </summary>
        [JsonProperty("errcode")]
        public int ErrorCode { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonProperty("errmsg")]
        public string ErrorMessage { get; set; }
 
    }
}