shuishen
2021-12-23 463035eba942ce173468c8b3e3185c86f9217bf3
部分文件更改
5 files modified
60 ■■■■ changed files
src/components/map/component/mapPopup.vue 3 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 20 ●●●●● patch | view | raw | blame | history
src/router/axios.js 4 ●●●● patch | view | raw | blame | history
src/store/modules/popupParams.js 1 ●●●● patch | view | raw | blame | history
vue.config.js 32 ●●●●● patch | view | raw | blame | history
src/components/map/component/mapPopup.vue
@@ -17,7 +17,8 @@
                                <div class="label-wrap">
                                    <div class="title">
                                        {{stateName}}
                                        <img @click="audioPlay"
                                        <img v-show="introduceText != null && introduceText != ''"
                                             @click="audioPlay"
                                             class="audio-control"
                                             src="/img/navicon/audio.png"
                                             alt="">
src/components/map/index.vue
@@ -171,14 +171,30 @@
            // })
            const tilesetLayer = new that.DC.TilesetLayer('tilesetLayer')
            // tilesetLayer.luminanceAtZenith = 1.8
            viewer.addLayer(tilesetLayer)
            const tileset = new that.DC.Tileset(
                'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json'
                'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json',
                {
                    luminanceAtZenith: 0.5
                }
            )
            console.log(tilesetLayer, tileset, 7878787)
            // luminanceAtZenith
            tilesetLayer.addOverlay(tileset)
            viewer.flyTo(tileset)
            // viewer.scene.globe.enableLighting = true
            // viewer.scene.light = new that.DC.Namespace.Cesium.DirectionalLight({ // 去除时间原因影响模型颜色
            //     direction: new that.DC.Position(Number(-157), Number(-30), Number(0))
            // })
            tileset.on(that.DC.MouseEventType.CLICK, e => {
                console.log(e, 123333)
                console.log()
                console.log(e)
                // that.popupFlag = true
                viewer.scene.globe.depthTestAgainstTerrain = false
src/router/axios.js
@@ -9,8 +9,8 @@
const service = axios.create({
    //   baseURL: 'http://192.168.0.107:83',
    //   baseURL: 'http://192.168.0.107:80',
    baseURL: 'http://localhost:82',
    // baseURL: 'http://192.168.0.107:80',
    baseURL: 'http://s16s652780.51mypc.cn/api',
    timeout: 600000 // request timeout
})
src/store/modules/popupParams.js
@@ -67,6 +67,7 @@
        CLEAR_ALL (state, param) {
            state.siteName = param
            state.introduceText = param
            state.telephone = param
            state.panoramaUrl = param
            state.teachList = []
            state.liveList = []
vue.config.js
@@ -3,16 +3,24 @@
const dvgisDist = './node_modules/@dvgis'
module.exports = {
    publicPath: '/',
    lintOnSave: false,
  // 其他配置
  chainWebpack: (config) => {
    config.plugin('copy').use(CopywebpackPlugin, [
      [
        {
          from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
          to: 'libs/dc-sdk/resources',
        },
      ],
    ])
  },
}
    // 其他配置
    chainWebpack: (config) => {
        config.plugin('copy').use(CopywebpackPlugin, [
            [{
                from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
                to: 'libs/dc-sdk/resources'
            },
            {
                from: './public/img',
                to: 'img'
            },
            {
                from: './public/examples',
                to: 'examples'
            }]
        ])
    }
}