wzp
2021-07-19 58ec6ffd2dc6a3e490e28026dd559352678a273d
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
using FineAdmin.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace FineAdmin.Web.Areas.SysSet.Models
{
    public class WebModel
    {
        /// <summary>
        /// 网站名称
        /// </summary>
        public string SiteName { get; set; }
        /// <summary>
        /// 网站域名
        /// </summary>
        public string SiteDomain { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        public string Corporate { get; set; }
        /// <summary>
        /// 公司地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 公司座机
        /// </summary>
        public string Tel { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 电子邮箱
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 首页标题
        /// </summary>
        public string HomeTitle { get; set; }
        /// <summary>
        /// META关键词:多个关键词用英文状态 , 号分割
        /// </summary>
        public string MetaKey { get; set; }
        /// <summary>
        /// META描述
        /// </summary>
        public string MetaDescribe { get; set; }
        /// <summary>
        /// 网站备案号
        /// </summary>
        public string Record { get; set; }
        /// <summary>
        /// 版权信息
        /// </summary>
        public string CopyRight { get; set; }
        public WebModel GetWebInfo()
        {
            return new WebModel
            {
                SiteName = Configs.GetValue("SiteName"),
                SiteDomain = Configs.GetValue("SiteDomain"),
                Corporate = Configs.GetValue("Corporate"),
                Address = Configs.GetValue("Address"),
                Tel = Configs.GetValue("Tel"),
                Phone = Configs.GetValue("Phone"),
                Email = Configs.GetValue("Email"),
                HomeTitle = Configs.GetValue("HomeTitle"),
                MetaKey = Configs.GetValue("MetaKey"),
                MetaDescribe = Configs.GetValue("MetaDescribe"),
                Record = Configs.GetValue("Record"),
                CopyRight = Configs.GetValue("CopyRight")
            };
        }
 
        public void SetWebInfo(WebModel model)
        {
            Configs.SetValue("SiteName", model.SiteName);
            Configs.SetValue("SiteDomain", model.SiteDomain);
            Configs.SetValue("Corporate", model.Corporate);
            Configs.SetValue("Address", model.Address);
            Configs.SetValue("Tel", model.Tel);
            Configs.SetValue("Phone", model.Phone);
            Configs.SetValue("Email", model.Email);
            Configs.SetValue("HomeTitle", model.HomeTitle);
            Configs.SetValue("MetaKey", model.MetaKey);
            Configs.SetValue("MetaDescribe", model.MetaDescribe);
            Configs.SetValue("Record", model.Record);
            Configs.SetValue("CopyRight", model.CopyRight);
        }
    }
}