Commit 1076831d by chenwq

海报,开通样式

1 parent a937fe30
......@@ -5,6 +5,8 @@
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 998;
display: flex;
flex-direction: column;
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<view class="flex scene">
<view
class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
wx:for="{{custSceneList}}"
wx:key="index"
bindtap="handleClick"
data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image
webp
wx:if="{{formData['scene' + (index + 1)]}}"
class="scene-img"
src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<view wx:else class="no-open-img">
<image
webp
wx:if="{{hasLockIcon}}"
class="lock-img"
src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" />
<image
webp
wx:else=""
class="scene-img"
src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price " wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}}
</view>
</view>
</view>
<view class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}"></image>
<view wx:else class="no-open-img">
<image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}"></image>
<image webp wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}"></image>
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}}
</view>
</view>
</view>
\ No newline at end of file
......@@ -101,8 +101,8 @@
}
.scene-img {
width: 56rpx;
height: 56rpx;
width: 92rpx;
height: 64rpx;
}
.lock-img {
......
......@@ -65,6 +65,7 @@ page {
flex-wrap: wrap;
.activity-item {
position: relative;
box-sizing: border-box;
width: calc((100% - 40rpx) / 3);
height: 64rpx;
......@@ -74,6 +75,14 @@ page {
font-size: 28rpx;
margin: 0 20rpx 16rpx 0;
border-radius: 4rpx;
.icon-mark {
position: absolute;
top: 0;
right: 0;
width: 60rpx;
height: 60rpx;
}
}
.activity-item:nth-child(3n) {
......
......@@ -17,6 +17,11 @@
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box" wx:if="{{sceneActive != 1}}">
<view wx:for="{{activityList}}" wx:key="index" class="activity-item">
<!-- productStatus:0未申请;1申请中;2已开通;3:已结束 -->
<view wx:if="{{item.openFlag != 0}}">
<glsx-image wx:if="{{item.productStatus == 1}}" src="output/mark-active.webp" class="icon-mark"></glsx-image>
<glsx-image wx:if="{{item.productStatus == 2}}" src="output/mark-open.webp" class="icon-mark"></glsx-image>
</view>
<view wx:if="{{item.openFlag == 0}}" class="text-hide {{ item.checked ? 'active' : '' }}" bindtap="handleActClick" data-idx="{{index}}">{{item.productName}}</view>
<view class="text-hide item-disabled" wx:else>{{item.productName}}</view>
</view>
......
......@@ -114,7 +114,7 @@ Page({
},
// 将已开通的活动提前
// productStatus:0未申请;1申请中;2已开通
// productStatus:0未申请;1申请中;2已开通;3:已结束
dealOpenActivity(list) {
list.forEach(item => {
let tempList = []
......
......@@ -103,10 +103,52 @@ Component({
handleJumpIdx() {
wx.$router.go('pages.index')
},
handleShare(e) {
async handleShare(e) {
let { idx } = e.currentTarget.dataset
var currentItem = this.data.list[idx]
console.log('分享----', currentItem)
var item = {
activityId: this.data.list[idx].activityLastUnSharedInfo.id,
activityName: this.data.list[idx].activityLastUnSharedInfo.activityName
}
// const {
// item
// } = e.currentTarget.dataset,
console.log(item)
const posterObj = this.selectComponent('#poster')
const {options} = wx.$router.getPageInstance()
console.log(options)
try {
let flag = await posterObj.check(item)
posterObj.setData({
poster: flag,
show: true
})
} catch (error) {
wx.$api.showLoading('加载中...')
outputApi.getPosterUrl({
id: item.activityId
}).then(res => {
item.posterUrl = res
this.setData({
posterItem: item,
isShowTip: false
})
}).catch(() => {
wx.$api.showToast('下载海报失败')
})
}
},
/**长按海报 */
async longtouch(e) {
console.log('长按海报', e)
this.onBindRefresh()
let {
activityId
} = e.detail
const res = await outputApi.reportPosterTrack({
activityId
})
console.log(res)
},
handleJump(e) {
let { idx } = e.currentTarget.dataset
......
......@@ -7,7 +7,7 @@
<text class="price-txt">¥{{totalProfit}}</text>
</view>
<view wx:for="{{list}}" wx:key="index" bindtap="handleJump" data-idx="{{index}}">
<view class="box share">
<view class="box {{item.activityLastUnSharedInfo ? 'share' : ''}}">
<view class="head flex-between">
<view class="name ">{{item.merchantName}}</view>
<view class="price-txt ">¥{{item.totalMoney}}</view>
......@@ -42,8 +42,8 @@
</view>
</view>
<!-- 分享海报 -->
<view class="box-share">
<view>360全景影像众筹活动正在进行,分享母链海报开展业务</view>
<view wx:if="{{item.activityLastUnSharedInfo}}" class="box-share">
<view>{{item.activityLastUnSharedInfo.activityName}}正在进行,分享母链海报开展业务</view>
<view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view>
</view>
</view>
......@@ -51,4 +51,5 @@
到底啦!
</view>
</view>
</scroll-view>
\ No newline at end of file
</scroll-view>
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!