Commit 68d0eedd by 张杰

增加分包,增加图片组件

1 parent 0bc979ff
// components/image/index.js
import {IMG_URL,IMG_VERSION} from '~/utils/constantData'
Component({
externalClasses: ['custom-class','class'],
/**
......@@ -27,9 +28,9 @@ Component({
// 在组件实例进入页面节点树时执行
attached: function () {
let src = this.data.src
let prefix = 'https://img02.glsx.com.cn/weapp/resource/e-shield-applet/'
let prefix = IMG_URL
this.setData({
imagePath: `${prefix}${src}`
imagePath: `${prefix}${src}` + IMG_VERSION()
})
},
// 在组件实例被从页面节点树移除时执行
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!