From c25a87651702da452b067502ab5daca646f3da7f Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Tue, 30 Apr 2019 21:04:26 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E5=BE=97=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E8=AF=A6=E6=83=85banner=E6=98=BE=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext.json | 14 +++---- pages/index/detail/index.wxml | 2 +- pages/index/detail/index.wxss | 1 + project.config.json | 2 +- utils/memberqrcode.js | 71 ++++++++++++++++++++++++++--------- 5 files changed, 63 insertions(+), 27 deletions(-) diff --git a/ext.json b/ext.json index 1ad284d..14b65ca 100644 --- a/ext.json +++ b/ext.json @@ -1,16 +1,16 @@ { "ext": { "attr": { - "configUrl": "https://c.malls.iformall.com/C/api", - "etcpAppId": "wxc07f9d67923d676d", + "configUrl": "https://ctest.malls.iformall.com/C/api", + "etcpAppId": "wx192b7d2e8dcbefd0", "etcpVersion": "release", - "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "富茂链客生产版", - "weappId": "wx6a2524a8286d687f", - "appVersion": "C.nocar.5.1.1" + "name": "富茂链客", + "weappId": "wx649b3be73c1afe47", + "appVersion": "C.test.5.2.0" }, "debug": false, "tabBar": { @@ -49,7 +49,7 @@ "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF" }, - "extAppid": "wx6a2524a8286d687f", + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/pages/index/detail/index.wxml b/pages/index/detail/index.wxml index c9d87d9..9f9d6a5 100644 --- a/pages/index/detail/index.wxml +++ b/pages/index/detail/index.wxml @@ -3,7 +3,7 @@ - + diff --git a/pages/index/detail/index.wxss b/pages/index/detail/index.wxss index c261e54..971841f 100644 --- a/pages/index/detail/index.wxss +++ b/pages/index/detail/index.wxss @@ -5,6 +5,7 @@ margin: 0 auto; overflow: hidden; position: relative; + height: 576rpx; } .index-slide-view .dots { diff --git a/project.config.json b/project.config.json index 27db03b..e5dadff 100644 --- a/project.config.json +++ b/project.config.json @@ -14,7 +14,7 @@ }, "compileType": "miniprogram", "libVersion": "2.2.0", - "appid": "wx453ae0d37f3550d0", + "appid": "wxfa336cad86ed598d", "projectname": "C%E7%AB%AF%E5%B0%8F%E7%A8%8B%E5%BA%8F", "isGameTourist": false, "simulatorType": "wechat", diff --git a/utils/memberqrcode.js b/utils/memberqrcode.js index bb7df5f..fc40a75 100644 --- a/utils/memberqrcode.js +++ b/utils/memberqrcode.js @@ -780,26 +780,61 @@ } } } - ctx.draw(false, setTimeout(function () { - wx.canvasToTempFilePath({ - x: 0, - y: 0, - width: cavW, - height: cavH, - destWidth: cavW, - destHeight: cavH, - canvasId: canvas, - fail: function (res) { - console.log(res) - }, - success: function (res) { - console.log(res.tempFilePath) - if (cb) { - cb(res.tempFilePath); - }; + ctx.draw(true, function () { + // 判断绘制方法,判断手机类型 + let brand = ""; + wx.getSystemInfo({ + success:function(res){ + console.log(res.brand) + brand = res.brand; } }) - },200)); + if (brand == 'iPhone') { + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: cavW, + height: cavH, + destWidth: cavW, + destHeight: cavH, + canvasId: canvas, + fail: function (res) { + console.log(res) + }, + success: function (res) { + if (cb) { + cb(res.tempFilePath); + }; + } + }) + + } else { + + // 延迟加载 + setTimeout(function () { + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: cavW, + height: cavH, + destWidth: cavW, + destHeight: cavH, + canvasId: canvas, + fail: function (res) { + console.log(res) + }, + success: function (res) { + if (cb) { + cb(res.tempFilePath); + }; + } + }) + + }, 1000) + } + }); + + } } module.exports = { api }