| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- ImagePath: app.globalData.uploadImageUrl,
- },
- onLoad: function () {
- var that = this;
- that.setData({
- CheckListUserID: app.globalData.userInfo.UserID,
- Containnerheight: main.getWindowHeight(),
- UserID: app.globalData.userInfo.UserID,
- });
- var userid = app.globalData.userInfo.UserID;
- main.getData("GetMiaoguoLesson2?UserID=" + userid, function (data) {
- if (data) {
-
- var arr=[];
- for(var i=0;i<4;i++)
- arr.push(data[i]);
- that.setData({
- List: arr,
- });
- wx.setStorageSync("LessonList", data);
- }
- });
- },
- gotoLesson: function (e) {
- var id = e.currentTarget.dataset.id;
- var idchild="";
- if (e.currentTarget.dataset.idchild && id>1)
- idchild = '&LessonPage=' +e.currentTarget.dataset.idchild;
-
- if (e.currentTarget.dataset.url){
- wx.navigateTo({
- url: '../other/video?LessonID=' + id +idchild+"&imageurl="+e.currentTarget.dataset.imageurl+"&url="+e.currentTarget.dataset.url+"&title="+e.currentTarget.dataset.title,
- });
- }
- else{
- if (id!=2 && id!=3){
- wx.navigateTo({
- url: '../other/lesson?LessonID=' + id +idchild,
- });
- }
- }
- },
- onShareAppMessage: function () {
- return {
- title: "教学课程",
- path: app.globalData.SharePath + '?type=lesson&LessonID=all&UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.uploadImageUrl+"web/program_screenshot_lesson_a00.png",
- }
- },
- })
|