feedback.uvue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="page-container">
  3. <!-- 头部 -->
  4. <view class="header">
  5. <view class="header-left" @click="goBack">
  6. <u-icon name="arrow-left" size="24" color="#333"/>
  7. </view>
  8. <view class="header-title">
  9. 问题反馈
  10. </view>
  11. <view class="header-right">
  12. </view>
  13. </view>
  14. <!-- 内容区域 -->
  15. <view class="content">
  16. <!-- 订单编号 -->
  17. <view class="form-section">
  18. <text class="section-label">
  19. 订单编号
  20. </text>
  21. <input class="input" type="text" placeholder="请提供问题的订单编号" />
  22. </view>
  23. <!-- 问题说明 -->
  24. <view class="form-section">
  25. <text class="section-label">
  26. 问题说明
  27. </text>
  28. <textarea class="textarea" placeholder="说说您遇到的问题,以便我们提供更好的服务(5个字以上)">
  29. </textarea>
  30. </view>
  31. <!-- 上传凭证 -->
  32. <view class="form-section">
  33. <text class="section-label">
  34. 上传凭证
  35. </text>
  36. <view class="upload-section">
  37. <view class="upload-btn" @click="uploadImage">
  38. <u-icon name="camera" size="40" color="#999"/>
  39. <text class="upload-text">
  40. 上传照片
  41. </text>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 提交按钮 -->
  46. <button class="submit-btn" @click="submitFeedback">
  47. 提交
  48. </button>
  49. </view>
  50. </view>
  51. </template>
  52. <script setup lang="ts">
  53. const goBack = () => {
  54. uni.navigateBack();
  55. };
  56. const uploadImage = () => {
  57. uni.chooseImage({
  58. count: 1,
  59. sizeType: ['original',
  60. 'compressed'],
  61. sourceType: ['album',
  62. 'camera'],
  63. success: (res) => {
  64. uni.showToast({ title: '上传成功', icon: 'success' });
  65. }
  66. });
  67. };
  68. const submitFeedback = () => {
  69. uni.showToast({ title: '提交成功', icon: 'success' });
  70. setTimeout(() => {
  71. uni.navigateBack();
  72. }, 1500);
  73. };
  74. </script>
  75. <style scoped>
  76. .page-container {
  77. background-color: #f5f5f5;
  78. min-height: 100vh;
  79. }
  80. .header {
  81. display: flex;
  82. align-items: center;
  83. justify-content: space-between;
  84. padding: 20rpx;
  85. background-color: #ffffff;
  86. border-bottom: 1rpx solid #f0f0f0;
  87. }
  88. .header-left, .header-right {
  89. width: 60rpx;
  90. }
  91. .header-title {
  92. font-size: 32rpx;
  93. font-weight: bold;
  94. color: #333;
  95. }
  96. .content {
  97. padding: 30rpx;
  98. }
  99. .form-section {
  100. margin-bottom: 30rpx;
  101. }
  102. .section-label {
  103. font-size: 28rpx;
  104. color: #333;
  105. margin-bottom: 15rpx;
  106. display: block;
  107. }
  108. .input {
  109. width: 100%;
  110. padding: 20rpx;
  111. font-size: 28rpx;
  112. color: #333;
  113. background-color: #ffffff;
  114. border-radius: 16rpx;
  115. }
  116. .textarea {
  117. width: 100%;
  118. min-height: 150rpx;
  119. padding: 20rpx;
  120. font-size: 28rpx;
  121. color: #333;
  122. background-color: #ffffff;
  123. border-radius: 16rpx;
  124. line-height: 1.5;
  125. }
  126. .upload-section {
  127. background-color: #ffffff;
  128. border-radius: 16rpx;
  129. padding: 30rpx;
  130. }
  131. .upload-btn {
  132. display: flex;
  133. flex-direction: column;
  134. align-items: center;
  135. justify-content: center;
  136. width: 120rpx;
  137. height: 120rpx;
  138. border: 2rpx dashed #d9d9d9;
  139. border-radius: 8rpx;
  140. }
  141. .upload-text {
  142. font-size: 24rpx;
  143. color: #999;
  144. margin-top: 10rpx;
  145. }
  146. .submit-btn {
  147. width: 100%;
  148. background-color: #ffc107;
  149. color: #333;
  150. font-size: 30rpx;
  151. font-weight: bold;
  152. border-radius: 50rpx;
  153. padding: 20rpx;
  154. border: none;
  155. margin-top: 40rpx;
  156. }
  157. </style>