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
51d18665
Commit
51d18665
authored
May 31, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页ui
parent
618f414f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
30 deletions
+58
-30
src/components/common/StoreAddr.vue
+24
-4
static/nativeComponents/GoodsSearch/index.wxml
+9
-14
static/nativeComponents/GoodsSearch/index.wxss
+20
-11
static/nativeComponents/RankingList/index.js
+4
-1
static/nativeComponents/RankingList/index.wxss
+1
-0
No files found.
src/components/common/StoreAddr.vue
View file @
51d18665
<
template
>
<div
class=
"storeAddr flex"
>
<div
class=
"left flex"
v-if=
"openThousandsStoresFlag"
>
<div
class=
"left flex"
v-if=
"openThousandsStoresFlag"
@
click=
"pushStorePage"
>
<div
class=
"logo"
>
<image
:src=
"logoUrl"
alt=
""
></image>
</div>
<div
class=
"contentInfo flex"
v-if=
"name != ''"
>
<p
class=
"info"
>
{{
name
}}
</p>
<p
class=
"change"
@
click=
"pushStorePage"
>
[切换]
</p>
<p
class=
"addr"
v-if=
"distanceForXinHua"
>
{{
distanceForXinHua
|
formatDistance
}}
</p>
<p
class=
"change"
><i
class=
"ant-fanhui-line"
></i></p>
</div>
</div>
</div>
...
...
@@ -34,6 +35,7 @@ export default {
enterShopId
:
""
,
//进店规则门店id
logoUrl
:
""
,
openThousandsStoresFlag
:
false
,
distanceForXinHua
:
0
,
};
},
async
onLoad
()
{
...
...
@@ -52,6 +54,11 @@ export default {
}
this
.
reloadName
();
},
filters
:
{
formatDistance
(
val
)
{
return
val
>
1
?
parseFloat
(
val
).
toFixed
(
2
)
+
' km'
:
Math
.
floor
(
val
*
1000
)
+
' m'
;
}
},
computed
:
{
},
methods
:
{
...
...
@@ -192,19 +199,32 @@ export default {
align-items
:
center
;
.contentInfo
{
align-items
:
flex-start
;
align-items
:
center
;
.info
{
font-size
:
14px
;
color
:
#999
;
flex
:
1
;
}
.addr
{
font-size
:
12px
;
margin-left
:
4px
;
color
:
#999
;
}
.change
{
flex-shrink
:
0
;
padding-left
:
6px
;
color
:
#333
;
font-size
:
14px
;
align-items
:
center
;
i{
display
:
inline-block
;
transform
:
rotateZ
(
-90deg
);
font-weight
:
bold
;
color
:
#999
;
margin-top
:
4px
;
}
}
}
...
...
@@ -212,7 +232,7 @@ export default {
.logo
{
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
border-radius
:
8px
;
overflow
:
hidden
;
margin-right
:
10px
;
...
...
static/nativeComponents/GoodsSearch/index.wxml
View file @
51d18665
<!--static/nativeComponents/GoodsSearch/index.wxml-->
<view class="goods-search flex" style="background:{{datas.componentData.heapBgColor||''}}">
<view class="ipt flex {{datas.componentData.keywordPosition == 1 ? 'textCenter' : ''}} {{datas.componentData.showStyle == 0 ? 'my-hairline--all' :''}}" style="border-radius:{{2*(datas.componentData['radius']/100)*2}}em;border-radius:{{2*(datas.componentData['radius']/100)}}em;background:{{backgroundColor}};border-color:{{borderColor}}" bindtap="toSearchPage">
<block wx:if="{{datas.componentData['searchModel'] == 0}}">
<i class="iconfont-common common-iconsousuo"></i>
</block>
<block wx:else>
<view class="svg-wrapper" catchtap="handleScan">
<image class="scan-svg" src="/static/svg/scanCode.svg" />
</view>
<view class="svg-divider"></view>
</block>
<view class="goods-search flex" style="background:{{datas.componentData.heapBgColor||''}}" style="--border-radius: {{2*(datas.componentData['radius']/100)}}em">
<view class="ipt flex {{datas.componentData.keywordPosition == 1 ? 'textCenter' : ''}} {{datas.componentData.showStyle == 0 ? 'my-hairline--all' :''}}" style="border-radius:{{2*(datas.componentData['radius']/100)}}em;background:{{backgroundColor}};border-color:{{borderColor}}" bindtap="toSearchPage">
<i class="iconfont-common common-iconsousuo"></i>
<block wx:if="{{datas.componentData['searchModel'] != 1}}">
<input style="width:{{placeholderValue.length*40}}rpx" disabled type="text" placeholder="{{placeholderValue}}">
</input>
...
...
@@ -17,11 +9,14 @@
<block wx:else>
<input class="search-input" type="text" placeholder="{{placeholderValue}}" bindinput="onInput" value="{{searchValue}}"></input>
</block>
<view class="flex search-btn" wx:if="{{datas.componentData['searchModel'] == 1}}">
<view class="search-btn__local" style="color:{{datas.componentData.leftBtn.color}};background-color:{{datas.componentData['leftBtn'].backgroundColor}};font-size:{{datas.componentData['leftBtn'].fontSize*2}}rpx;padding:{{datas.componentData['leftBtn'].paddingTop*2}}rpx {{datas.componentData['leftBtn'].paddingRight*2}}rpx {{datas.componentData['leftBtn'].paddingBottom*2}}rpx {{datas.componentData['leftBtn'].paddingLeft*2}}rpx;margin:{{datas.componentData['leftBtn'].marginTop*2}}rpx {{datas.componentData['leftBtn'].marginRight*2}}rpx {{datas.componentData['leftBtn'].marginBottom*2}}rpx {{datas.componentData['leftBtn'].marginLeft*2}}rpx;" bindtap="handleSearchLocal">搜本店</view>
<view class="search-btn__all" style="color:{{datas.componentData['rightBtn'].color}};background-color:{{datas.componentData['rightBtn'].backgroundColor}};font-size:{{datas.componentData['rightBtn'].fontSize*2}}rpx;padding:{{datas.componentData['rightBtn'].paddingTop*2}}rpx {{datas.componentData['rightBtn'].paddingRight*2}}rpx {{datas.componentData['rightBtn'].paddingBottom}}rpx {{datas.componentData['rightBtn'].paddingLeft*2}}rpx;margin:{{datas.componentData['rightBtn'].marginTop*2}}rpx {{datas.componentData['rightBtn'].marginRight*2}}rpx {{datas.componentData['rightBtn'].marginBottom*2}}rpx {{datas.componentData['rightBtn'].marginLeft*2}}rpx;" bindtap="handleSearchAll">搜全网</view>
<view class="svg-wrapper" catchtap="handleScan">
<image class="scan-svg" src="/static/svg/scanCode.svg" />
</view>
</view>
<view class="flex search-btn" wx:if="{{datas.componentData['searchModel'] == 1}}">
<view class="search-btn__local" style="color:{{datas.componentData.leftBtn.color}};background-color:{{datas.componentData['leftBtn'].backgroundColor}};font-size:{{datas.componentData['leftBtn'].fontSize*2}}rpx;padding:{{datas.componentData['leftBtn'].paddingTop*2}}rpx {{datas.componentData['leftBtn'].paddingRight*2}}rpx {{datas.componentData['leftBtn'].paddingBottom*2}}rpx {{datas.componentData['leftBtn'].paddingLeft*2}}rpx;margin:{{datas.componentData['leftBtn'].marginTop*2}}rpx {{datas.componentData['leftBtn'].marginRight*2}}rpx {{datas.componentData['leftBtn'].marginBottom*2}}rpx {{datas.componentData['leftBtn'].marginLeft*2}}rpx;" bindtap="handleSearchAll">全网搜</view>
<view class="search-btn__all" style="color:{{datas.componentData['rightBtn'].color}};background-color:{{datas.componentData['rightBtn'].backgroundColor}};font-size:{{datas.componentData['rightBtn'].fontSize*2}}rpx;padding:{{datas.componentData['rightBtn'].paddingTop*2}}rpx {{datas.componentData['rightBtn'].paddingRight*2}}rpx {{datas.componentData['rightBtn'].paddingBottom*2}}rpx {{datas.componentData['rightBtn'].paddingLeft*2}}rpx;margin:{{datas.componentData['rightBtn'].marginTop*2}}rpx {{datas.componentData['rightBtn'].marginRight*2}}rpx {{datas.componentData['rightBtn'].marginBottom*2}}rpx {{datas.componentData['rightBtn'].marginLeft*2}}rpx;" bindtap="handleSearchLocal">门店搜</view>
</view>
</view>
<!-- 热门词区域 -->
<view class="hot_words_class" wx:if="{{datas.componentData.hotWordsData['isOpenHotWords'] == 1}}">
...
...
static/nativeComponents/GoodsSearch/index.wxss
View file @
51d18665
...
...
@@ -5,18 +5,18 @@
}
.goods-search{
font-size: 24rpx;
width: 100%;
width: 96%;
margin: 0 auto;
height: 80rpx;
align-items:center;
}
.goods-search i{
margin: 0 20rpx;
color: #
bbb
;
color: #
333
;
}
.goods-search .ipt{
width: 96%;
margin: 0 auto;
height: 60rpx;
flex: 1;
height: 70rpx;
align-items: center;
position: relative;
border-width: 1rpx;
...
...
@@ -26,7 +26,11 @@
}
.goods-search .ipt input{
font-size: 28rpx;
color: #bbb;
color: #333;
}
.goods-search .ipt input{
font-size: 28rpx;
color: #333;
}
.goods-search .textCenter{
justify-content: center;
...
...
@@ -39,19 +43,23 @@
.search-btn {
position: relative;
right
: 0;
flex-shrink
: 0;
justify-content: end;
margin-right: 2px;
margin-left: 10px;
}
.search-btn > view{
display: flex;
justify-content: center;
align-items: center;
}
.search-btn .search-btn__local {
border: none;
border-radius:
2em 0 0 2em
;
border-radius:
var(--border-radius) 0 0 var(--border-radius)
;
}
.search-btn .search-btn__all {
border: none;
border-radius: 0
2em 2em
0;
border-radius: 0
var(--border-radius) var(--border-radius)
0;
}
.svg-wrapper {
...
...
@@ -59,6 +67,7 @@
height: 100%;
padding-left: 10px;
align-items: center;
margin: 0 20rpx;
}
.svg-divider {
...
...
static/nativeComponents/RankingList/index.js
View file @
51d18665
const
app
=
getApp
();
const
{
goodsApi
,
$themeToLink
}
=
app
;
const
{
goodsApi
,
DFSImg
,
$themeToLink
}
=
app
;
Component
({
behaviors
:
[],
...
...
@@ -86,6 +86,9 @@ Component({
}
const
res
=
await
goodsApi
.
queryProductInfo
(
data
);
if
(
res
.
data
.
code
==
200
)
{
res
.
data
.
data
.
list
&&
res
.
data
.
data
.
list
.
forEach
(
item
=>
{
item
.
productImgUrl
=
DFSImg
(
item
.
productImgUrl
);
})
if
(
!
type
)
{
this
.
setData
({
rankingListA
:
res
.
data
.
data
.
list
||
[]
});
}
else
{
...
...
static/nativeComponents/RankingList/index.wxss
View file @
51d18665
...
...
@@ -34,6 +34,7 @@
.ranking-list__content .list-item {
align-items: center;
flex-direction: column;
margin: 0 20rpx;
}
.ranking-list__content .image {
...
...
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