From ccda9ec2fe70d8f51ef184eafc04b78d22dfbabd Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期三, 26 六月 2024 15:02:28 +0800 Subject: [PATCH] 小程序,教材,课程 --- pages/bibliographyList/index.js | 55 +++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 35 insertions(+), 20 deletions(-) diff --git a/pages/bibliographyList/index.js b/pages/bibliographyList/index.js index 2a851c7..ac0e451 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() }, /** @@ -151,8 +154,8 @@ }, fields: { jsek_link: [], - content: [], subtitle: [], + content: [], fileType: [], jsek_resource: [], freeFile: [], @@ -165,7 +168,7 @@ }) this.setData({ higherList: res.datas, - higherTotal: res.total + higherTotal: res.total.le }) this.setData({ loading: false, //寮�鍚鏋跺睆鍔犺浇 @@ -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