Browse Source

版本 1.6.40 增加样式10并配置详情样式;

release
ZhaoTongYao 4 years ago
parent
commit
82758597d8
  1. 4
      pages/heartNew/heartNew.js
  2. 3
      pages/heartNew/heartNew.wxss
  3. 2
      pages/toRegister/toRegister.js
  4. 8
      subpages/oneKeyService/pages/moduleList/moduleList.js
  5. 15
      subpages/oneKeyService/pages/moduleList/moduleList.wxml
  6. 2
      subpages/oneKeyService/pages/noticeDetail/components/detailRemark/detailRemark.wxml
  7. 21
      subpages/oneKeyService/pages/noticeDetail/noticeDetail.js
  8. 10
      subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml

4
pages/heartNew/heartNew.js

@ -661,11 +661,11 @@ Page({
//如果是 详情样式,直接跳转详情页面
if (this.data.shouye.moduleStyle == '4') {
wx.navigateTo({
url: `/subpages/oneKeyService/pages/noticeDetail/noticeDetail?pid=${this.data.shouye.pid}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}`
url: `/subpages/oneKeyService/pages/noticeDetail/noticeDetail?pid=${this.data.shouye.pid}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}&detailstyle=${this.data.shouye.detailStyle}`
})
} else {
wx.navigateTo({
url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.shouye.id}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}`
url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.shouye.id}&bannerflag=${this.data.shouye.bannerFlag}&categorycode=${this.data.shouye.categoryCode}&modulestyle=${this.data.shouye.moduleStyle}&categoryname=${this.data.shouye.categoryName}&detailstyle=${this.data.shouye.detailStyle}`
})
}
},

3
pages/heartNew/heartNew.wxss

