Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
ed8abdd8
Commit
ed8abdd8
authored
Aug 14, 2024
by
蔡亮华(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表添加长按删除
parent
989b45f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
storeEntry.js
src/api/storeEntry.js
+8
-0
index.vue
src/pages/storeEntry/index.vue
+35
-3
No files found.
src/api/storeEntry.js
View file @
ed8abdd8
...
...
@@ -16,3 +16,11 @@ export function applyShop(data) {
data
,
});
}
export
function
deleteShopInfoById
(
data
)
{
return
request
({
url
:
`/sgyrdd/shop/delByShopId`
,
method
:
'GET'
,
data
,
});
}
src/pages/storeEntry/index.vue
View file @
ed8abdd8
...
...
@@ -10,6 +10,7 @@
v-for=
"item in list"
:key=
"item.shopId"
@
click=
"item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
@
longpress=
"deleteShop(item.shopId)"
>
<!-- 列表头部 -->
<view
class=
"titlecon"
>
...
...
@@ -41,7 +42,7 @@
</view>
</view>
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
,长按可删除店铺
</view>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-else
/>
</view>
<view
class=
"butCon"
><button
class=
"butXz"
@
click=
"shopGto()"
>
申请入驻
</button></view>
...
...
@@ -50,7 +51,7 @@
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
shopList
}
from
'@/api/storeEntry'
;
import
{
shopList
,
deleteShopInfoById
}
from
'@/api/storeEntry'
;
const
itemUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
shopStatus
=
reactive
({
0
:
'停业中'
,
...
...
@@ -79,7 +80,38 @@ const shopGto = (item) => {
},
});
};
getList
();
onLoad
(()
=>
{
getList
();
});
const
deleteShop
=
(
shopId
)
=>
{
xma
.
showModal
({
title
:
'删除提示'
,
content
:
'确定删除店铺吗?'
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
msg
=
''
;
const
res
=
await
deleteShopInfoById
({
shopId
});
if
(
res
.
code
===
0
)
{
xma
.
showToast
({
title
:
'删除成功'
,
duration
:
3000
,
success
:
(
res
)
=>
{
getList
();
},
});
}
else
{
xma
.
showToast
({
title
:
'删除失败,请稍后再试'
,
duration
:
3000
,
});
}
}
},
});
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment