diff --git a/package.json b/package.json index 691f54d..1592b43 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dev:quickapp": "npm run build:quickapp -- --watch", "build:weapp:pre": "cross-env NODE_ENV=pre taro build --type weapp", "dev:weapp:pre": "cross-env NODE_ENV=pre npm run build:weapp -- --watch", - "buildo:weapp:open": "taro build --type weapp --open", + "build:weapp:open": "taro build --type weapp --open", "build:weapp:upload": "taro build --type weapp --upload", "build:weapp:preview": "taro build --type weapp --preview" }, diff --git a/src/common/constant.js b/src/common/constant.js index c2f3a40..08f3a2c 100644 --- a/src/common/constant.js +++ b/src/common/constant.js @@ -1,4 +1,4 @@ -// 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` @@ -12,7 +12,7 @@ // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 // export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 -export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 +// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 // export const BASE_URL = `http://192.168.1.22:50002/lymarket` // 婷 // export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰 diff --git a/src/components/banner/index.tsx b/src/components/banner/index.tsx index b38c592..897d0a4 100644 --- a/src/components/banner/index.tsx +++ b/src/components/banner/index.tsx @@ -2,7 +2,7 @@ import { Image, Swiper, SwiperItem, View } from '@tarojs/components' import { goLink } from '@/common/common' import { GetBannerList } from '@/api/banner' import styles from './index.module.scss' -import { useEffect, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import { formatImgUrl } from '@/common/fotmat' type item = { title: string; img: string; url: string; id: number } @@ -35,9 +35,13 @@ export default (props: params) => { } } + const showDot = useMemo(() => { + return list.length > 1 + }, [list]) + return ( - + {list?.map((item) => { return (