Commit 73f96de9 by zhangxw

第一轮bug修改

1 parent 3de5d0c1
Showing 32 changed files with 342 additions and 210 deletions
......@@ -78,7 +78,8 @@
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"install-popup": "/components/installPopup/installPopup",
"van-loading": "@vant/weapp/loading/index"
"van-loading": "@vant/weapp/loading/index",
"mp-html": "/components/mp-html"
},
"resolveAlias": {
"~/*": "/*"
......
......@@ -83,10 +83,6 @@
color: #C1C2C3;
}
.list-nothing.to-bottom::after{
content: '- 到 底 了 -'
}
.list-loading{
width: 100%;
padding: 8rpx 0 30rpx;
......
/* components/installPopup/installPopup.wxss */
.content{
width: 560rpx;
height: 480rpx;
// height: 480rpx;
background: #FFFFFF;
box-shadow: inset 0 0 48rpx 16rpx #E0EAFF;
.title{
......@@ -12,29 +12,41 @@
text-align: center;
}
.middle{
padding: 40rpx 0 80rpx 80rpx;
view{
display: flex;
flex-flow: column;
justify-content: flex-start;
padding: 60rpx;
.name{
display: flex;
font-size: 30rpx;
color: #1B233D;
.label{
color: #7A8299;
display: inline-block;
width: 140rpx;
flex: 0 0 140rpx;
}
}
}
.mobile{
padding-top: 10rpx;
line-height: 56rpx;
image{
width: 56rpx;
height: 56rpx;
margin-left: 16rpx;
.mobile{
display: flex;
font-size: 30rpx;
color: #1B233D;
margin-top: 10rpx;
.label{
color: #7A8299;
display: inline-block;
flex: 0 0140rpx;
}
image{
width: 56rpx;
height: 56rpx;
margin-left: 16rpx;
}
}
}
.btn-box{
display: flex;
justify-content: center;
padding-bottom: 48rpx;
.btn{
width: 320rpx;
height: 88rpx;
......
import activityApi from "~/api/activityApi/index"
import ActivityApi from "~/api/activityApi/index"
import UsersApi from "~/api/usersApi/index"
import {
reportData
} from '~/api/api.js'
Page({
data: {
list: [
{
name: '新车洽谈场景',
tip: '1.0 新车权益销售',
},
{
name: '新车交付场景',
tip: '1.1 新车精品升级',
},
{
name: '0-12个月',
tip: '1.2 新车线上转化',
},
{
name: '12个月以上',
tip: '1.3 存量用户众筹',
},
],
currentIndex: 0,
product: [
{
id: 1,
name: '360全景导航',
isSelect: false
},
{
id: 2,
name: '360全景导航',
isSelect: false
},
{
id: 3,
name: '360全景导航',
isSelect: false
},
{
id: 4,
name: '360全景导航',
isSelect: false
},
{
id: 5,
name: '360全景导航',
isSelect: false
}
]
currentSceneCode: '',
currentSceneName: '',
product: []
},
onLoad() {
UsersApi.getWXUserInfo()
const {
USERINFO
} = this.getCommonData()
// 已开通场景
ActivityApi.getOpenSceneList({merchantId: USERINFO.merchantId}).then(res => {
let arr = []
res && res.forEach(val => {
if (val.status == 1) arr.push(val)
})
if (arr[0] && arr[0].sceneCode) this.getProducts(arr[0].sceneCode)
this.setData({
list: arr,
currentSceneCode: (arr[0] && arr[0].sceneCode) || 'SC001',
currentSceneName: (arr[0] && arr[0].name)
})
})
},
getProducts(code) {
let arr = []
const {
USERINFO
} = this.getCommonData()
ActivityApi.getNotOpenProductsList({merchantId: USERINFO.merchantId, sceneCode: code}).then(res => { // 默认选中第一个业务场景 获取可用产品/活动
res.forEach(item => {
item.isSelect = false
if (item.status == 0) arr.push(item)
})
this.setData({
product: arr
})
})
},
select(e) {
const { index } = e.currentTarget.dataset
const { index, item } = e.currentTarget.dataset
this.setData({
currentIndex: index
currentIndex: index,
currentSceneCode: item.sceneCode,
currentSceneName: item.name
})
this.getProducts(code)
},
selectProduct(e) {
const { item, index } = e.currentTarget.dataset
......@@ -68,60 +64,46 @@ Page({
// 申请开通
applyOpened() {
// 获取已选的产品code
let { product, currentIndex } = this.data
let arr = []
let { product, currentSceneCode, currentSceneName } = this.data
let [arr1, arr2] = [[], []]
product.forEach(val => {
if (val.isSelect) arr.push(val.id)
if (val.isSelect) {
arr1.push(val.productCode)
arr2.push(val.productName)
}
})
if (!arr1.length) return wx.showToast({
title: '请选择产品/活动',
icon: "none"
})
console.log(reportData)
const {
USERINFO
USERINFO,
WXUSERINFO
} = this.getCommonData()
reportData({
openId: USERINFO.weChatOpenId || '',
openId: WXUSERINFO.openId || '',
unionId: USERINFO.uuid || '',
nickName: USERINFO.weChatNickName || '',
avatar: USERINFO.weChatAvatarUrl || '',
phone: USERINFO.weChatPhone || '',
shopId: USERINFO.merchantId || '',
merchantId: USERINFO.merchantId || '',
shopName: USERINFO.merchantName || '',
shareOpenId: USERINFO.weChatOpenId || '',
sceneCode: currentSceneCode || '',
sceneName: currentSceneName || '',
productCode: arr1.join(','),
productDesc: arr2.join(','),
shopId: USERINFO.merchantId || ''
}, 2).then(res => {
console.log(res)
})
if (!arr.length) return wx.showToast({
title: '请选择产品/活动',
icon: "none"
})
activityApi.applyActivity({
serviceMerchantId: 1,
merchantId: 2,
sceneCode: currentIndex,
productCodes: arr
}).then(res => {
if (res.code == 200) {
const {
USERINFO
} = this.getCommonData()
reportData({
openId: USERINFO.weChatOpenId || '',
unionId: USERINFO.uuid || '',
nickName: USERINFO.weChatNickName || '',
avatar: USERINFO.weChatAvatarUrl || '',
phone: USERINFO.weChatPhone || '',
merchantId: USERINFO.merchantId || ''
}).then(res => {
console.log(res)
})
wx.$router.go('packageActivity.applySuccess')
}
wx.$router.redirectTo('packageActivity.applySuccess')
})
},
getCommonData() {
const USERINFO = wx.$storage.get('userInfo')
const WXUSERINFO = wx.$storage.get('wx_user_info')
return {
USERINFO
USERINFO,
WXUSERINFO
}
}
......
......@@ -69,10 +69,12 @@ page {
.widget {
box-sizing: border-box;
padding: 0 16rpx;
display: flex;
.element {
width: 154rpx;
flex: 0 0 23%;
// width: 154rpx;
height: 180rpx;
margin-right: 2%;
background: #F7F8FA;
border-radius: 16rpx;
display: flex;
......@@ -80,7 +82,6 @@ page {
align-items: center;
position: relative;
border: 2rpx solid #F7F8FA;
.icon {
width: 56rpx;
height: 56rpx;
......@@ -167,9 +168,14 @@ page {
font-weight: 400;
font-size: 28rpx;
color: #323436;
line-height: 44rpx;
line-height: 60rpx;
margin-bottom: 20rpx;
border: 1rpx solid #F5F6FA;
display: inline-block;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.active {
......
<view class="container">
<image mode="widthFix" style="height: 480rpx;" src="{{IMGURL + 'apply_activity_bg_' + currentIndex + '.png'}}" />
<image mode="widthFix" style="height: 480rpx;" src="{{IMGURL + 'apply_activity_bg_' + currentSceneCode + '.png'}}" />
<view class="pos_wrap">
<view class="wrapper">
<view class="title">
......@@ -11,15 +11,15 @@
<view class="label">开通门店活动产品/活动</view>
</view>
<view class="sinceTitle">业务场景</view>
<view class="widget flex_scb">
<view class="widget">
<block wx:for="{{list}}" wx:key="index">
<view bind:tap="select" data-index="{{index}}" class="element {{currentIndex==index?'active':''}}">
<view bind:tap="select" data-index="{{index}}" data-item="{{item}}" class="element {{currentIndex==index?'active':''}}">
<image mode="widthFix" class="icon" src="{{IMGURL}}apply_activity_icon_{{index+1}}.png" />
<view class="name {{currentIndex==index?'active_color':''}}">
{{item.name}}
{{item.stage}}
</view>
<view class="tip {{currentIndex==index?'active_color':''}}">
{{item.tip}}
{{item.name}}
</view>
<view class="triangle-down"></view>
<!-- <view class="triangle-down_temp"></view> -->
......@@ -34,7 +34,7 @@
<block wx:for="{{product}}" wx:key="index">
<view class="box">
<view bind:tap="selectProduct" data-index="{{index}}" data-item="{{item}}" class="element flex_cc {{item.isSelect?'active':''}}">
{{item.name}}
{{item.productName}}
</view>
</view>
</block>
......
......@@ -34,7 +34,7 @@ Page({
activityId
}).then(res => {
res.orderList && res.orderList.forEach(val => {
val.time = val.payDate ? new Date(val.payDate).format('yyyy-MM-dd hh:mm:ss') : ''
val.time = val.createdDate ? new Date(val.createdDate).format('yyyy-MM-dd hh:mm:ss') : ''
val.orderPrice = centsToyuan(val.orderPrice)
})
this.setData({
......
......@@ -163,5 +163,22 @@
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
\ No newline at end of file
......@@ -43,6 +43,10 @@
</view>
</block>
</view>
<view class="no-data" wx:if="{{!list.length}}">
<image webp src="{{IMGURL}}no_order_data.png"></image>
<view class="text">暂无订单</view>
</view>
</view>
</view>
<!-- 预约安装弹窗 -->
......
// packageActivity/pages/shareTaskDetail/shareTaskDetail.js
import index_const from "~/pages/tab/index/index_const"
import ActivityApi from '~/api/activityApi/index'
import { showEmoji } from '~/utils/emoji'
Page({
/**
......@@ -29,7 +30,7 @@ Page({
res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => {
typeArr.push(val.materialType)
if (val.materialType == 1) { // 文案
res.textContent = val.materialContent
res.filterTextContent = `<view>${showEmoji(val.materialContent)}</view>`
}
if (val.materialType == 2 || val.materialType == 3) { // 图片视频
res.imgUrlList.push({
......
......@@ -16,7 +16,7 @@
</view>
<view class="content" wx:if="{{!fn.indexOf(materialTypeArr, 4)}}">
<view class="text-box">
<text>{{detailInfo.textContent}}</text>
<mp-html content="{{detailInfo.filterTextContent}}"></mp-html>
</view>
<view class="img_video">
<block wx:for="{{detailInfo.imgUrlList}}" wx:key="index">
......
// packageActivity/pages/taskDetail/taskDetail.js
import index_const from "~/pages/tab/index/index_const"
import ActivityApi from '~/api/activityApi/index'
import { showEmoji } from '~/utils/emoji'
import {
taskShareReport
} from '~/api/api.js'
import {
domain
} from '~/utils/request/http'
......@@ -68,6 +72,7 @@ Page({
// materialType 素材类型1文案 2图片 3视频 4专属链接
if (val.materialType == 1) { // 文案
res.textContent = val.materialContent
res.filterTextContent = `<view>${showEmoji(val.materialContent)}</view>`
}
if (val.materialType == 2 || val.materialType == 3) { // 图片视频
res.imgUrlList.push({
......@@ -85,7 +90,7 @@ Page({
detailInfo: res,
materialTypeArr: typeArr
})
this.shareImage = res.imgUrlList[0] ? res.imgUrlList[0].url : `${this.data.IMGURL}share_task_default_img.png`
this.shareImage = res.imgUrlList[0] && res.imgUrlList[0].materialType == 2 ? res.imgUrlList[0].url : `${this.data.IMGURL}share_task_default_img.png`
this.shareTitle = res.activityName || '门店助手'
})
},
......@@ -129,7 +134,8 @@ Page({
// 复制链接
copyUrl(e) {
let { linkUrl, activityName } = this.data.detailInfo
let that = this
let { linkUrl, activityName, missonType } = that.data.detailInfo
const userStorage = wx.$storage.get('userInfo')
wx.setClipboardData({
data: `${userStorage.name || ''}邀请你参加${activityName || ""} ${linkUrl}`,
......@@ -138,6 +144,21 @@ Page({
title: '活动链接已复制,请打开企微进行转发',
icon: "none"
})
if (missonType == 2) { // 复制触发一次埋点上报
const USERINFO = wx.$storage.get('userInfo')
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"), // 分享时间
...that.shareTrackData
}
let jsonList = JSON.stringify(data)
taskShareReport({jsonList})
}
}
})
},
......@@ -237,7 +258,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow(options) {
console.log(options)
},
/**
......
......@@ -31,9 +31,9 @@
<view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
</view>
</view>
<view class="content" wx:if="{{!fn.indexOf(materialTypeArr, 4)}}">
<view class="content" wx:if="{{!fn.indexOf(materialTypeArr, 4) && detailInfo.platformMerchantMissionMaterialResponseList.length}}">
<view class="text-box">
<text>{{detailInfo.textContent}}</text>
<mp-html content="{{detailInfo.filterTextContent}}"></mp-html>
</view>
<view class="img_video">
<block wx:for="{{detailInfo.imgUrlList}}" wx:key="index">
......@@ -63,10 +63,10 @@
<view class="btn" wx:if="{{fn.indexOf(materialTypeArr, 1)}}" bind:tap="copyText">复制文案</view>
<view class="btn" wx:if="{{detailInfo.missonType != 2 || fn.indexOf(materialTypeArr, 4)}}" bind:tap="copyUrl">复制链接</view>
<view class="btn" bind:tap="saveWith" wx:if="{{fn.indexOf(materialTypeArr, 2) || fn.indexOf(materialTypeArr, 3)}}">
<text>一键保存图片</text>
<text>一键保存{{fn.indexOf(materialTypeArr, 2) ? '图片' : '视频'}}</text>
<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
</view>
<!-- <view class="btn primary" bind:tap="share">分享</view> -->
<button class="btn primary" wx:if="{{detailInfo.missonType == 2}}" open-type="share">分享</button>
<button class="btn primary" wx:if="{{detailInfo.missonType == 2 && !fn.indexOf(materialTypeArr, 4)}}" open-type="share">分享</button>
</view>
</view>
......@@ -112,5 +112,21 @@
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
......@@ -40,5 +40,9 @@
</view>
</block>
</view>
<view class="no-data" wx:if="{{!list.length}}">
<image webp src="{{IMGURL}}no_visitor_data.png"></image>
<view class="text">暂无访客</view>
</view>
</view>
</view>
......@@ -16,7 +16,6 @@ Page({
},
onRoute(e) {
console.log(e)
this.setData({
infoData: e
})
......
......@@ -14,4 +14,18 @@
text-align: center;
color: #1B233D;
}
.no-data{
display: flex;
flex-flow: column;
margin-top: 328rpx;
image{
width: 400rpx;
height: 400rpx;
}
.text{
font-size: 28rpx;
color: #7A8299;
text-align: center;
}
}
}
\ No newline at end of file
<!--packageActivity/pages/warReport/warReport.wxml-->
<view class="content">
<view class="time-box">{{infoData.reportCreatedDate}}</view>
<image src="{{infoData.reportUrl}}" mode="widthFix"></image>
<block wx:if="{{infoData.reportCreatedDate && infoData.reportUrl}}">
<view class="time-box">最近更新于 {{infoData.reportCreatedDate}}</view>
<image src="{{infoData.reportUrl}}" mode="widthFix"></image>
</block>
<view wx:else class="no-data">
<image webp src="{{IMGURL}}no_warReport_data.png"></image>
<view class="text">活动战报未生成,请耐心等待</view>
</view>
</view>
/* pages/tab/index/components/activeBox/activeBox.wxss */
.content{
padding: 0 22rpx 2rpx 24rpx;
.content-box{
padding: 0 22rpx 50rpx 24rpx;
.content-item{
width: 100%;
box-sizing: border-box;
position: relative;
display: inline-block;
margin: 32rpx 0 8rpx 0;
border-radius: 24rpx;
overflow: hidden;
.item-bg{
width: 100%;
height: 100%;
border-radius: 24rpx;
overflow: hidden;
position: absolute;
box-shadow: 0 10rpx 20rpx 0 rgba(204,133,122,0.16);
z-index: -1;
......@@ -69,9 +69,10 @@
padding-bottom: 40rpx;
}
.hidden{
height: 80rpx;
height: 64rpx;
padding: 0;
background: transparent;
margin-top: 0;
transition: height .3;
.box-content{
display: none;
......@@ -85,7 +86,6 @@
justify-content: center;
font-size: 26rpx;
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
.btn{
......@@ -140,5 +140,8 @@
}
}
}
}
}
.content-item:first-child{
margin: 16rpx 0 8rpx 0;
}
}
\ No newline at end of file
<!--pages/tab/index/components/activeBox/activeBox.wxml-->
<view class="content">
<view class="content-box">
<block wx:for="{{activeList}}" wx:key="index">
<view class="content-item">
<view class="item-bg">
......@@ -26,7 +26,7 @@
</view>
</view>
<!-- 展开/收起 -->
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" data-key="{{index}}">
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" data-key="{{index}}" style="bottom: {{item.isCollapse ? 24 : 48}}rpx;">
<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>
......
......@@ -38,15 +38,18 @@
color: #1B233D;
}
}
.active{
background-image: linear-gradient(180deg, #FFF7DB 15%, #FFF1E0 87%);
}
.completed{
background-image: linear-gradient(180deg, #FFD84B 28%, #FFB33E 76%);
.task-time{
color: #FFFFFF;
}
}
.active{
background-image: linear-gradient(180deg, #FFF7DB 15%, #FFF1E0 87%);
.task-time{
color: #1B233D;
}
}
}
}
.swiper-dots{
......
......@@ -8,7 +8,7 @@
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="val" wx:for-index="k" wx:key="k">
<swiper-item class='swiper_item'>
<block wx:for="{{val}}" wx:for-item="v" wx:for-index="j" wx:key="j">
<view class="time-box {{v.status == 2 ? 'completed' : (activeDateIndex == v.ind ? 'active' : '')}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<view class="time-box {{v.status == 2 ? 'completed' : ''}} {{activeDateIndex == v.ind ? 'active' : ''}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<image webp src="{{IMGURL}}{{v.status == 2 ? 'task_completed.png' : 'calender_integral_icon.png'}}"></image>
<view class="task-time">{{v.status == 2 ? '已完成' : v.time}}</view>
</view>
......
......@@ -58,7 +58,7 @@ Component({
val.isloading = true
ActivityApi.getActivityEndInstallOrderList({activityId: 495}).then(res => {
res.orderList && res.orderList.forEach(it => {
it.time = new Date(it.payDate).format('yyyy-MM-dd hh:mm:ss')
it.time = new Date(it.createdDate).format('yyyy-MM-dd hh:mm:ss')
})
val.isloading = false
val.isCollapse = false
......
/* pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxss */
.content{
padding: 0 22rpx 2rpx 24rpx;
padding: 0 22rpx 50rpx 24rpx;
.content-item{
width: 100%;
box-sizing: border-box;
......@@ -63,6 +63,7 @@
background-image: linear-gradient(180deg, #99B4FF 16%, #6276F5 93%);
border-radius: 20rpx;
display: flex;
align-items: center;
padding: 32rpx;
box-sizing: border-box;
.left{
......@@ -171,5 +172,8 @@
}
}
}
}
}
.content-item:first-child{
margin: 16rpx 0 8rpx 0;
}
}
\ No newline at end of file
......@@ -9,13 +9,13 @@
<view class="title {{ind > 1 ? 'primary-title': ''}}">{{data.overviewData[i].all.title}}</view>
<view class="number">{{data.overviewData[i].all.num || 0}}</view>
<view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].all.sort || '-'}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{data.overviewData[i].all.sort > 0 ? 'up' : 'down'}}">{{fn.mathABS(data.overviewData[i].all.sort) || '-'}}<text wx:if="{{data.overviewData[i].all.sort}}">{{data.overviewData[i].all.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view>
<view wx:else class="sort"><text>排名 </text><text class="{{!data.overviewData[i].all.sort ? '' : (data.overviewData[i].all.sort > 0 ? 'up' : 'down')}}">{{fn.mathABS(data.overviewData[i].all.sort) || '-'}}<text wx:if="{{data.overviewData[i].all.sort}}">{{data.overviewData[i].all.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view>
</view>
<view class="today">
<view class="title">{{data.overviewData[i].today.title}}</view>
<view class="number">{{data.overviewData[i].today.num || 0}}</view>
<view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].today.sort || '-'}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{data.overviewData[i].today.sort > 0 ? 'up' : 'down'}}">{{fn.mathABS(data.overviewData[i].today.sort) || '-'}}<text wx:if="{{data.overviewData[i].today.sort}}">{{data.overviewData[i].today.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view>
<view wx:else class="sort"><text>排名 </text><text class="{{!data.overviewData[i].today.sort ? '' : (data.overviewData[i].today.sort > 0 ? 'up' : 'down')}}">{{fn.mathABS(data.overviewData[i].today.sort) || '-'}}<text wx:if="{{data.overviewData[i].today.sort}}">{{data.overviewData[i].today.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view>
</view>
</view>
</block>
......@@ -24,7 +24,7 @@
<view wx:else class="active-overview">
<view class="overview-item-box" style="{{backStyle[0]}}">
<view class="all" wx:for="{{data.overviewData}}" wx:for-item="val" wx:for-index="key" wx:key="key" bind:tap="jump" data-index="{{key}}">
<view class="title">{{val.title}}</view>
<view class="title {{key > 1 ? 'primary-title': ''}}">{{val.title}}</view>
<view class="number">{{val.num || 0}}</view>
<view class="sort"><text>最终排名:</text>{{val.sort || '-'}}</view>
</view>
......
......@@ -2,6 +2,7 @@
.active-top{
display: flex;
.active-img{
flex-shrink: 0;
position: relative;
width: 160rpx;
height: 160rpx;
......@@ -46,8 +47,10 @@
.activity-type{
float: right;
line-height: 44rpx;
font-size: 28rpx;
color: #FE5662;
font-size: 28rpx;
font-weight: 400;
color: #FE5662;
margin-top: 4rpx;
image{
margin-top: 4rpx;
width: 32rpx;
......
......@@ -13,7 +13,8 @@ var formatNumber = function (e) {
}
var timeFilter = function(e) {
return getDate(e) > getDate().setHours(0, 0, 0, 0);
console.log(getDate(e).getTime(), getDate().setHours(8, 0, 0, 0))
return getDate(e).getTime() == getDate().setHours(8, 0, 0, 0);
}
module.exports = {
......
......@@ -14,12 +14,12 @@ Component({
if (s) {
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访问量', num: s.fansCount},
{title: '访客量', num: s.fansCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.conversionRate},
{title: '转化率', sort: s.fansRate}
{title: '访客率', sort: s.fansRate},
{title: '转化率', sort: s.conversionRate}
]
}
this.setData({data: v})
......
......@@ -72,7 +72,8 @@ Page({
pageNum: num == 1 ? activePageNum : pageNum,
pageSize
}).then(res => {
let activityTitleViewWidth = wx.getSystemInfoSync().windowWidth - 139 // 活动title区域宽度
let windowWidth = wx.getSystemInfoSync().windowWidth
let activityTitleViewWidth = windowWidth - (((windowWidth / 375) * (46 + 48 + 160 + 24))) / 2 // 活动title区域宽度
res.list && res.list.forEach((val, index) => {
val.isCollapse = true
val.startTime = val.startTime.split(' ')[0]
......@@ -115,7 +116,7 @@ Page({
ActivityApi.getActivityEndInstallOrderList({activityId: val.id}).then(res => {
val.isCollapse = false
res.orderList && res.orderList.forEach(it => {
it.time = new Date(it.payDate).format('yyyy-MM-dd hh:mm:ss')
it.time = new Date(it.createdDate).format('yyyy-MM-dd hh:mm:ss')
})
val.orderList = res.orderList
val.orderTotal = res.orderTotal
......
page{
overflow: hidden;
}
.navigation-bar {
position: fixed;
top: 0;
......@@ -25,42 +28,46 @@
left: 0;
}
}
.content {
position: relative;
overflow: hidden;
.tab-box {
.tab-box {
position: sticky;
top: 0;
left: 0;
z-index: 2;
display: flex;
height: 112rpx;
margin-bottom: 16rpx;
.tab {
flex: 1;
display: flex;
height: 112rpx;
.tab {
flex: 1;
display: flex;
flex-flow: column;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #2D2D33;
opacity: 0.9;
.text{
margin: 28rpx 0;
}
.line{
transform: scale(0);
transition: all .25s;
}
}
.active {
font-size: 36rpx;
font-weight: 600;
.line{
width: 48rpx;
height: 8rpx;
background: #708CFF;
border-radius: 3px 3px 0 0;
box-shadow: 0 4rpx 4rpx 0 #708CFF;
transform: scale(1);
}
}
}
flex-flow: column;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #2D2D33;
opacity: 0.9;
.text{
margin: 28rpx 0;
}
.line{
transform: scale(0);
transition: all .25s;
}
}
.active {
font-size: 36rpx;
font-weight: 600;
.line{
width: 48rpx;
height: 8rpx;
background: #708CFF;
border-radius: 3px 3px 0 0;
// box-shadow: 0 4rpx 4rpx 0 #708CFF;
transform: scale(1);
}
}
}
.content{
height: calc(100% - 112rpx);
}
.add-activity{
position: fixed;
......
......@@ -4,36 +4,34 @@
</navigation-bar>
</view>
<block wx:if="{{navHeight}}">
<view class="layout" style="top:{{navHeight}}px">
<view class="layout" style="top:{{navHeight}}px;height: calc(100vh - {{navHeight*2}}rpx);">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<image webp src="{{IMGURL}}/index_bg.png?v={{img_version}}"></image>
</view>
</view>
<view class="content">
<!-- tab切换 -->
<view class="tab-box" style="top: {{navHeight}}px">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index == tabIndex? 'active' : '' }}" bindtap="click" data-index="{{index}}">
<view class="text">{{item.name}} ({{index == 0 ? activeTotal : total}})</view>
<view class="line"></view>
</view>
</block>
</view>
<!-- 活动中 -->
<view class="active-content" hidden="{{tabIndex != 0}}">
<block>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}" allTaskCount="{{allTaskCount}}"></active-box>
</block>
</view>
<!-- 活动诊断 -->
<view class="activity-diag-content" hidden="{{tabIndex != 1}}">
<block>
<!-- tab切换 -->
<view class="tab-box" style="top: {{navHeight}}px">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index == tabIndex? 'active' : '' }}" bindtap="click" data-index="{{index}}">
<view class="text">{{item.name}} ({{index == 0 ? activeTotal : total}})</view>
<view class="line"></view>
</view>
</block>
</view>
<!-- 活动中 -->
<scroll-view scroll-y class="content" hidden="{{tabIndex != 0}}">
<block>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}" allTaskCount="{{allTaskCount}}"></active-box>
</block>
</scroll-view>
<!-- 活动诊断 -->
<scroll-view scroll-y class="content" hidden="{{tabIndex != 1}}">
<block>
<activity-diagnosis activityList="{{activityEndList}}" nothing="{{nothing}}"></activity-diagnosis>
</block>
</view>
</view>
</scroll-view>
<!-- 申请活动 -->
<view class="add-activity" bind:tap="applyActivity">
<image webp src="{{IMGURL}}application_activity.png"></image>
......
/**emoji正则 */
const emoji = [
['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴'],
['睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过'],
['酷', '囧', '抓狂', '吐', '微笑', '愉快', '白眼', '傲慢'],
['饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂'],
['疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见'],
['擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠'],
['鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀'],
['西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰'],
['凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀'],
['足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强'],
['弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你'],
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'],
['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'],
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹']
]
const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac])/g
/**过滤表情 */
......@@ -20,3 +37,20 @@ export function replaceEmoji(value) {
let val = value.replace(emojiReg, '')
return val.trimStart().trimEnd()
}
// 表情回显 文本内容
export function showEmoji(value) {
let filterValue = value.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;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png" />`;
})
return filterValue
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!