appraise.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <view>
  3. <!--标题栏-->
  4. <bar-title bgColor="bg-white" isBack>
  5. <block slot="content">交易评价</block>
  6. </bar-title>
  7. <!--提示栏-->
  8. <view class="bg-red light text-sm zaiui-tip-view">
  9. <view class="text-cut content">对方做出评价前,不会看到您的评价内容哦~</view>
  10. <text class="cuIcon-close icon"/>
  11. </view>
  12. <!--商品信息-->
  13. <view class="bg-white padding-sm zaiui-goods-info-view margin-bottom">
  14. <view class="cu-avatar round lg" :style="[{backgroundImage:'url('+ bg_img +')'}]"/>
  15. <view class="goods-info-view">
  16. <view class="text-cut text-black text-lg">仔仔科技运营部</view>
  17. <view class="text-cut text-gray">本次交易物品 其它CDK</view>
  18. </view>
  19. </view>
  20. <!--信息-->
  21. <view class="bg-white zaiui-content-view">
  22. <!--评分-->
  23. <view class="zaiui-score-view">
  24. <view class="item-score">
  25. <view class="text-cut text-view">再次与TA交易</view>
  26. <view class="score-img-view">
  27. <view class="img-view">
  28. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a1.png')"/>
  29. <view class="text-gray text-center title">不愿意</view>
  30. </view>
  31. <view class="img-view">
  32. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a2.png')"/>
  33. <view class="text-gray text-center title">一般</view>
  34. </view>
  35. <view class="img-view">
  36. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a3s.png')"/>
  37. <view class="text-gray text-center title">愿意</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="item-score">
  42. <view class="text-cut text-view">沟通愉快程度</view>
  43. <view class="score-img-view">
  44. <view class="img-view">
  45. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a1.png')"/>
  46. <view class="text-gray text-center title">不开心</view>
  47. </view>
  48. <view class="img-view">
  49. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a2s.png')"/>
  50. <view class="text-gray text-center title">一般</view>
  51. </view>
  52. <view class="img-view">
  53. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a3.png')"/>
  54. <view class="text-gray text-center title">开心</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="item-score">
  59. <view class="text-cut text-view">实物与描述一致度</view>
  60. <view class="score-img-view">
  61. <view class="img-view">
  62. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a1s.png')"/>
  63. <view class="text-gray text-center title">不一致</view>
  64. </view>
  65. <view class="img-view">
  66. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a2.png')"/>
  67. <view class="text-gray text-center title">一般</view>
  68. </view>
  69. <view class="img-view">
  70. <view class="cu-avatar sm" style="background-image:url('/static/zaiui/img/a3.png')"/>
  71. <view class="text-gray text-center title">一致</view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <!--评价内容-->
  77. <view class="cu-form-group solid-top">
  78. <textarea placeholder="随手评价,造福你我他"/>
  79. </view>
  80. <view class="zaiui-img-view">
  81. <view class="img-grid-view">
  82. <view class="grid col-5">
  83. <block v-for="(item,index) in imgList" :key="index">
  84. <view class="bg-img" @tap="ViewImage" :data-url="imgList[index]">
  85. <image class="image" :src="imgList[index]" mode="aspectFill"></image>
  86. <view class="cu-tag sm bg-red" @tap.stop="DelImg" :data-index="index">
  87. <text class='cuIcon-close'></text>
  88. </view>
  89. </view>
  90. </block>
  91. <view class="add-view" @tap="ChooseImage">
  92. <text class='cuIcon-add'></text>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!--按钮-->
  99. <view class="bg-white zaiui-btn-view zaiui-foot-padding-bottom">
  100. <view class="flex flex-direction">
  101. <button class="cu-btn bg-red">提交评价</button>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. import barTitle from '@/components/zaiui-common/basics/bar-title';
  108. import _tool from '@/static/zaiui/util/tools.js'; //工具函数
  109. export default {
  110. components: {
  111. barTitle
  112. },
  113. data() {
  114. return {
  115. bg_img: '/static/images/home/goods/1.png', imgList: [],
  116. }
  117. },
  118. onLoad() {
  119. },
  120. onReady() {
  121. _tool.setBarColor(true);
  122. uni.pageScrollTo({
  123. scrollTop: 0,
  124. duration: 0
  125. });
  126. },
  127. methods: {
  128. ChooseImage() {
  129. uni.chooseImage({
  130. count: 4,
  131. sizeType: ['original', 'compressed'],
  132. sourceType: ['album'],
  133. success: (res) => {
  134. if (this.imgList.length != 0) {
  135. this.imgList = this.imgList.concat(res.tempFilePaths)
  136. } else {
  137. this.imgList = res.tempFilePaths
  138. }
  139. }
  140. });
  141. },
  142. ViewImage(e) {
  143. uni.previewImage({
  144. urls: this.imgList,
  145. current: e.currentTarget.dataset.url
  146. });
  147. },
  148. DelImg(e) {
  149. uni.showModal({
  150. title: '召唤师',
  151. content: '确定要删除这段回忆吗?',
  152. cancelText: '再看看',
  153. confirmText: '再见',
  154. success: res => {
  155. if (res.confirm) {
  156. this.imgList.splice(e.currentTarget.dataset.index, 1)
  157. }
  158. }
  159. })
  160. },
  161. }
  162. }
  163. </script>
  164. <style lang="scss">
  165. /* #ifdef APP-PLUS */
  166. @import "../../static/colorui/main.css";
  167. @import "../../static/colorui/icon.css";
  168. @import "../../static/zaiui/style/app.scss";
  169. /* #endif */
  170. .zaiui-goods-info-view {
  171. position: relative;
  172. .cu-avatar {
  173. position: absolute;
  174. }
  175. .goods-info-view {
  176. position: relative;
  177. padding-left: 112.72upx;
  178. height: 94.54upx;
  179. line-height: 1.7;
  180. }
  181. }
  182. .zaiui-score-view {
  183. position: relative;
  184. padding: 25.45upx 27.27upx 0;
  185. .item-score {
  186. position: relative;
  187. height: 118.18upx;
  188. .text-view {
  189. position: relative;
  190. padding-right: 290.9upx;
  191. top: 18.18upx;
  192. }
  193. .score-img-view {
  194. position: absolute;
  195. display: flex;
  196. right: 0;
  197. top: 0;
  198. .img-view {
  199. position: relative;
  200. text-align: center;
  201. width: 72.72upx;
  202. .title {
  203. margin-top: 5.45upx;
  204. font-size: 20upx;
  205. }
  206. }
  207. .img-view + .img-view {
  208. margin-left: 18.18upx;
  209. }
  210. }
  211. }
  212. }
  213. .zaiui-img-view {
  214. position: relative;
  215. padding: 0 29.09upx;
  216. .img-grid-view {
  217. position: relative;
  218. padding-right: 72.72upx;
  219. padding-bottom: 18.18upx;
  220. .grid.col-5 {
  221. .bg-img {
  222. position: relative;
  223. border-radius: 3.63upx;
  224. margin-bottom: 27.27upx;
  225. margin-right: 27.27upx;
  226. height: 72.72upx;
  227. width: 72.72upx;
  228. .image {
  229. border-radius: 3.63upx;
  230. height: 72.72upx;
  231. width: 72.72upx;
  232. }
  233. .cu-tag {
  234. position: absolute;
  235. border-radius: 3.63upx;
  236. padding: 0 1.81upx;
  237. height: auto;
  238. right: 0;
  239. top: 0;
  240. text {
  241. position: relative;
  242. top: 1.81upx;
  243. }
  244. }
  245. }
  246. .add-view {
  247. border: 2upx solid #efeeee;
  248. margin-bottom: 27.27upx;
  249. border-radius: 3.63upx;
  250. line-height: 72.72upx;
  251. text-align: center;
  252. height: 72.72upx;
  253. width: 72.72upx;
  254. text {
  255. position: relative;
  256. font-size: 54.54upx;
  257. color: #e4e3e3;
  258. }
  259. }
  260. }
  261. }
  262. }
  263. .zaiui-btn-view {
  264. position: fixed;
  265. width: 100%;
  266. bottom: 0;
  267. .flex {
  268. padding: 18.18upx;
  269. }
  270. }
  271. </style>