Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
3524bea4
Commit
3524bea4
authored
Mar 08, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a7538e4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
src/components/common/StoreAddr.vue
+15
-12
src/components/common/pageLoading.vue
+3
-2
src/pages/home/index.vue
+3
-1
No files found.
src/components/common/StoreAddr.vue
View file @
3524bea4
...
...
@@ -35,33 +35,36 @@ export default {
};
},
onLoad
()
{
this
.
getLocationHandle
(()
=>
{
this
.
getShopList
();
});
if
(
this
.
openThousandsStoresFlag
)
{
this
.
getLocationHandle
(()
=>
{
this
.
getShopList
();
});
}
},
computed
:
{
shopName
()
{
return
app
.
globalData
.
shopInfo
.
shopName
;
return
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
app
.
globalData
.
shopInfo
.
shopName
;
},
shopLogo
()
{
return
DFSImg
(
app
.
globalData
.
shopInfo
.
logoUrl
,
400
,
400
);
return
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
DFSImg
(
app
.
globalData
.
shopInfo
.
logoUrl
,
400
,
400
);
},
// 开启连锁商城(千店千面)
openThousandsStoresFlag
()
{
return
app
.
globalData
.
shopInfo
.
openThousandsStoresFlag
==
1
return
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
app
.
globalData
.
shopInfo
.
openThousandsStoresFlag
==
1
}
},
methods
:
{
getLocationHandle
(
callback
)
{
let
_this
=
this
;
wx
.
getLocation
({
type
:
"wgs84"
,
type
:
"gcj02"
,
// gcj02 wgs84
isHighAccuracy
:
true
,
success
:
res
=>
{
// latitude longitude speed accuracy
log
.
info
(
"~~~~~~~~~1~~~~~~~"
,
res
);
console
.
log
(
"~~~~~~~~~1~~~~~~~"
,
res
);
this
.
offlineStoreReq
.
latitude
=
res
.
latitude
;
this
.
offlineStoreReq
.
longitude
=
res
.
longitude
;
_
this
.
offlineStoreReq
.
latitude
=
res
.
latitude
;
_
this
.
offlineStoreReq
.
longitude
=
res
.
longitude
;
// 存缓存
wx
.
setStorageSync
(
"locationObj"
,
JSON
.
stringify
(
res
));
callback
(
res
);
...
...
@@ -86,8 +89,8 @@ export default {
// 进店规则获取门店id
let
query
=
{
channelType
:
2
,
//设备类型(0:pc,1:app,2:小程序)
consumerLongitude
:
this
.
$store
.
state
.
wxLocation
.
longitude
,
//经度,小程序和app可以获取到就要传,没有不传
consumerLatitude
:
this
.
$store
.
state
.
wxLocation
.
latitude
,
//纬度,小程序和app可以获取到就要传,没有不传
consumerLongitude
:
this
.
offlineStoreReq
.
longitude
,
//经度,小程序和app可以获取到就要传,没有不传
consumerLatitude
:
this
.
offlineStoreReq
.
latitude
,
//纬度,小程序和app可以获取到就要传,没有不传
distributionOfficerShopId
:
""
//分销员门店id,没有不传
}
let
enterShopRes
=
await
shop
.
getEnterShopId
(
query
);
...
...
@@ -112,8 +115,8 @@ export default {
this
.
$store
.
dispatch
(
"setShopName"
,
{
shopName
:
ruleShop
[
0
].
shopName
,
});
return
;
}
return
;
}
this
.
storeList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
shopName
==
offlineShopName
)
{
...
...
src/components/common/pageLoading.vue
View file @
3524bea4
<
template
>
<div
class=
"loadings"
>
<div
class=
"loadings"
v-if=
"shopLogo"
>
<div
class=
"img flex"
>
<image
:src=
"shopLogo"
alt=
""
mode=
"aspectFill"
></image>
<van-loading
color=
"black"
size=
"60px"
/>
...
...
@@ -9,6 +9,7 @@
<
script
>
import
{
DFSImg
}
from
"@/utils/index"
;
const
app
=
getApp
();
export
default
{
props
:
{
toHide
:
{
...
...
@@ -21,7 +22,7 @@ export default {
},
computed
:
{
shopLogo
()
{
let
logoUrl
=
this
.
mpA
pp
.
globalData
.
shopInfo
.
logoUrl
;
let
logoUrl
=
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
a
pp
.
globalData
.
shopInfo
.
logoUrl
;
return
logoUrl
?
DFSImg
(
logoUrl
):
""
;
},
},
...
...
src/pages/home/index.vue
View file @
3524bea4
...
...
@@ -387,7 +387,9 @@ export default {
})
});
}
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
if
(
this
.
$options
)
{
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
if
(
options
.
from
&&
options
.
from
==
"logout"
)
{
//来自用户登出
wx
.
removeStorage
({
...
...
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