1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-009591a0"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],c=e("795b"),r=e.n(c),o=(e("7f7f"),e("ac6a"),e("f20c")),s=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),f="/industryParkApi",h="/wx/data",v="/wx/public",p="/wx/dictController";function g(t){return Object(l["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function m(t){return Object(l["a"])({url:f+v+"/listProjectAll",method:"post",data:t})}function b(t){return Object(l["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function y(t){var a={codes:d()(t)};return new r.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var _=e("3089"),w={name:"BaseData",data:function(){return{currentPage:1,totalSize:0,pageSize:10,InitialLoading:!0,allLoaded:!1,bottomStatus:"",StaffData:[],StaffMap:{},BizData:[],BizMap:{},UserProject:[],ProjectData:[],ProjectMap:{},dialogImageUrl:"",dialogImageVisible:!1,dc_map:{},dc_data:{},dc_map_no_all:{},dc_data_no_all:{}}},mounted:function(){},methods:{initDict:function(t){var a=this;return t||(t=a.dc_key),y(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!0);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initDict2:function(t){var a=this;return t||(t=a.dc_key),y(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!1);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initBiz:function(){var t=this;return this.BizData=[],g(s["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.businessName,value:a.id};t.BizData.push(e),t.BizMap[a.id]=a.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],m(s["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.name,value:a.id};t.ProjectData.push(e),t.ProjectMap[e.value]=a})}).catch(function(){})},pagination:function(t){var a=this.currentPage,e=this.pageSize,n=a*e-e,i=a*e;return t.slice(n,i)},getDictValue:function(t,a,e){var n=t[a]?o["a"].castEval(t[a].dictValue):[],i=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var c={label:"全部",value:"",active:!0};i.unshift(c)}return i},confirm:function(t,a){return new r.a(function(e,n){_["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(_["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,a=this;console.log("loadBottom"),setTimeout(function(){a.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,a){var e=a.indexOf(t);a.splice(e,1)},noImg:function(){var t=event.srcElement;t.src=e("aed7"),t.onerror=null}}},j=w,x=e("2877"),k=Object(x["a"])(j,n,i,!1,null,"3fa5b905",null);a["a"]=k.exports},"386d":function(t,a,e){"use strict";var n=e("cb7c"),i=e("83a1"),c=e("5f1b");e("214f")("search",1,function(t,a,e,r){return[function(e){var n=t(this),i=void 0==e?void 0:e[a];return void 0!==i?i.call(e,n):new RegExp(e)[a](String(n))},function(t){var a=r(e,t,this);if(a.done)return a.value;var o=n(t),s=String(this),u=o.lastIndex;i(u,0)||(o.lastIndex=0);var d=c(o,s);return i(o.lastIndex,u)||(o.lastIndex=u),null===d?-1:d.index}]})},"41ad":function(t,a,e){"use strict";e.d(a,"e",function(){return r}),e.d(a,"c",function(){return o}),e.d(a,"b",function(){return s}),e.d(a,"d",function(){return u}),e.d(a,"f",function(){return d}),e.d(a,"h",function(){return l}),e.d(a,"a",function(){return f}),e.d(a,"g",function(){return h});var n=e("8982"),i="/industryParkApi",c="/wx/parkActivity";function r(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function o(t,a){return Object(n["a"])({url:i+c+"/getActivityById?id="+t+"&userId="+a,method:"get"})}function s(t){return Object(n["a"])({url:i+c+"/clickCollect",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+c+"/insertRegisSignInfo",method:"post",data:t})}function d(t){return Object(n["a"])({url:i+c+"/listRegisSignInfo",method:"post",data:t})}function l(t){return Object(n["a"])({url:i+c+"/updatePublishStatus",method:"post",data:t})}function f(t){return Object(n["a"])({url:i+c+"/add",method:"post",data:t})}function h(t){return Object(n["a"])({url:i+c+"/richScan",method:"post",data:t})}},"438d":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"training"},[e("div",{staticClass:"menu-top-box"},[e("div",{staticClass:"meun-item",on:{click:function(a){return t.goNavigator("eventRelease-add-app")}}},[e("i",{staticClass:"iconfont icon-xinzeng"}),e("span",{staticClass:"txt",on:{click:function(a){return t.addDetail()}}},[t._v("新增发布")])]),e("div",{staticClass:"meun-item"},[e("i",{staticClass:"iconfont icon-sao"}),e("span",{staticClass:"txt",on:{click:t.richScan}},[t._v("扫一扫")])])]),e("div",{staticClass:"tabs-box"},[e("van-tabs",{attrs:{color:"#2A3980","title-active-color":"#2A3980","title-inactive-color":"#666666"},model:{value:t.activeName,callback:function(a){t.activeName=a},expression:"activeName"}},t._l(t.tabsList,function(a){return e("van-tab",{attrs:{title:a.label,name:a.value}},[e("div",{staticClass:"tabs-card-list"},t._l(t.list,function(a){return e("div",{staticClass:"tabs-card"},[null!=a.annexArray&&null!=a.annexArray.length?e("div",{staticClass:"image"},[e("img",{attrs:{src:a.annexArray[0],alt:""}})]):t._e(),e("div",{staticClass:"card-info"},[e("p",{staticClass:"tit"},[t._v(t._s(a.activityName))]),e("p",{staticClass:"num"},[e("span",[t._v("报名:"+t._s(a.partakeNumber))]),e("span",[t._v("签到:"+t._s(a.signInNumber))])])]),e("div",{staticClass:"card-tips"},["2"!==a.registrationStatus?e("span",{staticClass:"normal-button-app z-bt",on:{click:function(e){return e.stopPropagation(),t.editDetail(a)}}},[t._v("编辑")]):t._e(),"2"===a.publishStatus?e("span",{staticClass:"normal-button-app y-bt",on:{click:function(e){return e.stopPropagation(),t.updateStatus(a)}}},[t._v("下架")]):t._e()])])}),0)])}),1)],1)])},i=[],c=(e("ac6a"),e("386d"),e("4917"),e("06a8")),r=e("41ad"),o=e("3089"),s={mixins:[c["a"]],data:function(){return{activeName:"",dc_key:["activityType"],tabsList:[],list:[],userId:"",search:{activityType:"",userId:""}}},watch:{activeName:{deep:!0,handler:function(t){this.getData()}}},mounted:function(){var t=this;window.getQrResult=this.getQrResult,this.initDict(this.dc_key).then(function(a){t.tabsList=t.dc_data.activityType,t.$route.query.activityType&&(t.activeName=t.$route.query.activityType),t.getData()}),window.history&&window.history.pushState&&(history.pushState(null,null,document.URL),window.addEventListener("popstate",this.goBack,!1))},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{goBack:function(){this.$router.push({path:"/home-app"})},richScan:function(){var t=navigator.userAgent,a=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);console.log("---------isiOS-----------"),console.log(a),a?window.webkit.messageHandlers.androidNativeOpenQrcode.postMessage(1):window.MyJSInterface.androidNativeOpenQrcode()},getQrResult:function(t){var a=this;Object(r["g"])({signInCode:t}).then(function(t){t.data&&(Object(o["Toast"])(t.data),a.getData())})},getData:function(){var t=this,a=this;this.search.activityType=this.activeName,Object(r["e"])(this.search).then(function(e){a.list=e,a.list.forEach(function(a){null!=a.annexArray&&null!=a.annexArray.length&&(a.annexArray[0]=t.$common.replaceThumbnail(a.annexArray[0]))}),console.log(a.list)}).catch(function(){})},updateStatus:function(t){var a=this,e={id:t.id,updateType:"2"};Object(r["h"])(e).then(function(t){Object(o["Toast"])("下架成功"),a.getData()}).catch(function(){})},editDetail:function(t){this.$router.push({path:"/eventRelease-app/add",query:{isAdd:"1",id:t.id}})},addDetail:function(){this.$router.push({path:"/eventRelease-app/add",query:{isAdd:"2"}})}}},u=s,d=(e("d27f"),e("2877")),l=Object(d["a"])(u,n,i,!1,null,"c5367e56",null);a["default"]=l.exports},4917:function(t,a,e){"use strict";var n=e("cb7c"),i=e("9def"),c=e("0390"),r=e("5f1b");e("214f")("match",1,function(t,a,e,o){return[function(e){var n=t(this),i=void 0==e?void 0:e[a];return void 0!==i?i.call(e,n):new RegExp(e)[a](String(n))},function(t){var a=o(e,t,this);if(a.done)return a.value;var s=n(t),u=String(this);if(!s.global)return r(s,u);var d=s.unicode;s.lastIndex=0;var l,f=[],h=0;while(null!==(l=r(s,u))){var v=String(l[0]);f[h]=v,""===v&&(s.lastIndex=c(u,i(s.lastIndex),d)),h++}return 0===h?null:f}]})},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,c=/^\s*function ([^ (]*)/,r="name";r in i||e("9e1e")&&n(i,r,{configurable:!0,get:function(){try{return(""+this).match(c)[1]}catch(t){return""}}})},"815c":function(t,a,e){},"83a1":function(t,a){t.exports=Object.is||function(t,a){return t===a?0!==t||1/t===1/a:t!=t&&a!=a}},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return h}),e.d(a,"b",function(){return v});var n=e("795b"),i=e.n(n),c=e("bc3a"),r=e.n(c),o=e("4328"),s=e.n(o),u=e("4360"),d=e("5cab"),l=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var e={method:t.method,url:t.url,data:s.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,n){r()(e).then(function(t){if(t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(f["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}function v(t){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var a={method:t.method,url:t.url};return a.data=t.data,t.headers&&(a.headers=t.headers,a.headers["MVVM-Key"]=String((new Date).getTime()),a.headers["xx"]="anything",a.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new i.a(function(e,n){r.a.defaults.withCredentials=!0,r()(a).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},d27f:function(t,a,e){"use strict";var n=e("815c"),i=e.n(n);i.a}}]);
|