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
633191d2
Commit
633191d2
authored
Feb 02, 2021
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件
parent
e53352a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
22 deletions
+39
-22
src/pages/changeAdr/index.vue
+1
-1
static/nativeComponents/AreaNavigation/index.js
+16
-5
static/nativeComponents/CubeNav/index.js
+11
-5
static/nativeComponents/CubeNav/index.wxml
+10
-10
static/nativeComponents/FloatButton/index.wxml
+1
-1
No files found.
src/pages/changeAdr/index.vue
View file @
633191d2
...
...
@@ -82,7 +82,7 @@
regionName
:
item
.
regionName
,
regionType
:
item
.
regionType
,
systemRegionId
:
item
.
systemRegionId
,
areaGroupId
:
item
.
g
roupId
,
areaGroupId
:
item
.
areaG
roupId
,
outId
:
item
.
outId
}))
}
...
...
static/nativeComponents/AreaNavigation/index.js
View file @
633191d2
...
...
@@ -76,6 +76,16 @@ Component({
})
}
if
(
!
wx
.
getStorageSync
(
'location'
)){
_this
.
setData
({
'designateAreaObj.id'
:
_this
.
data
.
positionCity
.
operatingAreaAreaId
,
'designateAreaObj.regionName'
:
_this
.
data
.
positionCity
.
regionName
,
'designateAreaObj.regionType'
:
_this
.
data
.
positionCity
.
regionType
,
'designateAreaObj.systemRegionId'
:
_this
.
data
.
positionCity
.
systemRegionId
,
'designateAreaObj.outId'
:
_this
.
data
.
positionCity
.
outId
,
})
}
console
.
log
(
_this
.
data
.
positionCity
,
'定位城市信息'
)
console
.
log
(
_this
.
data
.
designateAreaObj
,
'组件信息'
)
...
...
@@ -85,19 +95,20 @@ Component({
regionType
:
_this
.
data
.
positionCity
.
regionType
,
systemRegionId
:
_this
.
data
.
positionCity
.
systemRegionId
,
outId
:
_this
.
data
.
positionCity
.
outId
,
areaGroupId
:
_this
.
data
.
positionCity
.
areaGroupId
,
areaGroupId
:
_this
.
data
.
designateAreaObj
.
areaGroupId
,
})
console
.
log
(
str
,
'str.......'
)
wx
.
setStorageSync
(
'location'
,
str
)
if
(
_this
.
data
.
positionCity
.
operatingAreaAreaId
==
_this
.
data
.
designateAreaObj
.
id
)
{
_this
.
setData
({
positionName
:
_this
.
data
.
positionCity
.
regionName
})
}
else
{
_this
.
setData
({
changeShow
:
true
})
_this
.
setData
({
changeShow
:
true
})
}
...
...
@@ -280,7 +291,7 @@ Component({
changeOtherCity
(){
console
.
log
(
getCurrentPages
())
wx
.
navigateTo
({
url
:
'/pages/changeAdr/main?areaGroupId='
+
this
.
data
.
d
atas
.
componentData
.
d
esignateAreaObj
.
areaGroupId
,
url
:
'/pages/changeAdr/main?areaGroupId='
+
this
.
data
.
designateAreaObj
.
areaGroupId
,
})
},
toSearchPage
(){
...
...
static/nativeComponents/CubeNav/index.js
View file @
633191d2
...
...
@@ -39,6 +39,10 @@ Component({
let
_this
=
this
;
let
columnWidthArr
=
[
'100%'
,
'50%'
,
'33.3%'
,
'25%'
,
'20%'
,
'16.6%'
]
this
.
data
.
datas
.
componentData
.
imgList
.
forEach
(
item
=>
{
item
.
imageUrl
=
item
.
imageUrl
?
app
.
DFSImg
(
item
.
imageUrl
,
400
,
400
)
:
''
})
this
.
setData
({
imgList
:
this
.
data
.
datas
.
componentData
.
imgList
.
filter
(
item
=>
item
.
visible
==
undefined
||
item
.
visible
==
1
),
getColumnWidth
:
columnWidthArr
[
this
.
data
.
datas
.
componentData
.
columnNum
-
1
],
...
...
@@ -65,26 +69,26 @@ Component({
if
(
res
)
{
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
1
){
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
_this
.
data
.
datas
.
componentData
.
rowNum
cube3H
:
res
.
height
*
_this
.
data
.
datas
.
componentData
.
rowNum
})
}
else
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
2
){
if
(
_this
.
data
.
imgList
.
length
/
_this
.
data
.
datas
.
componentData
.
columnNum
>
1
){
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
_this
.
data
.
datas
.
componentData
.
rowNum
cube3H
:
res
.
height
*
_this
.
data
.
datas
.
componentData
.
rowNum
})
}
else
{
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
1
cube3H
:
res
.
height
*
1
})
}
}
else
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
3
){
if
(
_this
.
data
.
datas
.
componentData
.
columnNum
==
1
){
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
(
_this
.
data
.
imgList
/
_this
.
data
.
datas
.
componentData
.
rowNum
)
cube3H
:
res
.
height
*
(
_this
.
data
.
imgList
/
_this
.
data
.
datas
.
componentData
.
rowNum
)
})
}
else
{
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
(
Math
.
ceil
(
_this
.
data
.
imgList
.
length
/
_this
.
data
.
datas
.
componentData
.
columnNum
))
cube3H
:
res
.
height
*
(
Math
.
ceil
(
_this
.
data
.
imgList
.
length
/
_this
.
data
.
datas
.
componentData
.
columnNum
))
})
}
...
...
@@ -128,9 +132,11 @@ Component({
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
})
}
_this
.
setData
({
w
:
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
})
console
.
log
(
_this
.
data
.
w
)
if
(
_this
.
data
.
wrapW
>
cube2W
)
{
_this
.
setData
({
navShow
:
true
...
...
static/nativeComponents/CubeNav/index.wxml
View file @
633191d2
...
...
@@ -7,20 +7,20 @@
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
</view>
</view>
<view class="item-title" style="font-size:{{datas.componentData.textSize * 2}}rpx;color:{{datas.componentData.fontColor}};height:{{datas.componentData.textSize / 12}}em;line-h
ie
ght:{{datas.componentData.textSize / 12}}em">{{ item.title }}</view>
<view class="item-title" style="font-size:{{datas.componentData.textSize * 2}}rpx;color:{{datas.componentData.fontColor}};height:{{datas.componentData.textSize / 12}}em;line-h
ei
ght:{{datas.componentData.textSize / 12}}em">{{ item.title }}</view>
</view>
</view>
<view wx:if="{{datas.componentData.layoutType == 1}}" style="position:relative;background-color:{{datas.componentData.backgroundColor || ''}};border-radius:{{datas.componentData.moduleRadius
* 2}}rpx;padding-bottom:{{navShow ? '20r
px' : '0'}}">
<view wx:if="{{datas.componentData.layoutType == 1}}" style="position:relative;background-color:{{datas.componentData.backgroundColor || ''}};border-radius:{{datas.componentData.moduleRadius
}}px;padding-bottom:{{navShow ? '10
px' : '0'}}">
<view class="cube2 clearfix" style="overflow-x:auto;overflow-y:hidden" bindtouchmove="touchmove">
<view class="clearfix" style="width:{{wrapW
* 2}}r
px" id="wrapW">
<view class="cube-item" wx:for="{{imgList}}" style="padding-top:{{datas.componentData.lineHeight
* 2}}rpx;padding-bottom:{{datas.componentData.lineHeight *2}}rpx;width:{{w * 2}}r
px;position:relative" bindtap="onclickHandle" data-item="{{item}}">
<view class="clearfix" style="width:{{wrapW
}}
px" id="wrapW">
<view class="cube-item" wx:for="{{imgList}}" style="padding-top:{{datas.componentData.lineHeight
}}px;padding-bottom:{{datas.componentData.lineHeight}}px;width:{{w}}
px;position:relative" bindtap="onclickHandle" data-item="{{item}}">
<view style="padding-left:{{getImgSize}}%;padding-right:{{getImgSize}}%">
<view class="item-img {{item.imageUrl == '' ? 'item-bg' : ''}}">
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
</view>
</view>
<view class="item-title" style="font-size:{{datas.componentData.textSize
* 2}}rpx;color:{{datas.componentData.fontColor}};height:{{datas.componentData.textSize / 12}}em;line-hieght:{{datas.componentData.textSize / 12}}em
">{{item.title}}
<view class="item-title" style="font-size:{{datas.componentData.textSize
}}px;color:{{datas.componentData.fontColor}}
">{{item.title}}
</view>
</view>
</view>
...
...
@@ -33,16 +33,16 @@
</view>
<view class="cube3 clearfix" wx:if="{{datas.componentData.layoutType == 2}}" style="background-color:{{datas.componentData.backgroundColor || ''}};border-radius:{{datas.componentData.moduleRadius
* 2}}r
px;">
<swiper indicator-dots="{{true}}" style="height:{{cube3H}}
r
px">
<swiper-item wx:for="{{swiperList}}" style="width:{{swiperItemW
*2}}r
px">
<view class="cube-item" style="padding-top:{{datas.componentData.lineHeight
* 2}}rpx;padding-bottom:{{datas.componentData.lineHeight * 2}}r
px;width:{{getColumnWidth}};position:relative" wx:for-item="item1" wx:for="{{item}}" data-item="{{item1}}" bindtap="onclickHandle">
<view class="cube3 clearfix" wx:if="{{datas.componentData.layoutType == 2}}" style="background-color:{{datas.componentData.backgroundColor || ''}};border-radius:{{datas.componentData.moduleRadius
}}
px;">
<swiper indicator-dots="{{true}}" style="height:{{cube3H}}px">
<swiper-item wx:for="{{swiperList}}" style="width:{{swiperItemW
}}
px">
<view class="cube-item" style="padding-top:{{datas.componentData.lineHeight
}}px;padding-bottom:{{datas.componentData.lineHeight}}
px;width:{{getColumnWidth}};position:relative" wx:for-item="item1" wx:for="{{item}}" data-item="{{item1}}" bindtap="onclickHandle">
<view style="padding-left:{{getImgSize}}%;padding-right:{{getImgSize}}%">
<view class="item-img {{item1.imageUrl == '' ? 'item-bg' : ''}}">
<image wx:if="{{item1.imageUrl}}" src="{{item1.imageUrl}}"></image>
</view>
</view>
<view class="item-title" style="font-size:{{datas.componentData.textSize
* 2}}rpx;color:{{datas.componentData.fontColor}};height:{{textSize / 12}}em;line-hieght:{{textSize / 12}}em
">{{item1.title}}
<view class="item-title" style="font-size:{{datas.componentData.textSize
}}px;color:{{datas.componentData.fontColor}}
">{{item1.title}}
</view>
</view>
</swiper-item>
...
...
static/nativeComponents/FloatButton/index.wxml
View file @
633191d2
<!--static/nativeComponents/FloatButton/index.wxml-->
<movable-area class="float-botton">
<movable-view class="movable-view {{datas.componentData.style==0 ? 'icon-class':'img-class'}}" direction="all" style="width:{{datas.componentData['sizeInfo']['width']
/12}}em;height:{{datas.componentData['sizeInfo']['width']/12}}em;top:{{datas.componentData['position']['y']}}em;left:{{datas.componentData['position']['y']}}em
;background-color:{{datas.componentData.style==0?datas.componentData['backgroundColor']:'transparent'}};box-shadow:{{(datas.componentData.style==0 && datas.componentData.boxShadow)?'rgba(0, 0, 0, 0.5) 0px 0px 10rpx':'none'}}" bindtap="clickHandler">
<movable-view class="movable-view {{datas.componentData.style==0 ? 'icon-class':'img-class'}}" direction="all" style="width:{{datas.componentData['sizeInfo']['width']
* 2}}rpx;height:{{datas.componentData['sizeInfo']['width'] *2}}rpx;top:{{datas.componentData['position']['y'] * 12 * 2}}rpx;left:{{datas.componentData['position']['x'] * 12 * 2}}rpx
;background-color:{{datas.componentData.style==0?datas.componentData['backgroundColor']:'transparent'}};box-shadow:{{(datas.componentData.style==0 && datas.componentData.boxShadow)?'rgba(0, 0, 0, 0.5) 0px 0px 10rpx':'none'}}" bindtap="clickHandler">
<view wx:if="{{datas.componentData.style==0}}" class="content">
<view wx:if="{{datas.componentData.icon.type==1}}">
<i
...
...
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