| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- },
- onLoad: function (options) {
- let that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- });
- that.getData();
- },
- getData:function(){
- const that=this;
- main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID, function (data) {
- 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){
- wx.setClipboardData({
- data: e.currentTarget.dataset.words,
- success (res) {
- wx.getClipboardData({
- success (res) {
- app.globalData.SelectedWords=res.data.split(",");
- }
- });
- }
- });
- },
- deleteArticle:function(e){
- const that=this;
- const id=e.currentTarget.dataset.id;
- wx.showModal({
- title: '删除',
- content: '确认删除这篇文章吗?',
- complete: (res) => {
- if (res.confirm) {
- main.getData('DeleteYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+"&ID="+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,
- }
- },
- })
|