新增营销系统、分销系统、会员功能、门店、提现功能
This commit is contained in:
@ -36,7 +36,7 @@
|
||||
</view>
|
||||
<view class="address-desc">{{ item.province }}-{{ item.city }}-{{ item.district }} {{
|
||||
item.detail
|
||||
}}
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -76,8 +76,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<ReturnTop :scroll-top="scrollTop" />
|
||||
<Modal ref="modalRef" content="确认要删除地址吗?" @confirm="doDeleteRequest" />
|
||||
|
||||
<Modal
|
||||
ref="modalRef"
|
||||
content="确认要删除地址吗?"
|
||||
@confirm="doDeleteRequest" />
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
@ -86,7 +88,7 @@ import { ref, unref } from 'vue'
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { useMainStore } from '@/store/store'
|
||||
import Empty from '@/components/Empty/index.vue'
|
||||
import { emptyAddressIcon, addressEditIcon } from "@/utils/images";
|
||||
import { addressEditIcon, emptyAddressIcon } from "@/utils/images";
|
||||
import { getAddressDel, } from '@/api/address'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import Header from "@/components/Header/index.vue"
|
||||
@ -120,7 +122,7 @@ onReachBottom((e) => {
|
||||
|
||||
const goCreateAddress = () => {
|
||||
let addressData = {};
|
||||
if (actionType.value == 'select') {
|
||||
if (actionType.value === 'select') {
|
||||
addressData.type = 'select';
|
||||
}
|
||||
push({url: '/pages/createAddress/createAddress'}, {data: addressData})
|
||||
@ -130,20 +132,20 @@ const goEditorAddress = (address) => {
|
||||
let addressData = {
|
||||
id: address.id
|
||||
};
|
||||
if (actionType.value == 'select') {
|
||||
if (actionType.value === 'select') {
|
||||
addressData.type = 'select';
|
||||
}
|
||||
push({url: '/pages/createAddress/createAddress'}, {data: addressData})
|
||||
}
|
||||
|
||||
const handleClick = (item) => {
|
||||
if (actionType.value == 'select') {
|
||||
if (actionType.value === 'select') {
|
||||
main.setSelectAddress(item.id)
|
||||
console.log(main.cartId, 'main.cartId')
|
||||
push({url: '/pages/submitOrder/submitOrder'}, {
|
||||
data: {cartId: unref(selectCartId) || main.cartId},
|
||||
type: 'redirectTo'
|
||||
})
|
||||
goBack()
|
||||
// push({url: '/pages/submitOrder/submitOrder'}, {
|
||||
// data: {cartId: unref(selectCartId) || main.cartId},
|
||||
// type: 'redirectTo'
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,25 +165,24 @@ onLoad((option) => {
|
||||
})
|
||||
|
||||
const modalRef = ref()
|
||||
const prepareData= ref({})
|
||||
const prepareData = ref({})
|
||||
|
||||
/**
|
||||
* 打开弹窗
|
||||
*/
|
||||
function showModal(data){
|
||||
function showModal(data) {
|
||||
prepareData.value = data
|
||||
unref(modalRef).show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地址
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function doDeleteRequest(){
|
||||
async function doDeleteRequest() {
|
||||
await getAddressDel(prepareData.value)
|
||||
await main.restAddress()
|
||||
await main.getAddressList(1)
|
||||
if(main.selectAddress && prepareData.value.id === main.selectAddress.id){
|
||||
if (main.selectAddress && prepareData.value.id === main.selectAddress.id) {
|
||||
main.clearSelectAddress()
|
||||
}
|
||||
}
|
||||
@ -189,16 +190,6 @@ async function doDeleteRequest(){
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../style/images";
|
||||
.addressList {
|
||||
.address {
|
||||
&:last-child {
|
||||
// &::after {
|
||||
// display: none;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.address {
|
||||
padding: 25rpx 35rpx;
|
||||
@ -207,9 +198,6 @@ async function doDeleteRequest(){
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&-main {
|
||||
}
|
||||
|
||||
&-actions {
|
||||
&-edit {
|
||||
width: 33rpx;
|
||||
@ -295,7 +283,7 @@ async function doDeleteRequest(){
|
||||
|
||||
.form-buttons {
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
@ -311,8 +299,10 @@ async function doDeleteRequest(){
|
||||
justify-content: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.addressList :deep(.uv-swipe-action-item__right__button__wrapper) {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
@ -322,6 +312,7 @@ async function doDeleteRequest(){
|
||||
background-size: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.addressList :deep(.uv-swipe-action-item__right__button__wrapper__text) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
Reference in New Issue
Block a user