Merge remote-tracking branch 'origin/master'

main
king 1 year ago
commit 85451d9ca5
  1. 1
      package.json
  2. 2202
      pnpm-lock.yaml
  3. 1
      src/app.scss
  4. 2
      src/pages/preview/brand/info/info.tsx
  5. 2
      src/pages/preview/brand/list/list.module.scss
  6. 12
      src/pages/preview/brand/list/list.tsx

@ -58,6 +58,7 @@
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-refresh": "^0.11.0", "react-refresh": "^0.11.0",
"taro-ui": "^3.1.1",
"unstated-next": "^1.1.0" "unstated-next": "^1.1.0"
}, },
"devDependencies": { "devDependencies": {

File diff suppressed because it is too large Load Diff

@ -1,4 +1,5 @@
@import "static/css/module"; @import "static/css/module";
@import 'taro-ui/dist/style/index.scss';
.flex {display: flex !important;flex-direction:row} .flex {display: flex !important;flex-direction:row}
.flex-row{ flex-direction:row!important} .flex-row{ flex-direction:row!important}

@ -99,7 +99,7 @@ const BrandInfo: FC = () => {
} }
</Swiper> </Swiper>
<View className={styles.curIndexBox}> <View className={styles.curIndexBox}>
<Text>{curIndex} / {brandInfo?.brand_album?.split(',').length + ((brandInfo && brandInfo.introductory_video_resource) ? 1:0)}</Text> <Text>{curIndex} / {(brandInfo?.brand_album?.split(',').length || 0) + ((brandInfo && brandInfo.introductory_video_resource) ? 1:0)}</Text>
</View> </View>
<View className={styles['body']}> <View className={styles['body']}>
<View className={styles['top']}> <View className={styles['top']}>

@ -9,7 +9,7 @@
.image{ .image{
width: 128rpx; width: 128rpx;
height:128rpx; height:128rpx;
background-color: pink; background-color: #ededed;
border-radius: 8rpx; border-radius: 8rpx;
} }
.rightBox{ .rightBox{

@ -4,6 +4,9 @@ import {brandApi, BrandRecord} from "@/api";
import styles from './list.module.scss' import styles from './list.module.scss'
import Taro, {useReachBottom} from "@tarojs/taro"; import Taro, {useReachBottom} from "@tarojs/taro";
import Empty from "@/components/empty/empty"; import Empty from "@/components/empty/empty";
import {AtActivityIndicator} from "taro-ui";
const BrandList: FC = () => { const BrandList: FC = () => {
const [page, setPage] = useState(1) const [page, setPage] = useState(1)
@ -24,7 +27,7 @@ const BrandList: FC = () => {
const getData = useCallback(async () => { const getData = useCallback(async () => {
try { try {
setText('加载中..') setText('加载中...')
const res = await brandApi.list(page, 10) const res = await brandApi.list(page, 10)
if(page === 1){ if(page === 1){
if(res.list.length < 10) { if(res.list.length < 10) {
@ -69,7 +72,12 @@ const BrandList: FC = () => {
</View> </View>
</View>) </View>)
} }
<View style={{width:'750rpx',textAlign:'center',color:'#ccc'}} className="font-28 mt-3">{text}</View> { text === '加载中...' ?
<View style={{width:'710rpx',display:'flex',justifyContent:'center'}} className="mt-3">
<AtActivityIndicator color={'#999'} content='加载中...'></AtActivityIndicator>
</View>:
<View style={{width:'710rpx',textAlign:'center',color:'#999'}} className="font-28 mt-3">{text}</View>
}
</>: <Empty name='空空如也'/> </>: <Empty name='空空如也'/>
} }
</View> </View>

Loading…
Cancel
Save