解决图片路径处理问题
This commit is contained in:
parent
5ebd403866
commit
6cebc55f85
@ -4,13 +4,13 @@
|
|||||||
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
||||||
// 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 = `http://192.168.1.30:40001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.30:40001/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 = `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.15:50001/lymarket` // 杰
|
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
|
@ -139,10 +139,11 @@ export const toDecimal2 = (x) => {
|
|||||||
/**
|
/**
|
||||||
* 格式化图片路径
|
* 格式化图片路径
|
||||||
* @param {*} url
|
* @param {*} url
|
||||||
|
* @status true|false
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const formatImgUrl = (url, suffix="!w200") => {
|
export const formatImgUrl = (url, status = false ,suffix="!w200") => {
|
||||||
return url?url + suffix:IMG_CND_Prefix +'/mall/no_img.png'
|
return url? (status?IMG_CND_Prefix:'') +url + suffix:IMG_CND_Prefix +'/mall/no_img.png'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
.advance_main{
|
||||||
|
width:100%;
|
||||||
|
height: 238px;
|
||||||
|
background-color: #007AFF;
|
||||||
|
border-radius: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #dddddd;
|
||||||
|
position: relative;
|
||||||
|
.time_con{
|
||||||
|
padding-left: 30px;
|
||||||
|
.times{
|
||||||
|
margin-bottom: 25px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
width: 46px;
|
||||||
|
height: 50px;
|
||||||
|
background: #0063ce;
|
||||||
|
border-radius: 10px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.separate{
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.cardIcon{
|
||||||
|
width: 238px;
|
||||||
|
height: 178px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
.image{
|
||||||
|
width:100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
import { Text, View } from "@tarojs/components";
|
import { formatImgUrl } from "@/common/fotmat";
|
||||||
|
import { Image, Text, View } from "@tarojs/components";
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
@ -6,11 +7,19 @@ export default memo(() => {
|
|||||||
return (
|
return (
|
||||||
<View className={styles.advance_main}>
|
<View className={styles.advance_main}>
|
||||||
<View className={styles.time_con}>
|
<View className={styles.time_con}>
|
||||||
<View className="">
|
<View className={styles.times}>
|
||||||
<Text>剩</Text>
|
<Text className={styles.text}>剩</Text>
|
||||||
|
<Text className={styles.num}>23</Text>
|
||||||
|
<Text className={styles.separate}>:</Text>
|
||||||
|
<Text className={styles.num}>58</Text>
|
||||||
|
<Text className={styles.separate}>:</Text>
|
||||||
|
<Text className={styles.num}>55</Text>
|
||||||
</View>
|
</View>
|
||||||
<Text>支付关闭,订单自动取消</Text>
|
<Text>支付关闭,订单自动取消</Text>
|
||||||
</View>
|
</View>
|
||||||
|
<View className={styles.cardIcon}>
|
||||||
|
<Image className={styles.image} src={formatImgUrl("/mall/my_cart.png", true)}/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
@ -17,6 +17,7 @@ import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
|
|||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import AddressInfoDetail from "./components/addressInfoDetail";
|
import AddressInfoDetail from "./components/addressInfoDetail";
|
||||||
|
import AdvanceOrderState from "./components/advanceOrderState";
|
||||||
import ApplyRefund from "./components/applyRefund";
|
import ApplyRefund from "./components/applyRefund";
|
||||||
import KindList from "./components/kindList";
|
import KindList from "./components/kindList";
|
||||||
import OrderState from "./components/orderState";
|
import OrderState from "./components/orderState";
|
||||||
@ -250,6 +251,7 @@ import styles from './index.module.scss'
|
|||||||
return (
|
return (
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
<OrderState orderInfo={orderDetail} onRefresh={refresh}/>
|
<OrderState orderInfo={orderDetail} onRefresh={refresh}/>
|
||||||
|
{/* <AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh}/> */}
|
||||||
<View>
|
<View>
|
||||||
<AddressInfoDetail orderInfo={defaultAddress} onLogistics={getLogistics} onSelect={getAddress} onChangeShipmentMode={getShipmentMode} ref={addressRef} />
|
<AddressInfoDetail orderInfo={defaultAddress} onLogistics={getLogistics} onSelect={getAddress} onChangeShipmentMode={getShipmentMode} ref={addressRef} />
|
||||||
</View>
|
</View>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user