12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- import APIClient from '../../../utils/APIClient.js'
- Page({
-
- data: {
- title: '',
- bookList: [],
- line1: '您还没有课程哦',
- line2: '拥有了课程再来看看吧'
- },
-
- toCourse: function(e) {
- let productId = e.currentTarget.dataset.productid;
- let productTitle = e.currentTarget.dataset.producttitle;
- wx.navigateTo({
- url: `../../groupPage/grade-details/grade-details?productId=${productId}&title=${productTitle}`
- });
- },
-
- onLoad: function (option) {
- console.log(option.title);
- if (option.title) {
- wx.setNavigationBarTitle({
- title: option.title
- });
- this.setData({
- title: option.title
- });
- }
- APIClient.myCourse().success(res => {
- console.log(res.data.data.list);
- this.setData({
- bookList: res.data.data
- },() => {
- console.log(this.data.bookList);
- });
- }).fail(err => {
- console.log(err);
- });
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- }
- })
|