From 3af76031f4d1bb8d808a07dff7b3e74a8b0db168 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期六, 11 五月 2024 09:37:48 +0800 Subject: [PATCH] 书展邮箱 --- pages/bibliographyList/index.js | 51 +++++++++++++++++++++++++++++++++------------------ 1 files changed, 33 insertions(+), 18 deletions(-) diff --git a/pages/bibliographyList/index.js b/pages/bibliographyList/index.js index 2a851c7..c35afcf 100644 --- a/pages/bibliographyList/index.js +++ b/pages/bibliographyList/index.js @@ -8,6 +8,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + personalDataEmail: '', hiddenmodalput: false, name: "", phoneNum: '', @@ -67,6 +68,8 @@ }); }, }) + + this.ceShi() }, /** @@ -420,34 +423,24 @@ Md5: item.datas.freeFile.FileList[0].Md5, dialogBox: true }) - // wx.showModal({ - // title: '璇疯緭鍏ラ偖绠�', - // content: '', - // confirmColor: '#ff6c00', - // cancelColor: '#949494', - // placeholderText: '璇疯緭鍏ラ偖绠卞彿', - // editable: true, - // complete: (res) => { - // if (res.cancel) { - // console.log('鍙栨秷'); - // } - // if (res.confirm) { - // this.setData({ - // input: res.content - // }) - // this.confirmM() - // } + // wx.scanCode({ + // success: res => { + // console.log(res); // } // }) }, // 寮圭獥鍙栨秷 closeDialog() { this.setData({ - dialogBox: false + dialogBox: false, + // input: '' }) }, //鎻愪氦 confirmM(e) { + wx.showLoading({ + title: '鍙戦�佷腑...', + }) const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.input); if (isEmailValid && this.data.input) { this.setData({ @@ -458,6 +451,7 @@ md5s: [this.data.Md5] } app.MG.file.sendFileWithEmail(query).then(res => { + wx.hideLoading() if (res) { wx.showToast({ icon: 'success', @@ -477,5 +471,26 @@ this.setData({ input: e.detail.value }) + }, + ceShi() { + let that = this; + // 鑾峰彇Storage涓殑鏁版嵁 + wx.getStorage({ + key: 'website-front-userInfo', + success(res) { + let datas = JSON.parse(res.data) + console.log(datas.Email); + let personalData = JSON.parse(datas.data) + + that.setData({ + input: datas.Email + }) + console.log(that.data.value); + }, + fail(err) { + console.error(err); + } + }); + } }) \ No newline at end of file -- Gitblit v1.9.1