| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- Menu1:0,
- Menu2:0,
- Menu2Array:[{ID:0,Name:"全部",CSS:"Selected"},{ID:1,Name:"小学",CSS:""},{ID:2,Name:"初中",CSS:""},{ID:3,Name:"课外拓展",CSS:""}],
- },
- onPullDownRefresh: function () {
- wx.stopPullDownRefresh();
- },
- onLoad: function (options) {
- var that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- });
- },
- onShow:function(){
- var that = this;
- },
- setMenu1:function(e){
- var that=this;
- var index=e.currentTarget.dataset.index;
- that.setData({
- Menu1:index,
- });
- },
- setMenu2:function(e){
- var that=this;
- var index=e.currentTarget.dataset.index;
- var list=that.data.Menu2Array;
- for(var i=0;i<list.length;i++){
- list[i].CSS="";
- if (index==list[i].ID){
- list[i].CSS="Selected";
- }
- }
- that.setData({
- Menu2:index,
- Menu2Array:list,
- });
- },
- goto: function (e) {
- var url = e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- });
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- })
|