Browse Source

Merge branch 'master' of http://git.shengws.com/zhangbj/sso into sso_branch

csx 4 years ago
parent
commit
3495b52119

+ 2 - 2
conf/app.conf View File

1
 appname = 酷医
1
 appname = 酷医
2
 httpport = 8091
2
 httpport = 8091
3
-runmode = dev
3
+runmode = prod
4
 copyrequestbody = true
4
 copyrequestbody = true
5
 
5
 
6
 is_sso_use_session_id_key = true
6
 is_sso_use_session_id_key = true
102
 submodule_domain_patient_manage = "https://test1.sgjyun.com"
102
 submodule_domain_patient_manage = "https://test1.sgjyun.com"
103
 submodule_domain_dialysis_manage = "http://xt.test.sgjyun.com"
103
 submodule_domain_dialysis_manage = "http://xt.test.sgjyun.com"
104
 submodule_domain_mall_manage = "https://mall.test.sgjyun.com"
104
 submodule_domain_mall_manage = "https://mall.test.sgjyun.com"
105
-submodule_domain_cdm_manage = "https://cdm.test.sgjyun.com"
105
+submodule_domain_cdm_manage = "http://cdm.test.sgjyun.com"
106
 
106
 
107
 # httpdomain = http://sso.kuyicloud.com
107
 # httpdomain = http://sso.kuyicloud.com
108
 # cookie_rootdomain = ".kuyicloud.com"
108
 # cookie_rootdomain = ".kuyicloud.com"

+ 1 - 1
controllers/mobile_regist_controller.go View File

244
 		ModifyTime:   time.Now().Unix(),
244
 		ModifyTime:   time.Now().Unix(),
245
 	}
245
 	}
246
 
246
 
247
-	createErr := service.CreateOrg(&org, adminUser.Mobile, openXT, openCDM, openSCRM, openMall, user_name) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
247
+	createErr := service.CreateOrg(&org, user_name, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
248
 	if createErr != nil {
248
 	if createErr != nil {
249
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
249
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
250
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
250
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)

+ 18 - 3
controllers/org_controller.go View File

117
 		this.ServeJSON()
117
 		this.ServeJSON()
118
 		return
118
 		return
119
 	}
119
 	}
120
-	user_name := this.GetString("user_name")
121
 
120
 
122
 	name := this.GetString("name")
121
 	name := this.GetString("name")
123
 	shortName := name // this.GetString("short_name")
122
 	shortName := name // this.GetString("short_name")
134
 	openCDM, _ := this.GetBool("open_cdm")
133
 	openCDM, _ := this.GetBool("open_cdm")
135
 	openSCRM, _ := this.GetBool("open_scrm")
134
 	openSCRM, _ := this.GetBool("open_scrm")
136
 	openMall, _ := this.GetBool("open_mall")
135
 	openMall, _ := this.GetBool("open_mall")
136
+	user_name := this.GetString("user_name")
137
 	if len(name) == 0 || len(shortName) == 0 || len(contactName) == 0 || len(address) == 0 || province <= 0 || city <= 0 || district <= 0 || category <= 0 || (!openXT && !openCDM && !openSCRM && !openMall) {
137
 	if len(name) == 0 || len(shortName) == 0 || len(contactName) == 0 || len(address) == 0 || province <= 0 || city <= 0 || district <= 0 || category <= 0 || (!openXT && !openCDM && !openSCRM && !openMall) {
138
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
138
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
139
 		this.ServeJSON()
139
 		this.ServeJSON()
144
 	businessTime := this.GetString("business_time")
144
 	businessTime := this.GetString("business_time")
145
 	businessState, _ := this.GetInt64("business_state")
145
 	businessState, _ := this.GetInt64("business_state")
146
 	orgPics := this.GetString("org_pics")
146
 	orgPics := this.GetString("org_pics")
147
-	//orgPics := this.GetString("name")
148
 
147
 
149
 	if len(orgPhone) > 0 {
148
 	if len(orgPhone) > 0 {
150
 		if utils.PhoneRegexp().MatchString(orgPhone) == false {
149
 		if utils.PhoneRegexp().MatchString(orgPhone) == false {
183
 		ModifyTime:      time.Now().Unix(),
182
 		ModifyTime:      time.Now().Unix(),
184
 	}
183
 	}
185
 
184
 
186
-	createErr := service.CreateOrg(&org, adminUser.Mobile, openXT, openCDM, openSCRM, openMall, user_name) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
185
+	fmt.Print("user_name ------------------------------------------------------------------", user_name)
186
+
187
+	createErr := service.CreateOrg(&org, user_name, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
187
 	if createErr != nil {
188
 	if createErr != nil {
188
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
189
 		utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
189
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
190
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
200
 		InitRoleAndPurviews(&org)
201
 		InitRoleAndPurviews(&org)
201
 		//初始化设备管理org
202
 		//初始化设备管理org
202
 		InitEquitMentInformation(&org)
203
 		InitEquitMentInformation(&org)
204
+		//初始化显示配置和打印模版
205
+		InitShowConfig(&org)
203
 
206
 
204
 		redirectURL := beego.AppConfig.String("submodule_domain_dialysis_manage")
207
 		redirectURL := beego.AppConfig.String("submodule_domain_dialysis_manage")
205
 		//} else if openCDM {
208
 		//} else if openCDM {
1226
 	}
1229
 	}
1227
 	service.CreatedTreateMode(&treatmentmodefive)
1230
 	service.CreatedTreateMode(&treatmentmodefive)
1228
 }
1231
 }
1232
+
1233
+func InitShowConfig(org *models.Org) {
1234
+	service.BatchInsertFiledSystemConfig(int64(org.Id))
1235
+	template := &models.VMGobalTemplate{
1236
+		Status:     1,
1237
+		Ctime:      time.Now().Unix(),
1238
+		Mtime:      time.Now().Unix(),
1239
+		OrgId:      int64(org.Id),
1240
+		TemplateId: 2,
1241
+	}
1242
+	service.CreateVMPrintTemplate(template)
1243
+}

+ 2 - 2
controllers/patient.json View File

15
       "nation": "汉",
15
       "nation": "汉",
16
       "native_place": "广东深圳",
16
       "native_place": "广东深圳",
17
       "marital_status": 1,
17
       "marital_status": 1,
18
-      "id_card_no": "431230199808081111",
18
+      "id_card_no": "999999190001019999",
19
       "birthday": -312537600,
19
       "birthday": -312537600,
20
       "reimbursement_way_id": 7,
20
       "reimbursement_way_id": 7,
21
       "health_care_type": 0,
21
       "health_care_type": 0,
95
       "nation": "汉",
95
       "nation": "汉",
96
       "native_place": "广东深圳",
96
       "native_place": "广东深圳",
97
       "marital_status": 1,
97
       "marital_status": 1,
98
-      "id_card_no": "4312301999090952222",
98
+      "id_card_no": "999999190001018888",
99
       "birthday": -312537600,
99
       "birthday": -312537600,
100
       "reimbursement_way_id": 7,
100
       "reimbursement_way_id": 7,
101
       "health_care_type": 0,
101
       "health_care_type": 0,

+ 6 - 7
controllers/role.json View File

7
       "status": 1,
7
       "status": 1,
8
       "is_system": 1,
8
       "is_system": 1,
9
       "number": 9999,
9
       "number": 9999,
10
-      "purview_ids": "71,72,70,74,75,73,48,52,110,49,77,78,79,80,197,76,111,112,113,114,115,116,117,118,119,129,84,93,121,122,124,125,120,127,128,201,193,194,196,192,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,101,100,102",
10
+      "purview_ids": "71,72,70,74,75,73,48,49,52,110,49,77,78,79,80,197,76,111,112,113,114,115,116,117,118,119,129,84,93,121,122,124,125,120,127,128,201,193,194,196,192,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,101,100,102,83,94",
11
       "func_ids": "20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20034,20035,20036,20038,20039,20055,20056,20040,20041,20042,20043,20054,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030"
11
       "func_ids": "20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20034,20035,20036,20038,20039,20055,20056,20040,20041,20042,20043,20054,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030"
12
     },
12
     },
13
     {
13
     {
29
       "status": 1,
29
       "status": 1,
30
       "is_system": 3,
30
       "is_system": 3,
31
       "number": 9997,
31
       "number": 9997,
32
-      "purview_ids": "71,72,70,74,75,73,127,128,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,77,78,79,80,197,76",
33
-      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029"
34
-    },
35
-    {
32
+      "purview_ids": "71,72,70,74,75,73,127,128,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,77,78,79,80,197,76,83,94",
33
+      "func_ids": "20007,20008,20009,20010,20011,20051,20053,20013,20014,20016,20017,20019,20021,20022,20024,20025,20026,20027,20028,20029,20055,20056,20052,20012"
34
+    },{
36
       "role_name": "库存",
35
       "role_name": "库存",
37
       "role_introduction": "库存角色负责透析耗材的日常管理,对耗材的入库、出库、退库的登记操作",
36
       "role_introduction": "库存角色负责透析耗材的日常管理,对耗材的入库、出库、退库的登记操作",
38
       "is_super_admin": false,
37
       "is_super_admin": false,
39
       "status": 1,
38
       "status": 1,
40
       "is_system": 0,
39
       "is_system": 0,
41
       "number": 9996,
40
       "number": 9996,
42
-      "purview_ids": "111,112,113,114,115,116,117,118,119,129,84",
41
+      "purview_ids": "111,112,113,114,115,116,117,118,119,129,84,83,94",
43
       "func_ids": ""
42
       "func_ids": ""
44
 
43
 
45
 
44
 
75
       "status": 1,
74
       "status": 1,
76
       "is_system": 0,
75
       "is_system": 0,
77
       "number": 9993,
76
       "number": 9993,
78
-      "purview_ids": "71,72,70,74,75,73,48,52,110,111,112,113,114,115,116,117,118,119,129,84,93,121,122,124,125,120,77,78,79,80,197,76,101,100,102,127,128,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,201",
77
+      "purview_ids": "71,72,70,74,75,73,48,49,52,110,111,112,113,114,115,116,117,118,119,129,84,93,121,122,124,125,120,77,78,79,80,197,76,101,100,102,127,128,158,157,159,160,161,162,167,166,168,169,170,171,174,173,175,178,177,179,201,83,94",
79
       "func_ids": ""
78
       "func_ids": ""
80
 
79
 
81
 
80
 

+ 8 - 1
controllers/verify_token_controller.go View File

35
 	// 	this.ServeJSON()
35
 	// 	this.ServeJSON()
36
 	// 	return
36
 	// 	return
37
 	// }
37
 	// }
38
-	app_type = 3
38
+	//app_type = 3
39
 	if url := service.GetAppURLWithAppType(app_type); len(url) == 0 {
39
 	if url := service.GetAppURLWithAppType(app_type); len(url) == 0 {
40
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
40
 		this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
41
 		this.ServeJSON()
41
 		this.ServeJSON()
352
 			//appIds = append(appIds, strconv.Itoa(app.Id))
352
 			//appIds = append(appIds, strconv.Itoa(app.Id))
353
 			//app_to_org_ids[strconv.Itoa(app.Id)] = strconv.Itoa(org.Id)
353
 			//app_to_org_ids[strconv.Itoa(app.Id)] = strconv.Itoa(org.Id)
354
 
354
 
355
+			appJSON_b, _ := json.Marshal(app)
356
+			appJSONStr := string(appJSON_b)
357
+			appJSONs[strconv.Itoa(app.Id)] = appJSONStr
358
+			appIds = append(appIds, strconv.Itoa(app.Id))
359
+			//app_to_org_ids[strconv.Itoa(app.Id)] = strconv.Itoa(org.Id)
360
+			fmt.Println(app.AppType)
355
 			if adminUser.IsSuperAdmin {
361
 			if adminUser.IsSuperAdmin {
356
 				urlfors, purviews, getPurviewErr := service.GetSuperAdminUsersPurviewTreeAndUrlfors(app.AppType)
362
 				urlfors, purviews, getPurviewErr := service.GetSuperAdminUsersPurviewTreeAndUrlfors(app.AppType)
363
+
357
 				if getPurviewErr != nil {
364
 				if getPurviewErr != nil {
358
 					utils.ErrorLog("数据错误:查找超级管理员的类型为%v的应用的权限时错误:%v", app.AppType, getPurviewErr)
365
 					utils.ErrorLog("数据错误:查找超级管理员的类型为%v的应用的权限时错误:%v", app.AppType, getPurviewErr)
359
 					return nil, &enums.SGJError{Code: enums.ErrorCodeDataException}
366
 					return nil, &enums.SGJError{Code: enums.ErrorCodeDataException}

+ 25 - 0
models/org_models.go View File

88
 func (OrgGallery) TableName() string {
88
 func (OrgGallery) TableName() string {
89
 	return "sgj_user_org_gallery"
89
 	return "sgj_user_org_gallery"
90
 }
90
 }
91
+
92
+type SgjUserAdminRole struct {
93
+	ID            int64  `gorm:"column:id" json:"id" form:"id"`
94
+	AdminUserId   int64  `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
95
+	OrgId         int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
96
+	AppId         int64  `gorm:"column:app_id" json:"app_id" form:"app_id"`
97
+	RoleId        int64  `gorm:"column:role_id" json:"role_id" form:"role_id"`
98
+	UserName      string `gorm:"column:user_name" json:"user_name" form:"user_name"`
99
+	Avatar        string `gorm:"column:avatar" json:"avatar" form:"avatar"`
100
+	UserType      int64  `gorm:"column:user_type" json:"user_type" form:"user_type"`
101
+	UserTitle     int64  `gorm:"column:user_title" json:"user_title" form:"user_title"`
102
+	Intro         string `gorm:"column:intro" json:"intro" form:"intro"`
103
+	Status        int64  `gorm:"column:status" json:"status" form:"status"`
104
+	Ctime         int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
105
+	Mtime         int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
106
+	UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"`
107
+	RoleIds       string `gorm:"column:role_ids" json:"role_ids" form:"role_ids"`
108
+	Message       string `gorm:"column:message" json:"message" form:"message"`
109
+	Sex           int64  `gorm:"column:sex" json:"sex" form:"sex"`
110
+	Birthday      int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
111
+}
112
+
113
+func (SgjUserAdminRole) TableName() string {
114
+	return "sgj_user_admin_role"
115
+}

+ 13 - 0
models/vm_models.go View File

313
 func (VMUserRoleAndPurview) TableName() string {
313
 func (VMUserRoleAndPurview) TableName() string {
314
 	return "sgj_user_role"
314
 	return "sgj_user_role"
315
 }
315
 }
316
+
317
+type VMGobalTemplate struct {
318
+	ID         int64 `gorm:"column:id" json:"id" form:"id"`
319
+	OrgId      int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
320
+	TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
321
+	Status     int64 `gorm:"column:status" json:"status" form:"status"`
322
+	Ctime      int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
323
+	Mtime      int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
324
+}
325
+
326
+func (VMGobalTemplate) TableName() string {
327
+	return "xt_gobal_template"
328
+}

+ 7 - 1
service/org_service.go View File

8
 	"github.com/jinzhu/gorm"
8
 	"github.com/jinzhu/gorm"
9
 )
9
 )
10
 
10
 
11
-func CreateOrg(org *models.Org, mobile string, openXT bool, openCDM bool, openSCRM bool, openMall bool, user_name string) error {
11
+func CreateOrg(org *models.Org, user_name string, openXT bool, openCDM bool, openSCRM bool, openMall bool) error {
12
 	now := time.Now()
12
 	now := time.Now()
13
 	tx_admin := writeUserDb.Begin()
13
 	tx_admin := writeUserDb.Begin()
14
 	if err := tx_admin.Create(org).Error; err != nil {
14
 	if err := tx_admin.Create(org).Error; err != nil {
75
 	return nil
75
 	return nil
76
 }
76
 }
77
 
77
 
78
+func GetLastName(creator int64) (models.Org, error) {
79
+	org := models.Org{}
80
+	err := readUserDb.Model(&org).Where("creator = ? and status = 1").Last(&org).Error
81
+	return org, err
82
+}
83
+
78
 func GetOrgWithAdminUserID(adminUserID int) (*models.Org, error) {
84
 func GetOrgWithAdminUserID(adminUserID int) (*models.Org, error) {
79
 	var org models.Org
85
 	var org models.Org
80
 	err := readUserDb.Where("creator = ? AND status <> 0", adminUserID).First(&org).Error
86
 	err := readUserDb.Where("creator = ? AND status <> 0", adminUserID).First(&org).Error

+ 10 - 0
service/vm_service.go View File

103
 	err = writeUserDb.Create(&purview).Error
103
 	err = writeUserDb.Create(&purview).Error
104
 	return
104
 	return
105
 }
105
 }
106
+
107
+func BatchInsertFiledSystemConfig(org_id int64) (err error) {
108
+	err = readDb.Exec("INSERT  INTO sgj_xt.xt_filed_config  ( org_id,  module,  filed_name,  filed_name_cn,  is_show ) SELECT ?,  module,  filed_name,  filed_name_cn,  is_show FROM sgj_xt.xt_filed_config  WHERE org_id = 9442  AND sys_module = 2", org_id).Error
109
+	return
110
+}
111
+
112
+func CreateVMPrintTemplate(template *models.VMGobalTemplate) (err error) {
113
+	err = writeDb.Model(&models.VMGobalTemplate{}).Create(template).Error
114
+	return
115
+}

BIN
static/images/logo5.png View File


BIN
static/images/newBackground.png View File


+ 1 - 0
static/js/create_org.js View File

156
             open_cdm: open_cdm,
156
             open_cdm: open_cdm,
157
             open_scrm: open_scrm,
157
             open_scrm: open_scrm,
158
             open_mall: open_mall,
158
             open_mall: open_mall,
159
+            user_name:$("#user_name").val()
159
         }
160
         }
160
         postRequest("/org/create/submit", postData, doSuccess, doFail);
161
         postRequest("/org/create/submit", postData, doSuccess, doFail);
161
 
162
 

+ 9 - 8
static/js/create_org_old.js View File

128
     }
128
     }
129
 
129
 
130
     $("#province_select").change(function() {
130
     $("#province_select").change(function() {
131
-        
131
+
132
         $("#city_select option").remove();
132
         $("#city_select option").remove();
133
         $("#district_select option").remove();
133
         $("#district_select option").remove();
134
         $("#city_select").append("<option value='0'>市</option>");
134
         $("#city_select").append("<option value='0'>市</option>");
163
     });
163
     });
164
 
164
 
165
     $("#city_select").change(function() {
165
     $("#city_select").change(function() {
166
-        
166
+
167
         $("#district_select option").remove();
167
         $("#district_select option").remove();
168
         $("#district_select").append("<option value='0'>区/县</option>");
168
         $("#district_select").append("<option value='0'>区/县</option>");
169
         var city = $("#city_select option:selected").val();
169
         var city = $("#city_select option:selected").val();
247
         }
247
         }
248
 
248
 
249
         var ills = new Array();
249
         var ills = new Array();
250
-        $("input[name='ill_checkbox']:checkbox:checked").each(function(){ 
250
+        $("input[name='ill_checkbox']:checkbox:checked").each(function(){
251
             ills.push($(this).val());
251
             ills.push($(this).val());
252
         });
252
         });
253
         var illstr = ills.join(",");
253
         var illstr = ills.join(",");
273
             business_time: $("#org_business_time").val(),
273
             business_time: $("#org_business_time").val(),
274
             business_state: $("input[name='org_business_state']:checked").val(),
274
             business_state: $("input[name='org_business_state']:checked").val(),
275
             org_pics: picsStr,
275
             org_pics: picsStr,
276
+            user_name:$("#user_name").val()
276
         }
277
         }
277
         postRequest("/org/create/submit", postData, doSuccess, doFail);
278
         postRequest("/org/create/submit", postData, doSuccess, doFail);
278
 
279
 
293
             var wname = $(this).attr('data-name');
294
             var wname = $(this).attr('data-name');
294
             business_week.push({ "id": wid, "name": wname });
295
             business_week.push({ "id": wid, "name": wname });
295
         });
296
         });
296
-  
297
+
297
         if (business_week.length == 0) {
298
         if (business_week.length == 0) {
298
             $("#org_business_week").val('');
299
             $("#org_business_week").val('');
299
         } else if (business_week.length == 1) {
300
         } else if (business_week.length == 1) {
311
                     break;
312
                     break;
312
                 }
313
                 }
313
             }
