- {{item}}
const ArticleListVerify = {template: `
暫無數據
確定刪除么?刪除后不可恢復
', onOk: () => { this.$ssy.ajax(siteGlobal.domain + '/article/ApiUserArticleVerify/itemDel', { uuid: val.uuid, }).then(res => { if(res.code == 1) { this.$Message.success('操作成功'); this.getItemList(); } }); }, onCancel: () => { } }); }, itemListSelectChange() { var itemList = this.itemList; for (var i = 0; i < itemList.length; i++) { if (this.itemListSelectStatus) { itemList[i].itemListSelectStatus = true; } else { itemList[i].itemListSelectStatus = false; } } this.itemList = itemList; }, itemPaginationSelect(val) { this.pagination.limit = val; this.getItemList(); }, itemPaginationClick(val) { this.pagination.currentPage = val; this.getItemList(); }, //搜索 itemSearchClick: function() { this.getItemList(); }, } } Vue.component('article-list-verify',ArticleListVerify);Vue.component('ArticleListVerify',ArticleListVerify);const ArticleList = {template: `暫無數據
數據加載中...
確定刪除么?刪除后不可恢復
', onOk: () => { this.$ssy.ajax(siteGlobal.domain + '/article/ApiUserArticle/itemDel', { uuid: val.uuid, }).then(res => { if(res.code == 1) { this.$Message.success('操作成功'); this.getItemList(); } }); }, onCancel: () => { } }); }, itemListSelectChange() { var itemList = this.itemList; for (var i = 0; i < itemList.length; i++) { if (this.itemListSelectStatus) { itemList[i].itemListSelectStatus = true; } else { itemList[i].itemListSelectStatus = false; } } this.itemList = itemList; }, itemPaginationSelect(val) { this.pagination.limit = val; this.getItemList(); }, itemPaginationClick(val) { this.pagination.currentPage = val; this.getItemList(); }, //搜索 itemSearchClick: function() { this.getItemList(); }, } } Vue.component('articleList',ArticleList);Vue.component('ArticleList',ArticleList);const ArticlePublish = {template: `時間 | 內容 | 狀態 | 操作 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{item.add_time | time}} | {{item.title}} | {{item.status ? '已讀' : '未讀'}} | 查看 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
暫無數據 |
訂單號 | 名稱 | 時間 | 金額 | 狀態 | 操作 |
---|---|---|---|---|---|
{{item.id}} | {{item.modInfo.title}} | {{item.add_time | time}} | ¥ {{item.money}} | {{item.is_close ? '已關閉' : item.pay_status == 0 ? '未付款' : '成功'}} |
已關閉
|
暫無數據! |
數據加載中...
確定關閉么?
', onOk: () => { this.$ssy.ajax(siteGlobal.domain + '/payment/ApiUserOrder/itemClose', { id: val.id, }).then(res => { if(res.code == 1) { this.$Message.success('操作成功'); this.getItemList(); } }); }, onCancel: () => { } }); }, getItemList() { this.loading = true; this.$ssy.ajax(siteGlobal.domain + '/payment/ApiUserOrder/itemList', { page: this.pagination.currentPage, limit: this.pagination.limit, }).then(res => { this.itemList = []; if(res.code == 1) { var itemList = res.data.itemList; if (itemList) { for (var i = 0; i < itemList.length; i++) { itemList[i].itemListSelectStatus = false; } this.itemList = itemList; } this.pagination.total = res.data.total; } this.loading = false; }); }, itemListSelectChange() { var itemList = this.itemList; for (var i = 0; i < itemList.length; i++) { if (this.itemListSelectStatus) { itemList[i].itemListSelectStatus = true; } else { itemList[i].itemListSelectStatus = false; } } this.itemList = itemList; }, itemPaginationSelect(val) { this.pagination.limit = val; this.getItemList(); }, itemPaginationClick(val) { this.pagination.currentPage = val; this.getItemList(); }, } } Vue.component('order',Order);Vue.component('Order',Order);const Settings = {template: `確定要刪除么?
', onOk: () => { this.$ssy.ajax(siteGlobal.domain + '/article/ApiUserArticleAction/itemDel', { uuid: this.uuid, }).then(res => { if(res.code == 1) { window.location.href = siteGlobal.domain; } }); }, onCancel: () => { } }); }, } } Vue.component('component-article-del',ComponentArticleDel);Vue.component('ComponentArticleDel',ComponentArticleDel);const ComponentArticleElite = {template: `確定刪除么?刪除后不可恢復
', onOk: () => { this.$ssy.ajax(modConfig.modCommentApi + 'itemDel', { itemId: this.itemId, commentsId: id, }).then(res => { if (res.code == 1) { this.$Message.success('刪除成功'); this.getCommentsList(); } }); }, onCancel: () => { } }); }, //評論查詢 getCommentsList() { this.$ssy.ajax(modConfig.modCommentApi + 'itemList', { itemId: this.itemId, order: 'asc', }).then(res => { if (res.code == 1) { var commentsList= res.data.itemList; for (var i = 0; i < commentsList.length; i++) { commentsList[i].commentStatus = false; } this.commentsList = commentsList; } }); }, //評論修改(彈出修改界面) commentsEditModalClick:function(id) { this.commentsModalStatus = true; this.$ssy.ajax(modConfig.modCommentApi + 'itemInfo', { itemId: this.itemId, commentsId: id, }).then(res => { if (res.code == 1) { this.commentsEditEditor.setValue(res.data.content); this.commentsId = id; } }); }, //評論修改(確認提交) commentsEdit: function() { var commentsEditData = this.commentsEditEditor.getValue(); this.$ssy.ajax(modConfig.modCommentApi + 'itemEdit', { itemId: this.itemId, commentsId: this.commentsId, content: commentsEditData, }).then(res => { if (res.code == 1) { this.commentsEditData = ''; this.commentsModalStatus = false; this.$Message.success('修改成功'); this.getCommentsList(); } }); }, //二層回復開始 //取消回復 commentsReplyCancel() { this.getCommentsList(); }, goAnchor(item,selector,textareaId,isReply,sub) { this.commentsReplyContent = ''; var commentsList= this.commentsList; for (var i = 0; i < commentsList.length; i++) { if (item.id == commentsList[i].id) { commentsList[i].commentStatus = true; } else { commentsList[i].commentStatus = false; } } this.commentsList = commentsList; var _this = this; setTimeout(function() { var anchor = _this.$el.querySelector(selector); var anchorHeight = _this.getElementTop(anchor); const sTop = document.documentElement.scrollTop || document.body.scrollTop; _this.scrollTop(window, sTop, anchorHeight - 300, 1000); document.getElementById(textareaId).focus(); }, 100); if (isReply == 0) { this.placeholder = '請輸入回復的內容'; this.isReply = 0; this.replyUid = ''; this.replyItemId = ''; } else { this.placeholder = '回復 ' + sub.userInfo.nickname + ':'; this.isReply = isReply; this.replyUid = sub.uid; this.replyItemId = sub.id; } }, scrollTop(el, from = 0, to, duration = 500, endCallback) { if (!window.requestAnimationFrame) { window.requestAnimationFrame = ( window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) { return window.setTimeout(callback, 1000/60); } ); } const difference = Math.abs(from - to); const step = Math.ceil(difference / duration * 50); function scroll(start, end, step) { if (start === end) { endCallback && endCallback(); return; } let d = (start + step > end) ? end : start + step; if (start > end) { d = (start - step < end) ? end : start - step; } if (el === window) { window.scrollTo(d, d); } else { el.scrollTop = d; } window.requestAnimationFrame(() => scroll(d, end, step)); } scroll(from, to, step); }, getElementTop(el) { var anchorTop = el.offsetTop; var current = el.offsetParent; while (current !== null) { anchorTop += current.offsetTop; current = current.offsetParent; } return anchorTop; }, //提交回復內容 commentsReplyAdd: function(item) { this.$ssy.ajax(modConfig.modCommentApi + 'commentsAdd', { itemId: item.id, replyItemId: this.replyItemId, isReply: this.isReply, replyUid: this.replyUid, content: this.commentsReplyContent, }).then(res => { if (res.code == 1) { this.$Message.success(res.msg); this.getCommentsList(); } }); }, // subDel(id) { this.$Modal.confirm({ title: '消息提示', content: '確定刪除么?刪除后不可恢復
', onOk: () => { this.$ssy.ajax(modConfig.modCommentApi + 'commentDel', { itemId: this.itemId, commentsId: id, }).then(res => { if (res.code == 1) { this.$Message.success('刪除成功'); this.getCommentsList(); } }); }, onCancel: () => { } }); }, } } Vue.component('article-comment',ArticleComment);Vue.component('ArticleComment',ArticleComment);const BlockMiniPages = {template: `