From abe52e53bee051e3f801d001c4de58d34a3fefd7 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期三, 23 十月 2024 09:54:09 +0800 Subject: [PATCH] wj --- packageBookService/pages/bookServices/detail/components/teachResource/index.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 52 insertions(+), 1 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/teachResource/index.js b/packageBookService/pages/bookServices/detail/components/teachResource/index.js index 2f38a73..37b2482 100644 --- a/packageBookService/pages/bookServices/detail/components/teachResource/index.js +++ b/packageBookService/pages/bookServices/detail/components/teachResource/index.js @@ -1,3 +1,4 @@ +const app = getApp(); Component({ properties: { applyState: { @@ -16,7 +17,7 @@ type: String, value: "", }, - treeList: { + md5List: { type: Array, } }, @@ -26,6 +27,8 @@ content: "鐭ラ亾浜�", variant: "base" }, + dialogBox: false, + input: '', }, methods: { copy() { @@ -62,5 +65,53 @@ uploadBtn() { this.triggerEvent("uploadFile", true); }, + + mailbox() { + this.setData({ + dialogBox: true + }) + }, + // 寮圭獥鍙栨秷 + closeDialog() { + this.setData({ + dialogBox: false, + }) + }, + //鎻愪氦 + 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({ + dialogBox: false + }) + let query = { + eMail: this.data.input, + md5s: this.properties.md5List + } + app.MG.file.sendFileWithEmail(query).then(res => { + wx.hideLoading() + if (res) { + wx.showToast({ + icon: 'success', + title: '閭欢宸插彂閫�', + }) + } + }) + } else { + // 鏍¢獙涓嶉�氳繃锛岀粰鍑洪敊璇彁绀� + wx.showToast({ + title: '閭鏍煎紡涓嶆纭�', + icon: 'none', + }); + } + }, + inputChange(e) { + this.setData({ + input: e.detail.value + }) + }, }, }); \ No newline at end of file -- Gitblit v1.9.1