推广小程序前端代码
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.

160 lines
3.3 KiB

10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view>
  3. <view class="head-box"></view>
  4. <uv-navbar autoBack title="签到列表" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
  5. <view class="content">
  6. <zlx-item
  7. :item="detail.activityInfo"
  8. :showBottom="false"></zlx-item>
  9. <view class="xie-box-val" v-for="(item,i) in list" :key="i">
  10. <view class="val-text">
  11. <view>{{item.name}}</view>
  12. <view class="phone-box">{{item.phone}}</view>
  13. <view class="type-box">{{item.type}}X{{item.num}}</view>
  14. </view>
  15. <view class="choose-box">
  16. <view class="normol-box" v-if="i == 1"></view>
  17. <image src="./static/choose-icon.png" mode="widthFix" v-else></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="btn-box">
  22. <uv-button @click="saoma" text="扫码签到" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import zlxItem from '@/components/zhaomu/zlx-item.vue'
  28. import listMixin from '@/mixins/list.js'
  29. export default{
  30. mixins: [listMixin],
  31. components:{
  32. zlxItem
  33. },
  34. data() {
  35. return {
  36. mixinsListApi : 'getSignInUserPageList',
  37. btnCustomStyle:{
  38. color:'#FF5858'
  39. },
  40. bgColor:'transparent',
  41. detail : {
  42. activityInfo : {},
  43. },
  44. }
  45. },
  46. onPageScroll(e) {
  47. if(e.scrollTop > 50) {
  48. this.bgColor = '#49070c'
  49. }else{
  50. this.bgColor = 'transparent'
  51. }
  52. },
  53. onLoad({id}) {
  54. this.queryParams.recruitId = id
  55. this.getActivityInfo()
  56. },
  57. methods:{
  58. saoma() {
  59. let self = this
  60. uni.scanCode({
  61. success(code) {
  62. self.$api('signIn', {
  63. orderId: code.result
  64. }, res => {
  65. if (res.code == 200) {
  66. self.$refs.toast.show({
  67. type: 'success',
  68. message: res.result
  69. })
  70. }
  71. self.getData()
  72. self.getActivityInfo()
  73. })
  74. }
  75. })
  76. },
  77. getActivityInfo(){
  78. this.$api('activityInfo', {
  79. activityId : this.queryParams.recruitId,
  80. }, res => {
  81. if(res.code == 200){
  82. this.detail = res.result
  83. }
  84. })
  85. },
  86. }
  87. }
  88. </script>
  89. <style lang="scss">
  90. page {
  91. background-color: #060504;
  92. }
  93. </style>
  94. <style lang="scss" scoped>
  95. .head-box {
  96. background: url('@/static/image/nav-bg.png') no-repeat;
  97. background-size: 100% 100%;
  98. width: 100%;
  99. height: 534rpx;
  100. position: absolute;
  101. z-index: -1;
  102. }
  103. .content {
  104. margin-top: 40rpx;
  105. padding: 0 30rpx;
  106. padding-top: calc(var(--status-bar-height) + 110rpx);
  107. .xie-box-val {
  108. margin-top: 34rpx;
  109. margin-bottom: 16rpx;
  110. height: 116rpx;
  111. background: #1B1713;
  112. border-radius: 27rpx 27rpx 27rpx 27rpx;
  113. display: flex;
  114. align-items: center;
  115. justify-content: space-between;
  116. padding: 0 36rpx;
  117. .val-text {
  118. font-weight: 400;
  119. font-size: 25rpx;
  120. color: #FFFFFF;
  121. display: flex;
  122. align-items: center;
  123. .phone-box {
  124. color: #666666;
  125. margin: 0 10rpx;
  126. }
  127. .type-box {
  128. background: #322511;
  129. border-radius: 0rpx 12rpx 12rpx 12rpx;
  130. color: #FFA200;
  131. font-size: 20rpx;
  132. padding: 10rpx 10rpx;
  133. }
  134. }
  135. .choose-box {
  136. .normol-box {
  137. width: 31rpx;
  138. height: 31rpx;
  139. border: 1px solid #fff;
  140. border-radius: 5rpx;
  141. }
  142. image {
  143. width: 31rpx;
  144. height: 31rpx;
  145. }
  146. }
  147. }
  148. }
  149. .btn-box {
  150. position: fixed;
  151. bottom: 70rpx;
  152. left: 0;
  153. right: 0;
  154. padding: 0 40rpx;
  155. }
  156. </style>