Files
Smart-Farm/front/mine/pages/evaluate/list.js
2025-12-22 17:13:05 +08:00

1 line
6.5 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["mine/pages/evaluate/list"],{"3b1e":function(t,e,n){},"49f6":function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("2eee")),r=i(n("9523")),o=i(n("c973")),u=n("26cb");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={components:{uniSegmentedControl:function(){n.e("components/uni-segmented-control").then(function(){return resolve(n("49df"))}.bind(null,n)).catch(n.oe)}},data:function(){return{typeInd:0,typeList:[{id:1,title:"认养订单",method:"claim"},{id:2,title:"土地订单",method:"land"},{id:3,title:"商城订单",method:"shop"}],activeIndex:0,tabList:[{id:1,title:"待评价",number:0},{id:2,title:"已评价"}],statusType:{"-1":"已取消",1:"待支付",2:"认养中",3:"配送中",7:"已完成"},param:{page:1},list:{data:[]},loading:!0,lockTap:!1}},computed:(0,u.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo}}),onLoad:function(){var t=this;return(0,o.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.showLoading(),e.next=3,t.initIndex();case 3:case"end":return e.stop()}}),e)})))()},onUnload:function(){this.$util.back()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:c(c({},(0,u.mapActions)(["getUserInfo"])),{},{initIndex:function(){var t=this;return(0,o.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getList();case 2:case"end":return e.stop()}}),e)})))()},initRefresh:function(){this.param.page=1,this.initIndex()},getList:function(){var t=this;return(0,o.default)(a.default.mark((function e(){var n,i,r,o,u,s,c,l;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.list,i=t.typeInd,r=t.typeList,o=t.activeIndex,t.tabList,u=r[i].id,s=t.$util.deepCopy(t.param),s.type=u,c=0==o?"noEvaluateOrderList":"userEvaluateList",e.next=7,t.$api.mine[c](s);case 7:l=e.sent,1==o&&(l.data=l.data.map((function(t){var e=Object.assign({},t.order_info,{eva_info:t});return delete e.eva_info.order_info,e}))),1==t.param.page||(l.data=n.data.concat(l.data)),t.list=l,t.loading=!1,0==o&&(t.tabList[0].number=l.total),t.$util.hideAll();case 13:case"end":return e.stop()}}),e)})))()},handerTabChange:function(t,e){this[e]=t,"typeInd"==e&&(this.activeIndex=0),this.$util.showLoading(),this.param.page=1,this.list.data=[],this.getList()},toPreviewImage:function(t,e){var n=this.list.data[t].eva_info.imgs;this.$util.previewImage({current:n[e],urls:n})},toChangeItem:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.activeIndex;if(0!=n&&1!=e)this.toChangeOrder(t,"del_item");else{var i=this.list.data[t],a=i.id,r=(i.order_id,i.eva_info),o=void 0===r?{id:0}:r,u=o.id,s=this.typeList[this.typeInd].method,c=1==e?"&eva_id=".concat(u):"",l="/mine/pages/evaluate/edit?id=".concat(a).concat(c,"&type=").concat(s);this.$util.goUrl({url:l})}},toChangeOrder:function(t,e){var n=this;return(0,o.default)(a.default.mark((function i(){var r,o,u,s,c,l;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=n.list.data[t],o=r.eva_info,u=r.goods_cover,s=void 0===u?"":u,c=o.id,l=o.order_code,n.popupInfo={id:c,name:"订单编号:".concat(l),image:s,index:t,refs_key:e},n.$refs[e].open();case 4:case"end":return i.stop()}}),i)})))()},confirmChangeOrder:function(){var t=this;return(0,o.default)(a.default.mark((function e(){var n,i,r,o;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.popupInfo,i=n.id,r=n.index,o=n.refs_key,!t.lockTap){e.next=3;break}return e.abrupt("return");case 3:return t.lockTap=!0,t.$util.showLoading(),e.prev=5,e.next=8,t.$api.mine.evaluateUpdate({id:i,status:-1});case 8:t.$util.hideAll(),t.list.data.splice(r,1),t.$util.showToast({title:"删除成功"}),t.tabList[0].number=t.tabList[0].number+1,t.$util.back(),t.lockTap=!1,t.$refs[o].close(),e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](5),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3);case 20:case"end":return e.stop()}}),e,null,[[5,17]])})))()}})};e.default=l}).call(this,n("543d")["default"])},"4e71":function(t,e,n){"use strict";n.r(e);var i=n("912c"),a=n("6979");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("a189");var o=n("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=u.exports},6979:function(t,e,n){"use strict";n.r(e);var i=n("49f6"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"912c":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.tabList.length),i=t.__map(t.list.data,(function(e,n){var i=t.__get_orig(e),a=1==t.activeIndex?e.eva_info.imgs&&e.eva_info.imgs.length>0:null,r=1==t.activeIndex&&a?t.__map(e.eva_info.imgs,(function(n,i){var a=t.__get_orig(n),r=i<3?2==i&&e.eva_info.imgs.length>3:null,o=i<3&&r?e.eva_info.imgs.length:null;return{$orig:a,g2:r,g3:o}})):null;return{$orig:i,g1:a,l0:r}})),a=t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0:null,r=!t.loading&&t.list.data.length<=0&&1==t.list.current_page;t.$mp.data=Object.assign({},{$root:{g0:n,l1:i,g4:a,g5:r}})},a=[]},a189:function(t,e,n){"use strict";var i=n("3b1e"),a=n.n(i);a.a},d7b7:function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("b03e");i(n("66fd"));var a=i(n("4e71"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])}},[["d7b7","common/runtime","common/vendor"]]]);