detection-user/unpackage/dist/build/mp-weixin/pages/detection/detedetails.js

1 line
5.5 KiB
JavaScript
Raw Normal View History

2024-09-18 18:50:21 +08:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/detection/detedetails"],{"26ac":function(e,n,t){},"54f9":function(e,n,t){"use strict";(function(e,n){var a=t("47a9");t("c55e");a(t("3240"));var i=a(t("7892"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},"70a8":function(e,n,t){"use strict";(function(e){var a=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=a(t("7eb4")),u=a(t("ee10")),o=(a(t("f76e")),a(t("1fab"))),s={data:function(){return{id:"",obj:{},style:{image:"width: 100%;"},inputvalue:"",createTime:"",pinglun:!1,dianzan:!1,shoucang:!1,baseUrl:this.$baseUrl,pinglunlist:[],arrlist:[],user:{},videoList:null,type:"center",msgType:"success",messageText:"这是一条成功提示"}},components:{tabBar:function(){t.e("components/detection/tabBar").then(function(){return resolve(t("f254"))}.bind(null,t)).catch(t.oe)}},onLoad:function(e){this.id=e.id,console.log("执行了"),this.getlistindex()},onShow:function(){this.user=e.getStorageSync("userinfo"),console.log("userinfo",this.user)},methods:{getdianzan:function(){var e=this;return(0,u.default)(i.default.mark((function n(){var t;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t={newsId:e.id,type:"like"},n.next=3,(0,o.default)({url:"/appInspection/news/likeOrCollect",method:"post",params:t});case 3:n.sent,e.getlistindex();case 5:case"end":return n.stop()}}),n)})))()},getshoucang:function(){var e=this;return(0,u.default)(i.default.mark((function n(){var t;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t={newsId:e.id,type:"collect"},n.next=3,(0,o.default)({url:"/appInspection/news/likeOrCollect",method:"post",params:t});case 3:n.sent,e.getlistindex();case 5:case"end":return n.stop()}}),n)})))()},getdelete:function(e){var n=this;return(0,u.default)(i.default.mark((function t(){var a;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={commentId:e},t.next=3,(0,o.default)({url:"/appInspection/news/delNewsComment",method:"post",params:a});case 3:t.sent,n.getlistindex();case 5:case"end":return t.stop()}}),t)})))()},getpinglun:function(){this.pinglun=!this.pinglun},getback:function(){e.navigateBack({delta:1})},getnew:function(){var e=this;return(0,u.default)(i.default.mark((function n(){var t,a;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t={newsId:e.id},n.next=3,(0,o.default)({url:"/appInspection/news/getDetail",method:"get",params:t});case 3:a=n.sent,console.log(a);case 5:case"end":return n.stop()}}),n)})))()},getlistindex:function(){var e=this;return(0,u.default)(i.default.mark((function n(){var t,a;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,o.default)({url:"/appInspection/news/getDetail?newsId="+e.id,method:"get"});case 2:return t=n.sent,console.log(t),e.obj=t.data,e.videoList=t.data.videoUrl,"1"==t.data.isLike?e.dianzan=!0:e.dianzan=!1,"1"==t.data.isCollect?e.shoucang=!0:e.shoucang=!1,e.createTime=e.obj.createTime,n.next=11,(0,o.default)({url:"/appInspection/news/getCommentList?newsId="+e.id});case 11:return a=n.sent,e.pinglunlist=a.rows,console.log(a),n.next=16,(0,o.default)({url:"/appInspection/news/addReadNum?newsId="+e.id,method:"post"});case 16:n.sent;case 17:case"end":return n.stop()}}),n)})))()},getfasong:function(){var n=this;return(0,u.default)(i.default.mark((function t(){var a,u;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n.inputvalue){t.next=3;break}return e.showToast({title:"请输入评论内容",icon:"none"}),t.abrupt("return");case 3:return a={newsId:n.id,context:n.inputvalue},t.next=6,(0,o.default)({url:"/appInspection/news/addInspectionNewsComment",method:"post",data:a});case 6:u=t.sent,console.log(u),n.inputvalue="",n.getlistindex();case 10:case"end":return t.stop()}}),t)})))()},dialogToggle:function(e){this.deleteid=e,this.$refs.alertDialog.open()},dialogClose:function(){console.log("点击关闭")},dialogConfirm:function(){console.log("点击<EFBFBD>