Commit 78550792 by 杨明

fixed

1 parent 642d6a20
......@@ -14,13 +14,13 @@ Component({
let s = v
v.overviewData = { // 活动中
browseData: {
all: { title: '总浏览', num: s.browsCount}
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)
......@@ -57,12 +57,13 @@ Component({
jumpReport(e) {
let { item } = e.currentTarget.dataset
if (item.activityStatus == 1) return wx.$api.showToast('当前活动尚未开始')
if(item.activityStatus == 2)
wx.navigateTo({
// if(item.activityStatus == 2)
// 不区分活动是否在进行中 有返回值就跳转
item.reportUrl && wx.navigateTo({
url: `/packagesList/packageOutput/pages/shareWebview/shareWebview?url=${encodeURIComponent(item.reportUrl)}`,
});
else
wx.$router.go('/packagesList/packageOutput/pages/warReport/warReport', item)
// else
// wx.$router.go('/packagesList/packageOutput/pages/warReport/warReport', item)
},
// 跳转
jump(e) {
......@@ -75,19 +76,22 @@ Component({
},
// 价格格式化
priceFormat(num, point = 2) {
let numStr = (num/100).toString().split('.')[0]
if (numStr.length < 6) { // 判断数字有多长,如果小于6,,表示10万以内的数字,让其直接显示
let numStr = (num / 100).toString().split('.')[0]
return numStr;
} else if (numStr.length >= 6 && numStr.length <= 8) { // 如果数字大于6位,小于8位,让其数字后面加单位万
point = 0
let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
console.log(decimal);
// 由千位,百位组成的一个数字
return parseFloat(parseInt(num / 10000) + '.' + decimal) + '万'
} else if (numStr.length > 8) { // 如果数字大于8位,让其数字后面加单位亿
let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
return parseFloat(parseInt(num / 100000000) + '.' + decimal) + '亿'
}
},
// priceFormat(num, point = 2) {
// 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位,让其数字后面加单位万
// let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
// console.log(decimal);
// // 由千位,百位组成的一个数字
// return parseFloat(parseInt(numStr / 10000) + '.' + decimal) + '万'
// } else if (numStr.length > 8) { // 如果数字大于8位,让其数字后面加单位亿
// let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
// return parseFloat(parseInt(numStr / 100000000) + '.' + decimal) + '亿'
// }
// }
}
})
......@@ -20,7 +20,7 @@
image {
object-fit: cover;
background-size: 100% auto;
background-size: 100% 100%;
}
}
......
......@@ -13,8 +13,8 @@ Component({
{ title: '订单量', num: s.orderCount }
]
v.sortList = [
{ title: '访客率', sort: s.fansRate },
{ title: '转化率', sort: s.conversionRate }
{ title: '访客率', sort: Number(s.fansRate).toFixed(2) },
{ title: '转化率', sort: Number(s.conversionRate).toFixed(2) }
]
}
this.setData({ data: v })
......
......@@ -12,8 +12,8 @@ Page({
allNum: 0,
todayNum: 0,
activityTypList: index_const.data.activityTypList,
IMG_URL:IMG_URL_STORE,
isPravite:false
IMG_URL: IMG_URL_STORE,
isPravite: false
},
/**
......@@ -23,14 +23,15 @@ Page({
},
onRoute(options) {
wx.showLoading()
let activityId = options.activityId
ActivityApi.getActivityVisitorList({
activityId,
staffFlag:true
staffFlag: true
}).then(res => {
res.visitorList && res.visitorList.forEach(val => {
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
if(!val.customerPhone&&val.guestId){
if (!val.customerPhone && val.guestId) {
val.gId = (val.guestId.split('_')).pop() || ''
}
})
......@@ -39,11 +40,12 @@ Page({
todayNum: res.todayTotal,
list: res.visitorList
})
wx.hideLoading()
})
},
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
toCopyName(e) {
const { name } = e.currentTarget.dataset
if (name) {
wx.setClipboardData({
data: name
})
......@@ -62,7 +64,7 @@ Page({
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success (res) {
success(res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
......
......@@ -92,5 +92,6 @@
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
},
"libVersion": "2.31.0"
}
\ 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!