| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- IsShowSelect:false,
- Sort1:"panel112",
- Sort2:"",
- },
- onLoad: function (options) {
- let that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- List:app.globalData.UserCollect,
- Count:0,
- });
- },
- sortWord:function(e){
- let isSort=e.currentTarget.dataset.issort;
- let list=[];
- let sort1="",sort2="";
- if (isSort=="1"){
- list=common.sort(this.data.List,"ASC","Word","String");
- sort1="";
- sort2="panel112";
- }
- else{
- list=common.sort(this.data.List,"DESC","ID","Number");
- sort1="panel112";
- sort2="";
- }
- //debugger;
- this.setData({
- List:list,
- Sort1:sort1,
- Sort2:sort2,
- });
- },
- selecItem:function(e){
- let index=e.currentTarget.dataset.index;
- let list=this.data.List;
-
- for(let i=0;i<list.length;i++){
- if (index=="all")
- list[i].Selected=1;
- else if (index==i)
- list[i].Selected=list[i].Selected==1?0:1;
- }
- let count=0;
- for(let i=0;i<list.length;i++){
- if (list[i].Selected==1)
- count++;
- }
-
- this.setData({
- List:list,
- Count:count,
- });
- },
- setDataBoolean:function(e){
- if (this.data.IsShowSelect){
- let list=this.data.List;
- for(let i=0;i<list.length;i++)
- list[i].Selected=0;
- this.setData({
- List:list,
- });
- }
- this.setData({
- IsShowSelect:!this.data.IsShowSelect,
- });
- },
- goto: function (e) {
- let that=this;
- 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,
- }
- },
- })
|