jufubao-base 1.0.63-beta211 → 1.0.63-beta213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-background__body">
|
|
17
|
-
<view
|
|
17
|
+
<view :style="{background:backgroundColor,color:warningColor}" class="jfb-base-background__body-pop" v-if="isPreview">设置背景模式方便编辑(占位),在线上此模块不显</view>
|
|
18
18
|
</view>
|
|
19
19
|
</view>
|
|
20
20
|
</template>
|
|
@@ -27,6 +27,7 @@ import { getContainerPropsValue } from "@/utils/xd.base";
|
|
|
27
27
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
28
28
|
import extsMixins from "@/mixins/extsMixins";
|
|
29
29
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
30
|
+
const Color = require("color");
|
|
30
31
|
export default {
|
|
31
32
|
name: "JfbBaseBackground",
|
|
32
33
|
components: {
|
|
@@ -34,7 +35,10 @@ export default {
|
|
|
34
35
|
},
|
|
35
36
|
mixins: [componentsMixins, extsMixins, JfbBaseBackgroundMixin],
|
|
36
37
|
data() {
|
|
37
|
-
return {
|
|
38
|
+
return {
|
|
39
|
+
isPreview: false,
|
|
40
|
+
backgroundColor: ''
|
|
41
|
+
};
|
|
38
42
|
},
|
|
39
43
|
watch: {
|
|
40
44
|
container(value) {
|
|
@@ -42,6 +46,8 @@ export default {
|
|
|
42
46
|
},
|
|
43
47
|
},
|
|
44
48
|
created() {
|
|
49
|
+
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
50
|
+
this.isPreview = this.$configProject["isPreview"];
|
|
45
51
|
this.init(this.container);
|
|
46
52
|
},
|
|
47
53
|
methods: {
|
|
@@ -60,7 +66,10 @@ export default {
|
|
|
60
66
|
page_size: 1,
|
|
61
67
|
},
|
|
62
68
|
}).then((res) => {
|
|
69
|
+
if(!res.list||res.list.length===0) return
|
|
70
|
+
console.log(res.list[0]["image_url"],'res.list[0]["image_url"]');
|
|
63
71
|
let bg = getServiceUrl(res.list[0]["image_url"]);
|
|
72
|
+
console.log(bg,'bgbgbg');
|
|
64
73
|
this.$xdRoot.$emit("setLayoutPageBg", bg);
|
|
65
74
|
});
|
|
66
75
|
} catch (error) {
|
|
@@ -70,6 +79,9 @@ export default {
|
|
|
70
79
|
onJfbScroll(options) {
|
|
71
80
|
console.log("event.onJfbScroll", options);
|
|
72
81
|
},
|
|
82
|
+
onJfbUpdate() {
|
|
83
|
+
this.init();
|
|
84
|
+
}
|
|
73
85
|
},
|
|
74
86
|
};
|
|
75
87
|
</script>
|
|
@@ -79,6 +91,15 @@ export default {
|
|
|
79
91
|
|
|
80
92
|
.jfb-base-background {
|
|
81
93
|
&__body {
|
|
94
|
+
min-height: 100rpx;
|
|
95
|
+
&-pop {
|
|
96
|
+
min-height: 100rpx;
|
|
97
|
+
text-align: center;
|
|
98
|
+
vertical-align: middle;
|
|
99
|
+
color: #666;
|
|
100
|
+
font-size: unit(24, rpx);
|
|
101
|
+
line-height: 100rpx;
|
|
102
|
+
}
|
|
82
103
|
}
|
|
83
104
|
}
|
|
84
105
|
</style>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
<view
|
|
11
11
|
class="thumb"
|
|
12
|
+
:class="{noImageUrl: !imageUrl}"
|
|
12
13
|
v-if="!playStatus"
|
|
13
14
|
:style="{borderRadius: radius + 'rpx'}"
|
|
14
15
|
>
|
|
@@ -172,6 +173,9 @@
|
|
|
172
173
|
|
|
173
174
|
<style scoped lang="less">
|
|
174
175
|
.video-box {
|
|
176
|
+
view.noImageUrl {
|
|
177
|
+
background: #333;
|
|
178
|
+
}
|
|
175
179
|
view.thumb {
|
|
176
180
|
height: 100%;
|
|
177
181
|
width: 100%;
|