Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
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
hooloo
mp
user
Commits
cd89bfe0
Commit
cd89bfe0
authored
2 years ago
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成店铺选择排序问题
parent
467b32c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
menuSubPackage/pages/areaSelect/areaSelect.vue
+19
-1
pages/mine/mine.vue
+1
-1
No files found.
menuSubPackage/pages/areaSelect/areaSelect.vue
View file @
cd89bfe0
...
...
@@ -10,7 +10,7 @@
<image
:style=
"
{'height':'100%','width':'100%'}" :src="'../../../static/imgs/jiantouhei2.png'" />
</view>
</view>
<div
v-for=
"item in
l
ist"
:key=
"item.id"
@
click=
"selectedShop(item)"
class=
"shop_item"
:class=
"shopId==item.id?'active':''"
>
<div
v-for=
"item in
finalL
ist"
:key=
"item.id"
@
click=
"selectedShop(item)"
class=
"shop_item"
:class=
"shopId==item.id?'active':''"
>
<div
class=
"header"
>
<view
class=
"name"
>
{{
item
.
name
}}
</view>
<view
class=
"adressBox"
>
...
...
@@ -55,6 +55,24 @@ export default {
this
.
list
=
uni
.
getStorageSync
(
'shops'
);
this
.
areaName
=
uni
.
getStorageSync
(
'areaName'
)
},
computed
:
{
finalList
()
{
const
{
list
}
=
this
const
val
=
list
.
sort
((
a
,
b
)
=>
{
return
a
.
realDistance
-
b
.
realDistance
})
let
unshiftVal
=
{}
val
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
this
.
shopId
){
unshiftVal
=
val
.
splice
(
index
,
1
)[
0
]
}
})
if
(
JSON
.
stringify
(
unshiftVal
)
!=
'{}'
){
val
.
unshift
(
unshiftVal
)
}
return
val
}
},
methods
:
{
selectedShop
(
item
)
{
uni
.
setStorage
({
key
:
'shopData'
,
data
:
item
});
...
...
This diff is collapsed.
Click to expand it.
pages/mine/mine.vue
View file @
cd89bfe0
...
...
@@ -5,7 +5,7 @@
<!--
<image
class=
"logImg"
src=
"/static/imgs/hooloo.png"
></image>
-->
<!--
<view
class=
"logText"
>
未 来 咖 啡
</view>
-->
</view>
<image
:src=
"'https://s3.bmp.ovh/imgs/2022/07/0
1/f683c3a5225011b2
.gif'"
/>
<image
:src=
"'https://s3.bmp.ovh/imgs/2022/07/0
5/1768111c5c7f5300
.gif'"
/>
<!--
<video
class=
"video"
autoplay
muted
loop
:controls=
"false"
:enable-progress-gesture=
"false"
objectFit=
'cover'
src=
"http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/e6582afb60924.mp4"
></video>
-->
<view
class=
"mod11"
>
<view
class=
"avatar"
>
...
...
This diff is collapsed.
Click to expand it.
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