|
@@ -8,6 +8,8 @@ import { KuIsTreeType } from '@/pages/D_storeManage/D4impStor/type'
|
|
|
import { baseURL } from './http'
|
|
|
import { cascaderArr } from '@/pages/C_goodsManage/C1register/AddGoods/data'
|
|
|
import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
|
|
|
+import { useLocation } from 'react-router-dom'
|
|
|
+import qs from 'query-string'
|
|
|
// import dd from 'gdt-jsapi'
|
|
|
const history = createHashHistory()
|
|
|
|
|
@@ -31,11 +33,15 @@ export const infoPageBackFu = (url: string) => {
|
|
|
export default history
|
|
|
|
|
|
// -------------------所有藏品详情 全部新页面打开-------------------
|
|
|
-export const openGoodsInfoFu = (id: number, src?: string) => {
|
|
|
+export const openGoodsInfoFu = (id: number, menuId: number, src?: string, orderId?: unknown) => {
|
|
|
// const urlArr = window.location
|
|
|
// const urlQian = urlArr.origin + urlArr.pathname
|
|
|
|
|
|
- history.push(src ? (src + id).replace('#', '') : `/goodsLook/${id}`)
|
|
|
+ history.push(
|
|
|
+ src
|
|
|
+ ? (src + id).replace('#', '')
|
|
|
+ : `/goodsLook/${id}/${menuId}${orderId ? '?oId=' + orderId : ''}`
|
|
|
+ )
|
|
|
|
|
|
// dd.openLink({
|
|
|
// url: 'https://sit-yiwubwg.4dage.com/abcd/index.html#/business'
|
|
@@ -401,3 +407,8 @@ export const downFileFu = async (url: string, back?: () => void) => {
|
|
|
console.error('Download failed:', error)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+export const useQuery = () => {
|
|
|
+ const { search } = useLocation()
|
|
|
+ return qs.parse(search)
|
|
|
+}
|