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
766e9ad5
Commit
766e9ad5
authored
Jun 25, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片自适应
parent
bec0f23a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
7 deletions
+17
-7
app.js
src/app.js
+2
-2
picNav.js
src/component/picNav/picNav.js
+2
-0
index.js
src/config/index.js
+3
-1
activateCardCallback.js
src/pages/activateCard/activateCardCallback.js
+5
-1
project.config.json
src/project.config.json
+1
-1
util.js
src/utils/util.js
+4
-2
No files found.
src/app.js
View file @
766e9ad5
...
...
@@ -109,8 +109,8 @@ App({
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
commonFunc
:
commonFunc
,
// brandId: 2711,
//
brandId: 2005,
brandId
:
1001
,
brandId
:
2005
,
//
brandId: 1001,
// brandId: 1002,
}
})
src/component/picNav/picNav.js
View file @
766e9ad5
...
...
@@ -36,11 +36,13 @@ Component({
*/
methods
:
{
imageLoad
(
e
)
{
console
.
log
(
'E'
,
e
)
let
imageSize
=
utils
.
imageUtil
(
e
)
this
.
setData
({
imagewidth
:
imageSize
.
imageWidth
,
imageheight
:
imageSize
.
imageHeight
})
console
.
log
(
imageSize
.
imageWidth
)
},
preview
(
e
)
{
const
{
appid
,
path
,
link
,
item
}
=
e
.
currentTarget
.
dataset
...
...
src/config/index.js
View file @
766e9ad5
const
PROJECT_ENV
=
'
dev
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
PROJECT_ENV
=
'
prod
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
needMock
=
''
//
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34
// appid_pre_711 wx358b56af62edbde1
// appid_prod_711 wx700028bf32a3be66
// 1 2 3 步!!!!!!!!!!!!!!!!!!!!!! prod appid brandId
...
...
src/pages/activateCard/activateCardCallback.js
View file @
766e9ad5
...
...
@@ -48,11 +48,15 @@ wxService.page({
wxService
.
post
(
`/member/activateCard`
,
currentObj
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
// debugger
// 激活成功 变更 _激活状态
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
baseUserInfo
.
memberActivateStatus
=
true
baseUserInfo
.
memberId
=
data
.
id
if
(
data
.
code
){
baseUserInfo
.
memberCardNo
=
data
.
code
}
wx
.
setStorageSync
(
'_cardMember'
,
data
)
// 更新缓存信息手机号码 relogin
this
.
handelReLogin
()
}
else
{
...
...
src/project.config.json
View file @
766e9ad5
...
...
@@ -13,7 +13,7 @@
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.6.6"
,
"appid"
:
"wx
c3b64b09b1d3dfc2
"
,
"appid"
:
"wx
358b56af62edbde1
"
,
"projectname"
:
"7-Eleven"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
...
...
src/utils/util.js
View file @
766e9ad5
...
...
@@ -72,8 +72,10 @@ function imageUtil(e) {
imageSize
.
imageHeight
=
(
windowWidth
*
originalHeight
)
/
originalWidth
;
}
else
{
//图片高宽比大于屏幕高宽比
//图片缩放后的高为屏幕高
imageSize
.
imageHeight
=
windowHeight
;
imageSize
.
imageWidth
=
(
windowHeight
*
originalWidth
)
/
originalHeight
;
// imageSize.imageHeight = windowHeight;
// imageSize.imageWidth = (windowHeight * originalWidth) / originalHeight;
imageSize
.
imageHeight
=
originalHeight
*
windowWidth
/
originalWidth
;
imageSize
.
imageWidth
=
windowWidth
;
}
}
})
...
...
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