Commit 1076831d by chenwq

海报,开通样式

1 parent a937fe30
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100vw;
height: 100vh;
z-index: 998; z-index: 998;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml --> <!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<view class="flex scene"> <view class="flex scene">
<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}}">
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"> <view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image> <image src="{{openedIcon}}" webp></image>
</view> </view>
<image <image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}"></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"> <view wx:else class="no-open-img">
<image <image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}"></image>
webp <image webp wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}"></image>
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>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}"> <view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}} {{item.title}}
</view> </view>
<view>{{item.subTitle}}</view> <view>{{item.subTitle}}</view>
<view class="total-price " wx:if="{{scenePriceList.length}}"> <view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}} ¥ {{scenePriceList[index].total}}
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
} }
.scene-img { .scene-img {
width: 56rpx; width: 92rpx;
height: 56rpx; height: 64rpx;
} }
.lock-img { .lock-img {
......
...@@ -65,6 +65,7 @@ page { ...@@ -65,6 +65,7 @@ page {
flex-wrap: wrap; flex-wrap: wrap;
.activity-item { .activity-item {
position: relative;
box-sizing: border-box; box-sizing: border-box;
width: calc((100% - 40rpx) / 3); width: calc((100% - 40rpx) / 3);
height: 64rpx; height: 64rpx;
...@@ -74,6 +75,14 @@ page { ...@@ -74,6 +75,14 @@ page {
font-size: 28rpx; font-size: 28rpx;
margin: 0 20rpx 16rpx 0; margin: 0 20rpx 16rpx 0;
border-radius: 4rpx; border-radius: 4rpx;
.icon-mark {
position: absolute;
top: 0;
right: 0;
width: 60rpx;
height: 60rpx;
}
} }
.activity-item:nth-child(3n) { .activity-item:nth-child(3n) {
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view> <view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box" wx:if="{{sceneActive != 1}}"> <view class="activity-box" wx:if="{{sceneActive != 1}}">
<view wx:for="{{activityList}}" wx:key="index" class="activity-item"> <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 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 class="text-hide item-disabled" wx:else>{{item.productName}}</view>
</view> </view>
......
...@@ -114,7 +114,7 @@ Page({ ...@@ -114,7 +114,7 @@ Page({
}, },
// 将已开通的活动提前 // 将已开通的活动提前
// productStatus:0未申请;1申请中;2已开通 // productStatus:0未申请;1申请中;2已开通;3:已结束
dealOpenActivity(list) { dealOpenActivity(list) {
list.forEach(item => { list.forEach(item => {
let tempList = [] let tempList = []
......
...@@ -103,10 +103,52 @@ Component({ ...@@ -103,10 +103,52 @@ Component({
handleJumpIdx() { handleJumpIdx() {
wx.$router.go('pages.index') wx.$router.go('pages.index')
}, },
handleShare(e) {
async handleShare(e) {
let { idx } = e.currentTarget.dataset let { idx } = e.currentTarget.dataset
var currentItem = this.data.list[idx] var item = {
console.log('分享----', currentItem) 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) { handleJump(e) {
let { idx } = e.currentTarget.dataset let { idx } = e.currentTarget.dataset
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<text class="price-txt">¥{{totalProfit}}</text> <text class="price-txt">¥{{totalProfit}}</text>
</view> </view>
<view wx:for="{{list}}" wx:key="index" bindtap="handleJump" data-idx="{{index}}"> <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="head flex-between">
<view class="name ">{{item.merchantName}}</view> <view class="name ">{{item.merchantName}}</view>
<view class="price-txt ">¥{{item.totalMoney}}</view> <view class="price-txt ">¥{{item.totalMoney}}</view>
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
</view> </view>
</view> </view>
<!-- 分享海报 --> <!-- 分享海报 -->
<view class="box-share"> <view wx:if="{{item.activityLastUnSharedInfo}}" class="box-share">
<view>360全景影像众筹活动正在进行,分享母链海报开展业务</view> <view>{{item.activityLastUnSharedInfo.activityName}}正在进行,分享母链海报开展业务</view>
<view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view> <view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view>
</view> </view>
</view> </view>
...@@ -52,3 +52,4 @@ ...@@ -52,3 +52,4 @@
</view> </view>
</view> </view>
</scroll-view> </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!