calendar.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. <template>
  2. <view class="calendar">
  3. <view class="content" @tap.stop>
  4. <view class="head_calendar">
  5. <view>取消</view>
  6. <view class="card_tag">
  7. <view class="tab_item center_in" :class="current == item.type ? 'activate_tab' :''"
  8. v-for="(item,index) in tagData" :key="index" @click="getTab(item)">{{item.title}}</view>
  9. </view>
  10. <view class="today_card">
  11. <view class="today_box" v-if="current != 'four'">今</view>
  12. </view>
  13. </view>
  14. <view class="title" v-if="current == 'solar'">
  15. <view class="left">
  16. {{showData}}
  17. </view>
  18. <view class="sure" @click="sure">
  19. 确定
  20. </view>
  21. </view>
  22. <view class="card_time_tag" v-if="current != 'four'">
  23. <view class="time_tag">年</view>
  24. <view class="time_tag">月</view>
  25. <view class="time_tag">日</view>
  26. <view class="time_tag">时</view>
  27. <view class="time_tag">分</view>
  28. </view>
  29. <picker-view :indicator-style="indicatorStyle" :value="selectValue" @change="bindChange"
  30. v-if="current != 'four'">
  31. <picker-view-column>
  32. <view class="item" v-for="(item,index) in years" :key="index">{{item}}</view>
  33. </picker-view-column>
  34. <picker-view-column>
  35. <view class="item" v-for="(item,index) in months" :key="index">{{item}}</view>
  36. </picker-view-column>
  37. <picker-view-column>
  38. <view class="item" v-for="(item,index) in days" :key="index">{{item}}</view>
  39. </picker-view-column>
  40. <picker-view-column v-if="isHourShow">
  41. <view class="item" v-for="(item,index) in lunarHour" :key="index">
  42. {{isActive ? item.solar : item.label}}
  43. </view>
  44. </picker-view-column>
  45. <picker-view-column v-if="isHourShow">
  46. <view class="item" v-for="(item,index) in minuteHour" :key="index">
  47. {{isActive ? item.solar : item.label}}
  48. </view>
  49. </picker-view-column>
  50. </picker-view>
  51. <view class="card_time_tag" v-if="current == 'four'">
  52. <view class="time_tag">年柱</view>
  53. <view class="time_tag">月柱</view>
  54. <view class="time_tag">日柱</view>
  55. <view class="time_tag">时柱</view>
  56. </view>
  57. <view class="card_four_box" v-if="current == 'four'">
  58. <view class="card_prin">
  59. <view class="cipal_box_flex" v-for="(item1,index) in principal" :key="index"
  60. @click="getCloudy(item1,index)">
  61. <view class="cipal_box" :class="getfour(item1,index) ? 'activate_cipal' : ''">{{item1}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="range_hint">查找范围:1801-2099年</view>
  66. </view>
  67. <view class="saving_time">
  68. <span class="iconfont icon-yiwen"></span>
  69. <span class="saving_title">夏令时</span>
  70. <u-switch v-model="summer" activeColor="#b2955d" inactiveColor="#e9e9eb" size="18"></u-switch>
  71. </view>
  72. <view class="confirm_title">确定</view>
  73. <!-- <view class="bottom" v-if="isSwitch">
  74. <view class="switch">
  75. <view class="left" :class="{active:isActive}" @click="switchBtn('solar')">
  76. 公历
  77. </view>
  78. <view class="right" :class="{active:!isActive}" @click="switchBtn('lunar')">
  79. 农历
  80. </view>
  81. <view class="bg" :class="type"></view>
  82. </view>
  83. </view> -->
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import conversion from "./calendar.js"
  89. import lunarHour from "./information.js"
  90. import minuteHour from "./minute.js"
  91. export default {
  92. name: "calendar",
  93. data() {
  94. return {
  95. oldYear: 1950, //最大年份
  96. type: "solar", //lunar农历,solar公历
  97. isActive: true, //true公历
  98. showData: "", //显示数据
  99. // showMask:false,
  100. checked: true,
  101. years: [],
  102. months: [],
  103. days: [],
  104. indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth/(750/100))}px;`,
  105. lunarHour: [],
  106. minuteHour: [],
  107. date: "",
  108. hour: "",
  109. leap_month: 0, //1为闰月0为非闰月
  110. sureYear: "1990", //默认弹出显示年份
  111. sureMonth: "06", //默认弹出显示月份
  112. selectValue: [40, 9, 9, 11, 31], //默认弹出选择的状态1990-06-10 10
  113. showYear: '',
  114. showMonth: '',
  115. nextFinally: true,
  116. tagData: [{
  117. type: 'solar',
  118. title: '公历',
  119. }, {
  120. type: 'lunar',
  121. title: '农历',
  122. }, {
  123. type: 'four',
  124. title: '四柱',
  125. }],
  126. summer: false,
  127. };
  128. },
  129. props: {
  130. showMask: {
  131. type: Boolean,
  132. default: false
  133. },
  134. isHourShow: {
  135. type: Boolean,
  136. default: true
  137. },
  138. isSwitch: {
  139. type: Boolean,
  140. default: true
  141. },
  142. current: {
  143. type: [String, Number],
  144. default: 'solar'
  145. },
  146. // 主柱
  147. principal: {
  148. type: Array,
  149. default: []
  150. },
  151. // 副柱
  152. subpost: {
  153. type: Array,
  154. default: []
  155. },
  156. },
  157. components: {
  158. },
  159. created() {
  160. this.getTime();
  161. },
  162. methods: {
  163. pickerHS() {
  164. this.$emit("sure", false);
  165. },
  166. // 提交
  167. sure() {
  168. if (!this.nextFinally) {
  169. this.$u.toast("别着急,正在选时间");
  170. return false;
  171. }
  172. let data = {
  173. "text": this.showData, //显示数据
  174. "type": this.type,
  175. "brithday": {
  176. "brithday[date]": this.date,
  177. "brithday[hour]": this.hour,
  178. "brithday[type]": this.type,
  179. // "brithday[leap_month]":this.leap_month,
  180. },
  181. "newBirthday": {
  182. brithday: {
  183. date: this.date,
  184. hour: this.hour,
  185. type: this.type,
  186. }
  187. },
  188. "date": this.date,
  189. "hour": this.hour || 0,
  190. "year": this.showYear,
  191. "month": this.coverTo(Number(this.showMonth)),
  192. "day": this.coverTo(this.selectValue[2] + 1),
  193. }
  194. if (this.type == 'lunar') {
  195. data.brithday["brithday[leap_month]"] = this.leap_month;
  196. data.newBirthday.brithday.leap_month = this.leap_month;
  197. data.leap_month = this.leap_month;
  198. }
  199. this.$emit("sure", data);
  200. this.nextFinally = true;
  201. },
  202. //进来获取公历的1990-02-10 10,初始化
  203. getTime() {
  204. const date = new Date();
  205. const year = date.getFullYear();
  206. const month = date.getMonth() + 1;
  207. const day = date.getDate();
  208. this.years = [];
  209. this.days = [];
  210. this.months = [];
  211. for (let i = this.oldYear; i <= date.getFullYear(); i++) {
  212. if (this.isActive) {
  213. this.years.push(i);
  214. } else {
  215. this.years.push(i);
  216. // this.years.push(conversion.toChinaYear(i));
  217. }
  218. }
  219. if (this.isActive) {
  220. this.getsolarMonthDays(this.sureYear, this.sureMonth, this.selectValue);
  221. } else {
  222. this.getlunarMonthDays(this.sureYear, this.sureMonth, this.selectValue);
  223. }
  224. this.lunarHour = lunarHour.lunarHour;
  225. this.minuteHour = minuteHour.minuteHour
  226. },
  227. bindChange: function(e) {
  228. const val = e.detail.value;
  229. let year = val[0] + this.oldYear,
  230. month = val[1] + 1,
  231. day = val[2] + 1;
  232. this.days = [];
  233. this.months = [];
  234. this.selectValue = e.detail.value;
  235. this.nextFinally = false;
  236. //公历返回每个月天数
  237. if (this.isActive) {
  238. this.getsolarMonthDays(year, month, val);
  239. } else {
  240. this.getlunarMonthDays(year, month, val);
  241. }
  242. },
  243. // D=>DD,M=>MM,日,月转换 1=>01
  244. coverTo(num) {
  245. return num < 10 ? ("0" + num) : num
  246. },
  247. // 获取公历的月份和天数
  248. getsolarMonthDays(year, month, val) {
  249. // console.log(val, "下标")
  250. function padZero(month) {
  251. return month < 10 ? '0' + month : month.toString();
  252. }
  253. for (let i = 1; i <= 12; i++) {
  254. // this.months.push(i + "月");
  255. this.months.push(padZero(i));
  256. }
  257. for (let i = 1; i <= conversion.solarDays(year, month); i++) {
  258. // this.days.push(i + "日");
  259. this.days.push(padZero(i));
  260. }
  261. this.leap_month = 0;
  262. this.date = `${val[0]+this.oldYear}-${this.coverTo(val[1]+1)}-${this.coverTo(val[2]+1)}`;
  263. this.hour = val[3] - 1;
  264. let showHour = this.isHourShow ? `${val[3] != 0 ? (val[3] - 1) + '时' : '' }` : '';
  265. let minute = this.isHourShow ? `${val[4] != 0 ? (val[4] - 1) + '分' : '' }` : '';
  266. this.showData =
  267. `公历 ${val[0]+this.oldYear}年${this.coverTo(val[1]+1)}月${this.coverTo(val[2]+1)}日 ${showHour}${minute}`;
  268. this.showYear = `${val[0]+this.oldYear}`;
  269. this.showMonth = `${val[1]+1}`;
  270. setTimeout(e => {
  271. this.nextFinally = true;
  272. }, 200)
  273. },
  274. // 获取农历的月份和天数
  275. getlunarMonthDays(year, month, e) {
  276. console.log(e, "下标")
  277. let leap_month = conversion.leapMonth(year);
  278. //返回农历 闰月没有就返回0
  279. for (let i = 1; i <= 12; i++) {
  280. this.months.push(conversion.toChinaMonth(i));
  281. if (i == leap_month) {
  282. this.months.push("闰" + conversion.toChinaMonth(i));
  283. }
  284. }
  285. // 农历返回天数
  286. // **leapMonth 返回闰月 conversion.leapMonth(year)
  287. // **monthDays 返回非闰月的天数
  288. // **leapDays 返回闰月的天数
  289. if (conversion.leapMonth(year) != 0 && (conversion.leapMonth(year) == month || (month - 1) == conversion
  290. .leapMonth(year))) {
  291. for (let i = 1; i <= conversion.leapDays(year, conversion.leapMonth(year)); i++) {
  292. this.days.push(conversion.toChinaDay(i));
  293. }
  294. } else {
  295. let lunarMonth = '';
  296. if (conversion.leapMonth(year)) {
  297. lunarMonth = month < conversion.leapMonth(year) ? month : (month - 1);
  298. } else {
  299. lunarMonth = month;
  300. }
  301. for (let i = 1; i <= conversion.monthDays(year, lunarMonth); i++) {
  302. this.days.push(conversion.toChinaDay(i));
  303. }
  304. }
  305. if (e) {
  306. const val = e;
  307. let year = val[0] + this.oldYear,
  308. month = val[1],
  309. day = val[2],
  310. hour = val[3] ? val[3] : 0,
  311. m = "",
  312. d = "",
  313. h = "";
  314. m = this.months[month];
  315. d = this.days[day]
  316. h = this.lunarHour[hour].value + "时";
  317. this.leap_month = (month == leap_month && leap_month != 0) ? 1 : 0;
  318. let lunarToMonth = this.coverTo(leap_month != 0 ? ((month + 1) <= leap_month ? (month + 1) : month) : (
  319. month + 1));
  320. console.log(lunarToMonth, "获取当前月份")
  321. this.date = `${year}-${lunarToMonth}-${this.coverTo(day+1)}`;
  322. this.hour = hour - 1;
  323. let showHour = this.isHourShow ? `${h}` : '';
  324. this.showData = `农历 ${conversion.toChinaYear(year)}年${m}${d} ${showHour == '24时' ? '' : showHour}`;
  325. this.showYear = year;
  326. this.showMonth = lunarToMonth;
  327. }
  328. setTimeout(e => {
  329. this.nextFinally = true;
  330. }, 150)
  331. },
  332. // 切换公历<=>农历 回显以及切换 this.$refs.yourname.switchBtb(type,data),type:"lunar" or "solar", data:{date:"1992-02-10",hour:3,leap_month:"0",type:"lunar"}
  333. switchBtn(type, data) {
  334. console.log(type, data, "切换")
  335. if (data) {
  336. // console.log(data,"回显")
  337. // 回显
  338. let year = this.$utils.formatDate(data.date).YYYY;
  339. let leapMonth = type == 'solar' ? 0 : conversion.leapMonth(year),
  340. month = this.$utils.formatDate(data.date).MM,
  341. day = this.$utils.formatDate(data.date).D,
  342. y = year - this.oldYear,
  343. // m = leapMonth != 0 ? (Number(month)-1 <= leapMonth ? Number(month) - 1 : Number(month)) : Number(month) - 1,
  344. m = data.leap_month == 1 ? Number(month) : (leapMonth != 0 ? (Number(month) <= leapMonth ? Number(
  345. month) - 1 : Number(month)) : Number(month) - 1),
  346. d = day - 1,
  347. h = Number(data.hour) + 1,
  348. s = Number(data.minute) + 1;
  349. // console.log(leapMonth,"是否闰月",m)
  350. this.leap_month = data.leap_month ? 1 : 0;
  351. this.type = data.type;
  352. this.sureYear = year; //默认弹出显示年份
  353. this.sureMonth = month; //默认弹出显示月份
  354. // console.log(m,"回显月份")
  355. this.selectValue = [y, m, d, h, s]; //默认弹出选择的状态1990-06-10 10
  356. // console.log(m,Number(month),leapMonth)
  357. // console.log(this.sureYear,this.sureMonth,this.selectValue,"回显")
  358. } else {
  359. // 农历公历互相联动切换
  360. if (this.type == type) {
  361. return false;
  362. }
  363. if (type == 'lunar') { //公历切换为农历
  364. let solarYear = this.selectValue[0] + this.oldYear; //公历年份
  365. let leapMonth = conversion.leapMonth(solarYear);
  366. let solarMonth = this.selectValue[1] + 1, //公历年月份
  367. solarDay = this.selectValue[2] + 1, //公历年日份
  368. hour = this.selectValue[3],
  369. minute = this.selectValue[4];
  370. let lunarDate = conversion.solar2lunar(solarYear, solarMonth, solarDay);
  371. this.sureYear = lunarDate.lYear; //默认弹出显示年份
  372. this.sureMonth = lunarDate.lMonth; //默认弹出显示月份
  373. this.leap_month = leapMonth != 0 ? 1 : 0;
  374. let y = lunarDate.lYear - this.oldYear,
  375. m = this.leap_month == 0 ? lunarDate.lMonth - 1 : (this.selectValue[1] < leapMonth ? lunarDate
  376. .lMonth - 1 : lunarDate.lMonth),
  377. d = lunarDate.lDay - 1;
  378. console.log(this.leap_month, "显示", leapMonth, lunarDate.lMonth, this.selectValue[1])
  379. this.selectValue = [y, m, d, hour, minute]; //默认弹出选择的状态1990-06-10 10
  380. // console.log(this.sureYear,this.sureMonth,this.selectValue,"回显农历")
  381. } else { //农历切换为公历
  382. let lunarYear = this.selectValue[0] + this.oldYear; //农历年份
  383. let leapMonth = conversion.leapMonth(lunarYear); //一年中的几月份是闰月
  384. let lunarMonth = leapMonth == 0 ? this.selectValue[1] + 1 : ((this.selectValue[1] + 1) <=
  385. leapMonth ? (this.selectValue[1] + 1) : this.selectValue[1]), //农历年月份
  386. lunarDay = this.selectValue[2] + 1, //农历年日份
  387. hour = this.selectValue[3],
  388. minute = this.selectValue[4];
  389. // console.log(this.selectValue[1],"月份index")
  390. let lunarDate = conversion.lunar2solar(lunarYear, lunarMonth, lunarDay, (leapMonth == this
  391. .selectValue[1] ? true : false));
  392. // console.log(lunarDate,"回显公历全部数据")
  393. this.sureYear = lunarDate.cYear; //默认弹出显示年份
  394. this.sureMonth = lunarDate.cMonth; //默认弹出显示月份
  395. this.leap_month = leapMonth != 0 ? 1 : 0;
  396. let y = lunarDate.cYear - this.oldYear,
  397. m = lunarDate.cMonth - 1,
  398. d = lunarDate.cDay - 1;
  399. this.selectValue = [y, m, d, hour, minute]; //默认弹出选择的状态1990-06-10 10
  400. // console.log(this.sureYear,this.sureMonth,this.selectValue,"回显公历")
  401. }
  402. }
  403. this.isActive = type == 'solar' ? true : false;
  404. this.type = type;
  405. this.getTime();
  406. },
  407. getTab(event) {
  408. if (event.type == 'solar') {
  409. this.switchBtn('solar')
  410. } else if (event.type == 'lunar') {
  411. this.switchBtn('lunar')
  412. }
  413. this.$emit('change', event)
  414. },
  415. getfour(event, index) {
  416. if (this.subpost[index]) {
  417. return true
  418. } else {
  419. return false
  420. }
  421. },
  422. getCloudy(event, index) {
  423. this.$emit('cloudy', event, index)
  424. },
  425. }
  426. }
  427. </script>
  428. <style lang="scss">
  429. .card_time_tag {
  430. width: 100%;
  431. display: flex;
  432. align-items: center;
  433. padding-top: 10rpx;
  434. border-top: 1rpx solid #f5f5f5;
  435. }
  436. .time_tag {
  437. display: flex;
  438. justify-content: center;
  439. align-items: center;
  440. font-size: 36rpx;
  441. color: #82848a;
  442. flex: 1;
  443. }
  444. .u-mask-zoom {
  445. transform: scale(1, 1);
  446. }
  447. .calendar {
  448. display: flex;
  449. align-items: flex-end;
  450. justify-content: center;
  451. height: 100%;
  452. margin-top: 20rpx;
  453. .content {
  454. display: flex;
  455. flex-direction: column;
  456. justify-content: center;
  457. align-items: center;
  458. width: 100%;
  459. // height: 100%;
  460. background-color: #fff;
  461. border-top-left-radius: 24rpx;
  462. border-top-right-radius: 24rpx;
  463. .title {
  464. display: flex;
  465. flex-direction: row;
  466. align-items: center;
  467. height: 76rpx;
  468. width: 100%;
  469. background-color: #f3f4f6;
  470. justify-content: space-between;
  471. border-radius: 40rpx;
  472. margin-bottom: 20rpx;
  473. .left {
  474. color: #666666;
  475. font-size: 30rpx;
  476. padding-left: 30rpx;
  477. }
  478. .sure {
  479. display: flex;
  480. justify-content: center;
  481. align-items: center;
  482. width: 120rpx;
  483. height: 100%;
  484. background-color: #c4c4c4;
  485. color: #fff;
  486. font-size: 30rpx;
  487. border-radius: 50rpx;
  488. }
  489. }
  490. picker-view {
  491. width: 100%;
  492. height: 480rpx;
  493. // margin-top: 20rpx;
  494. /deep/.item {
  495. display: flex;
  496. align-items: center;
  497. justify-content: center;
  498. color: #333333;
  499. font-size: 32rpx;
  500. font-weight: bold;
  501. }
  502. .uni-picker-view-wrapper {
  503. uni-picker-view-column {
  504. display: flex;
  505. align-items: center;
  506. justify-content: center;
  507. color: #333333;
  508. font-size: 32rpx;
  509. font-weight: bold;
  510. .uni-picker-view-group {
  511. .uni-picker-view-content {
  512. text-align: center;
  513. line-height: 110rpx;
  514. .item {
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. color: #333333;
  519. font-size: 32rpx;
  520. font-weight: bold;
  521. }
  522. }
  523. }
  524. }
  525. }
  526. /deep/.uni-picker-view-indicator {
  527. // text-align: center;
  528. // line-height: 110rpx;
  529. }
  530. }
  531. .bottom {
  532. height: 110rpx;
  533. width: calc(100% - 31rpx);
  534. display: flex;
  535. align-items: center;
  536. justify-content: flex-end;
  537. padding-right: 31rpx;
  538. background-color: #FFFFFF;
  539. .switch {
  540. background-color: #E6E6E6;
  541. width: 180rpx;
  542. height: 70rpx;
  543. display: flex;
  544. flex-direction: row;
  545. border-radius: 35rpx;
  546. justify-content: space-around;
  547. align-items: center;
  548. position: relative;
  549. .left {
  550. position: absolute;
  551. z-index: 1;
  552. left: 25%;
  553. font-size: 28rpx;
  554. transform: translateX(-50%);
  555. }
  556. .right {
  557. color: #333333;
  558. font-size: 28rpx;
  559. position: absolute;
  560. right: 0;
  561. transform: translateX(-25%);
  562. color: #333333;
  563. z-index: 1;
  564. }
  565. .bg {
  566. background-color: #EB344A;
  567. color: #333333;
  568. height: 70rpx;
  569. border-radius: 40rpx;
  570. width: 90rpx;
  571. position: absolute;
  572. // right: 0;
  573. top: 0;
  574. z-index: 0;
  575. }
  576. .active {
  577. color: #FFFFFF;
  578. }
  579. .lunar {
  580. left: 90rpx;
  581. animation: switchsolar 500ms;
  582. }
  583. @keyframes switchsolar {
  584. 0% {
  585. left: 0;
  586. }
  587. 100% {
  588. left: 90rpx;
  589. }
  590. }
  591. .solar {
  592. left: 0;
  593. animation: switchlunar 500ms;
  594. }
  595. @keyframes switchlunar {
  596. 0% {
  597. left: 90rpx;
  598. }
  599. 100% {
  600. left: 0;
  601. }
  602. }
  603. }
  604. }
  605. }
  606. }
  607. .head_calendar {
  608. width: 100%;
  609. display: flex;
  610. align-items: center;
  611. justify-content: space-between;
  612. margin-bottom: 20rpx;
  613. }
  614. .card_tag {
  615. display: flex;
  616. width: fit-content;
  617. width: -webkit-fit-content;
  618. width: -moz-fit-content;
  619. border: 1rpx solid #e9e9e9;
  620. border-radius: 40rpx;
  621. }
  622. .tab_item {
  623. font-size: 30rpx;
  624. min-width: 140rpx;
  625. height: 64rpx;
  626. color: rgba(177, 177, 177, 1);
  627. }
  628. .activate_tab {
  629. color: #d5bd9d;
  630. background-color: #010101;
  631. border-radius: 40rpx;
  632. }
  633. .today_card {
  634. width: 80rpx;
  635. }
  636. .today_box {
  637. width: 80rpx;
  638. display: flex;
  639. justify-content: center;
  640. align-items: center;
  641. height: 64rpx;
  642. color: #d5bd9d;
  643. background-color: #010101;
  644. border-radius: 40rpx;
  645. }
  646. .range_hint {
  647. display: flex;
  648. justify-content: center;
  649. font-size: 32rpx;
  650. margin-top: 30rpx;
  651. }
  652. .saving_time {
  653. width: 100%;
  654. display: flex;
  655. align-items: center;
  656. justify-content: flex-end;
  657. }
  658. .icon-yiwen {
  659. color: #82848a;
  660. font-size: 40rpx;
  661. }
  662. .saving_title {
  663. color: #82848a;
  664. font-size: 32rpx;
  665. padding: 0rpx 10rpx;
  666. }
  667. .confirm_title {
  668. margin-top: 20rpx;
  669. border-radius: 40rpx;
  670. color: #d5bd9d;
  671. width: 100%;
  672. height: 80rpx;
  673. display: flex;
  674. justify-content: center;
  675. align-items: center;
  676. background-color: #010101;
  677. }
  678. .card_four_box {
  679. width: 100%;
  680. margin-bottom: 50rpx;
  681. }
  682. .card_prin {
  683. display: flex;
  684. align-items: center;
  685. justify-content: space-around;
  686. flex-wrap: wrap;
  687. margin-top: 20rpx;
  688. }
  689. .cipal_box_flex {
  690. flex: 0 0 25%;
  691. display: flex;
  692. justify-content: center;
  693. align-items: center;
  694. }
  695. .cipal_box {
  696. display: flex;
  697. justify-content: center;
  698. align-items: center;
  699. color: #fff;
  700. width: 120rpx;
  701. height: 120rpx;
  702. font-size: 50rpx;
  703. border-radius: 50%;
  704. background-color: #b8b8b8;
  705. margin-bottom: 20rpx;
  706. }
  707. .activate_cipal {
  708. background-color: #b2955d;
  709. }
  710. </style>