庄逸洲 преди 5 години
родител
ревизия
2f7d81e4bb
променени са 37 файла, в които са добавени 29108 реда и са изтрити 3 реда
  1. 24 1
      controllers/index_controller.go
  2. 0 2
      controllers/mobile_login_controller.go
  3. 274 0
      controllers/mobile_regist_controller.go
  4. 13 0
      controllers/verification_code_controller.go
  5. 5 0
      routers/router.go
  6. 41 0
      service/district_service.go
  7. 457 0
      static/css/mobile.css
  8. 2535 0
      static/css/weui.css
  9. 4617 0
      static/css/weuix.css
  10. BIN
      static/images/mobile_site/banner.jpg
  11. BIN
      static/images/mobile_site/close.png
  12. BIN
      static/images/mobile_site/hz-1.png
  13. BIN
      static/images/mobile_site/hz-2.png
  14. BIN
      static/images/mobile_site/hz-3.png
  15. BIN
      static/images/mobile_site/hz-4.png
  16. BIN
      static/images/mobile_site/hz-5.png
  17. BIN
      static/images/mobile_site/hz-6.png
  18. BIN
      static/images/mobile_site/hz-7.png
  19. BIN
      static/images/mobile_site/hz-8.png
  20. BIN
      static/images/mobile_site/loginBg.png
  21. BIN
      static/images/mobile_site/logo.png
  22. BIN
      static/images/mobile_site/mb.png
  23. BIN
      static/images/mobile_site/scrm.png
  24. BIN
      static/images/mobile_site/service-1.jpg
  25. BIN
      static/images/mobile_site/service-2.jpg
  26. BIN
      static/images/mobile_site/service-3.jpg
  27. BIN
      static/images/mobile_site/service-4.jpg
  28. BIN
      static/images/mobile_site/wei-1.png
  29. BIN
      static/images/mobile_site/wsc.jpg
  30. BIN
      static/images/mobile_site/xt.png
  31. 16712 0
      static/js/picker.city.js
  32. 6 0
      static/js/zepto.min.js
  33. 3757 0
      static/js/zepto.weui.js
  34. 52 0
      views/mobile_site/close.html
  35. 280 0
      views/mobile_site/create_org.html
  36. 165 0
      views/mobile_site/index.html
  37. 170 0
      views/mobile_site/regist.html

+ 24 - 1
controllers/index_controller.go Целия файл

@@ -1,6 +1,8 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"strings"
5
+
4 6
 	"github.com/astaxie/beego"
5 7
 )
6 8
 
@@ -10,7 +12,28 @@ type IndexController struct {
10 12
 
11 13
 // / [get]
12 14
 func (this *IndexController) Index() {
13
-	this.SetTpl("new_main/index.html")
15
+	mobileAgents := []string{"Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser"}
16
+	isFromMobile := false
17
+
18
+	userAgent := this.Ctx.Request.Header.Get("User-Agent")
19
+	if !strings.Contains(userAgent, "Windows NT") || (strings.Contains(userAgent, "Windows NT") && strings.Contains(userAgent, "compatible; MSIE 9.0;")) {
20
+		if !strings.Contains(userAgent, "Windows NT") && !strings.Contains(userAgent, "Macintosh") {
21
+			for _, mobileAgent := range mobileAgents {
22
+				if strings.Contains(userAgent, mobileAgent) {
23
+					isFromMobile = true
24
+					break
25
+				}
26
+			}
27
+		}
28
+	}
29
+
30
+	isFromMobile = true
31
+
32
+	if isFromMobile {
33
+		this.SetTpl("mobile_site/index.html")
34
+	} else {
35
+		this.SetTpl("new_main/index.html")
36
+	}
14 37
 }
15 38
 
16 39
 // /scrm [get]

+ 0 - 2
controllers/mobile_login_controller.go Целия файл

@@ -142,5 +142,3 @@ func (this *MobileLoginController) LoginByPwd() {
142 142
 		this.ServeJSON()
143 143
 	}
144 144
 }
145
-
146
-// /m/login/code [post]

+ 274 - 0
controllers/mobile_regist_controller.go Целия файл

