| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- IsShowRemind:false,
- },
- onLoad: function (options) {
- let that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- });
- that.getData();
- },
- getData:function(){
- wx.showLoading({
- title: '请稍候',
- });
- let that=this;
- main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID, function (data) {
- wx.hideLoading();
- if (data) {
- for(let i=0;i<data.length;i++){
- let item=data[i];
- item.WordsStr=item.Words.split(",").join(" ");
- }
- that.setData({
- List:data,
- });
- }
- });
- },
- goto: function (e) {
- let that=this;
- var url=e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- });
- },
- setClipboard:function(e){
- let words=e.currentTarget.dataset.words;
- app.globalData.SelectedWords=words.split(",");
- wx.redirectTo({
- url: 'wordsinput',
- })
- },
- deleteArticle:function(e){
- this.setData({
- IsShowRemind:true,
- ID:e.currentTarget.dataset.id
- });
- },
- showRemind:function(e){
- let that=this;
- const confirm=e.currentTarget.dataset.confirm;
- this.setData({
- IsShowRemind:!this.data.IsShowRemind,
- });
- if (confirm=="1") {
- main.getData('DeleteYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+"&ID="+that.data.ID, function (data) {
- wx.showToast({
- title: '删除完成',
- });
- that.getData();
- });
- }
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- })
|