Browse Source

拼团购顺道捎入口修改;

release
ZhaoTongYao 4 years ago
parent
commit
c0a9717e29
  1. 71
      pages/heartNew/heartNew.js
  2. 13
      pages/heartNew/heartNew.wxml
  3. 4
      pages/heartNew/heartNew.wxss
  4. 4
      pages/indexNew/indexNew.wxml
  5. 2
      pages/toRegister/toRegister.js
  6. 7
      utils/activity.js
  7. 4
      utils/config.js

71
pages/heartNew/heartNew.js

@ -51,12 +51,14 @@ Page({
isLoading: false, //防止标签切换加载数据时点击切换标签
btnTop: 0,
btnLeft: 0,
shouye: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function () {
this.getModuleList()
this.bannerListV2()
this.getVolunteerTags()
this.getImgUrl()//获取配置图片
@ -371,11 +373,12 @@ Page({
})
})
// 2021.03.31 拼团购顺道捎移至首页
// api.getImgUrl("5").then(function (res) {
// that.setData({
// tabRightList: res.data
// })
// })
// 2021.04.28 拼团购顺道捎移回...
api.getImgUrl("5").then(function (res) {
that.setData({
tabRightList: res.data
})
})
},
/**
* 页面上拉触底事件的处理函数
@ -503,18 +506,18 @@ Page({
})
},
// 跳转 拼团购顺道捎 入口移至首页
// toJumpPage (e) {
// if (e.currentTarget.dataset.code == 'ptg') {
// wx.navigateTo({
// url: `/subpages/heart/pages/groupBuyList/groupBuyList?title=${e.currentTarget.dataset.title}`
// })
// } else if (e.currentTarget.dataset.code == 'sds') {
// wx.navigateTo({
// url: `/subpages/heart/pages/dropByList/dropByList?title=${e.currentTarget.dataset.title}`
// })
// }
// },
// 跳转 拼团购顺道捎 入口
toJumpPage (e) {
if (e.currentTarget.dataset.code == 'ptg') {
wx.navigateTo({
url: `/subpages/heart/pages/groupBuyList/groupBuyList?title=${e.currentTarget.dataset.title}`
})
} else if (e.currentTarget.dataset.code == 'sds') {
wx.navigateTo({
url: `/subpages/heart/pages/dropByList/dropByList?title=${e.currentTarget.dataset.title}`
})
}
},
//选择志愿者标签筛选
changeTag (e) {
if (this.data.isLoading) {
@ -587,4 +590,38 @@ 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 == 'shouye') {
this.data.shouye = { ...item }
this.setData({
shouye: this.data.shouye
})
}
})
}).catch(err => {
console.log(err)
})
},
//跳转到 页面
toShouye () {
//如果是 详情样式,直接跳转详情页面
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}`
})
} 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}`
})
}
},
})

13
pages/heartNew/heartNew.wxml

@ -53,12 +53,12 @@
</view>
</view>
</view>
<!-- <view class="tab-right">
<view class="tab-right">
<view class="tab" wx:for="{{tabRightList}}" wx:key="index" data-title="{{item.remark}}" data-code="{{item.imgCode}}" bindtap="toJumpPage">
<image src="{{item.imgUrl}}"/>
<view class="tab-text"></view>
</view>
</view> -->
</view>
<view class="tab-all">
<view class="tab-bar {{tabFixed ? 'tab-bar-fixed' : ''}}" style="margin-top: {{tabFixed ? statusHeight + navigationHeight : '278r'}}px">
<view class="tab tab0 {{selectedTab === 'tab0' ? 'select' : ''}}" data-tab="tab0" bindtap="tabBarChange">
@ -129,5 +129,14 @@
button-left="{{btnLeft}}"
img-url="../../images/home/scan.png"
bindmovebtnCallBack="scanCode"></move-btn>
<move-btn wx:if="{{shouye.id}}"
area-top="120"
area-height="90%"
button-top="1080"
button-width="240"
button-height="140"
img-url="{{shouye.imgUrl}}"
bindmovebtnCallBack="toShouye"></move-btn>
<load-more loadMoreVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}"></load-more>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></completeInfo-dialog>

4
pages/heartNew/heartNew.wxss

@ -290,7 +290,7 @@ button:last-child {
/* banner end */
/* 拼团购/顺道捎 右侧按钮
/* 拼团购/顺道捎 右侧按钮 */
.tab-right {
position: fixed;
right: 0;
@ -312,7 +312,7 @@ button:last-child {
top: 26rpx;
color: white;
font-size: 34rpx;
} */
}
.tab-all {
position: absolute;
width: 100%;

4
pages/indexNew/indexNew.wxml

@ -187,14 +187,14 @@
img-url="{{sxjs.imgUrl}}"
bindmovebtnCallBack="toSxjs"></move-btn>
<move-btn wx:if="{{shouye.id}}"
<!-- <move-btn wx:if="{{shouye.id}}"
area-top="120"
area-height="90%"
button-top="1080"
button-width="240"
button-height="140"
img-url="{{shouye.imgUrl}}"
bindmovebtnCallBack="toShouye"></move-btn>
bindmovebtnCallBack="toShouye"></move-btn> -->
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>

2
pages/toRegister/toRegister.js

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

7
utils/activity.js

@ -8,7 +8,8 @@ module.exports = {
getImgUrl,
getBannerDetail,
getVolunteerTags,
getToken
getToken,
moduleCategory
}
function getActivityList (params) {
@ -50,3 +51,7 @@ function getToken (wxCode) {
wxCode: wxCode
})
}
// 一键服务/解码锦水 改版模块类别接口 20210428
function moduleCategory(params) {
return fly.get('news/module/moduleCategory', params)
}

4
utils/config.js

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

Loading…
Cancel
Save