瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
1.9 KiB

9 months ago
  1. <template>
  2. <view>
  3. <view class="createDetail" @click="$refs.createDetailPopup.open('bottom')">
  4. <uv-icon size="40rpx" color="#fff" name="plus"></uv-icon>
  5. </view>
  6. <uv-popup ref="createDetailPopup" :round="30">
  7. <view class="createDetailPopup">
  8. <view class="" :key="index" @click="clickItem(item)" v-for="(item, index) in createDetail">
  9. <image :src="item.image" style="width: 90rpx;height: 90rpx;" mode="aspectFill"></image>
  10. <view class="info">
  11. <view class="title">
  12. {{ item.name }}
  13. </view>
  14. <view class="desc">
  15. {{ item.context }}
  16. </view>
  17. </view>
  18. <view class="icon">
  19. <uv-icon size="30rpx" name="arrow-right"></uv-icon>
  20. </view>
  21. </view>
  22. </view>
  23. </uv-popup>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. createDetail: [],
  31. }
  32. },
  33. created() {
  34. this.getData()
  35. },
  36. methods: {
  37. getData() {
  38. this.$api('getPublishList', res => {
  39. if (res.code == 200) {
  40. this.createDetail = res.result
  41. }
  42. })
  43. },
  44. clickItem(item) {
  45. this.$utils.navigateTo(item.url)
  46. this.$refs.createDetailPopup.close()
  47. },
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .createDetail {
  53. position: fixed;
  54. top: 50vh;
  55. right: 50rpx;
  56. width: 100rpx;
  57. height: 100rpx;
  58. background-color: $uni-color-primary;
  59. border-radius: 50rpx;
  60. display: flex;
  61. justify-content: center;
  62. align-items: center;
  63. box-shadow: 0 0 10rpx 10rpx rgba(#000, 0.1);
  64. }
  65. .createDetailPopup {
  66. padding: 20rpx;
  67. background-color: #ffffff;
  68. &>view {
  69. display: flex;
  70. align-items: center;
  71. padding: 24rpx;
  72. background-color: #f7f7f7;
  73. margin: 20rpx;
  74. border-radius: 20rpx;
  75. image {
  76. width: 100rpx;
  77. height: 100rpx;
  78. margin-right: 20rpx;
  79. }
  80. .info {
  81. .title {
  82. font-size: 30rpx;
  83. }
  84. .desc {
  85. font-size: 24rpx;
  86. }
  87. }
  88. .icon {
  89. margin-left: auto;
  90. }
  91. }
  92. }
  93. </style>