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

183 lines
3.9 KiB

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