活动按钮状态流转

This commit is contained in:
2026-03-25 15:53:37 +08:00
commit 37346e790f
2762 changed files with 240282 additions and 0 deletions

View File

@@ -0,0 +1 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/demand/index"],{"220e":function(e,t,n){"use strict";var a=n("47c2"),i=n.n(a);i.a},"3d01":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this.$createElement,t=(this._self._c,this.loadEnd?this.demandList.length:null);this.$mp.data=Object.assign({},{$root:{g0:t}})},i=[]},"47c2":function(e,t,n){},6197:function(e,t,n){"use strict";(function(e,t){var a=n("47a9");n("aa6c");a(n("3240"));var i=a(n("dfc2"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},7319:function(e,t,n){"use strict";(function(e){var a=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n("af34")),o=a(n("7ca3")),r=n("8f59"),s=a(n("f5e9"));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var u={components:{demandItem:function(){Promise.all([n.e("common/vendor"),n.e("pages/component/demand/index")]).then(function(){return resolve(n("b36c"))}.bind(null,n)).catch(n.oe)}},data:function(){return{loadEnd:!1,titleBarHeight:0,page:1,limit:20,hasMore:!1,demandScreen:[],selectScreen:0,demandList:[],shareData:{},showLogin:!1}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,r.mapState)({themeColor:function(e){return e.app.themeColor},iconRelease:function(e){return s.default.svgToUrl("release",e.app.themeColor)},shareImage:function(e){return e.app.shareImage},shareTitle:function(e){return e.app.shareTitle},loginImg:function(e){return e.app.loginImg}})),mounted:function(){var t=e.getSystemInfoSync().statusBarHeight,n=e.getMenuButtonBoundingClientRect();this.titleBarHeight=t+2*(n.top-t)+n.height},onLoad:function(){var t=this;e.showLoading({title:"加载中"}),this.getDemandScreen(),this.getDemandList((function(){e.hideLoading(),t.loadEnd=!0}))},onShow:function(){this.loadEnd&&(this.page=1,this.getDemandList())},onPullDownRefresh:function(){this.page=1,this.getDemandList((function(){e.stopPullDownRefresh()}))},onReachBottom:function(){this.hasMore&&(this.page++,this.getDemandList())},onShareAppMessage:function(e){return"button"==e.from?{title:this.shareData.title,path:this.shareData.path,imageUrl:this.shareData.imageUrl||this.shareImage}:"menu"==e.from?{title:this.shareTitle,imageUrl:this.shareImage}:void 0},onShareTimeline:function(){return{title:this.shareTitle,imageUrl:this.shareImage}},methods:{getDemandScreen:function(){var t=this;this.$util.request("demand.businessCat").then((function(n){1==n.code?t.demandScreen=n.data:e.showToast({title:n.msg,icon:"none"})})).catch((function(e){console.error("获取商圈分类",e)}))},getDemandList:function(t){var n=this;this.$util.request("demand.businessIndexList",{category_id:this.selectScreen,page:this.page,limit:this.limit}).then((function(a){if(t&&t(),1==a.code){var o=a.data.data||[];o.forEach((function(e){e.images=n.splitImages(e.images),e.createtime&&(e.time=n.$util.getDateBeforeNow(e.createtime))})),n.hasMore=n.page<a.data.total/n.limit,n.demandList=1==n.page?o:[].concat((0,i.default)(n.demandList),(0,i.default)(o))}else e.showToast({title:a.msg,icon:"none"})})).catch((function(e){401==e?n.showLogin=!0:(t&&t(),console.error("获取供需列表",e))}))},splitImages:function(e){try{return e?e.split(","):[]}catch(t){return[]}},toPublish:function(){this.$util.toPage({mode:1,path:"/pagesDemand/demand/edit"})},screenChange:function(e){this.selectScreen!=e&&(this.selectScreen=e,this.page=1,this.getDemandList())},toSearch:function(){this.$util.toPage({mode:1,path:"/pages/demand/search/index"})},toLogin:function(){e.redirectTo({url:"/pages/demand/index"})},setShareData:function(e){this.shareData=e}}};t.default=u}).call(this,n("df3c")["default"])},a877:function(e,t,n){"use strict";n.r(t);var a=n("7319"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},dfc2:function(e,t,n){"use strict";n.r(t);var a=n("3d01"),i=n("a877");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("220e");var r=n("828b"),s=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);t["default"]=s.exports}},[["6197","common/runtime","common/vendor"]]]);