<template>
    <view>
        <web-view :src="url" />
    </view>
</template>

<script>
import Util from '@/utils/utils';
import httpConfig from '@/utils/httpConfig'
export default {
    data() {
        return {
            urlData: "",
            url: httpConfig.imgHost + "/Questionnaire/?code=NewPneumoniaSJ&hospCode=0002",
            page: "",
            obj: {}
        }
    },
    onLoad: function (options) {
        const self = this
        const eventChannel = self.getOpenerEventChannel()
        eventChannel.on("page", (data) => {
            self.setData({
                page: data.page,
                obj: data.obj,
                urlData: this.$cache.get('userData')
            }, () => {
                const { page, urlData } = self
                console.log("obj", self.obj)
                self.setData({
                    url: `${page}&patID=${urlData.hisPatID}&hisHospID=${urlData.hisHospID}&openID=${urlData.openID}&telphone=${urlData.mobile}&patDesc=${urlData.patDesc}&hospID=${urlData.hospID}&patAddress=${obj.patAddress}&patCountry=${obj.patCountry}&patIDCardNo=${obj.patIDCardNo}&patMobile=${obj.patMobile}&patName=${obj.patName}&admDate=${obj.admDate}&hisPatNo=${urlData.hisPatNo}`
                }, () => {
                    console.log("url", self.url)
                })
            });
        })
    },
    methods: {
    }

}
</script>

<style></style>