sigin-in.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view>
  3. <view class="sign_conent_box">
  4. <view class="sign_conent">
  5. <view class="sign_conent_title">
  6. 你已连续签到
  7. <span class="sign_conent_title_span">{{qdjl}}</span>
  8. </view>
  9. <view class="ft12 mt10" style="color: #999;">签到领看币,新剧抢先看。连续签到7天领惊喜礼包</view>
  10. <view class="sign_list_aligns">
  11. <scroll-view class="scroll-view_H" scroll-x="true">
  12. <view class="scroll_view_items" v-for="(item, index) in sign_list" :key="index">
  13. <!-- -->
  14. <view class="scroll_view_itemsv">
  15. <view class="scroll_view_item">
  16. <view class="scroll_view_item_img_box">
  17. <image v-if="item.xz==2" :src="statics.xuanzhong" class="scroll_view_item_img" mode=""></image>
  18. <image v-if="item.xz==1" :src="statics.yuanq" class="scroll_view_item_img" mode=""></image>
  19. <view v-if="item.xz==1" class="scroll_view_item_top">{{ item.discount }}</view>
  20. </view>
  21. <view class="scroll_view_item_tips">{{ item.day }}</view>
  22. </view>
  23. <view class="scroll_xian" v-show="index !== sign_list.length - 1"></view>
  24. </view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. <view class="sign_conent_btn" @click="cksigin()">今日签到</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. props: {
  36. sign_list: {},
  37. qdjl: 0,
  38. tdsy: 0,
  39. },
  40. data() {
  41. return {};
  42. },
  43. methods: {
  44. cksigin() {
  45. if(uni.getStorageSync("userinfo")){
  46. let this_=this
  47. let data = {};
  48. data.tdsy=this.tdsy
  49. data.token = uni.getStorageSync("userinfo").token
  50. data.uid = uni.getStorageSync("userinfo").id
  51. uni.request({
  52. url: this.configs.webUrl+'/api/user/qingdao',
  53. data: data,
  54. success: data => {
  55. uni.showModal({
  56. title: '温馨提示',
  57. content: data.data.msg,
  58. showCancel: false,
  59. success: res => {
  60. if(data.data.code==1){
  61. this_.$emit('cksigin')
  62. }
  63. }
  64. });
  65. },
  66. fail: (data, code) => {
  67. }
  68. });
  69. }else{
  70. uni.showModal({
  71. title: '温馨提示',
  72. content: '请先登录',
  73. showCancel: true,
  74. confirmText: "登录",
  75. success: function (res) {
  76. if (res.confirm) {
  77. uni.navigateTo({
  78. url:'/pages/login/login'
  79. })
  80. } else if (res.cancel) {
  81. //uni.navigateBack();
  82. }
  83. }
  84. });
  85. }
  86. },
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. .sign_conent_box {
  92. width: 100%;
  93. display: flex;
  94. justify-content: center;
  95. margin-top: 30upx;
  96. .sign_conent {
  97. width: 686upx;
  98. // background: white;
  99. // border-radius: 20upx;
  100. padding: 0upx 0upx;
  101. box-sizing: border-box;
  102. .sign_conent_title {
  103. width: 100%;
  104. font-size: 36upx;
  105. font-weight: bold;
  106. color: #333333;
  107. .sign_conent_title_span {
  108. color: #ff6526 !important;
  109. }
  110. }
  111. .sign_list_aligns {
  112. width: 100%;
  113. padding: 30upx 0 30upx 0;
  114. box-sizing: border-box;
  115. .scroll-view_H {
  116. width: 100%;
  117. display: flex;
  118. white-space: nowrap;
  119. .scroll_view_items {
  120. display: inline-block;
  121. }
  122. .scroll_view_itemsv {
  123. display: flex;
  124. }
  125. .scroll_view_item {
  126. .scroll_view_item_img_box {
  127. width: 60upx;
  128. height: 30upx;
  129. position: relative;
  130. .scroll_view_item_top {
  131. font-size: 24upx;
  132. color: #bfbfbf;
  133. // font-weight: bold;
  134. position: absolute;
  135. top: 14upx;
  136. width: 100%;
  137. text-align: center;
  138. z-index: 1;
  139. }
  140. .scroll_view_item_bottom {
  141. font-size: 12upx;
  142. color: #ffe29d;
  143. position: absolute;
  144. bottom: 18upx;
  145. left: 42upx;
  146. z-index: 2;
  147. }
  148. }
  149. .scroll_view_item_tips {
  150. width: 60upx;
  151. text-align: center;
  152. font-size: 24upx;
  153. padding-top: 40upx;
  154. color: #333333;
  155. }
  156. .scroll_view_item_img {
  157. width: 60upx;
  158. height: 60upx;
  159. position: absolute;
  160. top: 0;
  161. left: 0;
  162. z-index: 0;
  163. }
  164. }
  165. .scroll_xian {
  166. width: 40upx;
  167. height: 4upx;
  168. background: #bfbfbf;
  169. margin-top: 30upx;
  170. }
  171. }
  172. }
  173. .sign_conent_btn {
  174. width: 100%;
  175. border-radius: 45upx;
  176. background: linear-gradient(270deg, #fcae3a 0%, #f15d25 100%);
  177. color: #ffffff;
  178. text-align: center;
  179. padding: 22upx 0;
  180. font-size: 32upx;
  181. }
  182. }
  183. }
  184. </style>