1 line
32 KiB
JavaScript
1 line
32 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-feature-feature"],{"1e3a":function(t,e,a){"use strict";(function(t){a("6a54");var i=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("4626"),a("5ac7"),a("c223");var n=a("8251"),o=a("779a"),r=i(a("56cd")),s=i(a("80c8")),c=i(a("e367")),d={data:function(){return{vbPicture:n.vbPicture,formatImgUrl:n.formatImgUrl,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,n.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:s.default,uniFab:c.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,a=t.detail.value,i=0,n=e.length;i<n;++i){var o=e[i];a.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 e=this,a={method:o.getMySubmitFeatureFood,data:{creator:this.userId,pageNum:this.page2,pageSize:this.pageSize2}};(0,n.callbackRequest)(a).then((function(a){1==a.data.returnCode&&(a=a.data,1==e.page2?(e.myfeatureList=a.returnData||[],t.log(e.myfeatureList)):a.returnData.length>0?(e.myfeatureList=e.myfeatureList.concat(a.returnData),e.loadingType2=0):e.loadingType2=2)}))},getPublicFeatureFood:function(){var t=this,e={method:o.getPublicFeatureFood,data:{creator:this.userId,pageNum:this.page1,pageSize:this.pageSize1}};(0,n.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.getReleasefeatureList,data:{creator:this.userId,pageNum:this.page0,pageSize:this.pageSize0}};(0,n.callbackRequest)(e).then((function(e){1==e.data.returnCode&&(e=e.data,1==t.page0?t.releasefeatureList=e.returnData||[]:e.returnData.length>0?(t.releasefeatureList=t.releasefeatureList.concat(e.returnData),t.loadingType0=0):t.loadingType0=2)}))},vote:function(t,e){var a=this,i={method:o.recommendFoodVoteNew,data:{voteUser:thi
|