agreement.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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(res => {
  45. if(res.code==200){
  46. if(this.type=="doctorRegister"){
  47. this.content=JSON.parse(res.data).doctorRegister;
  48. }
  49. else if(this.type=="doctorFiling"){
  50. this.content=JSON.parse(res.data).doctorFiling;
  51. }
  52. else if(this.type=="userRegister"){
  53. this.content=JSON.parse(res.data).userRegister;
  54. }
  55. else if(this.type=="userPrivacy"){
  56. this.content=JSON.parse(res.data).userPrivacy;
  57. }
  58. else if(this.type=="userHealth"){
  59. this.content=JSON.parse(res.data).userHealth;
  60. }
  61. }
  62. },
  63. rej => {}
  64. );
  65. },
  66. }
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. page{
  71. height: 100%;
  72. }
  73. .content{
  74. height: 100%;
  75. padding: 30rpx;
  76. }
  77. </style>