商城测试版v7

This commit is contained in:
2022-07-22 20:46:40 +08:00
parent c646bac0a4
commit c4684c11b8
19 changed files with 142 additions and 130 deletions
@@ -5,12 +5,10 @@ import styles from './index.module.scss'
import Popup from "@/components/popup";
import Taro from "@tarojs/taro";
import { alert } from "@/common/common";
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from "@/common/fotmat";
import { formatDateTime, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from "@/common/fotmat";
import useCheckAuthorize from "@/use/useCheckAuthorize";
import { GetPayCode } from "@/api/onlinePay";
import LoadingCard from "@/components/loadingCard";
import { GetOrderPayApi, GetPrepayOrderPayApi } from "@/api/orderPay";
type Param = {
show?: true|false,
@@ -52,7 +50,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
product_color_name: citem.name,
num: citem.roll.toString(),
length: (citem.length/100).toString(),
weight: formatWeightDiv(citem.estimate_weight).toString(),
weight: formatWeightDiv(citem.actual_weight||citem.estimate_weight).toString(),
sale_price: formatPriceDiv(citem.sale_price).toString(),
total_price: formatPriceDiv(citem.total_sale_price||citem.estimate_amount).toString(),
})
@@ -79,7 +77,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
order_total_price: formatPriceDiv(orderInfo.total_sale_price).toString(), //订单价格
order_total_num: (orderInfo.total_number).toString(),
qrcode:"", //跳转链接
order_total_weight: formatWeightDiv(orderInfo.total_estimate_weight).toString(), //订单布匹重量
order_total_weight: formatWeightDiv(orderInfo.total_weight||orderInfo.total_estimate_weight).toString(), //订单布匹重量
list: lists
}))
}
@@ -104,7 +102,6 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
return addressInfo?.shipment_mode == 2? orderInfo.target_user_phone : orderInfo.take_goods_phone
}
//获取支付二维码
const [payCodeImage, setPayCodeImage] = useState<string>('')
const fileData = useRef({
@@ -142,7 +139,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
alert.loading('正在保存图片')
Taro.saveImageToPhotosAlbum({
filePath: fileData.current.filePath,
success: function (res) {
success: function () {
alert.success('图片保存成功')
},
fail: function (err) {