signIn.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <template>
  2. <view>
  3. <block v-if="!activiState">
  4. <view class="main_content1" :style="{backgroundImage:'url('+img_url+'signIn/sign_bg.png)'}">
  5. <view class="top_bar">
  6. <view class="top_header">
  7. <view class="top_header_left" @click="goBack">
  8. <image :src="img_url + 'signIn/to_back.png'" mode=""></image>
  9. </view>
  10. <view class="top_header_cen">签到中心</view>
  11. <view class="top_white_space"></view>
  12. </view>
  13. </view>
  14. <view class="date_banner">
  15. <view class="b_day" :style="{backgroundImage:'url('+img_url+'signIn/date_bg.png)'}">{{bigDay}}</view>
  16. <view class="s_day_time">
  17. <view class="s_b_top">{{getWeek}}</view>
  18. <view class="s_date">{{month}}/{{year}}</view>
  19. <view class="s_sign">{{signInfo.isSign==2?'今日已签到':'今日未签到'}}</view>
  20. </view>
  21. <view class="s_sign_tip">
  22. <image :src="img_url+'signIn/qiandao.png'" mode=""></image>
  23. <text>{{signInfo.isSign==2?'已签到':'未签到'}}</text>
  24. </view>
  25. </view>
  26. <view class="sign_record">
  27. <view class="sign_integral">
  28. <view class="cur_int">目前积分<text>{{my_points}}</text></view>
  29. <view class="int_tip">连续签到7天可享受双倍积分+优惠券双重好礼</view>
  30. </view>
  31. <view class="sign_proc">
  32. <view class="bub_box">+5积分</view>
  33. <view class="proc_bar_bg">
  34. <view class="proc_bar"></view>
  35. </view>
  36. <view class="sign_days">
  37. <text v-for="item in [1,2,3,4,5,6,7]">{{item}}天</text>
  38. </view>
  39. </view>
  40. <view class="sign_but_con">
  41. <view class="sign_but">已连续签到6天 积分+5</view>
  42. </view>
  43. </view>
  44. <view class="mis_int">
  45. <view class="mis_int_title">做任务 赚积分</view>
  46. <view class="mis_two_con">
  47. <view class="con_item">
  48. <view class="text_con">
  49. <text>限时抽奖</text>
  50. <text>每日惊喜不断</text>
  51. </view>
  52. <view class="sign_but">
  53. <image :src="img_url+'signIn/sign_but1.png'" mode=""></image>
  54. </view>
  55. <view class="img_con">
  56. <image :src="img_url+'signIn/sign_img1.png'" mode=""></image>
  57. </view>
  58. </view>
  59. <view class="con_item">
  60. <view class="text_con">
  61. <text>购物赚积分</text>
  62. <text>每次购物都是赚钱</text>
  63. </view>
  64. <view class="sign_but">
  65. <image :src="img_url+'signIn/sign_but1.png'" mode=""></image>
  66. </view>
  67. <view class="img_con">
  68. <image :src="img_url+'signIn/sign_img2.png'" mode=""></image>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="mis_b_con">
  73. <!-- <image :src="img_url+'signIn/sign_banner.png'" mode="aspectFit"></image> -->
  74. <view class="" :style="{backgroundImage:'url('+img_url+'signIn/sign_banner.png)'}"></view>
  75. </view>
  76. </view>
  77. <view class="int_mis">
  78. <view class="mis_int_title">积分任务</view>
  79. <view class="int_mis_con">
  80. <view class="int_mis_con_item">
  81. <view class="imc_item_left">
  82. <image :src="img_url+'signIn/sign_share.png'" mode=""></image>
  83. <view class="imc_item_left_text">
  84. <text>分享活动,邀请好友获取补签机会</text>
  85. <text>分享活动给好友,可获得一次补签</text>
  86. </view>
  87. </view>
  88. <view class="imc_item_right">分享</view>
  89. </view>
  90. </view>
  91. <view class="int_mis_con">
  92. <view class="int_mis_con_item">
  93. <view class="imc_item_left">
  94. <image :src="img_url+'signIn/sign_shopping.png'" mode=""></image>
  95. <view class="imc_item_left_text">
  96. <text>购物得积分,下单支付可赚取积分</text>
  97. <text>好友参与活动您可获得5积分</text>
  98. </view>
  99. </view>
  100. <view class="imc_item_right">去购物</view>
  101. </view>
  102. </view>
  103. <view class="int_mis_con">
  104. <view class="int_mis_con_item">
  105. <view class="imc_item_left">
  106. <image :src="img_url+'signIn/sign_up.png'" mode=""></image>
  107. <view class="imc_item_left_text">
  108. <text>会员升级,会员升级可得20积分</text>
  109. <text>会员升级获得10积分</text>
  110. </view>
  111. </view>
  112. <view class="imc_item_right" v-if="true">去升级</view>
  113. <view class="imc_item_right upAl" v-if="false">已升级</view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </block>
  119. <block v-if="activiState">
  120. <signAcCom></signAcCom>
  121. </block>
  122. </view>
  123. </template>
  124. <script>
  125. import signAcCom from './signAcCom.vue'
  126. export default{
  127. components:{
  128. signAcCom
  129. },
  130. data(){
  131. return{
  132. img_url:getApp().globalData.imgUrl,
  133. activiState:true,
  134. bigDay:'00',
  135. month:'00',
  136. year:'0000',
  137. signInfo:{},
  138. my_points:0
  139. }
  140. },
  141. onLoad() {
  142. // this.initData()
  143. },
  144. computed:{
  145. getWeek(){
  146. let now = new Date()
  147. let arr = ['周日','周一','周二','周三','周四','周五','周六']
  148. return arr[now.getDay()]
  149. }
  150. },
  151. methods:{
  152. initData(){
  153. this.getInfo()
  154. this.getNow()
  155. this.getUserPoints()
  156. },
  157. getInfo(){
  158. let params = {
  159. url:'/v3/promotion/front/sign/activity/detail'
  160. }
  161. this.$request(params).then(res=>{
  162. if(res.state==200){
  163. this.signInfo = res.data
  164. }
  165. })
  166. },
  167. getNow(){
  168. let now= new Date()
  169. this.bigDay = now.getDate().toString().length==2?now.getDate():'0'+now.getDate()
  170. this.month = (now.getMonth() + 1).toString().length==2?now.getMonth() + 1: '0' + (now.getMonth() + 1)
  171. this.year = now.getFullYear()
  172. console.log(this.bigDay,this.month,this.year)
  173. },
  174. getUserPoints(){
  175. let param = {}
  176. param.url = 'v3/member/front/integralLog/getMemberIntegral'
  177. param.method = 'GET'
  178. this.$request(param).then(res=>{
  179. if(res.state == 200){
  180. this.my_points = res.data.memberIntegral
  181. }
  182. })
  183. },
  184. }
  185. }
  186. </script>
  187. <style lang="scss">
  188. .main_content1{
  189. height: 100%;
  190. background-repeat: no-repeat;
  191. background-position: 0 0;
  192. background-size: 750rpx 492rpx;
  193. padding-bottom: 26rpx;
  194. .date_banner{
  195. position: relative;
  196. margin-top: 50rpx;
  197. padding: 0 20rpx;
  198. display: flex;
  199. .b_day{
  200. width: 220rpx;
  201. height: 160rpx;
  202. background-repeat: no-repeat;
  203. background-position: center center;
  204. background-size: 100% 100%;
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. font-weight: normal;
  209. font-size: 110rpx;
  210. }
  211. .s_day_time{
  212. margin-left: 20rpx;
  213. .s_b_top{
  214. font-size: 50rpx;
  215. font-family: PingFang;
  216. font-weight: bold;
  217. color: #FFFFFF;
  218. }
  219. .s_date,.s_sign{
  220. font-size: 30rpx;
  221. font-family: PingFang;
  222. font-weight: normal;
  223. color: #FFFFFF;
  224. line-height: 46rpx;
  225. height: 46rpx;
  226. }
  227. .s_date{
  228. margin-top: 10rpx;
  229. }
  230. }
  231. .s_sign_tip{
  232. position: absolute;
  233. top: 0;
  234. right: 0;
  235. width: 179rpx;
  236. height: 59rpx;
  237. background-color: #fff;
  238. border-bottom-left-radius: 30rpx;
  239. border-top-left-radius: 30rpx;
  240. display: flex;
  241. justify-content: center;
  242. align-items: center;
  243. text{
  244. font-size: 30rpx;
  245. font-family: PingFang;
  246. font-weight: bold;
  247. color: #FF8118;
  248. }
  249. image{
  250. width:37rpx;
  251. height:34rpx;
  252. margin-right: 10rpx;
  253. }
  254. }
  255. }
  256. .sign_record{
  257. width: 355px;
  258. box-shadow: 0px 5rpx 26rpx 0px rgba(255, 130, 25, 0.18);
  259. background: #FFFFFF;
  260. border-radius: 16rpx;
  261. padding: 17px 10px 20px;
  262. margin: 20rpx auto;
  263. position: relative;
  264. .sign_integral{
  265. text-align: center;
  266. // width: 100%;
  267. .cur_int{
  268. font-size: 36rpx;
  269. font-family: PingFang;
  270. font-weight: 500;
  271. color: #2D2D2D;
  272. text{
  273. color: #FF8118;
  274. }
  275. }
  276. .int_tip{
  277. font-size: 26rpx;
  278. font-family: PingFang;
  279. font-weight: bold;
  280. color: #000000;
  281. line-height: 68rpx;
  282. opacity: 0.2;
  283. text-shadow: 0px 2rpx 4rpx rgba(255, 84, 0, 0.2);
  284. text-align: center;
  285. }
  286. }
  287. .sign_proc{
  288. margin-top: 50rpx;
  289. .bub_box{
  290. position: relative;
  291. // top:100px;
  292. // left:100rpx;
  293. display: inline-block;
  294. padding: 4rpx 12rpx;
  295. background: linear-gradient(62deg, #FF8F2A, #FFBE67);
  296. border-radius: 16rpx;
  297. font-size: 24rpx;
  298. color: #fff;
  299. &:after{
  300. position: absolute;
  301. content: "";
  302. width: 0;
  303. height: 0;
  304. top: 100%;
  305. left: 40%;
  306. border-top: 6rpx solid #ffa638;
  307. border-right: 6rpx solid transparent;
  308. border-left: 6rpx solid transparent;
  309. }
  310. }
  311. .sign_days{
  312. // width: 624rpx;
  313. font-size: 24rpx;
  314. font-family: PingFang;
  315. font-weight: 500;
  316. color: #999999;
  317. opacity: 0.8;
  318. margin: 0 auto;
  319. display: flex;
  320. justify-content: space-between;
  321. }
  322. }
  323. .proc_bar_bg{
  324. // width: 624rpx;
  325. height: 20rpx;
  326. background: #FFB85F;
  327. border-radius: 10rpx;
  328. margin: 26rpx auto;
  329. .proc_bar{
  330. border-radius: 10rpx;
  331. background-size: 30rpx 30rpx;
  332. height: 20rpx;
  333. background-color: #FF791B;
  334. background-image: linear-gradient(-45deg,rgba(255, 255, 255, .2) 25%,transparent 25%,transparent 50%,rgba(255, 255, 255, .2) 50%,rgba(255, 255, 255, .2) 75%,transparent 75%,transparent);
  335. }
  336. }
  337. .sign_but_con{
  338. margin-top: 52rpx;
  339. display: flex;
  340. justify-content: center;
  341. .sign_but{
  342. width: 580rpx;
  343. height: 80rpx;
  344. border: 4rpx solid #FF7C19;
  345. box-shadow: 0px 6rpx 30rpx 0px rgba(255, 130, 25, 0.18);
  346. border-radius: 80rpx;
  347. display: flex;
  348. align-items: center;
  349. justify-content: center;
  350. font-size: 34rpx;
  351. font-family: PingFang;
  352. font-weight: 500;
  353. color: #FF7D15;
  354. }
  355. }
  356. }
  357. .mis_int{
  358. padding: 20rpx;
  359. .mis_two_con{
  360. display: flex;
  361. justify-content: space-between;
  362. margin-top: 20rpx;
  363. .con_item{
  364. position: relative;
  365. padding: 46rpx;
  366. box-shadow: 0px 10rpx 48rpx 4rpx rgba(86, 86, 86, 0.08);
  367. border-radius: 32rpx;
  368. .text_con{
  369. text{
  370. display: block;
  371. &:first-child{
  372. font-size: 34rpx;
  373. font-family: PingFang;
  374. font-weight: bold;
  375. color: #666666;
  376. }
  377. &:last-child{
  378. margin-top: 14rpx;
  379. font-size: 23rpx;
  380. font-family: PingFang;
  381. font-weight: 500;
  382. color: #B2B2B2;
  383. }
  384. }
  385. }
  386. .img_con{
  387. margin-top: 42rpx;
  388. width:254rpx;
  389. height:138rpx;
  390. image{
  391. width: 100%;
  392. height: 100%;
  393. }
  394. }
  395. .sign_but{
  396. position: absolute;
  397. top: 46rpx;
  398. right: 46rpx;
  399. image{
  400. width: 43rpx;
  401. height: 43rpx;
  402. }
  403. }
  404. }
  405. }
  406. .mis_b_con{
  407. margin-top: 36rpx;
  408. view{
  409. width: 100%;
  410. height: 180rpx;
  411. background-repeat:no-repeat;
  412. background-size: contain;
  413. background-position: center center;
  414. }
  415. }
  416. }
  417. .mis_int_title{
  418. padding-left: 14rpx;
  419. font-size: 38rpx;
  420. font-family: PingFang;
  421. font-weight: bold;
  422. color: #2D2D2D;
  423. border-left: 6rpx solid #FF7C19;
  424. }
  425. .int_mis{
  426. margin-top: 16rpx;
  427. padding: 20rpx;
  428. .int_mis_con{
  429. margin-top: 20rpx;
  430. border-bottom: 2rpx solid #F5F5F5;
  431. &:last-child{
  432. border-bottom: none;
  433. }
  434. .int_mis_con_item{
  435. display: flex;
  436. padding: 20rpx 0;
  437. justify-content: space-between;
  438. align-items: center;
  439. .imc_item_left{
  440. display: flex;
  441. align-items: center;
  442. image{
  443. width: 80rpx;
  444. height: 80rpx;
  445. }
  446. .imc_item_left_text{
  447. margin-left: 20rpx;
  448. height: 64rpx;
  449. display: flex;
  450. flex-direction: column;
  451. justify-content: space-between;
  452. text{
  453. &:first-child{
  454. font-size: 26rpx;
  455. font-family: PingFang;
  456. font-weight: 500;
  457. color: #2D2D2D;
  458. }
  459. &:last-child{
  460. height: 25rpx;
  461. font-size: 24rpx;
  462. font-family: PingFang;
  463. font-weight: 500;
  464. color: #999999;
  465. }
  466. }
  467. }
  468. }
  469. .imc_item_right{
  470. width: 124rpx;
  471. height: 50rpx;
  472. background-color: #FF6D12;
  473. box-shadow: 0px 6rpx 14rpx 0px rgba(255, 127, 37, 0.35);
  474. border-radius: 25rpx;
  475. color: #fff;
  476. text-align: center;
  477. font-size: 26rpx;
  478. line-height: 50rpx;
  479. &.upAl{
  480. background: #BBBBBB !important;
  481. }
  482. }
  483. }
  484. }
  485. }
  486. }
  487. .top_bar {
  488. width: 750rpx;
  489. // height: 178rpx;
  490. padding-top: 42rpx;
  491. /* #ifdef APP-PLUS||MP-WEIXIN */
  492. padding-top: calc(var(--status-bar-height) + 42rpx);
  493. /* #endif */
  494. padding-right: 20rpx;
  495. width: 750rpx;
  496. z-index: 50;
  497. .top_header {
  498. display: flex;
  499. align-items: center;
  500. justify-content: space-between;
  501. .top_header_left {
  502. padding-left: 20rpx;
  503. image {
  504. width: 17rpx;
  505. height: 29rpx;
  506. }
  507. }
  508. .top_header_cen {
  509. margin: 0 50rpx;
  510. font-size: 36rpx;
  511. font-family: PingFang SC;
  512. color: #FFFFFF;
  513. }
  514. .top_white_space {
  515. width: 30rpx;
  516. height: 29rpx;
  517. padding-right: 20rpx;
  518. }
  519. }
  520. .top_category {
  521. margin-top: 40rpx;
  522. .cate_wrap {
  523. display: -webkit-box;
  524. align-items: center;
  525. overflow-x: scroll;
  526. .category_item {
  527. color: #FFFFFF;
  528. padding: 0 20rpx;
  529. margin-left: 20rpx;
  530. height: 54rpx;
  531. &.boWhite {
  532. border-bottom: 4rpx solid #fff;
  533. }
  534. }
  535. }
  536. }
  537. }
  538. .date_banner{
  539. }
  540. </style>