diff --git a/components/diy/diy.vue b/components/diy/diy.vue
index e674dfcd..3dfb1a1e 100644
--- a/components/diy/diy.vue
+++ b/components/diy/diy.vue
@@ -13,30 +13,30 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -116,6 +116,10 @@
type: [String, Number],
default: '',
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
components: {
componentDiyHeader,
@@ -208,9 +212,19 @@
hack_reset: false,
// 底部导航高度
footer_height_value: 0,
+ diy_key: '',
};
},
- created() {
+ watch: {
+ propkey(val) {
+ this.setData({
+ diy_key: val
+ })
+ // 初始化
+ this.init();
+ }
+ },
+ created() {
// 初始化配置
this.init_config();
diff --git a/components/diy/goods-list.vue b/components/diy/goods-list.vue
index 892805af..720817bc 100644
--- a/components/diy/goods-list.vue
+++ b/components/diy/goods-list.vue
@@ -187,6 +187,10 @@
type: Boolean,
default: true,
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -225,6 +229,15 @@
return gradient_handle(this.new_style.shop_button_color, '180deg');
},
},
+ watch: {
+ propkey(val) {
+ this.setData({
+ form: this.propValue.content,
+ new_style: this.propValue.style,
+ });
+ this.init();
+ }
+ },
created() {
this.setData({
form: this.propValue.content,
diff --git a/components/diy/goods-tabs.vue b/components/diy/goods-tabs.vue
index aa92c1a3..1cd6a318 100644
--- a/components/diy/goods-tabs.vue
+++ b/components/diy/goods-tabs.vue
@@ -45,6 +45,10 @@
type: Boolean,
default: false,
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -79,6 +83,11 @@
}
},
},
+ watch: {
+ propkey(val) {
+ this.init();
+ }
+ },
created() {
this.init();
},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 371594c7..20e9b30f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -3,8 +3,8 @@
-
-
+
+
@@ -402,8 +402,7 @@
plugins_binding_data: null,
// 魔方插件
plugins_magic_data: null,
- // 更新组件
- hackReset: true,
+ diy_key: '',
};
},
@@ -439,17 +438,8 @@
onShow() {
// 调用公共事件方法
app.globalData.page_event_onshow_handle();
- this.setData({
- hackReset: false,
- });
- this.$nextTick(() => {
- this.setData({
- hackReset: true,
- });
- });
// 数据加载
this.init();
-
// 初始化配置
this.init_config();
@@ -587,6 +577,9 @@
// 初始化返回公共处理
this.init_result_common_handle();
+ this.setData({
+ diy_key: Math.random(),
+ });
},
fail: () => {
// 轮播数据处理