@@ -0,0 +1,274 @@
1
+package controllers
2
+
3
+import (
4
+	"SSO/enums"
5
+	"SSO/models"
6
+	"SSO/service"
7
+	"SSO/utils"
8
+	"encoding/json"
9
+	"strings"
10
+	"time"
11
+)
12
+
13
+type MobileRegistController struct {
14
+	BaseController
15
+}
16
+
17
+// /mobile/regist [get]
18
+func (this *MobileRegistController) Register() {
19
+	mobile := this.GetString("mobile")
20
+	redisClient := service.RedisClient()
21
+	defer redisClient.Close()
22
+	req := this.Ctx.Request
23
+	addr := utils.GetIP(req)
24
+	cur_time := time.Now().Format("2006-01-02")
25
+	_, err := redisClient.Get("ip:host_" + cur_time + "_" + addr).Result()
26
+	if err != nil {
27
+		redisClient.Set("ip:host_"+cur_time+"_"+addr, 0, time.Second*24*60*60)
28
+	}
29
+
30
+	//将客户端的ip加密传给前端,作为短信验证的密钥,来验证短信发送的IP地址
31
+	aespass := utils.AESEncrypt(addr)
32
+	this.Data["aespass"] = aespass
33
+	this.Data["mobile"] = mobile
34
+	this.SetTpl("mobile_site/regist.html")
35
+}
36
+
37
+// /mobile/regist/submit [post]
38
+// @param mobile:string
39
+// @param password:string
40
+// @param code:string
41
+func (this *MobileRegistController) RegistSubmit() {
42
+	mobile := this.GetString("mobile")
43
+	pwd := this.GetString("password")
44
+	code := this.GetString("code")
45
+
46
+	// 判断手机号是否存在
47
+	if utils.CellPhoneRegexp().MatchString(mobile) == false {
48
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMobileFormat)
49
+		this.ServeJSON()
50
+		return
51
+	}
52
+	if len(pwd) == 0 {
53
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePasswordEmpty)
54
+		this.ServeJSON()
55
+		return
56
+	}
57
+	if len(code) == 0 {
58
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
59
+		this.ServeJSON()
60
+		return
61
+	}
62
+	if service.IsMobileRegister(mobile) == true {
63
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMobileRegistered)
64
+		this.ServeJSON()
65
+		return
66
+	}
67
+
68
+	redisClient := service.RedisClient()
69
+	defer redisClient.Close()
70
+	if strings.HasPrefix(mobile, "12") {
71
+		if code != "123456" {
72
+			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
73
+			this.ServeJSON()
74
+			return
75
+		}
76
+
77
+	} else {
78
+		cache_code, _ := redisClient.Get("code_msg_" + mobile).Result()
79
+		if cache_code != code {
80
+			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
81
+			this.ServeJSON()
82
+			return
83
+		}
84
+	}
85
+
86
+	admin, err := service.RegisterSuperAdmin(mobile, pwd)
87
+	if err != nil {
88
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJError(err)
89
+		this.ServeJSON()
90
+
91
+	} else {
92
+		this.Ctx.SetCookie("mobile", mobile)
93
+		this.SetSession("mobile_admin_user", admin)
94
+
95
+		// 注册成功后验证码就要使其失效
96
+		redisClient.Del("code_msg_" + mobile)
97
+
98
+		this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
99
+			"result": true,
100
+			"id":     admin.Id,
101
+		})
102
+		this.ServeJSON()
103
+	}
104
+}
105
+
106
+// /mobile/org/create [get]
107
+func (this *MobileRegistController) CreateOrg() {
108
+	adminUserObj := this.GetSession("mobile_admin_user")
109
+	if adminUserObj == nil {
110
+		this.Redirect302("/mobile/regist")
111
+		return
112
+	}
113
+	adminUser := adminUserObj.(*models.AdminUser)
114
+	if didCreateOrg, checkCreateOrgErr := service.DidAdminUserCreateOrg(adminUser.Id); checkCreateOrgErr != nil {
115
+		utils.ErrorLog("检查id = %v的用户是否创建了机构时出错:%v", adminUser.Id, checkCreateOrgErr)
116
+		this.Abort("404")
117
+		return
118
+	} else {
119
+		if didCreateOrg {
120
+			this.Redirect302("/mobile/finish")
121
+			return
122
+		}
123
+	}
124
+
125
+	cats, getCatErr := service.GetOrgCategoriesByPid(0)
126
+	if getCatErr != nil {
127
+		utils.ErrorLog("获取机构类型失败:%v", getCatErr)
128
+		this.Abort("404")
129
+		return
130
+	}
131
+
132
+	catsJSON, _ := json.Marshal(cats)
133
+	this.Data["categories"] = string(catsJSON)
134
+
135
+	this.SetTpl("mobile_site/create_org.html")
136
+}
137
+
138
+// /mobile/org/create/submit [post]
139
+// @param name:string
140
+// @param province:string 省名
141
+// @param city:string 市名
142
+// @param district:string 区县
143
+// @param address:string
144
+// @param category:int
145
+// @param contact_name:string
146
+// @param org_phone?:string
147
+// @param open_xt?:bool 是否开启血透系统
148
+// @param open_cdm?:bool 是否开启慢病系统
149
+// @param open_scrm?:bool 是否开启SCRM
150
+// @param open_mall?:bool 是否开启Mall
151
+func (this *MobileRegistController) CreateOrgSubmit() {
152
+	adminUserObj := this.GetSession("mobile_admin_user")
153
+	if adminUserObj == nil {
154
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
155
+		this.ServeJSON()
156
+		return
157
+	}
158
+	adminUser := adminUserObj.(*models.AdminUser)
159
+
160
+	if didCreateOrg, checkCreateOrgErr := service.DidAdminUserCreateOrg(adminUser.Id); checkCreateOrgErr != nil {
161
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
162
+		this.ServeJSON()
163
+		return
164
+	} else if didCreateOrg {
165
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeRepeatCreateOrg)
166
+		this.ServeJSON()
167
+		return
168
+	}
169
+
170
+	name := this.GetString("name")
171
+	shortName := name
172
+	provinceName := this.GetString("province")
173
+	cityName := this.GetString("city")
174
+	districtName := this.GetString("district")
175
+	address := this.GetString("address")
176
+	category, _ := this.GetInt64("category")
177
+	contactName := this.GetString("contact_name")
178
+	openXT, _ := this.GetBool("open_xt")
179
+	openCDM, _ := this.GetBool("open_cdm")
180
+	openSCRM, _ := this.GetBool("open_scrm")
181
+	openMall, _ := this.GetBool("open_mall")
182
+	if len(name) == 0 || len(shortName) == 0 || len(contactName) == 0 || len(address) == 0 || len(provinceName) <= 0 || len(cityName) <= 0 || len(districtName) <= 0 || category <= 0 || (!openXT && !openCDM && !openSCRM && !openMall) {
183
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
184
+		this.ServeJSON()
185
+		return
186
+	}
187
+	orgPhone := this.GetString("org_phone")
188
+
189
+	if len(orgPhone) > 0 {
190
+		if utils.PhoneRegexp().MatchString(orgPhone) == false {
191
+			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
192
+			this.ServeJSON()
193
+			return
194
+		}
195
+	}
196
+
197
+	provinceID := 0
198
+	cityID := 0
199
+	districtID := 0
200
+
201
+	province, getProvinceErr := service.GetProvinceWithName(provinceName)
202
+	if getProvinceErr != nil {
203
+		utils.ErrorLog("查询省名失败:%v", getProvinceErr)
204
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
205
+		this.ServeJSON()
206
+		return
207
+	} else if province != nil {
208
+		provinceID = int(province.Id)
209
+		city, getCityErr := service.GetCityWithName(province.Id, cityName)
210
+		if getCityErr != nil {
211
+			utils.ErrorLog("查询城市名失败:%v", getCityErr)
212
+			this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
213
+			this.ServeJSON()
214
+			return
215
+		} else if city != nil {
216
+			cityID = int(city.Id)
217
+			district, getDistrictErr := service.GetDistrictWithName(city.Id, districtName)
218
+			if getDistrictErr != nil {
219
+				utils.ErrorLog("查询区县名失败:%v", getDistrictErr)
220
+				this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
221
+				this.ServeJSON()
222
+				return
223
+			} else if district != nil {
224
+				districtID = int(district.Id)
225
+			}
226
+		}
227
+	}
228
+
229
+	org := models.Org{
230
+		Creator:      adminUser.Id,
231
+		OrgName:      name,
232
+		OrgShortName: shortName,
233
+		Province:     provinceID,
234
+		City:         cityID,
235
+		District:     districtID,
236
+		Address:      address,
237
+		OrgType:      category,
238
+		Telephone:    orgPhone,
239
+		ContactName:  contactName,
240
+		Claim:        1,
241
+		Evaluate:     5,
242
+		Status:       2,
243
+		CreateTime:   time.Now().Unix(),
244
+		ModifyTime:   time.Now().Unix(),
245
+	}
246
+
247
+	createErr := service.CreateOrg(&org, adminUser.Mobile, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
248
+	if createErr != nil {
249
+		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
250
+		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
251
+		this.ServeJSON()
252
+	} else {
253
+		this.Ctx.SetCookie("org_name", name)
254
+		this.SetSession("mobile_org", &org)
255
+		this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{})
256
+		this.ServeJSON()
257
+	}
258
+}
259
+
260
+// /mobile/finish [get]
261
+func (this *MobileRegistController) Finish() {
262
+	adminUserObj := this.GetSession("mobile_admin_user")
263
+	orgObj := this.GetSession("mobile_org")
264
+	if adminUserObj == nil || orgObj == nil {
265
+		this.Redirect302("/")
266
+		return
267
+	}
268
+	adminUser := adminUserObj.(*models.AdminUser)
269
+	org := orgObj.(*models.Org)
270
+
271
+	this.Data["mobile"] = adminUser.Mobile
272
+	this.Data["org_name"] = org.OrgName
273
+	this.SetTpl("mobile_site/close.html")
274
+}

+ 13 - 0
controllers/verification_code_controller.go Целия файл

@@ -4,6 +4,9 @@ import (
4 4
 	"SSO/enums"
5 5
 	"SSO/service"
6 6
 	"SSO/utils"
7
+	"strings"
8
+
9
+	"github.com/astaxie/beego"
7 10
 )
8 11
 
