ContactDetails.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  1. <!--内容:联系人详情界面,联系人名称、电话号码、通话记录。
  2. 更新内容:多个号码颜色头
  3. 更新人:張志宏
  4. 更新时间:2024/9/18
  5. 更新内容:传参
  6. 更新时间:2024/9/28
  7. -->
  8. <template>
  9. <view class="content">
  10. <!-- 上方固定栏,联系人姓名、颜色头、电话、 -->
  11. <view id="fixedContainer" class="fixed-container">
  12. <!-- 上方导航栏 -->
  13. <view class="navbar">
  14. <image @click="navigateToPage('index')" class="return-index" src="../../static/pics/return-left.png" mode=""></image>
  15. <p @click="navigateToPage('edit')" class="to-edit">编辑</p>
  16. </view>
  17. <!-- 联系人姓名 -->
  18. <view v-if="name!='null'" class="contact-person-name">
  19. <p>{{name}}</p>
  20. </view>
  21. <!-- 保存联系人一个号码的情况 -->
  22. <view v-if="count==1||count==2|| count==3 || count==4" class="contact-person-phonenumber">
  23. <view class="color-head1"></view>
  24. <p class="phone-number">
  25. {{formatPhoneNumber1}}
  26. </p>
  27. </view>
  28. <view class="sim-position">
  29. <p>{{location}}</p>
  30. </view>
  31. <!-- 保存联系人两个号码的情况 -->
  32. <view v-if="count==2 || count==3 || count==4" class="contact-person-phonenumber">
  33. <view class="color-head2"></view>
  34. <p class="phone-number">
  35. {{formatPhoneNumber2}}
  36. </p>
  37. </view>
  38. <view v-if="count==2 || count==3 || count==4" class="sim-position">
  39. <p>{{location}}</p>
  40. </view>
  41. <!-- 联系人3个号码情况 -->
  42. <view v-if="count==3 || count==4" class="contact-person-phonenumber">
  43. <view class="color-head3"></view>
  44. <p class="phone-number">
  45. {{formatPhoneNumber3}}
  46. </p>
  47. </view>
  48. <view v-if="count==3 || count==4" class="sim-position">
  49. <p>{{location}}</p>
  50. </view>
  51. <!-- 联系人4个号码情况 -->
  52. <view v-if="count==4" class="contact-person-phonenumber">
  53. <view class="color-head4"></view>
  54. <p class="phone-number">
  55. {{formatPhoneNumber4}}
  56. </p>
  57. </view>
  58. <view v-if="count==4" class="sim-position">
  59. <p>{{location}}</p>
  60. </view>
  61. <!-- 保存联系人多个号码的情况 -->
  62. <view v-if="count>4" v-for="(phone,index) in formatPhoneNumbers" :key="index" class="contact-person-phonenumbers">
  63. <p class="phone-number">
  64. {{phone}}
  65. </p>
  66. </view>
  67. <view v-if="count>4" class="sim-position">
  68. <p>{{location}}</p>
  69. </view>
  70. <!-- 分隔线 -->
  71. <view class="line"></view>
  72. </view>
  73. <!-- 通话记录 -->
  74. <view :style="{marginTop:containerHeight+'px'}" class="page-content">
  75. <view v-for="(log,index) in filterReadLogs " :key="index" class="contact-datials">
  76. <!-- <text>{{log.number}}</text> -->
  77. <view v-if="log.number==cleanPhoneNumber(phoneNumber1)" class="log-color-head1"></view>
  78. <view v-if="log.number==cleanPhoneNumber(phoneNumber2)" class="log-color-head2"></view>
  79. <view v-if="log.number==cleanPhoneNumber(phoneNumber3)" class="log-color-head3"></view>
  80. <view v-if="log.number==cleanPhoneNumber(phoneNumber4)" class="log-color-head4"></view>
  81. <view class="single-log" @click="CallPhone(log.number)">
  82. <view class="single-log-date">
  83. <p :style="{color:getLogDateColor(log.type)}">{{formatDate(log.date)}}</p>
  84. <!-- -->
  85. </view>
  86. <view class="single-log-type">
  87. <p :style="{color:getLogDateColor(log.type)}">{{getCallType(log.type)}}</p>
  88. <!-- 通话时间 -->
  89. <!-- <p v-if="log.duration!=0">{{formatSeconds(log.duration)}}</p> -->
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. export default {
  98. data() {
  99. return {
  100. formEdit: false, // 初始化为 false
  101. // 存储 fixed-container 的高度
  102. containerHeight: 0 ,
  103. //联系人名称
  104. name:'',
  105. phones: [
  106. { number: '' } // 手机号数组,初始化一个空对象
  107. ],
  108. //联系人电话号码数量
  109. count:'',
  110. //带有间隔的电话号码
  111. formatPhoneNumber1:'',
  112. formatPhoneNumber2:'',
  113. formatPhoneNumber3:'',
  114. formatPhoneNumber4:'',
  115. formatPhoneNumbers:[],
  116. //传输的电话号码
  117. phoneNumber1:'',
  118. phoneNumber2:'',
  119. phoneNumber3:'',
  120. phoneNumber4:'',
  121. phoneNumbers:[],
  122. //通话记录
  123. telephoneLog:[],
  124. //筛选后的通话记录
  125. filterReadLogs:[],
  126. location:'浙江杭州'
  127. }
  128. },
  129. mounted(){
  130. this.requestPermissions();//请求权限
  131. this.handleGetCallLogs();//获取通话记录
  132. this.filtrCallLogs();//筛选通话记录
  133. this.updateContainerHeight();//获取fixed-container 的高度
  134. this.getCallType(this.callType);
  135. uni.$on('contactSaved', (contact) => {
  136. // 打印联系人信息
  137. console.log('Saved contact:', contact);
  138. // 更新页面内容
  139. this.name = contact.name;
  140. this.phones = contact.phones.map(phone => ({
  141. number: this.formatPhoneNumber(phone.number) // 对每个号码进行格式化
  142. }));
  143. this.count = this.phones.length; // 更新数量
  144. });
  145. },
  146. methods: {
  147. //跳转页面
  148. navigateToPage(page){
  149. switch(page){
  150. case 'index':
  151. uni.reLaunch({
  152. url:`/pages/index/index`
  153. });
  154. break;
  155. case 'edit':
  156. uni.navigateTo({
  157. url: `/pages/edit/edit?name=${encodeURIComponent(this.name)}&phones=${encodeURIComponent(JSON.stringify(this.phones))}&count=${this.count}`
  158. });
  159. //导航到编辑页面
  160. break;
  161. default:
  162. break;
  163. }
  164. },
  165. // 拨打电话
  166. CallPhone(e) {
  167. // 调用HTML5 Plus框架提供的接口
  168. plus.device.dial(e, false);
  169. },
  170. //获取联系人信息页面高度
  171. updateContainerHeight() {
  172. this.$nextTick(()=>{
  173. const query=uni.createSelectorQuery().in(this);
  174. query.select('#fixedContainer').boundingClientRect(data=>{
  175. console.error(data.height);//获取view高度
  176. this.containerHeight=data.height;
  177. }).exec();
  178. });
  179. },
  180. //增加号码间隔
  181. formatPhoneNumber(phoneNumber){
  182. //將8位分割成4,4
  183. if(phoneNumber.length===8){
  184. return phoneNumber.replace(/(\d{4})(\d{4})/,'$1 $2');
  185. }else if (phoneNumber.length===12){
  186. return phoneNumber.replace(/(\d{4})(\d{4})(\d{4})/,'$1 $2 $3');
  187. }else if(phoneNumber.length===11){
  188. return phoneNumber.replace(/(\d{3})(\d{4})(\d{4})/,'$1 $2 $3');
  189. }else{
  190. return phoneNumber;
  191. }
  192. },
  193. //申请权限
  194. requestPermissions() {
  195. if (plus.android && plus.android.runtimeMainActivity()) {
  196. const activity = plus.android.runtimeMainActivity();
  197. const ContextCompat = plus.android.importClass("androidx.core.content.ContextCompat");
  198. const ActivityCompat = plus.android.importClass("androidx.core.app.ActivityCompat");
  199. const PERMISSIONS = [plus.android.importClass("android.Manifest$permission").READ_CALL_LOG];
  200. if (PERMISSIONS.every(permission => ContextCompat.checkSelfPermission(activity, permission) === plus.android.importClass("android.content.pm.PackageManager").PERMISSION_GRANTED)) {
  201. console.log("权限已授予");
  202. } else {
  203. ActivityCompat.requestPermissions(activity, PERMISSIONS, 1);
  204. }
  205. }
  206. },
  207. //获取通话记录
  208. handleGetCallLogs() {
  209. if (plus.android) {
  210. try {
  211. const MainActivity = plus.android.runtimeMainActivity();
  212. const CallLogHelper = plus.android.importClass("com.example.mylibrary.CallLogHelper");
  213. if (CallLogHelper) {
  214. const logsJson = CallLogHelper.getCallLogs(MainActivity);
  215. console.log("Raw logsJson:", logsJson); // 打印原始数据
  216. const logsArray = JSON.parse(logsJson);
  217. console.log("Parsed logsArray:", logsArray); // 打印解析后的数据
  218. if (Array.isArray(logsArray)) {
  219. this.telephoneLog = logsArray;
  220. console.error("telephonelog",this.telephoneLog)
  221. } else {
  222. console.error("解析后的数据不是数组");
  223. }
  224. } else {
  225. console.error("CallLogHelper 类未加载");
  226. }
  227. } catch (e) {
  228. console.error("获取通话记录失败:", e);
  229. }
  230. } else {
  231. console.error("Android 环境未准备好");
  232. }
  233. },
  234. //去除电话号码中的空格
  235. cleanPhoneNumber(phoneNumber){
  236. const cleanedNumber = phoneNumber.replace(/[^\d+]/g, '');
  237. // console.error("清洁后的号码", cleanedNumber);
  238. return cleanedNumber;
  239. },
  240. filtrCallLogs(){
  241. // 去除待筛选的电话号码中的空格
  242. const cleanPhoneNumber1 = this.phoneNumber1.replace(/\s+/g, '');
  243. const cleanPhoneNumber2 = this.phoneNumber2 ? this.phoneNumber2.replace(/\s+/g, '') : null;
  244. const cleanPhoneNumber3 = this.phoneNumber2 ? this.phoneNumber3.replace(/\s+/g, '') : null;
  245. const cleanPhoneNumber4 = this.phoneNumber2 ? this.phoneNumber4.replace(/\s+/g, '') : null;
  246. console.log("多个未清洁号码",this.phoneNumbers)
  247. const cleanPhoneNumbers = this.phoneNumbers.map(num => num.replace(/\s+/g, ''));
  248. console.log("多个无间隔号码",cleanPhoneNumbers)
  249. console.log("当前的电话日志",this.telephoneLog)
  250. if(this.count==1){
  251. console.log("电话号码",cleanPhoneNumber1)
  252. this.filterReadLogs = this.telephoneLog.filter(log => log.number === cleanPhoneNumber1);
  253. console.log("筛选的通话记录",this.filterReadLogs);
  254. }else if(this.count==2){
  255. console.log("电话号码",cleanPhoneNumber2)
  256. this.filterReadLogs = this.telephoneLog.filter(log => log.number === cleanPhoneNumber1 ||log.number === cleanPhoneNumber2);
  257. console.log("筛选的通话记录",this.filterReadLogs);
  258. }else if(this.count==3){
  259. console.log("电话号码",cleanPhoneNumber3)
  260. this.filterReadLogs = this.telephoneLog.filter(log => log.number === cleanPhoneNumber1 ||log.number === cleanPhoneNumber2||log.number === cleanPhoneNumber3);
  261. console.log("筛选的通话记录",this.filterReadLogs);
  262. }else if(this.count==4){
  263. console.log("电话号码",cleanPhoneNumber4)
  264. this.filterReadLogs = this.telephoneLog.filter(log => log.number === cleanPhoneNumber1 ||log.number === cleanPhoneNumber2||log.number === cleanPhoneNumber3 || log.number === cleanPhoneNumber4);
  265. console.log("筛选的通话记录",this.filterReadLogs);
  266. }
  267. else{
  268. console.log("电话号码",cleanPhoneNumbers)
  269. this.filterReadLogs= this.telephoneLog.filter(log => cleanPhoneNumbers.includes(log.number));
  270. console.log("筛选的通话记录",this.filterReadLogs);
  271. }
  272. },
  273. // 根据通话类型的数值返回对应的中文字符串
  274. getCallType(type) {
  275. switch (type) {
  276. case 1:
  277. return '来电';
  278. case 2:
  279. return '拨出';
  280. case 3:
  281. return '未接';
  282. case 4:
  283. return '语音信箱';
  284. case 5:
  285. return '拒接';
  286. case 6:
  287. return '自动拒接';
  288. default:
  289. return '未知';
  290. }
  291. },
  292. getLogDateColor(callType){
  293. return callType==3 ? '#ff0000' : '#6E5E52'
  294. //未接返回红色,其他返回深驼灰色。
  295. },
  296. // 格式化日期为“年-月-日 时:分:秒”
  297. formatDate(timestamp) {
  298. const date = new Date(timestamp);
  299. const now=new Date();
  300. const Y = date.getFullYear() + '/';
  301. const M = (date.getMonth() + 1).toString() + '/';
  302. const D = date.getDate().toString()+' ';
  303. const h = date.getHours().toString()+ ':';
  304. const m = date.getMinutes().toString().padStart(2, '0');
  305. const currentYear=now.getFullYear()+'/';
  306. const currentMonth=(now.getMonth()+1).toString()+'/';
  307. const currentDay=now.getDate().toString()+' ';
  308. const yesterday=new Date(now);
  309. yesterday.setDate(now.getDate()-1);
  310. const yesterdayYear=now.getFullYear()+'/';
  311. const yesterdayMonth=(now.getMonth()+1).toString()+'/';
  312. const yesterdayDay=now.getDate().toString()+' ';
  313. if(Y==currentYear&&M==currentMonth&&D==currentDay)
  314. {
  315. return '今天'+h+m;
  316. }else if(Y==yesterdayYear&&M==yesterdayMonth&&D==yesterdayDay){
  317. return '昨天'+h+m;
  318. }else if(Y==currentYear){
  319. return M+D+h+m;
  320. }else{
  321. return Y+M+D
  322. }
  323. return Y + M + D + h + m ;
  324. },
  325. //格式化通话时间未“时分秒”
  326. formatSeconds(seconds) {
  327. // 计算小时
  328. const hours = Math.floor(seconds / 3600);
  329. // 计算分钟
  330. const minutes = Math.floor((seconds % 3600) / 60);
  331. // 计算剩余的秒数
  332. const secs = seconds % 60;
  333. let result = '';
  334. if (hours > 0) {
  335. result += `${hours}时`;
  336. }
  337. if (minutes > 0) {
  338. result += `${minutes}分`;
  339. }
  340. if (secs > 0 || result === '') { // 包含 0秒情况
  341. result += `${secs}秒`;
  342. }
  343. return result;
  344. }
  345. },
  346. //页面传输的联系人姓名、电话号码、号码数量
  347. onLoad(options) {
  348. console.error('传输内容的格式', typeof options);
  349. console.error('传输的内容', options);
  350. // 确保有值
  351. this.name = decodeURIComponent(options.name || '') || '';
  352. this.count = options.count || 0;
  353. // 处理电话号码
  354. const numbers = options.phoneNumbers ? JSON.parse(decodeURIComponent(options.phoneNumbers)) : [];
  355. this.phonenumbers = numbers;
  356. console.error("测试号码", numbers);
  357. console.log('传输的电话号码', numbers);
  358. this.phones = numbers.map(num => ({ number: num.value }));
  359. for (let i = 0; i < this.count; i++) {
  360. if (numbers[i]) {
  361. this[`phoneNumber${i + 1}`] = numbers[i].value;
  362. this[`formatPhoneNumber${i + 1}`] = this.formatPhoneNumber(this[`phoneNumber${i + 1}`]);
  363. console.log(`phoneNumber${i + 1}`, this[`phoneNumber${i + 1}`]);
  364. console.log(`formatPhoneNumber${i + 1}`, this[`formatPhoneNumber${i + 1}`]);
  365. }
  366. }
  367. console.error('phones的结构', this.phones);
  368. },
  369. }
  370. </script>
  371. <style>
  372. .content{
  373. /*子元素垂直排列*/
  374. display: flex;
  375. flex-direction: column;
  376. padding: 20rpx;
  377. width: 100vw;
  378. height: 100vh;
  379. background-color: #f5f5f5;
  380. }
  381. .navbar{
  382. display: flex;
  383. justify-content: space-between;
  384. margin-top: 10%;
  385. /* background-color: antiquewhite; */
  386. }
  387. .return-index{
  388. width: 90rpx;
  389. height: 90rpx;
  390. margin-left: 2%;
  391. }
  392. .to-edit{
  393. font-size: 60rpx;
  394. margin-right: 6%;
  395. color: #4286F3;
  396. }
  397. .fixed-container {
  398. position: fixed;
  399. top: 0;
  400. left: 0;
  401. width: 100%;
  402. background-color: #f5f5f5;
  403. z-index: 1000; /* 确保它位于其他内容之上 */
  404. padding: 10rpx; /* 可以根据需要调整 */
  405. padding-top: 5rpx;
  406. padding-bottom: 0rpx;
  407. }
  408. .page-content{
  409. width: 100vw;
  410. background-color: #f5f5f5;
  411. }
  412. .contact-person-name {
  413. display: flex;
  414. align-items: center;
  415. font-size: 10vw;
  416. font-weight: 300;
  417. letter-spacing: 4rpx;
  418. line-height: 1.6;
  419. margin-bottom: 10rpx;
  420. margin-left: 10%;
  421. margin-right: 10%;
  422. white-space: normal; /* 允许换行 */
  423. text-align: center; /* 文本居中 */
  424. }
  425. .contact-person-phonenumber{
  426. position: relative;
  427. display: flex;
  428. align-items: center;
  429. justify-content: center;
  430. width: 100%;
  431. height: 60rpx;
  432. margin-top: 10rpx;
  433. margin-left: 5rpx;
  434. margin-bottom: 5rpx;
  435. font-size: 40rpx;
  436. font-weight: 120;
  437. color: rgba(0, 0, 0, 1.0);
  438. }
  439. /* 多个号码的样式 */
  440. .contact-person-phonenumbers{
  441. position: relative;
  442. display: flex;
  443. align-items: center;
  444. justify-content: space-between;
  445. width: 100%;
  446. height: 60rpx;
  447. margin-left: 65rpx;
  448. margin-right: 80rpx;
  449. margin-top: 10rpx;
  450. margin-bottom: 5rpx;
  451. font-size: 40rpx;
  452. font-weight: 120;
  453. color: rgba(0, 0, 0, 1.0);
  454. }
  455. .phone-number{
  456. margin-left: 35rpx;
  457. font-size: 55rpx;
  458. font-weight: 400;
  459. }
  460. .phone-number span{
  461. display: inline-block;
  462. }
  463. .phone-number .gap{
  464. display: inline-block;
  465. width: 20rpx;
  466. }
  467. .sim-position{
  468. display: flex;
  469. align-items: center;
  470. justify-content: flex-end;
  471. font-size: 35rpx;
  472. font-weight: 280;
  473. right: 35%;
  474. margin-left: 20rpx;
  475. margin-right: 120rpx;
  476. margin-top: 5rpx;
  477. margin-bottom: 5rpx;
  478. height: 40rpx;
  479. color: rgba(182, 182, 182, 0.9);
  480. }
  481. .color-head1{
  482. position: absolute;
  483. width: 19rpx;
  484. height: 100%;
  485. background-color: #4286F3;
  486. /*google蓝*/
  487. /* background-color: rgb(52, 168, 83); */
  488. /*google绿*/
  489. /* background-color: #4286F3; */
  490. /* background-color: #1c3eff; */
  491. left: 20%;
  492. margin-left: 20rpx;
  493. margin-right: 5rpx;
  494. margin-left: 0%;
  495. border-radius:8rpx 8rpx 8rpx 8rpx;
  496. }
  497. .color-head2{
  498. position: absolute;
  499. width: 19rpx;
  500. height: 100%;
  501. background-color: rgb(255, 183, 0);
  502. /* background-color: #FAC230; */
  503. /*google黄*/
  504. /* background-color: rgb(234, 67, 53); */
  505. /*google红*/
  506. /* background-color: #04f03b; */
  507. left: 20%;
  508. margin-left: 20rpx;
  509. margin-right: 5rpx;
  510. margin-left: 0%;
  511. border-radius:8rpx 8rpx 8rpx 8rpx;
  512. }
  513. .color-head3{
  514. position: absolute;
  515. width: 19rpx;
  516. height: 100%;
  517. background-color: #04f03b;
  518. left: 20%;
  519. margin-left: 20rpx;
  520. margin-right: 5rpx;
  521. margin-left: 0%;
  522. border-radius:8rpx 8rpx 8rpx 8rpx;
  523. }
  524. .color-head4{
  525. position: absolute;
  526. width: 19rpx;
  527. height: 100%;
  528. background-color: rgb(234, 67, 53);
  529. left: 20%;
  530. margin-left: 20rpx;
  531. margin-right: 5rpx;
  532. margin-left: 0%;
  533. border-radius:8rpx 8rpx 8rpx 8rpx;
  534. }
  535. .line{
  536. /*分隔线,位于较高层、宽度、height参数为分隔线的粗细、颜色、上下间隔*/
  537. z-index: 1;
  538. position: relative;
  539. width: 95%;
  540. height: 2rpx;
  541. background-color: #dbdbdb;
  542. margin-left: 10rpx;
  543. margin-right: 5rpx;
  544. margin-top: 20rpx;
  545. margin-bottom: 0rpx;
  546. /* padding-bottom: 3rpx; */
  547. box-shadow: 0 2rpx 3rpx rgba(224, 224, 224, 0.2);
  548. }
  549. .contact-datials{
  550. display: flex;
  551. flex-direction: row;
  552. align-items: center;
  553. justify-content: space-between;
  554. z-index: 0;
  555. flex-flow: row;
  556. position: relative;
  557. width: 90%;
  558. margin-top: 5rpx;
  559. margin-bottom: 15rpx;
  560. margin-left: 20rpx;
  561. margin-right: 30rpx;
  562. /* padding-bottom: 5rpx; */
  563. height: 150rpx;
  564. border: 0.5rpx;
  565. border-radius: 10rpx;
  566. background-color: #ffffff;
  567. }
  568. .log-color-head1{
  569. width: 30rpx;
  570. height: 150rpx;
  571. background-color: #4286F3;
  572. /* background-color: rgba(66, 153, 244); */
  573. /*google蓝*/
  574. /* background-color: rgb(52,168,83); */
  575. /* background-color: #55AF7B; */
  576. /*google绿*/
  577. /* background-color: #2A20FF;/*蓝紫色偏蓝*/
  578. /* background-color: #1c3eff; */
  579. left: 0%;
  580. margin-left: 20rpx;
  581. margin-right: 5rpx;
  582. margin-left: 0%;
  583. border-radius:12rpx 12rpx 12rpx 12rpx;
  584. }
  585. .log-color-head2{
  586. width: 30rpx;
  587. height: 150rpx;
  588. background-color: rgb(255, 183, 0);
  589. /* background-color: #FAC230; */
  590. /*google黄*/
  591. /* background-color: rgb(234, 67, 53); */
  592. /* background-color: #E84537; */
  593. /*google红*/
  594. /* background-color: #04f03b; */
  595. left: 0%;
  596. margin-left: 20rpx;
  597. margin-right: 5rpx;
  598. margin-left: 0%;
  599. border-radius:12rpx 12rpx 12rpx 12rpx;
  600. }
  601. .log-color-head3{
  602. width: 30rpx;
  603. height: 150rpx;
  604. background-color: #04f03b;
  605. /* background-color: #FAC230; */
  606. /*google黄*/
  607. /* background-color: rgb(234, 67, 53); */
  608. /* background-color: #E84537; */
  609. /*google红*/
  610. /* background-color: #04f03b; */
  611. left: 0%;
  612. margin-left: 20rpx;
  613. margin-right: 5rpx;
  614. margin-left: 0%;
  615. border-radius:12rpx 12rpx 12rpx 12rpx;
  616. }
  617. .log-color-head4{
  618. width: 30rpx;
  619. height: 150rpx;
  620. background-color: rgb(234, 67, 53);
  621. /* background-color: #FAC230; */
  622. /*google黄*/
  623. /* background-color: rgb(234, 67, 53); */
  624. /* background-color: #E84537; */
  625. /*google红*/
  626. /* background-color: #04f03b; */
  627. left: 0%;
  628. margin-left: 20rpx;
  629. margin-right: 5rpx;
  630. margin-left: 0%;
  631. border-radius:12rpx 12rpx 12rpx 12rpx;
  632. }
  633. .single-log{
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-between;
  637. width: 92%;
  638. font-size: 50rpx;
  639. }
  640. .single-log-date{
  641. margin-left: 3%;
  642. font-size: 70rpx;
  643. color: #9c9c9c;
  644. }
  645. .single-log-type{
  646. display: flex;
  647. flex-direction: column;
  648. align-items: center;
  649. justify-content: center;
  650. margin-right: 5%;
  651. }
  652. </style>