|
|
@ -43,23 +43,18 @@ Page({ |
|
|
|
if (options.bannerflag == '1') { |
|
|
|
this.getBannerList(options.categorycode) |
|
|
|
} |
|
|
|
if (this.data.moduleInfo.modulestyle == '1' || this.data.moduleInfo.modulestyle == '3' || this.data.moduleInfo.modulestyle == '5' || this.data.moduleInfo.modulestyle == '6') { |
|
|
|
if (this.getModuleStyleType() == 'notice_list') { |
|
|
|
this.setData({ |
|
|
|
isLoadMore: true |
|
|
|
}) |
|
|
|
this.getNoticelist() |
|
|
|
} else if (options.modulestyle == '2') { |
|
|
|
} else if (this.getModuleStyleType() == 'module_list') { |
|
|
|
this.getModuleCategory() |
|
|
|
} else if (options.modulestyle == '4') { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `../noticeDetail/noticeDetail?pid=${this.data.moduleInfo.pid}&bannerflag=${this.data.moduleInfo.bannerflag}&categorycode=${this.data.moduleInfo.categorycode}&modulestyle=${this.data.moduleInfo.modulestyle}&categoryname=${this.data.moduleInfo.categoryname}` |
|
|
|
}) |
|
|
|
} else if (options.modulestyle == '7') { |
|
|
|
this.setData({ |
|
|
|
isLoadMore: true |
|
|
|
}) |
|
|
|
this.getNoticelist() |
|
|
|
} else if (options.modulestyle == '8') { |
|
|
|
}else if (this.getModuleStyleType() == 'notice_list_2') { |
|
|
|
this.getModuleCategoryList().then(() => { |
|
|
|
this.getNoticelist(this.data.newsCategoryList[0].value) |
|
|
|
}) |
|
|
@ -86,18 +81,27 @@ Page({ |
|
|
|
pageSize: this.data.pageSize, |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.data.moduleInfo.modulestyle == '1' || this.data.moduleInfo.modulestyle == '3' || this.data.moduleInfo.modulestyle == '5' || this.data.moduleInfo.modulestyle == '6') { |
|
|
|
if (this.getModuleStyleType() == 'notice_list') { |
|
|
|
this.getNoticelist() |
|
|
|
} else if (this.data.moduleInfo.modulestyle == '2') { |
|
|
|
} else if (this.getModuleStyleType() == 'module_list') { |
|
|
|
this.getModuleCategory() |
|
|
|
} else if (this.data.moduleInfo.modulestyle == '7') { |
|
|
|
this.getNoticelist() |
|
|
|
} else if (this.data.moduleInfo.modulestyle == '8') { |
|
|
|
}else if (this.getModuleStyleType() == 'notice_list_2') { |
|
|
|
this.getNoticelist(this.data.newsCategoryList[0].value) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//modulestyle 调用模式
|
|
|
|
getModuleStyleType () { |
|
|
|
let moduleStyle = this.data.moduleInfo.modulestyle |
|
|
|
if (moduleStyle == '1' || moduleStyle == '3' || moduleStyle == '5' || moduleStyle == '6' || moduleStyle == '7' || moduleStyle == '9') { |
|
|
|
return 'notice_list' |
|
|
|
} else if (moduleStyle == '2') { |
|
|
|
return 'module_list' |
|
|
|
} else if (moduleStyle == '8') { |
|
|
|
return 'notice_list_2' |
|
|
|
} |
|
|
|
return 'notice_list' |
|
|
|
}, |
|
|
|
//获取模块列表
|
|
|
|
getModuleCategory() { |
|
|
|
let params = { |
|
|
@ -282,9 +286,17 @@ Page({ |
|
|
|
*/ |
|
|
|
navigateToType (e) { |
|
|
|
const info = e.currentTarget.dataset.info |
|
|
|
wx.navigateTo({ |
|
|
|
url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}` |
|
|
|
}) |
|
|
|
if (info.moduleStyle) { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}` |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
|
title: '样式不能为空', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//notice 跳转详情页面
|
|
|
@ -323,6 +335,26 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//type-9 拨打电话
|
|
|
|
mobile(e) { |
|
|
|
wx.showModal({ |
|
|
|
title: '拨打电话', |
|
|
|
content: `您确定拨打${e.currentTarget.dataset.mobile}`, |
|
|
|
cancelColor: '#29B9A5', |
|
|
|
confirmColor: '#29B9A5', |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
console.log('用户点击确定') |
|
|
|
wx.makePhoneCall({ |
|
|
|
phoneNumber: e.currentTarget.dataset.mobile |
|
|
|
}) |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 检查 是否完善信息
|
|
|
|
verifyCompleteInfo () { |
|
|
|
if (app.globalData.infoCompleted == 0) { |
|
|
|