优化
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<item v-for='(item,index) in addressList' :key='index' :item='item'
|
||||
@on-checked='onChecked(item)'
|
||||
@on-edit='args => goPath(`create?bean=${encodeURIComponent(JSON.stringify(args))}`)'
|
||||
@on-delete='args => {addressDelete(args?.addrid);fetchAddressList}' />
|
||||
@on-delete='args => {handleDelete(args)}' />
|
||||
</scroll-view>
|
||||
|
||||
<view class='bottom-button-view'>
|
||||
@@ -42,6 +42,23 @@ const fetchAddressList = async () => {
|
||||
addressList.value = await getAddressList();
|
||||
};
|
||||
|
||||
const handleDelete = async (item: any) => {
|
||||
uni.showModal(
|
||||
{
|
||||
title: '提示',
|
||||
content: '确定删除该地址吗?',
|
||||
success: async (res) => {
|
||||
if(res.confirm) {
|
||||
const result = await addressDelete(item?.addrid);
|
||||
if(result) {
|
||||
await fetchAddressList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const onChecked = (e: any) => {
|
||||
const pages = getCurrentPages();
|
||||
if(pages.length >= 2 && pages[pages.length - 2].route?.includes('pages/mall/subs/order/order-confirm')) {
|
||||
|
@@ -18,11 +18,14 @@
|
||||
<view class='address-view c-flex-column'
|
||||
v-if='orderBean?.order?.address'>
|
||||
<view class='user-info c-flex-row'>
|
||||
<text v-if='orderBean.order.address.defaultstatus==1'>默认</text>
|
||||
<text class='status' v-if='orderBean.order.address.defaultstatus==1'>默认</text>
|
||||
<text>{{ orderBean?.order?.address.name }}</text>
|
||||
<text>{{ orderBean?.order?.address.mobile }}</text>
|
||||
<view style='flex: 1' />
|
||||
<text style='color: #5B96FB'>复制</text>
|
||||
<text style='color: #5B96FB'
|
||||
@click.stop='copy(orderBean?.order?.address.name+","+orderBean?.order?.address.mobile+","+orderBean?.order?.address.addr)'>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class='addr c-flex-row'>
|
||||
@@ -89,7 +92,7 @@
|
||||
|
||||
<view class='order-no c-flex-column'>
|
||||
<text>订单编号:{{ orderBean?.order?.id }}
|
||||
<text style='color: #5B96FB;margin-left: 10rpx'>复制</text>
|
||||
<text style='color: #5B96FB;margin-left: 10rpx' @click.stop='copy(orderBean?.order?.id||"")'>复制</text>
|
||||
</text>
|
||||
<text>下单时间:{{ orderBean?.order?.createTime }}</text>
|
||||
<text>
|
||||
@@ -122,7 +125,7 @@
|
||||
import { assetsUrl, defaultImage } from '@/utils/assets';
|
||||
import { getOrderDetail } from '@/api/order';
|
||||
import { OrderBean } from '@/api/order/types';
|
||||
import { parseParameter, sortASCII } from '@/utils';
|
||||
import { copy, parseParameter, sortASCII } from '@/utils';
|
||||
import { hexMD5 } from '@/utils/common/md5';
|
||||
import { useUserStore } from '@/store';
|
||||
import { getOrderDeadline, handlePayResult, isPending } from '@/utils/order';
|
||||
@@ -255,7 +258,7 @@ const payment = () => {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
|
||||
text:nth-of-type(1) {
|
||||
.status {
|
||||
padding: 2rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #F32B2B;
|
||||
|
Reference in New Issue
Block a user