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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
19 deletions
+36
-19
src/pages/changeAdr/index.vue
+1
-1
static/nativeComponents/AreaNavigation/index.js
+13
-2
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 @@
...
@@ -82,7 +82,7 @@
regionName
:
item
.
regionName
,
regionName
:
item
.
regionName
,
regionType
:
item
.
regionType
,
regionType
:
item
.
regionType
,
systemRegionId
:
item
.
systemRegionId
,
systemRegionId
:
item
.
systemRegionId
,
areaGroupId
:
item
.
g
roupId
,
areaGroupId
:
item
.
areaG
roupId
,
outId
:
item
.
outId
outId
:
item
.
outId
}))
}))
}
}
...
...
static/nativeComponents/AreaNavigation/index.js
View file @
633191d2
...
@@ -76,6 +76,16 @@ Component({
...
@@ -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
.
positionCity
,
'定位城市信息'
)
console
.
log
(
_this
.
data
.
designateAreaObj
,
'组件信息'
)
console
.
log
(
_this
.
data
.
designateAreaObj
,
'组件信息'
)
...
@@ -85,11 +95,12 @@ Component({
...
@@ -85,11 +95,12 @@ Component({
regionType
:
_this
.
data
.
positionCity
.
regionType
,
regionType
:
_this
.
data
.
positionCity
.
regionType
,
systemRegionId
:
_this
.
data
.
positionCity
.
systemRegionId
,
systemRegionId
:
_this
.
data
.
positionCity
.
systemRegionId
,
outId
:
_this
.
data
.
positionCity
.
outId
,
outId
:
_this
.
data
.
positionCity
.
outId
,
areaGroupId
:
_this
.
data
.
positionCity
.
areaGroupId
,
areaGroupId
:
_this
.
data
.
designateAreaObj
.
areaGroupId
,
})
})
console
.
log
(
str
,
'str.......'
)
console
.
log
(
str
,
'str.......'
)
wx
.
setStorageSync
(
'location'
,
str
)
wx
.
setStorageSync
(
'location'
,
str
)
if
(
_this
.
data
.
positionCity
.
operatingAreaAreaId
==
_this
.
data
.
designateAreaObj
.
id
)
{
if
(
_this
.
data
.
positionCity
.
operatingAreaAreaId
==
_this
.
data
.
designateAreaObj
.
id
)
{
_this
.
setData
({
_this
.
setData
({
positionName
:
_this
.
data
.
positionCity
.
regionName
positionName
:
_this
.
data
.
positionCity
.
regionName
...
@@ -280,7 +291,7 @@ Component({
...
@@ -280,7 +291,7 @@ Component({
changeOtherCity
(){
changeOtherCity
(){
console
.
log
(
getCurrentPages
())
console
.
log
(
getCurrentPages
())
wx
.
navigateTo
({
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
(){
toSearchPage
(){
...
...
static/nativeComponents/CubeNav/index.js
View file @
633191d2
...
@@ -39,6 +39,10 @@ Component({
...
@@ -39,6 +39,10 @@ Component({
let
_this
=
this
;
let
_this
=
this
;
let
columnWidthArr
=
[
'100%'
,
'50%'
,
'33.3%'
,
'25%'
,
'20%'
,
'16.6%'
]
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
({
this
.
setData
({
imgList
:
this
.
data
.
datas
.
componentData
.
imgList
.
filter
(
item
=>
item
.
visible
==
undefined
||
item
.
visible
==
1
),
imgList
:
this
.
data
.
datas
.
componentData
.
imgList
.
filter
(
item
=>
item
.
visible
==
undefined
||
item
.
visible
==
1
),
getColumnWidth
:
columnWidthArr
[
this
.
data
.
datas
.
componentData
.
columnNum
-
1
],
getColumnWidth
:
columnWidthArr
[
this
.
data
.
datas
.
componentData
.
columnNum
-
1
],
...
@@ -65,26 +69,26 @@ Component({
...
@@ -65,26 +69,26 @@ Component({
if
(
res
)
{
if
(
res
)
{
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
1
){
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
1
){
_this
.
setData
({
_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
){
}
else
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
2
){
if
(
_this
.
data
.
imgList
.
length
/
_this
.
data
.
datas
.
componentData
.
columnNum
>
1
){
if
(
_this
.
data
.
imgList
.
length
/
_this
.
data
.
datas
.
componentData
.
columnNum
>
1
){
_this
.
setData
({
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
_this
.
data
.
datas
.
componentData
.
rowNum
cube3H
:
res
.
height
*
_this
.
data
.
datas
.
componentData
.
rowNum
})
})
}
else
{
}
else
{
_this
.
setData
({
_this
.
setData
({
cube3H
:
res
.
height
*
2
*
1
cube3H
:
res
.
height
*
1
})
})
}
}
}
else
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
3
){
}
else
if
(
_this
.
data
.
datas
.
componentData
.
rowNum
==
3
){
if
(
_this
.
data
.
datas
.
componentData
.
columnNum
==
1
){
if
(
_this
.
data
.
datas
.
componentData
.
columnNum
==
1
){
_this
.
setData
({
_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
{
}
else
{
_this
.
setData
({
_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({
...
@@ -128,9 +132,11 @@ Component({
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
})
})
}
}
_this
.
setData
({
_this
.
setData
({
w
:
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
w
:
wArr
[
_this
.
data
.
datas
.
componentData
.
columnNum
-
1
]
})
})
console
.
log
(
_this
.
data
.
w
)
if
(
_this
.
data
.
wrapW
>
cube2W
)
{
if
(
_this
.
data
.
wrapW
>
cube2W
)
{
_this
.
setData
({
_this
.
setData
({
navShow
:
true
navShow
:
true
...
...
static/nativeComponents/CubeNav/index.wxml
View file @
633191d2
...
@@ -7,20 +7,20 @@
...
@@ -7,20 +7,20 @@
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
</view>
</view>
</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>
</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="cube2 clearfix" style="overflow-x:auto;overflow-y:hidden" bindtouchmove="touchmove">
<view class="clearfix" style="width:{{wrapW
* 2}}r
px" id="wrapW">
<view class="clearfix" style="width:{{wrapW
}}
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="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 style="padding-left:{{getImgSize}}%;padding-right:{{getImgSize}}%">
<view class="item-img {{item.imageUrl == '' ? 'item-bg' : ''}}">
<view class="item-img {{item.imageUrl == '' ? 'item-bg' : ''}}">
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
<image wx:if="{{item.imageUrl}}" src="{{item.imageUrl}}"></image>
</view>
</view>
</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>
</view>
</view>
</view>
...
@@ -33,16 +33,16 @@
...
@@ -33,16 +33,16 @@
</view>
</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;">
<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}}
r
px">
<swiper indicator-dots="{{true}}" style="height:{{cube3H}}px">
<swiper-item wx:for="{{swiperList}}" style="width:{{swiperItemW
*2}}r
px">
<swiper-item wx:for="{{swiperList}}" style="width:{{swiperItemW
}}
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="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 style="padding-left:{{getImgSize}}%;padding-right:{{getImgSize}}%">
<view class="item-img {{item1.imageUrl == '' ? 'item-bg' : ''}}">
<view class="item-img {{item1.imageUrl == '' ? 'item-bg' : ''}}">
<image wx:if="{{item1.imageUrl}}" src="{{item1.imageUrl}}"></image>
<image wx:if="{{item1.imageUrl}}" src="{{item1.imageUrl}}"></image>
</view>
</view>
</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>
</view>
</view>
</swiper-item>
</swiper-item>
...
...
static/nativeComponents/FloatButton/index.wxml
View file @
633191d2
<!--static/nativeComponents/FloatButton/index.wxml-->
<!--static/nativeComponents/FloatButton/index.wxml-->
<movable-area class="float-botton">
<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.style==0}}" class="content">
<view wx:if="{{datas.componentData.icon.type==1}}">
<view wx:if="{{datas.componentData.icon.type==1}}">
<i
<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