123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view class="content">
- <mp-html :content="content"></mp-html>
- </view>
- </template>
- <script>
- import mpHtml from '@/uni_modules/mp-html/mp-html.vue'
- import {getConfigByKey} from '@/api/common'
- export default {
- components: {
mpHtml
},
- data() {
- return {
- type:null,
- content:"",
- }
- },
- onLoad(options) {
- this.type=options.type;
- if(this.type=="doctorAgreement"){
- uni.setNavigationBarTitle({
- title:"入驻协议"
- })
- }
- if(this.type=="userRegister"){
- uni.setNavigationBarTitle({
- title:"用户协议"
- })
- }
- if(this.type=="userPrivacy"){
- uni.setNavigationBarTitle({
- title:"隐私协议"
- })
- }
-
- this.getConfig();
- },
- methods:{
- getConfig(){
- var that=this;
- var data={key:"his.agreementConfig"}
- getConfigByKey(data).then(
- res => {
- if(res.code==200){
- if(this.type=="doctorRegister"){
- this.content=JSON.parse(res.data).doctorRegister;
- }
- else if(this.type=="doctorFiling"){
- this.content=JSON.parse(res.data).doctorFiling;
- }
- else if(this.type=="userRegister"){
- this.content=JSON.parse(res.data).userRegister;
- }
- else if(this.type=="userPrivacy"){
- this.content=JSON.parse(res.data).userPrivacy;
- }
-
- }
- },
- rej => {}
- );
- },
- }
-
- }
-
-
- </script>
- <style scoped lang="scss">
- page{
- height: 100%;
- }
- .content{
- height: 100%;
- }
-
- </style>
|