teamUser.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="default_page adffc" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='团队成员'></cus-header>
  4. <view class="add" @click="handleAdd">+ 添加</view>
  5. <view class="list">
  6. <u-swipe-action>
  7. <u-swipe-action-item v-for="(item, index) in list" :key="index"
  8. :options="options" @click="e=>deleteUser(item,e)" :ref="'swipeAction' + index" :threshold="5"
  9. >
  10. <view class="swipe-action u-border-top u-border-bottom">
  11. <view class="swipe-action__content">
  12. <view class="lbox adfac">
  13. <template v-if="type">
  14. <image class="lbox-select" v-if="item.select" :src="imgBase+'selected.png'"></image>
  15. <image class="lbox-select" v-else :src="imgBase+'not_select.png'"></image>
  16. </template>
  17. <view class="lbox-info">
  18. <view class="lbox-info-top adfac">
  19. <text>{{'吴一可'}}</text>
  20. <view class="type">{{'赞助人Sponsor'}}</view>
  21. </view>
  22. <view class="lbox-info-email">{{'123456789@qq.com'}}</view>
  23. </view>
  24. <view class="lbox-edit" @click="handleEdit(item)">
  25. <u-icon name="edit-pen" size="42rpx" color="#B9B9B9"></u-icon>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </u-swipe-action-item>
  31. </u-swipe-action>
  32. </view>
  33. <view class="btn" v-if="type">确定</view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data(){
  39. return {
  40. type:'',
  41. list:[1,1,1,1],
  42. options: [
  43. {
  44. text: '删除',
  45. icon: 'trash',
  46. iconSize:'32rpx',
  47. style: {
  48. backgroundColor: '#f56c6c'
  49. }
  50. }
  51. ],
  52. }
  53. },
  54. onLoad(options) {
  55. this.type = options.type
  56. },
  57. methods:{
  58. scrolltolower(){
  59. },
  60. deleteUser(item,index){
  61. this.list.forEach((d, i) => {
  62. this.$refs['swipeAction' + i][0].closeHandler();
  63. })
  64. },
  65. handleAdd(){
  66. uni.navigateTo({
  67. url:'/pagesMy/teamUserDetail'
  68. })
  69. },
  70. handleEdit(item){
  71. uni.navigateTo({
  72. url:'/pagesMy/teamUserDetail?user='+encodeURIComponent(JSON.stringify(item))
  73. })
  74. },
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. ::v-deep .u-swipe-action-item{
  80. margin-top: 20rpx;
  81. }
  82. ::v-deep .swipe-action{
  83. border: none !important;
  84. }
  85. .default_page{
  86. padding: 0 24rpx;
  87. box-sizing: border-box;
  88. .add{
  89. width: calc(100% - 52rpx);
  90. height: 88rpx;
  91. background: #FFFFFF;
  92. border-radius: 44rpx;
  93. border: 1rpx solid #33A7A7;
  94. margin: 30rpx 26rpx 0;
  95. font-family: PingFang-SC, PingFang-SC;
  96. font-weight: bold;
  97. font-size: 32rpx;
  98. color: #009191;
  99. line-height: 88rpx;
  100. text-align: center;
  101. }
  102. .list{
  103. flex: 1;
  104. overflow-y: auto;
  105. margin-top: 20rpx;
  106. .lbox{
  107. background: #FFFFFF;
  108. box-shadow: inset 0rpx -1rpx 0rpx 0rpx rgba(229,231,235,0.5);
  109. border-radius: 24rpx;
  110. padding: 36rpx 24rpx 40rpx;
  111. margin-top: 20rpx;
  112. &-select{
  113. width: 36rpx;
  114. height: 36rpx;
  115. margin-right: 24rpx;
  116. }
  117. &-info{
  118. flex: 1;
  119. &-top{
  120. text{
  121. font-family: PingFang-SC, PingFang-SC;
  122. font-weight: bold;
  123. font-size: 32rpx;
  124. color: #002846;
  125. line-height: 32rpx;
  126. }
  127. .type{
  128. background: rgba(173,120,166,0.1);
  129. border-radius: 21rpx;
  130. padding: 6rpx 16rpx;
  131. font-family: PingFangSC, PingFang SC;
  132. font-weight: 400;
  133. font-size: 22rpx;
  134. color: #AD78A6;
  135. line-height: 30rpx;
  136. margin-left: 20rpx;
  137. }
  138. }
  139. &-email{
  140. font-family: PingFangSC, PingFang SC;
  141. font-weight: 400;
  142. font-size: 28rpx;
  143. color: #666666;
  144. line-height: 28rpx;
  145. margin-top: 30rpx;
  146. }
  147. }
  148. &-edit{
  149. width: 30rpx;
  150. height: 30rpx;
  151. }
  152. }
  153. }
  154. .btn{
  155. width: calc(100% - 52rpx);
  156. height: 88rpx;
  157. background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);
  158. border-radius: 44rpx;
  159. font-family: PingFang-SC, PingFang-SC;
  160. font-weight: bold;
  161. font-size: 32rpx;
  162. color: #FFFFFF;
  163. line-height: 88rpx;
  164. text-align: center;
  165. letter-spacing: 2rpx;
  166. margin: 40rpx 26rpx 54rpx;
  167. }
  168. }
  169. </style>