123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- // pages/learningReport/learningReport.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- showewm: false,
- showzs: false,
- "spxxArr": [{
- "isfinish": "/images/unfinish.png",
- "spfm": "/images/spfm.jpg",
- "iszburl": "/images/zb.png",
- "name": "一期素质教育培训",
- "startdate": "6月9日",
- "starttime": "19:30",
- "isstartstudy": "/images/startstudy.png",
- "isdtxs": "/images/dtxs.png",
- "ispjkc": "/images/pjkc.png"
- }, {
- "isfinish": "/images/finish.png",
- "spfm": "/images/spfm.jpg",
- "iszburl": "/images/db.png",
- "name": "一期素质教育培训",
- "startdate": "6月9日",
- "starttime": "19:30",
- "isstartstudy": "/images/startstudy.png",
- "isdtxs": "/images/dtxs.png",
- "ispjkc": "/images/pjkc.png"
- }, {
- "isfinish": "/images/unstart.png",
- "spfm": "/images/spfm.jpg",
- "iszburl": "/images/db.png",
- "name": "一期素质教育培训",
- "startdate": "6月9日",
- "starttime": "19:30",
- "isstartstudy": "/images/startstudy.png",
- "isdtxs": "/images/dtxs.png",
- "ispjkc": "/images/pjkc.png"
- }, {
- "isfinish": "/images/unstart.png",
- "spfm": "/images/spfm.jpg",
- "iszburl": "/images/db.png",
- "name": "一期素质教育培训",
- "startdate": "6月9日",
- "starttime": "19:30",
- "isstartstudy": "/images/startstudy.png",
- "isdtxs": "/images/dtxs.png",
- "ispjkc": "/images/pjkc.png"
- }],
- },
- selectBtn0() {
- this.setData({
- select: 0
- });
- },
- selectBtn1() {
- this.setData({
- select: 1
- });
- },
- gokhAnswer() {
- wx.navigateTo({
- url: '../answerAfterclass/answerAfterclass'
- })
- },
- gopjClass() {
- wx.navigateTo({
- url: '../evaluationCourse/evaluationCourse'
- })
- },
- startAnswer() {
- wx.navigateTo({
- url: '/pages/answerAfterclass/answerAfterclass',
- })
- },
- lq() {
- this.setData({
- showzs: true
- });
- // wx.showToast({
- // title: '领取成功'
- // })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- },
- showEwm() {
- this.setData({
- showewm: true
- });
- },
- // showzs(){
- // },
- onClose() {
- this.setData({
- showewm: false
- });
- },
- onClose1() {
- this.setData({
- showzs: false
- });
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- saveImg() {
- wx.showLoading({
- title: '保存中...'
- })
- var imgSrc = "https://sqdx.windd.cn/files/21.png"
- wx.downloadFile({
- url: imgSrc,
- success: function (res) {
- console.log(res);
- //图片保存到本地
- wx.saveImageToPhotosAlbum({
- filePath: res.tempFilePath,
- success: function (data) {
- wx.hideLoading()
- wx.showToast({
- title: '保存成功',
- icon: 'success',
- duration: 2000
- })
- },
- fail: function (err) {
- console.log(err);
- if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
- console.log("当初用户拒绝,再次发起授权")
- wx.openSetting({
- success(settingdata) {
- console.log(settingdata)
- if (settingdata.authSetting['scope.writePhotosAlbum']) {
- console.log('获取权限成功,给出再次点击图片保存到相册的提示。')
- } else {
- console.log('获取权限失败,给出不给权限就无法正常使用的提示')
- }
- }
- })
- }
- },
- complete(res) {
- console.log(res);
- }
- })
- }
- })
- },
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|