agreement.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="content">
  3. <view v-html="content"></view>
  4. </view>
  5. </template>
  6. <script>
  7. import {getConfigByKey} from '@/api/common'
  8. export default {
  9. components: { },
  10. data() {
  11. return {
  12. type:null,
  13. content:"",
  14. }
  15. },
  16. onLoad(options) {
  17. this.type=options.type;
  18. if(this.type=="doctorAgreement"){
  19. uni.setNavigationBarTitle({
  20. title:"入驻协议"
  21. })
  22. }
  23. if(this.type=="userRegister"){
  24. uni.setNavigationBarTitle({
  25. title:"用户协议"
  26. })
  27. }
  28. if(this.type=="userPrivacy"){
  29. uni.setNavigationBarTitle({
  30. title:"隐私协议"
  31. })
  32. }
  33. if(this.type=="userHealth"){
  34. uni.setNavigationBarTitle({
  35. title:"健康客服协议"
  36. })
  37. }
  38. this.getConfig();
  39. },
  40. methods:{
  41. getConfig(){
  42. var that=this;
  43. var data={key:"his.agreementConfig"}
  44. getConfigByKey(data).then(
  45. res => {
  46. if(res.code==200){
  47. if(this.type=="doctorRegister"){
  48. this.content=JSON.parse(res.data).doctorRegister;
  49. }
  50. else if(this.type=="doctorFiling"){
  51. this.content=JSON.parse(res.data).doctorFiling;
  52. }
  53. else if(this.type=="userRegister"){
  54. this.content=JSON.parse(res.data).userRegister;
  55. }
  56. else if(this.type=="userPrivacy"){
  57. this.content=JSON.parse(res.data).userPrivacy;
  58. }
  59. else if(this.type=="userHealth"){
  60. this.content=JSON.parse(res.data).userHealth;
  61. }
  62. }
  63. },
  64. rej => {}
  65. );
  66. },
  67. }
  68. }
  69. </script>
  70. <style scoped lang="scss">
  71. page{
  72. height: 100%;
  73. }
  74. .content{
  75. height: 100%;
  76. padding: 30rpx;
  77. }
  78. </style>