fix bug
parent
54804b6546
commit
9e1051e2f2
Binary file not shown.
|
Before Width: | Height: | Size: 709 B |
|
|
@ -12,7 +12,7 @@ export default class SearchBar extends Component {
|
||||||
isOpened: false,
|
isOpened: false,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
showDailog: true,
|
showDailog: true,
|
||||||
localStorageKey: 'searchHistory'
|
localStorageKey: 'searchHistory',
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -22,7 +22,12 @@ export default class SearchBar extends Component {
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
showSearchDailog: false,
|
showSearchDailog: false,
|
||||||
historyList: [],
|
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 () {
|
render () {
|
||||||
const { isFixed, keyword, showDailog, placeholder, hotSearch } = this.props
|
const { isFixed, keyword, showDailog, placeholder, hotSearch } = this.props
|
||||||
const { showSearchDailog, historyList, isShowAction, searchValue } = this.state
|
const { showSearchDailog, historyList, isShowAction, searchValue, qaList } = this.state
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
className={classNames(
|
className={classNames(
|
||||||
|
|
@ -236,6 +247,16 @@ export default class SearchBar extends Component {
|
||||||
{/* <View className='at-icon at-icon-chevron-right'></View> */}
|
{/* <View className='at-icon at-icon-chevron-right'></View> */}
|
||||||
</View>)}
|
</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>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { classNames } from '@/utils'
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
||||||
function SpGoodsPrice (props) {
|
function SpGoodsPrice (props) {
|
||||||
const { info } = props
|
const { info, showMarketPrice = false } = props
|
||||||
const { priceSetting } = useSelector((state) => state.sys)
|
const { priceSetting } = useSelector((state) => state.sys)
|
||||||
const { cart_page, item_page, order_page } = priceSetting
|
const { cart_page, item_page, order_page } = priceSetting
|
||||||
const {
|
const {
|
||||||
|
|
@ -45,9 +45,9 @@ function SpGoodsPrice (props) {
|
||||||
{
|
{
|
||||||
!isPoint && <SpPrice size={36} className='sale-price' value={price} showSeparator noDecimal />
|
!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} />
|
<SpPrice className='mkt-price' lineThrough value={marketPrice} />
|
||||||
)} */}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
{info.memberPrice < info.price && enMemberPrice && (
|
{info.memberPrice < info.price && enMemberPrice && (
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.sp-goods-price {
|
.sp-goods-price {
|
||||||
.mkt-price {
|
.mkt-price {
|
||||||
margin-left: 8px;
|
margin-left: 18px;
|
||||||
}
|
}
|
||||||
.vip-price,
|
.vip-price,
|
||||||
.svip-price {
|
.svip-price {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
&__title {
|
&__title {
|
||||||
// font-size: floor(0.95 * $font-size);
|
// font-size: floor(0.95 * $font-size);
|
||||||
@include multi-ellipsis(1);
|
// @include multi-ellipsis(1);
|
||||||
margin-bottom: 26px;
|
margin-bottom: 26px;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ function SpSkuSelect (props, ref) {
|
||||||
specItems.forEach((item) => {
|
specItems.forEach((item) => {
|
||||||
const key = item.specItem.map((spec) => spec.specId).join('_')
|
const key = item.specItem.map((spec) => spec.specId).join('_')
|
||||||
skuDictRef.current[key] = item
|
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
|
let selItem = null
|
||||||
if (skuList.length === 3) {
|
if (skuList.length === 3) {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,23 @@
|
||||||
@import "@/style/imports";
|
@import '@/style/imports';
|
||||||
|
|
||||||
.destory-member {
|
.destory-member {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
.sp-page-body {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
padding: 50px 0px;
|
padding: 50px 0px;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
margin: 0px 20px;
|
// margin: 0px 20px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 30px 45px;
|
padding: 30px 45px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-shadow: 0px 2px 10px 0px #EAE7E0;
|
box-shadow: 0px 2px 10px 0px #eae7e0;
|
||||||
}
|
}
|
||||||
.margin {
|
.margin {
|
||||||
margin-bottom: 35px;
|
margin-bottom: 35px;
|
||||||
|
|
@ -36,9 +40,9 @@
|
||||||
}
|
}
|
||||||
.button {
|
.button {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
background: #F4811F;
|
background: #f4811f;
|
||||||
border-radius: 60px;
|
border-radius: 60px;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 100px auto 50px auto;
|
margin: 100px auto 50px auto;
|
||||||
padding: 15px 0px;
|
padding: 15px 0px;
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
.shop-box {
|
||||||
height: 520px;
|
height: 520px;
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,8 @@ const initialState = {
|
||||||
],
|
],
|
||||||
goodList: [],
|
goodList: [],
|
||||||
recommend: [],
|
recommend: [],
|
||||||
activeInfo: {}
|
activeInfo: {},
|
||||||
|
muted: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
function Home () {
|
function Home () {
|
||||||
|
|
@ -647,7 +648,7 @@ function Home () {
|
||||||
controls={false}
|
controls={false}
|
||||||
autoplay={true}
|
autoplay={true}
|
||||||
loop={true}
|
loop={true}
|
||||||
muted={true}
|
muted={state.muted}
|
||||||
showProgress={false}
|
showProgress={false}
|
||||||
showFullscreenBtn={false}
|
showFullscreenBtn={false}
|
||||||
showPlayBtn={false}
|
showPlayBtn={false}
|
||||||
|
|
@ -670,6 +671,9 @@ function Home () {
|
||||||
<View className="item-btn-icon icon-my icon-arrow-right"></View>
|
<View className="item-btn-icon icon-my icon-arrow-right"></View>
|
||||||
</View>
|
</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>
|
</SwiperItem>
|
||||||
))}
|
))}
|
||||||
</Swiper>
|
</Swiper>
|
||||||
|
|
|
||||||
|
|
@ -632,7 +632,7 @@ function EspierDetail (props) {
|
||||||
<View className='goods-info-title'>
|
<View className='goods-info-title'>
|
||||||
{/* 拼团、秒杀、限时特惠不显示 */}
|
{/* 拼团、秒杀、限时特惠不显示 */}
|
||||||
{!ACTIVITY_LIST[info.activityType] && (
|
{!ACTIVITY_LIST[info.activityType] && (
|
||||||
<SpGoodsPrice info={curItem ? curItem : info} size="30" />
|
<SpGoodsPrice showMarketPrice={true} info={curItem ? curItem : info} size="30" />
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
{showSaleTotal && <View className='item-bn-sales'>
|
{showSaleTotal && <View className='item-bn-sales'>
|
||||||
|
|
@ -642,7 +642,7 @@ function EspierDetail (props) {
|
||||||
</View>}
|
</View>}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<CompGroup info={info} />
|
{/* <CompGroup info={info} /> */}
|
||||||
|
|
||||||
{/* { !info.nospec && (
|
{/* { !info.nospec && (
|
||||||
<View className='sku-block'>
|
<View className='sku-block'>
|
||||||
|
|
@ -710,7 +710,7 @@ function EspierDetail (props) {
|
||||||
</View>} */}
|
</View>} */}
|
||||||
|
|
||||||
{/* 店铺 */}
|
{/* 店铺 */}
|
||||||
{VERSION_PLATFORM && <CompStore info={info.distributorInfo} />}
|
{/* {VERSION_PLATFORM && <CompStore info={info.distributorInfo} />} */}
|
||||||
|
|
||||||
{/* Sku选择器列表 */}
|
{/* Sku选择器列表 */}
|
||||||
{/* Sku选择器 */}
|
{/* Sku选择器 */}
|
||||||
|
|
@ -731,7 +731,7 @@ function EspierDetail (props) {
|
||||||
curItem && setState((draft) => {
|
curItem && setState((draft) => {
|
||||||
draft.skuText = skuText
|
draft.skuText = skuText
|
||||||
draft.curItem = curItem
|
draft.curItem = curItem
|
||||||
// 不切换顶部轮播图
|
// 切换顶部轮播图
|
||||||
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
|
draft.selSkuImg = curItem.specItem?.[0]?.specImgs?.[0]
|
||||||
if (idx === 0) draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
if (idx === 0) draft.swiperList = curItem?.specItem?.[idx]?.specImgs
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ const initialState = {
|
||||||
market_price: false
|
market_price: false
|
||||||
},
|
},
|
||||||
item_page: {
|
item_page: {
|
||||||
market_price: false,
|
market_price: true,
|
||||||
member_price: false,
|
member_price: false,
|
||||||
svip_price: false
|
svip_price: false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@
|
||||||
padding: 36px 0 37px;
|
padding: 36px 0 37px;
|
||||||
&-good {
|
&-good {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.sp-order-item {
|
||||||
|
&__bd {
|
||||||
|
width: 66%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// &__fix {
|
// &__fix {
|
||||||
// display: flex;
|
// display: flex;
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ export default class TradeItem extends Component {
|
||||||
</Button>
|
</Button>
|
||||||
) : null} */}
|
) : null} */}
|
||||||
{
|
{
|
||||||
!info.aftersales_bn && (
|
!info.aftersales_bn && info.is_rate != 1 && (
|
||||||
<Button
|
<Button
|
||||||
className='btn-action'
|
className='btn-action'
|
||||||
style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`}
|
style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`}
|
||||||
|
|
|
||||||
|
|
@ -77,12 +77,13 @@ const initState = {
|
||||||
title: '',
|
title: '',
|
||||||
totalFee: '',
|
totalFee: '',
|
||||||
toastShow: false,
|
toastShow: false,
|
||||||
invoiceInfo: {}
|
invoiceInfo: {},
|
||||||
|
oss_invoice_url: ''
|
||||||
}
|
}
|
||||||
function InvoiceInfo (props) {
|
function InvoiceInfo (props) {
|
||||||
const $instance = getCurrentInstance()
|
const $instance = getCurrentInstance()
|
||||||
const [state, setState] = useImmer(initState)
|
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 pages = getCurrentPages()
|
||||||
const current = pages[pages.length - 1]
|
const current = pages[pages.length - 1]
|
||||||
const eventChannel = current.getOpenerEventChannel()
|
const eventChannel = current.getOpenerEventChannel()
|
||||||
|
|
@ -99,6 +100,7 @@ function InvoiceInfo (props) {
|
||||||
eventChannel?.on('acceptDataFromOpenerPage', ({ data }) => {
|
eventChannel?.on('acceptDataFromOpenerPage', ({ data }) => {
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
draft.orderInfo = data.order || data || {}
|
draft.orderInfo = data.order || data || {}
|
||||||
|
draft.oss_invoice_url = data.oss_invoice_url || ''
|
||||||
draft.invoiceInfo = data.invoice || {}
|
draft.invoiceInfo = data.invoice || {}
|
||||||
draft.form = data.order?.invoice || data.paramsInfo?.invoice_content || {}
|
draft.form = data.order?.invoice || data.paramsInfo?.invoice_content || {}
|
||||||
draft.title = data.order ? data.order.title === 'unit' ? '个人' : '企业' : ''
|
draft.title = data.order ? data.order.title === 'unit' ? '个人' : '企业' : ''
|
||||||
|
|
@ -241,16 +243,23 @@ function InvoiceInfo (props) {
|
||||||
|
|
||||||
// 预览文件
|
// 预览文件
|
||||||
const preview = (url, fileName) => {
|
const preview = (url, fileName) => {
|
||||||
|
console.log(invoiceInfo, 'invoiceInfoinvoiceInfoin')
|
||||||
|
if (!oss_invoice_url) {
|
||||||
|
Taro.showToast({
|
||||||
|
title: '暂无可预览发票',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
}
|
||||||
Taro.showLoading({ title: '正在加载中', mask: true })
|
Taro.showLoading({ title: '正在加载中', mask: true })
|
||||||
Taro.downloadFile({
|
Taro.downloadFile({
|
||||||
url: url,
|
url: oss_invoice_url,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("下载:", res)
|
console.log("下载:", res)
|
||||||
var filePath = res.tempFilePath
|
var filePath = res.tempFilePath
|
||||||
Taro.hideLoading()
|
Taro.hideLoading()
|
||||||
Taro.openDocument({
|
Taro.openDocument({
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
fileType: getFileType(url),
|
fileType: getFileType(oss_invoice_url),
|
||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("打开:", 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='开票信息'>
|
return <SpPage className='page-invoice-info has-navbar' loading={loading} navigationBarTitleText='开票信息'>
|
||||||
|
|
@ -283,7 +304,7 @@ function InvoiceInfo (props) {
|
||||||
<Text>电子发票</Text>
|
<Text>电子发票</Text>
|
||||||
{showDetail ? <View className='flex'>
|
{showDetail ? <View className='flex'>
|
||||||
{orderInfo.is_invoiced == 1 && <>
|
{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>
|
<Text className='iconfont icon-qianwang-01'></Text>
|
||||||
</>}
|
</>}
|
||||||
{/* <AtIcon value='chevron-right' size='18' color='#000'></AtIcon> */}
|
{/* <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>
|
}} className={classNames("btn", { "btn-disabled": !form.title || !form.content || !form.email })}>提交申请</View>
|
||||||
</View> : orderInfo.is_invoiced == 1 && <View className={classNames("bottom")}>
|
</View> : orderInfo.is_invoiced == 1 && <View className={classNames("bottom")}>
|
||||||
<View onClick={() => {
|
<View onClick={handleReSubmit} className={classNames("btn")}>重发发票</View>
|
||||||
setState((draft) => {
|
|
||||||
draft.visible = true
|
|
||||||
})
|
|
||||||
}} className={classNames("btn")}>重发发票</View>
|
|
||||||
</View>}
|
</View>}
|
||||||
|
|
||||||
<View className="sp-picker">
|
<View className="sp-picker">
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ export default class InvoiceList extends Component {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
order_id: 'order_id',
|
order_id: 'order_id',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
|
oss_invoice_url: ({ send_params }) => send_params?.oss_invoice_url,
|
||||||
order: ({ order: { orderInfo }, order }) => {
|
order: ({ order: { orderInfo }, order }) => {
|
||||||
return order.orderInfo ? {
|
return order.orderInfo ? {
|
||||||
time: formatDateTime(orderInfo.create_time),
|
time: formatDateTime(orderInfo.create_time),
|
||||||
|
|
|
||||||
|
|
@ -554,10 +554,7 @@ function MemberIndex (props) {
|
||||||
<Text className="" onClick={() => {
|
<Text className="" onClick={() => {
|
||||||
Taro.navigateTo({ url: '/subpages/member/member-level' })
|
Taro.navigateTo({ url: '/subpages/member/member-level' })
|
||||||
}}>{
|
}}>{
|
||||||
{
|
vipInfo.isVip ? vipInfo.grade_name || '会员' : userInfo?.gradeInfo?.grade_name || ''
|
||||||
true: vipInfo.grade_name || '会员',
|
|
||||||
false: userInfo?.gradeInfo?.grade_name || ''
|
|
||||||
}[vipInfo.isVip]
|
|
||||||
}</Text>
|
}</Text>
|
||||||
<SpImage onClick={handleClickLink.bind(this, '/marketing/pages/member/member-code')} src='member/qr-code.png' height={30} width={30} isNew />
|
<SpImage onClick={handleClickLink.bind(this, '/marketing/pages/member/member-code')} src='member/qr-code.png' height={30} width={30} isNew />
|
||||||
</View>}
|
</View>}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react'
|
import React, { useEffect } from 'react'
|
||||||
import { View, Text, ScrollView } from '@tarojs/components'
|
import { View, Text, ScrollView } from '@tarojs/components'
|
||||||
import { AtAccordion, AtIcon } from 'taro-ui'
|
import { AtAccordion, AtIcon } from 'taro-ui'
|
||||||
import { SpPage, SpHtml } from '@/components'
|
import { SpPage, SpHtml } from '@/components'
|
||||||
|
|
@ -7,6 +7,7 @@ import introData from './qa-data'
|
||||||
import { classNames } from '@/utils'
|
import { classNames } from '@/utils'
|
||||||
|
|
||||||
import './qa-page.scss'
|
import './qa-page.scss'
|
||||||
|
import { getCurrentInstance } from '@tarojs/taro'
|
||||||
|
|
||||||
|
|
||||||
const initState = {
|
const initState = {
|
||||||
|
|
@ -16,6 +17,25 @@ const initState = {
|
||||||
export default function qaPage () {
|
export default function qaPage () {
|
||||||
const [state, setState] = useImmer(initState)
|
const [state, setState] = useImmer(initState)
|
||||||
const { introList, scrollTop } = state
|
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 (
|
return (
|
||||||
<SpPage className="page-member-qa">
|
<SpPage className="page-member-qa">
|
||||||
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={scrollTop} className="qa-page-scrool">
|
<ScrollView scrollY scrollWithAnimation showScrollbar={false} scrollTop={scrollTop} className="qa-page-scrool">
|
||||||
|
|
|
||||||
|
|
@ -450,15 +450,16 @@ function MemberUserInfo () {
|
||||||
const handleLogOff = async () => {
|
const handleLogOff = async () => {
|
||||||
const { status, msg } = await api.member.deleteMember({ is_delete: '0' })
|
const { status, msg } = await api.member.deleteMember({ is_delete: '0' })
|
||||||
if (!status) {
|
if (!status) {
|
||||||
await Taro.showModal({
|
Taro.showModal({
|
||||||
content: msg,
|
content: msg,
|
||||||
confirmText: '我知道了'
|
confirmText: '我知道了',
|
||||||
|
showCancel: false,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: `/marketing/pages/member/destroy-member?phone=${formUserInfo.mobile}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
Taro.navigateTo({
|
|
||||||
url: `/marketing/pages/member/destroy-member?phone=${formUserInfo.mobile}`
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// H5退出账号
|
// H5退出账号
|
||||||
|
|
@ -621,23 +622,24 @@ function MemberUserInfo () {
|
||||||
<View>
|
<View>
|
||||||
<Text onClick={() => setState((draft) => { draft.checked = !draft.checked })} >我已经阅读并同意</Text>
|
<Text onClick={() => setState((draft) => { draft.checked = !draft.checked })} >我已经阅读并同意</Text>
|
||||||
<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`}
|
style={`color: #000000`}
|
||||||
>
|
>
|
||||||
{`《${appName}使用条款》`}
|
{`《${appName}使用条款》`}
|
||||||
</Text>
|
</Text>
|
||||||
及
|
及
|
||||||
<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`}
|
style={`color: #000000`}
|
||||||
>
|
>
|
||||||
《隐私政策》
|
《隐私政策》
|
||||||
</Text>
|
</Text>
|
||||||
|
{/* privacyAndregister */}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{/* 注销账号 */}
|
{/* 注销账号 */}
|
||||||
<View className="cancel-account">
|
<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 className="cancel-account-right" onClick={handleLogOff}>账户注销</View>
|
||||||
</View>
|
</View>
|
||||||
{/* <SpCell
|
{/* <SpCell
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ function TradeAfterSale (props) {
|
||||||
// order_id
|
// order_id
|
||||||
})
|
})
|
||||||
const _aftersales = pickBy(resInfo, doc.trade.TRADE_AFTER_SALES_ITEM)
|
const _aftersales = pickBy(resInfo, doc.trade.TRADE_AFTER_SALES_ITEM)
|
||||||
console.log("🚀 ~ _aftersales:", _aftersales)
|
|
||||||
if (_aftersales.sendbackData) {
|
if (_aftersales.sendbackData) {
|
||||||
const { corp_code } = _aftersales.sendbackData
|
const { corp_code } = _aftersales.sendbackData
|
||||||
_aftersales.sendbackData.name = LOGISTICS_CODE[corp_code]
|
_aftersales.sendbackData.name = LOGISTICS_CODE[corp_code]
|
||||||
|
|
@ -291,13 +290,17 @@ function TradeAfterSale (props) {
|
||||||
|
|
||||||
const handleClickCopy = (val) => {
|
const handleClickCopy = (val) => {
|
||||||
copyText(val)
|
copyText(val)
|
||||||
Taro.showToast({
|
// Taro.showToast({
|
||||||
title: '复制成功',
|
// title: '复制成功',
|
||||||
icon: 'none'
|
// 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'>
|
!loading && !afterSaleTid ? <View className='btn-wrap'>
|
||||||
<AtButton type='primary' onClick={onSubmit}>提交售后申请</AtButton>
|
<AtButton type='primary' onClick={onSubmit}>提交售后申请</AtButton>
|
||||||
</View> : null
|
</View> : null
|
||||||
|
|
@ -640,7 +643,7 @@ function TradeAfterSale (props) {
|
||||||
<View className="receiver_name op">如商家拒绝,您可以修改申请后再次发起,商家会重新处理</View>
|
<View className="receiver_name op">如商家拒绝,您可以修改申请后再次发起,商家会重新处理</View>
|
||||||
<View className="receiver_name op" style={{ marginBottom: '50rpx' }}>如商家超时未处理,退货申请将达成,请按系统给出的退货地址退货</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 ${[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={`receiver_name ${aftersales?.progress == 4 && aftersales?.aftersalesStatus == 2 && 'active'}`}>退款成功</View>
|
||||||
<View className="line"></View>
|
<View className="line"></View>
|
||||||
<View className="curtain_content_text">
|
<View className="curtain_content_text">
|
||||||
|
|
@ -682,7 +685,7 @@ function TradeAfterSale (props) {
|
||||||
<View className="addr_item_left">邮编</View>
|
<View className="addr_item_left">邮编</View>
|
||||||
<View className="addr_item_right">{aftersales?.afterSalesZip}</View>
|
<View className="addr_item_right">{aftersales?.afterSalesZip}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="fuzhi">复制地址</View>
|
<View className="fuzhi" onClick={handleClickCopyAddr} >复制地址</View>
|
||||||
<View className="line" style={{ margin: '130rpx 0 110rpx 0' }}></View>
|
<View className="line" style={{ margin: '130rpx 0 110rpx 0' }}></View>
|
||||||
<View className="curtain_content_text">
|
<View className="curtain_content_text">
|
||||||
<View className="curtain_content_text_title">温馨提示</View>
|
<View className="curtain_content_text_title">温馨提示</View>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue