ContactDetails.vue 20 KB

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