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

179 lines
3.7 KiB

2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 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 || detail.travel"
  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">{{typeList[item.typePrice].name}}X{{item.num}}</view>
  14. </view>
  15. <view class="choose-box">
  16. <view class="normol-box" v-if="item.open == 'N'"></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. typeList:[
  45. {
  46. name:'早鸟票',
  47. price:168
  48. },
  49. {
  50. name:'单人票',
  51. price:198.01
  52. },
  53. {
  54. name:'尊享票',
  55. price:268
  56. }
  57. ],
  58. type : 0,
  59. }
  60. },
  61. onPageScroll(e) {
  62. if(e.scrollTop > 50) {
  63. this.bgColor = '#49070c'
  64. }else{
  65. this.bgColor = 'transparent'
  66. }
  67. },
  68. onLoad({id, type}) {
  69. this.queryParams.recruitId = id
  70. this.queryParams.pageSize = 20
  71. this.queryParams.type = type
  72. this.type = type
  73. this.getActivityInfo()
  74. },
  75. methods:{
  76. saoma() {
  77. let self = this
  78. uni.scanCode({
  79. success(code) {
  80. self.$api('signIn', {
  81. orderId: code.result
  82. }, res => {
  83. if (res.code == 200) {
  84. uni.showToast({
  85. title: res.message,
  86. icon: 'none'
  87. })
  88. }
  89. self.getData()
  90. self.getActivityInfo()
  91. })
  92. }
  93. })
  94. },
  95. getActivityInfo(){
  96. this.$api(['activityInfo', 'travelInfo'][this.type], {
  97. activityId : this.queryParams.recruitId,
  98. travelId : this.queryParams.recruitId,
  99. }, res => {
  100. if(res.code == 200){
  101. this.detail = res.result
  102. }
  103. })
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="scss">
  109. page {
  110. background-color: #060504;
  111. }
  112. </style>
  113. <style lang="scss" scoped>
  114. .head-box {
  115. background: url('@/static/image/nav-bg.png') no-repeat;
  116. background-size: 100% 100%;
  117. width: 100%;
  118. height: 534rpx;
  119. position: absolute;
  120. z-index: -1;
  121. }
  122. .content {
  123. margin-top: 40rpx;
  124. padding: 0 30rpx;
  125. padding-top: calc(var(--status-bar-height) + 110rpx);
  126. .xie-box-val {
  127. margin-top: 34rpx;
  128. margin-bottom: 16rpx;
  129. height: 116rpx;
  130. background: #1B1713;
  131. border-radius: 27rpx 27rpx 27rpx 27rpx;
  132. display: flex;
  133. align-items: center;
  134. justify-content: space-between;
  135. padding: 0 36rpx;
  136. .val-text {
  137. font-weight: 400;
  138. font-size: 25rpx;
  139. color: #FFFFFF;
  140. display: flex;
  141. align-items: center;
  142. .phone-box {
  143. color: #666666;
  144. margin: 0 10rpx;
  145. }
  146. .type-box {
  147. background: #322511;
  148. border-radius: 0rpx 12rpx 12rpx 12rpx;
  149. color: #FFA200;
  150. font-size: 20rpx;
  151. padding: 10rpx 10rpx;
  152. }
  153. }
  154. .choose-box {
  155. .normol-box {
  156. width: 31rpx;
  157. height: 31rpx;
  158. border: 1px solid #fff;
  159. border-radius: 5rpx;
  160. }
  161. image {
  162. width: 31rpx;
  163. height: 31rpx;
  164. }
  165. }
  166. }
  167. }
  168. .btn-box {
  169. position: fixed;
  170. bottom: 70rpx;
  171. left: 0;
  172. right: 0;
  173. padding: 0 40rpx;
  174. }
  175. </style>