[新增]新增自定义tabbar组件

This commit is contained in:
唐明明
2020-12-30 10:16:26 +08:00
36 changed files with 2582 additions and 393 deletions

View File

@@ -34,7 +34,7 @@ Component({
*/
actives(){
if(this.data.has_more){
wx.$api.companyModule.actives('company',this.data.company_id,this.data.page).then(res=>{
wx.$api.companyModule.actives('company',wx.getStorageSync('company_id'),this.data.page).then(res=>{
console.log(res)
if(res.page.has_more){
this.setData({

View File

@@ -11,10 +11,10 @@ Component({
* 组件的初始数据
*/
data: {
lists:[],//列表
company_id:wx.getStorageSync('company_id'),
page:1,
has_more:true,
lists: [], //列表
company_id: wx.getStorageSync('company_id'),
page: 1,
has_more: true,
},
/**
@@ -24,34 +24,34 @@ Component({
/**
* 跳转到详情
*/
toUrl(e){
toUrl(e) {
wx.navigateTo({
url: '/pages/home/noticeDetail/noticeDetail?id='+e.currentTarget.dataset.id,
url: '/pages/home/noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id,
})
},
/**
* 企业活动列表
*/
actives(){
if(this.data.has_more){
wx.$api.companyModule.dynamics(this.data.company_id,this.data.page).then(res=>{
actives() {
if (this.data.has_more) {
wx.$api.companyModule.dynamics(wx.getStorageSync('company_id'), this.data.page).then(res => {
console.log(res)
if(res.page.has_more){
var lists = this.data.lists.concat(res.data);
if (res.page.has_more) {
this.setData({
has_more:true,
page:this.data.page+1,
})
}else{
this.setData({
has_more:false
})
}
var lists=this.data.lists.concat(res.data);
this.setData({
lists:lists
has_more: true,
page: this.data.page + 1,
})
} else {
this.setData({
has_more: false
})
}
this.setData({
lists: lists
})
}
})
}
}
}
})
})

View File

@@ -52,7 +52,7 @@ Component({
* 请求项目筹集分类接口
*/
crowdfundcategory(company_id){
wx.$api.companyModule.crowdfundcategory(company_id).then(res=>{
wx.$api.companyModule.crowdfundcategory(wx.getStorageSync('company_id')).then(res=>{
console.log(res)
this.setData({
categoryList:res,
@@ -67,7 +67,7 @@ Component({
*/
crowdfunds(){
if(this.data.has_more){
wx.$api.companyModule.crowdfunds(this.data.company_id,this.data.category_id,this.data.page).then(res=>{
wx.$api.companyModule.crowdfunds(wx.getStorageSync('company_id'),this.data.category_id,this.data.page).then(res=>{
console.log(res)
if(res.page.has_more){
this.setData({