From d1ec1c8ef4dafb4acadf9c0abf9e0fde434d74c2 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Thu, 16 May 2019 17:56:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=88=86=E4=BA=AB][=E6=96=B0=E5=A2=9E]:?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E4=BB=A3=E7=90=86=EF=BC=8C=E9=81=BF=E8=BF=87?= =?UTF-8?q?aws=20downloaddomain=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext.json | 4 +++- pages/index/searchbar/detail/index.js | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ext.json b/ext.json index 92aeec9..6870c62 100644 --- a/ext.json +++ b/ext.json @@ -7,7 +7,9 @@ "etcpVersion": "release", "etcpCallbackUrl": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", - "ifHaveCarModular": "1" + "ifHaveCarModular": "1", + "imgOrgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn", + "imgNewUrl": "https://ciformall.youlane.cn/img" }, "name": "富茂客官开发", "weappId": "wxea71200db93d756b", diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index 5bfe860..af075c5 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -1,6 +1,9 @@ const Http = require("../../../../utils/HttpBasics"); const imgurl = require("../../../../utils/imgurl"); const config = require("../../../../config/config"); +const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} +let imgOrgUrl = extConfig.attr.imgOrgUrl; +let imgNewUrl = extConfig.attr.imgNewUrl; let app = getApp(); Page({ @@ -87,8 +90,9 @@ Page({ let topImageWidth = parseInt(375 * scale) // 因为小数有时候会请求不到图片,所以转成int let topImageHeight = parseInt(250 * scale) let src1 = this.data.data.merchantImgUrl + `?imageView/2/w/${topImageWidth}/h/${topImageHeight}` + let src2 = src1.replace(imgOrgUrl, imgNewUrl) wx.getImageInfo({ - src: src1, + src: src2, success: function(res) { ctx.drawImage(res.path, 0, 0, topImageWidth, topImageHeight) // 覆盖黑色蒙层