Browse Source

优化

master
zhaoyongnian 5 years ago
parent
commit
015d11ba5a
  1. 6
      subpages/associationNew/pages/eventlist/eventlist.js
  2. 2
      subpages/understandJs/pages/impression/impression.wxss
  3. 6
      subpages/understandJs/pages/index/index.js
  4. 27
      subpages/understandJs/pages/noticeDetail/noticeDetail.js
  5. 3
      subpages/understandJs/pages/noticeDetail/noticeDetail.wxss

6
subpages/associationNew/pages/eventlist/eventlist.js

@ -172,6 +172,9 @@ Page({
//点赞 //点赞
clicklike(e) { clicklike(e) {
if (this.verifyCompleteInfo()) {
return false
}
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
// <!-- 用户是否已点赞 0否;1是 --> // <!-- 用户是否已点赞 0否;1是 -->
if (this.data.bannedFlag == '1') {//被禁言 if (this.data.bannedFlag == '1') {//被禁言
@ -208,6 +211,9 @@ Page({
}, },
// Textarea获取焦点 // Textarea获取焦点
clickTextarea(e) { clickTextarea(e) {
if (this.verifyCompleteInfo()) {
return false
}
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
if (this.data.bannedFlag == '1') {//被禁言 if (this.data.bannedFlag == '1') {//被禁言
wx.showToast({ wx.showToast({

2
subpages/understandJs/pages/impression/impression.wxss

@ -32,7 +32,7 @@ page {
margin-top: 15rpx; margin-top: 15rpx;
/* width: calc(100% - 56rpx); */ /* width: calc(100% - 56rpx); */
height: 75rpx; /* height: 75rpx; */
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;

6
subpages/understandJs/pages/index/index.js

@ -72,13 +72,13 @@ Page({
}, },
goDetails(e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案) goDetails(e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案)
console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode)
if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_warning') {//印象 //警事 if (e.currentTarget.dataset.modulecode == 'notice_warning') { //警事
wx.navigateTo({ wx.navigateTo({
url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}` url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}`
}) })
} else if (e.currentTarget.dataset.modulecode == 'notice_taste') {//味道 } else if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道
wx.navigateTo({ wx.navigateTo({
url: `../delicious/delicious?modulecode=${e.currentTarget.dataset.modulecode}` url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}`
}) })
} else if (e.currentTarget.dataset.modulecode == 'module_hardcore') {//硬核 } else if (e.currentTarget.dataset.modulecode == 'module_hardcore') {//硬核
wx.navigateTo({ wx.navigateTo({

27
subpages/understandJs/pages/noticeDetail/noticeDetail.js

@ -8,28 +8,51 @@ Page({
*/ */
data: { data: {
noticeObj: {}, noticeObj: {},
noticeObjContent: '' noticeObjContent: '',
pageIndex:1,
pageSize:10,
noticeCategory:''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({
noticeCategory:options.modulecode
})
if (options.modulecode == 'notice_taste'){//味道 if (options.modulecode == 'notice_taste'){//味道
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '锦水味道' title: '锦水味道'
}) })
this.noticelist()
} else if(options.modulecode == 'notice_impression'){ } else if(options.modulecode == 'notice_impression'){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '锦水印象' title: '锦水印象'
}) })
this.noticelist()
} else if(options.modulecode == 'notice_warning'){ } else if(options.modulecode == 'notice_warning'){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '锦水警事' title: '锦水警事'
}) })
}
this.browseNotice(options.id) this.browseNotice(options.id)
this.noticeDetail(options.id) this.noticeDetail(options.id)
}
},
noticelist() {
let that = this;
let params = {
pageIndex: that.data.pageIndex,
pageSize: that.data.pageSize,
noticeCategory: that.data.noticeCategory
}
api.noticelist(params).then(function (res) { //了解锦水-模块管理接口
that.browseNotice(res.data[0].id)
that.noticeDetail(res.data[0].id)
}).catch(err => {
console.log(err)
})
}, },
noticeDetail(noticeId){ noticeDetail(noticeId){
let that = this; let that = this;

3
subpages/understandJs/pages/noticeDetail/noticeDetail.wxss

@ -1,3 +1,6 @@
page{
background: #f7f7f7;
}
.notice-detail { .notice-detail {
width: 100%; width: 100%;
height: 100%; height: 100%;

Loading…
Cancel
Save