index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="evaluate">
  3. <!-- header -->
  4. <cu-custom isBack custom bgColor="bg-gradual-blue"><view slot="content">评价中心</view></cu-custom>
  5. <view class="tab">
  6. <view :style="{top:CustomBarHeight+'px' }" class="tab-content flex bg-white">
  7. <view @click="handler" class="item text-center">待评价(99+)</view>
  8. <view @click="handler" class="item text-center">已评价(99+)</view>
  9. <view :style="{left:active ? '50vw' : '0px'}" class="bar"></view>
  10. </view>
  11. </view>
  12. <!-- section -->
  13. <view class="section">
  14. <cu-evaluateB @click="addEvaluteFunc" :value="value"/>
  15. <cu-evaluateA @click="removeFunc" :value="value"/>
  16. </view>
  17. <!-- 工具 -->
  18. <cu-modalB :show.sync="show" content="确认删除此评论吗?"></cu-modalB>
  19. </view>
  20. </template>
  21. <script>
  22. import { CustomBarHeight } from '@/common/device/index.js';
  23. export default {
  24. data() {
  25. return {
  26. show:false,
  27. active: false,
  28. CustomBarHeight ,
  29. value:{
  30. img:"https://img0.baidu.com/it/u=1377501607,485661019&fm=253&app=138&size=w931&n=0&f=PNG&fmt=auto?sec=1656090000&t=e347398442d0de93d1fd11fe6df2b6f8",
  31. name:"博客园用户登录 代码改变世界 密码登录 短信登录 忘记登录用户名 忘记密码 登录",
  32. parameter:"商品参数",
  33. custom:"评价立得35积分",
  34. detail:"极简Node.js 入门系列教程:https://www.yuque.com/sunluyong/node本文更佳阅读体验:https://www.yuque.com/sunluyong/node/static-server在创建 HTTP 服务器实现了一个最简单的静...",
  35. create_time:"20220623 17:15",
  36. imgs:[
  37. {
  38. id: 0,
  39. type: 'video',
  40. url: 'https://st0.dancf.com/gaoding/gaoding/229e7928-fb34-4a0c-b12b-b26fc0aba91453332268.mp4'
  41. },
  42. {
  43. id: 1,
  44. type: 'image',
  45. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg'
  46. },
  47. {
  48. id: 2,
  49. type: 'image',
  50. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
  51. },
  52. {
  53. id: 3,
  54. type: 'image',
  55. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg'
  56. },
  57. {
  58. id: 4,
  59. type: 'image',
  60. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg'
  61. },
  62. {
  63. id: 5,
  64. type: 'image',
  65. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg'
  66. },
  67. {
  68. id: 6,
  69. type: 'image',
  70. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'
  71. }
  72. ]
  73. }
  74. };
  75. },
  76. methods:{
  77. handler(){
  78. this.active=!this.active;
  79. },
  80. removeFunc(){
  81. this.show=true;
  82. },
  83. addEvaluteFunc(){
  84. uni.navigateTo({
  85. url:"/loginPages/addEvalute/index"
  86. })
  87. }
  88. }
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. .evaluate {
  93. .tab {
  94. height: 60upx;
  95. .tab-content {
  96. position: fixed;
  97. width: 100vw;
  98. left: 0;
  99. .item {
  100. flex: 1;
  101. line-height: 60upx;
  102. position: relative;
  103. }
  104. .bar {
  105. position: absolute;
  106. top: 59upx;
  107. width: 50vw;
  108. height: 2upx;
  109. background-color: #f03;
  110. transition: left .3s linear;
  111. }
  112. }
  113. }
  114. }
  115. </style>