1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-feature-feature"],{"0dff":function(t,e,i){var n=i("e153");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("500c2318",n,!0,{sourceMap:!1,shadowMode:!1})},"5f3d":function(t,e,i){"use strict";i.r(e);var n=i("9f14"),a=i("c76d");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("9e11");var r,d=i("f0c5"),s=Object(d["a"])(a["default"],n["b"],n["c"],!1,null,"759e59bd",null,!1,n["a"],r);e["default"]=s.exports},7751:function(t,e,i){"use strict";var n=i("4ea4");i("99af"),i("caad"),i("2532"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i("b742"),o=i("37f6"),r=n(i("8e28")),d=n(i("bd50")),s=n(i("d107")),c={data:function(){return{vbPicture:a.vbPicture,showTab:!0,isCheckBox:!1,pattern:{buttonColor:"#307aff"},currentTabIndex:0,chooseClassifyIndex:0,page:1,pageSize:10,loadingType:0,page0:1,pageSize0:10,loadingType0:0,page1:1,pageSize1:10,loadingType1:0,page2:1,pageSize2:10,loadingType2:0,contentText:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},index:0,kinds:["熟食","凉菜","热菜","蔬菜","主食","水果"],foodName:"",reason:"",materialName:"",imgs:[],userId:(0,a.getStorage)("userInfo").id,foodList:[],title:"checkbox 复选框",newfoodList:[],dateInfo:null,cindex:1,content:[],myfeatureList:[],publicfeatureList:[],releasefeatureList:[],type:0}},watch:{currentTabIndex:function(t,e){0==t?(this.page0=1,this.loadingType0=0,this.getReleasefeatureList()):1==t?(this.cancel(),this.page1=1,this.loadingType1=0,this.getPublicFeatureFood()):2==t&&(this.page2=1,this.loadingType2=0,this.getMySubmitFeatureFood()),1==t?1==this.type?this.content=[{text:"发布",iconPath:"/static/icons/fb.png"}]:2==this.type&&(this.content=[{text:"推荐",iconPath:"/static/icons/fb.png"}]):0==t&&(this.content=[{text:"上新",iconPath:"/static/icons/fb.png"}])}},components:{loadMore:r.default,contentNone:d.default,uniFab:s.default},mounted:function(){1==this.currentTabIndex?1==this.type?this.content=[{text:"发布",iconPath:"/static/icons/fb.png"}]:2==this.type&&(this.content=[{text:"推荐",iconPath:"/static/icons/fb.png"}]):0==this.currentTabIndex&&(this.content=[{text:"上新",iconPath:"/static/icons/fb.png"}])},onLoad:function(t){this.currentTabIndex=t.currentTabIndex||0,this.type=t.type||0,0==this.currentTabIndex?(this.page0=1,this.loadingType0=0,this.getReleasefeatureList()):1==this.currentTabIndex?(this.cancel(),this.page1=1,this.loadingType1=0,this.getPublicFeatureFood()):2==this.currentTabIndex&&(this.page2=1,this.loadingType2=0,this.getMySubmitFeatureFood())},methods:{checkboxChange:function(t){for(var e=this.publicfeatureList,i=t.detail.value,n=0,a=e.length;n<a;++n){var o=e[n];i.includes(o.id)?this.$set(o,"checked",!0):this.$set(o,"checked",!1)}},cancel:function(){this.isCheckBox=!1,this.showTab=!0},trigger:function(t){0==this.currentTabIndex?uni.navigateTo({url:"/pages/feature/recommendFood?isRelease=1"}):1==this.currentTabIndex&&(1==this.type?1==this.cindex&&(this.isCheckBox=!0,this.showTab=!1):2==this.type&&uni.navigateTo({url:"/pages/feature/recommendFood"}))},getMySubmitFeatureFood:function(){var t=this,e={method:o.getMySubmitFeatureFood,data:{creator:this.userId,pageNum:this.page2,pageSize:this.pageSize2}};(0,a.callbackRequest)(e).then((function(e){1==e.data.returnCode&&(e=e.data,1==t.page2?(t.myfeatureList=e.returnData||[],console.log(t.myfeatureList)):e.returnData.length>0?(t.myfeatureList=t.myfeatureList.concat(e.returnData),t.loadingType2=0):t.loadingType2=2)}))},getPublicFeatureFood:function(){var t=this,e={method:o.getPublicFeatureFood,data:{creator:this.userId,pageNum:this.page1,pageSize:this.pageSize1}};(0,a.callbackRequest)(e).then((function(e){1==e.data.returnCode&&(e=e.data,1==t.page1?t.publicfeatureList=e.returnData||[]:e.returnData.length>0?(t.publicfeatureList=t.publicfeatureList.concat(e.returnData),t.loadingType1=0):t.loadingType1=2)}))},getReleasefeatureList:function(){var t=this,e={method:o.getReleasefea
|