select.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view>
  3. <view class="friend-bg">
  4. <image style="width: 750rpx;height: 406rpx;" src="../../../static/friend/friend-bg.png"></image>
  5. <image style="position: absolute; left: 34rpx;top: 120rpx; width: 22rpx; height: 42rpx;"
  6. src="../../../static/friend/back.png" @click="onBack()"></image>
  7. </view>
  8. <view style="padding-top: 230rpx;">
  9. <view class="cu-list menu-avatar margin-top">
  10. <view class="cu-item card-view" :class=" index == selectIndex?' friend-select':''" style="height: 180rpx;" v-for="(item, index) in 4" :key="index" @click="onSelectIndex(index)">
  11. <view class="cu-avatar round lg"
  12. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);">
  13. <view class="cu-tag badge-bottom" >
  14. <image style="height: 32rpx;width: 32rpx;" src="../../../static/friend/girl.png"></image>
  15. </view>
  16. </view>
  17. <view class="content" style="width: 360rpx;">
  18. <view class="text-grey">凯尔</view>
  19. <view class="text-gray text-sm flex">
  20. <view class="text-cut">
  21. <text class="cuIcon-infofill text-red margin-right-xs"></text>
  22. 我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。
  23. </view>
  24. </view>
  25. <view class="text-gray text-sm flex">
  26. <view class="text-cut">
  27. <text class="cuIcon-infofill text-red margin-right-xs"></text>
  28. 我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。
  29. </view>
  30. </view>
  31. </view>
  32. <view class="action" style="width: 160rpx; ">
  33. <image class=" make-lines-bPurple" style="width: 126rpx; height: 60rpx;"
  34. src="../../../static/friend/pk-button.png"></image>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="padding flex flex-direction" style="position: absolute;bottom: 34rpx; left: 0;right: 0;">
  40. <button class="cu-btn make-bg-bPurple text-white lg" style="border-radius: 20rpx;">健身模式</button>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. selectIndex:0,
  49. }
  50. },
  51. methods: {
  52. onSelectIndex(data){
  53. this.selectIndex = data;
  54. console.log(data);
  55. },
  56. onBack() {
  57. uni.navigateBack({
  58. delta: 1
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style>
  65. .friend-bg {
  66. position: absolute;
  67. top: -60rpx;
  68. left: 0;
  69. right: 0;
  70. /* bottom: 0; */
  71. margin: auto;
  72. width: 750rpx;
  73. height: 406rpx;
  74. background-color: #000000;
  75. }
  76. .friend-select {
  77. /* box-sizing: content-box; */
  78. border: 4rpx solid #9797FF;
  79. }
  80. </style>