index.vue 28 KB

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