Commit 766e9ad5 by 赵雅纹

图片自适应

parent bec0f23a
......@@ -109,8 +109,8 @@ App({
isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc,
// brandId: 2711,
// brandId: 2005,
brandId: 1001,
brandId: 2005,
// brandId: 1001,
// brandId: 1002,
}
})
......@@ -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
......
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
......
......@@ -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 {
......
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.6.6",
"appid": "wxc3b64b09b1d3dfc2",
"appid": "wx358b56af62edbde1",
"projectname": "7-Eleven",
"debugOptions": {
"hidedInDevtools": []
......
......@@ -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;
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment