import { exhibitsDetails } from "../../../api/index" // const THREE = require('../../../../style/three/three.min.js'); // import { MTLLoader } from '../../../../style/three/MTLLoader.js'; const App = getApp(); Page({ /** * 页面的初始数据 */ data: { navTop:App.globalData.navTop, title:"", url:'', timestamp:0, }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { let exhibits_id = wx.getStorageSync('exhibits_id'); exhibitsDetails(exhibits_id).then(res =>{ // console.log(res.data.data,"data") this.setData({ imgList:res.data.data.imgUrl, url:res.data.data.modelUrl[0].url, timestamp:Date.now() }) }) }, navigateBack () { wx.navigateBack() }, onShow(){ const canvas = wx.createCanvasContext('#modelCanvas'); // 创建并设置场景、相机和渲染器 // const scene = new THREE.Scene(); // const camera = new THREE.PerspectiveCamera(60, App.globalData.screenWidth / App.globalData.screenHeight, 0.1, 10000) // const renderer = new THREE.WebGLRenderer({ canvas: canvas }); // console.log(renderer,"THREE") }, })