Commit 3d6e1ea4 by 陈超

T

parent ae29f005
...@@ -319,17 +319,20 @@ ...@@ -319,17 +319,20 @@
el: "#app", el: "#app",
data: function() { data: function() {
return { return {
data: {},
bought: false, bought: false,
isCollect: false isCollect: false
} }
}, },
created:function(){ created:function(){
let p = {:json_encode($data)}; this.data = {:json_encode($data)};
console.log(p)
}, },
computed: { computed: {
isCollect: function() {
return this.data.iscollect == 1
},
shareIcon: function() { shareIcon: function() {
return "__THEME__/img/share_star.png" return this.isCollect ? "__THEME__/img/share_star.png" : "__THEME__/img/share_unstar.png"
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment