| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- },
- onLoad: function () {
- wx.hideShareMenu();
- var that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- });
- that.init(app.globalData.MemoryLevel);
- },
- init:function(index){
- var that = this;
- var list = main.getMemoryLevelAll();
- for (var i = 0; i < list.length; i++) {
- if (i == index) {
- list[i].SelectedCss = "selected";
- }
- else {
- list[i].SelectedCss = "";
- }
- }
- that.setData({
- Containnerheight: main.getWindowHeight(),
- List: list,
- });
- },
- onSelected:function(e){
- var index=e.currentTarget.dataset.index;
- this.init(index);
- wx.setStorageSync("MemoryLevel", index);
- app.globalData.MemoryLevel=index;
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- });
|