Browse Source

模块列表增加样式9;

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
8b0f5636c9
  1. 6
      subpages/oneKeyService/pages/moduleList/components/newsList/newsList.wxss
  2. 66
      subpages/oneKeyService/pages/moduleList/moduleList.js
  3. 11
      subpages/oneKeyService/pages/moduleList/moduleList.wxml
  4. 51
      subpages/oneKeyService/pages/moduleList/moduleList.wxss

6
subpages/oneKeyService/pages/moduleList/components/newsList/newsList.wxss

@ -1,15 +1,17 @@
.news-module {
width: 100%;
background: #fff;
background: #f7f7f7;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 20rpx;
}
.classify-tab {
width: 100%;
height: 90rpx;
border-bottom: 1rpx solid #eaeaea;
background-color: #fff;
padding: 0rpx 20rpx;
box-sizing: border-box;
}
::-webkit-scrollbar{
width: 0;

66
subpages/oneKeyService/pages/moduleList/moduleList.js

@ -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) {

11
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -104,6 +104,17 @@
<view style="height:40rpx" wx:if="{{swiperBannerList.length > 0}}"></view>
<news-list newsCategoryList="{{newsCategoryList}}" newsList="{{noticelist}}" preloadVisible="{{preloadVisible}}" bind:newsCategoryCallback="newsCategoryCallback"></news-list>
</view>
<!-- 9. 地址、拨打电话 -->
<view class="type-9" wx:if="{{noticelist.length > 0 && moduleInfo.modulestyle == '9'}}">
<view class="list-item" hover-class="none" hover-stop-propagation="false" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{noticelist}}">
<view class="bottom" hover-class="none" hover-stop-propagation="false">
<view class="name">举报电话:{{item.mobile}}</view>
<image bindtap="mobile" data-mobile="{{item.mobile}}" class="" src="../../images/phone.png" />
</view>
<view class="line"></view>
<view class="top-box" hover-class="none" hover-stop-propagation="false"><view class="top">{{item.noticeTitle}}</view></view>
</view>
</view>
</view>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more>

51
subpages/oneKeyService/pages/moduleList/moduleList.wxss

@ -498,3 +498,54 @@ swiper {
.type-7 .video-list .video-line:last-child {
display: none;
}
.type-9 .list-item {
margin-top: 16rpx;
background: #fff;
width: 100%;
padding: 0 30rpx 4rpx;
box-sizing: border-box;
}
.type-9 .list-item .top-box {
width: 100%;
height: 106rpx;
display: flex;
align-items: center;
}
.type-9 .list-item .top {
width: 100%;
font-size: 34rpx;
color: rgba(51, 51, 51, 1);
overflow: hidden;
text-overflow: ellipsis;
word-wrap:break-word;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.type-9 .list-item .line {
height: 1px;
background-color: #f7f7f7;
width: 100%;
}
.type-9 .list-item .bottom {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.type-9 .list-item .bottom .name {
height: 106rpx;
line-height: 106rpx;
font-size: 34rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
}
.type-9 .list-item .bottom image {
width: 156rpx;
height: 56rpx;
}

Loading…
Cancel
Save