Commit bdb42e83 authored by GuanHua's avatar GuanHua

feat:logo样式修改,申请成为会员接口对接

parent 28f5dc53
......@@ -4,10 +4,14 @@
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
&>img {
width: 127px;
display: block;
margin: 0 auto;
height: 44px;
max-width: 127px;
}
}
......
......@@ -141,7 +141,8 @@
height: 32px;
background-color: #D32F2F;
color: #FFF;
line-height: 32px;
border: none;
outline: none;
text-align: center;
font-size: 12px;
cursor: pointer;
......
import React from 'react'
import { Rate } from 'antd'
import React, { useState } from 'react'
import { Rate, Button } from 'antd'
import { Link } from 'umi'
import { PublicApi } from '@/services/api'
import shop_icon from '@/assets/imgs/shop_icon.png'
import credit_icon from '@/assets/imgs/credit_icon.png'
import styles from './index.less'
......@@ -12,6 +13,24 @@ interface ShopInfoPropsType {
const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const { shopInfo, shopUrlParam } = props
const [applyLoading, setApplyLoading] = useState<boolean>(false)
const applyFroVip = () => {
if (shopInfo) {
let param = {
memberId: shopInfo.memberId,
roleId: shopInfo.roleId
}
setApplyLoading(true)
PublicApi.postMemberAbilityMallSubApply(param).then((res) => {
if (res.code === 1000) { }
setApplyLoading(false)
}).catch(() => {
setApplyLoading(false)
})
}
}
return (
<div className={styles.shop_info}>
......@@ -24,12 +43,12 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<div className={styles.shop_about}>
<div className={styles.shop_about_item}>
<i className={styles.icon}><img src={shop_icon} /></i>
<span className={styles.red}>2</span>
<span className={styles.red}>{shopInfo?.registerYears}</span>
<span></span>
</div>
<div className={styles.shop_about_item}>
<i className={styles.icon}><img src={credit_icon} /></i>
<span>1288</span>
<span>200</span>
</div>
</div>
<div className={styles.shop_info_list}>
......@@ -47,7 +66,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
</div>
<div className={styles.shop_info_list_item}>
<div className={styles.label}>营业执照:</div>
<div className={styles.breif}><span className={styles.certified}>[已认证]</span></div>
<div className={styles.breif}><span className={styles.certified}>{shopInfo?.outerStatus === 3 ? '[已认证]' : '[未认证]'}</span></div>
</div>
</div>
<div className={styles.dashed_split}></div>
......@@ -55,7 +74,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<div className={styles.shop_info_btn}><Link to={`/shop?shopId=${shopUrlParam}`}>进入店铺</Link></div>
<div className={styles.shop_info_btn}>收藏本店</div>
</div>
<div className={styles.apply_member_btn}>申请成为本店会员</div>
<Button loading={applyLoading} className={styles.apply_member_btn} onClick={() => applyFroVip()}>申请成为本店会员</Button>
</div>
)
}
......
import React, { useState, Fragment } from 'react'
import React, { useState } from 'react'
import cx from 'classnames'
import { Link } from 'umi'
import { ArrowRightOutlined } from '@ant-design/icons'
import { Carousel } from 'antd'
import { LAYOUT_TYPE } from '@/constants'
import { GetTemplateShopFindShopResponse, GetTemplateChannelFindChannelResponse } from '@/services/TemplateApi'
import styles from './index.less'
enum TAB_TYPE {
......@@ -13,7 +12,7 @@ enum TAB_TYPE {
}
interface AboutUsPropsType {
shopInfo: GetTemplateShopFindShopResponse | GetTemplateChannelFindChannelResponse,
shopInfo: any,
shopUrlParam?: string,
type: LAYOUT_TYPE
}
......
......@@ -14,13 +14,16 @@
align-items: center;
.logo {
position: relative;
width: 145px;
height: 50px;
display: inline-block;
margin: 0 95px 0 17px;
overflow: hidden;
&>img {
width: 145px;
display: block;
margin: 0 auto;
height: 50px;
}
}
......
......@@ -3,7 +3,6 @@ import { CaretDownOutlined } from '@ant-design/icons'
import { Rate, Input, Button } from 'antd'
import { history, Link } from 'umi'
import isEmpty from 'lodash/isEmpty'
// import logo from '@/theme/imgs/logo_w.png'
import shop_icon from '@/assets/imgs/shop_icon.png'
import credit_icon from '@/assets/imgs/credit_icon.png'
import styles from './index.less'
......@@ -46,9 +45,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
}
setApplyLoading(true)
PublicApi.postMemberAbilityMallSubApply(param).then((res) => {
if (res.code === 1000) {
}
if (res.code === 1000) { }
setApplyLoading(false)
}).catch(() => {
setApplyLoading(false)
......@@ -56,6 +53,8 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
}
}
return (
<div className={styles.shop_header}>
<div className={styles.shop_header_container}>
......@@ -105,7 +104,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
</div>
<div className={styles.shop_info_list_item}>
<div className={styles.label}>营业执照:</div>
<div className={styles.breif}><span className="certified">{shopInfo?.outerStatus === 3 ? '[已认证]' : '[未认证]'}</span></div>
<div className={styles.breif}><span className={styles.certified}>{shopInfo?.outerStatus === 3 ? '[已认证]' : '[未认证]'}</span></div>
</div>
</div>
<div className={styles.dashed_split}></div>
......
import React, { useState } from 'react'
import { Rate, Carousel } from 'antd'
import { Rate, Button } from 'antd'
import { LeftOutlined, RightOutlined } from '@ant-design/icons'
import cx from 'classnames'
import shop_icon from '@/assets/imgs/shop_icon.png'
import credit_icon from '@/assets/imgs/credit_icon.png'
import companyImg from '@/assets/imgs/company_img.png'
import { GetTemplateShopFindShopResponse } from '@/services/TemplateApi'
import { PublicApi } from '@/services/api'
import styles from './index.less'
interface ShopAboutPropType {
shopInfo: GetTemplateShopFindShopResponse
shopInfo: any
}
const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
const { shopInfo } = props
const [offSetLeft, setOffSetLeft] = useState<number>(0)
const [applyLoading, setApplyLoading] = useState<boolean>(false)
const unitDistance = 406
const handlePrev = () => {
......@@ -31,6 +31,23 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
setOffSetLeft(offSetLeft - unitDistance)
}
}
const applyFroVip = () => {
if (shopInfo) {
let param = {
memberId: shopInfo.memberId,
roleId: shopInfo.roleId
}
setApplyLoading(true)
PublicApi.postMemberAbilityMallSubApply(param).then((res) => {
if (res.code === 1000) { }
setApplyLoading(false)
}).catch(() => {
setApplyLoading(false)
})
}
}
return (
<div className={styles.shop_about}>
<div className={styles.shop_about_container}>
......@@ -56,7 +73,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
<div className={cx(styles.shop_about_info_item)}>
<div className={styles.shop_about_btn_group}>
<div className={styles.shop_about_btn}>收藏本店</div>
<div className={cx(styles.shop_about_btn, styles.primary)}>申请成为本店会员</div>
<Button loading={applyLoading} className={cx(styles.shop_about_btn, styles.primary)} onClick={() => applyFroVip()}>申请成为本店会员</Button>
</div>
</div>
......
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