Browse Source

增加书香锦水模块;我要举报按钮改为可配置;

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
ec8ce023ee
  1. 57
      pages/indexNew/indexNew.js
  2. 12
      pages/indexNew/indexNew.wxml
  3. 36
      pages/indexNew/indexNew.wxss
  4. 16
      subpages/oneKeyService/pages/moduleList/moduleList.js
  5. 30
      subpages/oneKeyService/pages/moduleList/moduleList.wxml
  6. 4
      utils/config.js

57
pages/indexNew/indexNew.js

@ -81,8 +81,9 @@ Page({
signMsg: '', signMsg: '',
signCode: 0, signCode: 0,
isSignUp: 0, isSignUp: 0,
yjfwPID: '', //一键服务pid yjfw: {},
jmjsPID: '', //解码锦水pid jmjs: {},
sxjs: {},
}, },
onShow: function () { onShow: function () {
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) {
@ -99,6 +100,7 @@ Page({
newsList: [] newsList: []
}) })
this.getNewsList() this.getNewsList()
this.getModuleList()
} }
} }
}, },
@ -186,14 +188,6 @@ Page({
that.setData({ that.setData({
zyzqnGridId:item.residentValue zyzqnGridId:item.residentValue
}) })
} else if (item.residentType === 'module_category' && item.residentCode === 'module_category_yjfw') {
that.setData({
yjfwPID:item.residentValue
})
} else if (item.residentType === 'module_category' && item.residentCode === 'module_category_jmjs') {
that.setData({
jmjsPID:item.residentValue
})
} }
}) })
} }
@ -278,6 +272,36 @@ Page({
}) })
}) })
}, },
getModuleList: function () {
let params = {
pageIndex: 1,
pageSize: 10,
pid: '0'
}
api.moduleCategory(params).then(res => {
console.log('获取模块列表',res.data)
res.data.forEach( item => {
if (item.categoryCode == 'sxjs') {
this.data.sxjs = { ...item }
this.setData({
sxjs: this.data.sxjs
})
} else if (item.categoryCode == 'jmjs') {
this.data.jmjs = { ...item }
this.setData({
jmjs: this.data.jmjs
})
} else if (item.categoryCode == 'yjfw') {
this.data.yjfw = { ...item }
this.setData({
yjfw: this.data.yjfw
})
}
})
}).catch(err => {
console.log(err)
})
},
onReachBottom () { onReachBottom () {
this.setData({ this.setData({
loadMoreVisible: true loadMoreVisible: true
@ -427,6 +451,7 @@ Page({
that.getNewsList() that.getNewsList()
that.getIssueList() that.getIssueList()
that.getProjectList() that.getProjectList()
that.getModuleList()
} }
} }
}) })
@ -454,10 +479,16 @@ Page({
currentIndex: e.detail.current currentIndex: e.detail.current
}) })
}, },
//跳转到 书香锦水 页面
toSxjs () {
wx.navigateTo({
url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.sxjs.id}&bannerflag=${this.data.sxjs.bannerFlag}&categorycode=${this.data.sxjs.categoryCode}&modulestyle=${this.data.sxjs.moduleStyle}&categoryname=${this.data.sxjs.categoryName}`
})
},
//跳转到 一键服务页面(新) 2020.07.15 //跳转到 一键服务页面(新) 2020.07.15
toOneKeyService () { toOneKeyService () {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.yjfwPID}&title=一键服务` url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.yjfw.id}&title=一键服务`
}) })
}, },
// 点击-更多,跳转通知列表 // 点击-更多,跳转通知列表
@ -477,7 +508,7 @@ Page({
//了解锦水 //了解锦水
toUnderstandJs (){ toUnderstandJs (){
wx.navigateTo({ wx.navigateTo({
url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.jmjsPID}&title=解码锦水` url: `/subpages/oneKeyService/pages/index/index?pid=${this.data.jmjs.id}&title=解码锦水`
}) })
}, },
@ -739,7 +770,7 @@ Page({
let params = { let params = {
pageIndex: page, pageIndex: page,
pageSize: 10, pageSize: 10,
pid: this.data.yjfwPID pid: this.data.yjfw.id
} }
let op = {} let op = {}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

12
pages/indexNew/indexNew.wxml

@ -137,13 +137,13 @@
<button bindtap="toOneKeyService" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn"> <button bindtap="toOneKeyService" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/1E/rBAB718PtdqAInZyAACHmGFtc9E917.png'></image> <image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/1E/rBAB718PtdqAInZyAACHmGFtc9E917.png'></image>
</button> </button>
<view class="grid-new-text">一键服务</view> <view class="grid-new-text">{{yjfw.categoryName}}</view>
</view> </view>
<view class="grid-new-item"> <view class="grid-new-item">
<button bindtap="toUnderstandJs" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn"> <button bindtap="toUnderstandJs" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7161CkmAQ8ljAACCxDg25qk058.png'></image> <image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7161CkmAQ8ljAACCxDg25qk058.png'></image>
</button> </button>
<view class="grid-new-text">解码锦水</view> <view class="grid-new-text">{{jmjs.categoryName}}</view>
</view> </view>
<view class="grid-new-item"> <view class="grid-new-item">
<button bindtap="toMine" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn"> <button bindtap="toMine" class="grid-new-btn" form-type='submit' plain='true' hover-class="hover-btn">
@ -174,6 +174,14 @@
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
</view> </view>
<movable-area class="movable-area" wx:if="{{sxjs.id}}">
<movable-view class="movable-view" direction="all" inertia="true" friction="10">
<view class="report-issue" bindtap="toSxjs">
<image src="{{sxjs.imgUrl}}" />
</view>
</movable-view>
</movable-area>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<!-- 签到后提醒 --> <!-- 签到后提醒 -->

36
pages/indexNew/indexNew.wxss

@ -662,4 +662,38 @@ page {
text-align: center; text-align: center;
font-size: 36rpx; font-size: 36rpx;
color: #04BCA0; color: #04BCA0;
} }
/* 悬浮按钮 -start- */
.movable-area{
pointer-events:none;
z-index: 999;
width: 100%;
height: 90%;
position: fixed;
top: 60px;
left: 0;
right: 0;
bottom: 0;
}
.movable-view{
pointer-events:auto;
width: 178rpx;
height: 178rpx;
transform: translateX(560rpx) translateY(680rpx) translateZ(0rpx) scale(1);
transform-origin: center center;
will-change: auto;
position: absolute;
top: 1100rpx;
left: 560rpx;
}
.report-issue {
width: 178rpx;
height: 178rpx;
}
.report-issue image {
width: 100%;
height: 100%;
object-fit: cover;
}
/* 悬浮按钮 -end- */

16
subpages/oneKeyService/pages/moduleList/moduleList.js

@ -292,7 +292,7 @@ Page({
}) })
} else { } else {
wx.showToast({ wx.showToast({
title: '样式不能为空', title: '该模块未选择展示形式',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
@ -330,9 +330,17 @@ Page({
if (this.verifyCompleteInfo()) { if (this.verifyCompleteInfo()) {
return false return false
} }
wx.navigateTo({ if (e.currentTarget.dataset.code == 'notice_jsqf_wyjb') {
url: "/subpages/oneKeyService/pages/reportIssue/reportIssue" wx.navigateTo({
}) url: "/subpages/oneKeyService/pages/reportIssue/reportIssue"
})
} else {
wx.showToast({
title: '暂未开放',
icon: 'none',
duration: 2000
})
}
}, },
//type-9 拨打电话 //type-9 拨打电话

30
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -39,20 +39,22 @@
</view> </view>
<!-- 2. 图标、模块类别名称 --> <!-- 2. 图标、模块类别名称 -->
<view class="type-2" wx:if="{{modulelist.length > 0 && moduleInfo.modulestyle == '2'}}"> <view class="type-2" wx:if="{{modulelist.length > 0 && moduleInfo.modulestyle == '2'}}">
<view class="list-item" wx:for="{{modulelist}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap="navigateToType" data-info="{{item}}"> <block wx:for="{{modulelist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="list-name"> <view class="list-item" bindtap="navigateToType" data-info="{{item}}" wx:if="{{item.categoryType == 'module_category_type_module'}}">
<image src="{{item.imgUrl}}" class="list-icon" /> <view class="list-name">
{{item.categoryName}} <image src="{{item.imgUrl}}" class="list-icon" />
</view> {{item.categoryName}}
<image src="../../images/right.png" class="list-arrow"></image> </view>
</view> <image src="../../images/right.png" class="list-arrow"></image>
<!-- <movable-area class="movable-area" wx:if="{{moduleInfo.categorycode == 'notice_jsqf'}}"> </view>
<movable-view class="movable-view" direction="all" inertia="true" friction="10"> <movable-area class="movable-area" wx:elif="{{item.categoryType == 'module_category_type_button'}}">
<view class="report-issue" bindtap="toReportIssue"> <movable-view class="movable-view" direction="all" inertia="true" friction="10">
<image src="../../images/reportissue.png" /> <view class="report-issue" bindtap="toReportIssue" data-code="{{item.categoryCode}}">
</view> <image src="{{item.imgUrl?item.imgUrl:'../../images/reportissue.png'}}" />
</movable-view> </view>
</movable-area> --> </movable-view>
</movable-area>
</block>
</view> </view>
<!-- 3. 标题、内容 --> <!-- 3. 标题、内容 -->
<view class="type-3" wx:if="{{noticelist.length > 0 && moduleInfo.modulestyle == '3'}}"> <view class="type-3" wx:if="{{noticelist.length > 0 && moduleInfo.modulestyle == '3'}}">

4
utils/config.js

@ -6,8 +6,8 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://192.168.43.19:9094/epdc-api/api/' // return 'http://192.168.43.19:9094/epdc-api/api/'
} }

Loading…
Cancel
Save