From 5989ecd8adbf58ca650ec305279fed2c3b15f578 Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Tue, 13 Dec 2022 18:54:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9E=20fix(=E7=89=B9=E8=89=B2?= =?UTF-8?q?=E7=99=BE=E7=A7=91=E5=92=8C=E5=88=A0=E9=99=A4=E5=BC=B9=E7=AA=97?= =?UTF-8?q?):=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=92=8C=E7=89=B9=E8=89=B2=E7=99=BE=E7=A7=91=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/constant.ts | 4 +-- .../details/components/feature/index.tsx | 4 +-- src/pages/searchList/search.tsx | 36 ++++++++++++------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/common/constant.ts b/src/common/constant.ts index 2f06165..cc281c1 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -1,11 +1,11 @@ -export const BASE_URL = CURRENT_BASE_URL +// export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 // export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 -// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 +export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 diff --git a/src/pages/details/components/feature/index.tsx b/src/pages/details/components/feature/index.tsx index fcb0335..e3ee7fe 100644 --- a/src/pages/details/components/feature/index.tsx +++ b/src/pages/details/components/feature/index.tsx @@ -31,9 +31,9 @@ const FeaturePopup = (param: Props) => { const res = await fetchData({ product_id: productIds }) if (res.data) { + Taro.hideLoading() setnodes(res.data.instructions) setlist([...res.data.product_list]) - Taro.hideLoading() } else { Taro.hideLoading() @@ -50,7 +50,7 @@ const FeaturePopup = (param: Props) => { param.closePopup?.()}> - {param.productName} + {param?.productName} 推荐面料 diff --git a/src/pages/searchList/search.tsx b/src/pages/searchList/search.tsx index 2456660..5666f9e 100644 --- a/src/pages/searchList/search.tsx +++ b/src/pages/searchList/search.tsx @@ -141,20 +141,30 @@ export default () => { // 删除历史搜索 const { fetchData: deleteFetch } = mallsearchHistorydelete() const handDelete = async() => { - const res = await deleteFetch() - Taro.showLoading({ - title: '请稍等...', + Taro.showModal({ + title: '确定删除历史搜索记录吗?', + async success(res) { + if (res.confirm) { + const resrult = await deleteFetch() + if (resrult) { + Taro.showLoading({ + title: '请稍等...', + }) + alert.success('删除成功') + getSearchHistory() + setSearchData(val => ({ ...val, showIndex: 1 })) + Taro.hideLoading() + } + else { + alert.error('删除失败') + Taro.hideLoading() + } + } + else if (res.cancel) { + console.log('用户点击取消') + } + }, }) - if (res) { - alert.success('删除成功') - getSearchHistory() - setSearchData(val => ({ ...val, showIndex: 1 })) - Taro.hideLoading() - } - else { - alert.error('删除失败') - Taro.hideLoading() - } } return ( From 78a5e228976f6918e33ccb275764fffff0ac3ea8 Mon Sep 17 00:00:00 2001 From: xuan Date: Tue, 13 Dec 2022 19:08:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1000965):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=94=B6=E8=97=8F=E5=A4=B9=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=88=B7=E6=96=B0=E5=88=B0=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E9=87=8C=E6=9D=A5=E8=BF=9B=E8=A1=8C=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【新增收藏夹成功后,没有刷新到选项里来进行选择】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001000965 --- src/components/addCollection/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/addCollection/index.tsx b/src/components/addCollection/index.tsx index 64e9a89..a85e357 100644 --- a/src/components/addCollection/index.tsx +++ b/src/components/addCollection/index.tsx @@ -1,4 +1,5 @@ import { Input, ScrollView, Text, View } from '@tarojs/components' +import { useDidShow } from '@tarojs/taro' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' import classnames from 'classnames' import IconFont from '../iconfont/iconfont' @@ -27,6 +28,11 @@ const AddCollection = (props: AddCollectionParam) => { const res = await fetchDataList(getFilterData()) setList(() => res.data.list) } + useDidShow(() => { + if (show) { + getFavoriteList() + } + }) useEffect(() => { if (show) { getFavoriteList() } }, [show])