12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- Component({
- relations: {
- '../discuss/discuss': {
- type: 'child',
- linked: function(target) {
-
- console.log(target)
- },
- linkChanged: function(target) {
-
- console.log(target)
- },
- unlinked: function(target) {
-
- console.log(target)
- }
- }
- },
-
- properties: {
- productionData: {
- type: Object,
- value: {}
- },
- title: {
- type: String,
- value: ''
- },
- query: {
- type: String,
- value: ''
- },
- type: {
- type: String,
- value: ''
- },
- },
-
- data: {
- text: '',
- chatDatas: [],
- animationData: {},
- },
-
- methods: {
- uploadImage (e) {
- const type = this.properties.type;
- wx.navigateTo({
- url: '../input_content/input_content?type=' + type
- })
- },
- listenerButtonPreviewImage: function(e) {
- let imgUrl = [];
- imgUrl.push(e.target.dataset.img);
- wx.previewImage({
- current: '',
- urls: imgUrl,
-
- success: function(res) {
-
- },
-
- fail: function() {
-
- }
- })
- },
- shareImage: function(e){
- console.log(e);
-
- const postId = e.currentTarget.dataset.postsid;
- this.share.showPopup(postId);
- },
- _getAllLi: function(){
-
- var nodes = this.getRelationNodes('../discuss/discuss');
- console.log(nodes);
- }
- },
- ready: function(){
- this._getAllLi()
- this.share = this.selectComponent("#share");
- }
- })
|