314
             }
314
-  
315
+
315
             if (btrue) {
316
             if (btrue) {
316
                 var week_show = business_week[0]["name"] + ' — ' + business_week[lastindex]["name"];
317
                 var week_show = business_week[0]["name"] + ' — ' + business_week[lastindex]["name"];
317
                 $("#org_business_week").val(week_show);
318
                 $("#org_business_week").val(week_show);
327
             }
328
             }
328
         }
329
         }
329
     });
330
     });
330
-  
331
+
331
     $('input[name=time_checkbox_s], input[name=time_checkbox_x]').change(function () {
332
     $('input[name=time_checkbox_s], input[name=time_checkbox_x]').change(function () {
332
         if ($("input[name='time_checkbox_s']:checked").length == 0 || $("input[name='time_checkbox_x']:checked").length == 0) {
333
         if ($("input[name='time_checkbox_s']:checked").length == 0 || $("input[name='time_checkbox_x']:checked").length == 0) {
333
             return;
334
             return;
414
         return "请填写地址";
415
         return "请填写地址";
415
     }
416
     }
416
     var selectIll = false;
417
     var selectIll = false;
417
-    $("input[name='ill_checkbox']:checkbox:checked").each(function(){ 
418
+    $("input[name='ill_checkbox']:checkbox:checked").each(function(){
418
         selectIll = true;
419
         selectIll = true;
419
         return false;
420
         return false;
420
     });
421
     });
434
 
435
 
435
 function doFail(res) {
436
 function doFail(res) {
436
     serverErrorMsg(res);
437
     serverErrorMsg(res);
437
-}
438
+}

+ 8 - 8
static/js/login_by_code.js View File

6
 
6
 
7
     //获取验证码
7
     //获取验证码
8
     $("#get_code").click(function() {
8
     $("#get_code").click(function() {
9
-        
9
+
10
         var phone = $("#phone").val();
10
         var phone = $("#phone").val();
11
         var aespass = $('#aespass').val();
11
         var aespass = $('#aespass').val();
12
 
12
 
18
             phone: phone,
18
             phone: phone,
19
             aespass: aespass,
19
             aespass: aespass,
20
         }
20
         }
21
-        $("#get_code").attr("disabled", true);
21
+        $("#get_code").attr("disabled", false);
22
         changeNum(60);
22
         changeNum(60);
23
 
23
 
24
         postRequest("/getcode", postData, doSuccess, doFail);
24
         postRequest("/getcode", postData, doSuccess, doFail);
25
 
25
 
26
         function doSuccess(res) {
26
         function doSuccess(res) {
27
-            
27
+
28
             if (res.state == 0) {
28
             if (res.state == 0) {
29
                 serverErrorMsg(res);
29
                 serverErrorMsg(res);
30
                 return;
30
                 return;
35
 
35
 
36
     //确定
36
     //确定
37
     $("#submit").click(function() {
37
     $("#submit").click(function() {
38
-        
38
+
39
         var code = $("#code").val();
39
         var code = $("#code").val();
40
         if (code != null && code != undefined && code != "") {
40
         if (code != null && code != undefined && code != "") {
41
             var mobile = $("#phone").val();
41
             var mobile = $("#phone").val();
48
                     returnurl: $("#return_url").val(),
48
                     returnurl: $("#return_url").val(),
49
                     app_type: $("#app_type").val(),
49
                     app_type: $("#app_type").val(),
50
                 }
50
                 }
51
-                
51
+
52
                 setCookie("login_mobile", mobile);
52
                 setCookie("login_mobile", mobile);
53
 
53
 
54
                 postRequest("/login/code/submit", postData, doSuccess, doFail);
54
                 postRequest("/login/code/submit", postData, doSuccess, doFail);
109
 
109
 
110
 function getCookie(name){
110
 function getCookie(name){
111
     var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
111
     var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
112
-    if (arr != null) 
113
-        return unescape(arr[2]); 
112
+    if (arr != null)
113
+        return unescape(arr[2]);
114
     return null;
114
     return null;
115
-}
115
+}

+ 10 - 8
static/js/register.js View File

1
 $(function() {
1
 $(function() {
2
     //获取验证码
2
     //获取验证码
3
     $("#get_code").click(function() {
3
     $("#get_code").click(function() {
4
-        
4
+
5
         var phone = $("#phone").val();
5
         var phone = $("#phone").val();
6
         var aespass = $('#aespass').val();
6
         var aespass = $('#aespass').val();
7
 
7
 
14
             aespass: aespass,
14
             aespass: aespass,
15
         }
15
         }
16
         $("#get_code").attr("disabled", true);
16
         $("#get_code").attr("disabled", true);
17
-        changeNum(60);
17
+
18
 
18
 
19
         postRequest("/getregistcode", postData, doSuccess, doFail);
19
         postRequest("/getregistcode", postData, doSuccess, doFail);
20
 
20
 
21
         function doSuccess(res) {
21
         function doSuccess(res) {
22
-            
23
-            if (res.state == 0) {
24
-                serverErrorMsg(res);
25
-                return;
22
+            if (res.state == 1) {
23
+               changeNum(60);
24
+
25
+            }else{
26
+              serverErrorMsg(res);
27
+              return;
26
             }
28
             }
27
             layer.msg(res.data.msg);
29
             layer.msg(res.data.msg);
28
         }
30
         }
113
             changeNum(num);
115
             changeNum(num);
114
         } else {
116
         } else {
115
             $('#get_code').html("发送验证码");
117
             $('#get_code').html("发送验证码");
116
-            $("#get_code").attr("disabled", false);
118
+            $("#get_code").attr("disabled", true);
117
         }
119
         }
118
     }, 1000);
120
     }, 1000);
119
-}
121
+}

+ 2 - 2
views/home/manage_app.html View File

19
         <div class="head white-bg clearfix">
19
         <div class="head white-bg clearfix">
20
             <div class="logo fl">
20
             <div class="logo fl">
21
                 <a href="/">
21
                 <a href="/">
22
-                    <img src="/static/images/logo.png" alt="" />
22
+                    <img src="/static/images/logo5.png" alt="" />
23
                     <!-- <span>酷医</span> -->
23
                     <!-- <span>酷医</span> -->
24
                 </a>
24
                 </a>
25
             </div>
25
             </div>
226
     </script> -->
226
     </script> -->
227
 </body>
227
 </body>
228
 
228
 
229
-</html>
229
+</html>

+ 3 - 3
views/home/register.html View File

12
     <link href="/static/font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet">
12
     <link href="/static/font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet">
13
     <link href="/static/css/style.css?v=2.4.2" rel="stylesheet">
13
     <link href="/static/css/style.css?v=2.4.2" rel="stylesheet">
14
     <link href="/static/iconfont/iconfont.css" rel="stylesheet">
14
     <link href="/static/iconfont/iconfont.css" rel="stylesheet">
15
-    
15
+
16
 </head>
16
 </head>
17
 
17
 
18
 <body>
18
 <body>
59
     <script src="/static/js/layer.js"></script>
59
     <script src="/static/js/layer.js"></script>
60
     <script src="/static/js/md5.js"></script>
60
     <script src="/static/js/md5.js"></script>
61
     <script src="/static/js/common.js"></script>
61
     <script src="/static/js/common.js"></script>
62
-    <script src="/static/js/register.js?v=0.1.0"></script>
62
+    <script src="/static/js/register.js?v=0.2.0"></script>
63
 </body>
63
 </body>
64
 
64
 
65
-</html>
65
+</html>

+ 8 - 8
views/mobile_site/create_org.html View File

21
         (function() {
21
         (function() {
22
           var hm = document.createElement("script");
22
           var hm = document.createElement("script");
23
           hm.src = "https://hm.baidu.com/hm.js?7577c975fa7ae685efd61deb009d1b5b";
23
           hm.src = "https://hm.baidu.com/hm.js?7577c975fa7ae685efd61deb009d1b5b";
24
-          var s = document.getElementsByTagName("script")[0]; 
24
+          var s = document.getElementsByTagName("script")[0];
25
           s.parentNode.insertBefore(hm, s);
25
           s.parentNode.insertBefore(hm, s);
26
         })();
26
         })();
27
         </script>
27
         </script>
215
                 open_scrm: open_scrm,
215
                 open_scrm: open_scrm,
216
                 open_mall: open_mall,
216
                 open_mall: open_mall,
217
             }
217
             }
218
-            
218
+
219
             $.showLoading("加载中");
219
             $.showLoading("加载中");
220
 
220
 
221
             $.ajax({
221
             $.ajax({
253
         });
253
         });
254
     });
254
     });
255
 
255
 
256
-    function getCookie(name) { 
256
+    function getCookie(name) {
257
         var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
257
         var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
258
         if(arr=document.cookie.match(reg))
258
         if(arr=document.cookie.match(reg))
259
-            return unescape(arr[2]); 
260
-        else 
261
-            return null; 
262
-    } 
259
+            return unescape(arr[2]);
260
+        else
261
+            return null;
262
+    }
263
 
263
 
264
     function checkInfoFull() {
264
     function checkInfoFull() {
265
         if ($("#org_name").val().length == 0) {
265
         if ($("#org_name").val().length == 0) {
286
     }
286
     }
287
 </script>
287
 </script>
288
 
288
 
289
-</html>
289
+</html>

+ 4 - 3
views/new_main/create_org.html View File

20
         <div class="head white-bg clearfix">
20
         <div class="head white-bg clearfix">
21
             <div class="logo fl">
21
             <div class="logo fl">
22
                 <a href="/">
22
                 <a href="/">
23
-                    <img src="/static/images/logo.png" alt="" />
23
+                    <img src="/static/images/logo5.png" alt="" />
24
                 </a>
24
                 </a>
25
             </div>
25
             </div>
26
 
26
 
43
             <div class="steward_content">
43
             <div class="steward_content">
44
                 <p class="tips">请正确填写以下信息,后续可在账号设置中修改</p>
44
                 <p class="tips">请正确填写以下信息,后续可在账号设置中修改</p>
45
                 <div class="cell clearfix">
45
                 <div class="cell clearfix">
46
-                    <label class="cell_tit fl">用户名称</label>
47
-                    <input id="user_name" type="text" class="cell_input" maxlength="10" />
46
+                  <label class="cell_tit fl">您的姓名</label>
47
+                  <input id="user_name" type="text" class="cell_input" maxlength="10" />
48
                 </div>
48
                 </div>
49
                 <div class="cell clearfix">
49
                 <div class="cell clearfix">
50
                     <label class="cell_tit fl">机构名称</label>
50
                     <label class="cell_tit fl">机构名称</label>
54
                     <label class="cell_tit fl">机构简称</label>
54
                     <label class="cell_tit fl">机构简称</label>
55
                     <input id="org_short_name" type="text" class="cell_input" maxlength="50" />
55
                     <input id="org_short_name" type="text" class="cell_input" maxlength="50" />
56
                 </div> -->
56
                 </div> -->
57
+
57
                 <div class="cell clearfix">
58
                 <div class="cell clearfix">
58
                     <label class="cell_tit fl">机构类型</label>
59
                     <label class="cell_tit fl">机构类型</label>
59
                     <div class="city fl">
60
                     <div class="city fl">

+ 3 - 3
views/new_main/register.html View File

15
             <div class="eis-login-bg" id="login-bgImg" style="background-image: url(/static/images/login_bg02.jpg);">
15
             <div class="eis-login-bg" id="login-bgImg" style="background-image: url(/static/images/login_bg02.jpg);">
16
             </div>
16
             </div>
17
             <div class="eis-login-right">
17
             <div class="eis-login-right">
18
-                <div class="eis-login-form  eis-login-center"> 
18
+                <div class="eis-login-form  eis-login-center">
19
                     <div class="eis-logo"><p>注册账户</p></div>
19
                     <div class="eis-logo"><p>注册账户</p></div>
20
                     <div class="eis-login-info">
20
                     <div class="eis-login-info">
21
                         <div class="eis-form" style="display:block;">
21
                         <div class="eis-form" style="display:block;">
31
                                     <input name="password" type="password" id="password" autocomplete="off" placeholder="密码" class="eis-form-control">
31
                                     <input name="password" type="password" id="password" autocomplete="off" placeholder="密码" class="eis-form-control">
32
                                 </div>
32
                                 </div>
33
                             </div>
33
                             </div>
34
-                            
34
+
35
                             <div class="eis-login-button" id="forget_panel">
35
                             <div class="eis-login-button" id="forget_panel">
36
                                 <input name="submit" type="button" id="submit" style="letter-spacing: 0px;" class="submit" value="即刻开始">
36
                                 <input name="submit" type="button" id="submit" style="letter-spacing: 0px;" class="submit" value="即刻开始">
37
                             </div>
37
                             </div>
61
     <script src="/static/js/common.js"></script>
61
     <script src="/static/js/common.js"></script>
62
     <script src="/static/js/register.js?v=0.1.2"></script>
62
     <script src="/static/js/register.js?v=0.1.2"></script>
63
 </body>
63
 </body>
64
-</html>
64
+</html>