review-message.js 6.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/review-message/review-message"],{"0931":function(t,e,i){"use strict";var s=i("c54c"),n=i.n(s);n.a},4696:function(t,e,i){"use strict";var s,n=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.searchBool=!0},t.e1=function(e){t.getFocus=!0})},r=[];i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return s}))},9408:function(t,e,i){"use strict";(function(t){i("8748");s(i("66fd"));var e=s(i("abff"));function s(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},"9f3d":function(t,e,i){"use strict";i.r(e);var s=i("bf30"),n=i.n(s);for(var r in s)"default"!==r&&function(t){i.d(e,t,(function(){return s[t]}))}(r);e["default"]=n.a},abff:function(t,e,i){"use strict";i.r(e);var s=i("4696"),n=i("9f3d");for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("0931");var o,a=i("f0c5"),u=Object(a["a"])(n["default"],s["b"],s["c"],!1,null,"ffebd506",null,!1,s["a"],o);e["default"]=u.exports},bf30:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(i("4795"));function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e,i,s,n,r,o){try{var a=t[r](o),u=a.value}catch(h){return void i(h)}a.done?e(u):Promise.resolve(u).then(s,n)}function o(t){return function(){var e=this,i=arguments;return new Promise((function(s,n){var o=t.apply(e,i);function a(t){r(o,s,n,a,u,"next",t)}function u(t){r(o,s,n,a,u,"throw",t)}a(void 0)}))}}function a(t){return l(t)||c(t)||h(t)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t,e){if(t){if("string"===typeof t)return f(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?f(t,e):void 0}}function c(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function l(t){if(Array.isArray(t))return f(t)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}var d={name:"review-message",data:function(){return{type:1,mch:"0",share:"0",bonus:"0",stock:"0",over:!1,titleShow:!1,list:[],getFocus:!1,keyword:"",searchBool:!1,modelType:1,reasonRefusal:"",setItem:{},model:!1,page:1}},onLoad:function(e){var i=this;this.mch=e.mch,this.share=e.share,this.bonus=e.bonus,this.stock=e.stock,"1"===this.mch&&("1"===this.share||"1"===this.bonus||"1"===this.stock?this.titleShow=!0:t.setNavigationBarTitle({title:"多商户审核消息"})),"1"===this.share&&("1"===this.mch||"1"===this.bonus||"1"===this.stock?(this.titleShow=!0,"0"===this.mch&&(this.type=2)):(this.type=2,t.setNavigationBarTitle({title:"分销商审核消息"}))),"1"===this.bonus&&("1"===this.mch||"1"===this.share||"1"===this.stock?(this.titleShow=!0,"0"===this.share&&"0"===this.mch&&(this.type=3)):(this.type=3,t.setNavigationBarTitle({title:"团队分红审核消息"}))),"1"===this.stock&&("1"===this.mch||"1"===this.bonus||"1"===this.share?this.titleShow=!0:(this.type=4,t.setNavigationBarTitle({title:"股东分红审核消息"}))),this.request({type:this.type,page:1,keyword:""}).then((function(t){t&&(i.list=t.list)}))},onReachBottom:function(){var t=this;this.over||(this.page++,this.request({type:this.type,page:this.page,keyword:this.keyword}).then((function(e){console.log(e),e&&e.list.length>0?t.list=[].concat(a(t.list),a(e.list)):e&&0===e.list.length&&(t.over=!0)})))},onShow:function(){var t=this;this.request({type:this.type,page:1,keyword:""}).then((function(e){e&&(t.list=e.list)}))},methods:{blurFocus:function(){var t=this;setTimeout((function(e){t.getFocus=!1,t.searchText()}),300)},clearSearch:function(){var t=this;t.keyword=""},changeType:function(t){var e=this;this.list=[],this.page=1,this.type=t,this.over=!1,this.keyword="",this.searchBool=!1,this.request({type:t,page:this.page,keyword:this.keyword}).then((function(t){t&&(e.list=t.list)}))},request:function(t){var e=this;return o(s.default.mark((function i(){var n,r,o,a;return s.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=t.type,r=t.page,o=t.keyword,i.next=3,e.$request({url:e.$api.app_admin.review,data:{type:n,page:r,keyword:o}});case 3:if(a=i.sent,0!==a.code){i.next=8;break}return i.abrupt("return",a.data);case 8:return i.abrupt("return",!1);case 9:case"end":return i.stop()}}),i)})))()},checkQueue:function(t){var e=this;this.$request({url:this.$api.app_admin.queue,data:{queue_id:t}}).then((function(i){if(i.retry&&1==i.retry)e.checkQueue(t);else for(var s=0;s<e.list.length;s++)e.list[s].id===e.setItem.id&&(e.$delete(e.list,s),e.model=!1,e.setItem={})}))},searchText:function(){var t=this;""===this.keyword&&(this.searchBool=!1),this.page=1,this.over=!1,this.request({type:this.type,page:this.page,keyword:this.keyword}).then((function(e){e&&(t.list=e.list)}))},refuse:function(t){this.setItem=t,this.modelType=1,this.model=!0},by:function(t){this.setItem=t,this.modelType=2,this.model=!0},confirm:function(){var e=this;2===this.modelType?this.$request({url:this.$api.app_admin.review_switch,method:"post",data:{type:this.type,status:1,form:JSON.stringify(this.setItem),user_id:this.setItem.user_id}}).then((function(t){if(0===t.code)if(3==e.type)e.checkQueue(t.data.queue_id);else for(var i=0;i<e.list.length;i++)e.list[i].id===e.setItem.id&&(e.$delete(e.list,i),e.model=!1,e.setItem={})})):1===this.modelType&&(this.setItem.review_remark=this.reasonRefusal,this.$request({url:this.$api.app_admin.review_switch,method:"post",data:{type:this.type,status:2,form:JSON.stringify(this.setItem),reason:this.reasonRefusal,user_id:this.setItem.user_id}}).then((function(i){if(0===i.code){e.reasonRefusal="";for(var s=0;s<e.list.length;s++)e.list[s].id===e.setItem.id&&(e.$delete(e.list,s),e.model=!1,e.setItem={})}else t.showToast({title:i.msg,icon:"none",duration:1e3})})))},cancel:function(){this.model=!1,this.setItem={}}}};e.default=d}).call(this,i("543d")["default"])},c54c:function(t,e,i){}},[["9408","common/runtime","common/vendor"]]]);