| xqd
@@ -1,5 +1,7 @@
|
|
|
<template>
|
|
|
- <view class="app-my-share" v-if="shareInfo.parent_id" :style="{backgroundColor: newData.background}">
|
|
|
+ <view class="app-my-share" v-if="shareInfo.parent_id"
|
|
|
+ :class="fixed?'fixed':''"
|
|
|
+ :style="{backgroundColor: newData.background}">
|
|
|
<view class="share-info">
|
|
|
<view class="headimg">
|
|
|
<image :src="shareInfo.parent_headimg"></image>
|
| xqd
@@ -29,7 +31,13 @@
|
|
|
|
|
|
<view class="save-btn" @click="saveImg">保存二维码</view>
|
|
|
</view>
|
|
|
- <view class="placeholder"></view>
|
|
|
+ </view>
|
|
|
+ <view class="app-my-share" v-else
|
|
|
+ :class="fixed?'fixed':''"
|
|
|
+ :style="{backgroundColor: newData.background}">
|
|
|
+ <view class="share-info">
|
|
|
+ <text class="nickname" :style="{color:newData.color}">{{mall.name}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
| xqd
@@ -44,6 +52,12 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ fixed: {
|
|
|
+ type:Boolean,
|
|
|
+ default(){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
value: {
|
|
|
type: Object,
|
|
|
default: function() {
|
| xqd
@@ -53,8 +67,14 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- homePages: {
|
|
|
- type: Object|Array,
|
|
|
+ tabBarNavs: {
|
|
|
+ type: Object,
|
|
|
+ default() {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mall: {
|
|
|
+ type: Object,
|
|
|
default() {
|
|
|
return {};
|
|
|
}
|
| xqd
@@ -93,10 +113,7 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(){
|
|
|
-
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('mallConfig', {
|
| xqd
@@ -107,14 +124,9 @@
|
|
|
}),
|
|
|
newData() {
|
|
|
let value = this.value;
|
|
|
- if (typeof this.homePages.navs !== "undefined") {
|
|
|
- this.homePages.navs.forEach(item => {
|
|
|
- item.template.data.forEach(temp => {
|
|
|
- if(temp.id === 'search'){
|
|
|
- value = temp.data;
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ if(this.tabBarNavs){
|
|
|
+ this.value.background = this.tabBarNavs.top_background_color;
|
|
|
+ this.value.top_text_color = this.tabBarNavs.top_text_color;
|
|
|
}
|
|
|
return value;
|
|
|
},
|
| xqd
@@ -129,6 +141,9 @@
|
|
|
background: #ffffff;
|
|
|
font-size: #{26rpx};
|
|
|
padding: 40rpx #{30rpx} 0;
|
|
|
+ &.fixed{
|
|
|
+ position: fixed;
|
|
|
+ }
|
|
|
.share-info{
|
|
|
display: flex;
|
|
|
align-items: center;
|