Browse Source

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

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

57
pages/indexNew/indexNew.js

@ -81,8 +81,9 @@ Page({
signMsg: '',
signCode: 0,
isSignUp: 0,
yjfwPID: '', //一键服务pid
jmjsPID: '', //解码锦水pid
yjfw: {},
jmjs: {},
sxjs: {},
},
onShow: function () {
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) {
@ -99,6 +100,7 @@ Page({
newsList: []
})
this.getNewsList()
this.getModuleList()
}
}
},
@ -186,14 +188,6 @@ Page({
that.setData({
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 () {
this.setData({
loadMoreVisible: true
@ -427,6 +451,7 @@ Page({
that.getNewsList()
that.getIssueList()
that.getProjectList()
that.getModuleList()
}
}
})
@ -454,10 +479,16 @@ Page({
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
toOneKeyService () {
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 (){
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 = {
pageIndex: page,
pageSize: 10,
pid: this.data.yjfwPID
pid: this.data.yjfw.id
}
let op = {}
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">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/1E/rBAB718PtdqAInZyAACHmGFtc9E917.png'></image>
</button>
<view class="grid-new-text">一键服务</view>
<view class="grid-new-text">{{yjfw.categoryName}}</view>
</view>
<view class="grid-new-item">
<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>
</button>
<view class="grid-new-text">解码锦水</view>
<view class="grid-new-text">{{jmjs.categoryName}}</view>
</view>
<view class="grid-new-item">
<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>
</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>
<!-- 签到后提醒 -->

34
pages/indexNew/indexNew.wxss

@ -663,3 +663,37 @@ page {
font-size: 36rpx;
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- */

10
subpages/oneKeyService/pages/moduleList/moduleList.js

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

12
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -39,20 +39,22 @@
</view>
<!-- 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-item" bindtap="navigateToType" data-info="{{item}}" wx:if="{{item.categoryType == 'module_category_type_module'}}">
<view class="list-name">
<image src="{{item.imgUrl}}" class="list-icon" />
{{item.categoryName}}
</view>
<image src="../../images/right.png" class="list-arrow"></image>
</view>
<!-- <movable-area class="movable-area" wx:if="{{moduleInfo.categorycode == 'notice_jsqf'}}">
<movable-area class="movable-area" wx:elif="{{item.categoryType == 'module_category_type_button'}}">
<movable-view class="movable-view" direction="all" inertia="true" friction="10">
<view class="report-issue" bindtap="toReportIssue">
<image src="../../images/reportissue.png" />
<view class="report-issue" bindtap="toReportIssue" data-code="{{item.categoryCode}}">
<image src="{{item.imgUrl?item.imgUrl:'../../images/reportissue.png'}}" />
</view>
</movable-view>
</movable-area> -->
</movable-area>
</block>
</view>
<!-- 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() {
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://192.168.43.19:9094/epdc-api/api/'
}

Loading…
Cancel
Save