123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <<<<<<< HEAD
- Component({
- relations: {
- '../discuss/discuss': {
- type: 'child', // 关联的目标节点应为子节点
- linked: function(target) {
- // 每次有custom-li被插入时执行,target是该节点实例对象,触发在该节点attached生命周期之后
- console.log(target)
- },
- linkChanged: function(target) {
- // 每次有custom-li被移动后执行,target是该节点实例对象,触发在该节点moved生命周期之后
- console.log(target)
- },
- unlinked: function(target) {
- // 每次有custom-li被移除时执行,target是该节点实例对象,触发在该节点detached生命周期之后
- console.log(target)
- =======
- const APIClient = require('../../utils/APIClient.js');
- Component({
- relations: {
- '../discuss/custom-li': {
- type: 'child', // 关联的目标节点应为子节点
- linked: function(target) {
- // 每次有custom-li被插入时执行,target是该节点实例对象,触发在该节点attached生命周期之后
- },
- linkChanged: function(target) {
- // 每次有custom-li被移动后执行,target是该节点实例对象,触发在该节点moved生命周期之后
- },
- unlinked: function(target) {
- // 每次有custom-li被移除时执行,target是该节点实例对象,触发在该节点detached生命周期之后
- >>>>>>> d311ba85855d9833139d43ef0f7038e08d5d9599
- }
- }
- },
- /**
- * 组件的属性列表
- */
- properties: {
- productionData: {
- type: Object,
- value: {}
- },
- <<<<<<< HEAD
- title: {
- type: String,
- value: ''
- },
- query: {
- type: String,
- value: ''
- },
- type: {
- type: String,
- value: ''
- },
- =======
- >>>>>>> d311ba85855d9833139d43ef0f7038e08d5d9599
- },
- /**
- * 组件的初始数据
- */
- data: {
- <<<<<<< HEAD
- text: '',
- chatDatas: [],
- animationData: {},
- =======
- flag: false,
- text: '',
- chatDatas: [],
- animationData: {}
- >>>>>>> d311ba85855d9833139d43ef0f7038e08d5d9599
- },
- /**
- * 组件的方法列表
- */
- methods: {
- uploadImage (e) {
- <<<<<<< HEAD
- const type = this.properties.type;
- wx.navigateTo({
- url: '../input_content/input_content?type=' + type
- =======
- wx.navigateTo({
- url: '../input_content/input_content'
- >>>>>>> d311ba85855d9833139d43ef0f7038e08d5d9599
- })
- },
- listenerButtonPreviewImage: function(e) {
- let imgUrl = [];
- imgUrl.push(e.target.dataset.img);
- wx.previewImage({
- current: '', // 当前显示图片的http链接
- urls: imgUrl, // 需要预览的图片http链接列表
- //这根本就不走
- success: function(res) {
- //console.log(res);
- },
- //也根本不走
- fail: function() {
- //console.log('fail')
- }
- })
- <<<<<<< HEAD
- },
- shareImage: function(e){
- console.log(e);
- //分享查询单条的时候会用到这两个值
- const postId = e.currentTarget.dataset.postsid;
- this.share.showPopup(postId);
- },
- _getAllLi: function(){
- // 使用getRelationNodes可以获得nodes数组,包含所有已关联的custom-li,且是有序的
- var nodes = this.getRelationNodes('../discuss/discuss');
- console.log(nodes);
- }
- },
- ready: function(){
- this._getAllLi()
- this.share = this.selectComponent("#share");
- =======
- }
- },
- ready () {
- console.log(this.getRelationNodes('discuss/discuss/custom-li'))
- // this.discuss = this.selectComponent("#discuss");
- // console.log(this.discuss);
- >>>>>>> d311ba85855d9833139d43ef0f7038e08d5d9599
- }
- })
|