From 55949f95a609733d1771d5b017d679cd7d1f005d Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 20 十二月 2024 17:33:17 +0800 Subject: [PATCH] 题库加入购物车优化 --- packageBookService/pages/bookServices/detail/components/teachResource/index.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/teachResource/index.js b/packageBookService/pages/bookServices/detail/components/teachResource/index.js index fe2a9d0..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,6 +17,9 @@ type: String, value: "", }, + md5List: { + type: Array, + } }, data: { showRejectDialog: false, @@ -23,6 +27,8 @@ content: "鐭ラ亾浜�", variant: "base" }, + dialogBox: false, + input: '', }, methods: { copy() { @@ -59,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