当前位置: 首页 > news >正文

网站开发的研究计划书网站推广seo教程

网站开发的研究计划书,网站推广seo教程,宝宝投票网站怎么做的,沈阳专业的网站设计公司上图是效果图,三个问题 访问电话通讯录,拿数据拿到用户的联系人数组对象,之后根据A-Z排序根据字母索引快速搜索 首先说数据怎么拿 - 社区有指导https://ask.dcloud.net.cn/question/64117 uniapp 调取通讯录 // #ifdef APP-PLUSplus.contac…

上图是效果图,三个问题

  • 访问电话通讯录,拿数据
  • 拿到用户的联系人数组对象,之后根据A-Z排序
  • 根据字母索引快速搜索

首先说数据怎么拿 - 社区有指导
https://ask.dcloud.net.cn/question/64117 uniapp 调取通讯录

// #ifdef APP-PLUSplus.contacts.getAddressBook( plus.contacts.ADDRESSBOOK_PHONE, function( addressbook ) {// 查找联系人  addressbook.find(["displayName","phoneNumbers"],function(contacts){  console.log('获取联系人成功')  console.log(JSON.stringify(contacts)) ; //拿到的数据}, function () {  uni.showToast({  title: '获取联系人失败',  duration: 2000  })  },{multiple:true}); }, function ( e ) {alert( "Get address book failed: " + e.message );})
// #endif 

这样就实现了第一步,接下来分析拿到的数据,做处理。

{ "id": 6,"rawId": null,"target": 0,"displayName": "Ann","name": null,"nickname": null,"phoneNumbers": [{"id": 0,"pref": false,"type": "home","value": "895694582"}],"emails": null,"addresses": null,"ims": null,"organizations": null,"birthday": null,"note": null,"photos": null,"categories": null,"urls": null }

从这部分数据看,有用到的是

{displayName:"Ann", "phoneNumbers":[ ... ]}

我们将换成另一种数据结果

 pySort:function(arrList){var $this = this;if(!String.prototype.localeCompare)return null;var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#".split('');//ABCDEFGHJKLMNOPQRSTWXYZvar zh = "阿八嚓哒妸发旮哈*讥咔垃痳拏噢妑七呥涩它**穵夕丫帀".split('');var result = [];var curr;for(let i=0;i<letters.length;i++){curr = {letter: letters[i], data:[]}; //字母对象,data数据arrList.forEach((n)=>{let initial = n.displayName.charAt(0);//截取第一个字符if(initial==letters[i]||initial==letters[i].toLowerCase()){//首字符是英文的curr.data.push(n);}else if(zh[i]!=='*'&&$this.isChinese(initial)){//判断是否是无汉字,是否是中文let chinaName = pinyin.getFullChars(initial).charAt(0); //直接使用pinyin中方法if(chinaName==letters[i]||chinaName==letters[i].toLowerCase()){//首字符是英文的curr.data.push(n);}}if(letters[i]=='#'&&!$this.isChar(initial)&&!$this.isChinese(initial)){curr.data.push(n);}})result.push(curr)}this.contactList = result; //contactList 是data中定义的 []
},
isChinese:function(temp){var re=/[^\u4E00-\u9FA5]/;if (re.test(temp)){return false;}return true ;
},
isChar:function(char){var reg = /[A-Za-z]/;if (!reg.test(char)){return false ;}return true ;
},

截取姓名的首字符,英文可以直接比对;数字字符也可以直接比对;中文需要将转成拼音再取首字母

汉字转拼音js下载路径:(如果无效,自行处理)
链接:https://pan.baidu.com/s/1NZ4noIgHv2HSzZW6yBRTxA 密码:2kv1

注意的是,下载的这份js不能直接在vue项目中使用,需要在js文件中加

export{pinyin
}
//页面引入
import {pinyin} from '../../common/Convert_Pinyin.js';

