index.vue 27 KB

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