// pages/profile/feedback/feedback.ts
Page({
  data: {
    typeList: ['功能建议', 'Bug反馈', '体验问题', '其他'],
    typeIndex: 0,
    content: '',
    contact: ''
  },

  onLoad() {
    
  },

  onTypeChange(e: any) {
    this.setData({
      typeIndex: e.detail.value
    });
  },

  onContentInput(e: any) {
    this.setData({
      content: e.detail.value
    });
  },

  onContactInput(e: any) {
    this.setData({
      contact: e.detail.value
    });
  },

  handleSubmit() {
    if (!this.data.content.trim()) {
      wx.showToast({
        title: '请输入问题描述',
        icon: 'none'
      });
      return;
    }

    wx.showLoading({
      title: '提交中...',
      mask: true
    });

    setTimeout(() => {
      wx.hideLoading();
      wx.showToast({
        title: '提交成功',
        icon: 'success'
      });

      setTimeout(() => {
        wx.navigateBack();
      }, 1500);
    }, 1000);
  }
});
