import { getBigPic, getVideoByCServer } from '../../../server/searchList/commomList.js' export function LayerModel(json) { this.BigPicParam = json.BigPicParam ? json.BigPicParam : {} this.$layer = json.layer this.videoUrl = null /** 数据准备 */ this.init = async function () { const _this = this let res = await getBigPic(_this.BigPicParam) if (res && res.success) { _this.BigPicUrl = res.data.img_url console.log(_this.BigPicUrl, '大图路径') } let res2 = await getVideoByCServer(_this.BigPicParam) if (res2 && res.success) { _this.videoUrl = res2.data.filepath } } /** 打开弹框 */ this.openModel = function () { console.log(this.$layer, 'layer js') const _this = this let htmlString = `
大图
|
视频
` _this.$layer.open({ title: '调试', type: 0, area: '600px', shade: false, zIndex: _this.$layer.zIndex, content: htmlString, success: function (layero) { _this.$layer.setTop(layero) } }) } }