// pages/FX/FX.js
Page({
  data: {
    content: '',
    imageList: []
  },

  handleInput(event) {
    this.setData({
      content: event.detail.value
    });
  },

  handleAddImage() {
    wx.chooseImage({
      count: 1,
      success: (res) => {
        const tempFilePaths = res.tempFilePaths;
        const imageList = this.data.imageList.concat(tempFilePaths);
        this.setData({
          imageList: imageList
        });
      }
    });
  },

  handlePublish() {
    // 在这里可以将动态的内容和图片提交到后端或保存到本地
    console.log('发布动态', this.data.content, this.data.imageList);
    // 跳转到其他页面
    wx.navigateBack();
  }
});