Commit b7d442ce by 程默

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 60fdf6f2 2728b5e9
...@@ -197,6 +197,10 @@ export default { ...@@ -197,6 +197,10 @@ export default {
if (this.mpApp.pageCallBack) { if (this.mpApp.pageCallBack) {
this.mpApp.pageCallBack(data); this.mpApp.pageCallBack(data);
} }
if(this.mpApp.indexBgCallBack){
this.mpApp.indexBgCallBack(data)
}
}); });
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
'background-image':bacImage, 'background-image':bacImage,
'background-repeat':pageSettingData.backgroundFit == 'repeat' ? 'repeat' : 'no-repeat', 'background-repeat':pageSettingData.backgroundFit == 'repeat' ? 'repeat' : 'no-repeat',
'position':pageSettingData.backgroundImageLock ? 'fixed' : 'absolute', 'position':pageSettingData.backgroundImageLock ? 'fixed' : 'absolute',
'background-size' : '100% auto'
}" }"
> >
</div> </div>
...@@ -34,6 +35,14 @@ export default { ...@@ -34,6 +35,14 @@ export default {
this.pageInfo = this.mpApp.globalData.pageList.filter((item) => item.pageCode == 1)[0]; this.pageInfo = this.mpApp.globalData.pageList.filter((item) => item.pageCode == 1)[0];
this.pageSettingData = JSON.parse(this.pageInfo.pageSettingData); this.pageSettingData = JSON.parse(this.pageInfo.pageSettingData);
console.log(this.pageInfo.pageSettingData,'kl') console.log(this.pageInfo.pageSettingData,'kl')
}else{
let _this = this
this.mpApp.indexBgCallBack = function(data){
_this.pageInfo = _this.mpApp.globalData.pageList.filter((item) => item.pageCode == 1)[0];
_this.pageSettingData = JSON.parse(_this.pageInfo.pageSettingData);
console.log(_this.pageSettingData,'kl1')
_this.bacImage = `url(${_this.pageSettingData.backgroundImage})`
}
} }
}, },
mounted(){ mounted(){
......
...@@ -44,6 +44,8 @@ mpApp.shareInit = function () {}; ...@@ -44,6 +44,8 @@ mpApp.shareInit = function () {};
mpApp.themeColorCallBack = function () {}; mpApp.themeColorCallBack = function () {};
mpApp.indexBgCallBack = function(){ }
// 全局数据 // 全局数据
mpApp.processEnv = process.env; mpApp.processEnv = process.env;
console.log('3555555', wx) console.log('3555555', wx)
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<image wx:elif="{{datas.componentData.icon.type==2}}" class="content-img" src="{{datas.componentData.icon.src}}"></image> <image wx:elif="{{datas.componentData.icon.type==2}}" class="content-img" src="{{datas.componentData.icon.src}}"></image>
<view class="content-name" style="font-size:{{datas.componentData['fontSize']}}em;color:{{datas.componentData['contentColor']}}">{{datas.componentData['content']}}</view> <view class="content-name" style="font-size:{{datas.componentData['fontSize']}}em;color:{{datas.componentData['contentColor']}}">{{datas.componentData['content']}}</view>
</view> </view>
<image wx:else class="imgs" src="{{imgIcon}}"> <image wx:else class="imgs" src="{{imgIcon}}" mode="aspectFit">
</image> </image>
</movable-view> </movable-view>
</movable-area> </movable-area>
...@@ -43,5 +43,4 @@ ...@@ -43,5 +43,4 @@
.imgs { .imgs {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment