index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. <template>
  2. <app-layout :overflow='false'>
  3. <view v-if="customize">
  4. <image load-lazy='true' class='bg' :src='customize.head_bg ? customize.head_bg : checkImg.app_image.top_bg'></image>
  5. <!-- 签到提醒 -->
  6. <view @click="changeSwitch" class='tips dir-left-nowrap cross-center' v-if="config.is_remind == 1">
  7. <text :style="{'color':`${customize.remind_font}`}">签到提醒</text>
  8. <switch style="transform:scale(0.7)" v-if="user.is_remind == 1" @change='toSwitch' :checked="user.is_remind"></switch>
  9. <switch style="transform:scale(0.7)" v-else @change='toSwitch' :checked="user.is_remind"></switch>
  10. </view>
  11. <!-- 规则 -->
  12. <view @click="toRules" class='icon'>
  13. <view class='rules'>签到规则</view>
  14. </view>
  15. <view @click="toIndex" class='icon toIndex'>
  16. <view class='rules'>回到首页</view>
  17. </view>
  18. <!-- 签到按钮 -->
  19. <view @click="subscribe" class='check-in-btn' v-if="user.today_check_in == null">
  20. <image load-lazy='true' :src='customize.not_signed_icon ? customize.not_signed_icon : checkImg.app_image.check_in'></image>
  21. </view>
  22. <view class='check-in-btn' v-else>
  23. <image load-lazy='true' :src='customize.signed_icon ? customize.signed_icon : checkImg.app_image.over'></image>
  24. </view>
  25. <view :style="{'color':`${customize.daily_font}`}" class='no-check-in' v-if="user.today_check_in == null">今日还未签到</view>
  26. <view :style="{'color':`${customize.daily_font}`}" class='no-check-in' v-else>今日已签到</view>
  27. <view :style="{'color':`${customize.daily_font}`}" v-if="user.continue_day || user.continue_day == 0" class='always'>已连续签到{{user.continue_day}}天</view>
  28. <!-- 签到奖励 -->
  29. <view class='other' :style="{'background':`linear-gradient(to bottom,${customize.end_bg},${customize.end_style == 1 ? customize.end_gradient_bg : customize.end_bg})`,'min-height':`${other_height}`}">
  30. <view class='reward' v-if="config.continue.length > 0">
  31. <view :class="[`reward-item`, `${item.day == config.continue[0].day ? 'no-top':''}`]" v-for="(item, index) in config.continue" :key="index" :style="{'border-color':`${customize.line_font}`}">
  32. <image load-lazy='true' class='reward-icon' v-if="item.type =='integral'" :src="customize.integral_icon ? customize.integral_icon : '/static/image/integral.png'"></image>
  33. <image load-lazy='true' class='reward-icon' v-if="item.type =='balance'" :src="customize.balance_icon ? customize.balance_icon : '/static/image/hongbao.png'"></image>
  34. <view class='reward-title'>连续签到{{item.day}}天</view>
  35. <view class='reward-content' v-if="item.type =='integral'">赠送{{item.number}}积分</view>
  36. <view class='reward-content' v-if="item.type =='balance'">赠送{{item.number}}元余额红包</view>
  37. <view class='reward-btn' v-if="item.check">
  38. <button class='over' :style="{'color':`${customize.prompt_font}`,'backgroundColor':`${customize.btn_bg}`}">已领取</button>
  39. </view>
  40. <view class='reward-btn' v-else-if="user.continue_day >= item.day" data-id="2" @click="getAward(2,item.day)">
  41. <button :style="{'color':`${customize.not_prompt_font}`,'backgroundColor':`${customize.not_btn_bg}`}">领取</button>
  42. </view>
  43. </view>
  44. </view>
  45. <view class='reward balance-reward' v-if="config.total.length > 0">
  46. <view class='reward-item' v-for="(item, index) in config.total" :key="index">
  47. <image load-lazy='true' class='reward-icon' v-if="item.type =='integral'" :src="customize.integral_icon ? customize.integral_icon : '/static/image/integral.png'"></image>
  48. <image load-lazy='true' class='reward-icon' v-if="item.type =='balance'" :src="customize.balance_icon ? customize.balance_icon : '/static/image/hongbao.png'"></image>
  49. <view class='reward-title'>累积签到{{item.day}}天</view>
  50. <view class='reward-content' v-if="item.type =='integral'">赠送{{item.number}}积分</view>
  51. <view class='reward-content' v-if="item.type =='balance'">赠送{{item.number}}元余额红包</view>
  52. <view class='reward-btn' v-if="item.check">
  53. <button class='over'>已领取</button>
  54. </view>
  55. <view class='reward-btn' v-if="user.total_day >= item.day && !item.check" data-id="3" @click="getAward(3,item.day)">
  56. <button :style="{'color':`${customize.not_prompt_font}`,'backgroundColor':`${customize.not_btn_bg}`}">领取</button>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- 日历 -->
  61. <!-- #ifndef MP-BAIDU -->
  62. <view class='day'>
  63. <!-- #endif -->
  64. <!-- #ifdef MP-BAIDU -->
  65. <view class='day' style="margin: 12px 18px;">
  66. <!-- #endif -->
  67. <view class='day-title main-center cross-center'>
  68. <view @click="lose">
  69. <view class="toggle-btn main-center cross-center">
  70. <image load-lazy='true' src='/static/image/icon/arrow-left.png'></image>
  71. </view>
  72. </view>
  73. <view class='date'>
  74. <text>{{year}}</text>
  75. <text>年</text>
  76. <text>{{month}}</text>
  77. <text>月</text>
  78. </view>
  79. <view @click="add">
  80. <view class="toggle-btn main-center cross-center">
  81. <image load-lazy='true' src='/static/image/icon/arrow-right.png'></image>
  82. </view>
  83. </view>
  84. </view>
  85. <view class='week main-between'>
  86. <view>日</view>
  87. <view>一</view>
  88. <view>二</view>
  89. <view>三</view>
  90. <view>四</view>
  91. <view>五</view>
  92. <view>六</view>
  93. </view>
  94. <view class='everyday main-between'>
  95. <!-- #ifdef MP-TOUTIAO || MP-WEIXIN -->
  96. <view v-for="(item,index) in everyday" class='every' :key="index">
  97. <!-- #endif -->
  98. <!-- #ifdef MP-BAIDU || MP-ALIPAY -->
  99. <view v-for="(item,index) in everyday" class='every' style="width:28px;" :key="index">
  100. <!-- #endif -->
  101. <image load-lazy='true' v-if="item.check" :src="customize.calendar_icon ? customize.calendar_icon : './../image/choose.png'"></image>
  102. <view :class="[`${item.date > now ? 'next' : ''}`]">{{item.date}}</view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <view class='dialog' v-if="success || getRed">
  111. <view v-if="success" class='success'>
  112. <image load-lazy='true' class='success-img' v-if="success" :src='checkImg.app_image.success'></image>
  113. <image load-lazy='true' class='success-img' v-else :src='checkImg.app_image.get'></image>
  114. <view class='getPrice main-center'>
  115. <image load-lazy='true' v-if="result.type == 'integral'" :src="customize.integral_icon ? customize.integral_icon : '/static/image/integral.png'"></image>
  116. <text>+{{result.number}}</text>
  117. </view>
  118. <view v-if="success" class='info'>
  119. <text v-if="result.status == 1">签到成功</text>
  120. <text v-if="result.status == 2">已连续签到</text>
  121. <text v-if="result.status == 3">已累积签到</text>
  122. <text v-if="result.status != 1">{{result.day}}天</text>
  123. </view>
  124. <view class='info' v-else>恭喜获得签到奖励</view>
  125. <view @click="close">
  126. <button class='success-btn'>{{success ? '知道咯' : '收下奖励'}}</button>
  127. </view>
  128. </view>
  129. <view v-if="getRed" class='getRed'>
  130. <image load-lazy='true' class='getRed-img' :src='checkImg.app_image.getRed'></image>
  131. <view class='getRed-title'>恭喜获得签到奖励</view>
  132. <view class='getRed-price'>
  133. <text>+{{result.number}}</text>元</view>
  134. <view class='getRed-content'>余额红包</view>
  135. <view @click="close">
  136. <button class='getRed-btn'>收下奖励</button>
  137. </view>
  138. <view class='getRed-info'>
  139. <text v-if="result.status == 1">已签到</text>
  140. <text v-if="result.status == 2">已连续签到</text>
  141. <text v-if="result.status == 3">已累积签到</text>
  142. <text>{{result.day}}</text>天</view>
  143. </view>
  144. <view :class="[`close`,`${getRed ? 'get-close' : ''}`]" @click="close">
  145. <image load-lazy='true' :src='mallImg.close'></image>
  146. </view>
  147. </view>
  148. </app-layout>
  149. </template>
  150. <script>
  151. import { mapState } from "vuex";
  152. export default {
  153. data() {
  154. return {
  155. month: 1,
  156. year: 1990,
  157. everyday: [],
  158. config: [],
  159. user: {},
  160. result: {},
  161. other_height: '500rpx',
  162. now: 1,
  163. noday: ['', '', '', '', '', '', '', ''],
  164. week: 1,
  165. date: [],
  166. getRed: false,
  167. customize: null,
  168. page_loading: true,
  169. template_message: false,
  170. success: false
  171. }
  172. },
  173. computed: {
  174. ...mapState({
  175. userInfo: state => state.user.info,
  176. mallImg: state => state.mallConfig.__wxapp_img.mall,
  177. checkImg: state => state.mallConfig.plugin.check_in
  178. })
  179. },
  180. methods: {
  181. toRules() {
  182. uni.navigateTo({
  183. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.check_in.index)}&keys=${JSON.stringify(['config', 'rule'])}`,
  184. });
  185. },
  186. toIndex() {
  187. uni.redirectTo({
  188. url: '/pages/index/index'
  189. });
  190. },
  191. getSetting() {
  192. let that = this;
  193. that.$request({
  194. url: that.$api.check_in.customize,
  195. }).then(response=>{
  196. if(response.code == 0) {
  197. that.customize = response.data.list;
  198. that.getList();
  199. }else {
  200. that.$hideLoading();
  201. uni.showToast({
  202. title: response.msg,
  203. icon: 'none',
  204. duration: 1000
  205. });
  206. }
  207. }).catch(response => {
  208. that.$hideLoading();
  209. });
  210. },
  211. getList() {
  212. let that = this;
  213. that.$request({
  214. url: that.$api.check_in.index,
  215. }).then(response=>{
  216. that.$hideLoading();
  217. if(response.code == 0) {
  218. that.config = response.data.config;
  219. that.user = response.data.check_in_user;
  220. that.template_message = response.data.template_message;
  221. that.getEveryday();
  222. }else {
  223. uni.showToast({
  224. title: response.msg,
  225. icon: 'none',
  226. duration: 1000
  227. });
  228. }
  229. }).catch(response => {
  230. that.$hideLoading();
  231. });
  232. },
  233. getEveryday() {
  234. let that = this;
  235. let month = that.month;
  236. let year = that.year;
  237. let day = 32;
  238. let everyday = [];
  239. if (month < 8 && month % 2 == 0 && month != 2) {
  240. day = 31;
  241. } else if (month > 7 && month % 2 == 1) {
  242. day = 31;
  243. } else if (month == 2) {
  244. if (year % 4 == 0 && year % 100 != 0) {
  245. day = 30;
  246. } else {
  247. day = 29;
  248. }
  249. }
  250. for (let i = 1; i < day; i++) {
  251. everyday.push({
  252. date: i,
  253. check: false
  254. })
  255. }
  256. let noday = that.noday;
  257. let before = that.week;
  258. for (let z = 0; z < before; z++) {
  259. everyday.unshift(noday[z])
  260. }
  261. if (everyday.length % 7 != 0) {
  262. let number = 7 - (everyday.length % 7);
  263. for (let y = 0; y < number; y++) {
  264. everyday.push(noday[y])
  265. }
  266. }
  267. that.everyday = everyday;
  268. that.getDay(year,month);
  269. },
  270. getDay(year, month) {
  271. let that = this;
  272. that.$request({
  273. url: that.$api.check_in.sign_in_day,
  274. data: {
  275. month: month,
  276. year: year
  277. }
  278. }).then(response=>{
  279. that.$hideLoading();
  280. if(response.code == 0) {
  281. let date = response.data.check_in_day;
  282. for(let day of that.everyday) {
  283. if(day) {
  284. day.check = false;
  285. for(let item of date) {
  286. if(item == day.date) {
  287. day.check = true;
  288. }
  289. }
  290. }
  291. }
  292. that.$forceUpdate();
  293. }else {
  294. uni.showToast({
  295. title: response.msg,
  296. icon: 'none',
  297. duration: 1000
  298. });
  299. }
  300. }).catch(response => {
  301. that.$hideLoading();
  302. });
  303. },
  304. lose() {
  305. let month = this.month - 1;
  306. let year = this.year;
  307. let now = this.now;
  308. if (month < 1) {
  309. month = 12;
  310. year--;
  311. }
  312. let dayValue = year + "-" + month + '-01';
  313. var day = new Date(Date.parse(dayValue.replace(/-/g, '/')));
  314. this.week = day.getDay();
  315. var myDate = new Date();
  316. let nowYear = myDate.getFullYear();
  317. let nowMonth = myDate.getMonth() + 1;
  318. if (year == nowYear) {
  319. if (month > nowMonth) {
  320. now = 0;
  321. } else if (month < nowMonth) {
  322. now = 32;
  323. } else {
  324. now = myDate.getDate();
  325. }
  326. } else if (year > nowYear) {
  327. now = 0;
  328. } else {
  329. now = 32;
  330. }
  331. this.year = year;
  332. this.month = month;
  333. this.now = now;
  334. this.getEveryday();
  335. },
  336. // 月份增大
  337. add() {
  338. let month = this.month + 1;
  339. let year = this.year;
  340. let now = this.now;
  341. if (month > 12) {
  342. month = 1;
  343. year++;
  344. }
  345. let dayValue = year + "-" + month + '-01';
  346. var day = new Date(Date.parse(dayValue.replace(/-/g, '/')));
  347. this.week = day.getDay();
  348. var myDate = new Date();
  349. let nowYear = myDate.getFullYear();
  350. let nowMonth = myDate.getMonth() + 1;
  351. if (year == nowYear) {
  352. if (month > nowMonth) {
  353. now = 0;
  354. } else if (month < nowMonth) {
  355. now = 32;
  356. } else {
  357. now = myDate.getDate();
  358. }
  359. } else if (year > nowYear) {
  360. now = 0;
  361. } else {
  362. now = 32;
  363. }
  364. this.year = year;
  365. this.month = month;
  366. this.now = now;
  367. this.getEveryday();
  368. },
  369. subscribe() {
  370. this.$subscribe(this.template_message).then(res => {
  371. this.getAward(1);
  372. }).catch(res => {
  373. this.getAward(1);
  374. });
  375. },
  376. getAward(status,day) {
  377. let that = this;
  378. uni.showLoading({
  379. title: status == 1 ? '签到中...' : '领取中...'
  380. });
  381. that.$request({
  382. url: that.$api.check_in.sign_in,
  383. data: {
  384. status: status,
  385. day: day ? day : 1
  386. }
  387. }).then(response=>{
  388. if(response.code == 0) {
  389. let queueId = response.data.queueId;
  390. let token = response.data.token;
  391. that.checkInResult(queueId,token);
  392. }else {
  393. uni.hideLoading();
  394. uni.showToast({
  395. title: response.msg,
  396. icon: 'none',
  397. duration: 1000
  398. });
  399. }
  400. }).catch(response => {
  401. uni.hideLoading();
  402. that.$event.on(that.$const.EVENT_USER_LOGIN).then(()=>{
  403. that.$store.dispatch('user/info');
  404. that.getAward(status,day);
  405. });
  406. });
  407. },
  408. checkInResult(queueId, token) {
  409. let that = this;
  410. that.$request({
  411. url: that.$api.check_in.sign_in_result,
  412. data: {
  413. queueId: queueId,
  414. token: token
  415. }
  416. }).then(response=>{
  417. uni.hideLoading();
  418. if(response.code == 0) {
  419. if (response.data.retry == 1) {
  420. that.checkInResult(queueId, token);
  421. } else {
  422. that.result = response.data
  423. if (that.result.type == 'integral') {
  424. that.success = true;
  425. } else if (that.result.type == 'balance') {
  426. that.getRed = true;
  427. }
  428. }
  429. }else {
  430. uni.showToast({
  431. title: response.msg,
  432. icon: 'none',
  433. duration: 1000
  434. });
  435. }
  436. }).catch(response => {
  437. uni.hideLoading();
  438. });
  439. },
  440. changeSwitch() {
  441. if(this.user.is_remind == 0) {
  442. this.$subscribe(this.template_message);
  443. }
  444. },
  445. toSwitch (e) {
  446. let that = this;
  447. let is_remind = 0;
  448. if (e.detail.value) {
  449. is_remind = 1;
  450. }
  451. that.$request({
  452. url: that.$api.check_in.user,
  453. data: {
  454. is_remind: is_remind
  455. }
  456. }).then(response=>{
  457. that.$hideLoading();
  458. if(response.code == 0) {
  459. this.user.is_remind = is_remind
  460. }else {
  461. uni.showToast({
  462. title: response.msg,
  463. icon: 'none',
  464. duration: 1000
  465. });
  466. }
  467. }).catch(response => {
  468. that.$hideLoading();
  469. });
  470. },
  471. close() {
  472. this.success = false;
  473. this.getRed = false;
  474. this.getList();
  475. },
  476. },
  477. onShareAppMessage: function() {
  478. return this.$shareAppMessage({
  479. title: this.$children[0].navigationBarTitle,
  480. path: "/plugins/check_in/index/index",
  481. });
  482. },
  483. // #ifdef MP-WEIXIN
  484. onShareTimeline() {
  485. // 分享朋友圈beta
  486. return this.$shareTimeline({
  487. title: this.$children[0].navigationBarTitle,
  488. query: {} // 此处填写页面的参数
  489. });
  490. },
  491. // #endif
  492. onLoad() {
  493. let that = this;
  494. wx.getSystemInfo({
  495. success: function(res, rect) {
  496. that.other_height = (res.windowHeight*2 - 500) + 'rpx'
  497. }
  498. })
  499. var myDate = new Date();
  500. that.year = myDate.getFullYear();
  501. that.month = myDate.getMonth() + 1;
  502. that.now = myDate.getDate();
  503. let dayValue = that.year + "-" + that.month + '-01';
  504. let day = new Date(Date.parse(dayValue.replace(/-/g, '/')));
  505. that.week = day.getDay();
  506. // #ifdef MP-WEIXIN
  507. wx.showShareMenu({
  508. menus: ['shareAppMessage', 'shareTimeline']
  509. })
  510. // #endif
  511. that.$showLoading({
  512. type: 'global',
  513. text: '加载中...'
  514. });
  515. that.getSetting();
  516. }
  517. }
  518. </script>
  519. <style scoped lang="scss">
  520. .bg {
  521. width: 100%;
  522. height: #{500rpx};
  523. display: block;
  524. }
  525. .tips {
  526. position: absolute;
  527. top: #{55rpx};
  528. left: #{30rpx};
  529. color: #fff;
  530. font-size: #{24rpx};
  531. }
  532. .icon {
  533. position: absolute;
  534. right: 0;
  535. top: #{55rpx};
  536. }
  537. .icon.toIndex {
  538. top:#{119rpx};
  539. }
  540. .rules {
  541. height: #{48rpx};
  542. line-height: #{46rpx};
  543. width: #{144rpx};
  544. text-align: center;
  545. padding: 0;
  546. color: #fff;
  547. background-color: rgba(0, 0, 0, 0.3);
  548. font-size: #{24rpx};
  549. border-top-left-radius: #{24rpx};
  550. border-bottom-left-radius: #{24rpx};
  551. border: #{2rpx} solid #fff;
  552. border-right: 0;
  553. }
  554. .check-in-btn {
  555. height: #{260rpx};
  556. width: #{260rpx};
  557. position: absolute;
  558. top: #{60rpx};
  559. left: 50%;
  560. margin-left: #{-130rpx};
  561. }
  562. .check-in-btn image {
  563. height: #{260rpx};
  564. width: #{260rpx};
  565. }
  566. .no-check-in {
  567. font-size: #{32rpx};
  568. color: #fff;
  569. position: absolute;
  570. top: #{340rpx};
  571. left: 0;
  572. right: 0;
  573. text-align: center;
  574. }
  575. .always {
  576. font-size: #{28rpx};
  577. color: #fff;
  578. position: absolute;
  579. top: #{390rpx};
  580. left: 0;
  581. right: 0;
  582. text-align: center;
  583. }
  584. .reward {
  585. margin: 0 #{24rpx};
  586. border-radius: #{14rpx};
  587. padding: 0 #{40rpx};
  588. background-color: #fff;
  589. }
  590. .reward.balance-reward {
  591. margin-top:#{24rpx};
  592. }
  593. .reward-item {
  594. height: #{150rpx};
  595. border-top: #{1rpx} dashed #5997fc;
  596. color: #2c3c7e;
  597. font-size: #{26rpx};
  598. position: relative;
  599. }
  600. .reward-item.no-top {
  601. border-top: #{1rpx} dashed #fff!important;
  602. }
  603. .reward.balance-reward .reward-item {
  604. border-top: #{1rpx} solid #fff;
  605. }
  606. .reward-icon {
  607. float: left;
  608. height: #{72rpx};
  609. width: #{72rpx};
  610. margin-top: #{39rpx};
  611. margin-right: #{24rpx};
  612. }
  613. .reward-title {
  614. margin-top: #{40rpx};
  615. }
  616. .reward-content {
  617. margin-top: #{-3rpx};
  618. }
  619. .reward-btn {
  620. position: absolute;
  621. right: #{40rpx};
  622. top: #{47rpx};
  623. }
  624. .reward-btn button {
  625. border-radius: #{28rpx};
  626. width: #{150rpx};
  627. height: #{56rpx};
  628. line-height: #{56rpx};
  629. color: #fff;
  630. font-size: #{26rpx};
  631. background-color: #5997fc;
  632. }
  633. .reward-btn button::after {
  634. border: 0;
  635. }
  636. .reward-btn .over {
  637. background-color: #cdcdcd;
  638. }
  639. .day {
  640. margin: #{24rpx};
  641. background-color: #fff;
  642. border-radius: #{14rpx};
  643. z-index: 99;
  644. padding: #{40rpx} #{25rpx};
  645. padding-top: 0;
  646. }
  647. .day-title {
  648. height: #{110rpx};
  649. }
  650. .day-title image {
  651. display: block;
  652. margin-top: #{4rpx};
  653. height: #{22rpx};
  654. width: #{12rpx};
  655. }
  656. .date {
  657. color: #353535;
  658. font-size: #{28rpx};
  659. }
  660. .week {
  661. color: #999;
  662. height: #{64rpx};
  663. border-bottom: #{1rpx} solid #e2e2e2;
  664. margin-bottom: #{16rpx};
  665. }
  666. .week view {
  667. height: #{64rpx};
  668. width: #{64rpx};
  669. margin: 0 #{15rpx};
  670. line-height: #{64rpx};
  671. text-align: center;
  672. }
  673. .everyday {
  674. flex-wrap: wrap;
  675. }
  676. .everyday .every {
  677. margin: 0 #{15rpx} #{8rpx};
  678. height: #{64rpx};
  679. width: #{64rpx};
  680. line-height: #{64rpx};
  681. text-align: center;
  682. position: relative;
  683. }
  684. .everyday .every image {
  685. height: #{64rpx};
  686. position: absolute;
  687. width: #{64rpx};
  688. top: 0;
  689. left: 0;
  690. display: block;
  691. }
  692. .every view {
  693. line-height: #{64rpx};
  694. position: absolute;
  695. height: #{64rpx};
  696. width: #{64rpx};
  697. top: 0;
  698. left: 0;
  699. z-index: 5;
  700. }
  701. .next {
  702. color: #999;
  703. }
  704. .dialog {
  705. position: fixed;
  706. left: 0;
  707. top: 0;
  708. height: 100%;
  709. width: 100%;
  710. z-index: 999;
  711. background-color: rgba(0, 0, 0, 0.3);
  712. }
  713. .success {
  714. position: fixed;
  715. top: #{350rpx};
  716. left: 0;
  717. right: 0;
  718. width: #{630rpx};
  719. margin: 0 auto;
  720. background-color: #fff;
  721. border-radius: #{16rpx};
  722. z-index: 1000;
  723. padding-bottom: #{64rpx};
  724. }
  725. .success .success-img {
  726. height: #{450rpx};
  727. width: #{630rpx};
  728. margin-top: #{-250rpx};
  729. }
  730. .getPrice {
  731. height: #{40rpx};
  732. line-height: #{40rpx};
  733. color: #ff4544;
  734. font-size: #{44rpx};
  735. margin-bottom: #{28rpx};
  736. }
  737. .success .getPrice image {
  738. height: #{40rpx};
  739. width: #{40rpx};
  740. margin-right: #{16rpx};
  741. display: block;
  742. }
  743. .info {
  744. font-size: #{32rpx};
  745. color: #353535;
  746. margin-bottom: #{44rpx};
  747. text-align: center;
  748. }
  749. .info text {
  750. color: #ff4544;
  751. }
  752. .success-btn {
  753. width: #{320rpx};
  754. height: #{72rpx};
  755. line-height: #{72rpx};
  756. font-size: #{32rpx};
  757. color: #fff;
  758. background-color: #ff4544;
  759. border-radius: #{36rpx};
  760. margin: 0 auto;
  761. }
  762. .success-btn::after {
  763. border: 0;
  764. }
  765. .getRed {
  766. height: #{460rpx};
  767. width: #{630rpx};
  768. position: fixed;
  769. top: #{330rpx};
  770. left: 0;
  771. right: 0;
  772. margin: 0 auto;
  773. text-align: center;
  774. font-size: #{28rpx};
  775. color: #ba7d44;
  776. }
  777. .getRed-img {
  778. height: #{460rpx};
  779. width: #{630rpx};
  780. }
  781. .getRed-title {
  782. position: fixed;
  783. text-align: center;
  784. left: 0;
  785. width: 100%;
  786. top: #{390rpx};
  787. }
  788. .getRed-price {
  789. color: #ff4544;
  790. position: fixed;
  791. text-align: center;
  792. left: 0;
  793. width: 100%;
  794. top: #{450rpx};
  795. }
  796. .getRed-price text {
  797. font-family: DIN;
  798. font-size: #{68rpx};
  799. }
  800. .getRed-content {
  801. position: fixed;
  802. text-align: center;
  803. left: 0;
  804. width: 100%;
  805. top: #{540rpx};
  806. }
  807. .getRed-btn {
  808. position: fixed;
  809. top: #{640rpx};
  810. left: 0;
  811. right: 0;
  812. margin: 0 auto;
  813. width: #{320rpx};
  814. height: #{72rpx};
  815. color: #ff4544;
  816. font-size: #{32rpx};
  817. line-height: #{72rpx};
  818. border-radius: #{36rpx};
  819. background: linear-gradient(to bottom, #ffe8bc, #ffcb7c);
  820. }
  821. .getRed-btn::after {
  822. border: 0;
  823. }
  824. .close {
  825. position: fixed;
  826. top: #{870rpx};
  827. height:#{30rpx};
  828. width:#{30rpx};
  829. left: 50%;
  830. margin-left: #{-15rpx};
  831. z-index: 1000;
  832. }
  833. .close image {
  834. height:#{30rpx};
  835. width:#{30rpx};
  836. }
  837. .get-close {
  838. top: #{800rpx};
  839. }
  840. .getRed-info {
  841. font-size: #{22rpx};
  842. position: fixed;
  843. top: #{724rpx};
  844. left: 0;
  845. right: 0;
  846. text-align: center;
  847. color: #ffcb7c;
  848. }
  849. .other {
  850. background: linear-gradient(to bottom,#2a3a7c,#5b7ac7);
  851. padding-bottom: #{40rpx};
  852. position: absolute;
  853. top: #{500rpx};
  854. left: 0;
  855. width: 100%;
  856. }
  857. .toggle-btn {
  858. width: #{150rpx};
  859. height: #{110rpx};
  860. }
  861. </style>