9 12
 type CodeController struct {
@@ -51,6 +54,16 @@ func (this *CodeController) RegistCode() {
51 54
 		return
52 55
 	}
53 56
 
57
+	if beego.AppConfig.String("runmode") == "dev" {
58
+		if strings.HasPrefix(mobile, "12") {
59
+			this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
60
+				"msg": "短信发送成功,有效期为10分钟",
61
+			})
62
+			this.ServeJSON()
63
+			return
64
+		}
65
+	}
66
+
54 67
 	if err := service.SendVerificationCodeSMS(mobile, aespass); err != nil {
55 68
 		this.Data["json"] = enums.MakeFailResponseJSON(err.Error(), 600)
56 69
 		this.ServeJSON()

+ 5 - 0
routers/router.go Целия файл

@@ -63,4 +63,9 @@ func init() {
63 63
 
64 64
 	beego.Router("/m/login/pwd", &controllers.MobileLoginController{}, "post:LoginByPwd")
65 65
 
66
+	beego.Router("/mobile/regist", &controllers.MobileRegistController{}, "get:Register")
67
+	beego.Router("/mobile/regist/submit", &controllers.MobileRegistController{}, "post:RegistSubmit")
68
+	beego.Router("/mobile/org/create", &controllers.MobileRegistController{}, "get:CreateOrg")
69
+	beego.Router("/mobile/org/create/submit", &controllers.MobileRegistController{}, "post:CreateOrgSubmit")
70
+	beego.Router("/mobile/finish", &controllers.MobileRegistController{}, "get:Finish")
66 71
 }

+ 41 - 0
service/district_service.go Целия файл

@@ -3,6 +3,8 @@ package service
3 3
 import (
4 4
 	"SSO/models"
5 5
 	"SSO/utils"
6
+
7
+	"github.com/jinzhu/gorm"
6 8
 )
7 9
 
8 10
 func GetAllProvince() []*models.District {
@@ -37,3 +39,42 @@ func GetDistrictsWithCityID(cityID int) []*models.District {
37 39
 		return districts
38 40
 	}
39 41
 }
42
+
43
+func GetProvinceWithName(name string) (*models.District, error) {
44
+	var province models.District
45
+	err := readUserDb.Model(&models.District{}).Where("level = 1 AND name like ?", "%"+name+"%").First(&province).Error
46
+	if err != nil {
47
+		if err == gorm.ErrRecordNotFound {
48
+			return nil, nil
49
+		} else {
50
+			return nil, err
51
+		}
52
+	}
53
+	return &province, nil
54
+}
55
+
56
+func GetCityWithName(provinceID int64, cityName string) (*models.District, error) {
57
+	var city models.District
58
+	err := readUserDb.Model(&models.District{}).Where("level = 2 AND upid = ? AND name like ?", provinceID, "%"+cityName+"%").First(&city).Error
59
+	if err != nil {
60
+		if err == gorm.ErrRecordNotFound {
61
+			return nil, nil
62
+		} else {
63
+			return nil, err
64
+		}
65
+	}
66
+	return &city, nil
67
+}
68
+
69
+func GetDistrictWithName(cityID int64, name string) (*models.District, error) {
70
+	var district models.District
71
+	err := readUserDb.Model(&models.District{}).Where("level = 3 AND upid = ? AND name like ?", cityID, "%"+name+"%").First(&district).Error
72
+	if err != nil {
73
+		if err == gorm.ErrRecordNotFound {
74
+			return nil, nil
75
+		} else {
76
+			return nil, err
77
+		}
78
+	}
79
+	return &district, nil
80
+}

+ 457 - 0
static/css/mobile.css Целия файл

@@ -0,0 +1,457 @@
1
+body,html {
2
+	font-family: Helvetica,STHeiti,Microsoft YaHei,Verdana,Arial,Tahoma,sans-serif;
3
+	margin: 0;
4
+	padding: 0;
5
+	border: 0
6
+}
7
+
8
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video {
9
+	margin: 0;
10
+	padding: 0;
11
+	border: 0;
12
+	font: inherit;
13
+	font-size: 100%;
14
+	vertical-align: baseline
15
+}
16
+
17
+html {
18
+	line-height: 1
19
+}
20
+
21
+ol,ul {
22
+	list-style: none
23
+}
24
+
25
+table {
26
+	border-collapse: collapse;
27
+	border-spacing: 0
28
+}
29
+
30
+caption,td,th {
31
+	font-weight: 400;
32
+	vertical-align: middle
33
+}
34
+
35
+blockquote,q {
36
+	quotes: none
37
+}
38
+
39
+blockquote:after,blockquote:before,q:after,q:before {
40
+	content: "";
41
+	content: none
42
+}
43
+
44
+a img {
45
+	border: none
46
+}
47
+
48
+a {
49
+	color: #07d;
50
+	text-decoration: none
51
+}
52
+
53
+article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary {
54
+	display: block
55
+}
56
+
57
+html {
58
+	position: relative
59
+}
60
+
61
+body,html {
62
+    width: 100%;
63
+	color: #2c3a46;
64
+	background: #fff;
65
+	font-size: 14px;
66
+	line-height: 1.6em;
67
+	font-family: Helvetica,Pingfang SC,Microsoft YaHei,STHeiti,Verdana,Arial,Tahoma,sans-serif
68
+}
69
+.clearfix{
70
+    clear: both;
71
+}
72
+
73
+/* 页面内容 */
74
+header{
75
+    height: 56px;
76
+    display: block;
77
+    justify-content:space-around;
78
+    align-content: space-around;
79
+    position: fixed;
80
+    top: 0;
81
+    left: 0;
82
+    right: 0;
83
+    background: #fff;
84
+    z-index: 999;
85
+    padding: 0 10px;
86
+    box-shadow: 0 0 18px 0 rgba(82,94,102,0.15); 
87
+    
88
+}
89
+.logo{  
90
+    width: 120px;
91
+    display: -webkit-box;
92
+    display: -ms-flexbox;
93
+    display: flex;
94
+    -webkit-box-align: center;
95
+    -ms-flex-align: center;
96
+    align-items: center;
97
+    height: 56px;
98
+}
99
+.logo img{
100
+    width: 100%;
101
+}
102
+.main-container{
103
+    margin-top: 56px;
104
+    margin-bottom: 50px;
105
+}
106
+.baner-box{
107
+   width: 100%;
108
+   position: relative;
109
+}
110
+.baner-box img{
111
+    width: 100%;
112
+    display: block;
113
+}
114
+.free-box{
115
+    position: absolute;
116
+    left: 50%;
117
+    top: 50%;
118
+    margin-left: -35%;
119
+    margin-top: -10%;
120
+    display: flex;
121
+    align-items: center;
122
+    justify-content:center;
123
+    flex-direction: column; 
124
+    color: #fff;
125
+}
126
+.free-box p{
127
+    font-size: 26px;
128
+    line-height: 60px;
129
+    height: 60px;
130
+}
131
+.custom-title {
132
+    margin: 40px auto 20px;
133
+    max-width: calc(100vw - 32px);
134
+    font-weight: 300;
135
+    color: #383838;
136
+    text-align: center;
137
+}
138
+.custom-title .name{
139
+    font-size:30px;
140
+    line-height: 32px;
141
+    padding-bottom: 10px;
142
+    display: inline-block;
143
+    
144
+}
145
+.custom-title .txt{
146
+    line-height: 32px;
147
+    font-size: 15px;
148
+}
149
+.customer-card{
150
+    box-shadow: 0 0 18px 0 rgba(82,94,102,0.15);
151
+    width: calc(100vw - 70px);
152
+    margin: 0 auto;
153
+    padding: 15px;
154
+}
155
+.customer-card-image img{
156
+    width: 100%;
157
+}
158
+.customer-card .text{
159
+    font-size: 16px;
160
+    line-height: 28px;
161
+    color: #666;
162
+    text-align: center;
163
+    padding-top: 30px;
164
+}
165
+.hz ul{
166
+    padding-left: 10px;
167
+}
168
+.hz ul li{
169
+    width: 47%;
170
+    float: left;
171
+    margin-right: 10px;
172
+    margin-bottom: 10px;
173
+    text-align: center;
174
+}
175
+.hz ul li img{
176
+    width: 100%;
177
+    display: block;
178
+}
179
+.hz ul li p{
180
+    font-size: 16px;
181
+    color: #363636;
182
+    line-height: 22px;
183
+}
184
+.service ul li img{
185
+    width: 50%;
186
+    margin: 0 auto;
187
+    padding: 10px 0;
188
+}
189
+.copyright{
190
+    background: #383d43;
191
+    color: #b6b6b6;
192
+    font-size: 15px;
193
+    padding: 30px 20px;
194
+    margin-top: 30px;
195
+    line-height: 28px;
196
+}
197
+.copyright h2{
198
+    font-size: 18px;
199
+    padding-bottom: 20px;
200
+}
201
+.info{
202
+    display: inline-block;
203
+    background: #fff;
204
+    padding: 10px 10px;
205
+    text-align: center;
206
+    
207
+}
208
+.freeBtn{
209
+    width: 100%;
210
+    position: fixed;
211
+    left: 0;
212
+    bottom: 0;
213
+    right: 0;
214
+    display: none;
215
+}
216
+.freeBtn button{
217
+    height: 46px;
218
+    background: #3388ff;
219
+    line-height: 46px;
220
+    width: 100%;
221
+    color: #fff;
222
+    outline: none;
223
+    border: none;
224
+    font-size:15px;
225
+}
226
+/* 注册 */
227
+.loginBox{
228
+    position: fixed;
229
+    top: 40%;
230
+    left: 5%;
231
+    right:5%;
232
+    margin-top: -160px;
233
+}
234
+.loginBox .title{
235
+    color: #333333;
236
+    font-size: 20px;
237
+    line-height: 110px;
238
+    height: 110px;
239
+    text-align: center;
240
+}
241
+.reg{
242
+    width: 100%;
243
+    overflow: hidden;
244
+  }
245
+  .reg_wrap .cell{
246
+     display: -webkit-box;
247
+      display: -webkit-flex;
248
+      display: flex;
249
+      -webkit-box-align: center;
250
+      -webkit-align-items: center;
251
+      align-items: center;
252
+      text-align: center;
253
+      position:relative;
254
+      color: #1e1c1c;
255
+      margin: 0 15px 15px 15px ;
256
+      
257
+  
258
+  }
259
+  .reg_wrap .cell .star{
260
+      font-size:18px;
261
+      display: block;
262
+      margin-top: 4px; 
263
+  }
264
+  .reg_wrap .cell .iconfont{
265
+      font-size: 36px;
266
+      color:#3c3a3a;
267
+  }
268
+  .reg_wrap .cell .input_box{
269
+      border:none;
270
+      width: 100%;
271
+      flex: 1;
272
+      font-size: 15px;
273
+      outline:none;
274
+      background: #eee;
275
+      border-radius: 4px;
276
+      border: 1px #eeeeee solid;
277
+      padding:11px 10px;
278
+      
279
+  }
280
+  .reg_wrap .cell .code{
281
+      border: none;
282
+      font-size: 15px;
283
+      outline: none;
284
+      background:none;
285
+      color: #fff;
286
+      margin-left: 10px;
287
+      padding:10px 15px;
288
+      background: #4b86f7;
289
+      border-radius: 4px;
290
+      display: inline-block;
291
+  }
292
+  .join{
293
+      margin-top:30px;
294
+      padding: 0 15px;
295
+      box-sizing: border-box;
296
+  }
297
+  .join .submit{
298
+      background: #4b86f7;
299
+      height: 44px;
300
+      line-height: 44px;
301
+      border-radius: 4px;
302
+      color: #fff;
303
+      font-size: 16px;
304
+      outline: none;
305
+      border: none;
306
+      width: 100%;
307
+      
308
+  }
309
+
310
+  /* 弹出层 */
311
+  .layer .layerBg{
312
+      background: rgba(0, 0, 0, 0.7);
313
+      position: fixed;
314
+      top: 0;
315
+      left: 0;
316
+      right: 0;
317
+      bottom: 0;
318
+  }
319
+  .layer .content{
320
+      background: #fff;
321
+      border-radius: 4px;
322
+      display: flex;
323
+      align-items: center;
324
+      justify-content: center;
325
+      z-index: 999;
326
+      position: fixed;
327
+      flex-direction: column;
328
+      top: 40%;
329
+      margin: 0 20px;
330
+      font-size: 16px;
331
+  }
332
+  .layer .content .tit{
333
+      display: flex;
334
+      height: 50px;
335
+      line-height: 50px;
336
+      border-bottom: 1px #eee solid;
337
+      justify-content:space-between;
338
+      padding: 0 20px;
339
+      width: 100%;
340
+      box-sizing: border-box;
341
+  }
342
+  .layer .content .tips{
343
+      padding: 20px;
344
+      line-height: 26px;
345
+  }
346
+  .layer .content .tit .close{
347
+      width: 15px;
348
+      height: 15px;
349
+  }
350
+  .layer .content .tit .close img{
351
+      width: 100%;
352
+  }
353
+  .weui-picker-container, .weui-picker-overlay{
354
+    bottom: 0!important;
355
+  }
356
+  .weui-label{
357
+      color: #333;
358
+  }
359
+  .weui-cells{
360
+      margin-top: 0!important;
361
+  }
362
+  .weui-cell{
363
+    padding: 13px 30px 13px 15px!important;
364
+  }
365
+  .weui-input{
366
+      text-align: right;
367
+      padding-right: 10%!important;
368
+  }
369
+  .weui-cell-flex{
370
+      flex-direction: column!important;
371
+      display: block!important;
372
+  }
373
+  .weui-cell-flex .weui-label{
374
+      width: 200px;
375
+  }
376
+  .weui-icon-checkbox{
377
+      border-radius: 2px!important;
378
+  }
379
+  .weui-form-checkbox[type="checkbox"]:checked + label .weui-icon-checkbox{
380
+    background-color: #3388ff!important;
381
+    border: 1px solid #3388ff!important;
382
+  }
383
+  .tip{
384
+      text-align: center;
385
+      color: #419efe;
386
+      font-size: 12px;
387
+      height: 50px;
388
+      line-height: 50px;
389
+  }
390
+  .weui-cell.arrow::after{
391
+    width: 9px;
392
+    height: 9px;
393
+    border: 2px solid #e5e5e5;
394
+    content: "";
395
+    position: absolute;
396
+    top: 18px;
397
+    right: 11px;
398
+    border-top: none;
399
+    border-right: none;
400
+    transform: rotate(-45deg);
401
+    -ms-transform: rotate(-45deg);
402
+    -moz-transform: rotate(-45deg);
403
+    -webkit-transform: rotate(-45deg);
404
+    -o-transform: rotate(-45deg);
405
+
406
+  }
407
+  .closeTit{
408
+      display: flex;
409
+      align-items:center;
410
+      padding: 0 16px;
411
+      height:50px ;
412
+      line-height: 50px;
413
+      justify-content: space-between;
414
+      font-size: 16px;
415
+      box-shadow: 0 0 18px 0 rgba(82,94,102,0.15);
416
+  }
417
+  .closeTit .jg{
418
+      flex: 1;
419
+  }
420
+  .closeTit .tel{
421
+      float: right;
422
+      color: #419efe;
423
+      font-family: "Arial";
424
+      font-weight: 550;
425
+  }
426
+
427
+  .close-page{
428
+      display:flex;
429
+      align-items: center;
430
+      text-align: center;
431
+      font-size: 16px;
432
+      flex-direction: column;
433
+      justify-content: space-between;
434
+      color: #333;
435
+      padding:0 16px;
436
+  }
437
+  .close-page .big{
438
+      font-size: 25px;
439
+      font-weight: bold;
440
+      padding: 45px 0 35px 0;
441
+  }
442
+  .close-page .medium{
443
+      padding-bottom: 25px;
444
+  }
445
+  .close-page .medium img{
446
+      width: 40%;
447
+  }
448
+  .close-page .small{
449
+    padding-bottom: 10px;
450
+      
451
+  }
452
+  .gn ul li{
453
+      float: left;
454
+      width: 50%;
455
+      height: 30px;
456
+      line-height: 28px;
457
+  }

Файловите разлики са ограничени, защото са твърде много
+ 2535 - 0
static/css/weui.css


Файловите разлики са ограничени, защото са твърде много
+ 4617 - 0
static/css/weuix.css


BIN
static/images/mobile_site/banner.jpg Целия файл


BIN
static/images/mobile_site/close.png Целия файл


BIN
static/images/mobile_site/hz-1.png Целия файл


BIN
static/images/mobile_site/hz-2.png Целия файл


BIN
static/images/mobile_site/hz-3.png Целия файл


BIN
static/images/mobile_site/hz-4.png Целия файл


BIN
static/images/mobile_site/hz-5.png Целия файл


BIN
static/images/mobile_site/hz-6.png Целия файл


BIN
static/images/mobile_site/hz-7.png Целия файл


BIN
static/images/mobile_site/hz-8.png Целия файл


BIN
static/images/mobile_site/loginBg.png Целия файл


BIN
static/images/mobile_site/logo.png Целия файл


BIN
static/images/mobile_site/mb.png Целия файл


BIN
static/images/mobile_site/scrm.png Целия файл


BIN
static/images/mobile_site/service-1.jpg Целия файл


BIN
static/images/mobile_site/service-2.jpg Целия файл


BIN
static/images/mobile_site/service-3.jpg Целия файл


BIN
static/images/mobile_site/service-4.jpg Целия файл


BIN
static/images/mobile_site/wei-1.png Целия файл


BIN
static/images/mobile_site/wsc.jpg Целия файл


BIN
static/images/mobile_site/xt.png Целия файл


Файловите разлики са ограничени, защото са твърде много
+ 16712 - 0
static/js/picker.city.js


Файловите разлики са ограничени, защото са твърде много
+ 6 - 0
static/js/zepto.min.js


Файловите разлики са ограничени, защото са твърде много
+ 3757 - 0
static/js/zepto.weui.js


+ 52 - 0
views/mobile_site/close.html Целия файл

@@ -0,0 +1,52 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+    <meta name="keywords" content="酷医,酷医云,酷医聚客,病人关系管理,微信管理平台,肾病科宣,慢病管理云平台,SCRM,SPRM,血透管理,科室品牌推广">
9
+    <meta name="description" content="酷医云,是专为肾科和血透中心研发的免费血透管理平台,覆盖诊前、诊中、诊后全流程管理;为血透中心提供覆盖智能营销管理、血透管理、慢病管理、医患沟通、进销存管理以及商城管理等全流程一体化的管理平台。全国数百家血透中心信赖的选择。">
10
+    <title>酷医云-注册成功</title>
11
+    <link rel="stylesheet" href="/static/css/mobile.css">
12
+</head>
13
+
14
+<body>
15
+
16
+    <div class="closeTit">
17
+        <p class="jg">{{ .org_name }}</p>
18
+        <p class="tel">{{ .mobile }}</p>
19
+    </div>
20
+    <div class="close-page">
21
+
22
+        <h1 class="big">欢迎您使用酷医云</h1>
23
+
24
+        <h2 class="medium">请用电脑谷歌浏览器打下以下地址,登录使用
25
+            <a href="">http://www.kuyicloud.com
26
+            </a>
27
+        </h2>
28
+
29
+        <h2 class="medium"><p>请用平板电脑扫码以下二维码安装“酷医云HD"<br />登录使用</p>
30
+            <img src="/static/images/mobile_site/wei-1.png" alt="">
31
+        </h2>
32
+
33
+        <h2 class="medium">酷医云是免费的肾科/血透中心数字化管理平台</h2>
34
+
35
+        <h2 class="small">由以下应用模块组成</h2>
36
+        <div class="gn">
37
+            <ul>
38
+                <li>·血液透析管理系统 </li>
39
+                <li>·慢病监测管理系统 </li>
40
+                <li>·患者关系管理系统 </li>
41
+                <li>·网络商城管理系统 </li>
42
+
43
+            </ul>
44
+        </div>
45
+
46
+        <div class="freeBtn" style="display:block;">
47
+            <button class="button" onclick="window.location.href='/';">关闭页面</button>
48
+        </div>
49
+    </div>
50
+
51
+</body>
52
+</html>

+ 280 - 0
views/mobile_site/create_org.html Целия файл

@@ -0,0 +1,280 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+    <meta name="keywords" content="酷医,酷医云,酷医聚客,病人关系管理,微信管理平台,肾病科宣,慢病管理云平台,SCRM,SPRM,血透管理,科室品牌推广">
9
+    <meta name="description"
10
+        content="酷医云,是专为肾科和血透中心研发的免费血透管理平台,覆盖诊前、诊中、诊后全流程管理;为血透中心提供覆盖智能营销管理、血透管理、慢病管理、医患沟通、进销存管理以及商城管理等全流程一体化的管理平台。全国数百家血透中心信赖的选择。">
11
+    <title>酷医云-填写机构信息</title>
12
+    <link rel="stylesheet" href="/static/css/mobile.css">
13
+    <link rel="stylesheet" href="/static/css/weui.css" />
14
+    <link rel="stylesheet" href="/static/css/weuix.css" />
15
+
16
+    <script src="/static/js/zepto.min.js"></script>
17
+    <script src="/static/js/zepto.weui.js"></script>
18
+    <script src="/static/js/picker.city.js"></script>
19
+</head>
20
+
21
+<body>
22
+    <div class="tip">请正确填写以下信息,后续可在账号设置中修改</div>
23
+    <div class="weui-cells weui-cells_form">
24
+        <div class="weui-cell">
25
+            <div class="weui-cell__hd">
26
+                <label class="weui-label">机构名称</label>
27
+            </div>
28
+            <div class="weui-cell__bd">
29
+                <input id="org_name" class="weui-input">
30
+            </div>
31
+        </div>
32
+        <div class="weui-cell arrow">
33
+            <div class="weui-cell__hd">
34
+                <label class="weui-label">机构类型</label>
35
+            </div>
36
+            <div class="weui-cell__bd">
37
+                <input class="weui-input" id="org_cat" type="text" value="">
38
+                <input id="cat_id" type="hidden" value="0">
39
+            </div>
40
+        </div>
41
+        <div class="weui-cell arrow">
42
+            <div class="weui-cell__hd">
43
+                <label class="weui-label">机构地址</label>
44
+            </div>
45
+            <div class="weui-cell__bd">
46
+                <input id="city" class="weui-input" type="text" value="">
47
+                <input id="province" type="hidden" value="">
48
+                <input id="city_n" type="hidden" value="">
49
+                <input id="district" type="hidden" value="">
50
+            </div>
51
+        </div>
52
+        <div class="weui-cell">
53
+            <div class="weui-cell__hd">
54
+                <label class="weui-label">详细地址</label>
55
+            </div>
56
+            <div class="weui-cell__bd">
57
+                <input id="address" class="weui-input">
58
+            </div>
59
+        </div>
60
+        <div class="weui-cell">
61
+            <div class="weui-cell__hd">
62
+                <label class="weui-label">机构联系人</label>
63
+            </div>
64
+            <div class="weui-cell__bd">
65
+                <input id="contact" class="weui-input">
66
+            </div>
67
+        </div>
68
+        <div class="weui-cell">
69
+            <div class="weui-cell__hd">
70
+                <label class="weui-label">机构电话</label>
71
+            </div>
72
+            <div class="weui-cell__bd">
73
+                <input id="org_phone" class="weui-input">
74
+            </div>
75
+        </div>
76
+        <!-- 多选 -->
77
+        <div class="weui-cell weui-cell-flex">
78
+            <div class="weui-cell__hd">
79
+                <label class="weui-label">选择启用的应用</label>
80
+            </div>
81
+            <div class="weui-form">
82
+                <div class="weui-form-li iblock">
83
+                    <input class="weui-form-checkbox" name="appcb" id="app3" value="血透管理" type="checkbox">
84
+                    <label for="app3">
85
+                        <i class="weui-icon-checkbox"></i>
86
+                        <div class="weui-form-text">
87
+                            <p>血透管理</p>
88
+                        </div>
89
+                    </label>
90
+                </div>
91
+                <div class="weui-form-li iblock">
92
+                    <input class="weui-form-checkbox" name="appcb" id="app4" value="慢病管理" type="checkbox">
93
+                    <label for="app4">
94
+                        <i class="weui-icon-checkbox"></i>
95
+                        <div class="weui-form-text">
96
+                            <p>慢病管理</p>
97
+                        </div>
98
+                    </label>
99
+                </div>
100
+                <div class="weui-form-li iblock">
101
+                    <input class="weui-form-checkbox" name="appcb" id="app1" value="SCRM" type="checkbox">
102
+                    <label for="app1">
103
+                        <i class="weui-icon-checkbox"></i>
104
+                        <div class="weui-form-text">
105
+                            <p>SCRM</p>
106
+                        </div>
107
+                    </label>
108
+                </div>
109
+                <div class="weui-form-li iblock">
110
+                    <input class="weui-form-checkbox" name="appcb" id="app5" value="微商城" type="checkbox">
111
+                    <label for="app5">
112
+                        <i class="weui-icon-checkbox"></i>
113
+                        <div class="weui-form-text">
114
+                            <p>微商城</p>
115
+                        </div>
116
+                    </label>
117
+                </div>
118
+            </div>
119
+        </div>
120
+        <!-- 按钮 -->
121
+        <div class="join">
122
+            <button id="submit" class="submit">立即开启智慧管理之旅</button>
123
+        </div>
124
+    </div>
125
+</body>
126
+
127
+<script type="text/javascript">
128
+    $(function () {
129
+        $("#app3").attr("checked", "checked");
130
+
131
+        var catsJSON = "{{.categories}}";
132
+        var cats = $.parseJSON(catsJSON);
133
+
134
+        var catOptions = [];
135
+        for (let index = 0; index < cats.length; index++) {
136
+            catOptions.push(cats[index].name);
137
+        }
138
+
139
+        $("#org_cat").picker({
140
+            title: "请选择您的机构类型",
141
+            cols: [{
142
+                textAlign: 'center',
143
+                values: catOptions,
144
+            }],
145
+            onChange: function (p, v, dv) {
146
+                var cat = v[0];
147
+                for (let index = 0; index < cats.length; index++) {
148
+                    const c = cats[index];
149
+                    if (c.name == cat) {
150
+                        $("#cat_id").val(c.id);
151
+                        return;
152
+                    }
153
+                }
154
+                $("#cat_id").val("0");
155
+            },
156
+        });
157
+
158
+        $("#city").cityPicker({
159
+            title: "选择目的地",
160
+            onChange: function (picker, codes, city_names) {
161
+                $("#province").val(city_names[0]);
162
+                $("#city_n").val(city_names[1]);
163
+                $("#district").val(city_names[2]);
164
+            }
165
+        });
166
+
167
+        $("#submit").click(function() {
168
+            var checkErr = checkInfoFull();
169
+            if (checkErr.length > 0) {
170
+                $.toast(checkErr, "cancel");
171
+                return;
172
+            }
173
+
174
+            var open_xt = false;
175
+            var open_cdm = false;
176
+            var open_scrm = false;
177
+            var open_mall = false;
178
+            if ($("#app3").prop("checked") == true) {
179
+                open_xt = true
180
+            }
181
+            if ($("#app4").prop("checked") == true) {
182
+                open_cdm = true
183
+            }
184
+            if ($("#app1").prop("checked") == true) {
185
+                open_scrm = true
186
+            }
187
+            if ($("#app5").prop("checked") == true) {
188
+                open_mall = true
189
+            }
190
+            if (!open_xt && !open_cdm && !open_scrm && !open_mall) {
191
+                $.toast("请选择要启用的应用", "cancel");
192
+                return;
193
+            }
194
+
195
+            var postData = {
196
+                name: $("#org_name").val(),
197
+                contact_name: $("#contact").val(),
198
+                province: $("#province").val(),
199
+                city: $("#city_n").val(),
200
+                district: $("#district").val(),
201
+                address: $("#address").val(),
202
+                category: $("#cat_id").val(),
203
+                org_phone: $("#org_phone").val(),
204
+                open_xt: open_xt,
205
+                open_cdm: open_cdm,
206
+                open_scrm: open_scrm,
207
+                open_mall: open_mall,
208
+            }
209
+            
210
+            $.showLoading("加载中");
211
+
212
+            $.ajax({
213
+                url: "/mobile/org/create/submit",
214
+                type: "POST",
215
+                data: postData,
216
+                async: true,
217
+                dataType: "json",
218
+                headers: {
219
+                    "X-Xsrftoken": function() {
220
+                        var xsrf, xsrflist;
221
+                        xsrf = getCookie("_xsrf");
222
+                        if (xsrf == null || xsrf == "" || typeof(xsrf) == "undefined") {
223
+                            return "";
224
+                        }
225
+                        xsrflist = xsrf.split("|");
226
+                        var _xsrf = atob(xsrflist[0]);
227
+                        return _xsrf;
228
+                    }()
229
+                },
230
+                success: function(json) {
231
+                    $.hideLoading();
232
+                    if (json.state == 1) {
233
+                        window.location.href = "/mobile/finish";
234
+
235
+                    } else {
236
+                        $.toast(json.msg, "cancel");
237
+                    }
238
+                },
239
+                error: function() {
240
+                    $.hideLoading();
241
+                    $.toast("连接失败,请检查网络", "cancel");
242
+                }
243
+            });
244
+        });
245
+    });
246
+
247
+    function getCookie(name) { 
248
+        var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
249
+        if(arr=document.cookie.match(reg))
250
+            return unescape(arr[2]); 
251
+        else 
252
+            return null; 
253
+    } 
254
+
255
+    function checkInfoFull() {
256
+        if ($("#org_name").val().length == 0) {
257
+            return "请填写机构名称";
258
+        }
259
+        if ($("#cat_id").val().length == 0 || $("#cat_id").val() == "0") {
260
+            return "请选择机构类型";
261
+        }
262
+        if ($("#city").val().length == 0) {
263
+            return "请填写机构地址";
264
+        }
265
+        if ($("#address").val().length == 0) {
266
+            return "请填写详细地址";
267
+        }
268
+        if ($("#contact").val().length == 0) {
269
+            return "请填写联系人姓名";
270
+        }
271
+        if ($("#org_phone").val().length > 0) {
272
+            if (/^(\d{3,4}-?\d{7,8}$)|(1\d{10}$)/.test($("#org_phone").val()) == false) {
273
+                return "请填写正确的机构电话";
274
+            }
275
+        }
276
+        return "";
277
+    }
278
+</script>
279
+
280
+</html>

+ 165 - 0
views/mobile_site/index.html Целия файл

@@ -0,0 +1,165 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+    <meta name="keywords" content="酷医,酷医云,酷医聚客,病人关系管理,微信管理平台,肾病科宣,慢病管理云平台,SCRM,SPRM,血透管理,科室品牌推广">
9
+    <meta name="description"
10
+        content="酷医云,是专为肾科和血透中心研发的免费血透管理平台,覆盖诊前、诊中、诊后全流程管理;为血透中心提供覆盖智能营销管理、血透管理、慢病管理、医患沟通、进销存管理以及商城管理等全流程一体化的管理平台。全国数百家血透中心信赖的选择。">
11
+    <title>酷医云-血透管理软件</title>
12
+    <link rel="stylesheet" href="/static/css/mobile.css">
13
+</head>
14
+
15
+<body>
16
+    <header>
17
+        <div class="logo">
18
+            <img src="/static/images/mobile_site/logo.png" alt="">
19
+        </div>
20
+    </header>
21
+    <div class="main-container">
22
+        <div class="baner-box">
23
+            <img src="/static/images/mobile_site/banner.jpg" alt="">
24
+            <div class="free-box">
25
+                <p>构建智慧肾科/透析中心</p>
26
+            </div>
27
+        </div>
28
+        <!-- 血透 -->
29
+        <div class="custom-title">
30
+            <span class="name">血透管理</span>
31
+            <p class="txt">规范机构的血透流程 提升患者透析质量</p>
32
+        </div>
33
+        <div class="customer-card">
34
+            <div class="customer-card-image">
35
+                <img src="/static/images/mobile_site/xt.png" alt="">
36
+            </div>
37
+            <p class="text">基于血透临床标准应用流程研发,规范可控;平板操作,随时随地记录和监测患者病情;和圣卫士打通,实现医患互动、透析数据共享;多维度数据分析管理,轻松掌握和提升透析质量。</p>
38
+        </div>
39
+        <!-- 慢病 -->
40
+        <div class="custom-title">
41
+            <span class="name">慢病管理</span>
42
+            <p class="txt">提升机构的临床科研 控制患者病情进展</p>
43
+        </div>
44
+        <div class="customer-card">
45
+            <div class="customer-card-image">
46
+                <img src="/static/images/mobile_site/mb.png" alt="">
47
+            </div>
48
+            <p class="text">24小时实时动态采集监测数据;监测指标发现异常,智能提醒医生和患者;多维度大数据分析,助力医生优化治疗方案;一键连接患者,快速干预患者行为。</p>
49
+        </div>
50
+        <!-- scrm -->
51
+        <div class="custom-title">
52
+            <span class="name">SCRM</span>
53
+            <p class="txt">帮助机构获得患者流量 拉近机构和患者距离</p>
54
+        </div>
55
+        <div class="customer-card">
56
+            <div class="customer-card-image">
57
+                <img src="/static/images/mobile_site/scrm.png" alt="">
58
+            </div>
59
+            <p class="text">建立机构独一无二的品牌展示;向精准用户快速裂变传播信息;多渠道患者来源建立会员用户池;多维度数据分析提升客户转化率。</p>
60
+        </div>
61
+        <!-- 微商城 -->
62
+        <div class="custom-title">
63
+            <span class="name">微商城</span>
64
+            <p class="txt">帮助机构提升整体营收 为商家输出更多的商业价值</p>
65
+        </div>
66
+        <div class="customer-card">
67
+            <div class="customer-card-image">
68
+                <img src="/static/images/mobile_site/wsc.jpg" alt="">
69
+            </div>
70
+            <p class="text">实时数据监控,订单、物流、成交金额等实时数据;下单客户自动进入机构患者用户库;支持从酷医云分销产品,零成本赚钱;帮助机构快速卖货,解决销售渠道问题。</p>
71
+        </div>
72
+        <!-- 合作伙伴 -->
73
+        <div class="custom-title clearfix">
74
+            <span class="name">合作伙伴</span>
75
+        </div>
76
+        <div class="hz clearfix">
77
+            <ul>
78
+                <li>
79
+                    <img src="/static/images/mobile_site/hz-1.png" alt="">
80
+                </li>
81
+                <li>
82
+                    <img src="/static/images/mobile_site/hz-2.png" alt="">
83
+                </li>
84
+                <li>
85
+                    <img src="/static/images/mobile_site/hz-3.png" alt="">
86
+                </li>
87
+                <li>
88
+                    <img src="/static/images/mobile_site/hz-4.png" alt="">
89
+                </li>
90
+                <li>
91
+                    <img src="/static/images/mobile_site/hz-5.png" alt="">
92
+                </li>
93
+                <li>
94
+                    <img src="/static/images/mobile_site/hz-6.png" alt="">
95
+                </li>
96
+                <li>
97
+                    <img src="/static/images/mobile_site/hz-7.png" alt="">
98
+                </li>
99
+                <li>
100
+                    <img src="/static/images/mobile_site/hz-8.png" alt="">
101
+                </li>
102
+            </ul>
103
+        </div>
104
+        <div class="clearfix"></div>
105
+        <!-- 酷医云 -->
106
+        <div class="custom-title clearfix">
107
+            <span class="name">酷医云</span>
108
+            <p class="txt">助力肾科/透析中心医疗建设 提升整体服务水平</p>
109
+        </div>
110
+        <div class="hz service clearfix">
111
+            <ul>
112
+                <li>
113
+                    <img src="/static/images/mobile_site/service-1.jpg" alt="">
114
+                    <p>品牌提升</p>
115
+                    <p>精准营销</p>
116
+                </li>
117
+                <li>
118
+                    <img src="/static/images/mobile_site/service-2.jpg" alt="">
119
+                    <p>就医体验</p>
120
+                    <p>网络医疗</p>
121
+                </li>
122
+                <li>
123
+                    <img src="/static/images/mobile_site/service-3.jpg" alt="">
124
+                    <p>透析质量</p>
125
+                    <p>院外服务</p>
126
+                </li>
127
+                <li>
128
+                    <img src="/static/images/mobile_site/service-4.jpg" alt="">
129
+                    <p>医护培训</p>
130
+                    <p>快捷采购</p>
131
+                </li>
132
+            </ul>
133
+        </div>
134
+        <div class="clearfix"></div>
135
+        <!-- 版权   -->
136
+        <div class="copyright">
137
+            <h2>深圳市健康互动科技有限公司</h2>
138
+            <p>咨询热线:0755-86526342</p>
139
+            <p>服务邮箱:service@shengws.com</p>
140
+            <p>工作时间:上午9:00-12:00,下午13:30-18:00</p>
141
+            <p>公司地址:深圳市南山区学苑大道1001号南山智园A4栋9楼918</p>
142
+        </div>
143
+        <span class="info">© 2016-2019 kuyicloud.com 酷医云 版权所有 粤ICP备15079323号-4</span>
144
+        <!-- 免费使用 -->
145
+        <div class="freeBtn">
146
+            <button class="button" onclick="window.location.href='/mobile/regist';">免费使用</button>
147
+        </div>
148
+    </div>
149
+
150
+</body>
151
+<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
152
+<script type="text/javascript">
153
+    $(function () {
154
+        $(window).scroll(function () {
155
+            height = $(window).scrollTop();
156
+            if (height > 30) {
157
+                $('.freeBtn').fadeIn(300);
158
+            } else {
159
+                $('.freeBtn').fadeOut(100);
160
+            }
161
+        })
162
+    })
163
+</script>
164
+
165
+</html>

+ 170 - 0
views/mobile_site/regist.html Целия файл

@@ -0,0 +1,170 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+    <meta name="keywords" content="酷医,酷医云,酷医聚客,病人关系管理,微信管理平台,肾病科宣,慢病管理云平台,SCRM,SPRM,血透管理,科室品牌推广">
9
+    <meta name="description" content="酷医云,是专为肾科和血透中心研发的免费血透管理平台,覆盖诊前、诊中、诊后全流程管理;为血透中心提供覆盖智能营销管理、血透管理、慢病管理、医患沟通、进销存管理以及商城管理等全流程一体化的管理平台。全国数百家血透中心信赖的选择。">
10
+    <title>酷医云-注册</title>
11
+    <link rel="stylesheet" href="/static/css/mobile.css">
12
+    <style>
13
+    </style>
14
+</head>
15
+
16
+<body>
17
+    <div class="loginBox">
18
+        <h2 class="title">注册账号</h2>
19
+        <div class="reg_wrap">
20
+            <form action="" class="reg">
21
+                <div class="cell">
22
+                    <input id="mobile" type="text" class="input_box " placeholder="手机号码">
23
+                </div>
24
+                <div class="cell">
25
+                    <input id="code" type="text" class="input_box" placeholder="验证码">
26
+                    <span id="codebtn" class="code">获取验证码</span>
27
+                </div>
28
+                <div class="cell">
29
+                    <input id="password" type="text" class="input_box " placeholder="密码">
30
+                </div>
31
+                <input type="hidden" id="aespass" value="{{ .aespass }}">
32
+            </form>
33
+            <div class="join">
34
+                <button id="registbtn" class="submit">即刻开始</button>
35
+            </div>
36
+        </div>
37
+    </div>
38
+    <!-- 弹出框 -->
39
+    <div class="layer" style="display: none;">
40
+        <div class="layerBg"></div>
41
+        <div class="content">
42
+            <div class="tit">
43
+                <h3>提示</h3>
44
+                <div class="close"><img src="/static/images/mobile_site/close.png" alt=""></div>
45
+            </div>
46
+            <span class="tips">您的手机号码已经注册过,请使用电脑谷歌浏览器访问酷医云,并登录使用</span>
47
+        </div>
48
+    </div>
49
+
50
+    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
51
+    <script src="/static/js/layer.js"></script>
52
+    <script src="/static/js/md5.js"></script>
53
+    <script src="/static/js/common.js"></script>
54
+    <script type="text/javascript">
55
+    $(function() {
56
+        $('.close').click(function(){
57
+            $('.layer').fadeOut(300);
58
+        });
59
+
60
+        $("#codebtn").click(function() {
61
+            var phone = $("#mobile").val();
62
+            var aespass = $('#aespass').val();
63
+
64
+            if (!checkPhone(phone)) {
65
+                return;
66
+            }
67
+
68
+            var postData = {
69
+                phone: phone,
70
+                aespass: aespass,
71
+            }
72
+            $("#codebtn").attr("disabled", true);
73
+            changeNum(60);
74
+
75
+            postRequest("/getregistcode", postData, function(res) {
76
+                if (res.state == 0) {
77
+                    serverErrorMsg(res);
78
+                    return;
79
+                }
80
+                layer.msg(res.data.msg);
81
+
82
+            }, function(res) {
83
+                serverErrorMsg(res);
84
+            });
85
+        });
86
+
87
+        //确定
88
+        $("#registbtn").click(function() {
89
+            var code = $("#code").val();
90
+
91
+            if (code != null && code != undefined && code != "") {
92
+                var mobile = $("#mobile").val();
93
+                var password = $("#password").val();
94
+
95
+                if (canSure(mobile, password)) {
96
+                    $("#registbtn").attr("disabled", true);
97
+
98
+                    var postData = {
99
+                        mobile: mobile,
100
+                        password: hex_md5(password),
101
+                        code: code,
102
+                    }
103
+
104
+                    postRequest("/mobile/regist/submit", postData, function(res) {
105
+                        $("#registbtn").attr("disabled", false);
106
+                        if (res.state == 0) {
107
+                            serverErrorMsg(res);
108
+                            return;
109
+                        }
110
+                        layer.msg("注册成功");
111
+                        window.location.href = "/mobile/org/create"; //跳转网址
112
+
113
+                    }, function(res) {
114
+                        $("#registbtn").attr("disabled", false);
115
+                        serverErrorMsg(res);
116
+                    });
117
+
118
+                } else {
119
+                    return;
120
+                }
121
+            }
122
+        });
123
+    });
124
+
125
+    function checkPhone(phone) {
126
+        if (!phone || phone == "") {
127
+            layer.msg("手机号码不能为空");
128
+            return false;
129
+        }
130
+
131
+        if (!(/^1\d{10}$/.test(phone))) {
132
+            layer.msg("手机号码有误,请重填");
133
+            return false;
134
+        }
135
+        return true;
136
+    }
137
+
138
+    function canSure(phone, password) {
139
+        if (!phone || phone == "") {
140
+            layer.msg("手机号码不能为空");
141
+            return false;
142
+        }
143
+
144
+        if (!password) {
145
+            layer.msg('密码为空');
146
+            return false;
147
+        }
148
+
149
+        if (password.length < 6) {
150
+            layer.msg('密码至少要6位数');
151
+            return false;
152
+        }
153
+        return true;
154
+    }
155
+
156
+    function changeNum(num) {
157
+        setTimeout(function() {
158
+            if (num > 1) {
159
+                $('#codebtn').html(num + "s");
160
+                --num;
161
+                changeNum(num);
162
+            } else {
163
+                $('#codebtn').html("发送验证码");
164
+                $("#codebtn").attr("disabled", false);
165
+            }
166
+        }, 1000);
167
+    }
168
+    </script>
169
+</body>
170
+</html>