Commit 82113ebb by 前端

fixed

1 parent 99b23238
......@@ -68,7 +68,7 @@ class ActivityApi {
// 获取我的访客数据
getActivityVisitorList(data) {
return api.post({
method: `${path}.user.activity.visitor.list`,
method: `scrm.api.shopmall.customer.visitor.records`,
...data,
});
}
......
......@@ -29,7 +29,7 @@
<view class="flex_direction_column_item" wx:for="{{sfaff}}" wx:for-index="index" wx:key="index">
<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'>
<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:else>{{litem||'--'}}</block>
</view>
......
......@@ -5,7 +5,7 @@
</view>
<view class="main-box">
<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}}">
<view class="content-box">
<block wx:for="{{listData}}" wx:key="index">
......
......@@ -14,15 +14,16 @@ Component({
let s = v
v.overviewData = { // 活动中
browseData: {
all: { title: '总浏览', num: s.browseCount}
all: { title: '总浏览', num: s.browsCount}
},
shareData: {
all: { title: '产值(总)/元', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
},
visitorData: {
all: { title: '总访客', num: s.visitcount},
all: { title: '总访客', num: s.visitCount},
},
}
console.log(v)
this.setData({ data: v })
}
}
......
......@@ -7,6 +7,7 @@
justify-content: space-around;
.tab-item {
color: #666666;
padding: 0rpx 20rpx;
&.checked {
color: #708CFF;
}
......
......@@ -64,7 +64,7 @@ Component({
onLoad(options) {
const {merchantId,merchantName} = options;
this.setData({merchantId:44211227,merchantName})
this.setData({merchantId,merchantName})
this.getSubscribeConfig(options)
this.addEvent()
},
......
......@@ -13,21 +13,21 @@ Page({
toActivity(){
const activityInfo = this.data.activityInfo
// wx.navigateToMiniProgram({
// appId: 'wxe10067a63c1856ac',
// path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
// envVersion: 'trial',
// success(res) {
// // 打开成功
// }
// })
wx.$router.go(
"/pages/crowdfunding/index/index",
{
id: activityInfo.crowdFundActivityId,
merchantId: activityInfo.merchantNo
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
envVersion: 'trial',
success(res) {
// 打开成功
}
);
})
// wx.$router.go(
// "/pages/crowdfunding/index/index",
// {
// id: activityInfo.crowdFundActivityId,
// merchantId: activityInfo.merchantNo
// }
// );
},
handleplay() {
this.setData({
......
......@@ -53,7 +53,7 @@ Page({
getDetail(activityId) {
let tabelTh = {
shareName: '员工',
totalOrderAmount: '产值(营业额)',
totalOrderAmount: '产值',
totalShareCount: '转发次数',
totalVisitorRank: '访客总数',
totalBrowseCount: '浏览总数',
......
......@@ -46,20 +46,7 @@ Page({
name: 'upgradeRatio',
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 index_const from "~/packagesList/outDetail/index_const"
import { commentTime } from '~/utils/format'
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
allNum: 0,
todayNum: 0,
activityTypList: index_const.data.activityTypList,
IMG_URL:IMG_URL,
isPravite:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
if(options.isPravite)return this.getVistiors(options)
let activityId = options.id
ActivityApi.getActivityVisitorList({
activityId
}).then(res => {
res.visitorList && res.visitorList.forEach(val => {
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
if(!val.customerPhone&&val.guestId){
val.gId = (val.guestId.split('_')).pop() || ''
/**
* 页面的初始数据
*/
data: {
list: [],
allNum: 0,
todayNum: 0,
activityTypList: index_const.data.activityTypList,
IMG_URL: IMG_URL_STORE,
isPravite: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
let { activityId, visitCount, visitCountToday } = options
ActivityApi.getActivityVisitorList({
activityId
}).then(res => {
console.log(res)
res.list && res.list.forEach(val => {
val.lastVisitFormatTime = commentTime(new Date(val.lastBrowseDate).getTime())
// if (!val.customerPhone && val.guestId) {
// val.gId = (val.guestId.split('_')).pop() || ''
// }
})
this.setData({
allNum: visitCount,
todayNum: visitCountToday,
list: res.list
})
})
},
toCopyName(e) {
const { name } = e.currentTarget.dataset
if (name) {
wx.setClipboardData({
data: name
})
}
})
this.setData({
allNum: res.visitorTotal,
todayNum: res.todayTotal,
list: res.visitorList
})
})
},
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
wx.setClipboardData({
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) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success (res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success(res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
})
}
})
}
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
}
})
\ No newline at end of file
......@@ -55,6 +55,7 @@
color: #1B233D;
display: flex;
align-items: center;
max-width: 160rpx;
.copy{
width: 28rpx;
height: 28rpx;
......
......@@ -5,8 +5,8 @@
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view>
<view>总访客<text> · {{allNum||0}}</text></view>
<view>今日访客<text> · {{todayNum||0}}</text></view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
......@@ -14,15 +14,15 @@
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<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">
{{item.customerNickName || ""}}
<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>
{{item.customerName || ""}}
<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> -->
</view>
<view class="mobile" wx:if="{{item.customerPhone}}">
{{item.customerPhone}}
<view class="mobile" wx:if="{{item.mobile}}">
{{item.mobile}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile" wx:else>
......@@ -32,7 +32,7 @@
</view>
</view>
<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>
</view>
</view>
......@@ -42,7 +42,7 @@
<!-- <text>{{activityTypList[0]}}</text> -->
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}} 次</text>
<text>浏览 {{item.browseCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
......@@ -54,11 +54,11 @@
<view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top">
<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 style="padding-top:8rpx" class="name">
{{item.customerNickName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
{{item.customerName || "未知访客"}}
<glsx-image wx:if="{{item.customerName&&item.customerName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view>
</view>
</view>
......@@ -69,7 +69,7 @@
{{item.taskName || ''}}
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}}次</text>
<text>浏览 {{item.browseCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
......
......@@ -57,7 +57,7 @@ Component({
methods: {
jumpDetail(e) {
const {item:{type,name},info} = e.currentTarget.dataset
// if(info[name] == '未开通')return
if(info[name] == '未开通')return
wx.navigateTo({
url: `/packagesList/outDetail/index?merchantId=${info.merchantId4s}&type=${type}&merchantName=${info.merchantName4s}`,
})
......
......@@ -56,19 +56,19 @@ export function commentTime(dateTimeStamp) {
let monthTime = dayTime * 30
let yearTime = dayTime * 365
if (math.floor(timeDifference / yearTime) >= 1) {
result = math.floor(timeDifference / yearTime) + '年前'
} else if (math.floor(timeDifference / monthTime) >= 1) {
result = math.floor(timeDifference / monthTime) + '月前'
} else if (math.floor(timeDifference / weektTime) >= 1) {
result = math.floor(timeDifference / weektTime) + '周前'
} else if (math.floor(timeDifference / dayTime) >= 1) {
result = math.floor(timeDifference / dayTime) + '天前'
} else if (math.floor(timeDifference / hourTime) >= 1) {
result = math.floor(timeDifference / hourTime) + '小时前'
} else if (math.floor(timeDifference / minTime) >= 1) {
result = math.floor(timeDifference / minTime) + '分钟前'
if (math.floor(timeDifference / minTime) <= 5) {
if (Math.floor(timeDifference / yearTime) >= 1) {
result = Math.floor(timeDifference / yearTime) + '年前'
} else if (Math.floor(timeDifference / monthTime) >= 1) {
result = Math.floor(timeDifference / monthTime) + '月前'
} else if (Math.floor(timeDifference / weektTime) >= 1) {
result = Math.floor(timeDifference / weektTime) + '周前'
} else if (Math.floor(timeDifference / dayTime) >= 1) {
result = Math.floor(timeDifference / dayTime) + '天前'
} else if (Math.floor(timeDifference / hourTime) >= 1) {
result = Math.floor(timeDifference / hourTime) + '小时前'
} else if (Math.floor(timeDifference / minTime) >= 1) {
result = Math.floor(timeDifference / minTime) + '分钟前'
if (Math.floor(timeDifference / minTime) <= 5) {
//五分钟内就是刚刚
result = '刚刚'
}
......
......@@ -40,7 +40,7 @@ if (systemInfo.platform != 'devtools') {
case 'develop':
break
case 'trial':
index = manual ? index : 1
index = manual ? index : 2
break
case 'release':
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!