Commit 4c2eba07 by 前端

fixed

1 parent 82113ebb
......@@ -68,7 +68,7 @@ class ActivityApi {
// 获取我的访客数据
getActivityVisitorList(data) {
return api.post({
method: `scrm.api.shopmall.customer.visitor.records`,
method: `${path}.user.activity.visitor.list`,
...data,
});
}
......
......@@ -78,6 +78,7 @@
"name": "packageOutput",
"pages": [
"pages/shareWebview/shareWebview",
"pages/warReport/warReport",
"pages/visitor/visitor",
"pages/monthReport/monthReport",
"pages/crowdDetail/crowdDetail"
......
......@@ -4,7 +4,7 @@
*/
// 配置预发布的小程序aapId
export const preReleaseAppId = '55555'
export const preReleaseAppId = 'wx96c8f2a3e76907cb'
// 小程序id
export const appId = 'wxc50d04ae5aa9984a'
......
......@@ -38,7 +38,7 @@
.up-box {
position: absolute;
width: 108rpx;
width: 128rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
......
......@@ -2,7 +2,7 @@
padding: 24rpx;
margin: 0rpx 16rpx;
border-radius: 32rpx;
background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
......
......@@ -57,9 +57,12 @@ Component({
jumpReport(e) {
let { item } = e.currentTarget.dataset
if (item.activityStatus == 1) return wx.$api.showToast('当前活动尚未开始')
if(item.activityStatus == 2)
wx.navigateTo({
url: `/packagesList/packageOutput/pages/shareWebview/shareWebview?url=${encodeURIComponent(item.reportUrl)}`,
});
else
wx.$router.go('/packagesList/packageOutput/pages/warReport/warReport', item)
},
// 跳转
jump(e) {
......@@ -72,7 +75,7 @@ Component({
},
// 价格格式化
priceFormat(num, point = 2) {
let numStr = num.toString().split('.')[0]
let numStr = (num/100).toString().split('.')[0]
if (numStr.length < 6) { // 判断数字有多长,如果小于6,,表示10万以内的数字,让其直接显示
return numStr;
} else if (numStr.length >= 6 && numStr.length <= 8) { // 如果数字大于6位,小于8位,让其数字后面加单位万
......
......@@ -15,7 +15,8 @@ Page({
outputValue: [{
label: '今日产值/元',
name: 'realAmountToday',
unit: '¥'
unit: '¥',
multiple: 0.01,
}, {
label: '今日订单/单',
name: 'orderCountToday',
......@@ -27,7 +28,8 @@ Page({
}, {
label: '累计产值/元',
name: 'realAmount',
unit: '¥'
unit: '¥',
multiple: 0.01,
}, {
label: '累计订单/单',
name: 'orderCount',
......
......@@ -15,7 +15,7 @@
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputValue}}" wx:key="index">
<view class="output-num"><text>{{item.unit}}</text>{{outputData[item.name] || 0}}</view>
<view class="output-num"><text>{{item.unit}}</text>{{outputData[item.name]*(item.multiple || 1) || 0}}</view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
......
......@@ -4,119 +4,119 @@ 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_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
})
/**
* 页面的初始数据
*/
data: {
list: [],
allNum: 0,
todayNum: 0,
activityTypList: index_const.data.activityTypList,
IMG_URL:IMG_URL_STORE,
isPravite:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
let activityId = options.activityId
ActivityApi.getActivityVisitorList({
activityId,
staffFlag:true
}).then(res => {
res.visitorList && res.visitorList.forEach(val => {
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
if(!val.customerPhone&&val.guestId){
val.gId = (val.guestId.split('_')).pop() || ''
}
},
// 打电话
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"
})
}
})
this.setData({
allNum: res.visitorTotal,
todayNum: res.todayTotal,
list: res.visitorList
})
})
},
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
wx.setClipboardData({
data: name
})
}
},
// 打电话
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
......@@ -5,8 +5,8 @@
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum||0}}</text></view>
<view>今日访客<text> · {{todayNum||0}}</text></view>
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</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">
<image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{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>
{{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>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view>
<view class="mobile" wx:if="{{item.mobile}}">
{{item.mobile}}
<view class="mobile" wx:if="{{item.customerPhone}}">
{{item.customerPhone}}
<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.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.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.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.browseCount}} 次</text>
<text>浏览 {{item.visitCount}} 次</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">
<image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view style="padding-top:8rpx" class="name">
{{item.customerName || "未知访客"}}
<glsx-image wx:if="{{item.customerName&&item.customerName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
{{item.customerNickName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" 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.browseCount}}次</text>
<text>浏览 {{item.visitCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
......
// packageActivity/pages/warReport/warReport.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(e) {
console.log(e)
this.setData({
infoData: e
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "活动战报"
}
\ No newline at end of file
/* packageActivity/pages/warReport/warReport.wxss */
.content{
width: 100%;
min-height: 100vh;
display: flex;
flex-flow: column;
background: #fff;
align-items: center;
.time-box{
width: 100%;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
text-align: center;
color: #1B233D;
}
.no-data{
display: flex;
flex-flow: column;
margin-top: 328rpx;
.no_data_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">
<block wx:if="{{infoData.reportUrl}}">
<view class="time-box">最近更新于 {{infoData.reportCreatedDate}}</view>
<image src="{{infoData.reportUrl}}" mode="widthFix"></image>
</block>
<view wx:else class="no-data">
<glsx-image class="no_data_image" webp src="store-assistant/no_warReport_data.png"></glsx-image>
<view class="text">活动战报未生成,请耐心等待</view>
</view>
</view>
......@@ -218,8 +218,8 @@ Component({
// 跳转咨询页面
goConsult() {
wx.openCustomerServiceChat({
extInfo: { url: "https://work.weixin.qq.com/kfid/kfcfbc84ad072f27636" },
corpId: "wx51bda2e574d24a91",
extInfo: { url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" },
corpId: "ww047bdc0f1e76cc13",
complete: (r) => {
console.log(r);
},
......
......@@ -5,7 +5,7 @@
</view> -->
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<!-- 背景图 -->
<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+16}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
......
......@@ -21,7 +21,7 @@ const systemInfo = wx.getSystemInfoSync()
const manual = false
const release = false
let index = 1
let index = 2
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!