wantCompalin.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!-- 我要投诉 -->
  2. <template>
  3. <view class="pageBg">
  4. <view class="content">
  5. <view class="topBack" :style="{marginTop:phoneHeight + 'px'}">
  6. <image src="../../static/icon_back@2x(1).png" style="width:48rpx ;height: 48rpx;margin-left: 36rpx;margin-top: 18rpx;"
  7. @tap="back"></image>
  8. </view>
  9. <view class="topImg">
  10. <image src="../../static/complain_icon_complain@2x.png" style="width: 100%;height: 100%;"></image>
  11. </view>
  12. <view class="topTitle">
  13. 我要投诉
  14. </view>
  15. <view class="main">
  16. <image src="../../static/appraise_bgimage@2x.png" style="width: 100%;height: 100%;"></image>
  17. <image src="../../static/guarantee_icon_summary@2x.png" class="mainImg"></image>
  18. <view class="fa">投诉摘要</view>
  19. <view class="star">
  20. <input placeholder="请填写投诉摘要" style="width: 95%;height: 100%;margin: 0 auto;" v-model="digest"/>
  21. </view>
  22. <image src="../../static/guarantee_icon_content@2x.png" class="contentImg"></image>
  23. <view class="contentTitle">
  24. 投诉内容
  25. </view>
  26. <view class="textContent">
  27. <textarea placeholder="请填写投诉内容" style="width: 100%;height: 100%;" v-model="textRea"></textarea>
  28. </view>
  29. <!-- 图片盒字 -->
  30. <view style="width:646rpx;height: 114rpx;position: absolute;left: 24rpx;bottom: 40rpx;display: flex;">
  31. <view style="height: 114rpx;margin-right: 10rpx;display: flex;justify-content: space-between;" v-show="imgData" >
  32. <image style="width: 114rpx;height: 114rpx;margin-right: 10rpx;" :src="item.path" v-for="(item,index) in imgData" :key="index"></image>
  33. </view>
  34. <image src="../../static/circle_image@2x.png" style="width: 114rpx;height: 114rpx;" @tap="uploadImg(item)"></image>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="submit" :class="{active:digest && textRea}" @tap="submit">提交</view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. digest:'',//报修摘要
  46. textRea:'',//评价内容
  47. starNum:0,//星星数量
  48. phoneHeight: 0, //手机状态栏的高度
  49. isShow: false,
  50. imgData: []
  51. }
  52. },
  53. components: {},
  54. created() {
  55. // 获取状态栏的高度
  56. this.phoneHeight = uni.getSystemInfoSync().statusBarHeight
  57. },
  58. methods: {
  59. // 选择评分
  60. changeRate(e){
  61. this.starNum=e.value
  62. },
  63. // 图片上传
  64. uploadImg(item) {
  65. let that = this
  66. uni.chooseImage({
  67. count: 3, //默认9
  68. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  69. sourceType: ['album'], //从相册选择
  70. success:(res)=> {
  71. console.log(res);
  72. this.imgData = res.tempFiles
  73. },
  74. });
  75. },
  76. // 提交
  77. submit(){
  78. if(!this.digest || !this.textRea || !this.starNum){
  79. return
  80. }else{
  81. }
  82. },
  83. // 返回上一页
  84. back(){
  85. uni.navigateBack({
  86. delta:1
  87. })
  88. }
  89. },
  90. }
  91. </script>
  92. <style scoped>
  93. .submit {
  94. width: 702rpx;
  95. height: 90rpx;
  96. background: rgba(244, 244, 244, 1);
  97. opacity: 1;
  98. border-radius: 18rpx;
  99. font-size: 32rpx;
  100. font-family: PingFang SC;
  101. font-weight: bold;
  102. color: rgba(204, 204, 204, 1);
  103. position: absolute;
  104. bottom:56rpx;
  105. left: 26rpx;
  106. text-align: center;
  107. line-height: 90rpx;
  108. }
  109. .textContent {
  110. width: 646rpx;
  111. height: 168rpx;
  112. background: rgba(246, 250, 255, 1);
  113. border: 2rpx solid rgba(197, 224, 255, 1);
  114. opacity: 1;
  115. border-radius: 6rpx;
  116. position: absolute;
  117. left: 24rpx;
  118. bottom: 180rpx;
  119. }
  120. .contentImg {
  121. width: 33rpx;
  122. height: 40rpx;
  123. position: absolute;
  124. bottom: 460rpx;
  125. left: 330rpx;
  126. }
  127. .contentTitle {
  128. width: 116rpx;
  129. height: 40rpx;
  130. font-size: 28rpx;
  131. font-family: PingFang SC;
  132. font-weight: bold;
  133. color: rgba(41, 138, 253, 1);
  134. position: absolute;
  135. bottom: 388rpx;
  136. left: 290rpx;
  137. }
  138. .star {
  139. width: 646rpx;
  140. height: 80rpx;
  141. display: flex;
  142. justify-content: space-between;
  143. position: absolute;
  144. left: 24rpx;
  145. top: 164rpx;
  146. background:rgba(246,250,255,1);
  147. border:2rpx solid rgba(197,224,255,1);
  148. opacity:1;
  149. border-radius:6rpx;
  150. }
  151. .starImg {
  152. width: 51rpx;
  153. height: 49rpx;
  154. }
  155. .fa {
  156. width: 116rpx;
  157. height: 40rpx;
  158. font-size: 28rpx;
  159. font-family: PingFang SC;
  160. font-weight: bold;
  161. color: rgba(41, 138, 253, 1);
  162. position: absolute;
  163. top: 114rpx;
  164. left: 288rpx;
  165. }
  166. .mainImg {
  167. width: 40rpx;
  168. height: 46rpx;
  169. position: absolute;
  170. top: 40rpx;
  171. left: 326rpx;
  172. }
  173. .main {
  174. width: 692rpx;
  175. height: 844rpx;
  176. margin: 0 auto;
  177. margin-top: 24rpx;
  178. position: relative;
  179. }
  180. .topTitle {
  181. width: 128rpx;
  182. height: 44rpx;
  183. font-size: 32rpx;
  184. font-family: PingFang SC;
  185. font-weight: 400;
  186. color: rgba(255, 255, 255, 1);
  187. margin: 0 auto;
  188. margin-top: 26rpx;
  189. }
  190. .topImg {
  191. width: 122rpx;
  192. height: 122rpx;
  193. margin: 0 auto;
  194. margin-top: 4rpx;
  195. }
  196. .pageBg {
  197. width: 100%;
  198. height: 100vh;
  199. background: linear-gradient(180deg, rgba(205, 227, 255, 1) 0%, rgba(133, 188, 255, 1) 100%);
  200. opacity: 1;
  201. }
  202. .content {
  203. width: 100%;
  204. position: absolute;
  205. top: 0;
  206. }
  207. .active{
  208. color:rgba(255,255,255,1);
  209. background:rgba(41,138,253,1);
  210. opacity:1;
  211. }
  212. </style>