✨ feat(ID1000800浮窗提示客户经理电话完成):
This commit is contained in:
parent
09d8d8f1ca
commit
d7ef14a1a9
@ -5,12 +5,12 @@ export const BASE_URL = CURRENT_BASE_URL
|
|||||||
// export const BASE_URL = `http://192.168.0.89:40001/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 = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `https://test.zzfzyc.com/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:40001/lymarket` // 发
|
||||||
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
||||||
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
||||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||||
// export const BASE_URL = `https://www.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.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.28:50002/lymarket' // 婷
|
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
import React, { useState, useEffect, FC } from "react";
|
import React, { useState, useEffect, FC } from "react";
|
||||||
import { Block, View } from "@tarojs/components";
|
import { Block, View } from "@tarojs/components";
|
||||||
import "./iconfont.scss";
|
import "./iconfont.scss";
|
||||||
@ -25,7 +24,7 @@ function hex2rgb(hex) {
|
|||||||
return "rgb(" + rgb.join(",") + ")";
|
return "rgb(" + rgb.join(",") + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IconNames = 'icon-rukou' | 'icon-renzhengchenggong' | 'icon-paixu' | 'icon-shaixuan' | 'icon-bodakehujingli' | 'icon-guanfangweixinkefu' | 'icon-tuijianbiaoqian' | 'icon-rukou' | 'icon-renzhengchenggong' | 'icon-wodekefu' | 'icon-yanseduibi' | 'icon-dizhiguanli' | 'icon-weixin' | 'icon-riqi' | 'icon-shuru' | 'icon-a-0tianzhangqi' | 'icon-huodaofukuan' | 'icon-huozhuziti' | 'icon-saomazhifu' | 'icon-xianxiahuikuan' | 'icon-yufukuan' | 'icon-xinzengshoucangjia' | 'icon-qingchusousuo' | 'icon-xuanzechenggong' | 'icon-gongnengtubiao-saomiao' | 'icon-bianjizidingyimadan' | 'icon-zidingyimadanyulan' | 'icon-yuanshimadanyulan' | 'icon-xiala' | 'icon-shangla' | 'icon-qingchuxinxi' | 'icon-sousuo' | 'icon-guanli' | 'icon-bianji' | 'icon-shoucangjia' | 'icon-shezhi' | 'icon-tishi' | 'icon-erweima' | 'icon-dianjishoucang' | 'icon-gouwuche' | 'icon-shoucangchenggong' | 'icon-fenxiangshangpin' | 'icon-kefu' | 'icon-xinzenganniu' | 'icon-jianshaoanniu' | 'icon-daifahuo2' | 'icon-daishouhuo2' | 'icon-tuikuan-shouhou' | 'icon-daipeibu2' | 'icon-daifukuan2';
|
export type IconNames = 'icon-dianhua' | 'icon-rukou' | 'icon-renzhengchenggong' | 'icon-paixu' | 'icon-shaixuan' | 'icon-bodakehujingli' | 'icon-guanfangweixinkefu' | 'icon-tuijianbiaoqian' | 'icon-rukou' | 'icon-renzhengchenggong' | 'icon-wodekefu' | 'icon-yanseduibi' | 'icon-dizhiguanli' | 'icon-weixin' | 'icon-riqi' | 'icon-shuru' | 'icon-a-0tianzhangqi' | 'icon-huodaofukuan' | 'icon-huozhuziti' | 'icon-saomazhifu' | 'icon-xianxiahuikuan' | 'icon-yufukuan' | 'icon-xinzengshoucangjia' | 'icon-qingchusousuo' | 'icon-xuanzechenggong' | 'icon-gongnengtubiao-saomiao' | 'icon-bianjizidingyimadan' | 'icon-zidingyimadanyulan' | 'icon-yuanshimadanyulan' | 'icon-xiala' | 'icon-shangla' | 'icon-qingchuxinxi' | 'icon-sousuo' | 'icon-guanli' | 'icon-bianji' | 'icon-shoucangjia' | 'icon-shezhi' | 'icon-tishi' | 'icon-erweima' | 'icon-dianjishoucang' | 'icon-gouwuche' | 'icon-shoucangchenggong' | 'icon-fenxiangshangpin' | 'icon-kefu' | 'icon-xinzenganniu' | 'icon-jianshaoanniu' | 'icon-daifahuo2' | 'icon-daishouhuo2' | 'icon-tuikuan-shouhou' | 'icon-daipeibu2' | 'icon-daifukuan2';
|
||||||
|
|
||||||
type PropsType = {
|
type PropsType = {
|
||||||
name: IconNames;
|
name: IconNames;
|
||||||
@ -83,7 +82,11 @@ const IconFont:FC<PropsType> = ({
|
|||||||
className={classnames(icon, customClassName)}
|
className={classnames(icon, customClassName)}
|
||||||
/>
|
/>
|
||||||
)} */}
|
)} */}
|
||||||
|
{/* icon-dianhua */}
|
||||||
|
|
||||||
|
{ name === 'icon-dianhua' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M880.384 820.768c31.552-54.72 14.08-96.736-41.792-138.784-65.664-49.44-129.856-82.688-176-29.44 0 0-48.992 58.112-193.152-77.856-167.584-159.232-97.28-215.68-97.28-215.68 58.336-58.432 21.28-101.984-27.616-168-48.896-65.952-98.272-86.848-169.184-30.08C38.72 270.272 231.36 527.04 328.8 626.88c0 0 148.096 152.672 241.28 203.52l49.888 27.776c71.52 36.576 151.84 53.312 208.384 19.36 0 0 27.264-13.984 52.032-56.8z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,127,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) }
|
||||||
{/* icon-paixu */}
|
{/* icon-paixu */}
|
||||||
|
>>>>>>> f0abc88 (✨ feat(ID1000800浮窗提示客户经理电话完成):)
|
||||||
|
|
||||||
{ name === 'icon-paixu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 940l200-260H312zM512 84l200 260H312z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.5' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) }
|
{ name === 'icon-paixu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 940l200-260H312zM512 84l200 260H312z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.5' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) }
|
||||||
{/* icon-shaixuan */}
|
{/* icon-shaixuan */}
|
||||||
|
|||||||
@ -7,12 +7,17 @@
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 2px solid #cde5ff;
|
border: 2px solid #cde5ff;
|
||||||
box-shadow: 0px 0px 20px 0px rgba(104,180,255,0.70);
|
box-shadow: 0px 0px 20px 0px rgba(104, 180, 255, 0.7);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
position: fixed;
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.shop_icon {
|
.shop_icon {
|
||||||
font-size: 70px;
|
font-size: 70px;
|
||||||
color: $color_main;
|
color: $color_main;
|
||||||
@ -31,4 +36,19 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
.wxBtn {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no_bg_moveBtn {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
width: 130px;
|
||||||
|
height: 130px;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import { MovableArea, MovableView, View } from '@tarojs/components'
|
import { Button, Image, MovableArea, MovableView, View } from '@tarojs/components'
|
||||||
import Taro, { useDidShow, useReady, useRouter } from '@tarojs/taro'
|
import Taro, { useDidShow, useReady, useRouter } from '@tarojs/taro'
|
||||||
import type { ReactElement } from 'react'
|
import type { ReactElement } from 'react'
|
||||||
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||||
@ -7,49 +7,96 @@ import styles from './index.module.scss'
|
|||||||
import { GetShoppingCartApi } from '@/api/shopCart'
|
import { GetShoppingCartApi } from '@/api/shopCart'
|
||||||
import useCommonData from '@/use/useCommonData'
|
import useCommonData from '@/use/useCommonData'
|
||||||
import { useSelector } from '@/reducers/hooks'
|
import { useSelector } from '@/reducers/hooks'
|
||||||
|
import { alert } from '@/common/common'
|
||||||
|
import { formatImgUrl } from '@/common/fotmat'
|
||||||
|
|
||||||
|
type ShowStatus = 'shop'|'customer'|'order'
|
||||||
interface param {
|
interface param {
|
||||||
children?: ReactElement | null
|
children?: ReactElement | null
|
||||||
onClick?: () => void
|
onClick?: () => void
|
||||||
|
showList?: ShowStatus[]
|
||||||
|
orderInfo?: any
|
||||||
}
|
}
|
||||||
const MoveBtn = ({ children = null, onClick }: param) => {
|
const MoveBtn = ({ children = null, onClick, showList = [], orderInfo }: param) => {
|
||||||
|
const userInfo = useSelector(state => state.userInfo)
|
||||||
// 获取购物车数据数量
|
// 获取购物车数据数量
|
||||||
const { getShopCount, commonData } = useCommonData()
|
const { getShopCount, commonData } = useCommonData()
|
||||||
|
|
||||||
const [screenHeight, setScreenHeight] = useState(0)
|
const [screenHeight, setScreenHeight] = useState<{ shop?: number; customer?: number; order?: number }>({
|
||||||
|
shop: 0,
|
||||||
|
customer: 0,
|
||||||
|
order: 0,
|
||||||
|
})
|
||||||
const [showMoveBtn, setShowMoveBtn] = useState(false)
|
const [showMoveBtn, setShowMoveBtn] = useState(false)
|
||||||
const screenWidthRef = useRef(0)
|
const screenWidthRef = useRef(0)
|
||||||
useLayoutEffect(() => {
|
useEffect(() => {
|
||||||
const res = Taro.getSystemInfoSync()
|
const res = Taro.getSystemInfoSync()
|
||||||
if (res.screenHeight) {
|
if (res.screenHeight) {
|
||||||
const ratio = 750 / res.screenWidth
|
const ratio = 750 / res.screenWidth
|
||||||
setScreenHeight(res.screenHeight * ratio - 460)
|
const num = res.screenHeight * ratio
|
||||||
|
setScreenHeight(() => ({ shop: num - 460, customer: num - 580, order: num - 700 }))
|
||||||
screenWidthRef.current = res.screenWidth / 2
|
screenWidthRef.current = res.screenWidth / 2
|
||||||
}
|
}
|
||||||
setShowMoveBtn(true)
|
setShowMoveBtn(true)
|
||||||
})
|
}, [])
|
||||||
|
|
||||||
useDidShow(() => {
|
useDidShow(() => {
|
||||||
getShopCount()
|
getShopCount()
|
||||||
})
|
})
|
||||||
|
|
||||||
const dragEnd = (e) => {}
|
const onShow = (val: ShowStatus) => {
|
||||||
|
if (showList.length <= 0) { return true }
|
||||||
|
return showList.includes(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onPhone = () => {
|
||||||
|
if (!userInfo?.adminUserInfo?.sale_user_phone) { return alert.error('手机号不能为空') }
|
||||||
|
Taro.makePhoneCall({
|
||||||
|
phoneNumber: userInfo?.adminUserInfo?.sale_user_phone,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MovableArea className={styles.movableItem}>
|
<MovableArea className={styles.movableItem}>
|
||||||
{children}
|
{children}
|
||||||
<MovableView
|
{onShow('shop') && <MovableView
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={styles.moveBtn}
|
className={styles.moveBtn}
|
||||||
direction="all"
|
direction="all"
|
||||||
inertia
|
inertia
|
||||||
x="630rpx"
|
x="630rpx"
|
||||||
y={`${screenHeight}rpx`}
|
y={`${screenHeight.shop}rpx`}
|
||||||
onTouchEnd={e => dragEnd(e)}
|
|
||||||
>
|
>
|
||||||
<View className={classnames('iconfont', 'icon-gouwuche', styles.shop_icon)}></View>
|
<View className={classnames('iconfont', 'icon-gouwuche', styles.shop_icon)}></View>
|
||||||
{commonData.shopCount > 0 && <View className={styles.product_num}>{commonData.shopCount > 99 ? '99+' : commonData.shopCount}</View>}
|
{commonData.shopCount > 0 && <View className={styles.product_num}>{commonData.shopCount > 99 ? '99+' : commonData.shopCount}</View>}
|
||||||
</MovableView>
|
</MovableView>}
|
||||||
|
{onShow('order') && <MovableView
|
||||||
|
className={styles.moveBtn}
|
||||||
|
direction="all"
|
||||||
|
inertia
|
||||||
|
x="630rpx"
|
||||||
|
y={`${screenHeight.order}rpx`}
|
||||||
|
>
|
||||||
|
<View className={classnames('iconfont', 'icon-kefu', styles.shop_icon)}>
|
||||||
|
<Button
|
||||||
|
className={styles.wxBtn}
|
||||||
|
openType="contact"
|
||||||
|
sendMessageTitle={orderInfo?.order_no}
|
||||||
|
showMessageCard
|
||||||
|
sendMessagePath={`/pages/order/index?id=${orderInfo?.id}`}
|
||||||
|
></Button>
|
||||||
|
</View>
|
||||||
|
</MovableView>}
|
||||||
|
{onShow('customer') && <MovableView
|
||||||
|
className={classnames(styles.moveBtn, styles.no_bg_moveBtn)}
|
||||||
|
direction="all"
|
||||||
|
inertia
|
||||||
|
x="630rpx"
|
||||||
|
onClick={onPhone}
|
||||||
|
y={`${screenHeight.customer}rpx`}
|
||||||
|
>
|
||||||
|
<Image mode="aspectFit" src={formatImgUrl('/mall/float_button_customer_service.png')} />
|
||||||
|
</MovableView>}
|
||||||
</MovableArea>
|
</MovableArea>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import AddCollection from '@/components/addCollection'
|
|||||||
import { AddFavoriteApi, DelFavoriteProductApi } from '@/api/favorite'
|
import { AddFavoriteApi, DelFavoriteProductApi } from '@/api/favorite'
|
||||||
import useCommonData from '@/use/useCommonData'
|
import useCommonData from '@/use/useCommonData'
|
||||||
import { IMG_CND_Prefix } from '@/common/constant'
|
import { IMG_CND_Prefix } from '@/common/constant'
|
||||||
|
import MoveBtn from '@/components/moveBtn'
|
||||||
|
|
||||||
interface item { title: string; img: string; url: string; id: number }
|
interface item { title: string; img: string; url: string; id: number }
|
||||||
|
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const Index = () => {
|
|||||||
categoryList()
|
categoryList()
|
||||||
}, [])
|
}, [])
|
||||||
return (
|
return (
|
||||||
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
|
<MoveBtn showList={['shop']} onClick={() => setShowShopCart(!showShopCart)}>
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<View className={styles.header}>
|
<View className={styles.header}>
|
||||||
<View className={styles.search}>
|
<View className={styles.search}>
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import { SubscriptionMessageApi } from '@/api/user'
|
|||||||
import { SUBSCRIPTION_MESSAGE_SCENE } from '@/common/enum'
|
import { SUBSCRIPTION_MESSAGE_SCENE } from '@/common/enum'
|
||||||
import { UseSubscriptionMessage } from '@/use/useCommon'
|
import { UseSubscriptionMessage } from '@/use/useCommon'
|
||||||
import { throttle } from '@/common/util'
|
import { throttle } from '@/common/util'
|
||||||
|
import MoveBtn from '@/components/moveBtn'
|
||||||
|
|
||||||
const Comfirm = () => {
|
const Comfirm = () => {
|
||||||
const [showDesc, setShowDesc] = useState(false)
|
const [showDesc, setShowDesc] = useState(false)
|
||||||
@ -177,6 +178,7 @@ const Comfirm = () => {
|
|||||||
}
|
}
|
||||||
}, [preViewOrder])
|
}, [preViewOrder])
|
||||||
return (
|
return (
|
||||||
|
<MoveBtn showList={['customer']}>
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
<AddressInfoDetail orderInfo={defaultAddress} onSelect={getAddress} onChangeShipmentMode={selectShipmentMode} status={1} />
|
<AddressInfoDetail orderInfo={defaultAddress} onSelect={getAddress} onChangeShipmentMode={selectShipmentMode} status={1} />
|
||||||
<KindList order={formatPreViewOrderMemo} comfirm />
|
<KindList order={formatPreViewOrderMemo} comfirm />
|
||||||
@ -203,6 +205,7 @@ const Comfirm = () => {
|
|||||||
</Popup>
|
</Popup>
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
|
</MoveBtn>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ $top:190px;
|
|||||||
.payment_main {
|
.payment_main {
|
||||||
.payment_con {
|
.payment_con {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #F6F6F6;
|
background-color: #f6f6f6;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
.miconfont_title {
|
.miconfont_title {
|
||||||
transform: rotate(-180deg);
|
transform: rotate(-180deg);
|
||||||
@ -13,7 +13,6 @@ $top:190px;
|
|||||||
color: $color_font_three;
|
color: $color_font_three;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-size: $font_size_big;
|
font-size: $font_size_big;
|
||||||
@ -21,7 +20,6 @@ $top:190px;
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
.amount {
|
.amount {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -55,7 +53,6 @@ $top:190px;
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
.payment_list_top_border {
|
.payment_list_top_border {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
@ -90,7 +87,7 @@ $top:190px;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 123px;
|
height: 123px;
|
||||||
&:nth-last-child(n + 2) {
|
&:nth-last-child(n + 2) {
|
||||||
border-bottom: 2px solid #F3F3F3;
|
border-bottom: 2px solid #f3f3f3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.payment_list_item_left {
|
.payment_list_item_left {
|
||||||
@ -103,14 +100,14 @@ $top:190px;
|
|||||||
}
|
}
|
||||||
.miconfont {
|
.miconfont {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #007AFF;
|
color: #007aff;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
.advance_payment {
|
.advance_payment {
|
||||||
color: #FFC300;
|
color: #ffc300;
|
||||||
}
|
}
|
||||||
.account_period {
|
.account_period {
|
||||||
color: #07C160;
|
color: #07c160;
|
||||||
}
|
}
|
||||||
.payment_list_item_left_price {
|
.payment_list_item_left_price {
|
||||||
font-size: $font_size_min;
|
font-size: $font_size_min;
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import { alert, goLink } from '@/common/common'
|
|||||||
import { SubscriptionMessageApi } from '@/api/user'
|
import { SubscriptionMessageApi } from '@/api/user'
|
||||||
import { AddShoppingCartApi } from '@/api/shopCart'
|
import { AddShoppingCartApi } from '@/api/shopCart'
|
||||||
import { EditSaleOrderRemarkApi, GetSaleOrderDetailApi } from '@/api/order'
|
import { EditSaleOrderRemarkApi, GetSaleOrderDetailApi } from '@/api/order'
|
||||||
|
import MoveBtn from '@/components/moveBtn'
|
||||||
|
|
||||||
const Order = () => {
|
const Order = () => {
|
||||||
useLogin()
|
useLogin()
|
||||||
@ -286,7 +287,7 @@ const Order = () => {
|
|||||||
[orderDetail],
|
[orderDetail],
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
<MovableAreaBtn orderInfo={orderDetail}>
|
<MoveBtn showList={['order', 'customer']}>
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState orderInfo={orderDetail} />) || (
|
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState orderInfo={orderDetail} />) || (
|
||||||
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
|
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
|
||||||
@ -343,7 +344,7 @@ const Order = () => {
|
|||||||
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} />
|
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} />
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
</MovableAreaBtn>
|
</MoveBtn>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default Order
|
export default Order
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import AfterOrderBtns from '@/components/afterOrderBtns'
|
|||||||
import { formatDateTime, formatImgUrl } from '@/common/fotmat'
|
import { formatDateTime, formatImgUrl } from '@/common/fotmat'
|
||||||
import { AFTER_ORDER_STATUS } from '@/common/enum'
|
import { AFTER_ORDER_STATUS } from '@/common/enum'
|
||||||
import { SaleOrderOrderDetailApi } from '@/api/salesAfterOrder'
|
import { SaleOrderOrderDetailApi } from '@/api/salesAfterOrder'
|
||||||
|
import MoveBtn from '@/components/moveBtn'
|
||||||
|
|
||||||
const OrderDes = ({ orderInfo }: { orderInfo?: any }) => {
|
const OrderDes = ({ orderInfo }: { orderInfo?: any }) => {
|
||||||
// 复制功能
|
// 复制功能
|
||||||
@ -31,6 +32,7 @@ const OrderDes = ({ orderInfo }: { orderInfo?: any }) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<View className={styles.order_info}>
|
<View className={styles.order_info}>
|
||||||
<View className={styles.order_info_title}>订单信息</View>
|
<View className={styles.order_info_title}>订单信息</View>
|
||||||
<SearchInput showBorder={false} title="售后单号" height="50rpx">
|
<SearchInput showBorder={false} title="售后单号" height="50rpx">
|
||||||
@ -140,7 +142,7 @@ const SalesAfter = () => {
|
|||||||
}, [orderDetail])
|
}, [orderDetail])
|
||||||
|
|
||||||
// 售后订单状态枚举
|
// 售后订单状态枚举
|
||||||
const { } = AFTER_ORDER_STATUS
|
// const { } = AFTER_ORDER_STATUS
|
||||||
|
|
||||||
// 物流显示
|
// 物流显示
|
||||||
const [logisticsShow, setLogisticsShow] = useState(false)
|
const [logisticsShow, setLogisticsShow] = useState(false)
|
||||||
@ -187,6 +189,7 @@ const SalesAfter = () => {
|
|||||||
if (orderDetail) { formatData() }
|
if (orderDetail) { formatData() }
|
||||||
}, [orderDetail])
|
}, [orderDetail])
|
||||||
return (
|
return (
|
||||||
|
<MoveBtn showList={['customer']}>
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
<OrderState orderInfo={orderDetail} />
|
<OrderState orderInfo={orderDetail} />
|
||||||
<AddressInfoDetail orderInfo={orderDetail} onLogistics={onShowLogistics} />
|
<AddressInfoDetail orderInfo={orderDetail} onLogistics={onShowLogistics} />
|
||||||
@ -207,6 +210,7 @@ const SalesAfter = () => {
|
|||||||
<ReturnPayCheck orderInfo={orderDetail} show={returnCodeShow} onClose={() => setReturnCodeShow(false)} />
|
<ReturnPayCheck orderInfo={orderDetail} show={returnCodeShow} onClose={() => setReturnCodeShow(false)} />
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
</View>
|
</View>
|
||||||
|
</MoveBtn>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default SalesAfter
|
export default SalesAfter
|
||||||
|
|||||||
65
src/pages/user/components/customer/index.module.scss
Normal file
65
src/pages/user/components/customer/index.module.scss
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
.customer_service_list {
|
||||||
|
.customer_service_title {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text {
|
||||||
|
&:nth-child(1) {
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.customer_service_con {
|
||||||
|
padding: 0 32px;
|
||||||
|
.customer_service_item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32px 40px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 686px;
|
||||||
|
height: 136px;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 0px 28px -3px rgba(0, 0, 0, 0.06);
|
||||||
|
border-radius: 16px;
|
||||||
|
margin-top: 16px;
|
||||||
|
position: relative;
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.customer_service_item_con {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 24px;
|
||||||
|
text {
|
||||||
|
&:nth-child(1) {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
font-size: 24px;
|
||||||
|
color: rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.customer_service_item_icon {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
57
src/pages/user/components/customer/index.tsx
Normal file
57
src/pages/user/components/customer/index.tsx
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import { Button, Text, View } from '@tarojs/components'
|
||||||
|
import Taro from '@tarojs/taro'
|
||||||
|
import { useState } from 'react'
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import IconFont from '@/components/iconfont/iconfont'
|
||||||
|
import Popup from '@/components/popup'
|
||||||
|
import { useSelector } from '@/reducers/hooks'
|
||||||
|
import { alert } from '@/common/common'
|
||||||
|
|
||||||
|
interface Param {
|
||||||
|
onClose?: () => void
|
||||||
|
show: boolean
|
||||||
|
}
|
||||||
|
export default (props: Param) => {
|
||||||
|
const userInfo = useSelector(state => state.userInfo)
|
||||||
|
const makePhoneCall = () => {
|
||||||
|
if (!userInfo?.adminUserInfo?.sale_user_phone) { return alert.error('手机号不能为空') }
|
||||||
|
Taro.makePhoneCall({
|
||||||
|
phoneNumber: userInfo?.adminUserInfo?.sale_user_phone,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const onClose = () => {
|
||||||
|
props.onClose?.()
|
||||||
|
}
|
||||||
|
|
||||||
|
return <Popup show={props.show} showTitle={false} onClose={onClose}>
|
||||||
|
<View className={styles.customer_service_list}>
|
||||||
|
<View className={styles.customer_service_title}>
|
||||||
|
<Text>请选择您要的服务</Text>
|
||||||
|
<Text>我们根据选择为您提供服务</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.customer_service_con}>
|
||||||
|
<View className={styles.customer_service_item}>
|
||||||
|
<IconFont name="icon-guanfangweixinkefu" size={60} />
|
||||||
|
<View className={styles.customer_service_item_con}>
|
||||||
|
<Text>官方微信客服</Text>
|
||||||
|
<Text>竭诚为您服务!</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.customer_service_item_icon}>
|
||||||
|
<IconFont name="icon-xiala" />
|
||||||
|
</View>
|
||||||
|
<Button openType="contact" className={styles.customer} />
|
||||||
|
</View>
|
||||||
|
{userInfo?.adminUserInfo?.sale_user_id && <View onClick={makePhoneCall} className={styles.customer_service_item}>
|
||||||
|
<IconFont name="icon-bodakehujingli" size={60} />
|
||||||
|
<View className={styles.customer_service_item_con}>
|
||||||
|
<Text>客户经理</Text>
|
||||||
|
<Text>点击拨打{userInfo?.adminUserInfo?.sale_user_phone}</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.customer_service_item_icon}>
|
||||||
|
<IconFont name="icon-xiala" />
|
||||||
|
</View>
|
||||||
|
</View>}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</Popup>
|
||||||
|
}
|
||||||
@ -1,17 +1,16 @@
|
|||||||
import { Button, Image, Text, View } from '@tarojs/components'
|
import { Button, Image, Text, View } from '@tarojs/components'
|
||||||
import Taro, { useDidShow, usePullDownRefresh } from '@tarojs/taro'
|
import Taro, { useDidShow, usePullDownRefresh } from '@tarojs/taro'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { useMemo } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import namedPng from '@/styles/image/user_header.png'
|
import Customer from './components/customer'
|
||||||
import price_bg from '@/styles/image/price_bg.png'
|
|
||||||
import LabAndImg from '@/components/LabAndImg'
|
|
||||||
import { useSelector } from '@/reducers/hooks'
|
import { useSelector } from '@/reducers/hooks'
|
||||||
import { alert, goLink } from '@/common/common'
|
import { alert, goLink } from '@/common/common'
|
||||||
import { formatImgUrl, formatPriceDiv } from '@/common/fotmat'
|
import { formatImgUrl, formatPriceDiv } from '@/common/fotmat'
|
||||||
import { userassets, userorderStatistics } from '@/api/mine'
|
import { userassets, userorderStatistics } from '@/api/mine'
|
||||||
import useLogin from '@/use/useLogin'
|
import useLogin from '@/use/useLogin'
|
||||||
import IconFont from '@/components/iconfont/iconfont'
|
import IconFont from '@/components/iconfont/iconfont'
|
||||||
|
import MoveBtn from '@/components/moveBtn'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const userInfo = useSelector(state => state.userInfo)
|
const userInfo = useSelector(state => state.userInfo)
|
||||||
@ -25,6 +24,11 @@ export default () => {
|
|||||||
Apiassets()
|
Apiassets()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const [customer_service_show, set_customer_service_show] = useState(false)
|
||||||
|
const customerClose = () => {
|
||||||
|
set_customer_service_show(false)
|
||||||
|
}
|
||||||
|
|
||||||
const priceList = useMemo(() => {
|
const priceList = useMemo(() => {
|
||||||
console.log('priceState::', priceState.data)
|
console.log('priceState::', priceState.data)
|
||||||
return [
|
return [
|
||||||
@ -53,12 +57,15 @@ export default () => {
|
|||||||
{ label: '地址管理', icon: 'icon-dizhiguanli', callback: () => goLink('/pages/addressManager/index') },
|
{ label: '地址管理', icon: 'icon-dizhiguanli', callback: () => goLink('/pages/addressManager/index') },
|
||||||
{ label: '码单管理', icon: 'icon-yanseduibi', callback: () => goLink('/pages/weightList/index') },
|
{ label: '码单管理', icon: 'icon-yanseduibi', callback: () => goLink('/pages/weightList/index') },
|
||||||
{ label: '颜色对比', icon: 'icon-yanseduibi', callback: () => goLink('/pages/sampleComparison/index') },
|
{ label: '颜色对比', icon: 'icon-yanseduibi', callback: () => goLink('/pages/sampleComparison/index') },
|
||||||
{ label: '我的客服', icon: 'icon-wodekefu', text: '7x24小时服务', type: 'customer' },
|
{ label: '我的客服', icon: 'icon-wodekefu', text: '7x24小时服务', callback: () => (set_customer_service_show(true)) },
|
||||||
]
|
]
|
||||||
|
|
||||||
const mGetPhoneNumber = (ev) => {
|
const mGetPhoneNumber = async(ev) => {
|
||||||
if (ev.detail?.code) {
|
if (ev.detail?.code) {
|
||||||
getPhoneNumber(ev.detail.code)
|
await getPhoneNumber(ev.detail.code)
|
||||||
|
await ApigetTotal()
|
||||||
|
await getAdminUserInfo()
|
||||||
|
await Apiassets()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert.none('绑定失败!')
|
alert.none('绑定失败!')
|
||||||
@ -76,7 +83,8 @@ export default () => {
|
|||||||
Taro.stopPullDownRefresh()
|
Taro.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
return <View className={styles.user_main}>
|
return (
|
||||||
|
<View className={styles.user_main}>
|
||||||
{!userInfo?.adminUserInfo?.phone && <Button className={styles.getPhoneButton} openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}></Button>}
|
{!userInfo?.adminUserInfo?.phone && <Button className={styles.getPhoneButton} openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}></Button>}
|
||||||
<View className={styles.user_main__header}>
|
<View className={styles.user_main__header}>
|
||||||
<View className={styles.header_img_name}>
|
<View className={styles.header_img_name}>
|
||||||
@ -103,7 +111,7 @@ export default () => {
|
|||||||
<Text>0</Text>
|
<Text>0</Text>
|
||||||
<Text>活动积分</Text>
|
<Text>活动积分</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.header_count__item}>
|
<View className={styles.header_count__item} onClick={() => goLink('/pages/bindSalesman/index')}>
|
||||||
<IconFont name="icon-erweima" size={50} />
|
<IconFont name="icon-erweima" size={50} />
|
||||||
<Text>邀请码</Text>
|
<Text>邀请码</Text>
|
||||||
</View>
|
</View>
|
||||||
@ -155,10 +163,11 @@ export default () => {
|
|||||||
<View className={styles.title_more_icon}><IconFont name="icon-xiala" size={40} /></View>
|
<View className={styles.title_more_icon}><IconFont name="icon-xiala" size={40} /></View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{item.type == 'customer' && <Button openType="contact" className={styles.customer} />}
|
|
||||||
</View>
|
</View>
|
||||||
})}
|
})}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
<Customer show={customer_service_show} onClose={customerClose} />
|
||||||
</View>
|
</View>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,7 +226,7 @@ export default () => {
|
|||||||
<View className="customer_service_phone">客服热线 {userInfo?.adminUserInfo?.sale_user_phone}</View>
|
<View className="customer_service_phone">客服热线 {userInfo?.adminUserInfo?.sale_user_phone}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="customer_service_button" onClick={() => onPhone()}>
|
<View className="customer_service_button" onClick={() => onPhone()}>
|
||||||
<IconFont name="icon-a-0tianzhangqi" />
|
<IconFont name="icon-dianhua" />
|
||||||
<Text>拨打</Text>
|
<Text>拨打</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>}
|
</View>}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user