From b269acbe9c817756630aeeef10c4ef0a65a22393 Mon Sep 17 00:00:00 2001
From: ZhaoTongYao <531131322@qq.com>
Date: Fri, 14 May 2021 17:34:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=9B=BE=E7=89=87=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/heartNew/heartNew.js | 62 ++++++++++++++++++++++--------------
pages/heartNew/heartNew.wxml | 17 +++++++---
pages/heartNew/heartNew.wxss | 23 +++++++++++++
utils/activity.js | 8 ++++-
4 files changed, 80 insertions(+), 30 deletions(-)
diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js
index aebf89e..8be141f 100644
--- a/pages/heartNew/heartNew.js
+++ b/pages/heartNew/heartNew.js
@@ -61,6 +61,8 @@ Page({
detailId: '', // 通过分享进入 团购详情的id
scanBtn: {}, // 扫码签到改为可配置
shouye: {},
+ applyBtn: {}, // 申请发单改为可配置
+ tabLeftList: [],
},
/**
@@ -372,26 +374,33 @@ Page({
},
// 获取配置图片
getImgUrl:function (){//0:咨询热线
- let that = this
- api.getImgUrl("0").then(function (res) {
- that.setData({
- getImgUrl: res.data[0]
- })
- })
- // 2021.05.08
- api.getImgUrl("5").then(function (res) {
- that.setData({
- tabRightList: res.data
- })
- })
- // 扫码签到按钮
- api.getImgUrl("8").then(function (res) {
+ let params = {
+ imageTypes: '0, 5, 8, 9'
+ }
+ api.getImgUrlList(params).then(res => {
console.log(res.data)
- if (res.data.length > 0) {
- that.setData({
- scanBtn: res.data[0]
- })
- }
+ this.data.tabRightList = []
+ res.data.forEach( item => {
+ if (item.imgType == '0') {
+ this.setData({
+ getImgUrl: item
+ })
+ } else if (item.imgType == '5') {
+ this.data.tabRightList.push(item)
+ this.setData({
+ tabRightList: this.data.tabRightList
+ })
+ } else if (item.imgType == '8') {
+ this.setData({
+ scanBtn: item
+ })
+ } else if (item.imgType == '9') {
+ this.data.tabLeftList[0] = item
+ this.setData({
+ tabLeftList: this.data.tabLeftList
+ })
+ }
+ })
})
},
/**
@@ -525,11 +534,15 @@ Page({
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}`
- })
+ })
+ } else if (e.currentTarget.dataset.code == 'volunteer_sqfd') {
+ this.myApply()
+ } else if (e.currentTarget.dataset.code == 'shouye') {
+ this.toShouye()
}
},
//选择志愿者标签筛选
@@ -772,10 +785,11 @@ Page({
api.moduleCategory(params).then(res => {
console.log('获取模块列表',res.data)
res.data.forEach( item => {
- if (item.categoryCode == 'shouye') {
- this.data.shouye = { ...item }
+ if (item.categoryCode == 'shouye') {
+ this.data.tabLeftList[1] = item
this.setData({
- shouye: this.data.shouye
+ shouye: item,
+ tabLeftList: this.data.tabLeftList
})
}
})
diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml
index de8739b..597b1de 100644
--- a/pages/heartNew/heartNew.wxml
+++ b/pages/heartNew/heartNew.wxml
@@ -54,6 +54,12 @@
+
+
+
+
+
+
@@ -111,15 +117,16 @@
-
+ img-url="{{applyBtn.imgUrl}}"
+ bindmovebtnCallBack="myApply"> -->
-
+ bindmovebtnCallBack="toShouye"> -->
\ No newline at end of file
diff --git a/pages/heartNew/heartNew.wxss b/pages/heartNew/heartNew.wxss
index 98fa0fb..cd0fbc1 100644
--- a/pages/heartNew/heartNew.wxss
+++ b/pages/heartNew/heartNew.wxss
@@ -290,6 +290,29 @@ button:last-child {
/* banner end */
+/* 拼团购/顺道捎 左侧按钮 */
+.tab-left {
+ position: fixed;
+ left: 0;
+ z-index: 997;
+ margin-top: 36rpx;
+ display: flex;
+ flex-direction: column;
+}
+.tab-left image {
+ width: 200rpx;
+ height: 88rpx;
+}
+.tab-left .tab {
+ position: relative;
+}
+.tab-left .tab .tab-text {
+ position: absolute;
+ left: 40rpx;
+ top: 26rpx;
+ color: white;
+ font-size: 34rpx;
+}
/* 拼团购/顺道捎 右侧按钮 */
.tab-right {
position: fixed;
diff --git a/utils/activity.js b/utils/activity.js
index 9789f9f..369eebe 100644
--- a/utils/activity.js
+++ b/utils/activity.js
@@ -12,7 +12,8 @@ module.exports = {
getTokenV2,
getVolunteerVerify,
getResidentConfig,
- moduleCategory
+ moduleCategory,
+ getImgUrlList
}
function getActivityList (params) {
@@ -81,4 +82,9 @@ function getResidentConfig () {
// 一键服务/解码锦水 改版模块类别接口 20210428
function moduleCategory(params) {
return fly.get('news/module/moduleCategory', params)
+}
+
+// 获取图片配置列表 优化
+function getImgUrlList (params) {
+ return fly.get('imgConfig/getImgUrlList', params)
}
\ No newline at end of file