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
c9cec132
Commit
c9cec132
authored
Jun 05, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify:样式
parent
7f081ec8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
15 deletions
+70
-15
picNav.js
src/component/picNav/picNav.js
+9
-1
picNav.wxml
src/component/picNav/picNav.wxml
+8
-2
picNav.wxss
src/component/picNav/picNav.wxss
+16
-4
consumptionDetails.js
src/pages/consumptionDetails/consumptionDetails.js
+1
-1
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+5
-5
util.js
src/utils/util.js
+31
-2
No files found.
src/component/picNav/picNav.js
View file @
c9cec132
...
...
@@ -20,12 +20,20 @@ Component({
* 组件的初始数据
*/
data
:
{
imagewidth
:
0
,
//缩放后的宽
imageheight
:
0
,
//缩放后的高
},
/**
* 组件的方法列表
*/
methods
:
{
imageLoad
(
e
)
{
var
imageSize
=
utils
.
imageUtil
(
e
)
this
.
setData
({
imagewidth
:
imageSize
.
imageWidth
,
imageheight
:
imageSize
.
imageHeight
})
},
preview
(
e
)
{
const
{
appid
,
path
}
=
e
.
currentTarget
.
dataset
// 获取当前帐号信息
...
...
src/component/picNav/picNav.wxml
View file @
c9cec132
<!--component/picNav/picNav.wxml-->
<view class="pic-nav">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item"
class="pic-content"
>
<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}}"
bindtap='preview' mode="scaleToFill
"/></view>
<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>
</block>
</view>
<!--<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 @
c9cec132
...
...
@@ -4,10 +4,22 @@
}
.pic-item {
flex: 1;
height: 200rpx;
/* border-radius:10rpx; */
}
.pic-item:first-child image{
height: 100% !important;
}
.pic-img {
height: 100%;
width: 100%;
}
\ No newline at end of file
}
/* .pic-nav {
display: flex;
}
.pic-item {
flex: 1;
}
.pic-item:first-child image{
height: 100% !important;
} */
\ No newline at end of file
src/pages/consumptionDetails/consumptionDetails.js
View file @
c9cec132
...
...
@@ -44,7 +44,7 @@ wxService.page({
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/sale/order/findByOrderNo?orderNo=
${
orderNo
}
&brandId=
1002
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/order/findByOrderNo?orderNo=
${
orderNo
}
&brandId=
2005
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
...
...
src/pages/userCenter/userCenter.wxml
View file @
c9cec132
...
...
@@ -5,21 +5,21 @@
<!--{{pItem.type}}-->
<!-- 轮播 -->
<view class="
images-tab
pd1530" wx:if="{{pItem.type == 1}}">
<view class="pd1530" wx:if="{{pItem.type == 1}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" />
</view>
<!-- 个人中心 {{pItem.customer}}-->
<view class="
images-tab
pd1530" wx:if="{{pItem.type == 2}}">
<view class="pd1530" wx:if="{{pItem.type == 2}}">
<person-center person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}"/>
</view>
<!-- 图片导航 {{pItem.navigation.images}}-->
<view class="
images-tab
pd1530" wx:if="{{pItem.type == 3}}">
<!-- 图片导航 {{pItem.navigation.images}}
pd1530
-->
<view class="pd1530" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" />
</view>
<!-- 底部 -->
<view class="
images-tab
" wx:if="{{pItem.type == 4}}">
<view class="" wx:if="{{pItem.type == 4}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}" data-appid="{{pItem.bottom.link.appid}}" data-path="{{pItem.bottom.link.url}}" catchtouchstart='touchStart' catchtouchend="touchEnd">
<text class="footer-arrow" style="color:{{pItem.bottom.fontColor}}"><<</text>
<text class='footer-text' style="color:{{pItem.bottom.fontColor}}">{{pItem.bottom.title}}</text>
...
...
src/utils/util.js
View file @
c9cec132
...
...
@@ -47,6 +47,34 @@ function getAccountInfo() {
return
accountInfo
}
/**
* 图片宽高比
*/
function
imageUtil
(
e
)
{
var
imageSize
=
{};
var
originalWidth
=
e
.
detail
.
width
;
//图片原始宽
var
originalHeight
=
e
.
detail
.
height
;
//图片原始高
var
originalScale
=
originalHeight
/
originalWidth
;
//图片高宽比
//获取屏幕宽高
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
var
windowWidth
=
res
.
windowWidth
/
2
;
var
windowHeight
=
res
.
windowHeight
/
2
;
var
windowscale
=
windowHeight
/
windowWidth
;
//屏幕高宽比
if
(
originalScale
<
windowscale
){
//图片高宽比小于屏幕高宽比
//图片缩放后的宽为屏幕宽
imageSize
.
imageWidth
=
windowWidth
;
imageSize
.
imageHeight
=
(
windowWidth
*
originalHeight
)
/
originalWidth
;
}
else
{
//图片高宽比大于屏幕高宽比
//图片缩放后的高为屏幕高
imageSize
.
imageHeight
=
windowHeight
;
imageSize
.
imageWidth
=
(
windowHeight
*
originalWidth
)
/
originalHeight
;
}
}
})
return
imageSize
;
}
/**
* 判断用户滑动
* 左滑还是右滑
...
...
@@ -235,8 +263,8 @@ function getUserInfoByBtn(userInfo) {
return
wxService
.
post
(
`/member/minaLogin`
,
{
code
:
res
[
1
].
code
,
wechatInfo
:
res
[
0
],
//
brandId: 2005,
brandId
:
1001
,
brandId
:
2005
,
//
brandId: 1001,
})
},
(
err
)
=>
{
return
Promise
.
reject
(
err
)
...
...
@@ -277,5 +305,6 @@ module.exports = {
getTouchData
,
getAccountInfo
,
aspectRatio
,
imageUtil
// checkFullSucreen
}
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