增加用户行为

master
秦子超 2024-07-10 09:37:14 +08:00
parent 3bf4926b5d
commit 42a48ac3b3
3 changed files with 51 additions and 7 deletions

View File

@ -104,6 +104,7 @@
},
onShow() {
this.getSearch(this.keyword)
this.setInsert()
},
methods: {
getHighlight(val) {
@ -184,8 +185,20 @@
uni.$showMsg()
}
}
,
},
async setInsert () {
try {
const params = {
createId: uni.getStorageSync('value').userId,
loginType:1,
menu1:'通讯录',
menu2:'通讯录',
}
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
console.log('用户行为',params,data)
} catch (error) {}
},
itemClick(item,index) {
this.treeData = item.children,
this.treePath = [...this.treePath,{

View File

@ -25,7 +25,7 @@
<!-- nav -->
<view class="navBar">
<div class="navList" v-for="(item, index) in getNavList" :key="index">
<div @click="myNavigateTo(item.url)">
<div @click="myNavigateTo(item.url,item.value)">
<div class="navIcon">
<image
style="width: 100%; height: 100%"
@ -690,7 +690,20 @@ export default {
} catch (error) {
console.log(error);
}
},
},
async setInsert (menu2) {
try {
const params = {
createId: uni.getStorageSync('value').userId,
loginType:1,
menu1:'首页',
menu2: menu2||'首页',
}
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
console.log('用户行为',params,data)
} catch (error) {}
},
jumpHdDetail (params) {
uni.navigateTo({
url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
@ -905,10 +918,11 @@ export default {
uni.$showMsg()
}
},
myNavigateTo (url) {
myNavigateTo (url,menu2) {
uni.navigateTo({
url: url //
})
})
this.setInsert(menu2)
}
//
},
@ -922,7 +936,8 @@ export default {
onShow () {
this.getReadStatus()
this.getResponseLevel()
this.getDispatchStatus()
this.getDispatchStatus()
this.setInsert()
if (this.limit == 1) {
this.getYjRead()
// this.getInterval()

View File

@ -65,6 +65,9 @@
default_src: uni.getStorageSync('avatar'),
}
},
onShow() {
this.setInsert()
},
mounted() {
this.default_src = uni.getStorageSync('avatar')
this.userList = uni.getStorageSync('value')
@ -80,6 +83,19 @@
})
// console.log('click',index,func[index].url)
},
async setInsert () {
try {
const params = {
createId: uni.getStorageSync('value').userId,
loginType:1,
menu1:'我的',
menu2:'我的',
}
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
console.log('用户行为',params,data)
} catch (error) {}
},
logout(){
if(uni.getStorageSync('loginChecked')===true){
uni.redirectTo({