@ -361,7 +361,8 @@ button:last-child {
.tab-bar .tab {
font-size: 34rpx;
font-weight: 500;
color: rgba(171, 171, 171, 1);
/* color: rgba(171, 171, 171, 1); */
color: rgba(0, 0, 0, 1);
width: 25%;
height: 100%;
line-height: 92rpx;

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
const versionNum = "1.6.38"
const versionNum = "1.6.40"
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag

8
subpages/oneKeyService/pages/moduleList/moduleList.js

@ -95,7 +95,7 @@ Page({
//modulestyle 调用模式
getModuleStyleType () {
let moduleStyle = this.data.moduleInfo.modulestyle
if (moduleStyle == '1' || moduleStyle == '3' || moduleStyle == '5' || moduleStyle == '6' || moduleStyle == '7' || moduleStyle == '9') {
if (moduleStyle == '1' || moduleStyle == '3' || moduleStyle == '5' || moduleStyle == '6' || moduleStyle == '7' || moduleStyle == '9' || moduleStyle == '10') {
return 'notice_list'
} else if (moduleStyle == '2') {
return 'module_list'
@ -299,12 +299,12 @@ Page({
const info = e.currentTarget.dataset.info
if (info.moduleStyle == '4') {
wx.navigateTo({
url: `../noticeDetail/noticeDetail?pid=${info.pid}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}`
url: `../noticeDetail/noticeDetail?pid=${info.pid}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}&detailstyle=${info.detailStyle}`
})
}
else {
wx.navigateTo({
url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}`
url: `./moduleList?pid=${info.id}&bannerflag=${info.bannerFlag}&categorycode=${info.categoryCode}&modulestyle=${info.moduleStyle}&categoryname=${info.categoryName}&commentFlag=${info.commentFlag}&detailstyle=${info.detailStyle}`
})
}
},
@ -313,7 +313,7 @@ Page({
toDetail(e){
const info = e.currentTarget.dataset
wx.navigateTo({
url: `../noticeDetail/noticeDetail?id=${info.id}&title=${this.data.moduleInfo.categoryname}&commentFlag=${this.data.moduleInfo.commentFlag}`
url: `../noticeDetail/noticeDetail?id=${info.id}&title=${this.data.moduleInfo.categoryname}&commentFlag=${this.data.moduleInfo.commentFlag}&detailstyle=${this.data.moduleInfo.detailstyle}`
})
},

15
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -119,6 +119,21 @@
<view class="top-box" hover-class="none" hover-stop-propagation="false"><view class="top">{{item.noticeTitle}}</view></view>
</view>
</view>
<!-- 10. 图片、标题、时间 -->
<view class="type-5" wx:if="{{noticelist.length > 0 && moduleInfo.modulestyle == '10'}}">
<view class="list-all">
<view class="list-item" wx:for="{{noticelist}}" data-id="{{item.id}}" bindtap="toDetail" wx:for-index="index" wx:for-item="item" wx:key="index">
<image src="{{item.imgUrl}}"></image>
<view class="item-info">
<view class="item-info-name">{{item.noticeTitle}}</view>
<view class="item-info-time">
<text></text>
<text>{{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more>

2
subpages/oneKeyService/pages/noticeDetail/components/detailRemark/detailRemark.wxml

@ -23,7 +23,7 @@
<view
class="remark-list-item"
wx:for="{{remarkObj.commentsList}}"
wx:key="{{index}}"
wx:key="index"
wx:for-index="index"
wx:for-item="item">
<view class="user-info">

21
subpages/oneKeyService/pages/noticeDetail/noticeDetail.js

@ -42,6 +42,8 @@ Page({
dialogCancelText: "",
loadMoreVisible: false, // loadMoreVisible 和 loadMoreType 控制 超出一屏时的 加载和没有更多的显示与隐藏
loadMoreType: "none",
detailStyle: [],
detailObj: {}
},
/**
@ -52,6 +54,12 @@ Page({
infoCompleted: app.globalData.infoCompleted,
commentFlag: options.commentFlag
})
if (options.detailstyle && options.detailstyle != 'undefined') {
this.setData({
detailStyle: options.detailstyle.split(',')
})
console.log(this.data.detailStyle)
}
if (options.id) {
wx.setNavigationBarTitle({
title: options.title
@ -150,7 +158,20 @@ Page({
noticeDetail (noticeId){
let that = this;
api.noticeDetail(noticeId).then(function (res) {
if (that.data.detailStyle.length > 0) {
Object.keys(res.data).forEach(item => {
let show = that.data.detailStyle.some((showItem) => {
return showItem == item
})
that.data.detailObj[item] = show
})
} else {
Object.keys(res.data).forEach(item => {
that.data.detailObj[item] = true
})
}
that.setData({
detailObj: that.data.detailObj,
noticeObj: res.data,
noticeObjContent: util.formatRichText(res.data.noticeContent),
preloadVisible: false

10
subpages/oneKeyService/pages/noticeDetail/noticeDetail.wxml

@ -29,20 +29,20 @@
</view>
</view>
<view class="selfContent" wx:if="{{!preloadVisible}}">
<view class="detail-title">{{noticeObj.noticeTitle}}</view>
<view class="detail-title" wx:if="{{detailObj.noticeTitle}}">{{noticeObj.noticeTitle}}</view>
<view class="detail-subtitle">
<view class="left">
<span>{{noticeObj.deptName}}</span>
<span>{{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}}</span>
<span wx:if="{{detailObj.deptName}}">{{noticeObj.deptName}}</span>
<span wx:if="{{detailObj.noticeTime}}">{{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}}</span>
</view>
<view class="right">
<view class="right" wx:if="{{detailObj.readingAmount}}">
<view class="readNum">
<image src="../../images/ic_yueduliang.png" />
</view>
<view class="num">{{noticeObj.readingAmount}}</view>
</view>
</view>
<view class="richContent">
<view class="richContent" wx:if="{{detailObj.noticeContent}}">
<!-- <rich-text space="nbsp" nodes="{{noticeObjContent}}"></rich-text> -->
<parser html="{{noticeObjContent}}"></parser>
</view>

Loading…
Cancel
Save