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

139 lines
2.5 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view>
  3. <view class="createDetail">
  4. <view @click="open">
  5. <uv-icon size="40rpx" color="#fff" name="plus"></uv-icon>
  6. </view>
  7. <!-- 悬浮图标 -->
  8. <view>
  9. <button @click="$utils.navigateTo('/pages_order/mine/promotion')">
  10. <uv-icon size="40rpx"
  11. color="#fff"
  12. name="server-man"></uv-icon>
  13. </button>
  14. </view>
  15. <view>
  16. <button>
  17. <uv-icon size="40rpx"
  18. color="#fff"
  19. name="question-circle"></uv-icon>
  20. </button>
  21. </view>
  22. </view>
  23. <uv-popup ref="createDetailPopup" :round="30">
  24. <view class="createDetailPopup">
  25. <view class="" :key="index" @click="clickItem(item)" v-for="(item, index) in createDetail">
  26. <image :src="item.image" style="width: 90rpx;height: 90rpx;" mode="aspectFill"></image>
  27. <view class="info">
  28. <view class="title">
  29. {{ item.name }}
  30. </view>
  31. <view class="desc">
  32. {{ item.context }}
  33. </view>
  34. </view>
  35. <view class="icon">
  36. <uv-icon size="30rpx" name="arrow-right"></uv-icon>
  37. </view>
  38. </view>
  39. </view>
  40. </uv-popup>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. createDetail: [],
  48. }
  49. },
  50. created() {
  51. this.getData()
  52. },
  53. methods: {
  54. open(){
  55. if(!uni.getStorageSync('token')){
  56. uni.navigateTo({
  57. url: '/pages_order/auth/wxLogin'
  58. })
  59. return
  60. }
  61. this.$refs.createDetailPopup.open('bottom')
  62. },
  63. getData() {
  64. this.$api('getPublishList', res => {
  65. if (res.code == 200) {
  66. this.createDetail = res.result
  67. }
  68. })
  69. },
  70. clickItem(item) {
  71. this.$utils.navigateTo(item.url)
  72. this.$refs.createDetailPopup.close()
  73. },
  74. }
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. .createDetail {
  79. position: fixed;
  80. top: 60vh;
  81. right: 50rpx;
  82. z-index: 999;
  83. button{
  84. all : unset;
  85. }
  86. button::after{
  87. all : unset;
  88. }
  89. &>view{
  90. width: 100rpx;
  91. height: 100rpx;
  92. background-color: $uni-color;
  93. border-radius: 50rpx;
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. box-shadow: 0 0 10rpx 10rpx rgba(#000, 0.1);
  98. margin-bottom: 30rpx;
  99. }
  100. }
  101. .createDetailPopup {
  102. padding: 20rpx;
  103. background-color: #ffffff;
  104. &>view {
  105. display: flex;
  106. align-items: center;
  107. padding: 24rpx;
  108. background-color: #f7f7f7;
  109. margin: 20rpx;
  110. border-radius: 20rpx;
  111. image {
  112. width: 100rpx;
  113. height: 100rpx;
  114. margin-right: 20rpx;
  115. }
  116. .info {
  117. .title {
  118. font-size: 30rpx;
  119. }
  120. .desc {
  121. font-size: 24rpx;
  122. }
  123. }
  124. .icon {
  125. margin-left: auto;
  126. }
  127. }
  128. }
  129. </style>