1
0

index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. <!--
  2. 联系人主页,获取通讯录信息
  3. zzh 24.9.28 选择对方电话号码
  4. 方新力 24.8.28 修改字体大小,满6字换行,号码满7字换
  5. -->
  6. <template>
  7. <view class="content">
  8. <view v-if="searchActive" class="navbar" style="padding-bottom: 20px;">
  9. <image @click="showBar()" class="icon" src="../../static/pics/search.png"></image>
  10. <image @click="navigateToPage('add')" class="icon" src="../../static/pics/add.png"></image>
  11. <image @click="navigateToPage('setting')" class="icon" src="../../static/pics/setting.png"></image>
  12. </view>
  13. <view class="navbar" v-else>
  14. <view class="uni-column">
  15. <view class="search-input">
  16. <input type="text" focus confirm-type="search" v-model="searchText" placeholder="输入号码或名字" @input="filterContacts" />
  17. </view>
  18. <view class="search-img" @click="showBar()">
  19. 取消
  20. </view>
  21. </view>
  22. </view>
  23. <view class="text-area">
  24. <view v-if="filteredContacts.length" v-for="(item, id) in filteredContacts" :key="id">
  25. <view class="name-btn">
  26. <view v-if="switchStatus" style="display: flex;flex-direction: row; ">
  27. <view class="loud" @click="play(item.displayName || item.phoneNumbers[0].value)">
  28. <image style="width: 80%;height: 40%; margin-left: 35rpx;" src="../../static/pics/laba.png"></image>
  29. </view>
  30. <view class="con-mes" @click="goToDetails(item)">
  31. <text v-if="!item.displayName">{{ formatPhoneNumber(item.phoneNumbers[0].value) }}</text>
  32. <text v-else>{{ truncate(item.displayName) }}</text>
  33. </view>
  34. </view>
  35. <view v-else>
  36. <view class="con-mes-null" @click="goToDetails(item)">
  37. <text v-if="!item.displayName">{{ formatPhoneNumber(item.phoneNumbers[0].value) }}</text>
  38. <text v-else>{{ truncate(item.displayName) }}</text>
  39. </view>
  40. </view>
  41. <NumbersChoose class="phonenumber-choose-component"
  42. :visible="isChooseNumberVisible[item.id] || false"
  43. :title="item.displayName"
  44. @update:visible="(visible) => this.$set(isChooseNumberVisible, item.id, visible)">
  45. <template #default>
  46. <div class="scrollable-box">
  47. <view v-for="(number, index) in item.phoneNumbers" :key="index" @click="CallPhone(item,number.value)">
  48. <text class="choose-phonenumber">
  49. {{formatPhoneNumber1(number.value) }}
  50. </text>
  51. </view>
  52. </div>
  53. </template>
  54. </NumbersChoose>
  55. <!-- :style="{backgroundColor:isActive ? 'grey' :'white'}"
  56. @touchedstart="handleTouchedStart"
  57. @touchend="handleTouchedEnd"
  58. @touchcancel="handleTouchedEnd" -->
  59. <view class="btn" @click="showChooseNumber(item,item.phoneNumbers[0].value)">
  60. <image class="Call" src="../../static/pics/call-out.png"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <view v-else class="notFind">
  65. 该号码或联系人不存在
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. // 辅助函数,用于获取字符串的所有拼音首字母
  72. function getInitials(str) {
  73. // 将字符串转换为拼音数组,每个汉字转换为对应的拼音首字母
  74. const initialsArray = pinyin(str, {
  75. style: pinyin.STYLE_FIRST_LETTER
  76. });
  77. // 映射每个拼音首字母数组,只取每个数组的第一个字符(即首字母)
  78. const firstLettersOnly = initialsArray.map(initial => initial[0]);
  79. // 使用 join 方法将所有首字母拼接成一个字符串
  80. return firstLettersOnly.join('');
  81. }
  82. const FvvUniTTS=uni.requireNativePlugin('Fvv-UniTTS');
  83. import pinyin from "pinyin"; // 假设你使用了一个 pinyin 库,例如 pinyin
  84. import CustomModal from '@/components/customModal.vue';
  85. import NumbersChoose from '@/components/oppositePhonenumberChoose.vue'
  86. // import oppositePhonenumbers from '@components/oppositePhonenumberChoose.vue';
  87. export default {
  88. //注册组件
  89. components:{
  90. CustomModal,
  91. NumbersChoose,
  92. // oppositePhonenumbers,
  93. } ,
  94. data() {
  95. return {
  96. searchText: '', // 用户输入的搜索文本
  97. list: [], // 原始联系人列表
  98. filteredContacts: [], // 过滤后的联系人列表
  99. num: '',
  100. isLoudVisible: true, // 初始状态为显示
  101. searchActive: true,
  102. showModal:false,//选择对方号码部件显示判断
  103. phoneNumbersCount:'',
  104. switchStatus:false,
  105. isChooseNumberVisible:{},
  106. isActive: false,//点击对方号码,背景加深判断
  107. };
  108. },
  109. onShow() {
  110. // 页面显示时直接调用
  111. this.ToGetMessage();
  112. /* this.ToGetHis(); */
  113. this.setLanguage();
  114. this.init();
  115. this.getM();
  116. },
  117. beforeCreate() {
  118. const domModule = uni.requireNativePlugin('dom')
  119. domModule.addRule('fontFace', {
  120. 'fontFamily': "myIconfont",
  121. 'src': "url('../assets/typeface/almmdfdk.ttf')"
  122. });
  123. },
  124. mounted() {
  125. this.filteredContacts.forEach(item => {
  126. this.$set(this.isChooseNumberVisible, item.id, false);
  127. });
  128. },
  129. methods: {
  130. showChooseNumber(item,phoneNumber){
  131. console.log("showChooseNumber called");
  132. console.log(new Error().stack); // 打印当前调用堆栈
  133. if(item.phoneNumbers.length>1){
  134. this.$set(this.isChooseNumberVisible,item.id,true)
  135. console.log("isChooseNumberVisible",this.isChooseNumberVisible)
  136. }
  137. else{
  138. console.log("这里对方只有一个电话号码")
  139. this.CallPhone(item,phoneNumber)
  140. }
  141. },
  142. toggleActive() {
  143. this.isActive = !this.isActive;
  144. },
  145. handleTouchedStart(){
  146. this.isActive=true;
  147. },
  148. handleTouchedEnd(){
  149. this.isActive=false;
  150. },
  151. toNum(e){
  152. console.log("num",e);
  153. this.num=e;
  154. },
  155. // 格式化电话号码
  156. formatPhoneNumber(value) {
  157. // 移除所有非数字字符
  158. value = value.replace(/\D/g, '');
  159. if (value.length === 11) {
  160. // 如果长度为11, 在第4和第9位插入空格
  161. return value.replace(/(\d{3})(\d{4})(\d{4})/, '$1 $2 $3');
  162. } else {
  163. // 如果长度不为11,每4个字符插入一个空格
  164. return value.replace(/(\d{4})(?=\d)/g, '$1 ');
  165. }
  166. },
  167. formatPhoneNumber1(value) {
  168. // 移除所有非数字字符
  169. value = value.replace(/\D/g, '');
  170. if (value.length === 11) {
  171. // 如果长度为11,在第三位后插入换行符,并在第七位添加空格
  172. return value.replace(/(\d{3})(\d{4})(\d{4})/, '$1\n$2 $3');
  173. } else if (value.length > 11) {
  174. // 如果长度大于11,在第三位后插入换行符,并在第七位添加空格,11位之后显示省略号
  175. return value.replace(/(\d{3})(\d{4})(\d{4})/, '$1\n$2 $3') + '...';
  176. } else {
  177. // 如果长度不为11且小于11位,每4个字符插入一个空格,并在第7位后添加换行符
  178. // 这个分支可能不需要,因为根据前面的条件,号码长度应该至少为11位
  179. return value.replace(/(\d{4})(\d{3})/, '$1\n$2').replace(/(\d{4})(?=\d)/g, '$1 ');
  180. }
  181. },
  182. truncate(value) {
  183. if (value.length > 9) {
  184. return value.slice(0, 5) + '\n' + value.substring(5, 9) + '...';
  185. }
  186. else{
  187. return value.slice(0, 5) + '\n' + value.substring(5, 9)
  188. }
  189. return value;
  190. },
  191. init(){
  192. FvvUniTTS.init((callback) => {
  193. console.log(callback);
  194. },"com.iflytek.speechcloud");
  195. FvvUniTTS.onStart((res) => {
  196. console.log("onStart:" + res)
  197. });
  198. FvvUniTTS.onDone((res) => {
  199. console.log("onDone:" + res)
  200. });
  201. FvvUniTTS.onError((res) => {
  202. console.log("onError:" + res)
  203. });
  204. FvvUniTTS.getInstallTTS(res => {
  205. console.log(res+"11")
  206. })
  207. },
  208. play(e){
  209. console.log("xinxi",e)
  210. FvvUniTTS.speak({
  211. text:e,
  212. id:2,
  213. });
  214. FvvUniTTS.getInstallTTS(res => {
  215. console.log(res+"11")
  216. })
  217. },
  218. setLanguage(){
  219. console.log("set lang : " + FvvUniTTS.setLanguage("CHINESE"));
  220. },
  221. setEngines(){
  222. let setEngine = "com.iflytek.speechcloud"
  223. //获取已安装的引擎
  224. FvvUniTTS.getInstallTTS(res => {
  225. if(res == null || res.length <= 0){
  226. return
  227. }
  228. console.log(res)
  229. if(JSON.stringify(res).indexOf(setEngine) < 0){
  230. console.log("未安装该语音引擎")
  231. return
  232. }
  233. console.log("set engine : " + FvvUniTTS.setEngine(setEngine));
  234. FvvUniTTS.speak({
  235. text:"设置成功",
  236. id:2,
  237. });
  238. })
  239. },
  240. saveFile(){
  241. FvvUniTTS.saveAudioFile({
  242. text:"hello",
  243. id:3,
  244. path:"/sdcard/test/1.wav"
  245. })
  246. },
  247. setVoice(){
  248. FvvUniTTS.setPitch(100)
  249. FvvUniTTS.setSpeechRate(100)
  250. },
  251. navigateToPage(page) {
  252. switch (page) {
  253. case 'add':
  254. // 导航到添加页面
  255. uni.navigateTo({
  256. url: '/pages/add/add'
  257. });
  258. break;
  259. case 'setting':
  260. // 导航到设置页面
  261. uni.navigateTo({
  262. url: '/pages/setting/setting'
  263. });
  264. break;
  265. default:
  266. break;
  267. }
  268. },
  269. showBar() {
  270. this.searchActive = !this.searchActive;
  271. this.ToGetMessage();
  272. },
  273. // 获取联系人信息
  274. ToGetMessage() {
  275. var that = this;
  276. // 获取通讯录对象
  277. plus.contacts.getAddressBook(plus.contacts.ADDRESSBOOK_PHONE, function(addressbook) {
  278. addressbook.find(["displayName", "phoneNumbers"], function(contacts) {
  279. that.list = contacts;
  280. console.log(that.list)
  281. // 将联系人按自定义规则排序
  282. that.list.sort(function(a, b) {
  283. // 检查是否为汉字、英文、数字或符号
  284. const isChinese = (str) => /^[\u4e00-\u9fa5]+$/.test(str);
  285. const isEnglish = (str) => /^[A-Za-z]+$/.test(str);
  286. const isNumber = (str) => /^[0-9]+$/.test(str);
  287. // 获取首字母,如果 displayName 是空,则使用 phoneNumbers 的第一个号码
  288. let firstCharA = a.displayName ? a.displayName.trim()[0] : a.phoneNumbers[0].value;
  289. let firstCharB = b.displayName ? b.displayName.trim()[0] : b.phoneNumbers[0].value;
  290. // 将汉字转换为拼音以便比较
  291. if (isChinese(firstCharA)) {
  292. firstCharA = pinyin(firstCharA, { style: pinyin.STYLE_FIRST_LETTER })[0][0];
  293. }
  294. if (isChinese(firstCharB)) {
  295. firstCharB = pinyin(firstCharB, { style: pinyin.STYLE_FIRST_LETTER })[0][0];
  296. }
  297. // 确定排序的优先级
  298. if (isEnglish(firstCharA) && isEnglish(firstCharB)) {
  299. // 如果都是英文,按字母顺序排序
  300. return firstCharA.localeCompare(firstCharB);
  301. } else if (isChinese(firstCharA) && isChinese(firstCharB)) {
  302. // 如果都是汉字(已经转换为拼音首字母),按拼音排序
  303. return firstCharA.localeCompare(firstCharB);
  304. } else if ((isEnglish(firstCharA) || isChinese(firstCharA)) && (isNumber(firstCharB) || !isEnglish(firstCharB))) {
  305. // 如果 A 是英文或汉字,而 B 是数字或其他符号,则 A 在前
  306. return -1;
  307. } else if ((isNumber(firstCharA) || !isEnglish(firstCharA)) && (isEnglish(firstCharB) || isChinese(firstCharB))) {
  308. // 如果 A 是数字或其他符号,而 B 是英文或汉字,则 B 在前
  309. return 1;
  310. } else {
  311. // 若是其他情况(如两个字符都为数字或符号),按字符顺序排序
  312. return firstCharA.localeCompare(firstCharB);
  313. }
  314. });
  315. // 更新过滤后的联系人列表
  316. console.log("list",that.list);
  317. that.filteredContacts = that.list;
  318. console.error("更新过滤后的联系人列表",that.filteredContacts)
  319. }, function() {
  320. uni.showToast({
  321. title: '获取联系人失败',
  322. duration: 2000 // 在屏幕上显示的时间长度
  323. });
  324. }, { multiple: true }); // 应该检索多个联系人
  325. }, function(e) {
  326. uni.showToast({
  327. title: '获取通讯录对象失败:' + e.message,
  328. duration: 2000
  329. });
  330. });
  331. },
  332. // 拨打电话
  333. CallPhone(item,e) {
  334. // 重置所有isChooseNumberVisible状态
  335. Object.keys(this.isChooseNumberVisible).forEach(key=>{
  336. this.$set(this.isChooseNumberVisible,key,false);
  337. });
  338. console.log("ischooseNumber",this.isChooseNumberVisible)
  339. // 调用HTML5 Plus框架提供的接口
  340. plus.device.dial(e, false);
  341. Object.keys(this.isChooseNumberVisible).forEach(key=>{
  342. this.$set(this.isChooseNumberVisible,key,false);
  343. });
  344. },
  345. filterContacts() {
  346. // 获取用户输入的文本,转换为小写
  347. const searchText = this.searchText.toLowerCase();
  348. console.log("输入内容",searchText)
  349. if (!searchText) {
  350. // 如果用户没有输入,显示所有联系人
  351. console.log("kong")
  352. this.filteredContacts = this.list;
  353. } else {
  354. // 过滤出匹配用户输入的联系人
  355. this.filteredContacts = this.list.filter(contact => {
  356. // 模糊查找逻辑:检查 displayName 或 phoneNumbers 是否包含用户输入的文本
  357. const isFuzzyMatch = (contact.displayName || '').toLowerCase().includes(searchText) ||
  358. contact.phoneNumbers.some(phone => phone.value.toLowerCase().includes(searchText));
  359. // 拼音首字母查找逻辑:检查拼音首字母序列是否包含用户输入的序列
  360. const displayNameFirstLetters = getInitials(contact.displayName || '');
  361. const isInitialsMatch = displayNameFirstLetters.includes(searchText);
  362. // 返回匹配结果,只有当模糊查找或拼音首字母查找任一条件满足时,才包含该联系人
  363. return isFuzzyMatch || isInitialsMatch;
  364. });
  365. }
  366. },
  367. search() {
  368. // 可以在这里添加更复杂的搜索逻辑
  369. this.filterContacts();
  370. },
  371. //进行页面跳转到联系人详情
  372. goToDetails(item){
  373. console.error('item',item)
  374. const phoneNumbers=item.phoneNumbers
  375. const phoneNumbersString=JSON.stringify(phoneNumbers)
  376. const phoenNumberCount=item.phoneNumbers.length;
  377. console.error("phonenumber",phoneNumbers)
  378. console.error("phoenNumberCount",phoenNumberCount)
  379. uni.navigateTo({
  380. url: `/pages/ContactDetails/ContactDetails?name=${encodeURIComponent(item.displayName)}&phoneNumbers=${encodeURIComponent(phoneNumbersString)}&count=${phoenNumberCount}`
  381. });
  382. },
  383. getM(){//获取本地语音开关信息
  384. // 从本地存储中读取开关状态
  385. const storedSwitchStatus = uni.getStorageSync('voiceBroadcastSwitch');
  386. console.log("读取的本地存储状态1:", storedSwitchStatus);
  387. if (typeof storedSwitchStatus === 'boolean') {
  388. this.switchStatus = storedSwitchStatus;
  389. }
  390. }
  391. },
  392. mounted() {
  393. this.getM();
  394. }
  395. }
  396. </script>
  397. <style>
  398. .floating-button {
  399. width: 50px; /* 根据需要调整尺寸 */
  400. height: 300px; /* 根据需要调整尺寸,确保字母列表可以容纳 */
  401. border-radius: 25px;
  402. background-color: rgba(0, 0, 0, 0.5);
  403. position: fixed;
  404. right: 20px;
  405. bottom: 20px;
  406. overflow: hidden; /* 确保内容在按钮范围内 */
  407. z-index: 1000; /* 一个较高的z-index值,确保它在最上层 */
  408. }
  409. .alphabet-scroll {
  410. width: 100%;
  411. height: 100%;
  412. background-color: #fff; /* 根据需要调整背景色 */
  413. }
  414. .alphabet-item {
  415. padding: 5px 10px;
  416. text-align: center;
  417. cursor: pointer;
  418. }
  419. .alphabet-item.active {
  420. background-color: #007AFF; /* 高亮颜色 */
  421. color: #fff;
  422. }
  423. .notFind{
  424. font-size: 50rpx;
  425. }
  426. .null {}
  427. /* 其他样式保持不变 */
  428. .uni-column {
  429. width: 690rpx;
  430. height: 140rpx;
  431. border: 1px solid black;
  432. margin-top: 18rpx;
  433. border-radius: 20rpx;
  434. font-size: 50rpx;
  435. display: flex; /* 使用flex布局 */
  436. justify-content: space-between; /* 左右分布 */
  437. /* 其他样式保持不变 */
  438. }
  439. .search-input {
  440. width: 75%;
  441. /* 可以根据需要调整以下样式 */
  442. display: flex;
  443. align-items: center;
  444. }
  445. .search-img {
  446. width: 25%;
  447. /* 可以根据需要调整以下样式 */
  448. display: flex;
  449. border-left: 1px solid black;
  450. justify-content: center;
  451. align-items: center;
  452. }
  453. .search-input input {
  454. /* 根据需要调整输入框大小 */
  455. width: 90%; /* 例如90% */
  456. height: 90%; /* 例如80% */
  457. font-size: 50rpx;
  458. padding: 10px; /* 根据需要调整内边距 */
  459. }
  460. .search-img image {
  461. width: 50%; /* 例如30% */
  462. height: 50%; /* 保持与输入框一致的高度 */
  463. font-size: 50rpx;
  464. }
  465. .content {
  466. min-height: 100%;
  467. display: flex;
  468. flex-direction: column;
  469. justify-content: center;
  470. background-color: #f0efef;
  471. }
  472. .con-mes,.con-mes-null {
  473. font-family: 'FangSong', '仿宋_GB2312', serif;
  474. font-size: 35px;
  475. font-weight: 700;
  476. display: flex;
  477. align-items: center;
  478. justify-content: center;
  479. text-align: center;
  480. white-space: pre-line; /* 保证换行符有效 */
  481. word-wrap: break-word; /* 确保长单词换行 */
  482. width: 410rpx;
  483. height: 200rpx;
  484. border: none;
  485. background-color: white;
  486. }
  487. .con-mes-null{
  488. border-radius: 20rpx 0rpx 0rpx 20rpx;
  489. width: 510rpx;
  490. height: 200rpx;
  491. }
  492. .name-btn {
  493. display: flex;
  494. align-items: center;
  495. justify-content: space-between;
  496. width: 690rpx;
  497. height: 200rpx;
  498. border: 0.5px solid black;
  499. margin-top: 8rpx;
  500. margin-bottom: 10rpx;
  501. border-radius: 20rpx;
  502. font-size: 50rpx;
  503. }
  504. .text-area {
  505. padding-top: 145px;
  506. display: flex;
  507. flex-direction: column;
  508. align-items: center;
  509. }
  510. .loud {
  511. display: flex;
  512. justify-content: center;
  513. align-items: center;
  514. width: 100rpx;
  515. height: 200rpx;
  516. border-radius: 20rpx 0rpx 0rpx 20rpx;
  517. background-color: white;
  518. }
  519. .btn {
  520. display: flex;
  521. justify-content: center;
  522. align-items: center;
  523. width: 180rpx;
  524. height: 200rpx;
  525. background-color: #ecfff3;
  526. border-radius: 0rpx 20rpx 20rpx 0rpx;
  527. }
  528. .Call {
  529. width: 100rpx;
  530. height: 100rpx;
  531. object-fit: contain;
  532. }
  533. .navbar {
  534. display: flex;
  535. justify-content: space-around;
  536. align-items: flex-end;
  537. width: 100%;
  538. background-color: #f0efef;
  539. min-height: 120px;
  540. padding-bottom: 20px;
  541. position: fixed; /* 设置为固定定位 */
  542. top: 0; /* 与页面顶部的距离为0 */
  543. z-index: 999;
  544. }
  545. .icon {
  546. justify-content: space-around;
  547. width: 100rpx;
  548. height: 100rpx;
  549. }
  550. .uni-tabbar__iconfont {
  551. font-size: 50px; /* 自定义字体大小 */
  552. width: 80px;
  553. height: 80px;
  554. }
  555. .numbers{
  556. }
  557. .choose-phonenumber1{
  558. display: flex;
  559. align-items: center;
  560. text-align: center;
  561. justify-content: center;
  562. font-size: 80rpx;
  563. border-left: 5px solid #9ee493;
  564. border-radius: 6px;
  565. background-color: white;
  566. padding: 10px;
  567. margin-top: 10px;
  568. margin-bottom: 10px;
  569. }
  570. .scrollable-box {
  571. height: 700rpx; /* 或者你希望的高度 */
  572. overflow-y: auto; /* 当内容超出时显示垂直滚动条 */
  573. scrollbar-width: thin; /* 可选,设置滚动条的宽度 */
  574. }
  575. .choose-phonenumber{
  576. display: flex;
  577. text-align: center;
  578. width: 90%;
  579. align-items: center;
  580. justify-content: center;
  581. font-size: 100rpx;
  582. border-radius: 10px;
  583. background-color: #c6ffcf;
  584. padding: 10px;
  585. margin-top: 10px;
  586. margin-bottom: 10px;
  587. }
  588. .choose-phonenumber.active {
  589. background-color: #b0b0b0; /* 点击后颜色 */
  590. }
  591. .line{
  592. /*分隔线,宽度、height参数为分隔线的粗细、颜色、上下间隔*/
  593. width: 100%;
  594. height: 2rpx;
  595. background-color: #dbdbdb;
  596. margin: 9rpx 0;
  597. }
  598. /* 悬浮框css */
  599. movable-view {
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. height: 150rpx;
  604. width: 150rpx;
  605. background-color: #007AFF;
  606. color: #fff;
  607. }
  608. movable-area {
  609. height: 300rpx;
  610. width: 100%;
  611. background-color: #D8D8D8;
  612. overflow: hidden;
  613. }
  614. .max {
  615. width:500rpx;
  616. height: 500rpx;
  617. }
  618. </style>