商城测试版v6
This commit is contained in:
parent
61b72fc372
commit
305c3aa0eb
@ -33,10 +33,11 @@ const App:FC = (params) => {
|
|||||||
if(res.from === 'button') {
|
if(res.from === 'button') {
|
||||||
path = `/pages/details/index?share=${sortCode.shareShortDetail.code}`
|
path = `/pages/details/index?share=${sortCode.shareShortDetail.code}`
|
||||||
title = sortCode.shareShortDetail.title
|
title = sortCode.shareShortDetail.title
|
||||||
|
imageUrl = sortCode.shareShortDetail.img
|
||||||
} else {
|
} else {
|
||||||
path = `/pages/index/index?share=${sortCode.shareShortPage.code}`
|
path = `/pages/index/index?share=${sortCode.shareShortPage.code}`
|
||||||
title = sortCode.shareShortPage.title
|
title = sortCode.shareShortPage.title
|
||||||
imageUrl = IMG_CND_Prefix + '/mall/share_img_01.png'
|
imageUrl = sortCode.shareShortPage.img
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
|
@ -20,10 +20,12 @@ export const GET_UPLOAD_SIGN = `/upyun/getsign` // 请求签名 url
|
|||||||
export const UPLOAD_CDN_URL = `https://v0.api.upyun.com/`
|
export const UPLOAD_CDN_URL = `https://v0.api.upyun.com/`
|
||||||
|
|
||||||
// cdn
|
// cdn
|
||||||
export const IMG_CND_Prefix = CURRENT_ENV.includes('development')? "https://test.cdn.zzfzyc.com":"https://cdn.zzfzyc.com"
|
// export const IMG_CND_Prefix = CURRENT_ENV.includes('development')? "https://test.cdn.zzfzyc.com":"https://cdn.zzfzyc.com"
|
||||||
|
export const IMG_CND_Prefix = CURRENT_ENV.includes('development')? "https://test.cdn.zzfzyc.com":"https://test.cdn.zzfzyc.com"
|
||||||
|
|
||||||
//在线支付图片baseUrl
|
//在线支付图片baseUrl
|
||||||
export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('development')? "https://test.zzfzyc.com":"https://www.zzfzyc.com"
|
// export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('development')? "https://test.zzfzyc.com":"https://www.zzfzyc.com"
|
||||||
|
export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('development')? "https://test.zzfzyc.com":"https://test.zzfzyc.com"
|
||||||
|
|
||||||
// 上传图片视频
|
// 上传图片视频
|
||||||
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`;
|
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`;
|
||||||
|
@ -30,7 +30,6 @@ const kindeList:FC<Param> = memo(({order, onSelectChange}) => {
|
|||||||
|
|
||||||
//checkbox选中回调
|
//checkbox选中回调
|
||||||
const selectCallBack = (colorItem) => {
|
const selectCallBack = (colorItem) => {
|
||||||
console.log('colorItem::',colorItem)
|
|
||||||
onSelectChange?.({color_id:colorItem.id, length:colorItem.length, sale_order_detail_id:colorItem.sale_order_detail_id, status: true})
|
onSelectChange?.({color_id:colorItem.id, length:colorItem.length, sale_order_detail_id:colorItem.sale_order_detail_id, status: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ const kindeList:FC<Param> = memo(({order, onNumChange}) => {
|
|||||||
//判断该面料下的颜色都退完了
|
//判断该面料下的颜色都退完了
|
||||||
const colorNum = (item) => {
|
const colorNum = (item) => {
|
||||||
let res = item.product_colors.some(val => {
|
let res = item.product_colors.some(val => {
|
||||||
return val.return_roll < val.roll
|
return (val.return_roll + val.apply_return_roll) < val.roll
|
||||||
})
|
})
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,8 @@ import LabAndImg from '@/components/LabAndImg';
|
|||||||
import { alert } from '@/common/common';
|
import { alert } from '@/common/common';
|
||||||
import AddCollection from '@/components/addCollection';
|
import AddCollection from '@/components/addCollection';
|
||||||
import { AddFavoriteApi, DelFavoriteProductApi } from '@/api/favorite';
|
import { AddFavoriteApi, DelFavoriteProductApi } from '@/api/favorite';
|
||||||
import { GetShoppingCartApi } from '@/api/shopCart';
|
|
||||||
import { useSelector } from '@/reducers/hooks';
|
|
||||||
import useCommonData from '@/use/useCommonData';
|
import useCommonData from '@/use/useCommonData';
|
||||||
|
import { IMG_CND_Prefix } from '@/common/constant';
|
||||||
|
|
||||||
type item = {title:string, img:string, url:string, id:number}
|
type item = {title:string, img:string, url:string, id:number}
|
||||||
|
|
||||||
@ -109,15 +108,14 @@ export default (props:Params) => {
|
|||||||
setShowPreview(true)
|
setShowPreview(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const {setSortCode, userInfo : userObj } = useUserInfo()
|
const {setSortCode, userInfo : userObj } = useUserInfo()
|
||||||
//详情页获取分享短码
|
//详情页获取分享短码
|
||||||
const {ShareDetail} = SHARE_SCENE
|
const {ShareDetail} = SHARE_SCENE
|
||||||
const {fetchData: fetchDataShortCode} = GetShortCodeApi()
|
const {fetchData: fetchDataShortCode} = GetShortCodeApi()
|
||||||
const getShortCode = async () => {
|
const getShortCode = async () => {
|
||||||
const {data: resDetail} = await fetchDataShortCode({"share_user_id": userObj.adminUserInfo.user_id, type:ShareDetail.value, product_id: parseInt(params.id)})
|
const {data: resDetail} = await fetchDataShortCode({"share_user_id": userObj.adminUserInfo.user_id, type:ShareDetail.value, product_id: parseInt(params.id)})
|
||||||
setSortCode({... userObj.sort_code, shareShortDetail: {title: productName as string, code: resDetail.md5_key, img:''}})
|
const img = IMG_CND_Prefix + (productInfo.texture_url?productInfo.texture_url.split(',')[0]:'/mall/share_img_01.png')
|
||||||
|
setSortCode({... userObj.sort_code, shareShortDetail: {title: productName as string, code: resDetail.md5_key, img:img}})
|
||||||
}
|
}
|
||||||
|
|
||||||
//授权手机号和下单
|
//授权手机号和下单
|
||||||
@ -175,16 +173,11 @@ export default (props:Params) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//页面下拉刷新
|
//页面下拉刷新
|
||||||
usePullDownRefresh(() => {
|
usePullDownRefresh(() => {
|
||||||
getProductDetail()
|
getProductDetail()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<DesSwiper list={productInfo.texture_url?productInfo.texture_url.toString().split(','):[]}/>
|
<DesSwiper list={productInfo.texture_url?productInfo.texture_url.toString().split(','):[]}/>
|
||||||
|
@ -43,7 +43,8 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
|||||||
//有应收单id时用应收单获取数据
|
//有应收单id时用应收单获取数据
|
||||||
let {data} = await orderFetchData({id: orderInfo?.should_collect_order_id})
|
let {data} = await orderFetchData({id: orderInfo?.should_collect_order_id})
|
||||||
setPayInfo(() => data)
|
setPayInfo(() => data)
|
||||||
} else {
|
}
|
||||||
|
else if(orderInfo&&orderInfo.pre_collect_order_id) {
|
||||||
//用预付单id获取支付信息
|
//用预付单id获取支付信息
|
||||||
let {data} = await prepayOrderFetchData({id: orderInfo?.pre_collect_order_id})
|
let {data} = await prepayOrderFetchData({id: orderInfo?.pre_collect_order_id})
|
||||||
setPayInfo(() => data)
|
setPayInfo(() => data)
|
||||||
@ -63,7 +64,6 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(orderInfo && payInfo) {
|
if(orderInfo && payInfo) {
|
||||||
console.log('orderInfo::',orderInfo)
|
|
||||||
let lists:ListParam[] = []
|
let lists:ListParam[] = []
|
||||||
orderInfo.product_list?.map(pitem => {
|
orderInfo.product_list?.map(pitem => {
|
||||||
pitem?.product_colors?.map(citem => {
|
pitem?.product_colors?.map(citem => {
|
||||||
|
@ -103,7 +103,7 @@ const Header = memo((props: any) => {
|
|||||||
const { data } = props;
|
const { data } = props;
|
||||||
console.log(props, 'propsprops')
|
console.log(props, 'propsprops')
|
||||||
let menu = [{ text: "待配布", icon: "icon-daipeibu", url: "/pages/orderList/index?status=0" }, { text: "待付款", icon: "icon-daifukuan", url: "/pages/orderList/index?status=1" },
|
let menu = [{ text: "待配布", icon: "icon-daipeibu", url: "/pages/orderList/index?status=0" }, { text: "待付款", icon: "icon-daifukuan", url: "/pages/orderList/index?status=1" },
|
||||||
{ text: "待发货", icon: "icon-daifahuo", url: "/pages/orderList/index?status=2" }, { text: "已发货", icon: "icon-yifahuo", url: "/pages/orderList/index?status=3" },
|
{ text: "待发货", icon: "icon-daifahuo", url: "/pages/orderList/index?status=2" }, { text: "待收货", icon: "icon-yifahuo", url: "/pages/orderList/index?status=3" },
|
||||||
{ text: "退款/售后", icon: "icon-a-tuikuanshouhou", url: "/pages/salesAfterList/index" }];
|
{ text: "退款/售后", icon: "icon-a-tuikuanshouhou", url: "/pages/salesAfterList/index" }];
|
||||||
const { getPhoneNumber } = useLogin();
|
const { getPhoneNumber } = useLogin();
|
||||||
const mGetPhoneNumber = (ev) => {
|
const mGetPhoneNumber = (ev) => {
|
||||||
|
@ -6,6 +6,7 @@ import { SHARE_SCENE } from "@/common/enum"
|
|||||||
import { GetShortCodeApi } from "@/api/share"
|
import { GetShortCodeApi } from "@/api/share"
|
||||||
import { alert } from "@/common/common"
|
import { alert } from "@/common/common"
|
||||||
import { LoginApi } from "@/api/login"
|
import { LoginApi } from "@/api/login"
|
||||||
|
import { IMG_CND_Prefix } from "@/common/constant"
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const {setUserInfo, setAdminUserInfo, setSortCode, userInfo} = useUserInfo()
|
const {setUserInfo, setAdminUserInfo, setSortCode, userInfo} = useUserInfo()
|
||||||
@ -122,7 +123,7 @@ export default () => {
|
|||||||
const {fetchData: fetchDataShortCode} = GetShortCodeApi()
|
const {fetchData: fetchDataShortCode} = GetShortCodeApi()
|
||||||
const getShortCode = async (user_id) => {
|
const getShortCode = async (user_id) => {
|
||||||
const {data: resPage} = await fetchDataShortCode({"share_user_id": user_id, type:SharePage.value})
|
const {data: resPage} = await fetchDataShortCode({"share_user_id": user_id, type:SharePage.value})
|
||||||
setSortCode({...userInfo.sort_code, shareShortPage: {title: '陆盈电子商城', code: resPage.md5_key, img:''}})
|
setSortCode({...userInfo.sort_code, shareShortPage: {title: '打造面料爆品 专注客户服务', code: resPage.md5_key, img:IMG_CND_Prefix + '/mall/share_img_01.png'}})
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user