From f5eb0eda47db81c4530d915dbc2fb5f699ca3ce9 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 14 Apr 2023 19:04:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E6=A0=BC=E5=88=87=E6=8D=A2=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 8 ++++---- components/goods-buy/goods-buy.vue | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/App.vue b/App.vue index 926cc33f..8307c9fd 100644 --- a/App.vue +++ b/App.vue @@ -196,7 +196,7 @@ var url = this.data.request_url + (group || "api")+".php?s=" + c + "/" + a + plugins_params; return this.request_params_handle(url) + "&ajax=ajax" + params; }, - + /** * 请求参数处理 * url url地址 @@ -211,14 +211,14 @@ var join = (url.indexOf('?') == -1) ? '?' : '&'; return url + join + "system_type="+ this.data.system_type +"&application=app&application_client_type="+ client_value + "&token=" + token + "&uuid=" + uuid; }, - + /** * 获取tab页面切换参数 */ get_page_tabbar_switch_params() { return uni.getStorageSync(this.data.cache_page_tabbar_switch_params) || null; }, - + /** * 删除tab页面切换参数 */ @@ -288,7 +288,7 @@ get_launch_cache_info() { return uni.getStorageSync(this.data.cache_launch_info_key) || null; }, - + /** * 系统参数设置 */ diff --git a/components/goods-buy/goods-buy.vue b/components/goods-buy/goods-buy.vue index 110c6541..1bfaec9e 100644 --- a/components/goods-buy/goods-buy.vue +++ b/components/goods-buy/goods-buy.vue @@ -236,6 +236,7 @@ // 规格选择处理 goods_spec_choice_handle(key, keys) { var temp_spec = this.goods_spec_choose; + var temp_images = this.goods_spec_base_images; // 不能选择和禁止选择跳过 if ((temp_spec[key]['value'][keys]['is_dont'] || null) == null && (temp_spec[key]['value'][keys]['is_disabled'] || null) == null) { // 规格选择 @@ -245,6 +246,9 @@ if (key == i) { if (keys == k && (temp_spec[i]['value'][k]['is_active'] || null) == null) { temp_spec[i]['value'][k]['is_active'] = 'cr-white bg-main br-main'; + if ((temp_spec[i]['value'][k]['images'] || null) != null) { + temp_images = temp_spec[i]['value'][k]['images']; + } } else { temp_spec[i]['value'][k]['is_active'] = ''; } @@ -253,7 +257,8 @@ } } this.setData({ - spec: temp_spec + spec: temp_spec, + goods_spec_base_images: temp_images, }); // 不能选择规格处理