Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
75cb9772
Commit
75cb9772
authored
Oct 30, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改详情 列表
parent
1a5bb0a5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
561 additions
and
95 deletions
+561
-95
store.vue
components/store/store.vue
+39
-32
style1.vue
components/store/style1.vue
+3
-1
style2.vue
components/store/style2.vue
+3
-1
style6.vue
components/store/style6.vue
+3
-1
pages.json
pages.json
+16
-14
index.vue
pages/index/index.vue
+41
-3
personalList.vue
pages/reserve/personalList.vue
+186
-0
storeDetails.vue
pages/reserve/storeDetails.vue
+219
-34
storeList.vue
pages/reserve/storeList.vue
+51
-9
No files found.
components/store/store.vue
View file @
75cb9772
...
...
@@ -9,40 +9,43 @@
}"
@click="goUrl" >
<view
class=
"box"
:style=
"
{'border-radius':goods.SearchFilletPX+'px'}" v-if="goods.IsShowStoreImg==true">
<image
mode=
"aspectFill"
class=
"img"
:style=
"
{'border-radius':goods.SearchFilletPX+'px'}" :src="store
I
nfo.storeCoverImg" >
</image>
<view
class=
"box"
:style=
"
{'border-radius':goods.SearchFilletPX+'px'}" v-if="goods.IsShowStoreImg==true"
@click="gostoreDetails"
>
<image
mode=
"aspectFill"
class=
"img"
:style=
"
{'border-radius':goods.SearchFilletPX+'px'}" :src="store
i
nfo.storeCoverImg" >
</image>
<view
class=
"switchstore"
@
click
.
stop=
"goStorelist()"
>
<image
style=
"width: 8px;height: 7px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/switchstore.png"
/>
<text
style=
"font-size: 10px;color: #111111;"
>
切换门店
</text>
<view
class=
"switchstore-box"
>
<image
style=
"width: 8px;height: 7px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/switchstore.png"
/>
<text
style=
"font-size: 10px;color: #111111;"
>
切换门店
</text>
</view>
</view>
<view
class=
"content"
>
<view
class=
"c-t"
>
<view
class=
"c-t-l"
>
{{
store
Info
.
storeName
?
storeI
nfo
.
storeName
:
'暂无数据'
}}
{{
store
info
.
storeName
?
storei
nfo
.
storeName
:
'暂无数据'
}}
</view>
<view
class=
"c-t-r"
>
距离:
{{
store
Info
.
distance
?(
storeInfo
.
distance
>=
1000
?(
storeInfo
.
distance
/
1000
).
toFixed
(
2
)
+
'km'
:
storeI
nfo
.
distance
+
'm'
):
"0"
}}
距离:
{{
store
info
.
distance
?(
storeinfo
.
distance
>=
1000
?(
storeinfo
.
distance
/
1000
).
toFixed
(
2
)
+
'km'
:
storei
nfo
.
distance
+
'm'
):
"0"
}}
</view>
</view>
<view
class=
"address"
>
{{
store
Info
.
storeAddress
?
storeI
nfo
.
storeAddress
:
''
}}
{{
store
info
.
storeAddress
?
storei
nfo
.
storeAddress
:
''
}}
</view>
<view
class=
"c-t"
style=
"justify-content: space-between;"
>
<view>
<image
mode=
"aspectFill"
style=
"width: 11px;height: 11px;"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'
/>
<text
class=
"tel"
>
{{
store
Info
.
storeTel
?
storeI
nfo
.
storeTel
:
''
}}
</text>
<text
class=
"tel"
>
{{
store
info
.
storeTel
?
storei
nfo
.
storeTel
:
''
}}
</text>
</view>
<view
style=
"font-size: 11px;color: #FFC86D;"
>
{{
store
Info
.
consumptionObj
?
storeI
nfo
.
consumptionObj
.
consumptionStoreName
:
''
}}
{{
store
info
.
consumptionObj
?
storei
nfo
.
consumptionObj
.
consumptionStoreName
:
''
}}
</view>
</view>
</view>
</view>
<view
v-else
>
<view
v-else
@
click=
"gostoreDetails"
>
<view
class=
"content2"
>
<view
class=
"c-t"
>
<view
class=
"c-t-l"
>
{{
store
Info
.
storeName
?
storeI
nfo
.
storeName
:
'暂无数据'
}}
{{
store
info
.
storeName
?
storei
nfo
.
storeName
:
'暂无数据'
}}
</view>
<view
class=
"c-t-r"
style=
"width: 80px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;"
>
...
...
@@ -54,18 +57,18 @@
</view>
<view
class=
"address"
>
<view
class=
"c-t-l"
style=
"font-size: 11px;color: #727272;"
>
{{
store
Info
.
storeAddress
?
storeI
nfo
.
storeAddress
:
''
}}
{{
store
info
.
storeAddress
?
storei
nfo
.
storeAddress
:
''
}}
</view>
<view
class=
"c-t-r"
>
距离:
{{
store
Info
.
distance
?(
storeInfo
.
distance
>=
1000
?(
storeInfo
.
distance
/
1000
).
toFixed
(
2
)
+
'km'
:
storeI
nfo
.
distance
+
'm'
):
"0"
}}
</view>
距离:
{{
store
info
.
distance
?(
storeinfo
.
distance
>=
1000
?(
storeinfo
.
distance
/
1000
).
toFixed
(
2
)
+
'km'
:
storei
nfo
.
distance
+
'm'
):
"0"
}}
</view>
</view>
<view
class=
"c-t"
style=
"justify-content: space-between;"
>
<view>
<image
mode=
"aspectFill"
style=
"width: 11px;height: 11px;"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'
/>
<text
class=
"tel"
>
{{
store
Info
.
storeTel
?
storeI
nfo
.
storeTel
:
''
}}
</text>
<text
class=
"tel"
>
{{
store
info
.
storeTel
?
storei
nfo
.
storeTel
:
''
}}
</text>
</view>
<view
style=
"font-size: 11px;color: #FFC86D;"
>
{{
store
Info
.
consumptionObj
?
storeI
nfo
.
consumptionObj
.
consumptionStoreName
:
''
}}
{{
store
info
.
consumptionObj
?
storei
nfo
.
consumptionObj
.
consumptionStoreName
:
''
}}
</view>
</view>
</view>
...
...
@@ -75,25 +78,16 @@
<
script
>
export
default
{
props
:
[
'goods'
],
props
:
[
'goods'
,
'storeinfo'
],
data
()
{
return
{
windowWidth
:
0
,
posiTop
:
0
,
store
I
nfo
:
{},
store
i
nfo
:
{},
position
:
''
,
}
},
created
()
{
this
.
getCurrentStore
()
let
that
=
this
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
that
.
position
=
res
.
latitude
+
','
+
res
.
longitude
;
}
});
},
methods
:{
goUrl
(){
...
...
@@ -106,17 +100,22 @@
data
:
{
storeId
:
0
,
position
:
this
.
position
},
},
(
res
)
=>
{
if
(
res
.
data
&&
res
.
data
.
store
I
nfo
){
this
.
store
Info
=
res
.
data
.
storeI
nfo
if
(
res
.
data
&&
res
.
data
.
store
i
nfo
){
this
.
store
info
=
res
.
data
.
storei
nfo
}
}
);
},
goStorelist
(){
//门店选择
uni
.
navigateTo
({
url
:
"/pages/reserve/storeList
?position="
+
this
.
position
url
:
"/pages/reserve/storeList
"
})
}
},
gostoreDetails
()
{
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails?id="
+
this
.
storeinfo
.
storeId
,
});
},
}
}
</
script
>
...
...
@@ -204,8 +203,16 @@
}
.store
.switchstore
{
position
:
absolute
;
top
:
5px
;
right
:
5px
;
top
:
0px
;
right
:
0px
;
width
:
80px
;
height
:
25px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.store
.switchstore-box
{
width
:
60px
;
height
:
15px
;
display
:
flex
;
...
...
components/store/style1.vue
View file @
75cb9772
...
...
@@ -92,7 +92,9 @@ export default {
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails?id="
+
item
.
Id
,
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
...
...
components/store/style2.vue
View file @
75cb9772
...
...
@@ -88,7 +88,9 @@ export default {
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails?id="
+
item
.
Id
,
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
...
...
components/store/style6.vue
View file @
75cb9772
...
...
@@ -73,7 +73,9 @@ export default {
},
methods
:
{
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails?id="
+
item
.
Id
,
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
...
...
pages.json
View file @
75cb9772
...
...
@@ -77,20 +77,20 @@
}
]
},
{
"root"
:
"pages/live"
,
"plugins"
:
{
"live-player-plugin"
:
{
"version"
:
"1.2.2"
,
"provider"
:
"wx2b03c6e691cd7370"
}
},
"pages"
:
[{
"path"
:
"index"
},
{
"path"
:
"share"
}]
},
//
{
//
"root"
:
"pages/live"
,
//
"plugins"
:
{
//
"live-player-plugin"
:
{
//
"version"
:
"1.2.2"
,
//
"provider"
:
"wx2b03c6e691cd7370"
//
}
//
},
//
"pages"
:
[{
//
"path"
:
"index"
//
},
{
//
"path"
:
"share"
//
}]
//
},
{
"root"
:
"pages/user-center"
,
"pages"
:
[{
...
...
@@ -420,6 +420,8 @@
"style"
:
{
"navigationStyle"
:
"custom"
}
},{
"path"
:
"personalList"
}
]
},
...
...
pages/index/index.vue
View file @
75cb9772
...
...
@@ -16,7 +16,7 @@
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
</view>
<
button
type=
"default"
open-type=
"getPhoneNumber"
@
getphonenumber=
'getphonenumber'
>
获取手机号码
</button
>
<
!--
<button
type=
"default"
open-type=
"getPhoneNumber"
@
getphonenumber=
'getphonenumber'
>
获取手机号码
</button>
--
>
<u-tabs
v-if=
"myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name=
"name"
...
...
@@ -62,7 +62,7 @@
<argoods
v-if=
"d.id == 'educationArticle'"
:goods=
"d.data"
></argoods>
<!-- 最近学习组件 -->
<rstudy
v-if=
"d.id == 'education'"
:goods=
"d.data"
ref=
'study'
></rstudy>
<store
v-if=
"d.id == 'reservestore'"
:goods=
"d.data"
></store>
<store
v-if=
"d.id == 'reservestore'"
:goods=
"d.data"
:storeinfo=
'storeInfo'
></store>
<!-- 线下服务商品 -->
<sindex
v-if=
"d.id == 'storeGoods'"
:goods=
"d.data"
:key=
"di"
></sindex>
...
...
@@ -158,6 +158,8 @@ export default {
isNavPosition
:
0
,
//设置搜索框位置
IsOpenSchool
:
0
,
OrderId
:
0
,
storePosition
:
''
,
//线下服务获取经纬度
storeInfo
:
{},
};
},
components
:
{
...
...
@@ -376,6 +378,18 @@ export default {
});
// #endif
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
let
position
=
res
.
latitude
+
','
+
res
.
longitude
;
uni
.
setStorageSync
(
"position"
,
{
position
:
position
});
that
.
getCurrentStore
()
},
fail
:
function
(
err
){
that
.
getCurrentStore
()
}
});
this
.
init
();
let
set
=
uni
.
getStorageSync
(
"basedata"
)
...
...
@@ -391,6 +405,8 @@ export default {
this
.
isShowBack
();
uni
.
showNavigationBarLoading
();
},
created
(){
},
// #ifdef MP-WEIXIN
onShareTimeline
()
{
...
...
@@ -647,18 +663,20 @@ export default {
init
()
{
let
mall_IsOpenSchool
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
IsOpenSchool
:
0
let
open_school
=
0
;
console
.
log
(
this
.
IsOpenSchool
,
mall_IsOpenSchool
)
if
(
this
.
IsOpenSchool
==
1
&&
mall_IsOpenSchool
==
1
){
//this.IsOpenSchool 通过分享进来的 是否是校园 1 是0不是 mall_IsOpenSchool缓存获取校园模式开启没有
open_school
=
1
}
else
{
open_school
=
0
}
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
this
.
request2
(
{
url
:
"/api/Mall/GetHome"
,
data
:
{
page_id
:
this
.
pageId
,
open_school
:
open_school
,
StoreId
:
storeId
,
},
},
(
res
)
=>
{
...
...
@@ -727,6 +745,26 @@ export default {
(
error
)
=>
{}
);
},
getCurrentStore
(){
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
let
position
=
uni
.
getStorageSync
(
"position"
)
&&
uni
.
getStorageSync
(
"position"
).
position
?
uni
.
getStorageSync
(
"position"
).
position
:
''
;
this
.
request2
(
{
url
:
"/api/AppletStores/GetCurrentStore"
,
data
:
{
storeId
:
storeId
,
position
:
position
},
},
(
res
)
=>
{
if
(
res
.
data
&&
res
.
data
.
storeInfo
){
this
.
storeInfo
=
res
.
data
.
storeInfo
uni
.
setStorageSync
(
"storeId"
,
{
storeId
:
res
.
data
.
storeInfo
.
storeId
});
if
(
res
.
data
.
storeInfo
.
storeId
&&
res
.
data
.
storeInfo
.
storeId
>
0
){
this
.
init
()
}
}
}
);
},
getSmallShopById
()
{
let
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
...
...
pages/reserve/personalList.vue
0 → 100644
View file @
75cb9772
<
template
>
<view
class=
"personalList"
>
<view
v-if=
"g.length > 0"
style=
"
height: calc(100vh);
width: 100%;
overflow: hidden;
margin-top: 7px;
"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-top=
"scrollTop"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"designer "
>
<view
class=
"designer-item"
v-for=
"(x, ci2) in g"
:key=
"ci2"
v-if=
"g.length>0"
>
<view
class=
"designer-flex"
style=
"width: calc(100vw - 100px);"
>
<u-avatar
:src=
"x.ServiceLogo"
size=
"110"
></u-avatar>
<view
class=
"designer-name"
>
<view
class=
"designer-flex"
>
<image
v-if=
"x.Gender==1"
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"
></image>
<image
v-if=
"x.Gender==2"
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"
></image>
<text
style=
"margin-left: 5px;max-width: 400rpx;"
>
{{
x
.
Name
}}
</text>
</view>
<view
class=
"designer-flex"
>
<u-rate
:current=
"x.storeScore!=null &&x.storeScore>0?x.storeScore:'5'"
active-color=
"#FEC471"
inactive-color=
"#DDDDDD"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"26"
:disabled=
"true"
></u-rate>
<text
style=
"font-size: 11px;color: #999999;"
>
(
{{
x
.
CommentNum
}}
评价)
</text>
</view>
</view>
</view>
<view
class=
"designer-btn"
:style=
"
{'background':mainColor}" >
预约
</view>
</view>
</view>
<u-loadmore
v-if=
"showLoading"
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
</scroll-view>
</view>
<view
v-if=
"!loading && g.length== 0 "
style=
"
height: calc(100vh);
width: calc(100vw - 20px);
padding-top: 10px;
"
>
<u-empty
text=
"没有找到更多的设计师"
font-size=
"36"
mode=
"list"
></u-empty>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"设计师列表"
,
status
:
"loadmore"
,
mainColor
:
""
,
loading
:
true
,
page_count
:
1
,
g
:
[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
showLoading
:
true
,
currentChosen
:
""
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
StoreId
:
0
,
},
};
},
onLoad
(
option
)
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
option
&&
option
.
id
){
this
.
msg
.
StoreId
=
option
.
id
}
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
init
();
},
methods
:
{
init
()
{
this
.
loading
=
true
;
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
({
url
:
'/api/AppletStores/GetServicePersonalList'
,
data
:
this
.
msg
},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
}
}
uni
.
hideLoading
();
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
status
=
"loading"
;
this
.
msg
.
pageIndex
++
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
},
};
</
script
>
<
style
>
.personalList
{
height
:
100%
;
background
:
#FFF
;
position
:
relative
;
}
.personalList
.designer
{
padding
:
0
15px
;
}
.personalList
.designer-item
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
15px
0
;
border-bottom
:
1px
solid
#E2E2E2
;
}
.personalList
.designer-name
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
height
:
55px
;
margin-left
:
10px
;
}
.personalList
.designer-btn
{
width
:
69px
;
height
:
26px
;
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#FFF
;
font-size
:
13px
;
}
.personalList
.designer-flex
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
</
style
>
pages/reserve/storeDetails.vue
View file @
75cb9772
...
...
@@ -115,7 +115,12 @@
.storeDetails
.title-c
{
font-size
:
14px
;
color
:
#1B1D1E
;
font-weight
:
bold
;
height
:
40px
;
line-height
:
40px
;
width
:
100%
;
padding
:
0
15px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.storeDetails
.setmeal-box
{
display
:
flex
;
width
:
100%
;
flex-direction
:
row
;
overflow-x
:
auto
;
...
...
@@ -130,7 +135,6 @@
border-radius
:
6px
;
box-shadow
:
0
6px
10px
1px
#F2F2F2
;
overflow
:
hidden
;
}
.storeDetails
.setmeal-item-top
{
width
:
100%
;
...
...
@@ -197,6 +201,9 @@
flex-direction
:
row
;
align-items
:
center
;
}
.storeDetails
.richtext
{
padding
:
15px
;
}
</
style
>
<
template
>
<scroll-view
class=
'storeDetails'
...
...
@@ -226,16 +233,11 @@
<view
class=
"arrow"
></view>
</view>
<view
style=
"width: 100%;height: 210px;position: relative;"
class=
"u-skeleton-rect"
>
<image
style=
"width: 100%;height: 210px;position: relative;"
mode=
"aspectFill"
src=
"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3071197752,333614396&fm=26&gp=0.jpg"
/>
<!--
<view
class=
"arrow2"
@
click=
"goback"
>
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#FFF"
></u-icon>
</view>
-->
<image
style=
"width: 100%;height: 210px;position: relative;"
mode=
"aspectFill"
:src=
"g.storeCoverImg?g.storeCoverImg:''"
/>
<view
class=
"headStatus"
:style=
"[
headStyle,
]"
>
<view
class=
"arrow"
@
click=
"goback"
>
...
...
@@ -250,18 +252,18 @@
<view
class=
"storeNews"
>
<view
class=
"store-name u-skeleton-rect"
>
<view
class=
"sName"
>
月星环球港门店
{{
g
.
storeName
?
g
.
storeName
:
'无'
}}
</view>
<view
class=
"sN-r"
>
上次消费的店铺
{{
g
.
consumptionObj
?
g
.
consumptionObj
.
consumptionStoreName
:
''
}}
</view>
</view>
<view
class=
"store-news u-skeleton-rect"
>
<view
class=
"store-news-l"
>
<view
class=
"good-rb-box"
>
<text
class=
"good-rb-text"
>
4.0
分
</text>
<text
class=
"good-rb-text"
>
{{
g
.
storeScore
?
g
.
storeScore
.
toFixed
(
1
):
'5.0'
}}
分
</text>
<u-rate
:current=
"
4
"
:current=
"
g.storeScore!=null &&g.storeScore>0?g.storeScore:'5'
"
active-color=
"#FEC471"
inactive-color=
"#DDDDDD"
active-icon=
"star"
inactive-icon=
"star-o"
...
...
@@ -270,7 +272,7 @@
></u-rate>
</view>
<view
style=
"font-size: 11px;color: #111111;margin-top: 10px;"
class=
"u-skeleton-rect"
>
营业中
周一至周日 10:00-24:00
营业中
{{
g
.
storeServiceTime
?
g
.
storeServiceTime
:
'全天'
}}
营业
</view>
</view>
<view
class=
"right u-skeleton-rect"
@
click=
"openShare"
>
...
...
@@ -282,10 +284,10 @@
<view
class=
"store-address"
>
<view
class=
"store-news-l u-skeleton-rect"
>
<view
class=
"good-rb-box "
style=
"font-size: 11px;color: #111111;"
>
成都市锦江区阳光新业中心2号楼2302成都市锦江区阳光
{{
g
.
storeAddress
?
g
.
storeAddress
:
''
}}
</view>
<view
style=
"font-size: 11px;color: #999999;margin-top: 5px;"
>
距离你当前位置
20m
距离你当前位置
{{
g
.
distance
>=
1000
?(
g
.
distance
/
1000
).
toFixed
(
2
)
+
'km'
:
g
.
distance
+
'm'
}}
</view>
</view>
<view
class=
"right u-skeleton-rect"
@
click=
"gophone"
style=
"height: 34px;display: flex;flex-direction: column;align-items: center;justify-content: space-between;"
>
...
...
@@ -303,7 +305,7 @@
<view
class=
"store-sticky u-skeleton-rect"
v-if=
"showSticky==true"
:style=
"
{'top':headH+'px'}">
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
"mc"
></u-tabs>
</view>
<view
class=
"title-c"
style=
"margin-left: 15px;"
>
<view
class=
"title-c"
>
商家套餐卡
</view>
<view
class=
"setmeal-box"
>
...
...
@@ -325,47 +327,51 @@
</view>
</view>
<view
class=
"title-c"
style=
"margin-left: 15px;"
>
设计师
<view
class=
"title-c"
@
click=
"goPersonal"
>
<text>
设计师
</text>
<u-icon
name=
"arrow"
:size=
"30"
color=
"#666666"
></u-icon>
</view>
<view
class=
"designer u-skeleton-rect"
>
<view
class=
"designer-item"
v-for=
"(
cl, ci) in list"
:key=
"ci"
>
<view
class=
"designer-item"
v-for=
"(
x, ci2) in personalList"
:key=
"ci2"
v-if=
"personalList.length>0"
>
<view
class=
"designer-flex"
style=
"width: calc(100vw - 100px);"
>
<u-avatar
src=
"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=4255547098,2077529314&fm=11&gp=0.jpg
"
size=
"110"
></u-avatar>
<u-avatar
:src=
"x.ServiceLogo
"
size=
"110"
></u-avatar>
<view
class=
"designer-name"
>
<view
class=
"designer-flex"
>
<image
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"
></image>
<
!--
<image
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"
></image>
--
>
<text
style=
"margin-left: 5px;max-width: 400rpx;"
>
龚老师
</text>
<image
v-if=
"x.Gender==1"
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"
></image>
<
image
v-if=
"x.Gender==2"
style=
"width: 13px;height: 13px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"
></image
>
<text
style=
"margin-left: 5px;max-width: 400rpx;"
>
{{
x
.
Name
}}
</text>
</view>
<view
class=
"designer-flex"
>
<u-rate
:current=
"
4
"
:current=
"
x.storeScore!=null &&x.storeScore>0?x.storeScore:'5'
"
active-color=
"#FEC471"
inactive-color=
"#DDDDDD"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"26"
:disabled=
"true"
></u-rate>
<text
style=
"font-size: 11px;color: #999999;"
>
(
163
评价)
</text>
<text
style=
"font-size: 11px;color: #999999;"
>
(
{{
x
.
CommentNum
}}
评价)
</text>
</view>
</view>
</view>
<view
class=
"designer-btn"
:style=
"
{'background':mc}" >
预约
</view>
</view>
<view
v-if=
"personalList.length==0"
style=
"width: 100%;height: 50px;line-height: 50px;text-align: center;"
>
暂无设计师数据~
</view>
</view>
<view
class=
"title-c"
style=
"margin-left: 15px;"
>
<view
class=
"title-c"
>
价目表
</view>
<view
class=
"richtext"
style=
"height: 1000px;"
>
富文本
<view
class=
"richtext"
>
<h-parse
:content=
"detailContent"
@
navigate=
"clickDescription"
></h-parse>
</view>
<view
class=
"title-c"
style=
"margin-left: 15px;"
>
<view
class=
"title-c"
>
评价
</view>
<view
class=
"comment u-skeleton-rect"
style=
"height: 1000px;"
>
...
...
@@ -379,11 +385,23 @@
<u-skeleton
:loading=
"loading"
:animation=
"true"
bgColor=
"#FFF"
></u-skeleton>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
</scroll-view>
</
template
>
<
script
>
import
hParse
from
"@/components/u-parse/parse.vue"
;
import
auth
from
"@/components/auth/index"
;
export
default
{
components
:
{
auth
,
hParse
,
},
data
(){
return
{
pageTitle
:
"门店详情"
,
...
...
@@ -391,9 +409,13 @@
headStyle
:{},
nav
:
0
,
mc
:
''
,
u
:{},
pricecolor
:
''
,
secondary
:
''
,
loading
:
true
,
show
:
false
,
showCoupons
:
false
,
couponMessage
:
""
,
list
:[
{
name
:
'优惠'
},
{
name
:
'设计师'
},
...
...
@@ -409,20 +431,108 @@
commentH
:
0
,
//评论的高度
showSticky
:
false
,
//是否吸顶
intoscrollTop
:
0
,
id
:
0
,
g
:{},
comments
:[],
detailContent
:
""
,
personalList
:[],
}
},
onLoad
(
option
){
console
.
log
(
option
,
"option"
);
if
(
option
&&
option
.
id
)
{
this
.
id
=
option
.
id
?
option
.
id
:
2
;
}
else
{
this
.
id
=
option
.
GoodsId
?
option
.
GoodsId
:
2
;
}
if
(
option
&&
option
.
custom_params
)
{
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
option
.
custom_params
));
console
.
log
(
custom_params
);
if
(
custom_params
.
user_id
)
{
uni
.
setStorageSync
(
"pid"
,
{
pid
:
custom_params
.
user_id
});
}
if
(
custom_params
.
Up
)
{
//分享进入校园id
uni
.
setStorageSync
(
"Up"
,
{
Up
:
custom_params
.
Up
});
}
}
if
(
option
&&
option
.
user_id
)
{
uni
.
setStorageSync
(
"pid"
,
{
pid
:
option
.
user_id
});
}
if
(
option
&&
option
.
SmallShopId
)
{
uni
.
setStorageSync
(
"SmallShopId"
,
{
SmallShopId
:
option
.
SmallShopId
});
}
if
(
uni
.
getStorageSync
(
"AnchorName"
))
{
//如果有主播名称了先清除
uni
.
removeStorageSync
(
"AnchorName"
);
}
if
(
option
&&
option
.
Up
)
{
//分享进入校园id
uni
.
setStorageSync
(
"Up"
,
{
Up
:
option
.
Up
});
}
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
//用于分享出去的参数
if
(
option
&&
option
.
AnchorName
)
{
//当传过来有主播名称的时候 存入缓存
uni
.
setStorageSync
(
"AnchorName"
,
{
AnchorName
:
option
.
AnchorName
});
}
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
init
();
this
.
getSPList
()
//获取服务人员列表
wx
.
showShareMenu
({
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
},
onShareTimeline
()
{
setTimeout
(()
=>
{
console
.
log
(
"分享调用"
);
this
.
getReceive
();
},
2500
);
let
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
let
uid
=
mall_UserInfo
?
mall_UserInfo
.
UserId
:
0
;
if
(
uid
==
0
){
uid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
mall_UserInfo
?
mall_UserInfo
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
//如果微店id为0 去找所属微店id
SmallShopId
=
mall_UserInfo
?
mall_UserInfo
.
UserSmallShopId
:
0
;
}
let
title
=
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
?
this
.
g
.
app_share_title
:
this
.
g
.
name
;
let
imageUrl
=
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
?
this
.
g
.
app_share_pic
:
this
.
g
.
cover_pic
;
let
id
=
this
.
id
;
return
{
title
:
title
,
query
:
"id="
+
this
.
id
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
,
imageUrl
:
imageUrl
,
};
},
onShareAppMessage
(
res
)
{
setTimeout
(()
=>
{
console
.
log
(
"分享朋友圈调用"
);
this
.
getReceive
();
},
2500
);
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
if
(
uid
==
0
){
uid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
u
.
SmallShopId
?
u
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
//如果微店id为0 去找所属微店id
SmallShopId
=
u
.
UserSmallShopId
?
u
.
UserSmallShopId
:
0
}
return
{
title
:
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
?
this
.
g
.
app_share_title
:
this
.
g
.
name
,
path
:
"/pages/index/index?id="
+
this
.
id
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
+
'&JumpType=5'
,
imageUrl
:
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
?
this
.
g
.
app_share_pic
:
this
.
g
.
cover_pic
,
};
},
created
()
{
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
100
)
uni
.
createSelectorQuery
().
select
(
".headStatus"
).
boundingClientRect
(
data
=>
{
//目标节点
if
(
data
&&
data
.
height
){
this
.
headH
=
data
.
height
...
...
@@ -456,6 +566,48 @@
}).
exec
();
},
methods
:{
init
()
{
this
.
loading
=
true
;
this
.
request2
(
{
url
:
"/api/AppletStores/GetStoreInfo"
,
data
:
{
storeId
:
this
.
id
,
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
storeInfo
;
var
richtext
=
this
.
g
.
storeProject
;
this
.
detailContent
=
richtext
;
this
.
loading
=
false
;
//登录在调用评论接口
if
(
this
.
u
)
{
// this.initComments();
}
}
else
{
this
.
loading
=
false
;
}
}
);
},
getSPList
(){
this
.
request2
({
url
:
'/api/AppletStores/GetServicePersonalList'
,
data
:
{
pageIndex
:
1
,
pageSize
:
5
,
StoreId
:
this
.
id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
personalList
=
res
.
data
.
pageData
}
}
);
},
scrollHandler
(
e
)
{
console
.
log
(
e
.
detail
.
scrollTop
)
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
...
...
@@ -496,8 +648,41 @@
},
gophone
(){
uni
.
makePhoneCall
({
phoneNumber
:
'18781360614'
//仅为示例
phoneNumber
:
this
.
g
.
storeTel
//仅为示例
});
},
getReceive
()
{
//分享进入调取领券接口
// 1-分享,2-购买并付款
this
.
request2
(
{
url
:
"/api/AppletUser/ShareCoupon"
,
data
:
{
TriggerType
:
1
,
},
},
(
res
)
=>
{
if
(
res
.
couponResultCode
==
1
)
{
this
.
couponMessage
=
res
.
couponMessage
;
this
.
showCoupons
=
true
;
}
}
);
},
goLook
()
{
this
.
showCoupons
=
true
;
// TODO套餐卡页面还没建
// uni.navigateTo({
// url: "/pages/coupon/index/index",
// });
},
closeBtn
()
{
this
.
showCoupons
=
false
;
},
goPersonal
(){
//跳转到设计师列表
uni
.
navigateTo
({
url
:
"/pages/reserve/personalList?id="
+
this
.
id
,
})
}
}
}
...
...
pages/reserve/storeList.vue
View file @
75cb9772
...
...
@@ -12,7 +12,7 @@
"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-top=
"scrollTop"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
'store'
style=
"padding: 7.5px 15px;"
v-for=
"(c, i) in g"
:key=
"i"
@
click=
"gostoreDetails()"
>
<view
class=
'store'
style=
"padding: 7.5px 15px;"
v-for=
"(c, i) in g"
:key=
"i"
@
click=
"gostoreDetails(
c
)"
>
<view
class=
"box"
>
<image
mode=
"aspectFill"
class=
"img"
:src=
"c.CoverImg"
></image>
<view
class=
"content"
>
...
...
@@ -33,10 +33,19 @@
<text
class=
"tel"
>
{{
c
.
Tel
}}
</text>
</view>
<view
style=
"font-size: 11px;color: #FFC86D;"
>
上次消费的店铺
{{
c
.
consumptionObj
?
c
.
consumptionObj
.
consumptionStoreName
:
''
}}
</view>
</view>
</view>
<view
class=
"choice"
@
click
.
stop=
"radioChange"
>
<u-radio-group
v-model=
"currentChosen"
@
change=
'radioChange'
>
<u-radio
shape=
"circle"
:name=
"c.Id"
:icon-size=
"40"
:active-color=
"mainColor"
>
</u-radio>
</u-radio-group>
</view>
</view>
</view>
...
...
@@ -71,7 +80,7 @@
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多
商品
了"
,
nomore
:
"没有更多了"
,
},
list
:[
{
name
:
'距离'
},
...
...
@@ -84,7 +93,8 @@
old
:
{
scrollTop
:
0
,
},
coupon_id
:
0
,
currentChosen
:
""
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -98,9 +108,8 @@
onLoad
(
option
)
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
option
.
position
)
{
this
.
msg
.
CurrentPosition
=
option
.
position
;
}
this
.
msg
.
CurrentPosition
=
uni
.
getStorageSync
(
"position"
)
&&
uni
.
getStorageSync
(
"position"
).
position
?
uni
.
getStorageSync
(
"position"
).
position
:
''
;
},
mounted
()
{
uni
.
setNavigationBarTitle
({
...
...
@@ -142,6 +151,14 @@
res
=>
{
this
.
loading
=
false
;
if
(
res
.
resultCode
==
1
)
{
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
if
(
storeId
>
0
){
res
.
data
.
pageData
.
forEach
(
x
=>
{
if
(
x
.
Id
==
storeId
){
this
.
currentChosen
=
x
.
Id
}
})
}
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
...
...
@@ -167,12 +184,26 @@
this
.
status
=
"nomore"
;
}
},
gostoreDetails
()
{
gostoreDetails
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/reserve/storeDetails
"
,
url
:
"/pages/reserve/storeDetails
?id="
+
item
.
Id
,
});
},
radioChange
(
e
){
uni
.
setStorageSync
(
"storeId"
,
{
storeId
:
this
.
currentChosen
});
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
=
pages
[
pages
.
length
-
2
];
// 前一个页面
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
,
success
:
function
()
{
beforePage
.
$vm
.
getCurrentStore
();
// 执行前一个页面的方法
}
});
},
100
)
},
},
};
</
script
>
...
...
@@ -249,5 +280,16 @@
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
.storeList
.choice
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
40px
;
height
:
40px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
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