|
@@ -174,6 +174,9 @@ func siteRouters() {
|
174
|
174
|
beego.Router("/api/site/editrotationemages",&Microwebsite{},"Get:GeteditRotationEmages")
|
175
|
175
|
beego.Router("/api/site/getoutrotationlink",&Microwebsite{},"Get:GetOutRotationLink")
|
176
|
176
|
beego.Router("/api/site/updatedrolinkaddress",&Microwebsite{},"Post:UpdatedRolinkAddress")
|
|
177
|
+ beego.Router("/api/site/updatedconrotation",&Microwebsite{},"Post:UpdatedConrotation")
|
|
178
|
+ beego.Router("/api/site/getrotationvisiblebylinkid",&Microwebsite{},"Get:GetRotationVisibleByLinkId")
|
|
179
|
+ beego.Router("/api/site/addrotationvisibleform",&Microwebsite{},"Post:AddRotationVisibleForm")
|
177
|
180
|
}
|
178
|
181
|
|
179
|
182
|
type Microwebsite struct {
|
|
@@ -1427,9 +1430,11 @@ func (this *Microwebsite) Deletemodlebyid() {
|
1427
|
1430
|
linkByModelid := site_service.DeleteEditPicLinkByModelid(id, userOrgID)
|
1428
|
1431
|
enviroments := site_service.DeleteEnviroments(id, userOrgID)
|
1429
|
1432
|
conrotation := site_service.DeleteConrotation(id, userOrgID)
|
|
1433
|
+ margin := site_service.DeletePatentEditMargin(id, userOrgID)
|
1430
|
1434
|
fmt.Println("linkByModelid",linkByModelid)
|
1431
|
1435
|
fmt.Println("enviroments",enviroments)
|
1432
|
1436
|
fmt.Println("enviroments",conrotation)
|
|
1437
|
+ fmt.Println("margin",margin)
|
1433
|
1438
|
fmt.Println(modelid,byModelid)
|
1434
|
1439
|
if err !=nil{
|
1435
|
1440
|
this.ServeFailJsonSend(enums.ErrorCodeDataException, "删除成功")
|
|
@@ -1803,42 +1808,52 @@ func (this *Microwebsite) GetData() {
|
1803
|
1808
|
adminUserInfo := this.GetAdminUserInfo()
|
1804
|
1809
|
userOrgID := int64(adminUserInfo.CurrentOrgId)
|
1805
|
1810
|
fmt.Println("机构ID机构ID机构ID机构IDvvvv机构ID机构ID机构ID机构ID机构ID机构ID" ,userOrgID)
|
1806
|
|
- model, err := site_service.GetData(userOrgID)
|
1807
|
|
- fmt.Println("model是什么",model)
|
1808
|
|
- fmt.Println("长度",len(model))
|
1809
|
|
- fmt.Println("err",err)
|
1810
|
|
- if(len(model) == 0){
|
1811
|
|
- patientModel := models.SgjPatientModel{
|
1812
|
|
- Title: "轮播图",
|
1813
|
|
- Sort: 1,
|
1814
|
|
- UserOrgId: userOrgID,
|
1815
|
|
- Ctime: time.Now().Unix(),
|
1816
|
|
- Status: 1,
|
1817
|
|
- ModeType: 1,
|
|
1811
|
+ navigation, err := site_service.GetPatientNavigation(userOrgID)
|
|
1812
|
+ fmt.Println("navigation是什么",len(navigation))
|
|
1813
|
+ if(len(navigation) == 0){
|
|
1814
|
+ patientNavigation := models.SgjPatientNavigation{
|
|
1815
|
+ Navtitle: "首页",
|
|
1816
|
+ Navimages: "https://images.shengws.com/2089_o_1571990714383.png",
|
|
1817
|
+ Status: 1,
|
|
1818
|
+ UserOrgId: userOrgID,
|
|
1819
|
+ Nonavimages: "https://images.shengws.com/2105_o_1571990730785.png",
|
|
1820
|
+ Ctime: time.Now().Unix(),
|
1818
|
1821
|
}
|
1819
|
|
- addPatientModel := site_service.AddPatientModelTwo(&patientModel)
|
1820
|
|
- fmt.Println("第一个模块id",addPatientModel)
|
1821
|
|
- sgjPatientModel, err := site_service.GetQueryModelByLastData(userOrgID)
|
1822
|
|
- fmt.Println("查询模块错误是设么",err)
|
1823
|
|
- editpiclink := models.SgjPatientEditpiclink{
|
1824
|
|
- Images: "https://images.shengws.com/2124_o_1570607834870.png",
|
1825
|
|
- Sort: 1,
|
1826
|
|
- UserOrgId: userOrgID,
|
1827
|
|
- Status: 1,
|
1828
|
|
- Ctime: time.Now().Unix(),
|
1829
|
|
- Modeid:sgjPatientModel.ID,
|
|
1822
|
+ err = site_service.AddNavgation(&patientNavigation)
|
|
1823
|
+ fmt.Println(err)
|
|
1824
|
+ sgjPatientNavigation := models.SgjPatientNavigation{
|
|
1825
|
+ Navtitle: "消息",
|
|
1826
|
+ Navimages: "https://images.shengws.com/2124_o_1571990749565.png",
|
|
1827
|
+ Status: 1,
|
|
1828
|
+ UserOrgId: userOrgID,
|
|
1829
|
+ Nonavimages: "https://images.shengws.com/2079_o_1571990763549.png",
|
|
1830
|
+ Ctime: time.Now().Unix(),
|
1830
|
1831
|
}
|
1831
|
|
- err = site_service.AddPatientEdit(&editpiclink)
|
1832
|
|
- fmt.Println("err",err)
|
1833
|
|
- fmt.Println("editpiclink",editpiclink)
|
1834
|
|
- if err !=nil{
|
1835
|
|
- this.ServeFailJsonSend(enums.ErrorCodeDataException, "删除回复成功")
|
1836
|
|
- return
|
|
1832
|
+ err = site_service.AddNavgation(&sgjPatientNavigation)
|
|
1833
|
+ patientnavigationtwo := models.SgjPatientNavigation{
|
|
1834
|
+ Navtitle: "电话",
|
|
1835
|
+ Navimages: "https://images.shengws.com/2092_o_1571990776921.png",
|
|
1836
|
+ Status: 1,
|
|
1837
|
+ UserOrgId: userOrgID,
|
|
1838
|
+ Nonavimages: "https://images.shengws.com/2100_o_1571990784845.png",
|
|
1839
|
+ Ctime: time.Now().Unix(),
|
|
1840
|
+ }
|
|
1841
|
+ err = site_service.AddNavgation(&patientnavigationtwo)
|
|
1842
|
+ patientnavigationthree := models.SgjPatientNavigation{
|
|
1843
|
+ Navtitle: "客服",
|
|
1844
|
+ Navimages: "https://images.shengws.com/2101_o_1571990903053.png",
|
|
1845
|
+ Status: 1,
|
|
1846
|
+ UserOrgId: userOrgID,
|
|
1847
|
+ Nonavimages: "https://images.shengws.com/2113_o_1571990915581.png",
|
|
1848
|
+ Ctime: time.Now().Unix(),
|
1837
|
1849
|
}
|
1838
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
1839
|
|
- "patientModels":model,
|
1840
|
|
- })
|
|
1850
|
+ err = site_service.AddNavgation(&patientnavigationthree)
|
1841
|
1851
|
}
|
|
1852
|
+
|
|
1853
|
+ model, err := site_service.GetData(userOrgID)
|
|
1854
|
+ fmt.Println("model是什么",model)
|
|
1855
|
+ fmt.Println("长度",len(model))
|
|
1856
|
+ fmt.Println("err",err)
|
1842
|
1857
|
if (len(model) == 0){
|
1843
|
1858
|
patientModel := models.SgjPatientModel{
|
1844
|
1859
|
Title: "轮播图",
|
|
@@ -1878,7 +1893,7 @@ func (this *Microwebsite) GetData() {
|
1878
|
1893
|
fmt.Println(err)
|
1879
|
1894
|
editmargin := models.SgjPatientEditmargin{
|
1880
|
1895
|
Margtitle: "医院介绍",
|
1881
|
|
- Margimage: "https://images.shengws.com/2109_o_1569824063320.png",
|
|
1896
|
+ Margimage: "https://images.shengws.com/2162_o_1571992616722.png",
|
1882
|
1897
|
UserOrgId: userOrgID,
|
1883
|
1898
|
Status: 1,
|
1884
|
1899
|
Ctime: time.Now().Unix(),
|
|
@@ -1889,7 +1904,7 @@ func (this *Microwebsite) GetData() {
|
1889
|
1904
|
|
1890
|
1905
|
patientEditmargin := models.SgjPatientEditmargin{
|
1891
|
1906
|
Margtitle: "医护团队",
|
1892
|
|
- Margimage: "https://images.shengws.com/2121_o_1569824193950.png",
|
|
1907
|
+ Margimage: "https://images.shengws.com/2121_o_1571992634289.png",
|
1893
|
1908
|
UserOrgId: userOrgID,
|
1894
|
1909
|
Status: 1,
|
1895
|
1910
|
Ctime: time.Now().Unix(),
|
|
@@ -1899,8 +1914,8 @@ func (this *Microwebsite) GetData() {
|
1899
|
1914
|
fmt.Println(err)
|
1900
|
1915
|
|
1901
|
1916
|
sgjPatientEditmargin := models.SgjPatientEditmargin{
|
1902
|
|
- Margtitle: "科室介绍",
|
1903
|
|
- Margimage: "https://images.shengws.com/2113_o_1569824421007.png",
|
|
1917
|
+ Margtitle: "医院动态",
|
|
1918
|
+ Margimage: "https://images.shengws.com/2163_o_1571992676180.png",
|
1904
|
1919
|
UserOrgId: userOrgID,
|
1905
|
1920
|
Status: 1,
|
1906
|
1921
|
Ctime: time.Now().Unix(),
|
|
@@ -1912,7 +1927,7 @@ func (this *Microwebsite) GetData() {
|
1912
|
1927
|
|
1913
|
1928
|
patienteditmarginfour := models.SgjPatientEditmargin{
|
1914
|
1929
|
Margtitle: "医院活动",
|
1915
|
|
- Margimage: "https://images.shengws.com/2131_o_1569824498886.png",
|
|
1930
|
+ Margimage: "https://images.shengws.com/2117_o_1571992689392.png",
|
1916
|
1931
|
UserOrgId: userOrgID,
|
1917
|
1932
|
Status: 1,
|
1918
|
1933
|
Ctime: time.Now().Unix(),
|
|
@@ -1924,7 +1939,7 @@ func (this *Microwebsite) GetData() {
|
1924
|
1939
|
|
1925
|
1940
|
patienteditmarginfive := models.SgjPatientEditmargin{
|
1926
|
1941
|
Margtitle: "医院环境",
|
1927
|
|
- Margimage: "https://images.shengws.com/2131_o_1569824498886.png",
|
|
1942
|
+ Margimage: "https://images.shengws.com/2130_o_1571992702226.png",
|
1928
|
1943
|
UserOrgId: userOrgID,
|
1929
|
1944
|
Status: 1,
|
1930
|
1945
|
Ctime: time.Now().Unix(),
|
|
@@ -1935,8 +1950,8 @@ func (this *Microwebsite) GetData() {
|
1935
|
1950
|
fmt.Println(err)
|
1936
|
1951
|
|
1937
|
1952
|
patienteditmarginsix := models.SgjPatientEditmargin{
|
1938
|
|
- Margtitle: "咨询服务",
|
1939
|
|
- Margimage: "https://images.shengws.com/2111_o_1569824596227.png",
|
|
1953
|
+ Margtitle: "咨询客服",
|
|
1954
|
+ Margimage: "https://images.shengws.com/2149_o_1571992721076.png",
|
1940
|
1955
|
UserOrgId: userOrgID,
|
1941
|
1956
|
Status: 1,
|
1942
|
1957
|
Ctime: time.Now().Unix(),
|
|
@@ -1947,7 +1962,7 @@ func (this *Microwebsite) GetData() {
|
1947
|
1962
|
|
1948
|
1963
|
patienteditmarginserven := models.SgjPatientEditmargin{
|
1949
|
1964
|
Margtitle: "加入会员",
|
1950
|
|
- Margimage: "https://images.shengws.com/2126_o_1569824611892.png",
|
|
1965
|
+ Margimage: "https://images.shengws.com/2165_o_1571992737567.png",
|
1951
|
1966
|
UserOrgId: userOrgID,
|
1952
|
1967
|
Status: 1,
|
1953
|
1968
|
Ctime: time.Now().Unix(),
|
|
@@ -1959,7 +1974,7 @@ func (this *Microwebsite) GetData() {
|
1959
|
1974
|
|
1960
|
1975
|
patienteditmargineghit := models.SgjPatientEditmargin{
|
1961
|
1976
|
Margtitle: "联系我们",
|
1962
|
|
- Margimage: "https://images.shengws.com/2141_o_1569824626531.png",
|
|
1977
|
+ Margimage: "https://images.shengws.com/2122_o_1571992753168.png",
|
1963
|
1978
|
UserOrgId: userOrgID,
|
1964
|
1979
|
Status: 1,
|
1965
|
1980
|
Ctime: time.Now().Unix(),
|
|
@@ -2061,6 +2076,44 @@ func (this *Microwebsite) GetData() {
|
2061
|
2076
|
}
|
2062
|
2077
|
err = site_service.AddImages(&enviroimages)
|
2063
|
2078
|
fmt.Println("err",err)
|
|
2079
|
+ // modeleight := models.SgjPatientModel{
|
|
2080
|
+ // Title: "文章列表",
|
|
2081
|
+ // Sort: 7,
|
|
2082
|
+ // UserOrgId: userOrgID,
|
|
2083
|
+ // Ctime: time.Now().Unix(),
|
|
2084
|
+ // Status: 1,
|
|
2085
|
+ // ModeType: 6,
|
|
2086
|
+ //}
|
|
2087
|
+ // err = site_service.AddPatientModelTwo(&modeleight)
|
|
2088
|
+ //byLastData, err := site_service.GetQueryModelByLastData(userOrgID)
|
|
2089
|
+ //fmt.Println(byLastData,err)
|
|
2090
|
+ //articlelist := models.SgjPatientArticlelist{
|
|
2091
|
+ // Title: "文章列表",
|
|
2092
|
+ // Sort:7,
|
|
2093
|
+ // UserOrgId: userOrgID,
|
|
2094
|
+ // Status: 1,
|
|
2095
|
+ // Ctime: time.Now().Unix(),
|
|
2096
|
+ // Number: 1,
|
|
2097
|
+ // Modeid: byLastData.ID,
|
|
2098
|
+ //}
|
|
2099
|
+ //err = site_service.AddActiclelist(&articlelist)
|
|
2100
|
+ //articles := models.Articles{
|
|
2101
|
+ // Title: "文章列表",
|
|
2102
|
+ // UserOrgId: userOrgID,
|
|
2103
|
+ // Content: "暂无数据",
|
|
2104
|
+ // Imgs:"https://images.shengws.com/2062_o_1570608303729.png",
|
|
2105
|
+ //}
|
|
2106
|
+ //err = site_service.AddActicles(&articles)
|
|
2107
|
+ //fmt.Println("错误",err)
|
|
2108
|
+ //modelnight := models.SgjPatientModel{
|
|
2109
|
+ // Title: "活动列表",
|
|
2110
|
+ // Sort: 8,
|
|
2111
|
+ // UserOrgId: userOrgID,
|
|
2112
|
+ // Ctime: time.Now().Unix(),
|
|
2113
|
+ // Status: 1,
|
|
2114
|
+ // ModeType: 7,
|
|
2115
|
+ //}
|
|
2116
|
+ //err = site_service.AddPatientModelTwo(&modelnight)
|
2064
|
2117
|
}
|
2065
|
2118
|
fmt.Println(model,err)
|
2066
|
2119
|
if err !=nil{
|
|
@@ -2557,6 +2610,7 @@ func (this *Microwebsite) AddNavigation() {
|
2557
|
2610
|
fmt.Println("链接地址",navigationaddress)
|
2558
|
2611
|
linkid := int64(dataBody["linkid"].(float64))
|
2559
|
2612
|
fmt.Println("linkID",linkid)
|
|
2613
|
+ linktype := int64(dataBody["linktype"].(float64))
|
2560
|
2614
|
navigation := models.SgjPatientNavigation{
|
2561
|
2615
|
Navtitle: navtitle,
|
2562
|
2616
|
Navimages: navigationImages,
|
|
@@ -2567,6 +2621,7 @@ func (this *Microwebsite) AddNavigation() {
|
2567
|
2621
|
Status: 1,
|
2568
|
2622
|
Ctime:time.Now().Unix(),
|
2569
|
2623
|
Linkid:linkid,
|
|
2624
|
+ Linktype:linktype,
|
2570
|
2625
|
}
|
2571
|
2626
|
err = site_service.AddNavigation(&navigation)
|
2572
|
2627
|
if err !=nil{
|
|
@@ -2664,6 +2719,7 @@ func (this *Microwebsite) DeleteNavition() {
|
2664
|
2719
|
adminUserInfo := this.GetAdminUserInfo()
|
2665
|
2720
|
userOrgID := int64(adminUserInfo.CurrentOrgId)
|
2666
|
2721
|
id, _ := this.GetInt64("id")
|
|
2722
|
+ fmt.Println("id是什么呢",id)
|
2667
|
2723
|
err := site_service.DeleteNavitionById(userOrgID, id)
|
2668
|
2724
|
if err !=nil{
|
2669
|
2725
|
this.ServeFailJsonSend(enums.ErrorCodeDataException, "删除成功")
|
|
@@ -3258,12 +3314,17 @@ func (this *Microwebsite) SaveNavigation() {
|
3258
|
3314
|
}
|
3259
|
3315
|
navaddress := dataBody["navaddress"].(string)
|
3260
|
3316
|
fmt.Println("链接地址",navaddress)
|
|
3317
|
+ linkid := int64(dataBody["linkid"].(float64))
|
|
3318
|
+ fmt.Println("linkid是多少",linkid)
|
|
3319
|
+ linktype := int64(dataBody["linktype"].(float64))
|
3261
|
3320
|
navigation := models.SgjPatientNavigation{
|
3262
|
3321
|
Navtitle: navtitle,
|
3263
|
3322
|
Navimages: navimages,
|
3264
|
3323
|
Nonavimages:noCheckImages,
|
3265
|
3324
|
Jumpset: jumpset,
|
3266
|
3325
|
Navaddress: navaddress,
|
|
3326
|
+ Linkid:linkid,
|
|
3327
|
+ Linktype:linktype,
|
3267
|
3328
|
}
|
3268
|
3329
|
err = site_service.UpdateNavtion(id, userOrgID, navigation)
|
3269
|
3330
|
navigations, err := site_service.GetDefaultNavigation(userOrgID)
|
|
@@ -4403,7 +4464,9 @@ func (this *Microwebsite) Getlinkaddress() {
|
4403
|
4464
|
adminUserInfo := this.GetAdminUserInfo()
|
4404
|
4465
|
userOrgID := adminUserInfo.CurrentOrgId
|
4405
|
4466
|
fmt.Println("机构id",userOrgID)
|
4406
|
|
- linkaddress, err := site_service.GetLinkAddress(userOrgID)
|
|
4467
|
+ id, _ := this.GetInt64("id")
|
|
4468
|
+ fmt.Println("id",id)
|
|
4469
|
+ linkaddress, err := site_service.GetLinkAddress(userOrgID,id)
|
4407
|
4470
|
fmt.Println("错误",err)
|
4408
|
4471
|
fmt.Println("地址",linkaddress)
|
4409
|
4472
|
if err !=nil{
|
|
@@ -4666,6 +4729,8 @@ func (this *Microwebsite) GetLinkAddressDetail() {
|
4666
|
4729
|
id, _ := this.GetInt64("id")
|
4667
|
4730
|
fmt.Println("链接id",id)
|
4668
|
4731
|
conlinkaddress, err := site_service.GetLinkAddressDetail(userOrgID, id)
|
|
4732
|
+ fmt.Println("错误",err)
|
|
4733
|
+ fmt.Println("conlinkaddress",conlinkaddress)
|
4669
|
4734
|
if err !=nil{
|
4670
|
4735
|
this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
4671
|
4736
|
return
|
|
@@ -4688,6 +4753,19 @@ func (this *Microwebsite) UpdatePicFformThree() {
|
4688
|
4753
|
this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "参数错误")
|
4689
|
4754
|
return
|
4690
|
4755
|
}
|
|
4756
|
+ defineaddress := dataBody["defineaddress"].(string)
|
|
4757
|
+ fmt.Println("defineaddress",defineaddress)
|
|
4758
|
+ conlinkaddress := models.SgjPatientConlinkaddress{
|
|
4759
|
+ Defineaddress: defineaddress,
|
|
4760
|
+ }
|
|
4761
|
+ err = site_service.UpdatedConlinkAddress(id, userOrgID, conlinkaddress)
|
|
4762
|
+ if err !=nil{
|
|
4763
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
4764
|
+ return
|
|
4765
|
+ }
|
|
4766
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
4767
|
+ "conlinkaddress":conlinkaddress,
|
|
4768
|
+ })
|
4691
|
4769
|
|
4692
|
4770
|
}
|
4693
|
4771
|
|
|
@@ -5041,6 +5119,7 @@ func (this*Microwebsite) UpdateLinkAddress() {
|
5041
|
5119
|
UserOrgId:userOrgID,
|
5042
|
5120
|
Status:1,
|
5043
|
5121
|
}
|
|
5122
|
+ model, err := site_service.GetPatienModelByModelId(linkaddress, userOrgID)
|
5044
|
5123
|
patientMagiclink, err := site_service.GetMacLinkAddressTwo(userOrgID)
|
5045
|
5124
|
fmt.Println("长度",len(patientMagiclink))
|
5046
|
5125
|
if(len(patientMagiclink)== 0){
|
|
@@ -5057,6 +5136,7 @@ func (this*Microwebsite) UpdateLinkAddress() {
|
5057
|
5136
|
}
|
5058
|
5137
|
this.ServeSuccessJSON(map[string]interface{}{
|
5059
|
5138
|
"magiclink":magiclink,
|
|
5139
|
+ "model":model,
|
5060
|
5140
|
})
|
5061
|
5141
|
}
|
5062
|
5142
|
|
|
@@ -5131,7 +5211,7 @@ func (this*Microwebsite) GetCountImages() {
|
5131
|
5211
|
userOrgID := adminUserInfo.CurrentOrgId
|
5132
|
5212
|
fmt.Println("机构id", userOrgID)
|
5133
|
5213
|
edipiclink, total, err := site_service.GetCountImages(userOrgID)
|
5134
|
|
- fmt.Println(edipiclink)
|
|
5214
|
+ fmt.Println("edipiclink是什么",edipiclink)
|
5135
|
5215
|
fmt.Println("total是什么",total)
|
5136
|
5216
|
fmt.Println("err是什么",err)
|
5137
|
5217
|
}
|
|
@@ -5214,8 +5294,11 @@ func (this*Microwebsite) UpdateditnavigationLink() {
|
5214
|
5294
|
this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "参数错误")
|
5215
|
5295
|
return
|
5216
|
5296
|
}
|
5217
|
|
- id := int64(dataBody["id"].(float64))
|
|
5297
|
+ //id := int64(dataBody["id"].(float64))
|
|
5298
|
+ //fmt.Println("id是什么",id)
|
|
5299
|
+ id, _ := this.GetInt64("id")
|
5218
|
5300
|
fmt.Println("id是什么",id)
|
|
5301
|
+
|
5219
|
5302
|
linktype := int64(dataBody["linktype"].(float64))
|
5220
|
5303
|
fmt.Println("linktype",linktype)
|
5221
|
5304
|
navitionlinktype := int64(dataBody["navitionlinktype"].(float64))
|
|
@@ -5232,11 +5315,26 @@ func (this*Microwebsite) UpdateditnavigationLink() {
|
5232
|
5315
|
Outstationlink: outstationlink,
|
5233
|
5316
|
Linkaddress: linkaddress,
|
5234
|
5317
|
Phone:phone,
|
|
5318
|
+ UserOrgId:userOrgID,
|
|
5319
|
+ Status:1,
|
5235
|
5320
|
}
|
5236
|
|
- err = site_service.UpdateditnavigationLink(id, userOrgID, navgationlink)
|
5237
|
|
- if err !=nil{
|
5238
|
|
- this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
5239
|
|
- return
|
|
5321
|
+ patientNavgationlink, errcode := site_service.GetNavgationLinkById(id, userOrgID)
|
|
5322
|
+ fmt.Println(patientNavgationlink,errcode)
|
|
5323
|
+ if errcode == gorm.ErrRecordNotFound{
|
|
5324
|
+ err = site_service.AddNavigationlink(&navgationlink)
|
|
5325
|
+ fmt.Println("数据添加成功",err)
|
|
5326
|
+ }else if errcode == nil {
|
|
5327
|
+ err = site_service.UpdateditnavigationLink(id, userOrgID, navgationlink)
|
|
5328
|
+ if err !=nil{
|
|
5329
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5330
|
+ return
|
|
5331
|
+ }
|
|
5332
|
+ }else {
|
|
5333
|
+ err = site_service.UpdateditnavigationLink(id, userOrgID, navgationlink)
|
|
5334
|
+ if err !=nil{
|
|
5335
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5336
|
+ return
|
|
5337
|
+ }
|
5240
|
5338
|
}
|
5241
|
5339
|
this.ServeSuccessJSON(map[string]interface{}{
|
5242
|
5340
|
"navgationlink":navgationlink,
|
|
@@ -5305,71 +5403,71 @@ func (this *Microwebsite) GetNavigationset() {
|
5305
|
5403
|
adminUserInfo := this.GetAdminUserInfo()
|
5306
|
5404
|
userOrgID := adminUserInfo.CurrentOrgId
|
5307
|
5405
|
fmt.Println("机构id", userOrgID)
|
5308
|
|
- navigation, err := site_service.GetDefaultNavigation(userOrgID)
|
5309
|
|
- fmt.Println("错误是设么",err)
|
5310
|
|
- if (len(navigation) == 0) {
|
5311
|
|
- sgjPatientNavigation := models.SgjPatientNavigation{
|
5312
|
|
- Navtitle: "首页",
|
5313
|
|
- Navimages: "https://images.shengws.com/2099_o_1570840397245.png",
|
5314
|
|
- Nonavimages:"https://images.shengws.com/2099_o_1570840397245.png",
|
5315
|
|
- Jumpset: 1,
|
5316
|
|
- Navaddress: "",
|
5317
|
|
- Ctime: time.Now().Unix(),
|
5318
|
|
- Status: 1,
|
5319
|
|
- UserOrgId: userOrgID,
|
5320
|
|
- }
|
5321
|
|
- err = site_service.AddDefaultData(&sgjPatientNavigation)
|
5322
|
|
- patientNavigation := models.SgjPatientNavigation{
|
5323
|
|
- Navtitle: "微商城",
|
5324
|
|
- Navimages: "https://images.shengws.com/2122_o_1570840361702.png",
|
5325
|
|
- Nonavimages:"https://images.shengws.com/2122_o_1570840361702.png",
|
5326
|
|
- Jumpset: 1,
|
5327
|
|
- Navaddress: "http://shop.kuyicloud.com/app/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&fxtoken=bdc5659cbd1bd67baa9af215b0d6ae4c&fxorgid=3877×tamp=1571050598&fxadmin=185&wxref=mp.weixin.qq.com#wechat_redirect",
|
5328
|
|
- Ctime: time.Now().Unix(),
|
5329
|
|
- Status: 1,
|
5330
|
|
- UserOrgId: userOrgID,
|
5331
|
|
- }
|
5332
|
|
- err = site_service.AddDefaultData(&patientNavigation)
|
5333
|
|
- fmt.Println(err)
|
5334
|
|
- fmt.Println(patientNavigation)
|
5335
|
|
- sgjPatientNavigationtwo := models.SgjPatientNavigation{
|
5336
|
|
- Navtitle: "联系我们",
|
5337
|
|
- Navimages: "https://images.shengws.com/2138_o_1570840377129.png",
|
5338
|
|
- Nonavimages:"https://images.shengws.com/2138_o_1570840377129.png",
|
5339
|
|
- Jumpset: 1,
|
5340
|
|
- Navaddress: "",
|
5341
|
|
- Ctime: time.Now().Unix(),
|
5342
|
|
- Status: 1,
|
5343
|
|
- UserOrgId: userOrgID,
|
5344
|
|
- }
|
5345
|
|
- err = site_service.AddDefaultData(&sgjPatientNavigationtwo)
|
5346
|
|
- fmt.Println(err)
|
5347
|
|
- fmt.Println(sgjPatientNavigationtwo)
|
5348
|
|
- sgjPatientNavigationthree := models.SgjPatientNavigation{
|
5349
|
|
- Navtitle: "在线客服",
|
5350
|
|
- Navimages: "https://images.shengws.com/2079_o_1570842501972.png",
|
5351
|
|
- Nonavimages:"https://images.shengws.com/2079_o_1570842501972.png",
|
5352
|
|
- Jumpset: 1,
|
5353
|
|
- Navaddress: "0755-86526342",
|
5354
|
|
- Ctime: time.Now().Unix(),
|
5355
|
|
- Status: 1,
|
5356
|
|
- UserOrgId: userOrgID,
|
5357
|
|
- }
|
5358
|
|
- err = site_service.AddDefaultData(&sgjPatientNavigationthree)
|
5359
|
|
- fmt.Println(err)
|
5360
|
|
- fmt.Println(sgjPatientNavigationthree)
|
5361
|
|
-
|
5362
|
|
- navigations, err := site_service.GetDefaultNavigation(userOrgID)
|
5363
|
|
- fmt.Println(err)
|
5364
|
|
- if err !=nil{
|
5365
|
|
- this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
5366
|
|
- return
|
5367
|
|
- }
|
5368
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
5369
|
|
- "sgjPatientNavigation":sgjPatientNavigation,
|
5370
|
|
- "navigations":navigations,
|
5371
|
|
- })
|
5372
|
|
- }
|
|
5406
|
+ //navigation, err := site_service.GetDefaultNavigation(userOrgID)
|
|
5407
|
+ //fmt.Println("错误是设么",err)
|
|
5408
|
+ //if (len(navigation) == 0) {
|
|
5409
|
+ // sgjPatientNavigation := models.SgjPatientNavigation{
|
|
5410
|
+ // Navtitle: "首页",
|
|
5411
|
+ // Navimages: "https://images.shengws.com/2099_o_1570840397245.png",
|
|
5412
|
+ // Nonavimages:"https://images.shengws.com/2099_o_1570840397245.png",
|
|
5413
|
+ // Jumpset: 1,
|
|
5414
|
+ // Navaddress: "",
|
|
5415
|
+ // Ctime: time.Now().Unix(),
|
|
5416
|
+ // Status: 1,
|
|
5417
|
+ // UserOrgId: userOrgID,
|
|
5418
|
+ // }
|
|
5419
|
+ // err = site_service.AddDefaultData(&sgjPatientNavigation)
|
|
5420
|
+ // patientNavigation := models.SgjPatientNavigation{
|
|
5421
|
+ // Navtitle: "微商城",
|
|
5422
|
+ // Navimages: "https://images.shengws.com/2122_o_1570840361702.png",
|
|
5423
|
+ // Nonavimages:"https://images.shengws.com/2122_o_1570840361702.png",
|
|
5424
|
+ // Jumpset: 1,
|
|
5425
|
+ // Navaddress: "http://shop.kuyicloud.com/app/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&fxtoken=bdc5659cbd1bd67baa9af215b0d6ae4c&fxorgid=3877×tamp=1571050598&fxadmin=185&wxref=mp.weixin.qq.com#wechat_redirect",
|
|
5426
|
+ // Ctime: time.Now().Unix(),
|
|
5427
|
+ // Status: 1,
|
|
5428
|
+ // UserOrgId: userOrgID,
|
|
5429
|
+ // }
|
|
5430
|
+ // err = site_service.AddDefaultData(&patientNavigation)
|
|
5431
|
+ // fmt.Println(err)
|
|
5432
|
+ // fmt.Println(patientNavigation)
|
|
5433
|
+ // sgjPatientNavigationtwo := models.SgjPatientNavigation{
|
|
5434
|
+ // Navtitle: "联系我们",
|
|
5435
|
+ // Navimages: "https://images.shengws.com/2138_o_1570840377129.png",
|
|
5436
|
+ // Nonavimages:"https://images.shengws.com/2138_o_1570840377129.png",
|
|
5437
|
+ // Jumpset: 1,
|
|
5438
|
+ // Navaddress: "",
|
|
5439
|
+ // Ctime: time.Now().Unix(),
|
|
5440
|
+ // Status: 1,
|
|
5441
|
+ // UserOrgId: userOrgID,
|
|
5442
|
+ // }
|
|
5443
|
+ // err = site_service.AddDefaultData(&sgjPatientNavigationtwo)
|
|
5444
|
+ // fmt.Println(err)
|
|
5445
|
+ // fmt.Println(sgjPatientNavigationtwo)
|
|
5446
|
+ // sgjPatientNavigationthree := models.SgjPatientNavigation{
|
|
5447
|
+ // Navtitle: "在线客服",
|
|
5448
|
+ // Navimages: "https://images.shengws.com/2079_o_1570842501972.png",
|
|
5449
|
+ // Nonavimages:"https://images.shengws.com/2079_o_1570842501972.png",
|
|
5450
|
+ // Jumpset: 1,
|
|
5451
|
+ // Navaddress: "0755-86526342",
|
|
5452
|
+ // Ctime: time.Now().Unix(),
|
|
5453
|
+ // Status: 1,
|
|
5454
|
+ // UserOrgId: userOrgID,
|
|
5455
|
+ // }
|
|
5456
|
+ // err = site_service.AddDefaultData(&sgjPatientNavigationthree)
|
|
5457
|
+ // fmt.Println(err)
|
|
5458
|
+ // fmt.Println(sgjPatientNavigationthree)
|
|
5459
|
+ //
|
|
5460
|
+ // navigations, err := site_service.GetDefaultNavigation(userOrgID)
|
|
5461
|
+ // fmt.Println(err)
|
|
5462
|
+ // if err !=nil{
|
|
5463
|
+ // this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5464
|
+ // return
|
|
5465
|
+ // }
|
|
5466
|
+ // this.ServeSuccessJSON(map[string]interface{}{
|
|
5467
|
+ // "sgjPatientNavigation":sgjPatientNavigation,
|
|
5468
|
+ // "navigations":navigations,
|
|
5469
|
+ // })
|
|
5470
|
+ //}
|
5373
|
5471
|
|
5374
|
5472
|
navigations, err := site_service.GetDefaultNavigation(userOrgID)
|
5375
|
5473
|
if err !=nil{
|
|
@@ -5601,6 +5699,103 @@ func (this *Microwebsite) UpdatedRolinkAddress() {
|
5601
|
5699
|
this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "参数错误")
|
5602
|
5700
|
return
|
5603
|
5701
|
}
|
5604
|
|
- id := int64(dataBody["id"].(float64))
|
|
5702
|
+ //id := int64(dataBody["id"].(float64))
|
|
5703
|
+ id,_ := this.GetInt64("id")
|
|
5704
|
+ fmt.Println("id是什么",id)
|
|
5705
|
+ defineaddress :=dataBody["defineaddress"].(string)
|
|
5706
|
+ fmt.Println("defineaddress",defineaddress)
|
|
5707
|
+ conlinkaddress := models.SgjPatientConlinkaddress{
|
|
5708
|
+ Defineaddress: defineaddress,
|
|
5709
|
+ }
|
|
5710
|
+ err = site_service.UpdatedConlinkAddress(id, userOrgID, conlinkaddress)
|
|
5711
|
+ if err !=nil{
|
|
5712
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5713
|
+ return
|
|
5714
|
+ }
|
|
5715
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
5716
|
+ "conlinkaddress":conlinkaddress,
|
|
5717
|
+ })
|
|
5718
|
+}
|
|
5719
|
+
|
|
5720
|
+func (this *Microwebsite) UpdatedConrotation(){
|
|
5721
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
5722
|
+ userOrgID := adminUserInfo.CurrentOrgId
|
|
5723
|
+ fmt.Println("机构id",userOrgID)
|
|
5724
|
+ dataBody := make(map[string]interface{}, 0)
|
|
5725
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
|
5726
|
+ if err != nil {
|
|
5727
|
+ utils.ErrorLog(err.Error())
|
|
5728
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "参数错误")
|
|
5729
|
+ return
|
|
5730
|
+ }
|
|
5731
|
+ id, _ := this.GetInt64("id")
|
|
5732
|
+ fmt.Println("id是什么",id)
|
|
5733
|
+ images := dataBody["images"].(string)
|
|
5734
|
+ fmt.Println("images是什么",images)
|
|
5735
|
+ sort := int64(dataBody["sort"].(float64))
|
|
5736
|
+ fmt.Println("sort",sort)
|
|
5737
|
+ piclink := int64(dataBody["piclink"].(float64))
|
|
5738
|
+ fmt.Println("piclink",piclink)
|
|
5739
|
+ linkaddress := dataBody["linkaddress"].(string)
|
|
5740
|
+ fmt.Println("linkaddress",linkaddress)
|
|
5741
|
+ conrotation := models.SgjPatientConrotation{
|
|
5742
|
+ Images: images,
|
|
5743
|
+ Sort: sort,
|
|
5744
|
+ Piclink: piclink,
|
|
5745
|
+ Linkaddress: linkaddress,
|
|
5746
|
+ }
|
|
5747
|
+ err = site_service.UpdatedConrotation(id, userOrgID, conrotation)
|
|
5748
|
+ if err !=nil{
|
|
5749
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5750
|
+ return
|
|
5751
|
+ }
|
|
5752
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
5753
|
+ "conrotation":conrotation,
|
|
5754
|
+ })
|
|
5755
|
+}
|
|
5756
|
+
|
|
5757
|
+func (this *Microwebsite) GetRotationVisibleByLinkId() {
|
|
5758
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
5759
|
+ userOrgID := adminUserInfo.CurrentOrgId
|
|
5760
|
+ fmt.Println("机构id",userOrgID)
|
|
5761
|
+ id, _ := this.GetInt64("id")
|
5605
|
5762
|
fmt.Println("id是什么",id)
|
|
5763
|
+ conlinkaddress, err := site_service.GetRotationVisibleByLinkId(id, userOrgID)
|
|
5764
|
+ fmt.Println("错误",err)
|
|
5765
|
+ fmt.Println("conlinkaddress",conlinkaddress)
|
|
5766
|
+ if err !=nil{
|
|
5767
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5768
|
+ return
|
|
5769
|
+ }
|
|
5770
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
5771
|
+ "conlinkaddress":conlinkaddress,
|
|
5772
|
+ })
|
|
5773
|
+}
|
|
5774
|
+
|
|
5775
|
+func (this *Microwebsite) AddRotationVisibleForm(){
|
|
5776
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
5777
|
+ userOrgID := adminUserInfo.CurrentOrgId
|
|
5778
|
+ fmt.Println("机构id",userOrgID)
|
|
5779
|
+ id, _ := this.GetInt64("id")
|
|
5780
|
+ fmt.Println("id是设么",id)
|
|
5781
|
+ dataBody := make(map[string]interface{}, 0)
|
|
5782
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
|
5783
|
+ if err != nil {
|
|
5784
|
+ utils.ErrorLog(err.Error())
|
|
5785
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "参数错误")
|
|
5786
|
+ return
|
|
5787
|
+ }
|
|
5788
|
+ defineaddress := dataBody["defineaddress"].(string)
|
|
5789
|
+ fmt.Println("defineaddrss",defineaddress)
|
|
5790
|
+ linkaddress := models.SgjPatientLinkaddress{
|
|
5791
|
+ Defineaddress: defineaddress,
|
|
5792
|
+ }
|
|
5793
|
+ err = site_service.UpdatedRotationVisble(id, userOrgID, linkaddress)
|
|
5794
|
+ if err !=nil{
|
|
5795
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
5796
|
+ return
|
|
5797
|
+ }
|
|
5798
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
5799
|
+ "linkaddress":linkaddress,
|
|
5800
|
+ })
|
5606
|
5801
|
}
|