This commit is contained in:
cclu 2023-04-23 14:12:25 +08:00
parent 7696fe4bf2
commit 1e78c73715
19 changed files with 132 additions and 127 deletions

View File

@ -43,7 +43,7 @@
let _this = this
if (this.user.WeChat_MiniProToken) {
console.log('有')
this.memberLogin() //
this.memberLogin()
} else {
console.log('无')
this.getLoginCode()

View File

@ -160,6 +160,7 @@ function toNextRoute(type, url) {
})
}
// 记录用户行为的方法 每个页面的onUnload里面要调用
function addUserBehavior(obj) {
var pages = getCurrentPages() // 获取加载的页面
@ -175,15 +176,24 @@ function addUserBehavior(obj) {
obj.outtoRoute = nowRoute
obj.intoRoute = len > 1 ? '/' + pages[len - 2].route : '/pages/index/index'
}
}
obj.visitChannels = store.state.visitChannels
let userDate = store.state.userData
console.log('userDate',userDate)
let req = {
userName:userDate.UserName,
phoneNumber:userDate.Membership_Phone,
userId:userDate.UserId ? userDate.UserId:'',
wechatAppId:'wx4fb5da2b8d9e0e43',
intoRoute:obj.intoRoute,
outtoRoute:obj.outtoRoute,
visitChannels:obj.visitChannels,
behaviorRecordDesc:''
}
console.log('req',req)
request.$webGet('CommercialApi/UserBehavior/AddUserBehavior',req).then(() => {
// request.$webGet('WeChat/AddUserBehaviorNew',obj).then(res => {
// request.$webGet('WeChatPushAPI/Member/AddUserBehaviorNew', obj).then(res => {
// // console.log(obj)
// })
})
}
/*
根据关键字获取相应的枚举选项文档见 https://api.eshangtech.com/EShangApiMain/swagger/ui/index#!/FrameWork/FrameWork_GetFieldEnumByField

View File

@ -171,6 +171,9 @@ export default {
//
this.getBestsellerList()
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
onRefresh(){
//

View File

@ -261,6 +261,9 @@ export default {
},
onReady(){
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
//

View File

@ -124,7 +124,7 @@ export default {
console.log('value',value)
this.info = value
this.addAreaCarNumber = Math.abs((this.info.VehicleCount / this.info.MonthVehicleCount - 1)*100).toFixed(2)
this.oneCarPrice = Math.abs(((this.info.AvgVehicleAmount / this.info.MonthVehicleAmount) - 1) *100).toFixed(2)
this.oneCarPrice = this.info.MonthVehicleAmount?Math.abs(((this.info.AvgVehicleAmount / this.info.MonthVehicleAmount) - 1) *100).toFixed(2):''
this.$forceUpdate()
},
deep:true

View File

@ -1,94 +0,0 @@
<template>
<div className="car">
<div className="item">
<canvas className="carNum" canvas-id="carNum" id="carNum"/>
</div>
<div className="item">
<canvas className="carNum" canvas-id="probability" id="probability"/>
</div>
</div>
</template>
<script>
import uCharts from '@/components/u-charts.js';
var uChartsInstance = {};
export default {
name: "模板",
data() {
return {
}
},
props: {
data: {
type: Array,
default: () => []
}
},
watch: {
data: {
handler(value) {
this.handleCarData(value)
}
}
},
methods: {
//
handleCarData(value) {
let res = []
this.drawCharts('carNum', res)
},
drawCharts(id, data) {
const ctx = uni.createCanvasContext(id, this);
let _this = this
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 178,
height: 208,
series: data.series,
animation: true,
rotate: false,
rotateLock: false,
background: "#FFFFFF",
color: ["#CAD0DA", "#1E80FF"],
padding: [5, 5, 5, 5],
dataLabel: false,
enableScroll: false,
title: {
name: _this.carNumAll,
fontSize: 16,
color: "#341D00"
},
subtitle: {
name: "昨日入区车流",
fontSize: 12,
color: "#786B6C",
},
legend: {
show: true,
position: "bottom",
lineHeight: 25,
float: 'center'
},
extra: {
ring: {
ringWidth: 12,
activeOpacity: 0.5,
activeRadius: 10,
offsetAngle: 0,
labelWidth: 15,
border: false,
borderWidth: 3,
borderColor: "#FFFFFF"
}
}
});
},
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -146,6 +146,9 @@ export default {
//
this.getBrandInfoList()
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
bindDateChange(e){
const date = new Date(e.detail.value)

View File

@ -151,6 +151,9 @@ export default {
//
this.getBusinessTypeList()
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
bindDateChange(e){
const date = new Date(e.detail.value)

View File

@ -282,6 +282,9 @@ export default {
this.handleNoticeMonth()
this.handleNoticeYear()
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
//
handleGoServiceInfo(type){
@ -617,8 +620,7 @@ export default {
const req = {
pushProvinceCode:'340000',
Statistics_StartDate:`${y}-${m}-01`,
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
Statistics_Date:this.time
}
const data = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',req)
let all = 0
@ -637,8 +639,7 @@ export default {
monthYearPlan(){
const monthDate= {
Province_Code:'340000',
Statistics_Date:this.time,
Serverpart_ID: this.serviceInfo.Serverpart_ID
Statistics_Date:this.time
}
request.$webGet('CommercialApi/Revenue/GetRevenueBudget',monthDate).then(res=>{
// data

View File

@ -25,6 +25,9 @@ export default {
this.type = 'index'
}
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
}

View File

@ -249,6 +249,9 @@ export default {
}
}
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
//
handleToServiceDetail(item){

View File

@ -175,6 +175,9 @@ export default {
this.handleNoticeMonth()
this.handleNoticeYear()
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
async handleNoticeMonth(){
let date = new Date(this.lastDay)

View File

@ -273,6 +273,9 @@ export default {
//
this.endData = `${y}-${month}`
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
handleYearItem(item){
let currentService = uni.getStorageSync('currentService')

View File

@ -0,0 +1,54 @@
export default {
'/pages/commercialBI': '商业画像的全部',
'/pages/commercialBI/carPortrait': '车流画像',
'/pages/commercialBI/guestPortrait': '客群画像',
'/pages/commercialBI/managePortrait': '经营画像',
'/pages/commercialBI/businessPortrait': '交易画像',
'/pages/commercialBI/formatPortrait': '业态品牌画像',
'/pages/commercialBI/planMonth': '月度和年度自营刚点进去的第一个页面',
'/pages/commercialBI/planDetail': '月度和年度自营点进去之后再次点击列表的详情',
'/pages/commercialBI/serviceDetail': '服务区的预算完成页面',
'/pages/commercialBI/noData': '没有权限跳转的页面',
'/pages/commercialBI/commercialType': '每个画像进去右侧悬浮显示的快速跳转别的画像的东西',
'/pages/commercialBI/components': '画像的全部组件',
'/pages/commercialBI/components/car': '车流画像的组件',
'/pages/commercialBI/components/car/entryZone': '昨日入区车流',
'/pages/commercialBI/components/car/monthTotal': '月度车流累计',
'/pages/commercialBI/components/car/homePlace': '车辆归属地',
'/pages/commercialBI/components/car/carTypeTime': '车型停留分析',
'/pages/commercialBI/components/car/timeAnalysis': '车型停留分布图',
'/pages/commercialBI/components/car/percentEntry': '入区车型',
'/pages/commercialBI/components/guest': '客群画像的组件',
'/pages/commercialBI/components/guest/customerFirst': '客单分析',
'/pages/commercialBI/components/guest/customerSecond': '客群特征分析',
'/pages/commercialBI/components/guest/consumPrefer': '客群消费偏好',
'/pages/commercialBI/components/guest/consumptionLevel': '客群消费水平',
'/pages/commercialBI/components/guest/businessType': '业态客单偏好',
'/pages/commercialBI/components/manager': '经营画像的组件',
'/pages/commercialBI/components/manager/revenueAnalysis': '营收分析',
'/pages/commercialBI/components/manager/contractGuarantee': '合同保底、客流客单交易',
'/pages/commercialBI/components/manager/moneyCompare': '同比分析',
'/pages/commercialBI/components/manager/revenueTrends': '营收同比分析',
'/pages/commercialBI/components/bussiness': '交易画像的组件',
'/pages/commercialBI/components/bussiness/transactionAnalysis': '交易分析',
'/pages/commercialBI/components/bussiness/consumptionCompare': '消费转化对比图',
'/pages/commercialBI/components/bussiness/timePeriodAnalysis': '消费时段分析',
'/pages/commercialBI/components/bussiness/levelTop': '消费水平',
'/pages/commercialBI/components/bussiness/businessFormat': '业态交易值占比',
'/pages/commercialBI/components/bussiness/bestsellerShop': '商超畅销品',
'/pages/commercialBI/components/format': '业态品牌的组件',
'/pages/commercialBI/components/format/fillingDegree': '业态充盈度',
'/pages/commercialBI/components/format/bandLevel': '品牌消费水平',
'/pages/commercialBI/components/format/consumLevel': '业态消费水平',
'/pages/commercialBI/components/format/bandNumber': '品牌指数',
'/pages/commercialBI/components/analyse': '画像下面的分析框组件',
'/pages/commercialBI/components/headerTop': '除车流画像之外 别的画像的头部内容',
'/pages/commercialBI/components/noData': '任何一个画像没数据的时候 显示的内容',
};

View File

@ -172,6 +172,7 @@
</view>
<view class="chart">
<!-- 123就是对应的第几个标题选中 -->
<div v-show="selectTab===1" v-if="modelProgress.length > 0 && theRequest.ProvinceCode==340000">
<div>
<div class="operation-c-list" v-for="(item,o) in modelProgress" :key="o">
@ -638,6 +639,9 @@ export default {
this.isShow = false
this.selectTab = 1
},
onUnload() {
this.$util.addUserBehavior()
},
onPullDownRefresh:function(){
if (!this.isReturn){
this.getData(this.option)

View File

@ -202,6 +202,9 @@ export default {
let seat = uni.getStorageSync('currentService')
this.handleSearch(seat)
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
//
changeSwiper(e){

View File

@ -142,6 +142,7 @@ export default {
},
onUnload(){
this.isShowMap = false
this.$util.addUserBehavior()
},
watch:{
//

View File

@ -1,11 +1,11 @@
<template>
<view class="suggestion-body" v-show="isShow">
<view style="flex: 1;width: 750upx;overflow: hidden;">
<scroll-view enableBackToTop="true" scroll-y style="height: 100%;" @scrolltolower="loadMore()">
<view v-if="pageList.length>0">
<ListUnit @tap="goDetail(item)" v-for="(item,i) in pageList" :key="i" :item="item"></ListUnit>
<view class="load-more mt20" >
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
@ -31,16 +31,16 @@
isEnd: false,
isLoading: true
},
isShow:false,
pageList:[]
}
},
components: {
ListUnit
},
computed: {
...mapGetters({
isReloading:'shouldReLoadingList'
@ -50,13 +50,13 @@
...mapMutations(['shouldReLoadingList']),
getList() {
let _this = this
_this.$request.$get( 'GetSuggestionList',{
suggestionType: '1000,2000,4000',
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if(!res.ResultCode ||res.ResultCode!='100'){
_this.isShow = false
_this.pageList = []
@ -64,19 +64,19 @@
let list = res.Data.List
if (list.length > 0) {
_this.pageList = this.pageData.pageIndex==1 ? list : [..._this.pageList,...list,]
}
if (list.length < _this.pageData.pageSize) { //
_this.pageData.isEnd = true
}
// _this.$forceUpdate()
}
uni.hideLoading()
_this.isShow = true
_this.pageData.isLoading = false
})
},
loadMore(){
@ -87,7 +87,7 @@
},
goDetail(item) {
this.$util.toNextRoute('navigateTo', "/pages/suggestion/suggestionDetail?SUGGESTION_ID=" + item.SUGGESTION_ID)
},
},
onPullDownRefresh() {
@ -105,16 +105,16 @@
this.loadMore()
},
onLoad() {
this.pageData.isLoading= true
uni.showLoading({
title:'正在加载'
})
this.getList()
},
onShow() {
let _this = this
@ -130,9 +130,8 @@
},
onUnload() {
this.$util.addUserBehavior()
}
}
</script>
@ -143,10 +142,10 @@
overflow: hidden;
height: 100%;
width: 750upx;
}
.mt20 {
margin-top: 30rpx;
}
</style>

View File

@ -333,6 +333,9 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
url:`/pages/commercialBI/noData?type=index`
})
}
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
...mapActions(['getTodoList']),