瑶都万能墙
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.

112 lines
2.0 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view>
  3. <view class="createDetail" @click="open">
  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. open(){
  38. if(!uni.getStorageSync('token')){
  39. uni.navigateTo({
  40. url: '/pages_order/auth/wxLogin'
  41. })
  42. return
  43. }
  44. this.$refs.createDetailPopup.open('bottom')
  45. },
  46. getData() {
  47. this.$api('getPublishList', res => {
  48. if (res.code == 200) {
  49. this.createDetail = res.result
  50. }
  51. })
  52. },
  53. clickItem(item) {
  54. this.$utils.navigateTo(item.url)
  55. this.$refs.createDetailPopup.close()
  56. },
  57. }
  58. }
  59. </script>
  60. <style scoped lang="scss">
  61. .createDetail {
  62. position: fixed;
  63. top: 70vh;
  64. right: 50rpx;
  65. width: 100rpx;
  66. height: 100rpx;
  67. background-color: $uni-color;
  68. border-radius: 50rpx;
  69. display: flex;
  70. justify-content: center;
  71. align-items: center;
  72. box-shadow: 0 0 10rpx 10rpx rgba(#000, 0.1);
  73. z-index: 99;
  74. }
  75. .createDetailPopup {
  76. padding: 20rpx;
  77. background-color: #ffffff;
  78. &>view {
  79. display: flex;
  80. align-items: center;
  81. padding: 24rpx;
  82. background-color: #f7f7f7;
  83. margin: 20rpx;
  84. border-radius: 20rpx;
  85. image {
  86. width: 100rpx;
  87. height: 100rpx;
  88. margin-right: 20rpx;
  89. }
  90. .info {
  91. .title {
  92. font-size: 30rpx;
  93. }
  94. .desc {
  95. font-size: 24rpx;
  96. }
  97. }
  98. .icon {
  99. margin-left: auto;
  100. }
  101. }
  102. }
  103. </style>