Commit 9cb8fc0f by 张晓玮

Merge branch 'zhangxw_dev_3.0' into 'feat_v3.0'

Zhangxw dev 3.0

See merge request !140
2 parents c12c5494 13857647
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu]}}" catchadd="_add"/></view>
\ No newline at end of file \ No newline at end of file
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg]}}" catchadd="_add"/></view>
\ No newline at end of file \ No newline at end of file
<wxs module="use">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n){return!n.c&&(!n.children||"a"===n.name||!e[n.name]&&-1===(n.attrs.style||"").indexOf("inline"))};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block><text wx:elif="{{n.text}}" user-select="{{n.us}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{use(n1)}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{use(n2)}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{use(n3)}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{use(n4)}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{use(n5)}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
\ No newline at end of file \ No newline at end of file
<wxs module="use">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n){return!n.c&&(!n.children||"a"===n.name||!e[n.name]&&-1===(n.attrs.style||"").indexOf("inline"))};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="{{opts[4] ? 'imgTap' : ''}}" bindlongpress="noop"/></block><text wx:elif="{{n.text}}" user-select="{{n.us}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{use(n1)}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{use(n2)}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{use(n3)}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{use(n4)}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{use(n5)}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
\ No newline at end of file \ No newline at end of file
...@@ -11,12 +11,13 @@ Page({ ...@@ -11,12 +11,13 @@ Page({
list: [], list: [],
allNum: 0, allNum: 0,
todayNum: 0, todayNum: 0,
orderStatusImgList: {1: '待付款', 7: '待安装', 8: '已安装'}, orderStatusImgList: {1: '待付款', 7: '待安装', 8: '已安装', 6: '已退款'},
statusColor: {1: '#DF9800', 7: '#4466F0', 8: '#7A8299'}, statusColor: {1: '#DF9800', 7: '#4466F0', 8: '#3FCF77', 6: '#7A8299'},
statusBackgroundColor: { statusBackgroundColor: {
1: 'linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%)', 1: 'linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%)',
7: 'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)', 7: 'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)',
8: 'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)' 8: 'linear-gradient(90deg, #F2FAF5 0%, #FCFDFF 86%)',
6: 'linear-gradient(90deg, #F2F4FA 9%, #FCFDFF 100%)'
}, },
installItem: {}, installItem: {},
activityTypList: index_const.data.activityTypList activityTypList: index_const.data.activityTypList
...@@ -34,7 +35,9 @@ Page({ ...@@ -34,7 +35,9 @@ Page({
activityId activityId
}).then(res => { }).then(res => {
res.orderList && res.orderList.forEach(val => { res.orderList && res.orderList.forEach(val => {
// afterSaleStatus售后状态 6已退款
val.time = val.createdDate ? new Date(val.createdDate).format('yyyy-MM-dd hh:mm:ss') : '' val.time = val.createdDate ? new Date(val.createdDate).format('yyyy-MM-dd hh:mm:ss') : ''
val.orderStatus = val.afterSaleStatus == 6 ? val.afterSaleStatus : val.orderStatus
val.orderPrice = centsToyuan(val.orderPrice) val.orderPrice = centsToyuan(val.orderPrice)
}) })
this.setData({ this.setData({
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
position: relative; position: relative;
margin-bottom: 24rpx; margin-bottom: 24rpx;
border-radius: 24rpx; border-radius: 24rpx;
padding: 24rpx 40rpx; padding: 24rpx;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40); box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
.top{ .top{
display: flex; display: flex;
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin-right: 24rpx; margin-right: 24rpx;
border-radius: 50%;
} }
.name{ .name{
font-size: 30rpx; font-size: 30rpx;
...@@ -103,12 +104,19 @@ ...@@ -103,12 +104,19 @@
display: inline-block; display: inline-block;
padding: 0 16rpx; padding: 0 16rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx;
background: #F2F3F7; background: #F2F3F7;
border-radius: 22rpx; border-radius: 22rpx;
color: #6E6E7A; color: #6E6E7A;
line-height: 44rpx;
font-size: 24rpx; font-size: 24rpx;
margin: 16rpx 0; margin: 16rpx 0;
text{
display: inline-block;
max-width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.time{ .time{
font-size: 26rpx; font-size: 26rpx;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<view class="name-mobile"> <view class="name-mobile">
<view class="name"> <view class="name">
{{item.customerNickName || ""}} {{item.customerNickName || ""}}
<text class="order-statue {{item.orderStatus == 1 ? '' : 'green'}}">{{item.orderStatus == 1 ? '未下单' : '已下单'}}</text>
</view> </view>
<view class="mobile">{{item.customerPhone || ""}}</view> <view class="mobile">{{item.customerPhone || ""}}</view>
</view> </view>
...@@ -31,12 +30,12 @@ ...@@ -31,12 +30,12 @@
<image webp src="{{item.activityImg}}"></image> <image webp src="{{item.activityImg}}"></image>
<view class="activity"> <view class="activity">
<view class="name">{{item.activityName}} <text>¥{{item.orderPrice}}</text></view> <view class="name">{{item.activityName}} <text>¥{{item.orderPrice}}</text></view>
<view class="activity-type">{{item.activityName+'-'+activityTypList[0]}}</view> <view class="activity-type"><text>{{item.activityName}}</text><text>{{'-' + activityTypList[0]}}</text></view>
<view class="time">下单时间<text>{{item.time}}</text></view> <view class="time">下单时间<text>{{item.time}}</text></view>
</view> </view>
</view> </view>
<view class="order-status"> <view class="order-status">
<image webp src="{{IMGURL}}order_status_{{item.orderStatus}}.png"></image> <image webp src="{{IMGURL}}order_status_{{item.orderStatus}}.webp"></image>
<text style="color: {{statusColor[item.orderStatus]}};">{{orderStatusImgList[item.orderStatus]}}</text> <text style="color: {{statusColor[item.orderStatus]}};">{{orderStatusImgList[item.orderStatus]}}</text>
</view> </view>
<view wx:if="{{item.orderStatus == 7}}" class="btn-box"><view class="btn" bind:tap="showPopup" data-item="{{item}}">预约安装</view></view> <view wx:if="{{item.orderStatus == 7}}" class="btn-box"><view class="btn" bind:tap="showPopup" data-item="{{item}}">预约安装</view></view>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import index_const from "~/pages/tab/index/index_const" import index_const from "~/pages/tab/index/index_const"
import ActivityApi from '~/api/activityApi/index' import ActivityApi from '~/api/activityApi/index'
import { showEmoji } from '~/utils/emoji' import { showEmoji } from '~/utils/emoji'
import QR from '~/utils/lib/wxqrcode'
import { import {
taskShareReport taskShareReport
} from '~/api/api.js' } from '~/api/api.js'
...@@ -61,11 +60,13 @@ Page({ ...@@ -61,11 +60,13 @@ Page({
// } // }
let typeArr = [] let typeArr = []
res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => { res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => {
console.log(val)
typeArr.push(val.materialType) typeArr.push(val.materialType)
// materialType 素材类型1文案 2图片 3视频 4专属链接 // materialType 素材类型1文案 2图片 3视频 4专属链接
if (val.materialType == 1) { // 文案 if (val.materialType == 1) { // 文案
res.textContent = val.materialContent res.textContent = val.materialContent
res.filterTextContent = `<view style="word-break: break-all;">${showEmoji(val.materialContent)}</view>` console.log(showEmoji(val.materialContent))
res.filterTextContent = `<view>${showEmoji(val.materialContent)}</view>`
} }
if (val.materialType == 2 || val.materialType == 3) { // 图片视频 if (val.materialType == 2 || val.materialType == 3) { // 图片视频
res.imgUrlList.push({ res.imgUrlList.push({
...@@ -85,7 +86,6 @@ Page({ ...@@ -85,7 +86,6 @@ Page({
}) })
} }
}) })
console.log(res)
this.setData({ this.setData({
detailInfo: res, detailInfo: res,
materialTypeArr: typeArr materialTypeArr: typeArr
...@@ -124,9 +124,11 @@ Page({ ...@@ -124,9 +124,11 @@ Page({
}, },
// 分享按钮 // 分享按钮
shareEvent() { shareEvent(e) {
// 分享类型任务 let { materialTypeArr } = this.data
if (this.data.detailInfo.missonType != 1) { let {type} = e.currentTarget.dataset
// 非注册任务
if (type == 1) {
if (this.data.isloading) return if (this.data.isloading) return
this.setData({ this.setData({
isloading: true isloading: true
...@@ -136,23 +138,31 @@ Page({ ...@@ -136,23 +138,31 @@ Page({
isloading: false isloading: false
}) })
wx.showToast({ wx.showToast({
title: '图片及视频已保存到手机相册,文案已黏贴到剪切板', title: materialTypeArr.indexOf('2') > -1 || materialTypeArr.indexOf('3') > -1 ? '图片及视频已保存到手机相册,文案已黏贴到剪切板' : '文案已黏贴到剪切板',
icon: 'none' icon: 'none'
}) })
}) }).catch((err) => {
wx.showToast({
title: err,
icon: 'none'
})
this.setData({
isloading: false
})
})
} else { } else {
// 生成海报 // 生成海报
// let item = this.data.detailInfo let item = this.data.detailInfo
// wx.$api.showLoading() wx.$api.showLoading()
// ActivityApi.getActivityPosters({id: item.activityId}).then(res => { ActivityApi.getActivityPosters({id: item.activityId}).then(res => {
// this.setData({ this.setData({
// sharePopupData: { sharePopupData: {
// posterImg: res, posterImg: res,
// activityName: item.activityName, activityName: item.activityName,
// showSharePopup: true showSharePopup: true
// }, },
// }) })
// }) })
} }
}, },
...@@ -168,6 +178,10 @@ Page({ ...@@ -168,6 +178,10 @@ Page({
} else if (textContent && !linkUrl) { } else if (textContent && !linkUrl) {
copyData = textContent copyData = textContent
} }
let _this = this
if (!copyData.length) { // 复制内容为空 不做处理
return resolve()
}
wx.setClipboardData({ wx.setClipboardData({
data: copyData, data: copyData,
success () { success () {
...@@ -175,7 +189,7 @@ Page({ ...@@ -175,7 +189,7 @@ Page({
resolve() resolve()
}, },
fail () { fail () {
this.setData({ _this.setData({
isloading: false isloading: false
}) })
reject('文案复制失败') reject('文案复制失败')
...@@ -199,7 +213,8 @@ Page({ ...@@ -199,7 +213,8 @@ Page({
business_type: 1, // 业务类型,固定为1 business_type: 1, // 业务类型,固定为1
add_way: 104, // 来源,固定为104 add_way: 104, // 来源,固定为104
create_time: new Date().format("yyyy-MM-dd hh:mm:ss"), // 分享时间 create_time: new Date().format("yyyy-MM-dd hh:mm:ss"), // 分享时间
item_id: detailInfo.activityId item_id: detailInfo.activityId,
share_staff_type: 3
} }
let jsonList = [JSON.stringify(data)] let jsonList = [JSON.stringify(data)]
taskShareReport({jsonList}).then((res) => { taskShareReport({jsonList}).then((res) => {
...@@ -242,7 +257,7 @@ Page({ ...@@ -242,7 +257,7 @@ Page({
that.setData({ that.setData({
isloading: false isloading: false
}) })
reject() reject('图片/视频下载失败')
} }
}) })
} else { } else {
......
...@@ -96,12 +96,12 @@ ...@@ -96,12 +96,12 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
.bg{ .bg{
width: 100%; width: 100%;
height: 176rpx; height: 160rpx;
} }
.user-box{ .user-box{
position: absolute; position: absolute;
top: 0; top: 0;
padding: 40rpx; padding: 32rpx 40rpx;
display: flex; display: flex;
image{ image{
width: 96rpx; width: 96rpx;
...@@ -209,6 +209,11 @@ ...@@ -209,6 +209,11 @@
height: 88rpx; height: 88rpx;
color: #fff; color: #fff;
} }
.tips{
margin: 20rpx 56rpx 0 56rpx;
font-size: 24rpx;
color: #9299AD;
}
} }
.canvas-box { .canvas-box {
position: absolute; position: absolute;
......
...@@ -49,8 +49,15 @@ ...@@ -49,8 +49,15 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 非注册任务按钮 -->
<view class="btn-box" wx:if="{{detailInfo.missonType != 1}}">
<view class="btn primary" bind:tap="shareEvent" data-type="{{1}}">复制素材<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
<view class="tips">
{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3) ? '提示:复制素材后可进入微信或企微,从相册中选择素材并粘贴文案,实现素材分享。' : '提示:复制文案后可进入微信或企微并粘贴文案,实现素材分享。'}}
</view>
</view>
<!-- 专属链接 --> <!-- 专属链接 -->
<!-- <view wx:if="{{detailInfo.missonType != 2}}"> <view wx:if="{{detailInfo.missonType == 1}}">
<view class="copyWriting">将链接转发给好友或发送朋友圈可提高活动曝光度</view> <view class="copyWriting">将链接转发给好友或发送朋友圈可提高活动曝光度</view>
<view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}"> <view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}">
<image src="{{detailInfo.activityImage ? detailInfo.activityImage : IMGURL+'share_task_default_img.png'}}"></image> <image src="{{detailInfo.activityImage ? detailInfo.activityImage : IMGURL+'share_task_default_img.png'}}"></image>
...@@ -59,18 +66,10 @@ ...@@ -59,18 +66,10 @@
<view class="type-text">{{activityTypList[0]}}活动</view> <view class="type-text">{{activityTypList[0]}}活动</view>
</view> </view>
</view> </view>
</view> --> </view>
<!-- <view class="btn-box"> <!-- 注册任务按钮 -->
<view class="btn" wx:if="{{fn.indexOf(materialTypeArr, 1)}}" bind:tap="copyText">复制文案</view> <view class="btn-box" wx:if="{{detailInfo.missonType == 1}}">
<view class="btn" wx:if="{{detailInfo.missonType != 2 || fn.indexOf(materialTypeArr, 4)}}" bind:tap="copyUrl">复制链接</view> <view class="btn primary" bind:tap="shareEvent" data-type="{{2}}">分享<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
<view class="btn" bind:tap="saveWith" wx:if="{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3)}}">
<text>一键保存{{fn.indexOf(materialTypeArr, 2) ? '图片' : '视频'}}</text>
</view>
<button class="btn primary" wx:if="{{detailInfo.missonType == 2 && !fn.indexOf(materialTypeArr, 4)}}" open-type="share">分享</button>
</view> -->
<view class="btn-box">
<view class="btn primary" bind:tap="shareEvent">{{detailInfo.missonType == 2 ? '分享' : '保存'}}<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" /></view>
</view> </view>
<!-- 分享活动弹窗 --> <!-- 分享活动弹窗 -->
<share-popup show="{{sharePopupData.showSharePopup}}" data="{{sharePopupData}}"></share-popup> <share-popup show="{{sharePopupData.showSharePopup}}" data="{{sharePopupData}}"></share-popup>
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin-right: 24rpx; margin-right: 24rpx;
border-radius: 50%;
} }
.name{ .name{
font-size: 30rpx; font-size: 30rpx;
......
// pages/tab/index/components/activeBox/activeBox.js // pages/tab/index/components/activeBox/activeBox.js
import {imgUrlMixin} from '~/mixins/index' import {imgUrlMixin} from '~/mixins/index'
import ActivityApi from "~/api/activityApi/index" import ActivityApi from "~/api/activityApi/index"
import QR from '~/utils/lib/wxqrcode'
import { import {
domain domain
} from '~/utils/request/http' } from '~/utils/request/http'
...@@ -174,30 +173,6 @@ Component({ ...@@ -174,30 +173,6 @@ Component({
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
wx.$api.showLoading() wx.$api.showLoading()
ActivityApi.getActivityPosters({id: item.id}).then(res => { ActivityApi.getActivityPosters({id: item.id}).then(res => {
// var code= QR.createQrCodeImg(res.activityUrl);
// /*code是指图片base64格式数据*/
// //声明文件系统
// const fs = wx.getFileSystemManager();
// //随机定义路径名称
// var times = new Date().getTime();
// var codeimg = wx.env.USER_DATA_PATH + '/' + times + '.png';
// //将base64图片写入
// fs.writeFile({
// filePath: codeimg,
// data: code.slice(22),
// encoding: 'base64',
// success: () => {
// thisPage.setData({
// sharePopupData: {
// imagePath: codeimg,
// activityName: res.activityName,
// address: res.activityAddressDetailName,
// posterImg: res.posterImg,
// showSharePopup: true
// },
// })
// }
// });
thisPage.setData({ thisPage.setData({
sharePopupData: { sharePopupData: {
posterImg: res, posterImg: res,
...@@ -217,6 +192,7 @@ Component({ ...@@ -217,6 +192,7 @@ Component({
// 活动战报 // 活动战报
jump(e) { jump(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
// wx.$router.jumpH5('http://glsx-posters.test.glsx.com.cn/#/activiting?activityId=769&navigateTitle=实时战报')
wx.$router.go('packageActivity.warReport', item) wx.$router.go('packageActivity.warReport', item)
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
display: inline-block; display: inline-block;
margin: 32rpx 0 8rpx 0; margin: 32rpx 0 8rpx 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 5px 10px 0 rgba(204,133,122,0.16); box-shadow: 0 10rpx 20rpx 0 rgba(204,133,122,0.16);
border-radius: 32rpx; border-radius: 32rpx;
.item-bg{ .item-bg{
width: 100%; width: 100%;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
display: inline-block; display: inline-block;
margin: 32rpx 0 8rpx 0; margin: 32rpx 0 8rpx 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 5px 10px 0 rgba(116,132,194,0.16), inset 0 -1px 3px 0 rgba(255,255,255,0.40); box-shadow: 0 10rpx 20rpx 0 rgba(116,132,194,0.16), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
border-radius: 32rpx; border-radius: 32rpx;
.item-bg{ .item-bg{
width: 100%; width: 100%;
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
.earnings-box{ .earnings-box{
width: 100%; width: 100%;
height: 144rpx; height: 144rpx;
background-image: linear-gradient(180deg, #99B4FF 16%, #6276F5 93%); background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 20rpx; border-radius: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -75,17 +75,27 @@ ...@@ -75,17 +75,27 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: space-between; justify-content: space-between;
color: #FFFFFF; .title{
font-size: 28rpx; font-weight: 400;
font-size: 24rpx;
color: #6E6E7A;
}
.sort{ .sort{
margin-top: 8rpx;
font-size: 20rpx; font-size: 20rpx;
color: #1B233D;
} }
} }
.integral-num{ .integral-num{
color: #FFEB98;
font-size: 68rpx; font-size: 68rpx;
font-weight: bold; font-weight: 700;
text{ text{
background: linear-gradient(#FFC233, #FF9124);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.unit{
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
margin-left: 12rpx; margin-left: 12rpx;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="title">累计收益</view> <view class="title">累计收益</view>
<view class="sort">最终排名:{{item.statics.incomeRank || "-"}}</view> <view class="sort">最终排名:{{item.statics.incomeRank || "-"}}</view>
</view> </view>
<view class="integral-num">{{fn.filterIntegral(item.statics.income || 0)}}<text>积分</text></view> <view class="integral-num"><text>{{fn.filterIntegral(item.statics.income || 0)}}</text><text class="unit">积分</text></view>
</view> </view>
<!-- 转化分析 --> <!-- 转化分析 -->
<view class="invert-box {{item.isCollapse ? 'hidden' : ''}}"> <view class="invert-box {{item.isCollapse ? 'hidden' : ''}}">
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
.sort{ .sort{
font-size: 20rpx; font-size: 20rpx;
color: #2D2D33; color: #2D2D33;
line-height: 28rpx;
.up{ .up{
color: #EB4E4E; color: #EB4E4E;
} }
......
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
position: absolute; position: absolute;
top: 40rpx; top: 40rpx;
left: 0; left: 0;
width: 408rpx; width: 406rpx;
height: 336rpx; height: 288rpx;
} }
.funnel-content{ .funnel-content{
display: flex; display: flex;
height: 286rpx; height: 248rpx;
width: 100%; width: 100%;
padding-top: 50rpx; padding-top: 40rpx;
.left,.right{ .left,.right{
display: flex; display: flex;
} }
.left{ .left{
flex: 0 0 408rpx; flex: 0 0 406rpx;
flex-flow: column; flex-flow: column;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
top: 50%; top: 50%;
} }
.sort{ .sort{
font-size: 48rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
margin-top: 4rpx; margin-top: 4rpx;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="title">转化分析</view> <view class="title">转化分析</view>
<view class="funnel-box"> <view class="funnel-box">
<view class="funnel-bg"> <view class="funnel-bg">
<image webp src="{{IMGURL}}activity_funnel.png"></image> <image webp src="{{IMGURL}}activity_funnel.webp"></image>
</view> </view>
<view class="funnel-content"> <view class="funnel-content">
<view class="left"> <view class="left">
......
...@@ -127,6 +127,8 @@ Page({ ...@@ -127,6 +127,8 @@ Page({
this.setData({ this.setData({
[itemVal]: val [itemVal]: val
}) })
}).catch(err => {
val.isloading = false
}) })
} }
if (num == 2 && pageNum == 1 && index == 0) { // 活动诊断展开第一条 if (num == 2 && pageNum == 1 && index == 0) { // 活动诊断展开第一条
...@@ -143,6 +145,8 @@ Page({ ...@@ -143,6 +145,8 @@ Page({
this.setData({ this.setData({
[itemVal]: val [itemVal]: val
}) })
}).catch(err => {
val.isloading = false
}) })
} }
}) })
......
...@@ -71,7 +71,7 @@ page{ ...@@ -71,7 +71,7 @@ page{
} }
.add-activity{ .add-activity{
position: fixed; position: fixed;
top: 65%; top: 75%;
right: 16rpx; right: 16rpx;
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- 背景图 --> <!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px"> <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg"> <view class="bg">
<image webp src="{{IMGURL}}/index_bg.png?v={{img_version}}"></image> <image webp src="{{IMGURL}}index_bg.webp?v={{img_version}}"></image>
</view> </view>
</view> </view>
<!-- tab切换 --> <!-- tab切换 -->
......
...@@ -40,17 +40,36 @@ export function replaceEmoji(value) { ...@@ -40,17 +40,36 @@ export function replaceEmoji(value) {
// 表情回显 文本内容 // 表情回显 文本内容
export function showEmoji(value) { export function showEmoji(value) {
let filterValue = value.replace(/\[[\u4E00-\u9FA5]{1,3}\]/gi, (res) => { if (!value) return
const list = emoji.flat(Infinity) let a = decodeURIComponent(value).replace(/[(\r\n)|(\n)|(↵)]+/g, '\n')
let word = res.replace(/\[|\]/gi,''); let b = a.split('\n')
let index = parseInt(list.indexOf(word)) + 1 let filterContent = ''
if (index < 10) { b && b.forEach((val, index) => {
index = '00' + index let filterValue = val.replace(/\[[\u4E00-\u9FA5]{1,3}\]/gi, (res) => {
} else if (index >= 10 && index < 100) { const list = emoji.flat(Infinity)
index = '0' + index let word = res.replace(/\[|\]/gi,'');
} let index = parseInt(list.indexOf(word)) + 1
console.log(index, word) if (index < 10) {
return `<img webp style="width: 40rpx; height: 40rpx;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png" />`; index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img webp style="width: 40rpx; height: 40rpx;display:inline-block;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png" />`;
})
filterContent = filterContent + `<view style="display: block">${filterValue}</view>`
}) })
return filterValue return filterContent
// let filterValue = a.replace(/\[[\u4E00-\u9FA5]{1,3}\]/gi, (res) => {
// const list = emoji.flat(Infinity)
// let word = res.replace(/\[|\]/gi,'');
// let index = parseInt(list.indexOf(word)) + 1
// if (index < 10) {
// index = '00' + index
// } else if (index >= 10 && index < 100) {
// index = '0' + index
// }
// console.log(index, word)
// return `<img webp style="width: 40rpx; height: 40rpx;display:inline-block;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png" />`;
// })
// return filterValue
} }
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
* @param {*} onViewTrack 开启浏览埋点 * @param {*} onViewTrack 开启浏览埋点
* @returns * @returns
*/ */
import {
taskShareReport
} from '~/api/api.js'
// import USERAPI from '~/api/usersApi/index' // import USERAPI from '~/api/usersApi/index'
class Share { class Share {
constructor() { constructor() {
...@@ -100,22 +97,6 @@ setCommonShareQuery(query) { ...@@ -100,22 +97,6 @@ setCommonShareQuery(query) {
return query return query
} }
reportShareData(shareTrackData) { reportShareData(shareTrackData) {
const {
USERINFO
} = this.getCommonData(),
thisPage = wx.$router.getPageInstance()
let data = {
action_type: 4, // 事件类型固定为4-分享
item_type: 3, // 商品类型,固定为3-众筹活动
merchant_id: USERINFO.merchantId, // 门店号
staff_uuid: USERINFO.uuid,
business_type: 1, // 业务类型,固定为1
add_way: 104, // 来源,固定为104
create_time: new Date().format("yyyy-MM-dd hh:mm:ss"), // 分享时间
...shareTrackData
}
let jsonList = [JSON.stringify(data)]
taskShareReport({jsonList})
} }
} }
new Share() new Share()
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!