Commit bc4173be by chenwq

bug修复,喜报tips

1 parent 3d2986ff
......@@ -228,7 +228,7 @@ Component({
wx.$api.showLoading("战报生成中")
outputApi.getNewReportUrl({ activityId: item.activityId }).then(res => {
// console.log(res)
if(!res.url) {
if (!res.url) {
wx.$api.showToast('战报生成失败')
return true
}
......@@ -253,7 +253,7 @@ Component({
const {
item
} = e.currentTarget.dataset
if(!item.goodUrl) {
if (!item.goodUrl) {
wx.$api.showToast('喜报生成失败')
return true
}
......
......@@ -200,11 +200,38 @@
font-size: 20rpx;
.rank-row {
position: relative;
display: flex;
height: 32rpx;
line-height: 32rpx;
margin-bottom: 8rpx;
.down-tips {
position: absolute;
left: -116rpx;
top: -60rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #FFFFFF;
background: rgba(0, 0, 0, 0.60);
padding: 0 16rpx;
border-radius: 12rpx;
font-weight: 500;
&::after {
display: inline-block;
content: '';
position: absolute;
bottom: -27rpx;
right: 67rpx;
width: 0;
height: 0;
border: 18rpx solid;
border-color: #686868 transparent transparent;
}
}
&-name {
font-size: 24rpx;
color: #3666FE;
......
......@@ -39,14 +39,15 @@
<view class="rank-left">
<view class="rank-num">{{idx + 1}}</view>
<view class="rank-head">
<!-- <glsx-image class="icon-wechat" src="output/icon-wechat.webp"></glsx-image> -->
<glsx-image wx:if="{{subItem.shareType == 1}}" class="icon-wechat" src="output/icon-wechat.webp"></glsx-image>
<image wx:if="{{subItem.imageUrl}}" src="{{subItem.imageUrl}}"></image>
<glsx-image wx:else src="output/icon-head.webp"></glsx-image>
</view>
<view class="rank-content">
<view class="rank-row">
<text wx:if="{{subItem.goodUrl}}" class="rank-row-name" bindtap="handleXiReport" data-item="{{subItem}}">{{subItem.shareName}}</text>
<text wx:if="{{subItem.goodUrl}}" class="rank-row-name" bindtap="handleXiReport" data-item="{{subItem}}">{{subItem.shareName}}{{}}</text>
<text wx:else class="name-disabled">{{subItem.shareName}}</text>
<view class="down-tips" wx:if="{{orderObj.staffIdx == index && idx == 0}}">点击员工姓名看喜报</view>
<text class="rank-row-dept">{{subItem.departmentName || ''}}</text>
</view>
<view class="rank-row">
......
......@@ -36,7 +36,6 @@ Page({
outputApi.getSceneProStatus(params).then(res => {
var proList = res.find(item => item.sceneCode == sceneCode)
this.setData({
// ['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList.filter(item => item.openFlag == 0)
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList
})
this.setCurActivity()
......
......@@ -302,8 +302,13 @@ Page({
if (curItem) {
curItem.totalNum = curItem.activityList.length
curItem.shareBtnIdx = -1
curItem.staffIdx = -1
let shareFlag = false
curItem.activityList.forEach((k, kIdx) => {
// 员工喜报
if(curItem.staffIdx == -1 && k.staffList?.length && k.staffList[0].imageUrl) {
curItem.staffIdx = kIdx
}
// 分享按钮判断shareStatus:活动分享状态 0:未分享 1:已分享
if (k.activityStatus == 2 && k.shareStatus == 0) {
curItem.shareBtnIdx = shareFlag ? -1 : (kIdx + '')
......
......@@ -19,7 +19,7 @@
<view class="p-rl-20 bg-white">
<scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}">
<view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{isShowData ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{(item.productStatus == 2 || item.productStatus == 3) ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">
{{item.productName}}
</view>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!