diff --git a/components/diy/custom.vue b/components/diy/custom.vue
index 44290486..7f5d7cf7 100644
--- a/components/diy/custom.vue
+++ b/components/diy/custom.vue
@@ -5,19 +5,19 @@
-
+
-
+
-
+
-
+
@@ -239,7 +239,13 @@ import { isEmpty } from '../../common/js/common/common';
data_source: !isEmpty(new_form.data_source)? new_form.data_source : '',
});
},
- url_event(e) {
+ url_event(e, index = 0) {
+ if (this.data_source == 'goods') {
+ const list = this.data_source_content_list[index];
+ if (!isEmpty(list)) {
+ app.globalData.goods_data_cache_handle(list.data.id, list.data);
+ }
+ }
app.globalData.url_event(e);
},
},
diff --git a/components/diy/modules/custom/model-icon.vue b/components/diy/modules/custom/model-icon.vue
index b903d9f7..ba0c1ab6 100644
--- a/components/diy/modules/custom/model-icon.vue
+++ b/components/diy/modules/custom/model-icon.vue
@@ -1,5 +1,5 @@
-
+
@@ -41,6 +41,7 @@ import { isEmpty } from '../../../../common/js/common/common';
com_style: '',
scale: 1,
icon_class: '',
+ icon_url: '',
};
},
watch: {
@@ -69,11 +70,20 @@ import { isEmpty } from '../../../../common/js/common/common';
icon_class_value = '';
}
}
+ let url = '';
+ if (!isEmpty(this.propValue.icon_link)) {
+ url = this.propValue.icon_link?.page || '';
+ } else if (!isEmpty(this.propSourceList.data)) {
+ url = this.propSourceList.data[this.propValue?.data_source_link] || '';
+ } else {
+ url = this.propSourceList[this.propValue?.data_source_link] || '';
+ }
this.setData({
form: this.propValue,
scale: this.propScale,
com_style: this.get_com_style(this.propValue, this.propScale),
icon_class: icon_class_value,
+ icon_url: url,
});
},
get_com_style(form, scale) {
diff --git a/components/diy/modules/custom/model-image.vue b/components/diy/modules/custom/model-image.vue
index 743778bf..eb0fdae7 100644
--- a/components/diy/modules/custom/model-image.vue
+++ b/components/diy/modules/custom/model-image.vue
@@ -1,5 +1,5 @@
-
+
@@ -41,6 +41,7 @@
return {
form: {},
img: '',
+ img_url: '',
image_style: '',
border_style: '',
keyMap: {
@@ -60,12 +61,20 @@
},
methods: {
init() {
-
+ let url = '';
+ if (!isEmpty(this.propValue.icon_link)) {
+ url = this.propValue.icon_link?.page || '';
+ } else if (!isEmpty(this.propSourceList.data)) {
+ url = this.propSourceList.data[this.propValue?.data_source_link] || '';
+ } else {
+ url = this.propSourceList[this.propValue?.data_source_link] || '';
+ }
this.setData({
form: this.propValue,
img: this.get_img_url(this.propValue),
image_style: this.get_image_style(this.propValue, this.propScale),
border_style: this.get_border_style(this.propValue, this.propScale),
+ img_url: url,
});
},
get_img_url(form) {
diff --git a/components/diy/modules/custom/model-text.vue b/components/diy/modules/custom/model-text.vue
index bd9642d7..e32a89ac 100644
--- a/components/diy/modules/custom/model-text.vue
+++ b/components/diy/modules/custom/model-text.vue
@@ -1,5 +1,5 @@
-
+
@@ -47,6 +47,7 @@
text_title: '',
text_style: '',
com_style: '',
+ text_url: '',
keyMap: {
goods: 'title',
article: 'title',
@@ -64,11 +65,20 @@
},
methods: {
init() {
+ let url = '';
+ if (!isEmpty(this.propValue.icon_link)) {
+ url = this.propValue.icon_link?.page || '';
+ } else if (!isEmpty(this.propSourceList.data)) {
+ url = this.propSourceList.data[this.propValue?.data_source_link] || '';
+ } else {
+ url = this.propSourceList[this.propValue?.data_source_link] || '';
+ }
this.setData({
form: this.propValue,
text_title: this.get_text_title(this.propValue),
text_style: this.get_text_style(this.propValue, this.propScale),
com_style: this.get_com_style(this.propValue, this.propScale),
+ text_url: url,
});
},
get_text_title(form) {