启动页点击量记录

This commit is contained in:
尹吉欢
2018-04-28 11:51:53 +08:00
parent b98d4978a8
commit 0602b50e2e
2 changed files with 18 additions and 0 deletions
+3
View File
@@ -181,6 +181,9 @@
if (data.imgUrl != null) {
localStorage.setItem("startPageImgUrl", data.imgUrl);
}
if (data.startPageId != null) {
localStorage.setItem("startPageId", data.startPageId);
}
if (data.url != null) {
localStorage.setItem("startPageClickUrl", data.url);
}
+15
View File
@@ -71,6 +71,7 @@ new Vue({
data: {
imgUrl:"images/startImg.png",
url:"",
starImgId:"",
guideImgs:[]
},
methods: {
@@ -89,6 +90,16 @@ new Vue({
},
openView: function() {
if (this.url != null && this.url != "") {
// 记录点击次数
if (this.starImgId != "") {
axios.get("/rest/page/startPage/click", {params:{id:this.starImgId}})
.then(function (response) {
})
.catch(function (error) {
});
}
clicked('views/webview_embed.html', true,false,{},{url:this.url})
}
}
@@ -98,6 +109,10 @@ new Vue({
if (startPageImgUrl != null) {
this.imgUrl = startPageImgUrl;
}
var startPageId = localStorage.getItem("startPageId")
if (startPageId != null) {
this.starImgId = startPageId;
}
var startPageClickUrl = localStorage.getItem("startPageClickUrl")
if (startPageClickUrl != null) {
this.url = startPageClickUrl;