main
wwl 2024-03-29 17:26:13 +08:00
parent 54804b6546
commit 9e1051e2f2
19 changed files with 146 additions and 54 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 709 B

View File

@ -12,7 +12,7 @@ export default class SearchBar extends Component {
isOpened: false,
keyword: '',
showDailog: true,
localStorageKey: 'searchHistory'
localStorageKey: 'searchHistory',
}
constructor(props) {
@ -22,7 +22,12 @@ export default class SearchBar extends Component {
searchValue: '',
showSearchDailog: false,
historyList: [],
isShowAction: false
isShowAction: false,
qaList: [
{ content: '正常版和窄版的区别' },
{ content: '如何区分常规软木鞋床和软底软木鞋床' },
{ content: '人造革和牛皮革的区别' },
]
}
}
@ -123,9 +128,15 @@ export default class SearchBar extends Component {
})
}
handleClickQa = () => {
Taro.navigateTo({
url: '/subpages/member/qa-page?index=0'
})
}
render () {
const { isFixed, keyword, showDailog, placeholder, hotSearch } = this.props
const { showSearchDailog, historyList, isShowAction, searchValue } = this.state
const { showSearchDailog, historyList, isShowAction, searchValue, qaList } = this.state
return (
<View
className={classNames(
@ -236,6 +247,16 @@ export default class SearchBar extends Component {
{/* <View className='at-icon at-icon-chevron-right'></View> */}
</View>)}
</View>
<View className='search-input__history-title hot-title'>
<Text>常见问题</Text>
<Text className='hot-title__desc'></Text>
</View>
<View className='hot-list'>
{qaList.map((item, index) => <View className='hot-list__item' onClick={this.handleClickQa.bind(this)} key={index}>
<Text>{item.content}</Text>
{/* <View className='at-icon at-icon-chevron-right'></View> */}
</View>)}
</View>
</View>
)}
</View>

View File

@ -7,7 +7,7 @@ import { classNames } from '@/utils'
import './index.scss'
function SpGoodsPrice (props) {
const { info } = props
const { info, showMarketPrice = false } = props
const { priceSetting } = useSelector((state) => state.sys)
const { cart_page, item_page, order_page } = priceSetting
const {
@ -45,9 +45,9 @@ function SpGoodsPrice (props) {
{
!isPoint && <SpPrice size={36} className='sale-price' value={price} showSeparator noDecimal />
}
{/* {marketPrice > 0 && enMarketPrice && (
{marketPrice > 0 && enMarketPrice && showMarketPrice && (
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
)} */}
)}
</View>
<View>
{info.memberPrice < info.price && enMemberPrice && (

View File

@ -1,6 +1,6 @@
.sp-goods-price {
.mkt-price {
margin-left: 8px;
margin-left: 18px;
}
.vip-price,
.svip-price {

View File

@ -31,7 +31,7 @@
}
&__title {
// font-size: floor(0.95 * $font-size);
@include multi-ellipsis(1);
// @include multi-ellipsis(1);
margin-bottom: 26px;
color: #000;
font-size: 20px;

View File

@ -65,7 +65,7 @@ function SpSkuSelect (props, ref) {
specItems.forEach((item) => {
const key = item.specItem.map((spec) => spec.specId).join('_')
skuDictRef.current[key] = item
console.log("🚀 ~ item库存为:", key, item.specItem.map((item) => item.specName).join('_'), item.store)
// console.log("🚀 ~ item库存为:", key, item.specItem.map((item) => item.specName).join('_'), item.store)
})
let selItem = null
if (skuList.length === 3) {

View File

@ -1,19 +1,23 @@
@import "@/style/imports";
@import '@/style/imports';
.destory-member {
position: relative;
height: 100vh;
.sp-page-body {
padding: 0 20rpx;
box-sizing: border-box;
}
.title {
text-align: center;
font-size: 32px;
padding: 50px 0px;
}
.content {
margin: 0px 20px;
// margin: 0px 20px;
background: #fff;
padding: 30px 45px;
border-radius: 16px;
box-shadow: 0px 2px 10px 0px #EAE7E0;
box-shadow: 0px 2px 10px 0px #eae7e0;
}
.margin {
margin-bottom: 35px;
@ -36,9 +40,9 @@
}
.button {
width: 80%;
background: #F4811F;
background: #f4811f;
border-radius: 60px;
color: #FFFFFF;
color: #ffffff;
text-align: center;
margin: 100px auto 50px auto;
padding: 15px 0px;

View File

@ -235,6 +235,24 @@ page {
}
}
}
.mutedBtn {
animation: fadeInAnimation 0.3s ease-in;
// background-color: #fff;
width: 100px;
height: 100px;
border-radius: 50%;
position: absolute;
right: 30px;
bottom: 30px;
z-index: 100;
display: flex;
justify-content: center;
align-items: center;
.muted-icon {
width: 60rpx;
height: 60rpx;
}
}
}
.shop-box {
height: 520px;

View File

@ -105,7 +105,8 @@ const initialState = {
],
goodList: [],
recommend: [],
activeInfo: {}
activeInfo: {},
muted: true,
}
function Home () {
@ -647,7 +648,7 @@ function Home () {
controls={false}
autoplay={true}
loop={true}
muted={true}
muted={state.muted}
showProgress={false}
showFullscreenBtn={false}
showPlayBtn={false}
@ -670,6 +671,9 @@ function Home () {
<View className="item-btn-icon icon-my icon-arrow-right"></View>
</View>
</View>} */}
{!isUpOperation && item.type === "video" && <View className="mutedBtn" onClick={() => setState(v => { v.muted = !state.muted })} >
<Image className="muted-icon" src={`${process.env.APP_IMAGE_CDN_NEW}/index/${state.muted ? 'muted' : 'muted-no'}.jpg`}></Image>
</View>}
</SwiperItem>
))}
</Swiper>

View File

@ -632,7 +632,7 @@ function EspierDetail (props) {
<View className='goods-info-title'>
{/* 拼团、秒杀、限时特惠不显示 */}
{!ACTIVITY_LIST[info.activityType] && (
<SpGoodsPrice info={curItem ? curItem : info} size="30" />
<SpGoodsPrice showMarketPrice={true} info={curItem ? curItem : info} size="30" />
)}
</View>
{showSaleTotal && <View className='item-bn-sales'>
@ -642,7 +642,7 @@ function EspierDetail (props) {
</View>}
</View>
<CompGroup info={info} />
{/* <CompGroup info={info} /> */}
{/* { !info.nospec && (
<View className='sku-block'>
@ -710,7 +710,7 @@ function EspierDetail (props) {
</View>} */}
{/* 店铺 */}
{VERSION_PLATFORM && <CompStore info={info.distributorInfo} />}
{/* {VERSION_PLATFORM && <CompStore info={info.distributorInfo} />} */}
{/* Sku选择器列表 */}
{/* Sku选择器 */}
@ -731,7 +731,7 @@ function EspierDetail (props) {
curItem && setState((draft) => {
draft.skuText = skuText
draft.curItem = curItem
// 切换顶部轮播图
// 切换顶部轮播图
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
if (idx === 0) draft.swiperList = curItem?.specItem?.[idx]?.specImgs
})

View File

@ -66,7 +66,7 @@ const initialState = {
market_price: false
},
item_page: {
market_price: false,
market_price: true,
member_price: false,
svip_price: false
},

View File

@ -4,6 +4,11 @@
padding: 36px 0 37px;
&-good {
position: relative;
.sp-order-item {
&__bd {
width: 66%;
}
}
}
// &__fix {
// display: flex;

View File

@ -313,7 +313,7 @@ export default class TradeItem extends Component {
</Button>
) : null} */}
{
!info.aftersales_bn && (
!info.aftersales_bn && info.is_rate != 1 && (
<Button
className='btn-action'
style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`}

View File

@ -77,12 +77,13 @@ const initState = {
title: '',
totalFee: '',
toastShow: false,
invoiceInfo: {}
invoiceInfo: {},
oss_invoice_url: ''
}
function InvoiceInfo (props) {
const $instance = getCurrentInstance()
const [state, setState] = useImmer(initState)
const { formList, form, showModal, visible, showDetail, invoiceId, invoice, orderInfo, loading, title, totalFee, toastShow, invoiceInfo } = state
const { formList, form, showModal, visible, showDetail, invoiceId, invoice, orderInfo, loading, title, totalFee, toastShow, invoiceInfo, oss_invoice_url } = state
const pages = getCurrentPages()
const current = pages[pages.length - 1]
const eventChannel = current.getOpenerEventChannel()
@ -99,6 +100,7 @@ function InvoiceInfo (props) {
eventChannel?.on('acceptDataFromOpenerPage', ({ data }) => {
setState((draft) => {
draft.orderInfo = data.order || data || {}
draft.oss_invoice_url = data.oss_invoice_url || ''
draft.invoiceInfo = data.invoice || {}
draft.form = data.order?.invoice || data.paramsInfo?.invoice_content || {}
draft.title = data.order ? data.order.title === 'unit' ? '个人' : '企业' : ''
@ -241,16 +243,23 @@ function InvoiceInfo (props) {
// 预览文件
const preview = (url, fileName) => {
console.log(invoiceInfo, 'invoiceInfoinvoiceInfoin')
if (!oss_invoice_url) {
Taro.showToast({
title: '暂无可预览发票',
icon: 'none',
})
}
Taro.showLoading({ title: '正在加载中', mask: true })
Taro.downloadFile({
url: url,
url: oss_invoice_url,
success: function (res) {
console.log("下载:", res)
var filePath = res.tempFilePath
Taro.hideLoading()
Taro.openDocument({
filePath: filePath,
fileType: getFileType(url),
fileType: getFileType(oss_invoice_url),
fileName: fileName,
success: function (res) {
console.log("打开:", res)
@ -271,7 +280,19 @@ function InvoiceInfo (props) {
}
}
const handleReSubmit = () => {
const reg = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
if (!reg.test(form.email)) {
Taro.showToast({
title: '邮箱格式不正确!',
icon: 'none'
})
return
}
setState((draft) => {
draft.visible = true
})
}
return <SpPage className='page-invoice-info has-navbar' loading={loading} navigationBarTitleText='开票信息'>
@ -283,7 +304,7 @@ function InvoiceInfo (props) {
<Text>电子发票</Text>
{showDetail ? <View className='flex'>
{orderInfo.is_invoiced == 1 && <>
<Text className='ck' onClick={() => preview(invoiceInfo.pdf_info, invoiceInfo.invoice_title + invoiceInfo.invoice_no)}>查看</Text>
<Text className='ck' onClick={() => preview(invoice.oss_invoice_url, invoiceInfo.invoice_title + invoiceInfo.invoice_no)}>查看</Text>
<Text className='iconfont icon-qianwang-01'></Text>
</>}
{/* <AtIcon value='chevron-right' size='18' color='#000'></AtIcon> */}
@ -339,11 +360,7 @@ function InvoiceInfo (props) {
// })
}} className={classNames("btn", { "btn-disabled": !form.title || !form.content || !form.email })}>提交申请</View>
</View> : orderInfo.is_invoiced == 1 && <View className={classNames("bottom")}>
<View onClick={() => {
setState((draft) => {
draft.visible = true
})
}} className={classNames("btn")}>重发发票</View>
<View onClick={handleReSubmit} className={classNames("btn")}>重发发票</View>
</View>}
<View className="sp-picker">

View File

@ -54,6 +54,7 @@ export default class InvoiceList extends Component {
id: 'id',
order_id: 'order_id',
status: 'status',
oss_invoice_url: ({ send_params }) => send_params?.oss_invoice_url,
order: ({ order: { orderInfo }, order }) => {
return order.orderInfo ? {
time: formatDateTime(orderInfo.create_time),

View File

@ -554,10 +554,7 @@ function MemberIndex (props) {
<Text className="" onClick={() => {
Taro.navigateTo({ url: '/subpages/member/member-level' })
}}>{
{
true: vipInfo.grade_name || '会员',
false: userInfo?.gradeInfo?.grade_name || ''
}[vipInfo.isVip]
vipInfo.isVip ? vipInfo.grade_name || '会员' : userInfo?.gradeInfo?.grade_name || ''
}</Text>
<SpImage onClick={handleClickLink.bind(this, '/marketing/pages/member/member-code')} src='member/qr-code.png' height={30} width={30} isNew />
</View>}

View File

@ -1,4 +1,4 @@
import React from 'react'
import React, { useEffect } from 'react'
import { View, Text, ScrollView } from '@tarojs/components'
import { AtAccordion, AtIcon } from 'taro-ui'
import { SpPage, SpHtml } from '@/components'
@ -7,6 +7,7 @@ import introData from './qa-data'
import { classNames } from '@/utils'
import './qa-page.scss'
import { getCurrentInstance } from '@tarojs/taro'
const initState = {
@ -16,6 +17,25 @@ const initState = {
export default function qaPage () {
const [state, setState] = useImmer(initState)
const { introList, scrollTop } = state
const $instance = getCurrentInstance()
useEffect(() => {
const { index } = $instance.router.params
if (index) {
setState((draft) => {
draft.introList = draft.introList.map((v, i) => {
if (i == index) {
v.isOpen = true
} else {
v.isOpen = false
}
return v
})
})
}
}, [])
return (
<SpPage className="page-member-qa">
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={scrollTop} className="qa-page-scrool">

View File

@ -450,15 +450,16 @@ function MemberUserInfo () {
const handleLogOff = async () => {
const { status, msg } = await api.member.deleteMember({ is_delete: '0' })
if (!status) {
await Taro.showModal({
Taro.showModal({
content: msg,
confirmText: '我知道了'
confirmText: '我知道了',
showCancel: false,
})
} else {
Taro.navigateTo({
url: `/marketing/pages/member/destroy-member?phone=${formUserInfo.mobile}`
})
}
Taro.navigateTo({
url: `/marketing/pages/member/destroy-member?phone=${formUserInfo.mobile}`
})
}
// H5退出账号
@ -621,23 +622,24 @@ function MemberUserInfo () {
<View>
<Text onClick={() => setState((draft) => { draft.checked = !draft.checked })} >我已经阅读并同意</Text>
<Text
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=member_logout' })}
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=member_register' })}
style={`color: #000000`}
>
{`${appName}使用条款》`}
</Text>
<Text
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=privacyAndregister' })}
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=privacy' })}
style={`color: #000000`}
>
隐私政策
</Text>
{/* privacyAndregister */}
</View>
</View>
{/* 注销账号 */}
<View className="cancel-account">
<View className="cancel-account-left" onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=privacyAndregister' })}>会员规则</View>
{/* <View className="cancel-account-left" onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=privacyAndregister' })}>会员规则</View> */}
<View className="cancel-account-right" onClick={handleLogOff}>账户注销</View>
</View>
{/* <SpCell

View File

@ -137,7 +137,6 @@ function TradeAfterSale (props) {
// order_id
})
const _aftersales = pickBy(resInfo, doc.trade.TRADE_AFTER_SALES_ITEM)
console.log("🚀 ~ _aftersales:", _aftersales)
if (_aftersales.sendbackData) {
const { corp_code } = _aftersales.sendbackData
_aftersales.sendbackData.name = LOGISTICS_CODE[corp_code]
@ -291,13 +290,17 @@ function TradeAfterSale (props) {
const handleClickCopy = (val) => {
copyText(val)
Taro.showToast({
title: '复制成功',
icon: 'none'
})
// Taro.showToast({
// title: '复制成功',
// icon: 'none'
// })
}
const handleClickCopyAddr = () => {
const addr = `收货人:${aftersales?.afterSalesContact || ''}; 联系电话:${aftersales?.afterSalesMobile || ''}; 收货地址:${aftersales?.afterSalesAddress || ''}; 邮编:${aftersales?.afterSalesZip || ''}`
copyText(addr)
}
return <SpPage ref={pageRef} loading={loading} className='page-trade-after-sale has-navbar' isBlack showNavSearchIcon renderFooter={
return <SpPage ref={pageRef} loading={loading} title={!afterSaleTid ? '申请售后' : '售后进度'} className='page-trade-after-sale has-navbar' isBlack showNavSearchIcon renderFooter={
!loading && !afterSaleTid ? <View className='btn-wrap'>
<AtButton type='primary' onClick={onSubmit}>提交售后申请</AtButton>
</View> : null
@ -640,7 +643,7 @@ function TradeAfterSale (props) {
<View className="receiver_name op">如商家拒绝您可以修改申请后再次发起商家会重新处理</View>
<View className="receiver_name op" style={{ marginBottom: '50rpx' }}>如商家超时未处理退货申请将达成请按系统给出的退货地址退货</View>
<View className={`receiver_name ${[1, 2].includes(aftersales?.progress) && 'active'}`}>寄回商品</View>
<View className={`receiver_name ${aftersales?.progress == 4 && aftersales?.aftersalesStatus != 2 && 'active'}`}>商家退款</View>
<View className={`receiver_name ${((aftersales?.progress == 8 && aftersales?.aftersalesStatus == 1) || (aftersales?.progress == 4 && aftersales?.aftersalesStatus != 2)) && 'active'}`}>商家退款</View>
<View className={`receiver_name ${aftersales?.progress == 4 && aftersales?.aftersalesStatus == 2 && 'active'}`}>退款成功</View>
<View className="line"></View>
<View className="curtain_content_text">
@ -682,7 +685,7 @@ function TradeAfterSale (props) {
<View className="addr_item_left">邮编</View>
<View className="addr_item_right">{aftersales?.afterSalesZip}</View>
</View>
<View className="fuzhi">复制地址</View>
<View className="fuzhi" onClick={handleClickCopyAddr} >复制地址</View>
<View className="line" style={{ margin: '130rpx 0 110rpx 0' }}></View>
<View className="curtain_content_text">
<View className="curtain_content_text_title">温馨提示</View>