activity-entry-list.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="container cashier">
  3. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading="true" :loadingType="5" />
  4. <template v-else>
  5. <custom :navbar-data='nvabarData' />
  6. <scroll-view scroll-y="true" class="container-banner" :style="{ paddingTop:CustomBar + 180 +'px',paddingBottom: isIphoneX ? '68rpx' : '34rpx'}">
  7. <view class="list" v-for="(shop,index) in list" :key="index">
  8. <view class="list-logo">
  9. <image class="list-logo-img" :src="shop.shopLogo" mode=""></image>
  10. </view>
  11. <view class="list-name">
  12. <text class="list-name-text">{{ shop.shopName }}</text>
  13. </view>
  14. <!-- <view class="list-area">
  15. {{ shop.area }}
  16. </view> -->
  17. <view class="list-state acve" v-if="shop.shopSign === 1">已打卡</view>
  18. <view class="list-state none" v-else>未打卡</view>
  19. </view>
  20. </scroll-view>
  21. </template>
  22. </view>
  23. </template>
  24. <script>
  25. export default{
  26. data(){
  27. return{
  28. nvabarData: { //顶部自定义导航
  29. haveBack:false,
  30. haveHome:true,
  31. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  32. showSearch: 0,
  33. title: '', // 导航栏 中间的标题
  34. textLeft:this.$store.state.isIphone
  35. },
  36. isIphoneX:this.$store.state.isIphoneX,
  37. CustomBar:this.CustomBar,// 顶部导航栏高度
  38. params:{
  39. userId:'',
  40. },
  41. list:[
  42. {
  43. shopName:'华熙生物',
  44. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  45. area:'展区A',
  46. state:0,
  47. },
  48. {
  49. shopName:'华熙生物华熙生物华熙生物',
  50. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  51. area:'展区A',
  52. state:1,
  53. },
  54. {
  55. shopName:'华熙生物',
  56. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  57. area:'展区A',
  58. state:0,
  59. },
  60. {
  61. shopName:'华熙生物华熙生物华熙生物',
  62. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  63. area:'展区A',
  64. state:1,
  65. },
  66. {
  67. shopName:'华熙生物',
  68. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  69. area:'展区A',
  70. state:1,
  71. },
  72. {
  73. shopName:'华熙生物',
  74. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  75. area:'展区A',
  76. state:1,
  77. },
  78. {
  79. shopName:'华熙生物',
  80. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  81. area:'展区A',
  82. state:0,
  83. },
  84. {
  85. shopName:'华熙生物',
  86. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  87. area:'展区A',
  88. state:0,
  89. },
  90. {
  91. shopName:'华熙生物',
  92. logo:'https://img.caimei365.com/group1/M00/00/00/rB-lF2AJICKAIcmFAABHg2JMCqg567.jpg',
  93. area:'展区A',
  94. state:0,
  95. }
  96. ]
  97. }
  98. },
  99. onLoad() {
  100. this.initData()
  101. },
  102. methods:{
  103. // 初始化
  104. async initData() {
  105. const userInfo = await this.$api.getStorage()
  106. this.params.userId = userInfo.userId
  107. this.userTicketSignList(this.params)
  108. },
  109. // 获取展台打卡列表
  110. async userTicketSignList(params){
  111. try{
  112. const res = await this.UserService.userTicketSignList(params)
  113. this.list = res.data
  114. this.skeletonShow = false
  115. }catch(error){
  116. console.log('获取展台列表信息异常~')
  117. }
  118. }
  119. },
  120. onShow() {
  121. }
  122. }
  123. </script>
  124. <style lang="scss">
  125. page{
  126. background-color: #3d68eb;
  127. height: auto !important;
  128. }
  129. .container-banner{
  130. width: 100%;
  131. height: auto;
  132. background: url(https://admin.caimei365.com/userfiles/1/images/photo/2024/08/ziluo_bg.jpg) no-repeat;
  133. background-size: contain;
  134. box-sizing: border-box;
  135. padding: 0 24rpx;
  136. overflow: hidden;
  137. .list{
  138. width: 100%;
  139. height: 200rpx;
  140. background-color: #FFFFFF;
  141. border-radius: 24rpx;
  142. margin-bottom: 20rpx;
  143. box-sizing: border-box;
  144. padding: 20rpx;
  145. display: flex;
  146. align-items: center;
  147. position: relative;
  148. .list-logo{
  149. display: flex;
  150. width: 160rpx;
  151. height: 160rpx;
  152. border-radius: 50%;
  153. background-color: #F7F7F7;
  154. overflow: hidden;
  155. border: 1px solid #e1e1e1;
  156. .list-logo-img{
  157. width: 160rpx;
  158. height: 160rpx;
  159. display: block;
  160. border-radius: 50%;
  161. }
  162. }
  163. .list-name{
  164. display: flex;
  165. flex: 1;
  166. justify-content: center;
  167. font-size: $font-size-26;
  168. .list-name-text{
  169. display: inline-block;
  170. width: 180rpx;
  171. -o-text-overflow: ellipsis;
  172. text-overflow: ellipsis;
  173. display: -webkit-box;
  174. word-break: break-all;
  175. -webkit-box-orient: vertical;
  176. -webkit-line-clamp: 1;
  177. overflow: hidden;
  178. }
  179. }
  180. .list-area{
  181. display: flex;
  182. flex: 1;
  183. justify-content: center;
  184. font-size: $font-size-26;
  185. }
  186. .list-state{
  187. position: absolute;
  188. height: 44rpx;
  189. border-radius: 22rpx;
  190. right: 20rpx;
  191. top: 20rpx;
  192. line-height: 44rpx;
  193. padding: 0 10rpx;
  194. font-size: $font-size-22;
  195. &.none{
  196. background-color: #999999;
  197. color: #FFFFFF;
  198. }
  199. &.acve{
  200. background-color: #e10078;
  201. color: #FFFFFF;
  202. }
  203. }
  204. }
  205. }
  206. </style>