Commit c3f16180 by 张晓玮

Merge branch 'zhangxw_dev_3.0' into 'v3.0'

Zhangxw dev 3.0

See merge request !74
2 parents 6f67ee46 d0cedb55
......@@ -88,7 +88,7 @@ Page({
reportData({
openId: WXUSERINFO.openId || '',
unionId: USERINFO.uuid || '',
nickName: USERINFO.weChatNickName || '',
nickName: USERINFO.weChatNickName || USERINFO.name,
avatar: USERINFO.weChatAvatarUrl || '',
phone: USERINFO.weChatPhone || '',
merchantId: USERINFO.merchantId || '',
......
......@@ -198,4 +198,16 @@ page {
font-size: 32rpx;
color: #FFFFFF;
margin: 64rpx 0 64rpx 40rpx;
}
.emptyData{
width: 100%;
text-align: center;
margin-top: 60rpx;
.tip{
margin-top: 16rpx;
font-size: 28rpx;
color: #7A8299;
text-align: center;
}
}
\ No newline at end of file
<view class="container">
<block wx:if="{{list.length}}">
<image mode="widthFix" style="height: 480rpx;" src="{{IMGURL + 'apply_activity_bg_' + currentSceneCode + '.png'}}" />
<view class="pos_wrap">
<view class="wrapper">
......@@ -42,4 +43,14 @@
</view>
<view class="btn flex_cc" bind:tap="applyOpened">申请开通</view>
</view>
</block>
<block wx:else>
<view class="emptyData" style="margin-top: {{headerHeight+32}}px;">
<image src="{{IMGURL}}toLink.png" style="height: 400rpx;width: 400rpx;"></image>
<view class="tip">
<view>您的门店尚未开通业务场景,</view>
<view>请联系在线客服进行咨询,谢谢。</view>
</view>
</view>
</block>
</view>
\ No newline at end of file
......@@ -38,7 +38,7 @@ Page({
})
let id = this.options.missionId.toString().split('&')[0]
this.getActiveTaskDetail(id)
this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}&name=${userStorage.name}`
this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}&name=${userStorage.weChatNickName || userStorage.name}`
})
},
......
......@@ -120,7 +120,7 @@
}
}
.activity{
text{
.activity-type-tag{
font-size: 20rpx;
color: #4466F0;
background: rgba(255,255,255,0.32);
......@@ -128,6 +128,7 @@
padding: 0 12rpx;
border-radius: 2px;
margin-left: 8rpx;
white-space: nowrap;
}
}
}
......
......@@ -27,8 +27,8 @@
<view class="user-box">
<image webp src="{{userStorage.weChatAvatarUrl ? userStorage.weChatAvatarUrl : IMGURL + 'order_person_default.png'}}"></image>
<view class="message">
<view class="name">{{userStorage.name || ""}}<text>邀请你参加</text></view>
<view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
<view class="name">{{userStorage.weChatNickName || userStorage.name || ""}}<text>邀请你参加</text></view>
<view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text class="activity-type-tag">{{activityTypList[0]}}</text></view>
</view>
</view>
<view class="content" wx:if="{{!fn.indexOf(materialTypeArr, 4) && detailInfo.platformMerchantMissionMaterialResponseList.length}}">
......
// pages/tab/index/components/activeBox/activeBox.js
import {imgUrlMixin} from '~/mixins/index'
import ActivityApi from "~/api/activityApi/index"
import QR from '~/utils/lib/wxqrcode'
import {
domain
} from '~/utils/request/http'
......@@ -23,9 +24,6 @@ Component({
},
activeDateIndex: {
type: Number
},
allTaskCount: {
type: Number
}
},
......@@ -68,11 +66,9 @@ Component({
let d = new Date()
let nowDate = (d.getMonth() + 1).toString().padStart(2, "0") + "月" + d.getDate().toString().padStart(2, "0") + "日"
let ind = 0 // 下标值
let allTaskCount = 0 // 任务总数
val.calenderActiveIndex = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
allTaskCount+=k.platformMerchantMissionResponseList.length
k.time = (new Date(k.activityTime).getMonth() + 1).toString().padStart(2, "0") + "月" + new Date(k.activityTime).getDate().toString().padStart(2, "0") + "日"
k.ind = ind
if (d.getTime() > new Date(`${k.activityTime} 23:59:59`).getTime()) k.status = 2
......@@ -86,8 +82,7 @@ Component({
val.isCollapse = false
let itemVal = 'activeList['+idx+']'
this.setData({
[itemVal]: val,
allTaskCount
[itemVal]: val
})
})
} else if (flag && val.missionList) { // 已请求数据 展开默认选中当天
......@@ -145,7 +140,7 @@ Component({
// 分享活动(复制链接)
copyActivityUrl(e) {
const userStorage = wx.$storage.get('userInfo')
const userStorage = wx.$storage.get('userInfo')
let { item } = e.currentTarget.dataset
wx.setClipboardData({
data: `${userStorage.name || ''}邀请你参加${item.activityName || ""}${item.activityUrl}`,
......@@ -156,6 +151,16 @@ Component({
})
}
})
// let { item } = e.currentTarget.dataset
// let qrcodeURL = QR.createQrCodeImg(`${item.activityUrl}`)
// let thisPage = wx.$router.getPageInstance()
// thisPage.setData({
// shareData: {
// imagePath: qrcodeURL,
// activityName: item.activityName
// },
// showSharePopup: true
// })
},
// 活动详情
goToDetail(e) {
......
......@@ -9,6 +9,8 @@
margin: 32rpx 0 8rpx 0;
border-radius: 24rpx;
overflow: hidden;
box-shadow: 0 5px 10px 0 rgba(204,133,122,0.16);
border-radius: 16px;
.item-bg{
width: 100%;
height: 100%;
......@@ -53,6 +55,7 @@
color: #ffffff;
height: 68rpx;
border: none;
line-height: 68rpx;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
}
}
......@@ -144,4 +147,11 @@
.content-item:first-child{
margin: 16rpx 0 8rpx 0;
}
.canvas-box {
position: absolute;
left: -9999rpx;
top: -9999rpx;
width: 750rpx;
height: 750rpx;
}
}
\ No newline at end of file
......@@ -22,7 +22,7 @@
<!-- 任务日历 -->
<view class="task-box {{item.isCollapse ? 'hidden' : ''}}">
<view class="box-content">
<activity-calender data="{{item}}" activeDateIndex="{{activeDateIndex}}" allTaskCount="{{allTaskCount}}" isCollapse="{{item.isCollapse}}"></activity-calender>
<activity-calender data="{{item}}" activeDateIndex="{{activeDateIndex}}" isCollapse="{{item.isCollapse}}"></activity-calender>
</view>
</view>
<!-- 展开/收起 -->
......@@ -36,4 +36,7 @@
<block wx:if="{{nothing}}">
<view class="list-nothing to-bottom"></view>
</block>
<view class="canvas-box">
<canvas type="2d" style="width:352rpx;height:352rpx;background:#fff;" id="mycanvas" />
</view>
</view>
......@@ -23,9 +23,6 @@ Component({
// 默认选中日期(今天)
activeDateIndex: {
type: Number
},
allTaskCount: {
type: Number
}
},
......
......@@ -2,7 +2,7 @@
<wxs src="../index.wxs" module="fn"></wxs>
<block wx:if="{{!isCollapse}}">
<view class="title">任务日历<text> · {{allTaskCount}}</text></view>
<view class="title">任务日历<text> · {{data.missionList[activeDateIndex].platformMerchantMissionResponseList.length}}</text></view>
<view wx:if="{{data.newtaskCalenderList.length}}" class="calender-box {{data.newtaskCalenderList.length > 1 ? 'p-b-54' : ''}}">
<swiper class="swiper" current="{{data.calenderActiveIndex}}" bindchange="changeTaskCalender" data-index="{{index}}">
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="val" wx:for-index="k" wx:key="k">
......
......@@ -7,6 +7,7 @@
position: relative;
display: inline-block;
margin: 32rpx 0 8rpx 0;
box-shadow: 0 5px 10px 0 rgba(116,132,194,0.16), inset 0 -1px 3px 0 rgba(255,255,255,0.40);
.item-bg{
width: 100%;
height: 100%;
......@@ -54,6 +55,7 @@
color: #ffffff;
height: 68rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
line-height: 68rpx;
border: none;
}
}
......@@ -89,7 +91,8 @@
}
}
.invert-box{
padding: 32rpx;
margin-top: 24rpx;
padding: 32rpx 24rpx;
border-radius: 24rpx;
background: #ffffff;
// transition: all 0.1s linear;
......@@ -101,9 +104,10 @@
}
}
.hidden{
height: 80rpx;
height: 64rpx;
padding: 0;
background: transparent;
margin-top: 0;
transition: height .3;
.box-content{
display: none;
......@@ -117,7 +121,6 @@
justify-content: center;
font-size: 26rpx;
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
.btn{
......
......@@ -36,7 +36,7 @@
</view>
</view>
<!-- 展开/收起 -->
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" data-key="{{index}}">
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" style="bottom: {{item.isCollapse ? 24 : 48}}rpx;" data-key="{{index}}">
<text>{{item.isCollapse ? '展开' : '收起'}}</text><text class="{{item.isCollapse ? 'gg-chevron-down' : 'gg-chevron-up'}}"></text>
<van-loading wx:if="{{item.isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
</view>
......
......@@ -19,17 +19,8 @@ Page({
tabIndex: 0,
activeList: [],
activityEndList: [],
allTaskCount: 0
},
onPageScroll({
scrollTop
}) {
let opacity = scrollTop / 100
let color = `rgba(255,255,255${opacity > 1 ? 1 : opacity})`
this.setData({
navStyle: scrollTop == 0 ? navStyle : `background-color:${color};`
})
allTaskCount: 0,
scrollTop: 0
},
// 申请活动
......@@ -90,10 +81,8 @@ Page({
let nowDate = (d.getMonth() + 1).toString().padStart(2, "0") + "月" + d.getDate().toString().padStart(2, "0") + "日"
let ind = 0
val.calenderActiveIndex = 0
let allTaskCount = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
allTaskCount += k.platformMerchantMissionResponseList.length
k.time = (new Date(k.activityTime).getMonth() + 1).toString().padStart(2, "0") + "月" + new Date(k.activityTime).getDate().toString().padStart(2, "0") + "日"
k.ind = ind
if (d.getTime() > new Date(`${k.activityTime} 23:59:59`).getTime()) k.status = 2
......@@ -107,8 +96,7 @@ Page({
val.isCollapse = false
let itemVal = 'activeList['+index+']'
this.setData({
[itemVal]: val,
allTaskCount
[itemVal]: val
})
})
}
......@@ -179,6 +167,13 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
// 滚动中
scrollIng(e) {
this.setData({
translateValue: e.detail.scrollTop / 2.3 > 140 ? 130 : e.detail.scrollTop / 2.3
})
},
// 下拉刷新
activityRefresh(e) {
let {type} = e.currentTarget.dataset
......
......@@ -21,9 +21,9 @@
</block>
</view>
<!-- 活动中 -->
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" binddragend="scrollEnd" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
<block>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}" allTaskCount="{{allTaskCount}}"></active-box>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}"></active-box>
</block>
</scroll-view>
<!-- 活动诊断 -->
......@@ -33,10 +33,12 @@
</block>
</scroll-view>
<!-- 申请活动 -->
<view class="add-activity" bind:tap="applyActivity">
<view class="add-activity" style="transform: translateX({{translateValue}}rpx);transition: all {{translateValue >= 130 ? 0.3 : 0}}s;" bind:tap="applyActivity">
<image webp src="{{IMGURL}}application_activity.png"></image>
</view>
<!-- 预约安装弹窗 -->
<install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
<install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
<!-- 分享活动弹窗 -->
<share-popup show="{{showSharePopup}}" data="{{shareData}}"></share-popup>
</view>
</block>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!