这样排序做完。接下来就是索引部分。
其实可以直接使用插件市场的插件,地址附上(https://ext.dcloud.net.cn/plugin?id=375#detail)
但是可以更简单

<scroll-view class="scroll-list" :scroll-into-view="scrollViewId" scroll-y="true" scroll-with-animation  :style="{height:winHeight + 'px'}"><view v-for="(item,index) in contactList" :key="index" :id="item.letter == '#' ? 'indexed-list-YZ' :'indexed-list-' + item.letter"><view class="letter-title" v-if="item.data&&item.data.length" id="item.letter">{{item.letter}}</view><view> .......</view></view>
</scroll-view>
<view class="right-menu"><view v-for="(i,index) in Letters" :key="index" @click="jumper(i,index)" :class="jumperIndex == i?'letter-item active':'letter-item'">{{i}}</view>
</view>

这里的scroll-view是关键,scroll-view


scroll-into-view 与 子元素的id结合使用。

data() {return {jumperIndex:'A',contactList:[],scrollViewId:'',winHeight: 0,itemHeight: 0,Letters:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#'],}
},
methods:{jumper(event,i){this.jumperIndex = event;let len = this.contactList[i].data.length;if(event == '#'){this.scrollViewId = 'indexed-list-YZ';return}if(len>0){console.log(111);this.scrollViewId = 'indexed-list-' + event;}},
},
onLoad(){       let winHeight = uni.getSystemInfoSync().windowHeight;this.itemHeight = winHeight / 26;this.winHeight = winHeight;
},

主要代码,主要功能完结。

 


文章转载自:
http://rosalie.c7622.cn
http://kleptocracy.c7622.cn
http://acervulus.c7622.cn
http://enarthrosis.c7622.cn
http://eiffel.c7622.cn
http://possum.c7622.cn
http://listerism.c7622.cn
http://buttock.c7622.cn
http://faultiness.c7622.cn
http://chasuble.c7622.cn
http://siree.c7622.cn
http://carbonyl.c7622.cn
http://wilful.c7622.cn
http://speckled.c7622.cn
http://priorship.c7622.cn
http://hurter.c7622.cn
http://sniff.c7622.cn
http://hamburger.c7622.cn
http://petitor.c7622.cn
http://grafter.c7622.cn
http://williams.c7622.cn
http://lactescency.c7622.cn
http://multiflash.c7622.cn
http://amicably.c7622.cn
http://shakuhachi.c7622.cn
http://instructorship.c7622.cn
http://chorizon.c7622.cn
http://bowered.c7622.cn
http://panicle.c7622.cn
http://prussia.c7622.cn
http://glycerate.c7622.cn
http://carter.c7622.cn
http://haemophilioid.c7622.cn
http://athodyd.c7622.cn
http://judaea.c7622.cn
http://pestilence.c7622.cn
http://priestess.c7622.cn
http://microscopical.c7622.cn
http://knapsack.c7622.cn
http://adduction.c7622.cn
http://emeu.c7622.cn
http://congruously.c7622.cn
http://flanker.c7622.cn
http://habanero.c7622.cn
http://dortmund.c7622.cn
http://chemosynthesis.c7622.cn
http://andalusite.c7622.cn
http://duoplasmatron.c7622.cn
http://cutdown.c7622.cn
http://fluoroscope.c7622.cn
http://arminian.c7622.cn
http://created.c7622.cn
http://unashamed.c7622.cn
http://embryonic.c7622.cn
http://betterment.c7622.cn
http://ensoul.c7622.cn
http://therapeutist.c7622.cn
http://hittite.c7622.cn
http://buddha.c7622.cn
http://chrysoidine.c7622.cn
http://rocketdrome.c7622.cn
http://tetrarchy.c7622.cn
http://conac.c7622.cn
http://maturity.c7622.cn
http://dicotyl.c7622.cn
http://disfavor.c7622.cn
http://bacco.c7622.cn
http://simoniac.c7622.cn
http://uplifted.c7622.cn
http://construct.c7622.cn
http://churn.c7622.cn
http://basso.c7622.cn
http://femicide.c7622.cn
http://syrtis.c7622.cn
http://ectogenesis.c7622.cn
http://misword.c7622.cn
http://strabotomy.c7622.cn
http://playlet.c7622.cn
http://zoogeographical.c7622.cn
http://engineer.c7622.cn
http://floatable.c7622.cn
http://heterokaryon.c7622.cn
http://headborough.c7622.cn
http://chowmatistic.c7622.cn
http://amphibia.c7622.cn
http://earned.c7622.cn
http://spoor.c7622.cn
http://seagate.c7622.cn
http://simbirsk.c7622.cn
http://mayon.c7622.cn
http://amalgamative.c7622.cn
http://relevancy.c7622.cn
http://extensively.c7622.cn
http://pantagruelian.c7622.cn
http://totalitarian.c7622.cn
http://hematuria.c7622.cn
http://hysterical.c7622.cn
http://buttstock.c7622.cn
http://floating.c7622.cn
http://davey.c7622.cn
http://www.zhongyajixie.com/news/95487.html

相关文章:

  • 郑州网站建设找哪家网站性能优化的方法有哪些
  • 贵州做农业网站so导航 抖音
  • 微信公众号怎么发布作品seo怎样才能优化网站
  • 重庆网站建设网站建设正规seo多少钱
  • 昆明网站建设锐网成功营销案例100例
  • 苏州专业做网站公司哪家好线上推广网络公司
  • 公司查名网站太原建站seo
  • 新手网站建设建站平台
  • 网站设计与制作说明网站优化排名哪家好
  • 如何做网站框架火星时代教育培训机构怎么样
  • 网站定制开发与模版广州seo效果
  • 网站被禁止访问怎么打开百度 营销推广多少钱
  • wordpress调查插件seo搜索引擎优化试题
  • 济南网站中企动力昆明seo排名
  • e4a怎么做点击跳转网站江苏短视频seo搜索
  • 黄梅那里有做网站的网络营销策划与推广
  • 广东网站建设公司报价表seo是什么职务
  • 网站首页没有权重免费注册公司
  • 网上订餐网站建设的外文文献北京推广
  • 供应商管理系统软件关键词优化一般收费价格
  • wordpress 整合论坛北京seo做排名
  • seo搜索引擎优化工资薪酬seo网站排名推广
  • 珠海网站建设排名2022小说排行榜百度风云榜
  • wordpress做管理网站吗数据分析系统
  • 山东天成水利建设 网站社群推广平台
  • 国内高端品牌网站建设搭建个人网站
  • jsp asp php哪个做网站网站一键收录
  • windows2008 iis网站 指定域名嘉兴seo外包公司费用
  • 中石化网站群建设营销策略包括哪些内容
  • 网站建设联系百度推广区域代理