Commit 82113ebb by 前端

fixed

1 parent 99b23238
...@@ -68,7 +68,7 @@ class ActivityApi { ...@@ -68,7 +68,7 @@ class ActivityApi {
// 获取我的访客数据 // 获取我的访客数据
getActivityVisitorList(data) { getActivityVisitorList(data) {
return api.post({ return api.post({
method: `${path}.user.activity.visitor.list`, method: `scrm.api.shopmall.customer.visitor.records`,
...data, ...data,
}); });
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="flex_direction_column_item" wx:for="{{sfaff}}" wx:for-index="index" wx:key="index"> <view class="flex_direction_column_item" wx:for="{{sfaff}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view> <view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'> <view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl' || 'shareImageUrl'][lindex]}}"></image> <image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl'][lindex] || item.list['shareImageUrl'][lindex]}}"></image>
<block wx:if="{{item.name == '转化率'}}">{{litem?(downType == 'equity'?litem*100:litem)+'%': '--'}}</block> <block wx:if="{{item.name == '转化率'}}">{{litem?(downType == 'equity'?litem*100:litem)+'%': '--'}}</block>
<block wx:else>{{litem||'--'}}</block> <block wx:else>{{litem||'--'}}</block>
</view> </view>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="main-box"> <view class="main-box">
<activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab> <activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% - 40rpx);'}}"> <scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% - 50rpx);'}}">
<block wx:if="{{!noResult}}"> <block wx:if="{{!noResult}}">
<view class="content-box"> <view class="content-box">
<block wx:for="{{listData}}" wx:key="index"> <block wx:for="{{listData}}" wx:key="index">
......
...@@ -14,15 +14,16 @@ Component({ ...@@ -14,15 +14,16 @@ Component({
let s = v let s = v
v.overviewData = { // 活动中 v.overviewData = { // 活动中
browseData: { browseData: {
all: { title: '总浏览', num: s.browseCount} all: { title: '总浏览', num: s.browsCount}
}, },
shareData: { shareData: {
all: { title: '产值(总)/元', num: this.priceFormat(s.realAmount || 0), unit: '¥' } all: { title: '产值(总)/元', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
}, },
visitorData: { visitorData: {
all: { title: '总访客', num: s.visitcount}, all: { title: '总访客', num: s.visitCount},
}, },
} }
console.log(v)
this.setData({ data: v }) this.setData({ data: v })
} }
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
justify-content: space-around; justify-content: space-around;
.tab-item { .tab-item {
color: #666666; color: #666666;
padding: 0rpx 20rpx;
&.checked { &.checked {
color: #708CFF; color: #708CFF;
} }
......
...@@ -64,7 +64,7 @@ Component({ ...@@ -64,7 +64,7 @@ Component({
onLoad(options) { onLoad(options) {
const {merchantId,merchantName} = options; const {merchantId,merchantName} = options;
this.setData({merchantId:44211227,merchantName}) this.setData({merchantId,merchantName})
this.getSubscribeConfig(options) this.getSubscribeConfig(options)
this.addEvent() this.addEvent()
}, },
......
...@@ -13,21 +13,21 @@ Page({ ...@@ -13,21 +13,21 @@ Page({
toActivity(){ toActivity(){
const activityInfo = this.data.activityInfo const activityInfo = this.data.activityInfo
// wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
// appId: 'wxe10067a63c1856ac', appId: 'wxe10067a63c1856ac',
// path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo, path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
// envVersion: 'trial', envVersion: 'trial',
// success(res) { success(res) {
// // 打开成功 // 打开成功
// }
// })
wx.$router.go(
"/pages/crowdfunding/index/index",
{
id: activityInfo.crowdFundActivityId,
merchantId: activityInfo.merchantNo
} }
); })
// wx.$router.go(
// "/pages/crowdfunding/index/index",
// {
// id: activityInfo.crowdFundActivityId,
// merchantId: activityInfo.merchantNo
// }
// );
}, },
handleplay() { handleplay() {
this.setData({ this.setData({
......
...@@ -53,7 +53,7 @@ Page({ ...@@ -53,7 +53,7 @@ Page({
getDetail(activityId) { getDetail(activityId) {
let tabelTh = { let tabelTh = {
shareName: '员工', shareName: '员工',
totalOrderAmount: '产值(营业额)', totalOrderAmount: '产值',
totalShareCount: '转发次数', totalShareCount: '转发次数',
totalVisitorRank: '访客总数', totalVisitorRank: '访客总数',
totalBrowseCount: '浏览总数', totalBrowseCount: '浏览总数',
......
...@@ -46,20 +46,7 @@ Page({ ...@@ -46,20 +46,7 @@ Page({
name: 'upgradeRatio', name: 'upgradeRatio',
unit_: '%' unit_: '%'
}], }],
}, }
billboard: [{
sort: 1,
name: 11,
value: 625000
}, {
sort: 2,
name: 11,
value: 625000
}, {
sort: 3,
name: 11,
value: 625000
}]
}, },
/** /**
......
import { IMG_URL } from "~/utils/constantData"; import { IMG_URL_STORE } from "~/utils/constantData";
import ActivityApi from '~/api/activityApi/index' import ActivityApi from '~/api/activityApi/index'
import index_const from "~/packagesList/outDetail/index_const" import index_const from "~/packagesList/outDetail/index_const"
import { commentTime } from '~/utils/format' import { commentTime } from '~/utils/format'
...@@ -12,8 +12,8 @@ Page({ ...@@ -12,8 +12,8 @@ Page({
allNum: 0, allNum: 0,
todayNum: 0, todayNum: 0,
activityTypList: index_const.data.activityTypList, activityTypList: index_const.data.activityTypList,
IMG_URL:IMG_URL, IMG_URL: IMG_URL_STORE,
isPravite:false isPravite: false
}, },
/** /**
...@@ -23,55 +23,32 @@ Page({ ...@@ -23,55 +23,32 @@ Page({
}, },
onRoute(options) { onRoute(options) {
if(options.isPravite)return this.getVistiors(options) let { activityId, visitCount, visitCountToday } = options
let activityId = options.id
ActivityApi.getActivityVisitorList({ ActivityApi.getActivityVisitorList({
activityId activityId
}).then(res => { }).then(res => {
res.visitorList && res.visitorList.forEach(val => { console.log(res)
val.lastVisitFormatTime = commentTime(val.lastVisitDate) res.list && res.list.forEach(val => {
if(!val.customerPhone&&val.guestId){ val.lastVisitFormatTime = commentTime(new Date(val.lastBrowseDate).getTime())
val.gId = (val.guestId.split('_')).pop() || '' // if (!val.customerPhone && val.guestId) {
} // val.gId = (val.guestId.split('_')).pop() || ''
// }
}) })
this.setData({ this.setData({
allNum: res.visitorTotal, allNum: visitCount,
todayNum: res.todayTotal, todayNum: visitCountToday,
list: res.visitorList list: res.list
}) })
}) })
}, },
toCopyName(e){ toCopyName(e) {
const {name} = e.currentTarget.dataset const { name } = e.currentTarget.dataset
if(name){ if (name) {
wx.setClipboardData({ wx.setClipboardData({
data: name data: name
}) })
} }
}, },
// 私域待运营客户
getVistiors(options){
const userStorage = wx.$storage.get("userInfo");
let para = {
merchantId:userStorage.merchantId
}
ActivityApi.praviteVistitor(para).then(res=>{
res&&res.forEach(val=>{
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
// console.log(val.lastVisitFormatTime);
// if(!val.customerPhone&&val.guestId){
// val.gId = (val.guestId.split('_')).pop() || ''
// }
})
let temp = JSON.parse(options.content)
this.setData({
isPravite:true,
list: res,
todayNum:temp[1].openNum,
allNum:temp[0].openNum,
})
})
},
// 打电话 // 打电话
callPhone(e) { callPhone(e) {
...@@ -85,7 +62,7 @@ Page({ ...@@ -85,7 +62,7 @@ Page({
let { wechartno } = e.currentTarget.dataset let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({ wx.setClipboardData({
data: wechartno.toString(), data: wechartno.toString(),
success (res) { success(res) {
wx.showToast({ wx.showToast({
title: '微信号已复制', title: '微信号已复制',
icon: "none" icon: "none"
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
color: #1B233D; color: #1B233D;
display: flex; display: flex;
align-items: center; align-items: center;
max-width: 160rpx;
.copy{ .copy{
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
</view> </view>
<view class="content"> <view class="content">
<view class="title"> <view class="title">
<view>总访客<text> · {{allNum}}</text></view> <view>总访客<text> · {{allNum||0}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view> <view>今日访客<text> · {{todayNum||0}}</text></view>
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:if="{{!isPravite}}"> <block wx:if="{{!isPravite}}">
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}"> <view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top"> <view class="top">
<view class="top-left"> <view class="top-left">
<glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-image> <image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile"> <view class="name-mobile">
<view class="name"> <view class="name">
{{item.customerNickName || ""}} {{item.customerName || ""}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" data-name="{{item.customerNickName}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image> <glsx-image wx:if="{{item.customerName&&item.customerName!='未知访客'}}" data-name="{{item.customerName}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> --> <!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view> </view>
<view class="mobile" wx:if="{{item.customerPhone}}"> <view class="mobile" wx:if="{{item.mobile}}">
{{item.customerPhone}} {{item.mobile}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view> </view>
<view class="mobile" wx:else> <view class="mobile" wx:else>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
</view> </view>
<view class="top-right"> <view class="top-right">
<glsx-image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="store-assistant/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></glsx-image> <glsx-image class="btn_icon" wx:if="{{item.mobile}}" webp src="store-assistant/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.mobile}}"></glsx-image>
<glsx-image class="btn_icon" wx:if="{{item.userWechartNo}}" webp src="store-assistant/activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></glsx-image> <glsx-image class="btn_icon" wx:if="{{item.userWechartNo}}" webp src="store-assistant/activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></glsx-image>
</view> </view>
</view> </view>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- <text>{{activityTypList[0]}}</text> --> <!-- <text>{{activityTypList[0]}}</text> -->
</view> </view>
<view class="footprint"> <view class="footprint">
<text>浏览 {{item.visitCount}} 次</text> <text>浏览 {{item.browseCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text> <text>{{item.lastVisitFormatTime}} 访问过</text>
</view> </view>
</view> </view>
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
<view class="list-item {{item.visitStatus==1?'orderde':''}}"> <view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top"> <view class="top">
<view class="top-left"> <view class="top-left">
<glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-image> <image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile"> <view class="name-mobile">
<view style="padding-top:8rpx" class="name"> <view style="padding-top:8rpx" class="name">
{{item.customerNickName || "未知访客"}} {{item.customerName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image> <glsx-image wx:if="{{item.customerName&&item.customerName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view> </view>
</view> </view>
</view> </view>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
{{item.taskName || ''}} {{item.taskName || ''}}
</view> </view>
<view class="footprint"> <view class="footprint">
<text>浏览 {{item.visitCount}}次</text> <text>浏览 {{item.browseCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text> <text>{{item.lastVisitFormatTime}} 访问过</text>
</view> </view>
</view> </view>
......
...@@ -57,7 +57,7 @@ Component({ ...@@ -57,7 +57,7 @@ Component({
methods: { methods: {
jumpDetail(e) { jumpDetail(e) {
const {item:{type,name},info} = e.currentTarget.dataset const {item:{type,name},info} = e.currentTarget.dataset
// if(info[name] == '未开通')return if(info[name] == '未开通')return
wx.navigateTo({ wx.navigateTo({
url: `/packagesList/outDetail/index?merchantId=${info.merchantId4s}&type=${type}&merchantName=${info.merchantName4s}`, url: `/packagesList/outDetail/index?merchantId=${info.merchantId4s}&type=${type}&merchantName=${info.merchantName4s}`,
}) })
......
...@@ -56,19 +56,19 @@ export function commentTime(dateTimeStamp) { ...@@ -56,19 +56,19 @@ export function commentTime(dateTimeStamp) {
let monthTime = dayTime * 30 let monthTime = dayTime * 30
let yearTime = dayTime * 365 let yearTime = dayTime * 365
if (math.floor(timeDifference / yearTime) >= 1) { if (Math.floor(timeDifference / yearTime) >= 1) {
result = math.floor(timeDifference / yearTime) + '年前' result = Math.floor(timeDifference / yearTime) + '年前'
} else if (math.floor(timeDifference / monthTime) >= 1) { } else if (Math.floor(timeDifference / monthTime) >= 1) {
result = math.floor(timeDifference / monthTime) + '月前' result = Math.floor(timeDifference / monthTime) + '月前'
} else if (math.floor(timeDifference / weektTime) >= 1) { } else if (Math.floor(timeDifference / weektTime) >= 1) {
result = math.floor(timeDifference / weektTime) + '周前' result = Math.floor(timeDifference / weektTime) + '周前'
} else if (math.floor(timeDifference / dayTime) >= 1) { } else if (Math.floor(timeDifference / dayTime) >= 1) {
result = math.floor(timeDifference / dayTime) + '天前' result = Math.floor(timeDifference / dayTime) + '天前'
} else if (math.floor(timeDifference / hourTime) >= 1) { } else if (Math.floor(timeDifference / hourTime) >= 1) {
result = math.floor(timeDifference / hourTime) + '小时前' result = Math.floor(timeDifference / hourTime) + '小时前'
} else if (math.floor(timeDifference / minTime) >= 1) { } else if (Math.floor(timeDifference / minTime) >= 1) {
result = math.floor(timeDifference / minTime) + '分钟前' result = Math.floor(timeDifference / minTime) + '分钟前'
if (math.floor(timeDifference / minTime) <= 5) { if (Math.floor(timeDifference / minTime) <= 5) {
//五分钟内就是刚刚 //五分钟内就是刚刚
result = '刚刚' result = '刚刚'
} }
......
...@@ -40,7 +40,7 @@ if (systemInfo.platform != 'devtools') { ...@@ -40,7 +40,7 @@ if (systemInfo.platform != 'devtools') {
case 'develop': case 'develop':
break break
case 'trial': case 'trial':
index = manual ? index : 1 index = manual ? index : 2
break break
case 'release': case 'release':
index = release ? index : 3 index = release ? index : 3
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!