chenhaozhe
2025-09-12 cb1395b1564cb31d99f30335808826bd7213ec8d
添加 web页面内嵌模块 添加检验报告内嵌页面访问
1个文件已添加
3个文件已修改
52 ■■■■■ 已修改文件
pages.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/InnerHtmlPage/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/common.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -760,6 +760,13 @@
            "style": {
                "navigationBarTitleText": "还样单"
            }
        },
        {
            "path" : "pages/InnerHtmlPage/index",
            "style" :
            {
                "navigationBarTitleText" : ""
            }
        }
    ],
    "tabBar": {
pages/InnerHtmlPage/index.vue
New file
@@ -0,0 +1,27 @@
<template>
    <view>
        <web-view :src="targetSrc"></web-view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                targetSrc: '',
            };
        },
        onLoad(e) {
            this.targetSrc = e.src
            if (e.pageTitle) {
                uni.setNavigationBarTitle({
                    title: e.pageTitle
                })
            }
        },
    }
</script>
<style lang="scss">
</style>
pages/index/tab2.vue
@@ -28,7 +28,8 @@
<script>
    import { CommonUtils } from '../../utils/common'
    import { getMenuList, setMenuList } from '../../utils/menuListApp'
    export default {
    import { getUserInfo } from '../../utils/auth'
    export default {
        data() {
            return {
                updateCount: 0,
@@ -230,7 +231,14 @@
                    id: 31,
                    hidden: !this.judgeHidden(),
                },
                // , {
                {
                    img: '../../static/icon/icon8.png',
                    text: '检验报告',
                    url: `/pages/InnerHtmlPage/index?src=http://172.16.72.15:8999/index.aspx?name=${getUserInfo()['HICNumber']}&pageTitle=检验报告`,
                    id: 32,
                    hidden: false,
                },
                // {
                //     img: '../../static/icon/icon1.png',
                //     text: '设备档案查询',
                //     tip: '查看详情',
utils/common.js
@@ -8,6 +8,12 @@
    setServerUrl(url) {
        this.serverUrl = url
    }
    getServerUrl() {
        return this.serverUrl
    }
    // 防抖函数
    debounce(func, delay, immediate = false) {