diff --git a/web/src/components/mini-program-preview.vue b/web/src/components/mini-program-preview.vue index 1d6943f..69114cf 100644 --- a/web/src/components/mini-program-preview.vue +++ b/web/src/components/mini-program-preview.vue @@ -19,7 +19,7 @@ - +
@@ -59,6 +59,21 @@ export default { } return ret; }, + scan_button_text: function() { + return this.data && this.data.scan_button ? this.data.scan_button.text : '开始扫码'; + }, + scan_button_style: function() { + var ret = {}; + if (this.data && this.data.scan_button) { + if (this.data.scan_button.color) { + ret.backgroundColor = this.data.scan_button.color; + } + if (this.data.scan_button.text_color) { + ret.color = this.data.scan_button.text_color; + } + } + return ret; + }, }, methods: { click_section: function (section) { diff --git a/web/src/views/mini-program-content.vue b/web/src/views/mini-program-content.vue index 83e6c07..f640520 100644 --- a/web/src/views/mini-program-content.vue +++ b/web/src/views/mini-program-content.vue @@ -16,6 +16,7 @@ +
@@ -73,6 +74,26 @@
+
+
扫码按钮
+
+ 按钮文字: + +
+
+ 按钮颜色: + + RGB: + +
+
+ 按钮文字颜色: + + RGB: + +
+ +
图片展示
@@ -188,6 +209,11 @@ export default { d.icons ||= []; d.icons_per_line ||= 3; d.static ||= []; + d.scan_button ||= { + text: '开始扫码', + color: '#008000', + text_color: '#ffffff', + }; var white = '#ffffff'; d.background ||= { type: 'none',