index.jsx 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { saveFeedback } from '@/services/mine'
  2. import CustomNav from '@/components/CustomNav'
  3. import Taro from '@tarojs/taro'
  4. import { Image, Button } from '@tarojs/components'
  5. import withLayout from '@/layouts'
  6. import './style.less'
  7. export default withLayout((props) => {
  8. const { person } = props
  9. const { personId } = person
  10. const back = () => {
  11. Taro.navigateBack()
  12. }
  13. const submit = () => {
  14. var content = document.getElementById('content').value
  15. if (content != '') {
  16. saveFeedback({
  17. personId,
  18. content
  19. }).then(() => {
  20. })
  21. }
  22. else {
  23. Taro.showToast({
  24. title: '请重新输入',
  25. icon: 'none',
  26. duration: 2000
  27. })
  28. }
  29. }
  30. return (
  31. <view className='box-content'>
  32. <CustomNav title='联系我们' />
  33. <view style={{ padding: '60rpx 30rpx' }}>
  34. <view class='section'>
  35. <textarea autoHeight placeholder='请输入您的建议或意见!' id='content' />
  36. </view>
  37. <view className='weChate-image' >
  38. <Image mode='aspectFit' src='https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20210918145337.png' />
  39. </view>
  40. <view className='button-info'>
  41. <Button className='button-box' onClick={submit}>提交</Button>
  42. <Button className='button-box-Cancel' onClick={back} >取消</Button>
  43. </view>
  44. </view>
  45. </view>
  46. )
  47. })