From 67e703a45e0e36862785061f4991ee6db4e2edec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Thu, 15 Jul 2021 14:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=BA=AB=E4=BB=BD=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/css/base/background.wxss | 1 + pages/order/detail/index.js | 35 ++++++++++++++++++++++++++++++++ pages/order/detail/index.wxml | 14 +++++++++---- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/commons/css/base/background.wxss b/commons/css/base/background.wxss index 3661c52..31671fb 100644 --- a/commons/css/base/background.wxss +++ b/commons/css/base/background.wxss @@ -13,6 +13,7 @@ .bg-000-op50{background-color:rgba(0,0,0,.5);} .bg-000-op60{background-color:rgba(0,0,0,.6);} .bg-000-op80{background-color:rgba(0,0,0,.8);} +.bg-f00-op50{background-color:rgba(255,0,0,.5);} .bg-fff-op20{background-color:rgba(255,255,255,.2);} .bg-fff-op50{background-color:rgba(255,255,255,.5);} diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 186e010..b4601c6 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -19,6 +19,8 @@ Page({ yearsIndex:-1,//分期年限 money:'',//首付金额 submitFlag:false, + stempFront:'', + stempBack:'', }, onLoad: function (options) { for (let key in options) { @@ -246,5 +248,38 @@ Page({ } }, + //选择图片 + chooseImg(e) { + this.setData({ + submitFlag: false, + }) + let that = this + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + console.log(res) + if(e.currentTarget.dataset.face == 'front'){ + that.setData({ + stempFront:res.tempFilePaths[0], + }) + } + if(e.currentTarget.dataset.face == 'back'){ + that.setData({ + stempBack:res.tempFilePaths[0], + }) + } + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + }, + }) \ No newline at end of file diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 4a91a73..78cd616 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -105,11 +105,17 @@ 开票信息 - - + + + 系统识别失败请重新上传 + + - - + + + 系统识别失败请重新上传 + +