From 8b239a0aae023f51c07298a5e23fc53146ee83e7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 4 Jan 2024 22:22:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20code=20review=EF=BC=9A=E3=80=90?= =?UTF-8?q?=E5=88=86=E9=94=80=E3=80=91=E6=88=91=E7=9A=84=E5=9B=A2=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/promotion/diy/template.js | 12 ++++++------ sheep/request/index.js | 4 ++-- .../uni-data-checkbox/uni-data-checkbox.vue | 4 +++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sheep/api/promotion/diy/template.js b/sheep/api/promotion/diy/template.js index 7afa1569..abf0d5e8 100644 --- a/sheep/api/promotion/diy/template.js +++ b/sheep/api/promotion/diy/template.js @@ -1,12 +1,12 @@ import request from '@/sheep/request'; const DiyTemplateApi = { - // getUsedDiyTemplate: () => { - // return request({ - // url: '/app-api/promotion/diy-template/used', - // method: 'GET', - // }); - // }, + getUsedDiyTemplate: () => { + return request({ + url: '/app-api/promotion/diy-template/used', + method: 'GET', + }); + }, getDiyTemplate: (id) => { return request({ url: '/app-api/promotion/diy-template/get', diff --git a/sheep/request/index.js b/sheep/request/index.js index ec964987..f350792e 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -214,8 +214,8 @@ const request = (config) => { } // TODO 芋艿:额外拼接 if (config.url.indexOf('/app-api/') >= 0) { - config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 - // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 + // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 + config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 // config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】 } return http.middleware(config); diff --git a/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue b/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue index 3c75d9f4..abcf423d 100644 --- a/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue +++ b/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue @@ -154,6 +154,7 @@ }, value(newVal) { this.dataList = this.getDataList(newVal) + // TODO @芋艿:这块可能被错误的注释了,需要跟进下 // fix by mehaotian is_reset 在 uni-forms 中定义 // if(!this.is_reset){ // this.is_reset = false @@ -162,6 +163,7 @@ }, modelValue(newVal) { this.dataList = this.getDataList(newVal); + // TODO @芋艿:这块可能被错误的注释了,需要跟进下 // if(!this.is_reset){ // this.is_reset = false // this.formItem && this.formItem.setValue(newVal) @@ -405,7 +407,7 @@ let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' styles['background-color'] = item.selected?selectedColor:'#fff' styles['border-color'] = item.selected?selectedColor:'#DCDFE6' - + if(!item.selected && item.disabled){ styles['background-color'] = '#F2F6FC' styles['border-color'] = item.selected?selectedColor:'#DCDFE6'