<view class="name" wx:for="{{array}}" wx:key="index">
      <image style="transform:translate({{item.offsetX}}px, {{item.offsetY}}px) ;" class="img" id="{{stv.id[index]}}" src="../images/upload.png"></image>
    </view>

  

onBind: function (e) {
    var that = this;
    var index = this.data.index++;
    console.log(e);
    this.data.array.push({
      offsetX: e.changedTouches[0].pageX,
      offsetY: e.changedTouches[0].pageY-100,
      name: "景点"+index
    })
    console.log(this.data.array);
    this.setData({
      array: this.data.array
    })
  }

  

posted on 2018-12-14 17:13  大橙子最美丽  阅读(602)  评论(0编辑  收藏  举报