|
|
@@ -1,15 +1,17 @@
|
|
|
package com.fs.app.controller.store;
|
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.fs.common.core.domain.R;
|
|
|
import com.fs.hisStore.config.AgreementConfig;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@RequestMapping(value="/store/h5")
|
|
|
public class H5ScrmController
|
|
|
{
|
|
|
@@ -19,28 +21,18 @@ public class H5ScrmController
|
|
|
|
|
|
|
|
|
@GetMapping("/userAgreement")
|
|
|
- public ModelAndView userAgreement( )
|
|
|
+ public R userAgreement( )
|
|
|
{
|
|
|
-
|
|
|
String json=configService.selectConfigByKey("his.agreementConfig");
|
|
|
AgreementConfig config= JSONUtil.toBean(json, AgreementConfig.class);
|
|
|
-
|
|
|
- ModelAndView mv=new ModelAndView();
|
|
|
- mv.addObject("userAgreement", config.getUserRegister());
|
|
|
- mv.setViewName("userAgreement");
|
|
|
- //return R.ok().put("userAgreement", config.getUserRegister());
|
|
|
- return mv;
|
|
|
+ return R.ok().put("userAgreement", config.getUserRegister());
|
|
|
}
|
|
|
@GetMapping("/privacyPolicy")
|
|
|
- public ModelAndView privacyPolicy( )
|
|
|
+ public R privacyPolicy( )
|
|
|
{
|
|
|
String json=configService.selectConfigByKey("his.agreementConfig");
|
|
|
AgreementConfig config= JSONUtil.toBean(json, AgreementConfig.class);
|
|
|
- ModelAndView mv=new ModelAndView();
|
|
|
- mv.addObject("privacyPolicy", config.getUserPrivacy());
|
|
|
- mv.setViewName("privacyPolicy");
|
|
|
- //return R.ok().put("privacyPolicy", config.getUserPrivacy());
|
|
|
- return mv;
|
|
|
+ return R.ok().put("privacyPolicy", config.getUserPrivacy());
|
|
|
}
|
|
|
@GetMapping("/doctorRegister")
|
|
|
public ModelAndView doctorRegister( )
|