Commit c9a32492 authored by GuanHua's avatar GuanHua

fix: 1.修复品牌为空时无法下单问题,2.修复用户信用积分显示不正确的问题

parent dce96c02
...@@ -2,7 +2,6 @@ import React from 'react' ...@@ -2,7 +2,6 @@ import React from 'react'
import { PlayCircleOutlined } from '@ant-design/icons' import { PlayCircleOutlined } from '@ant-design/icons'
import cx from 'classnames' import cx from 'classnames'
import { Link } from 'umi' import { Link } from 'umi'
import default_img from '@/assets/imgs/template_default_img.png'
import styles from './index.less' import styles from './index.less'
interface TemplateItemPropsType { interface TemplateItemPropsType {
......
...@@ -547,8 +547,8 @@ const CommodityDetail = (props) => { ...@@ -547,8 +547,8 @@ const CommodityDetail = (props) => {
name: commodityDetail.name, name: commodityDetail.name,
priceRange: commodityPriceInfo, priceRange: commodityPriceInfo,
memberDiscount: parameter, memberDiscount: parameter,
category: commodityDetail.customerCategory.name, category: commodityDetail.customerCategory && commodityDetail.customerCategory.name,
brand: commodityDetail.brand.name, brand: commodityDetail.brand && commodityDetail.brand.name,
stockCount: stockCount, stockCount: stockCount,
minOrder: commodityDetail.minOrder, minOrder: commodityDetail.minOrder,
commodityPic: attrAndValList.commodityPic ? attrAndValList.commodityPic[0] : commodityDetail.mainPic, commodityPic: attrAndValList.commodityPic ? attrAndValList.commodityPic[0] : commodityDetail.mainPic,
......
...@@ -74,7 +74,7 @@ const TopBar: React.FC<TopBarPropsType> = (props) => { ...@@ -74,7 +74,7 @@ const TopBar: React.FC<TopBarPropsType> = (props) => {
<div className={styles.userInfo_card_header}> <div className={styles.userInfo_card_header}>
<ImageBox width={64} height={64} circle={true} direction="column" imgUrl={defaultAvatar} /> <ImageBox width={64} height={64} circle={true} direction="column" imgUrl={defaultAvatar} />
<div className={styles.userInfo_card_column}> <div className={styles.userInfo_card_column}>
<div className={styles.credit_count}>信用积分:<span>{numFormat(userInfo.score || 0)}</span></div> <div className={styles.credit_count}>信用积分:<span>{numFormat(userInfo.creditPoint || 0)}</span></div>
<div className={styles.user_type}>{userInfo.levelTag}</div> <div className={styles.user_type}>{userInfo.levelTag}</div>
</div> </div>
<div className={styles.sign_out_btn} onClick={handleSignOut}>退出账号</div> <div className={styles.sign_out_btn} onClick={handleSignOut}>退出账号</div>
......
...@@ -565,8 +565,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -565,8 +565,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
name: item.commodityUnitPrice.commodity.name, name: item.commodityUnitPrice.commodity.name,
minOrder: item.commodityUnitPrice.commodity.minOrder, minOrder: item.commodityUnitPrice.commodity.minOrder,
priceRange: item.commodityUnitPrice.priceRange, priceRange: item.commodityUnitPrice.priceRange,
category: item.commodityUnitPrice.commodity.customerCategory.name, category: item.commodityUnitPrice.commodity.customerCategory && item.commodityUnitPrice.commodity.customerCategory.name,
brand: item.commodityUnitPrice.commodity.brand.name, brand: item.commodityUnitPrice.commodity.brand && item.commodityUnitPrice.commodity.brand.name,
commodityPic: item.commodityUnitPrice.commodity.mainPic, commodityPic: item.commodityUnitPrice.commodity.mainPic,
attribute: item.commodityUnitPrice.attributeAndValueList, attribute: item.commodityUnitPrice.attributeAndValueList,
stockCount: item.stockCount || 0, stockCount: item.stockCount || 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment