Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
7951f2c0
Commit
7951f2c0
authored
Jun 12, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 图片导航样式
parent
e8f2289a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
34 deletions
+14
-34
picNav.js
src/component/picNav/picNav.js
+1
-1
picNav.wxml
src/component/picNav/picNav.wxml
+3
-7
picNav.wxss
src/component/picNav/picNav.wxss
+6
-24
userCenter.js
src/pages/userCenter/userCenter.js
+1
-1
util.js
src/utils/util.js
+3
-1
No files found.
src/component/picNav/picNav.js
View file @
7951f2c0
...
@@ -29,7 +29,7 @@ Component({
...
@@ -29,7 +29,7 @@ Component({
*/
*/
methods
:
{
methods
:
{
imageLoad
(
e
)
{
imageLoad
(
e
)
{
var
imageSize
=
utils
.
imageUtil
(
e
)
let
imageSize
=
utils
.
imageUtil
(
e
)
this
.
setData
({
this
.
setData
({
imagewidth
:
imageSize
.
imageWidth
,
imagewidth
:
imageSize
.
imageWidth
,
imageheight
:
imageSize
.
imageHeight
imageheight
:
imageSize
.
imageHeight
...
...
src/component/picNav/picNav.wxml
View file @
7951f2c0
<!--component/picNav/picNav.wxml-->
<!--component/picNav/picNav.wxml-->
<view class="pic-nav">
<view class="pic-nav">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item">
<view class="pic-item"><image class="pic-img" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" bindload="imageLoad" bindtap='preview' mode="widthFix"/></view>
<view class="nav-block" style="width: {{imagewidth}}px;height: {{imageheight}}px;">
<image style="width: {{imagewidth}}px;height: {{imageheight}}px;" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" bindload="imageLoad" bindtap='preview' />
</view>
</block>
</block>
</view>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
<!--<view class="pic-nav">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item">
<view class="pic-item"><image style="width: {{imagewidth}}px; height: {{imageheight}}px;" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" bindload="imageLoad" bindtap='preview' mode="widthFix"/></view>
</block>
</view>-->
src/component/picNav/picNav.wxss
View file @
7951f2c0
/* component/picNav/picNav.wxss */
/* component/picNav/picNav.wxss */
.pic-nav {
.pic-nav {
display: flex;
display: flex;
height:172.5rpx;
overflow: hidden;
}
padding: 0;
.pic-item {
margin: 0;
flex: 1;
box-sizing:content-box;
}
}
\ No newline at end of file
.pic-item:first-child image{
height: 100% !important;
}
.pic-img {
height: 100%;
width: 100%;
}
/* .pic-nav {
display: flex;
}
.pic-item {
flex: 1;
}
.pic-item:first-child image{
height: 100% !important;
} */
\ No newline at end of file
src/pages/userCenter/userCenter.js
View file @
7951f2c0
...
@@ -88,7 +88,7 @@ wxService.page({
...
@@ -88,7 +88,7 @@ wxService.page({
title
:
'加载中'
title
:
'加载中'
})
})
wxService
.
post
(
`/coupon/coupon/memberCouponCount`
).
then
(
res
=>
{
wxService
.
post
(
`/coupon/coupon/memberCouponCount`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
&&
res
.
data
const
{
result
,
data
}
=
res
&&
res
.
data
&&
res
.
data
.
result
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
setData
({
this
.
setData
({
...
...
src/utils/util.js
View file @
7951f2c0
...
@@ -58,7 +58,9 @@ function imageUtil(e) {
...
@@ -58,7 +58,9 @@ function imageUtil(e) {
//获取屏幕宽高
//获取屏幕宽高
wx
.
getSystemInfo
({
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
windowWidth
=
res
.
windowWidth
/
2
;
// var windowWidth = res.windowWidth/2;
// var windowHeight = res.windowHeight/2;
var
windowWidth
=
(
res
.
windowWidth
-
30
)
/
2
;
var
windowHeight
=
res
.
windowHeight
/
2
;
var
windowHeight
=
res
.
windowHeight
/
2
;
var
windowscale
=
windowHeight
/
windowWidth
;
//屏幕高宽比
var
windowscale
=
windowHeight
/
windowWidth
;
//屏幕高宽比
if
(
originalScale
<
windowscale
){
//图片高宽比小于屏幕高宽比
if
(
originalScale
<
windowscale
){
//图片高宽比小于屏幕高宽比
...
...
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