activity-sign.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. <view class="container-banner" :style="{paddingTop:CustomBar + 200 +'px'}">
  7. <view class="login-input">
  8. <image class="login-logo" :src="shopInfo.shopLogo" mode=""></image>
  9. </view>
  10. <view class="login-title">展位:{{ shopInfo.showNum }}</view>
  11. <view class="login-title">参展商:{{ shopInfo.shopName }}</view>
  12. <view class="login-btn" @click="handleEntry">签到打卡</view>
  13. <view class="login-text">
  14. 注:到采美专区签到打卡,可领取超值礼包,更多惊喜和福利等你来解琐。
  15. </view>
  16. </view>
  17. </template>
  18. </view>
  19. </template>
  20. <script>
  21. import { mapState, mapMutations } from 'vuex'
  22. import authorize from '@/common/config/authorize.js'
  23. import wxLogin from '@/common/config/wxLogin.js'
  24. export default{
  25. data(){
  26. return{
  27. nvabarData: { //顶部自定义导航
  28. haveBack:false,
  29. haveHome:true,
  30. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  31. showSearch: 0,
  32. title: '', // 导航栏 中间的标题
  33. textLeft:this.$store.state.isIphone
  34. },
  35. isIphoneX:this.$store.state.isIphoneX,
  36. CustomBar:this.CustomBar,// 顶部导航栏高度
  37. skeletonShow:true,
  38. params:{
  39. userId:'',
  40. shopId:''
  41. },
  42. shopInfo:{}
  43. }
  44. },
  45. onLoad(option) {
  46. this.initData(option)
  47. },
  48. computed: {
  49. ...mapState(['hasLogin', 'userInfo', ])
  50. },
  51. methods:{
  52. // 初始化
  53. async initData(option) {
  54. this.$util.msg('活动已结束', 2000)
  55. setTimeout(() => {
  56. this.$api.switchTabTo('/pages/tabBar/home/index')
  57. }, 2000)
  58. // const userInfo = await this.$api.getStorage()
  59. // this.params.shopId = option.id
  60. // this.params.userId = userInfo.userId ? userInfo.userId : 0
  61. // this.userShopDetail(this.params)
  62. },
  63. // 获取展台信息
  64. async userShopDetail(params){
  65. try{
  66. const res = await this.UserService.userShopDetail(params)
  67. this.shopInfo = res.data
  68. if(this.shopInfo.shopSign === 1){
  69. this.$api.navigateTo('/pages/h5/activity/activity-entry-list')
  70. }else{
  71. this.skeletonShow = false
  72. }
  73. }catch(error){
  74. console.log('获取展台信息异常~')
  75. }
  76. },
  77. handleEntry(){
  78. this.$util.msg('活动已结束', 2000)
  79. setTimeout(() => {
  80. this.$api.switchTabTo('/pages/tabBar/home/index')
  81. }, 2000)
  82. // if(!this.hasLogin){
  83. // this.$util.msg('您还未登录,请先登录!', 2000)
  84. // setTimeout(() => {
  85. // const pages = getCurrentPages()
  86. // const page = pages[pages.length - 1]
  87. // uni.setStorageSync('LOGIN_REDIRECT_URL', page.$page.fullPath)
  88. // this.$api.navigateTo('/pages/login/login')
  89. // }, 2000)
  90. // return
  91. // }
  92. // this.userTicketSign(this.params)
  93. },
  94. // 签到打卡
  95. async userTicketSign(params){
  96. try{
  97. await this.UserService.userTicketSign(params)
  98. this.$util.msg('打卡成功', 2000, true, 'success')
  99. this.params.idCard = ''
  100. setTimeout(()=>{
  101. this.$api.navigateTo('/pages/h5/activity/activity-entry-list')
  102. },2000)
  103. }catch(error){
  104. this.$util.msg(error.msg,2000)
  105. }
  106. }
  107. },
  108. onShow() {
  109. }
  110. }
  111. </script>
  112. <style lang="scss">
  113. page{
  114. background-color: #3d68eb;
  115. height: auto !important;
  116. }
  117. .container-banner{
  118. width: 100%;
  119. height: 1142rpx;
  120. background: url(https://admin.caimei365.com/userfiles/1/images/photo/2024/08/ziluo_bg.jpg) no-repeat;
  121. background-size: contain;
  122. box-sizing: border-box;
  123. padding: 0 100rpx;
  124. .login-title{
  125. font-size: $font-size-44;
  126. line-height: 88rpx;
  127. color: #ffffff;
  128. text-align: center;
  129. }
  130. .login-input{
  131. width: 100%;
  132. height: auto;
  133. padding:0 24rpx;
  134. margin: 0 auto;
  135. margin-bottom: 30rpx;
  136. box-sizing: border-box;
  137. border-radius: 50rpx;
  138. display: flex;
  139. flex-direction: column;
  140. justify-content: center;
  141. align-items: center;
  142. .login-logo{
  143. width: 200rpx;
  144. height: 200rpx;
  145. display: block;
  146. border-radius: 50%;
  147. border: 1px solid #e10078;
  148. }
  149. }
  150. .login-btn {
  151. width: 300rpx;
  152. height: 88rpx;
  153. font-size: $font-size-28;
  154. line-height: 88rpx;
  155. color: #ffffff;
  156. margin: 0 auto;
  157. margin-bottom: 24rpx;
  158. text-align: center;
  159. background-color: #e10078;
  160. border-radius: 50rpx;
  161. margin-top: 120rpx;
  162. }
  163. .login-text{
  164. font-size: $font-size-26;
  165. line-height: 48rpx;
  166. color: #ffffff;
  167. margin-top: 200rpx;
  168. }
  169. }
  170. </style>